Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/scripts/install-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,44 @@ if adb shell dumpsys package $PKG 2>/dev/null | grep -m1 "pkgFlags=" | grep -q D
crash_window "Pit lane"; crash_window "Asphalt"
connect_demo || log "connected after crash window: FAILED (no Demo car)"
fi
# Unconfirmed readings in Enhanced diagnostics, for the design check: debug builds can be given a
# car without the car sheet (demo_car). A 2018 Forester gets the unconfirmed engine readings, and
# the demo answers its CVT temperature (confirmed) and its oil temperature and knock (unconfirmed).
enhanced_unconfirmed() { # $1 style
local slug; slug=$(echo "$1" | tr ' A-Z' '-a-z')
app_front; disconnect_app; close_trip || true
if tap_text "Style"; then sleep 1; for i in 1 2 3 4 5 6; do tap_text "$1" && break; adb shell input swipe 540 1800 540 700 300; sleep 1; done; sleep 3; fi
adb shell am force-stop $PKG; sleep 2
timeout 60 adb shell am start -W -n $PKG/.HomeActivity --es demo_car Subaru,2018,Forester > /dev/null 2>&1; sleep 4
connect_demo || { log "enhanced unconfirmed ($1): FAILED (no Demo car)"; FAIL=1; return; }
local ok=0
diag_top
adb logcat -c
if tap_scrolled "Enhanced diagnostics"; then
for i in $(seq 1 15); do
adb logcat -d -s OBD2Deep:I > "$OUT/deep-unconfirmed-$slug.txt" 2>/dev/null
grep -Eq "enhanced: .*Engine oil temperature=90 °C.*Knock correction=" "$OUT/deep-unconfirmed-$slug.txt" && { ok=1; break; }; sleep 2
done
sleep 2; shot "13-enhanced-unconfirmed-$slug"
adb shell uiautomator dump /sdcard/ui.xml > /dev/null 2>&1; adb shell cat /sdcard/ui.xml > "$OUT/ui-unconfirmed-$slug.xml" 2>/dev/null
adb shell input swipe 540 1800 540 900 300; sleep 1; shot "13-enhanced-unconfirmed-$slug-2"
adb shell input keyevent KEYCODE_BACK; sleep 2
fi
if [ $ok = 1 ] && grep -q "unconfirmed" "$OUT/ui-unconfirmed-$slug.xml"; then log "enhanced unconfirmed ($1): shown"
else log "enhanced unconfirmed ($1): FAILED ($(tail -1 "$OUT/deep-unconfirmed-$slug.txt" 2>/dev/null | cut -c1-120))"; FAIL=1; fi
}
if adb shell dumpsys package $PKG 2>/dev/null | grep -m1 "pkgFlags=" | grep -q DEBUGGABLE; then
enhanced_unconfirmed "Pit lane"; enhanced_unconfirmed "Asphalt"
# Back to no car chosen, as the rest of the tour expects.
app_front; disconnect_app; close_trip || true
adb shell am force-stop $PKG; sleep 2
timeout 60 adb shell am start -W -n $PKG/.HomeActivity --es demo_car none > /dev/null 2>&1; sleep 4
# Diagnostics lays out its sections before that extra clears the car, so Car and connection
# (open while no car is chosen) started closed: open the app once more with no car chosen.
adb shell am force-stop $PKG; sleep 2
timeout 60 adb shell am start -W -n $PKG/.HomeActivity > /dev/null 2>&1; sleep 4
connect_demo || log "connected after unconfirmed readings: FAILED (no Demo car)"
fi
adb shell am start -n $PKG/.HomeActivity --ei demo_speed 0 > /dev/null 2>&1; sleep 2 # back to normal driving
# A longer drive, then Disconnect: the trip summary should sum it up.
sleep 35
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Every change to OBD2 Reader, newest first. Each GitHub release shows the entry for its version.

