Documentation
¶
Overview ¶
Command recreateprobe live-verifies in-process Android activity recreation (#283): a configuration change the manifest does not declare makes the framework destroy and recreate the activity inside the surviving process, and the toolkit must come back painting instead of hanging the Java main thread in the redraw handshake (ANR).
It logs one machine-greppable line per lifecycle hook and two heartbeats:
recreateprobe alive=N — from a plain goroutine; proves the process runs recreateprobe tick=N — through bellui.Do; proves the driver loop drains
At a #283 hang, alive= keeps counting while tick= stops. After the fix both keep counting across the recreation and the lifecycle lines show the stage drop and re-entry.
The original #283 trigger — an Android 13+ per-app locale override — stopped recreating once the packaged manifest declared locale|layoutDirection (#287): it now arrives as an in-place onConfigurationChanged, so on a current build that command must produce NO lifecycle lines at all (the #288 half of the check; deviceinfoprobe shows the locale was still picked up). That includes ColorOS 16 (OPD2403) since #299: its ActivityRecordExtImpl.hookShouldRelaunchLocked adds CONFIG_SCREEN_LAYOUT to the change mask, so the manifest now declares screenLayout too — the hook's "state: true" logcat line still prints (it fires before the manifest check) but no relaunch follows. To force a recreation use a config change the manifest does not declare: a font-scale change recreates promptly and reliably; `wm density` proved unreliable on the goldfish AVD (2026-08-05: sometimes no relaunch at all, and a relaunch on a cold-booted emulator ANRed in host-side paging).
Repro on the pixel143 AVD (app id com.trendvidia.recreateprobe):
bellui package --target android/arm64 --app-id com.trendvidia.recreateprobe adb install recreateprobe.apk && adb shell am start com.trendvidia.recreateprobe/org.golang.app.GoNativeActivity adb shell settings put system font_scale 1.3 # recreation trigger (1.0 to restore) adb shell cmd locale set-app-locales com.trendvidia.recreateprobe --user 0 --locales pt-BR # in-place since #287/#288: no lifecycle lines adb logcat -s Bellui | grep recreateprobe
A second launch while the first is starting (#896) creates the new activity before the old one is torn down. After it the app must still take a tap:
adb shell am start -n com.trendvidia.recreateprobe/org.golang.app.GoNativeActivity sleep 0.25 adb shell am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER \ -f 0x10008000 -n com.trendvidia.recreateprobe/org.golang.app.GoNativeActivity sleep 3; adb shell input tap 300 600; sleep 7 adb logcat -d | grep "ANR in" # none; lifecycle ends at foreground, tick= keeps counting