User:Blassey/Notes/Android: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 35: Line 35:
   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.
 


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>


First thing, to make this work with the nvidia gdb (which I found more reliable than the android r3 gdb) you need to modify install.sh and debug.sh.  
First thing, to make this work with the nvidia gdb (which I found more reliable than the android r3 gdb) you need to modify install.sh and debug.sh.  
Line 54: Line 52:
  adb shell chmod 755 /data/local/gdbserver
  adb shell chmod 755 /data/local/gdbserver
  for file in $(adb shell ls /system/lib | tr "\n" " " | tr "\r" " "); do
  for file in $(adb shell ls /system/lib | tr "\n" " " | tr "\r" " "); do
    adb pull /system/lib/$file lib
    adb pull /system/lib/$file lib
  done
  done
  adb pull /system/bin/app_process lib  
  adb pull /system/bin/app_process lib  
Line 63: Line 61:
  if [ $# -ne 2 ]
  if [ $# -ne 2 ]
  then
  then
    echo "usage: $0 /path/to/your/library.so packagename.of.your.activity"
    echo "usage: $0 /path/to/your/library.so packagename.of.your.activity"
    echo "for example:"
    echo "for example:"
    echo "  $0 /code/mydemo/libs/armeabi/libmydemo.so com.nvidia.devtech.mydemo"
    echo "  $0 /code/mydemo/libs/armeabi/libmydemo.so com.nvidia.devtech.mydemo"
    exit
    exit
  fi
  fi
   
   
  if [&nbsp;! -f $1 ]
  if [&nbsp;! -f $1 ]
  then
  then
    echo "ERROR: That library file doesn't exist"
    echo "ERROR: That library file doesn't exist"
    exit
    exit
  fi
  fi
   
   
Line 80: Line 78:
  if [ "$p" = "" ];
  if [ "$p" = "" ];
  then
  then
    echo "ERROR: That doesn't seem to be a running process. Please make sure your"
    echo "ERROR: That doesn't seem to be a running process. Please make sure your"
    echo "application has been started and that you are using the correct"
    echo "application has been started and that you are using the correct"
    echo "namespace argument."
    echo "namespace argument."
    exit
    exit
  fi
  fi
   
   
213

edits