AndroVM An alterna-ve to Android SDK
emulator
DROIDCON LONDON 25-26th October Daniel FAGES : à [email protected]
Android Open Source Project Presenta-on Architecture Building/Tes-ng Contribu-on AndroVM project Presenta-on Usage Architecture We need your help !
Agenda
Ini-a-ve from the Open Handset Alliance, leaded by Google, to create an open mobile pla6orm for telcos, OEMs and developers.
Open Source project….but strong dependency to Google
Ten major releases (1.0, 1.1, CupCake, Donut, Eclair, Froyo, Gingerbread, Honeycomb, ICS, JB) since September 2008
more than 450M devices and >1.3M ac-va-ons a day !
Android Open Source Project
Android Open Source Project
The last release of AOSP (Jelly Bean/4.1) supports : • Nexus S (GSM, CDMA/WiMAX) • Galaxy Nexus (GSM/HSDPA+, CDMA/LTE) • Nexus 7 • Motorola Xoom (WiFi only, CDMA/LTE) • PandaBoard (development board)
But, even for those, -‐> Some components are only available in binary form -‐> Some other are even not publicly available
Jelly Bean – Devices support
“ROM Cooking” on smartphones and tablets (ex : CyanogenMod project – more than 1M devices)
Use of Android on new pla[orms, different from smartphones and tablets
Applica-on debugging and op-miza-on Source code security analysis
AOSP – Source code interests
Sources • Informa\on Source : h]p://source.android.com • OS Pre-‐requisite : h]p://source.android.com/source/ini\alizing.html • Download : h]p://source.android.com/source/downloading.html
Building system : 4GB RAM minimum (16GB be]er), 25GB free storage minimum (90GB to build all ‘targets’) different from smartphones and tablets Setup / repo tool : $ mkdir ~/bin $ PATH=~/bin:$PATH $ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo $ chmod a+x ~/bin/repo
AOSP JB - Building
Source code download : $ mkdir android-4.1.2 $ repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.2 $ repo sync
Target selec\on and building: $ source build/envsetup.sh $ lunch (select target) $ make –jX (where X is the number of parallel compila\on processes)
-‐> A complete build can take from 20 minutes to 8 hours depending on the building system configura\on… (JBQ’s host : Dual Xeon E5620 Quad-‐core, 24GB RAM à30 minutes to build ICS for the Galaxy Nexus). Last step : ROM install on device, or execu\on using the emulator or a virtual machine.
AOSP JB - Building
bionic/ : « libc » replacement bootable/ : reference bootloader build/ : AOSP build scripts cts/ : « Compa\bility Test Suite » dalvik/ : Dalvik virtual machine development/ : Development tools device/ : Device specific files docs/ : source.android.com source files external/ : External projects used by AOSP frameworks/ : System services, android.* JAVA classes, … hardware/ : Hardware support libraries libcore/ : « Apache Harmony » project ndk/ : Na\ve Development Kit packages/ : Basic Android applica\ons and services prebuilt/ prebuits/: Precompiled binaries sdk/ : Sorware Development Kit system/ : System components
AOSP – Sources code Structure
CDD = Compa-bility Defini-on Document • Android devices specifica\ons (one CDD for each Android version), • A required condi\on (but not enough…) to get access to the Google Market/
Play is that the device respect the Android version CDD. • Pre-‐requisites can drama-cally change from one version to an other
AOSP – CDD & CTS
CTS = Compa-bility Test Suite • Tes\ng tools used to (partly) check the conformity of a device
(and its Android ROM) towards the target CDD.
h]p://source.android.com/compa\bility/cts-‐intro.html
h]p://source.android.com/source/submit-‐patches.html h]ps://android-‐review.googlesource.com
AOSP – Contribution
Everybody can contribute code to Android, but… • Every contribu\on is subject to Google’s valida-on
ü Code quality : Android « code style guidelines » ü Func\onal code ü Strategic/Poli\c ?
• Same func\on/piece of code may be developed at same \me by
Google… • Tool based on Gerrit • Service unavailable during >6 months in 2011…
Objec-ves : § Provide func\onal and robust Android Virtual images § Environment : un\l now mainly focused on VirtualBox, but
images are running well on VMWare (minus some func\ons)
Buildroid
AndroVM - Introduction
? Genesis Beginning with ICS, AOSP includes a « VirtualBox target » but many func\ons were missing. -‐> That’s how come the idea to work on VirtualBox support in AOSP…
Func-ons developed § Mouse § Ethernet § RTC (Real-‐Time Clock) § Power Management § Audio § File sharing with the host § USB
§ WiFi emula-on § OpenGL ES 2.0 Hardware § AndroVM configura-on tool
AndroVM - AOSP Porting to VirtualBox
Now, AndroVM and android-‐x86 images can run na-ve ARM code à Got a phone, Reverse-‐engineered the “houdini” libraries implemen\ng “ARM
transla\on”, Integrated them in AndroVM and it worked h]p://androvm.org/blog/ex-‐buildroid/2012/06/11/running-‐arm-‐apps/ h]p://androvm.org/blog/ex-‐buildroid/2012/06/18/using-‐arm-‐emula\on-‐on-‐other-‐android-‐x86-‐distribu\ons/
AndroVM – ARM support
> 200 000 VM downloads in 6 months
Useful for ? Developers replacing the SDK emulator People wan\ng to run Android applica\ons on their x86 systems People wan\ng to make a Demo OEM/Manufacturers wan\ng to provide development/demo pla6orm
Why ?
§ Performance § OpenGL issues § User-‐friendly
AndroVM – Why ?
DEMO
We’re currently working on : § An AndroVM management tool : create/modify VM, start/stop them,
automa\cally connect adb, ... § Sensors emula-on : either manual or using input data from USB-‐connected
Android device
What could be next : § Mul\-‐touch emula\on § Bluetooth emula\on § NFC emula\on
AndroVM – More to come
-‐> Android developers, please help us make your life easier J
From “pure technical interest” to usage… § Do you feel the need of an alterna\ve to the
Android SDK emulator ? § Are you able to use HAXM and Hardware
OpenGL or is it impossible to use in your environment ?
§ What func\ons would you need the most ? Bluetooth ? NFC ? WiFi-‐Direct ?...
§ Are you able to test your apps with variable network quality/reliability ? Do you feel the need for it ?
AndroVM – Need your Help !
AOSP building instruc-ons: h]p://source.android.com Android Google groups:
h]p://groups.google.com/group/android-‐building h]p://groups.google.com/group/android-‐por\ng h]p://groups.google.com/group/android-‐pla6orm h]p://groups.google.com/group/android-‐kernel
xda-‐developers forum :
h]p://forum.xda-‐developers.com/forumdisplay.php?f=564 Cyanogenmod forum : h]p://forum.cyanogenmod.com android-‐x86 project : h]p://www.android-‐x86.org AndroVM project : h]p://www.androvm.org/
AOSP – Links
Ques-ons ?
Top Related