App 2.19.4: Export CarPlay data to the USB stick

Read-only diagnostic for CarPlay's resolution: window, SurfaceFlinger
and display state captured while CarPlay is in front, display-related
properties without identifiers, Allgo's APK and libraries and
CarPlay-named system files, written to the app's folder on the stick.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
2026-10-23 21:40:08 +02:00
co-authored by Claude Opus 5.5
parent 51beea5ed8
commit 66b403acb8
10 changed files with 360 additions and 14 deletions
@@ -242,9 +242,46 @@ public class MainActivity extends AppCompatActivity {
if (r.statusBarPx != null) {
sb.append('\n').append(getString(R.string.foreground_status_bar, r.statusBarPx));
}
if (lastCarPlayExport != null) {
sb.append('\n').append(getString(R.string.carplay_export_last, lastCarPlayExport));
}
return sb.toString();
}
/** The last CarPlay export's outcome, for the Foreground apps card; null before the first. */
private static volatile String lastCarPlayExport;
/**
* Waits 20 seconds, so the driver can bring CarPlay to the front, then exports what decides
* its size to the USB stick (CarPlayExport). Runs in the app's process, which the upload
* service keeps alive while this activity is in the background.
*/
private void startCarPlayExport() {
android.content.Context app = getApplicationContext();
android.os.Handler main = new android.os.Handler(android.os.Looper.getMainLooper());
Toast.makeText(app, R.string.carplay_export_started, Toast.LENGTH_LONG).show();
new Thread(() -> {
try {
Thread.sleep(20_000);
} catch (InterruptedException e) {
return;
}
main.post(() -> Toast.makeText(app, R.string.carplay_export_running, Toast.LENGTH_SHORT).show());
String result;
try {
result = CarPlayExport.run(app);
} catch (Throwable t) {
result = "Export failed: " + t;
}
lastCarPlayExport = result;
final String shown = result;
main.post(() -> {
Toast.makeText(app, shown, Toast.LENGTH_LONG).show();
refreshForeground();
});
}, "carplay-export").start();
}
/** Refreshes state + call log while the screen is visible. */
private final android.os.Handler uiHandler = new android.os.Handler(android.os.Looper.getMainLooper());
private final Runnable uiRefresh = new Runnable() {
@@ -298,6 +335,7 @@ public class MainActivity extends AppCompatActivity {
logPane.findViewById(R.id.flush_now_button).setOnClickListener(v -> manualFlush());
foregroundText = logPane.findViewById(R.id.foreground_text);
logPane.findViewById(R.id.foreground_refresh_button).setOnClickListener(v -> refreshForeground());
logPane.findViewById(R.id.carplay_export_button).setOnClickListener(v -> startCarPlayExport());
setUpPager();
// Back on the page that was open when the activity was recreated (accent colour change).