2 How to install and run an android emulator.
4 mkdir android # or any other place you prefer
8 # http://www.oracle.com/technetwork/java/javase/downloads/index.html
10 # http://developer.android.com/sdk/index.html
11 # download android NDK
12 # http://developer.android.com/sdk/ndk/index.html
15 # jdk-7u4-linux-i586.tar.gz
16 # android-ndk-r8-linux-x86.tar.bz2
17 # android-sdk_r18-linux.tgz
20 tar xzf jdk-7u4-linux-i586.tar.gz
23 tar xzf android-sdk_r18-linux.tgz
26 tar xjf android-ndk-r8-linux-x86.tar.bz2
29 # setup PATH to use the installed software:
30 export SDKROOT=$HOME/android/android-sdk-linux
31 export PATH=$PATH:$SDKROOT/tools:$SDKROOT/platform-tools
32 export NDKROOT=$HOME/android/android-ndk-r8
34 # install android platforms you want by starting:
36 # (from $SDKROOT/tools)
38 # select the platforms you need
39 # I selected and installed:
40 # Android 4.0.3 (API 15)
41 # Upgraded then to the newer version available:
43 # Android platform tools 12
45 # then define a virtual device:
46 Tools -> Manage AVDs...
47 # I define an AVD Name with 64 Mb SD Card, (4.0.3, api 15)
51 # compile and make install Valgrind, following README.android
54 # Start your android emulator (it takes some time).
55 # You can use adb shell to get a shell on the device
56 # and see it is working. Note that I usually get
57 # one or two time out from adb shell before it works
60 # Once the emulator is ready, push your Valgrind to the emulator:
64 # IMPORTANT: when running Valgrind, you may need give it the flag
66 # --kernel-variant=android-emulator-no-hw-tls
68 # since otherwise it may crash at startup.
69 # See README.android for details.
72 # if you need to debug:
73 # You have on the android side a gdbserver
75 gdbserver :1234 your_exe
78 adb forward tcp:1234 tcp:1234
79 $HOME/android/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gdb your_exe