Documentation

Install Drive Assist

This guide is for a Geely EX2 / Geometry E whose centre screen has already been unlocked to install third-party apps. If your car still has its original locked software, follow a trusted IHU629G unlocking guide first.

Choose the easiest method for you

What you have Use this method
A USB drive and a file manager on the car One-file USB installer
A computer already connected to the car through ADB Automatic Wi-Fi script
ADB AppControl on Windows Windows graphical method
You develop or troubleshoot Android software Manual ADB commands

Most owners should use the first method. It uses one APK, installs both parts of Drive Assist, opens the dashboard, and removes the temporary installer afterward. The other sections are reference material; you do not need to read them first.

Before beginning, park the car, keep the head unit powered, and download APKs only from the project’s official release page.


Technical background: why the installer adds two apps

Drive Assist employs a dual-package architecture to comply with Android 9 automotive security constraints:

Package APK File Role & Privileges Key Capabilities
All-in-One Installer drive_assist_installer.apk Disposable Setup Wizard
android.uid.system (UID 1000)
Bundles modehelper.apk and drive_assist.apk inside its assets. Performs silent background installation via Android PackageInstaller, starts services, launches the dashboard, and automatically deletes itself.
Drive Assist drive_assist.apk (com.geely.drivemem) Main Driver UI
Standard User UID (unprivileged)
1920x1080 Comfort View touchscreen UI, Comfort Ruler HVAC, 14-day trip statistics, Home Assistant MQTT client & /panel WebView, ABRP telemetry streamer, and dashcam controls.
ModeHelper modehelper.apk (com.geely.modehelper) Headless Companion
android.uid.system (UID 1000)
Platform-signed system daemon. Automatically restores drive mode (ECO/COMFORT/SPORT) and creep mode upon vehicle start, manages network ADB security gates, handles silent OTA updates, and interfaces with hardware EVS cameras.
┌──────────────────────────────────────────────────────────┐
│                   Drive Assist (`drivemem`)              │
│       Standard UID • Full UI / WebView • MQTT Client     │
└──────────────┬────────────────────────────▲──────────────┘
               │ Broadcasts (Intents)       │ Status / Telemetry
               ▼                            │
┌───────────────────────────────────────────┴──────────────┐
│                    ModeHelper (`modehelper`)             │
│        `android.uid.system` (UID 1000) • Headless        │
├──────────────────────────────────────────────────────────┤
│  • Drive Mode & Regen Memory (`CarMode`)                 │
│  • Silent OTA Package Installer (`Installer`)            │
│  • Hardware Dashcam Engine (`DashRecorder`, `EvsClient`) │
│  • Network ADB & Privileged Wi-Fi Guard (`AdbControl`)   │
│  • Wi-Fi Keep-Alive & Throttling Bypass                  │
│  • Programmatic Bluetooth Pairing (`BtPairReceiver`)     │
└──────────────────────────────────────────────────────────┘

[!NOTE] Why are there two separate packages? Android strictly forbids instantiating an Android WebView inside any process that shares android.uid.system. Attempting to load a WebView inside a system process triggers a fatal crash (android.util.AndroidRuntimeException: Using WebView from more than one process at once with the same data directory is not supported).

Because Drive Assist embeds an interactive Home Assistant WebView card (PanelCardView), UI rendering must run in a standard user UID (com.geely.drivemem). Conversely, privileged capabilities like silent package installation, secure settings manipulation, and reading VHAL properties require android.uid.system (com.geely.modehelper).

The All-in-One Installer (drive_assist_installer.apk) provides the best of both worlds: drivers only handle one single file. It provisions both packages with exact permissions and then uninstalls itself, leaving zero clutter in your application drawer.


🚀 Installation Methods

Choose the deployment workflow best suited to your equipment:

This is the simplest standalone method for drivers who already have Cx File Explorer (or any Android file manager) installed on the head unit from the initial unlock process.

Prerequisites

