Confirm Android 10 SDK 29 (Q) Behavior on Zygote Preloading
Categories
(GeckoView :: General, task)
Tracking
(Not tracked)
People
(Reporter: olivia, Unassigned)
References
(Blocks 1 open bug)
Details
Background:
When working on bug 1991512 to get the Zygote app preloading proof-of-concept in tree, I saw odd behavior on Android 10 emulated device. App Zygote preloading was introduced in Android Q (SDK 29), which corresponds to Android 10. However, I did not see preloading behavior occur.
I verified that the expected content processes and Zygote process launched. However, libxul and the other preloaded libraries did not show up on a cat /proc/<app zygote pid>/maps | grep libxul check. This did not happen in Android 11 nor 14. Earlier versions simply do not launch the right processes either. This behavior corresponds to a failure that would occur in IsolatedProcessTest#appZygoteProcessBehavior when ran on Android 10 as well.
I tend to think it might be an emulator issue or something of that nature because I also see android.permission.WRITE_EXTERNAL_STORAGE warnings in the logs. If I up that permission in the test runner manifest, it still happens, but I then get a different but similar issue.
Action item:
This bug is mostly is to confirm if app Zygote preloading works full as expected on Android 10 when we move from a proof-of-concept to concrete planning on shipping this feature.
The way I was checking was:
ps -Z -A | grep -i fenixcat /proc/<pid>/maps | grep libxul(Check a content process and preloader at least have some of the same memory blocks.)
Android 10 was simply missing libxul and not loading it. Tabs did not load as expected w/Zygote preloading enabled.
| Reporter | ||
Comment 1•4 months ago
|
||
0:22.01 adb INFO Granting important runtime permissions to org.mozilla.fenix.debug
0:26.24 adb WARNING Unable to grant runtime permission android.permission.WRITE_EXTERNAL_STORAGE to org.mozilla.fenix.debug due to args: /Users/olivia/.mozbuild/android-sdk-macosx/platform-tools/adb wait-for-device shell pm grant org.mozilla.fenix.debug android.permission.WRITE_EXTERNAL_STORAGE; echo adb_returncode=$?, exitcode: 255, stdout: Security exception: Package org.mozilla.fenix.debug has not requested permission android.permission.WRITE_EXTERNAL_STORAGE
Might also be relevant. I only see this on the Android 10 emulator I'm using.
Comment 2•4 months ago
|
||
(In reply to Olivia Hall [:olivia] from comment #1)
0:22.01 adb INFO Granting important runtime permissions to org.mozilla.fenix.debug 0:26.24 adb WARNING Unable to grant runtime permission android.permission.WRITE_EXTERNAL_STORAGE to org.mozilla.fenix.debug due to args: /Users/olivia/.mozbuild/android-sdk-macosx/platform-tools/adb wait-for-device shell pm grant org.mozilla.fenix.debug android.permission.WRITE_EXTERNAL_STORAGE; echo adb_returncode=$?, exitcode: 255, stdout: Security exception: Package org.mozilla.fenix.debug has not requested permission android.permission.WRITE_EXTERNAL_STORAGEMight also be relevant. I only see this on the Android 10 emulator I'm using.
In Android 10 or later, WRITE_EXTERNAL_STORAGE is unnecessary to access external storage (Target is Android 10, it had workaround for it). You can ignore this. Newer Android has to use Media Store APIs to access external storage.
Description
•