Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Robotito Verde Chactado aka Mod Your Device

Robotito Verde Chactado aka Mod Your Device

Talk: https://www.youtube.com/watch?v=XDC-1ve6WH8

Many Android devices have customized systems that are different in many aspects from the official one and moreover they are shipped with some closed components. This problem become blocking if you want to build an ad-hoc system for your device.

So we will discover step by step how to manipulate build files, settings values and boot files, in order to control your device and your applications thanks also to the installation of new utilities and the deep use of the adb command.

When all your customizations are ready, you will be able to cook your ROM!

Stefano Cotta Ramusino

February 06, 2014
Tweet

More Decks by Stefano Cotta Ramusino

Other Decks in Programming

Transcript

  1. 2014/02/06 2014/02/06 Page Page 2 2 Stefano Cotta Ramusino <

    Stefano Cotta Ramusino <[email protected] [email protected]> DroidCon IT 2014 > DroidCon IT 2014 What is Android? What is Android? A mobile-centric Linux distro patched Linux kernel Bionic Libc Dalvik Java VM App Framework
  2. 2014/02/06 2014/02/06 Page Page 3 3 Stefano Cotta Ramusino <

    Stefano Cotta Ramusino <[email protected] [email protected]> DroidCon IT 2014 > DroidCon IT 2014 Android Architecture Android Architecture
  3. 2014/02/06 2014/02/06 Page Page 4 4 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Android Version Usage Android Version Usage
  4. 2014/02/06 2014/02/06 Page Page 5 5 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Android kernel patches Android kernel patches low memory killer Viking Killer wake lock /sys/power/wake_lock early suspend /sys/power/request_state timed gpio userspace driver
  5. 2014/02/06 2014/02/06 Page Page 6 6 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Android kernel patches Android kernel patches ashmem cache pmem contiguous malloc binder IPC ram console /proc/last_kmsg android debug bridge
  6. 2014/02/06 2014/02/06 Page Page 7 7 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Android kernel patches Android kernel patches … more on: linux-kernel-source / drivers / staging / android
  7. 2014/02/06 2014/02/06 Page Page 8 8 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Bionic Libc Bionic Libc embedded optimized no fully POSIX not compatible with GNU Libc native programs must linked to this library
  8. 2014/02/06 2014/02/06 Page Page 9 9 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Dalvik Java VM Dalvik Java VM register-based architecture Java bytecode (.class) Dalvik Executable (.dex) low memory requirements
  9. 2014/02/06 2014/02/06 Page Page 10 10 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Android Applications Android Applications Android Packages (APK) installation via: • Google Play Store • storage (usb hd, sd, ...) • adb
  10. 2014/02/06 2014/02/06 Page Page 11 11 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 File System File System /system root of a typical linux tree /data apps data /cache apps cache /mnt storage
  11. 2014/02/06 2014/02/06 Page Page 12 12 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 File System File System in /system: bin, etc, lib, usr framework application framework app system apps media bootanimation.zip
  12. 2014/02/06 2014/02/06 Page Page 13 13 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 File System File System … also in /system: build.prop fonts roboto (android > 4.0) xbin optional utilities vendor vendor addons
  13. 2014/02/06 2014/02/06 Page Page 14 14 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 File System File System in /data: app user apps data user data com.android.providers.settings dalvik-cache dex files
  14. 2014/02/06 2014/02/06 Page Page 15 15 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Android Debug Bridge Android Debug Bridge adb install android-tools or android-tools-adb Android SDK available also for Mac and Win
  15. 2014/02/06 2014/02/06 Page Page 16 16 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Android Debug Bridge Android Debug Bridge adb shell limited standard cmds getprop, setprop netcfg input am busybox
  16. 2014/02/06 2014/02/06 Page Page 17 17 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Settings Database Settings Database android_metadata language system volume secure lock SQLite 3
  17. 2014/02/06 2014/02/06 Page Page 18 18 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Simple Boot Animation Simple Boot Animation
  18. 2014/02/06 2014/02/06 Page Page 19 19 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Simple Boot Animation Simple Boot Animation
  19. 2014/02/06 2014/02/06 Page Page 20 20 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Android Toolchain Android Toolchain Android NDK $ arm-linux-androideabi- <TAB>
  20. 2014/02/06 2014/02/06 Page Page 21 21 Stefano Cotta Ramusino <[email protected]>

    DroidCon IT 2014 Stefano Cotta Ramusino <[email protected]> DroidCon IT 2014 Useful Links Useful Links Official Android Dev developer.android.com XDA Developers www.xda-developers.com Android NDK developer.android.com/sdk/ndk/index.html