• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
4<title>10.�README.android_emulator</title>
5<link rel="stylesheet" type="text/css" href="vg_basic.css">
6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7<link rel="home" href="index.html" title="Valgrind Documentation">
8<link rel="up" href="dist.html" title="Valgrind Distribution Documents">
9<link rel="prev" href="dist.readme-android.html" title="9.�README.android">
10<link rel="next" href="dist.readme-mips.html" title="11.�README.mips">
11</head>
12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13<div><table class="nav" width="100%" cellspacing="3" cellpadding="3" border="0" summary="Navigation header"><tr>
14<td width="22px" align="center" valign="middle"><a accesskey="p" href="dist.readme-android.html"><img src="images/prev.png" width="18" height="21" border="0" alt="Prev"></a></td>
15<td width="25px" align="center" valign="middle"><a accesskey="u" href="dist.html"><img src="images/up.png" width="21" height="18" border="0" alt="Up"></a></td>
16<td width="31px" align="center" valign="middle"><a accesskey="h" href="index.html"><img src="images/home.png" width="27" height="20" border="0" alt="Up"></a></td>
17<th align="center" valign="middle">Valgrind Distribution Documents</th>
18<td width="22px" align="center" valign="middle"><a accesskey="n" href="dist.readme-mips.html"><img src="images/next.png" width="18" height="21" border="0" alt="Next"></a></td>
19</tr></table></div>
20<div class="chapter">
21<div class="titlepage"><div><div><h1 class="title">
22<a name="dist.readme-android_emulator"></a>10.�README.android_emulator</h1></div></div></div>
23<div class="literallayout"><p><br>
24������<br>
25How�to�install�and�run�an�android�emulator.<br>
26<br>
27mkdir�android�#�or�any�other�place�you�prefer<br>
28cd�android<br>
29<br>
30#�download�java�JDK<br>
31#�http://www.oracle.com/technetwork/java/javase/downloads/index.html<br>
32#�download�android�SDK<br>
33#�http://developer.android.com/sdk/index.html<br>
34#�download�android�NDK<br>
35#�http://developer.android.com/sdk/ndk/index.html<br>
36<br>
37#�versions�I�used:<br>
38#��jdk-7u4-linux-i586.tar.gz<br>
39#��android-ndk-r8-linux-x86.tar.bz2<br>
40#��android-sdk_r18-linux.tgz<br>
41<br>
42#�install�jdk<br>
43tar�xzf�jdk-7u4-linux-i586.tar.gz<br>
44<br>
45#�install�sdk<br>
46tar�xzf�android-sdk_r18-linux.tgz<br>
47<br>
48#�install�ndk<br>
49tar�xjf�android-ndk-r8-linux-x86.tar.bz2<br>
50<br>
51<br>
52#�setup�PATH�to�use�the�installed�software:<br>
53export�SDKROOT=$HOME/android/android-sdk-linux<br>
54export�PATH=$PATH:$SDKROOT/tools:$SDKROOT/platform-tools<br>
55export�NDKROOT=$HOME/android/android-ndk-r8<br>
56<br>
57#�install�android�platforms�you�want�by�starting:<br>
58android�<br>
59#�(from�$SDKROOT/tools)<br>
60<br>
61#�select�the�platforms�you�need<br>
62#�I�selected�and�installed:<br>
63#���Android�4.0.3�(API�15)<br>
64#�Upgraded�then�to�the�newer�version�available:<br>
65#�����Android�sdk�20<br>
66#�����Android�platform�tools�12<br>
67<br>
68#�then�define�a�virtual�device:<br>
69Tools�-&gt;�Manage�AVDs...<br>
70#�I�define�an�AVD�Name�with�64�Mb�SD�Card,�(4.0.3,�api�15)<br>
71#�rest�is�default<br>
72<br>
73<br>
74#�compile�and�make�install�Valgrind,�following�README.android<br>
75<br>
76<br>
77#�Start�your�android�emulator�(it�takes�some�time).<br>
78#�You�can�use�adb�shell�to�get�a�shell�on�the�device<br>
79#�and�see�it�is�working.�Note�that�I�usually�get<br>
80#�one�or�two�time�out�from�adb�shell�before�it�works<br>
81adb�shell<br>
82<br>
83#�Once�the�emulator�is�ready,�push�your�Valgrind�to�the�emulator:<br>
84adb�push�Inst�/<br>
85<br>
86<br>
87#�IMPORTANT:�when�running�Valgrind,�you�may�need�give�it�the�flag<br>
88#<br>
89#����--kernel-variant=android-no-hw-tls<br>
90#<br>
91#�since�otherwise�it�may�crash�at�startup.<br>
92#�See�README.android�for�details.<br>
93<br>
94<br>
95#�if�you�need�to�debug:<br>
96#�You�have�on�the�android�side�a�gdbserver<br>
97#�on�the�device�side:<br>
98gdbserver�:1234�your_exe<br>
99<br>
100#�on�the�host�side:<br>
101adb�forward�tcp:1234�tcp:1234<br>
102$HOME/android/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gdb�your_exe<br>
103target�remote�:1234<br>
104<br>
105<br>
106����</p></div>
107</div>
108<div>
109<br><table class="nav" width="100%" cellspacing="3" cellpadding="2" border="0" summary="Navigation footer">
110<tr>
111<td rowspan="2" width="40%" align="left">
112<a accesskey="p" href="dist.readme-android.html">&lt;&lt;�9.�README.android</a>�</td>
113<td width="20%" align="center"><a accesskey="u" href="dist.html">Up</a></td>
114<td rowspan="2" width="40%" align="right">�<a accesskey="n" href="dist.readme-mips.html">11.�README.mips�&gt;&gt;</a>
115</td>
116</tr>
117<tr><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td></tr>
118</table>
119</div>
120</body>
121</html>
122