Step-by-Step Instructions

  1. Copy File: Copy drive_assist_installer.apk to the root of your USB flash drive.
  2. Connect to Car: Plug the USB drive into the center console USB port of your Geely EX2.
  3. Open File Manager: On the car’s touchscreen, launch Cx File Explorer (or your preferred file manager).
  4. Locate & Install:
    • Navigate to the USB storage directory.
    • Tap drive_assist_installer.apk.
    • When prompted by Android package installer, tap Install, then tap Open.
  5. Automated Setup Pipeline: The Drive Assist Setup wizard opens in full-screen on the 1920x1080 display:
    • Extracts bundled modehelper.apk and drive_assist.apk from internal APK assets.
    • Silently commits both packages through Android PackageInstaller sessions.
    • ModeHelper receives android.uid.system (UID 1000) and platform permissions.
    • Starts ModeHelperService in the background.
    • Launches ComfortActivity (Drive Assist main UI) on the screen.
    • The installer invokes Android DELETE_PACKAGES to automatically uninstall itself, leaving zero leftover setup apps on your head unit.
  6. Verify: Drive Assist Comfort View appears immediately on your dashboard.

Method 2: The One-Shot Wi-Fi Script (install.sh — Fastest via Terminal)

If your laptop (macOS, Linux, or Windows with Git Bash) is on the same local Wi-Fi or phone hotspot as the vehicle:

Execution

  1. Open a terminal in the repository root:
    cd ~/dev/geely/drive_assist
    
  2. Run the automated installer with your car’s IP address:
    ./install.sh <CAR_IP>
    

    (Replace <CAR_IP> with the address shown in the car’s Wi-Fi settings.)

What the Script Executes Automatically

  1. ADB Connectivity: Establishes connection to <CAR_IP>:5555 and verifies target device model (IHU629G).
  2. Asset Resolution: Checks for drive_assist_installer.apk. If found, installs and executes the wizard. If individual APKs are present (drive_assist.apk and modehelper/modehelper.apk), it installs both directly with -r -g flags.
  3. Service Initialization: Starts the ModeHelper foreground daemon (ModeHelperService) and brings ComfortActivity to the foreground display.
  4. Completion: Prints confirmation banner when Drive Assist is active on screen.

install.sh does not touch Bluetooth pairing or /system. An OBD2 adapter is optional; Drive Assist works without one. The PIN workaround is a separate, manual action only for a compatible dongle that cannot pair normally:

bt-pin-fix/apply-pin-1234.sh    # before pairing the dongle
bt-pin-fix/revert-pin-0000.sh   # right after pairing succeeds

[!WARNING] This is a persistent, system-wide change, not an installation step. It modifies /system/etc/bluetooth/btDefSetting.json; uninstalling Drive Assist and factory-resetting the car do not undo it. While active, it changes the automatic PIN used for simple Bluetooth pairing for every device, not only the OBD2 adapter. Do it only while parked, disconnect/reconnect Bluetooth only when it will not interrupt a call or media session, and restore 0000 immediately after the intended dongle bonds.

You only need the PIN changed for the few minutes it takes to pair the dongle. Once a Bluetooth device is paired, the car remembers it by a stored bond key, not by re-checking the PIN — so the PIN can go back to factory 0000 right after pairing succeeds, and the dongle stays paired. Don’t leave the PIN on 1234 any longer than that.

The scripts replace the complete configuration file captured from the tested firmware, not an isolated setting. Do not apply or revert them after an IHU firmware update unless you have first checked that the on-car file matches the expected version; otherwise either operation can overwrite OEM Bluetooth configuration changes.


Method 3: Direct Manual ADB Commands (Step-by-Step Reference)

For complete control over each command line operation:

1. Connect and Verify Target Hardware

# Connect over Wi-Fi
adb connect <CAR_IP>:5555

# Verify device model and display geometry
adb shell getprop ro.product.model       # Expected: IHU629G
adb shell wm size                        # Expected: Physical size: 1920x1080
adb shell wm density                     # Expected: Physical density: 160

2. Option A — Install via Single Installer APK

# Install disposable setup wizard
adb install -r -g drive_assist_installer.apk

# Launch installer UI on dashboard
adb shell am start -n com.geely.installer/.InstallerActivity

# Or trigger headless background setup via broadcast
adb shell am broadcast -a com.geely.installer.INSTALL -n com.geely.installer/.InstallerReceiver

3. Option B — Direct Dual-APK Installation

If installing individual pre-compiled APKs:

# Install system companion (UID 1000)
adb install -r -g modehelper/modehelper.apk

# Install main user application
adb install -r -g drivemem/build/outputs/apk/release/drive_assist.apk

# Start companion foreground service
adb shell am start-foreground-service com.geely.modehelper/.ModeHelperService

# Launch main application on dashboard
adb shell am start -n com.geely.drivemem/.ui.ComfortActivity

