Frida hook: iOBD2 Android app
The iOBD2 Android app is rarely updated. This Frida hook:
- Forces the Baidu car-path flow
- Logs chem/dashboard telemetry to logcat as CSV (
hook-obd-data) - Injects extra OBD command sets in sports mode
- Fixes
DataArrayuse-before-define in the original script
Download
Full script: iobd2-frida-hook.js
frida -U -f <iOBD2 package> -l iobd2-frida-hook.js --no-pause
Excerpt
'use strict';
Java.perform(function () {
var Log = Java.use('android.util.Log');
var DataArray = Java.use('com.obd2.comm.DataArray'); // hoisted — used by sports.getData
var state = { lat: 0, lng: 0, alt: '' };
function logChemi(chem) {
if (!chem) {
Log.v('hook-refreshChemiUI', 'lat: ' + state.lat + ', lng: ' + state.lng);
return;
}
Log.v('hook-obd-data', [
state.alt, state.lat, state.lng,
chem.getRpm(), chem.getSpeed(), chem.getEngineLoad()
// ... full field list in download
].join(','));
}
// Dashboard → force Baidu path; sports/edite/idling → wrap refreshChemiUI
// ...
});
See the download for the complete hooks (Baidu location, sports getData, dashboard service, etc.).