blob: 4808c484b531ea1b84d309461329bdad1cd5d62d [file] [log] [blame]
philippeeeb07332012-07-04 21:59:29 +00001
2How to install and run an android emulator.
3
4mkdir android # or any other place you prefer
5cd android
6
7# download java JDK
8# http://www.oracle.com/technetwork/java/javase/downloads/index.html
9# download android SDK
10# http://developer.android.com/sdk/index.html
11# download android NDK
12# http://developer.android.com/sdk/ndk/index.html
13
14# versions I used:
15# jdk-7u4-linux-i586.tar.gz
16# android-ndk-r8-linux-x86.tar.bz2
17# android-sdk_r18-linux.tgz
18
19# install jdk
20tar xzf jdk-7u4-linux-i586.tar.gz
21
22# install sdk
23tar xzf android-sdk_r18-linux.tgz
24
25# install ndk
26tar xjf android-ndk-r8-linux-x86.tar.bz2
27
28
29# setup PATH to use the installed software:
30export SDKROOT=$HOME/android/android-sdk-linux
31export PATH=$PATH:$SDKROOT/tools:$SDKROOT/platform-tools
32export NDKROOT=$HOME/android/android-ndk-r8
33
34# install android platforms you want by starting:
35android
36# (from $SDKROOT/tools)
37
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:
42# Android sdk 20
43# Android platform tools 12
44
45# Android 4.1 (API 16) does not work.
46
47# then define a virtual device:
48Tools -> Manage AVDs...
49# I define an AVD Name with 64 Mb SD Card, (4.0.3, api 15)
50# rest is default
51
52
53# compile and make install Valgrind, following README.android
54
55
56# Start your android emulator (it takes some time).
57# You can use adb shell to get a shell on the device
58# and see it is working. Note that I usually get
59# one or two time out from adb shell before it works
60adb shell
61
62# Once the emulator is ready, push your Valgrind to the emulator:
63adb push Inst /
64
65
66# if you need to debug:
67# You have on the android side a gdbserver
68# on the device side:
69gdbserver :1234 your_exe
70
71# on the host side:
72adb forward tcp:1234 tcp:1234
73$HOME/android/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gdb your_exe
74target remote :1234
75