17 KiB
MG4 Luxury 2022 — Infotainment Dev Profile
Captured via ADB on 2026-07-30. Raw dumps in device-info/.
1. Hardware & Platform
| Item | Value |
|---|---|
| Head unit | SAIC AUTUS, MediaTek MT2712 (mt2712_saic_eh32) |
| Variant | ro.product.carmode = EH32 EUUK, vehicle_type = AS28 |
| Android | 9 (Pie), API 28 — PPR1.181005.003, build 9431, 2023-06-27 |
| Build type | user / test-keys |
| CPU | ARM64 big.LITTLE — 4× Cortex-A53 (0xd04) + 2× Cortex-A72 (0xd08) |
| ABI | arm64-v8a (also armeabi-v7a, armeabi) |
| RAM | 3.94 GB total |
| GPU | ARM Mali-T880, OpenGL ES 3.2, Vulkan 1.0 (level 1) |
| Storage | /data 10 GB (8.7 GB free); /system 2.4 GB (313 MB free) |
| Locale / TZ | en-US / Europe/Copenhagen |
Serial is a placeholder (GFEDCBA0987654321) — don't key licensing off it.
2. Displays — the numbers you actually need
Display 0 — centre touchscreen (primary)
Physical 1920 x 720 @ 160 dpi (1.0x density, mdpi)
Actual pixel pitch 166.4 x 110.8 dpi <-- NON-SQUARE PIXELS
Refresh 60 Hz, single mode, no HDR
App area 1778 x 640
Status bar top, 1920 x 80 (frame [0,0][1920,80])
Nav bar LEFT, 142 x 640 (frame [0,80][142,720])
Rotation locked ROTATION_0, landscape-only
Touch fts_ts, multitouch
Because density is exactly 160 dpi, 1dp == 1px. So in XML:
<!-- usable content area -->
<dimen name="screen_w">1920dp</dimen> <!-- full -->
<dimen name="content_w">1778dp</dimen> <!-- minus left nav bar -->
<dimen name="content_h">640dp</dimen> <!-- minus top status bar -->
<dimen name="inset_left">142dp</dimen>
<dimen name="inset_top">80dp</dimen>
Two traps:
- Nav bar is on the LEFT, not the bottom. Hardcoding a bottom inset puts your
content under the nav bar. Use
WindowInsets/fitsSystemWindows, or at minimum a 142dp start padding. - Pixels are not square (166 x 111 dpi — a ~1.5:1 aspect). Circles rendered as geometric circles in px will look like vertically stretched ovals on glass. Perfect circles need roughly a 1 : 1.5 w:h ratio in px. Verify gauges, album art and logos on the real screen — this is the single most common thing that looks wrong on this unit and is invisible in the emulator.
Emulator/adb AVD equivalent: 1920x720, density 160.
Display 1 — driver instrument cluster (secondary)
800 x 480 @ 142 dpi (density 1.33125), 30 Hz, type HDMI, uniqueId local:1
Currently owned by com.saicmotor.hmi.clusterprojection/.ProjectionActivity
Flags: FLAG_PRESENTATION | FLAG_OWN_CONTENT_ONLY
Touch viewport is registered as EXTERNAL (not a real touch surface)
The device declares android.software.activities_on_secondary_displays, so you can
target the cluster:
adb shell am start --display 1 -n your.pkg/.ClusterActivity
In code, use ActivityOptions.setLaunchDisplayId(1) or a Presentation. Note 142 dpi
and 30 Hz — keep cluster UI static and high-contrast; don't animate at 60.
3. Access model — the critical constraint
| Capability | Status |
|---|---|
| ADB | ✅ enabled |
adb root |
❌ denied — production build |
su binary |
❌ absent |
| SELinux | Enforcing |
| Sideloading | ✅ open (install_non_market_apps=1, no device admin) |
| Install location | 0 [auto] |
So: you can freely sideload normal apps, but you cannot write to /system or gain
root without unlocking/flashing. Everything below is scoped to that reality.
Signature tiers
android.uid.system (uid 1000, platform sig b4addb29) is shared by 40 packages,
including all the signature|privileged car permission holders.
Notably, com.leonkernan.adbutil sits in /data/app yet runs as
android.uid.system with that same platform signature. That means the platform
signing key for this head unit is in circulation, and privileged apps can be built
if you obtain it. That is the gate for CONTROL_CAR_* write access.
Without the platform key you are limited to:
normalpermissions — e.g.android.car.permission.CAR_EXTERIOR_ENVIRONMENTdangerous(runtime-grantable) —CAR_SPEED,CAR_ENERGY- everything reachable through exported vendor services (see §4 — this is the good path)
signature|privileged — CONTROL_CAR_CLIMATE, CONTROL_CAR_DOORS,
CONTROL_CAR_WINDOWS, CONTROL_CAR_SEATS, CAR_VENDOR_EXTENSION, CAR_MILEAGE,
CAR_DRIVING_STATE, CAR_NAVIGATION_MANAGER, CAR_DISPLAY_IN_CLUSTER — are not
obtainable by a /data/app install with your own key.
4. The real API: SAIC's AIDL SDK ★ start here
Raw VHAL is a poor target here. dumpsys car_service exposes 930 properties, but only
9 are standard AOSP (PERF_VEHICLE_SPEED, GEAR_SELECTION, PARKING_BRAKE_ON,
IGNITION_STATE, ENGINE_RPM, HVAC_FAN_SPEED, HVAC_FAN_DIRECTION, HVAC_POWER_ON,
HVAC_TEMPERATURE_DISPLAY_UNITS). The other 921 are undocumented vendor IDs
(716 in the 0x2xxxxxxx vendor group, 205 OEM props squatting the system range) — and
reading them needs CAR_VENDOR_EXTENSION, which you can't hold.
Instead, SAIC ships a real AIDL SDK, and its service is exported with no permission gate:
<service android:enabled="true" android:exported="true"
android:name="com.saicmotor.service.vehicle.VehicleService">
<intent-filter>
<action android:name="com.saicmotor.service.vehicle.VehicleService"/>
</intent-filter>
</service>
No android:permission attribute → bindable by any app, including yours. The host
app (com.saicmotor.service.vehicle, uid 1000) holds CONTROL_CAR_CLIMATE,
CONTROL_CAR_SEATS, CAR_VENDOR_EXTENSION, CAR_SPEED, CAR_POWER, CAR_POWERTRAIN
and proxies them on your behalf. This is your privilege escalation path — by design.
Bind with:
val intent = Intent("com.saicmotor.service.vehicle.VehicleService").apply {
setPackage("com.saicmotor.service.vehicle") // required, targetSdk >= 30
}
bindService(intent, conn, Context.BIND_AUTO_CREATE)
SDK surface (com.saicmotor.sdk.vehiclesettings)
Hub pattern — bind IHubService, then getService(...) for each sub-interface.
Managers wrap them: AirConditionManager, VehicleConditionManager,
VehicleControlManager, VehicleChargingManager, VehicleSettingManager, ScreenManager.
Interfaces + listeners:
| Interface | Listener / callback |
|---|---|
IAirConditionService |
IAirConditionListener, registerAirConditionCallback |
IVehicleConditionService |
IVehicleConditionListener |
IVehicleControlService |
IVehicleControlListener |
IVehicleChargingService |
IVehicleChargingListener |
IVehicleSettingService |
IVehicleSettingListener |
IHubService |
— (getService) |
com.saicmotor.sdk.screen.IScreenManagerService |
IScreenStateListener |
Data beans: AirConditionBean, VehicleConditionBean, VehicleControlBean,
VehicleChargingBean, VehicleSettingBean, ChargingPile.
Constants: AirConditionConst, VehicleConditionConst, VehicleControlConst,
VehicleChargingConst, VehicleSettingConst, BleStateConst, ErrorTypeConst.
Confirmed callable methods (extracted from the shipped dex)
Climate — get/setDrvTemp, get/setPsgTemp, getDrvTempFromCar, setDrvTempToCar,
get/setAirVolumeLevel, setAirVolumeMax/Min, get/setMaxTemp, getMinTemp,
getMaxAirVolume, getMinAirVolume, open/closeHvacPower, get/setHvacPowerStatus,
get/setTempDualZoneOn, get/setAutoModeAirVolume, get/setHvacEconLinkage,
get/setHvacCustomSwitch, open/closeFrontWindowDefroster,
open/closeBackWindowDefroster, get/setAirQualityFilter, getAirQualityValue,
getOutCarTemp, isCurrentTempMax/Min, isEvenTemp
Seats & wheel — open/closeDrvSeatHeat, open/closePsgSeatHeat,
get/setDrvSeatHeatLevel, get/setPsgSeatHeatLevel, get/setDrvSeatWindLevel,
get/setPsgSeatWindLevel, get/setSteeringWheelHeat, getSteeringWheelHeatLevel,
get/setSeatHeatVentLinkage, get/setSeatAutoAdjust, get/setDriverSeatAutoWlcm
EV / charging — getChargingStatus, get/setChargingCurrent,
getActualChargingCurrent, get/setChargingCloseSoc, get/setChargingControlSwitch,
get/setChargingLockSwitch, getChargingStopReason, getPredictChargingTime,
getChargingClosePredictMileage, getPowerBatteryVol, get/setDischrgCloseSoc,
get/setDischrgControlSwitch, getDischrgControlStatus, get/setReserChrgControl,
get/setDrivingBatteryHeat, getChrgngDoorPos, getEnergyFlowInfo,
getTotalConsumptionAfterCharge, getAccConsumptionAfterCharge,
getTotalRegenEnrgAfterCharge, getTotalRegenRngAfterCharge, getRangeInfo,
sendChargingCommand, getChargingPileList, getBoundChargePileList,
addChargingPile, getLastConnectedChargingPile, getWirelessChargeState
Body / doors / windows — get/setDoorLock, get/setDriverWindow,
get/setPassengerWindow, get/setLeftRearWindow, get/setRightRearWindow,
get/setDriveWindow, get/setSunroofSwitch, get/setSunroofVentilation,
get/setElectricTailgateLock, get/setInductiveDoorHandle, get/setDrivingAutoLock,
get/setLeaveAutoLockMode
Ambient lighting (great first app) — get/setAmbtLightColor,
get/setAmbtLightBrightness, get/setAmbtLightGlbOn, get/setAmbtLightBreathingOn,
get/setAmbtLightOpenMode, get/setAmbtLightDrvMode, get/setAmbtLightWlcmOn,
get/setAmbtLightWlcmMode, getAmbtLightCustStatus, getAmbtLightAvlbly
Exterior lights — get/setAutoMainBeamControl, get/setLightRearFogSwitch,
get/setHomeLightTime, get/setWelcomeLightTime, get/setFarewellLightMode,
get/setLightingSettings
Vehicle state — getCarSpeed, getCarGear, getVehicleIgnition,
getCurrentPowerMode, getVehicleCondition, getVehicleType, getVehicleNameInfo,
getVehicleExteriorColor, getCrashSignal, getSignalPedal, isVehicleActivated,
getElectricPowertrainLevel, getSteepDescentControl, getFrontRadarControl,
get/setSpeedAsstMode, getSpeedAssistConfig, getSteeringWheelDefine,
getPsgSafetyAirbagStatus
Config codes (feature detection — check before showing UI):
getAirConditionConfigCode, getSeatHeatingConfigCode, getSunRoofControlConfigCode,
getTailgateControlConfigCode, getDriverSeatConfigCode, getFrontSeatConfigCode,
getAirbagConfigCode, getDoorAutoLockConfigCode, getEleBackMirrorConfigCode,
getEnergyPredictionConfigCode, getAirFilterConfigCode, getRearWindowAutoConfigCode
Simulation — setSimu* (setSimuDrvTemp, setSimuChargingCloseSoc,
setSimuAirVolumeLevel, setSimuDrvSeatHeatLevel, …) plus isVehicleConditionSimu /
isVehicleControlSimu / isVehicleChargingSimu / isVehicleSettingSimu.
Develop against these — you can exercise UI without moving the car or cycling
real hardware.
⚠️ The set* calls actuate real hardware (windows, locks, sunroof, tailgate,
charging). Test with the Simu variants first; treat window/door/charging writes as
destructive and gate them behind a parked check.
5. UX Restrictions — will break your app while driving
CarUxRestrictionsManager is active and enforced, with app blocking on:
mEnableActivityBlocking = true
parked → restrictions 0x0
idling → restrictions 0x0
moving (>0 km/h) → restrictions 0x1FF ← everything restricted
Blocked apps get replaced by com.android.car.pm.ActivityBlockingActivity. Limits when
moving: max string length 120, max content items 21, max content depth 3.
The whitelist is com.android.car + com.android.systemui + the permission dialog —
your app is not on it and cannot add itself without the platform key. So either
build a distractionOptimized activity:
<activity android:name=".MainActivity">
<meta-data android:name="distractionOptimized" android:value="true"/>
</activity>
…and register a CarUxRestrictionsManager listener to degrade the UI when moving, or
accept that the app is parked-only. Design for this from the start; retrofitting is painful.
6. Launcher / integration
Current HOME resolves to com.custom.launcher/.MainActivity. HOME-capable apps:
| Package | Activity | Notes |
|---|---|---|
com.custom.launcher |
.MainActivity |
★ current default, sideloaded |
com.teslacoilsw.launcher |
.NovaLauncher |
Nova, sideloaded, currently resumed |
com.saicmotor.hmi.launcher |
.ui.MainActivity |
stock OEM |
com.android.settings |
.FallbackHome |
fallback |
com.custom.launcher is your working reference implementation: minSdk 28, targetSdk 33, compileSdk 34, signed with a non-platform key (13c57bd2),
installed to /data/app — and it functions as HOME. Concrete proof that a modern,
self-signed, sideloaded app works on this unit. Pulled to
device-info/apks/custom-launcher.apk.
Its permission set is a good template: MEDIA_CONTENT_CONTROL,
BIND_NOTIFICATION_LISTENER_SERVICE, READ_LOGS, MANAGE_EXTERNAL_STORAGE,
RECEIVE_BOOT_COMPLETED, READ_MEDIA_*, Bluetooth.
OEM app launch targets (for tiles/shortcuts)
com.saicmotor.hmi.hvac/.HvacActivity
com.saicmotor.hmi.music/.ui.activity.MusicActivity
com.saicmotor.hmi.radio/.app.RadioHomeActivity
com.saicmotor.hmi.vehiclesettings/.vehicleconfig.ui.VehicleSettingsActivity
com.saicmotor.hmi.aroundview/.AVMActivity (360 camera)
com.saicmotor.hmi.btcall/.ECallActivity
com.saicmotor.hmi.systemsettings/.SettingsActivity
com.saicmotor.hmi.video/.ui.activity.UsbVideoActivity
com.saicmotor.evrouting/.view.MainActivity (EV route planner)
com.saicmotor.hmi.engmode/.home.ui.EngineeringModeActivity ★ engineering mode
Also installed: Android Auto (com.allgo.app.androidauto), CarPlay
(com.allgo.carplay.service, persist.sys.carplay.enable=true),
io.github.sds100.keymapper (steering-wheel button remapping),
com.leonkernan.adbutil.
Input devices: mtk-kpd (keypad — steering wheel / panel buttons), rtq5115_pwrkey,
fts_ts (touch). All on /system/usr/keylayout/Generic.kl. Steering-wheel keys arrive
as standard key events, so Key Mapper works — you can hook them too.
7. Recommended build config
android {
compileSdk = 34
defaultConfig {
minSdk = 28 // Android 9 — hard floor
targetSdk = 33 // proven by com.custom.launcher
ndk { abiFilters += listOf("arm64-v8a") }
}
}
android.hardware.type.automotiveis present, but do not ship as an Android-Automotive-OS app — this is Android 9 + SAIC's own HMI, not AAOS. Build a normal landscape phone/tablet app.- Landscape only (
android.hardware.screen.landscape, rotation locked). faketouch+touchscreen.multitouchboth present.- Target ≤ 33: at targetSdk 34+, Android 9 devices ignore some behaviour and
FOREGROUND_SERVICE_*subtypes don't exist on API 28. - Vulkan is available, but Mali-T880 on a 2017-era SoC — prefer plain Views/Compose over heavy 3D. Keep the 60 Hz budget in mind on the A72 pair.
8. Suggested first project
Ambient-lighting controller. It hits the exported IVehicleSettingService
(no privileged permission needed), the API is fully mapped
(setAmbtLightColor / Brightness / BreathingOn / OpenMode), it's non-destructive
if you get it wrong, getAmbtLightAvlbly lets you feature-detect, and it's genuinely
useful. Ship it as a Nova-launchable activity, then graduate to a full launcher
replacement once the SDK binding is proven.
The natural second project is a charging/energy dashboard —
getEnergyFlowInfo, getTotalConsumptionAfterCharge, getRangeInfo,
getPredictChargingTime are all read-only and parked-safe.
9. Files captured
device-info/
├── getprop-full.txt 358 system properties
├── display.txt full dumpsys display
├── car_service.txt 3524 lines — CarService state + all 930 property configs
├── packages-all.txt 102 packages with paths
├── propids.txt 930 unique property IDs
├── decoded-props.txt IDs decoded to group/area/type
├── framework/
│ ├── android.car.jar stub (200 B — real code is in boot vdex)
│ ├── boot-android.car.vdex 692 KB — actual android.car implementation
│ └── framework-res.apk 37 MB — system theming/resources
├── apks/
│ ├── VehicleSettingsService_eh32_P.apk ★ the SDK — decompile this first
│ ├── vehicleService_overseas_eh32.apk 53 MB
│ ├── HVAC_eh32_P.apk climate UI reference
│ ├── ClusterInteraction_eh32_P.apk cluster projection reference
│ ├── Launcher_eh32_P.apk stock launcher reference
│ ├── CarService.apk
│ └── custom-launcher.apk ★ working sideloaded HOME reference
└── decomp/vehsvc/ apktool output + vehsvc-strings.txt (29987 strings)
10. Open questions / next steps
- Platform signing key — where did
com.leonkernan.adbutilget platform-signed? If that key is obtainable,signature|privilegedcar permissions and the UX-restriction whitelist both open up. Biggest single unlock available. - Decompile to real AIDL.
apktoolgave resources + smali only; installingjadxwould yield actual Java signatures (argument types, return types, error codes) for the SDK. Method names are mapped in §4, but not yet their parameters — that's the main remaining gap before writing code.yay -S jadx # or: pac