## 2.5.23 (30 November 2026)
- **More Subaru CVT and all-wheel-drive readings.** Enhanced diagnostics now reads, from Subaru's transmission computer, the CVT ratio, the primary and secondary pulley speeds, the torque converter's turbine speed and lock-up duty, and the all-wheel-drive clutch duty, along with the transmission fluid temperature.
- **Subaru transmission temperature on more cars.** It was only asked for where the 2023 and later Outback keeps it, so many 2013–2022 CVT Subarus may not have shown it. Owners have found these readings under different numbers on different Subarus, so the app now tries each number known and shows the first your car answers. Like the other manufacturer readings, they come from owners testing them on their own cars rather than from Subaru, and the app says so.
- **Subaru engine readings, marked unconfirmed.** On the 2014 and later Forester and WRX and the Ascent, Enhanced diagnostics also tries engine oil temperature, a roughness (misfire) monitor for each cylinder, knock correction, cam timing advance on each bank, turbo wastegate, fuel pump and alternator duty, 12 V battery temperature and radiator fan duty. They've only been seen in one owner-made list so far, so the app marks them unconfirmed until they're checked on more cars. Target boost and injector pulse width were left out because their scaling didn't add up.
- **Transmission temperature for GM and Holden.** Enhanced diagnostics now shows the transmission fluid temperature on Chevrolet, GMC, Holden, Buick, Cadillac, Pontiac, Saturn and Hummer cars that give it, from the transmission computer or the engine computer, whichever answers. GM and Holden cars had no manufacturer readings before.
- **Transmission temperature for Toyota, Lexus and older Fords.** Toyota and Lexus automatics now show the transmission fluid temperature, and the torque converter's where the car gives it. Fords that don't answer the transmission temperature the app already asked for, such as the 2002–2010 Explorer, are now asked under the number they use.
- **The odometer stays out of shared adapter logs.** Unless Hide VIN is set to show it in full, an adapter log or reply recording you share or save, and the crash report, now leave out the odometer reading as well as the VIN, from the standard request and from Ford's, Toyota's, Renault's and older Volvos' own.