4. Optional: Pair an OBD2 Adapter

Do not modify Bluetooth settings as part of normal installation. If a compatible adapter fails because this IHU automatically sends 0000, read the warning and follow the one-time procedure in Bluetooth OBD2 troubleshooting.

5. Extend Network ADB Auto-Off Window

By default, ModeHelper enforces a 15-minute auto-off timer for network ADB security. To extend the active debugging window during setup:

# Keep ADB open for 60 minutes
adb shell am broadcast -a com.geely.modehelper.SET_ADB --ez enable true --ei minutes 60

Method 4: Using ADB AppControl (Windows GUI Alternative)

Drivers utilizing the Vietnamese community tool ADB AppControl on Windows:

  1. Connect ADB AppControl to your vehicle address (<CAR_IP>:5555).
  2. Select the Install tab.
  3. Drag and drop drive_assist_installer.apk into the file queue.
  4. Click Install.
  5. Once installation finishes, tap Drive Assist Setup on your car’s screen (or run am start -n com.geely.installer/.InstallerActivity in the ADB AppControl Console tab).
  6. The setup wizard provisions both apps and self-removes automatically.

🔍 Verification & Post-Installation Health Check

Confirm that both packages are operating with appropriate privilege separation and background services are active:

1. Verify ModeHelper Privileges (UID 1000)

Run the following command over ADB:

adb shell dumpsys package com.geely.modehelper | grep -E "userId=|sharedUser|grantedPermissions"

Expected Output:

userId=1000
sharedUser=SharedUserSetting{.../android.uid.system}
  android.permission.INSTALL_PACKAGES: granted=true
  android.permission.WRITE_SECURE_SETTINGS: granted=true
  android.permission.BLUETOOTH_PRIVILEGED: granted=true

2. Verify Drive Assist Package (Standard UID)

adb shell dumpsys package com.geely.drivemem | grep -E "userId=|sharedUser"

Expected Output:

userId=10xxx   # Standard unprivileged application UID (NOT 1000)

(Confirms that WebView initialization in PanelCardView will not trigger Android system UID crashes).

3. Verify Active Background Services

adb shell dumpsys activity services com.geely.drivemem
adb shell dumpsys activity services com.geely.modehelper

Verify that ModeHelperService, TelemetryService, OutTempService, and WifiIconService are in the ServiceRecord list with active PIDs.

4. Test Live VHAL Communication

Execute a diagnostic VHAL probe broadcast:

adb shell am broadcast -a com.geely.modehelper.READPROP --es ids "289408001,557884279"

Inspect logcat -s ModeHelper:I:

ModeHelper: rp: 289408001@0 = 4    # Selected gear: PARK (4)
ModeHelper: rp: 557884279@0 = 120  # Outdoor temperature: 20.0 °C

🛠️ Comprehensive Troubleshooting

1. Bluetooth OBD2 Dongle Pairing Fails (UNBOND_REASON_AUTH_FAILED)

Problem

The tested vLinker MC+ fails from the vehicle Bluetooth settings screen without displaying a PIN entry prompt. Other ELM327-based adapters are untested and may use a different pairing method or PIN.

Root Cause

In /system/etc/bluetooth/btDefSetting.json, the factory firmware hardcodes "pairingCode": "0000" for automated background pairing. Standard OBD2 dongles expect PIN "1234". The vehicle automatically transmits 0000 without prompting the user, and the dongle immediately rejects the pairing request.

Optional workaround A — Scripted system-file change

Only use this while the car is parked and only after reading the warning above. It is not needed for Drive Assist, ABRP, or an adapter that pairs normally.

./bt-pin-fix/apply-pin-1234.sh <CAR_IP>

Manual system-file edits

They are deliberately not documented as a normal alternative. A failed command can leave /system writable, and a partial or firmware-mismatched edit can damage the Bluetooth configuration. Use the script only for the tested firmware and only for the temporary workaround above.

Optional workaround C — Headless Bluetooth Pairing via ModeHelper

ModeHelper can request a bond for a specified MAC address without changing /system. It is still a privileged operation and requires the trusted ModeHelper package to be installed; it is not required for normal use.

adb shell am broadcast -a com.geely.modehelper.BT_PAIR \
  --es addr "AA:BB:CC:DD:EE:FF" --es pin "1234" \
  -n com.geely.modehelper/.BtPairReceiver

Reverting to Factory Settings

