Mobile/Fennec/Android: Difference between revisions

Jump to navigation Jump to search
→‎Partial Builds: Beware the startup cache!: Document how to delete the startup cache (from Bugzilla #976216)
(→‎Partial Builds: Beware the startup cache!: Document how to delete the startup cache (from Bugzilla #976216))
Line 367: Line 367:
This should result in the APK being properly updated with the updated Javascript, BUT the change may not be reflected on the device because of complications arising from the startup cache. If the startup cache from a previous run of Fennec exists on the device and contains an old version of the recently updated Javascript, Fennec will likely use the old version.
This should result in the APK being properly updated with the updated Javascript, BUT the change may not be reflected on the device because of complications arising from the startup cache. If the startup cache from a previous run of Fennec exists on the device and contains an old version of the recently updated Javascript, Fennec will likely use the old version.


The startup cache is located in the profile, so deleting the profile ensures a new startup cache:
The startup cache is located in the profile, so deleting it ensures a new startup cache (see {{Bugzilla|976216}} for details):


  adb uninstall org.mozilla.fennec_<your username>
  adb shell am force-stop org.mozilla.fennec
  adb install <obj-dir>/dist/fennec*.apk
  adb shell "rm -r /data/data/org.mozilla.fennec/files/mozilla/*.default/startupCache"


Note that:
Note that:
Line 384: Line 384:


works just fine, because the startup cache respects the buildid: If the buildid found in an APK is different from the buildid used when the startup cache was last updated, the startup cache is automatically deleted. A full build correctly updates the buildid -- a partial build may not.
works just fine, because the startup cache respects the buildid: If the buildid found in an APK is different from the buildid used when the startup cache was last updated, the startup cache is automatically deleted. A full build correctly updates the buildid -- a partial build may not.
A possible way (***I have not conclusively tested this***) to do a partial build, retain an old profile, and ensure the buildid is updated and the startup cache is subsequently deleted is:
./mach build ./export && ./mach build mobile/android && ./mach build toolkit/xre && ./mach package
adb install -r dist/fennec*.apk
Note that make export is necessary to update the buildid and make -C toolkit/xre is required to generate application.ini.h, trigger a rebuild of nsAndroidStartup.cpp, and update libxul.so.


=== Multilocale builds ===
=== Multilocale builds ===
1

edit

Navigation menu