User Tools

Site Tools



  • install […]
  • android update sdk –no-ui

on linux with emacs

setting up the hardware:

  • enable debugging on device
  • set permissions on usb device by creating /etc/udev/rules.d/51-android.rules (0bb4 is htc vendor):
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"

test it works with:

adb devices

creating a project (from ):

android create project \
  --package \
  --activity HelloAndroid \ 
  --target 2 \
  --path <path-to-your-project>/HelloAndroid 

Use “android list targets” to get the target number

Load a file into emacs, M-X android-ant-install, and the package should appear in your apps list

Sidestepping java with the NDK:

Building ndk sources by putting the ndk directory on your path and running


Compiler flags are in, debug options are set by the java project, add:


To the application properties in the manifest.

Writing to the sdcard from the ndk - you can just use fopen(“/sdcard/newfile.txt”) but you need to remember to add:

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

To the manefest.

Debugging on emulator - in order to find the symbols first run:

set solib-search-path /path/to/your/project/obj/local/armeabi 

Or, alternatively use addr2line to convert a crash address to the source location:

 adb logcat
 (... lots of stuff including stack trace ...)
 addr2line -e deadbeef
android_dev_notes.txt · Last modified: 2012/08/09 15:02 by