Your SlideShare is downloading. ×
Droidcon uk2012 androvm
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Droidcon uk2012 androvm

1,493

Published on

The slides I used at the DroiconUK 2012 to present AndroVM - http://androvm.org

The slides I used at the DroiconUK 2012 to present AndroVM - http://androvm.org

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,493
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
10
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. AndroVM  DROIDCON LONDON An  alterna-ve  25-26th October to  Android  SDK  Daniel FAGES : emulator  à  dan@androvm.org
  • 2. AgendaAndroid  Open  Source  Project              Presenta-on            Architecture            Building/Tes-ng            Contribu-on    AndroVM  project              Presenta-on            Usage            Architecture            We  need  your  help  !  
  • 3. Android Open Source ProjectIni-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  !    
  • 4. Android Open Source Project
  • 5. Jelly Bean – Devices supportThe  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    
  • 6. AOSP – Source code interests“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    
  • 7. AOSP JB - BuildingSources   •  Informaon  Source  :  h]p://source.android.com   •  OS  Pre-­‐requisite  :  h]p://source.android.com/source/inializing.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
  • 8. AOSP JB - BuildingSource  code  download  :  $ mkdir android-4.1.2$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.1.2$ repo syncTarget  selecon  and  building:  $ source build/envsetup.sh$ lunch (select  target)  $ make –jX (where  X  is  the  number  of  parallel  compilaon  processes)-­‐>  A  complete  build  can  take  from  20  minutes  to  8  hours  depending  on  the  building  system  configuraon…  (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  execuon  using  the  emulator  or  a  virtual  machine.  
  • 9. AOSP – Sources code Structurebionic/  :  «  libc  »  replacement  bootable/  :  reference  bootloader  build/  :  AOSP  build  scripts  cts/  :  «  Compability  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/  :  Nave  Development  Kit  packages/  :  Basic  Android  applicaons  and  services    prebuilt/  prebuits/:  Precompiled  binaries  sdk/  :  Sorware  Development  Kit  system/  :  System  components  
  • 10. AOSP – CDD & CTSCDD  =  Compa-bility  Defini-on  Document  •  Android  devices  specificaons  (one  CDD  for  each  Android  version),  •  A   required   condion   (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         CTS  =  Compa-bility  Test  Suite     •  Tesng   tools   used   to   (partly)   check   the   conformity   of   a   device     (and  its  Android  ROM)  towards  the  target  CDD.   h]p://source.android.com/compability/cts-­‐intro.html  
  • 11. AOSP – ContributionEverybody  can  contribute  code  to  Android,  but…    •  Every  contribuon  is  subject  to  Google’s  valida-on     ü  Code  quality  :  Android  «  code  style  guidelines  »     ü  Funconal  code   ü  Strategic/Polic  ?    •  Same  funcon/piece  of  code  may  be  developed  at  same  me  by   Google…  •  Tool  based  on  Gerrit  •  Service  unavailable  during  >6  months  in  2011…   h]p://source.android.com/source/submit-­‐patches.html   h]ps://android-­‐review.googlesource.com  
  • 12. AndroVM - Introduction Buildroid  Objec-ves  :    §  Provide  funconal  and  robust  Android  Virtual  images    §  Environment  :  unl  now  mainly  focused  on  VirtualBox,  but   images  are  running  well  on  VMWare  (minus  some  funcons)    
  • 13. AndroVM - AOSP Porting to VirtualBox?   Genesis     Beginning  with  ICS,  AOSP  includes  a  «  VirtualBox  target  »  but  many  funcons  were   missing.   -­‐>  That’s  how  come  the  idea  to  work  on  VirtualBox  support  in  AOSP…       Func-ons  developed   §  Mouse     §  WiFi  emula-on     §  Ethernet     §  OpenGL  ES  2.0  Hardware     §  AndroVM  configura-on  tool   §  RTC  (Real-­‐Time  Clock)     §  Power  Management     §  Audio     §  File  sharing  with  the  host     §  USB  
  • 14. AndroVM – ARM supportNow,  AndroVM  and  android-­‐x86  images  can  run  na-ve  ARM  code    à  Got  a  phone,  Reverse-­‐engineered  the  “houdini”  libraries  implemenng  “ARM   translaon”,  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-­‐emulaon-­‐on-­‐other-­‐android-­‐x86-­‐distribuons/  
  • 15. AndroVM – Why ?>  200  000  VM  downloads  in  6  months    Useful  for  ?  Developers  replacing  the  SDK  emulator    People  wanng  to  run  Android  applicaons  on  their  x86  systems  People  wanng  to  make  a  Demo  OEM/Manufacturers  wanng  to  provide  development/demo  pla6orm    Why  ?   §  Performance     §  OpenGL  issues     §  User-­‐friendly  
  • 16. DEMO
  • 17. AndroVM – More to comeWe’re  currently  working  on  :  §  An  AndroVM  management  tool  :  create/modify  VM,  start/stop  them,   automacally  connect  adb,  ...  §  Sensors  emula-on  :  either  manual  or  using  input  data  from  USB-­‐connected   Android  device    What  could  be  next  :  §  Mul-­‐touch  emulaon  §  Bluetooth  emulaon  §  NFC  emulaon          
  • 18. AndroVM – Need your Help ! From  “pure  technical  interest”   -­‐>  Android   to  usage…   developers,   §  Do  you  feel  the  need  of  an  alternave  to  the   Android  SDK  emulator  ?   please  help   §  Are  you  able  to  use  HAXM  and  Hardware   OpenGL  or  is  it  impossible  to  use  in  your  us  make  your   environment  ?  life  easier  J   §  What  funcons  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  ?      à  dan@androvm.org  
  • 19. AOSP – LinksAOSP  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-­‐porng    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/    
  • 20.  Ques-ons  ?        
  • 21.     MERCI  !       Daniel  Fages   dan@androvm.org   dfages@genymobile.com  

×