## 2.5.22 (29 November 2026)
- **More standard readings.** 24 more readings from the OBD2 standard, shown on cars that report them, to graph or put on the Dashboard: absolute engine load, the mixture the engine computer is aiming for, relative and secondary throttle positions, accelerator pedal positions, the commanded throttle, fuel injection timing, engine friction torque, cylinder fuel rate, the gear ratio the gearbox is in, the odometer (in km or miles), AdBlue dosing, and the current of wide-band oxygen sensors that report one. Readings whose scaling isn't published openly, such as turbo speed, boost control, the diesel particulate filter and the NOx sensor, are still left out rather than guessed.
- **One more Subaru code.** U1566, a Multi-View system data fault, on the 2023–2025 Legacy and Outback, 2023–2024 Ascent, 2024 Impreza and Crosstrek and 2025 Forester. Subaru's own bulletin says it can be set falsely and is fixed by an infotainment software update.
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/com/obdreader/app/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ open class MainActivity : AppCompatActivity() {
if (savedInstanceState == null) Exports.cleanUp(this) // shared reports and logs are temporary copies
com.obdreader.app.session.CrashCatcher.install(this)
// The app closed unexpectedly last time: offer the report (after the clean-up above, which would delete its copy).
if (savedInstanceState == null) { crashReportDemoIfAsked(intent); offerCrashReport() }
if (savedInstanceState == null) { demoCarIfAsked(intent); crashReportDemoIfAsked(intent); offerCrashReport() }

bottomNav.setOnItemSelectedListener { item ->
showPage(item.itemId)
Expand Down
17 changes: 17 additions & 0 deletions app/src/main/java/com/obdreader/app/MainCar.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,23 @@ internal fun MainActivity.updateCarSetting() {
carSetting.text = car?.label ?: getString(R.string.car_not_set)
findViewById<View>(R.id.carExpect).visibility = if (car != null && CarSupport.expectations(car).isNotEmpty()) View.VISIBLE else View.GONE
}
/**
* Debug builds: the test tour chooses a car without the car sheet ("Subaru,2018,Forester"), so it
* can check readings only some cars get, or clears it again ("none"). Commas, because adb passes the
* extra through a shell, where "|" would split the command. Release builds ignore it.
*/
internal fun MainActivity.demoCarIfAsked(intent: android.content.Intent?) {
if ((applicationInfo.flags and android.content.pm.ApplicationInfo.FLAG_DEBUGGABLE) == 0 || intent?.hasExtra("demo_car") != true) return
val parts = intent.getStringExtra("demo_car").orEmpty().split(",").map { it.trim() }
intent.removeExtra("demo_car")
val year = parts.getOrNull(1)?.toIntOrNull()
val edit = prefs.edit().remove(PREF_LAST_PROTOCOL).remove(PREF_CAR_ENGINE)
if (parts[0].isNotBlank() && year != null) edit.putString(PREF_CAR_MAKE, parts[0]).putInt(PREF_CAR_YEAR, year).putString(PREF_CAR_MODEL, parts.getOrNull(2))
else edit.remove(PREF_CAR_MAKE).remove(PREF_CAR_YEAR).remove(PREF_CAR_MODEL)
edit.apply()
updateCarSetting()
applyRedline()
}
/** No car chosen yet, and the user hasn't said theirs isn't listed. */
internal fun MainActivity.needsCar(): Boolean = savedCar() == null && !prefs.getBoolean(PREF_CAR_ASKED, false)
internal fun MainActivity.showCarPicker(firstRun: Boolean = false, prefill: VehicleCatalog.Car? = null, onDone: (() -> Unit)? = null) {
Expand Down
10 changes: 6 additions & 4 deletions app/src/main/java/com/obdreader/app/MainDeeperChecks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,8 @@ internal suspend fun MainActivity.showEnhanced() {
val volvo = ObdSession.isVolvoD3B0(this)
val volvoKm = if (volvo) ObdSession.readVolvoMileage() else null
if (volvo) android.util.Log.i("OBD2Deep", "volvo mileage: " + (volvoKm?.let { String.format(Locale.US, "%.0f km", it) } ?: "none"))
val answered = tried.filter { first[it] != null }
val answered = EnhancedReadings.shown(tried, first)
val known = EnhancedReadings.known(tried)
android.util.Log.i("OBD2Deep", "enhanced: tried ${tried.size}, answered " + answered.joinToString(", ") { "${it.name}=${first[it]?.let(it::format)}" }.ifEmpty { "none" })
val values = mutableMapOf<EnhancedReadings.Reading, TextView>()
infoSheet(getString(R.string.enhanced_title)) { heading, line, body ->
Expand All @@ -570,14 +571,14 @@ internal suspend fun MainActivity.showEnhanced() {
when {
volvo && tried.isEmpty() -> {}
tried.isEmpty() -> line("No manufacturer readings are known for ${make ?: "this make"} yet. Module information, below, works on every make.", true)
answered.isEmpty() -> line("Your car didn't answer any of the ${tried.size} readings known for ${make ?: "its make"}. Not every model has them.", true)
answered.isEmpty() -> line("Your car didn't answer any of the $known readings known for ${make ?: "its make"}. Not every model has them.", true)
else -> answered.forEach { r ->
body.addView(LinearLayout(this).apply {
orientation = LinearLayout.HORIZONTAL; gravity = Gravity.CENTER_VERTICAL; setPadding(0, dp(6f).toInt(), 0, 0)
addView(LinearLayout(this@showEnhanced).apply {
orientation = LinearLayout.VERTICAL
addView(TextView(this@showEnhanced).apply { text = r.name; setTextSize(TypedValue.COMPLEX_UNIT_SP, 14f); setTextColor(themeColor(R.attr.obdTextPrimary)) })
addView(TextView(this@showEnhanced).apply { text = r.module; setTextSize(TypedValue.COMPLEX_UNIT_SP, 12f); setTextColor(themeColor(R.attr.obdTextSecondary)) })
addView(TextView(this@showEnhanced).apply { text = if (r.confirmed) r.module else getString(R.string.enhanced_unconfirmed_module, r.module); setTextSize(TypedValue.COMPLEX_UNIT_SP, 12f); setTextColor(themeColor(R.attr.obdTextSecondary)) })
}, LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1f))
addView(TextView(this@showEnhanced).apply {
text = first[r]?.let(r::format) ?: "N/A"; typeface = titleTypeface(); setTextSize(TypedValue.COMPLEX_UNIT_SP, 18f); setTextColor(themeColor(R.attr.obdAccentText))
Expand All @@ -586,8 +587,9 @@ internal suspend fun MainActivity.showEnhanced() {
})
}
}
if (answered.isNotEmpty() && answered.size < tried.size) line("${tried.size - answered.size} more known for your make weren't answered by your car.", true)
if (answered.isNotEmpty() && answered.size < known) line("${known - answered.size} more known for your make weren't answered by your car.", true)
if (tried.isNotEmpty()) line(getString(R.string.enhanced_source), true)
if (answered.any { !it.confirmed }) line(getString(R.string.enhanced_unconfirmed), true)
heading("Module information")
line("Part numbers, software versions and the VIN each module holds, read with the standard identifiers every make's modules use.", true)
body.addView(MaterialButton(this, null, com.google.android.material.R.attr.materialButtonOutlinedStyle).apply {
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/com/obdreader/app/obd/DemoTransport.kt
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,11 @@ class DemoTransport(
return when {
engine && did == "1E1C" -> two(((70 + min(12.0, seconds() / 20)) * 16).toInt())
engine && did == "054B" -> "41"
// A Subaru (the tour's unconfirmed-readings check): CVT fluid 85 °C on the transmission
// computer, and two of the unconfirmed engine readings, oil 90 °C and knock -1.5°.
h == "7E1" && did == "10D2" -> "87"
engine && did == "10AF" -> "82"
engine && did == "3018" -> "7A"
h == "726" && did == "DD01" -> "01E240"
h == "726" && did == "4028" -> "55"
h == "726" && did == "4029" -> "41"
Expand Down
Loading