-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.android_emulator
81 lines (58 loc) · 2.02 KB
/
README.android_emulator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
How to install and run an android emulator.
mkdir android # or any other place you prefer
cd android
# download java JDK
# http://www.oracle.com/technetwork/java/javase/downloads/index.html
# download android SDK
# http://developer.android.com/sdk/index.html
# download android NDK
# http://developer.android.com/sdk/ndk/index.html
# versions I used:
# jdk-7u4-linux-i586.tar.gz
# android-ndk-r8-linux-x86.tar.bz2
# android-sdk_r18-linux.tgz
# install jdk
tar xzf jdk-7u4-linux-i586.tar.gz
# install sdk
tar xzf android-sdk_r18-linux.tgz
# install ndk
tar xjf android-ndk-r8-linux-x86.tar.bz2
# setup PATH to use the installed software:
export SDKROOT=$HOME/android/android-sdk-linux
export PATH=$PATH:$SDKROOT/tools:$SDKROOT/platform-tools
export NDKROOT=$HOME/android/android-ndk-r8
# install android platforms you want by starting:
android
# (from $SDKROOT/tools)
# select the platforms you need
# I selected and installed:
# Android 4.0.3 (API 15)
# Upgraded then to the newer version available:
# Android sdk 20
# Android platform tools 12
# then define a virtual device:
Tools -> Manage AVDs...
# I define an AVD Name with 64 Mb SD Card, (4.0.3, api 15)
# rest is default
# compile and make install Valgrind, following README.android
# Start your android emulator (it takes some time).
# You can use adb shell to get a shell on the device
# and see it is working. Note that I usually get
# one or two time out from adb shell before it works
adb shell
# Once the emulator is ready, push your Valgrind to the emulator:
adb push Inst /
# IMPORTANT: when running Valgrind, you may need give it the flag
#
# --kernel-variant=android-no-hw-tls
#
# since otherwise it may crash at startup.
# See README.android for details.
# if you need to debug:
# You have on the android side a gdbserver
# on the device side:
gdbserver :1234 your_exe
# on the host side:
adb forward tcp:1234 tcp:1234
$HOME/android/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gdb your_exe
target remote :1234