Run this right after pairing succeeds — the dongle stays paired via its own stored bond key, not the PIN, so there’s no reason to leave the PIN changed. Also run it before dealership visits, maintenance, or towing:

./bt-pin-fix/revert-pin-0000.sh <CAR_IP>

2. Network Gateway, Privileged Wi-Fi & ADB Auto-Off

Problem

Network ADB disconnects automatically after 15 minutes, or Dashcam background offloading does not execute when connected to Wi-Fi.

Root Cause

Solutions

  1. Configure Privileged Wi-Fi SSID: Assign your home Wi-Fi SSID as the trusted network. When connected to this SSID, ModeHelper keeps ADB open indefinitely and acquires a partial wakelock:
    adb shell am broadcast -a com.geely.modehelper.SET_TRUSTED_WIFI --es ssid "YourHomeWifiName"
    

    (To clear trusted Wi-Fi, pass --es ssid "").

  2. Extend ADB Auto-Off Window:
    # Extend active session up to 120 minutes
    adb shell am broadcast -a com.geely.modehelper.SET_ADB --ez enable true --ei minutes 120
    
  3. Update Home Gateway in Preferences: Configure adb_home_gw in drivemem preferences or use ./tools/configure-car.sh to match your home router gateway.

3. Black Screen on ADB Screencap / Standby Shield Lock

Problem

Executing adb exec-out screencap -p > screen.png captures a 10.5 KB completely black image, or touchscreen input appears blocked while parked.

Root Cause

The IHU629G factory SystemUI contains com.android.systemui.SheildLayerUtil. When Settings.System.getInt("set_back_light") == 0, SystemUI displays an opaque top-level overlay (showTouchShieldLayer, window type 2059) to dim the screen and guard against accidental touches during standby or cleaning.

Solution


4. ModeHelper Companion Service Terminated or Suspended

Problem

Drive modes are not automatically restored after waking the vehicle from deep sleep, or drive mode toggles in the UI report companion unavailable.

Solution

  1. Check Service Status:
    adb shell dumpsys activity services com.geely.modehelper
    
  2. Restart Foreground Daemon:
    adb shell am start-foreground-service com.geely.modehelper/.ModeHelperService
    
  3. Verify Boot Receiver Registration: ModeHelper automatically starts on android.intent.action.BOOT_COMPLETED. Verify with:
    adb shell dumpsys package com.geely.modehelper | grep -A 5 "BootReceiver"
    

🎮 Daily Operation & Customization

Once installed, Drive Assist integrates naturally into your daily driving routine:

1. Comfort Ruler (HVAC Climate Automation)

Drive Assist Comfort View Figure 1: Drive Assist Comfort View featuring the Comfort Ruler, real-time charging status, and HVAC toggles on the 1920x1080 display.

2. Drive Mode & Creep Persistence

Drive Assist Telemetry & Settings View Figure 2: Drive Assist Telemetry & Settings View displaying drive mode selectors (ECO, COMFORT, SPORT), regenerative braking levels, and integrations.

3. Trip Statistics & Altimetry Dashboard

Drive Assist Daily Statistics View Figure 3: Drive Assist’s Daily Statistics view, showing the day’s session log — drives, a charging session, and a Valet-mode interval — alongside the hourly distance-by-speed-bucket chart.

4. Continuous Hardware Dashcam


⚙️ Interactive CLI Customization (configure-car.sh)

Typing long passwords, MQTT URLs, and private tokens on a vehicle touchscreen is awkward. Drive Assist includes an interactive command-line configuration tool:

# Run interactive setup wizard over Wi-Fi
./tools/configure-car.sh <CAR_IP>

Supported Remote Configuration Levers


🤝 Community Credits & Upstream References

Drive Assist builds upon reverse-engineering research conducted by the open-source automotive community:

  1. Jean na Estrada: Brazilian community video tutorials (YouTube Guide) documenting the OTA unlock procedure and factory recovery files for 1111 and 1114 firmware versions.
  2. 4PDA Community: Forum thread «Автомобильное ГУ Geely EX2 IHU629G - Обсуждение» for hardware analysis, recovery log inspection, and Flyme Auto architecture.
  3. XDA Developers Community: Discovery of the dynamic engineering mode password calculation algorithm (#* + month+10 + day + hour).
  4. XeThongMinh.net: Vietnamese automotive community tutorials on IHU629G unlocking and ADB AppControl deployment.