User:Blassey/Notes/Android: Difference between revisions

no edit summary
No edit summary
Line 79: Line 79:
   adb shell am start -a android.activity.MAIN -n org.mozilla.fennec/org.mozilla.fennec.App --es env0 NSPR_LOG_MODULES=all:5
   adb shell am start -a android.activity.MAIN -n org.mozilla.fennec/org.mozilla.fennec.App --es env0 NSPR_LOG_MODULES=all:5


== debugging without rooting  ==
=== debugging without rooting  ===


with Froyo you can debug without rooting your phone. Instructions are below. See also [[Mobile/Fennec/Android/GDBNoRoot|Fennec/Android/GDBNoRoot]] for another guide on how to do this.<br>  
with Froyo you can debug without rooting your phone. Instructions are below. See also [[Mobile/Fennec/Android/GDBNoRoot|Fennec/Android/GDBNoRoot]] for another guide on how to do this.<br>  
Line 131: Line 131:
  adb shell run-as $2 /data/local/gdbserver --attach&nbsp;:12345 $p
  adb shell run-as $2 /data/local/gdbserver --attach&nbsp;:12345 $p


==killer script==
== Other useful tips and tricks ==
===killer script===
   #!/bin/sh
   #!/bin/sh
   if [ $# -ne 1 ]
   if [ $# -ne 1 ]
Line 152: Line 153:
   adb shell run-as $1 kill $p
   adb shell run-as $1 kill $p


==.gdbinit==
===.gdbinit===
this is an example .gdbinit that uses the symbols from a locally built rom and automatically attaches to gdbserver
this is an example .gdbinit that uses the symbols from a locally built rom and automatically attaches to gdbserver
   set solib-search-path /home/blassey/android/system/out/target/product/passion/symbols/system/bin:/home/blassey/android/system/out/target/product/passion/symbols/system/lib/:/home/blassey/src/ndk5-m-c/objdir-droid-dbg/dist/bin
   set solib-search-path /home/blassey/android/system/out/target/product/passion/symbols/system/bin:/home/blassey/android/system/out/target/product/passion/symbols/system/lib/:/home/blassey/src/ndk5-m-c/objdir-droid-dbg/dist/bin
   set solib-absolute-prefix /home/blassey/android/system/out/target/product/passion/symbols/system/lib/
   set solib-absolute-prefix /home/blassey/android/system/out/target/product/passion/symbols/system/lib/
   target remote localhost:12345
   target remote localhost:12345
Confirmed users
2,023

edits