Mobile/Fennec/Android: Difference between revisions

Jump to navigation Jump to search
Line 175: Line 175:


Debugging with gdbserver requires root access.  If you have not rooted your phone, search the web for instructions for your particular device.  Or see [[User:Blassey/Notes/Android#debugging_without_rooting|notes on debugging without root access]].
Debugging with gdbserver requires root access.  If you have not rooted your phone, search the web for instructions for your particular device.  Or see [[User:Blassey/Notes/Android#debugging_without_rooting|notes on debugging without root access]].
=== Using nVidia version (recommended) ===
Need to document here. See [[User:Blassey/Notes/Android]] for how to install.
=== Using the NDK version ===
NOTE: Fennec might crash when attaching using the gdb binaries included in the Google NDK. nVidia's gdb binaries are better.


If you do not already have gdbserver on your device (use <tt>adb shell gdbserver</tt> to check), you can push a pre-built version from the NDK.
If you do not already have gdbserver on your device (use <tt>adb shell gdbserver</tt> to check), you can push a pre-built version from the NDK.
Line 180: Line 188:
  adb push /PATH/TO/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/gdbserver /data/local
  adb push /PATH/TO/android-ndk-r4/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/gdbserver /data/local


Note: Fennec might crash when attaching using the gdb binaries included in the Google NDK. In that case use the nVidia gdb binaries [http://tegradeveloper.nvidia.com/tegra/downloads here]
Copy the necessary files from your device via adb pull. /system/bin/linker is referred to by absolute path so setting solib-absolute-prefix in gdb will be necessary for it to be found. Other files can be placed anywhere as long as they can be found in solib-search-path.
 
The images included with the SDK for emulation are [http://www.yaffs.net/ yaffs2] images and require some work to mount and extract files from. An alternative is to just copy the necessary files from your device via adb pull. /system/bin/linker is referred to by absolute path so setting solib-absolute-prefix in gdb will be necessary for it to be found. Other files can be placed anywhere as long as they can be found in solib-search-path.


In short, find a directory to put some libraries, make sure adb is in your path, and paste this into your terminal:
In short, find a directory to put some libraries, make sure adb is in your path, and paste this into your terminal:
Line 194: Line 200:
  adb pull /system/lib/$LIB .
  adb pull /system/lib/$LIB .
  done
  done
Alternately, unpack the system image of your device somewhere. (eg. signed-dream_devphone_userdebug-ota-14721.zip)


=== Attach GDB ===
=== Attach GDB ===
101

edits

Navigation menu