Changes

Jump to: navigation, search

Mobile/Fennec/Android/AdvancedTopics

290 bytes added, 13:59, 16 November 2018
Updated the commands to launch Fennec via adb
If you need to set an environment variable at run time, append '''--es env# VAR=VAL''' to your activity manager command where # is the ordered number of variables for example:
adb shell am start -a android.activityintent.action.MAIN -c android.intent.category.LAUNCHER -n org.mozilla.fennec_$USER/org.mozilla.gecko.App --es env0 VAR=val --es env1 FOO=bar
If you need to pass arguments at run time, append '''--es args "<your-args>"''' to your activity manager command. For example, to launch with a specific profile:
adb shell am start -a android.activityintent.action.MAIN -c android.intent.category.LAUNCHER -n org.mozilla.fennec_$USER/org.mozilla.gecko.App --es args "--profile /mnt/sdcard/myprofile"
To launch with a specific URL, use the am -d option to set the intent's data URI:
adb shell am start -a android.activityintent.action.MAIN -c android.intent.category.LAUNCHER -n org.mozilla.fennec_$USER/org.mozilla.gecko.App -d 'http://www.mozilla.org'
=== C++ Logging ===
You can use the env vars as described above to enable MOZ_LOG logging from C++ code:
adb shell am start -a android.activityintent.action.MAIN -c android.intent.category.LAUNCHER -n org.mozilla.fennec_$USER/org.mozilla.gecko.App --es env0 MOZ_LOG=all:5 --es env1 MOZ_LOG_FILE=/mnt/sdcard/log.txt
If no file is specified, logging is directed to the android logs:
adb shell am start -a android.activityintent.action.MAIN -c android.intent.category.LAUNCHER -n org.mozilla.fennec_$USER/org.mozilla.gecko.App --es env0 MOZ_LOG=all:5
Look for lines marked "Gecko" with one of the requested log keys in the adb logcat output.
Confirm
384
edits

Navigation menu