UP | HOME
../../

Android Framework: Zygote

Table of Contents

1 Zygote, The Mother of All Apps

  1. [Biology] zygote n. (i) The cell formed by the union of two gametes, especially a fertilized ovum before cleavage. (ii) The organism that develops from a zygote. – From a dictionary.
  2. All Android APK are started off by zygote; mother of all app processes.
  3. Process init starts zygote. It is a process with pre-loaded Dalivik/ART VM. Starts listening on a socket for requests to spawn off applications.
  4. ActivityManagerService writes commands to Zygote's socket.

2 init.zygote*.rc

  1. AOSP 2015+: there are two versions: 64- and 32-bit
  2. root@mako:/ # more init.zygote32.rc Mako is code name for Nexus 4.
service zygote /system/bin/app_process -Xzygote \
  /system/bin --zygote --start-system-server
    class main
    socket zygote stream 660 root system
    onrestart write /sys/android_power/request_state wake
    onrestart write /sys/power/state on
    onrestart restart media
    onrestart restart netd
  1. MAX 2:/ # cat init.zygote64_32.rc MAX-2 is a MediaTek device based on MT6750T named Uhans Max 2.
service zygote /system/bin/app_process64 -Xzygote \
  /system/bin --zygote --start-system-server --socket-name=zygote
    class main
    socket zygote stream 660 root system
    onrestart write /sys/android_power/request_state wake
    onrestart write /sys/power/state on
    onrestart restart audioserver
    onrestart restart cameraserver
    onrestart restart media
    onrestart restart netd
    writepid /dev/cpuset/foreground/tasks \
       /sys/fs/cgroup/stune/foreground/tasks

service zygote_secondary /system/bin/app_process32 -Xzygote \
  /system/bin --zygote --socket-name=zygote_secondary
    class main
    socket zygote_secondary stream 660 root system
    onrestart restart zygote
    writepid /dev/cpuset/foreground/tasks /dev/stune/foreground/tasks

3 App Launch

app-launch-summary.jpg

Figure 1: Android's Zygote [source: www]

4 Zygote Exploits

  1. ../../Exploits/Zygote ASLR and ROP Attack Mitigations for ARM-Based Android Devices.

5 References

  1. Karim Yaghmour, "Embedded Android", O'Reilly Media, Inc., 2013, 412 pp; WSU Safari Books Online 9781449327958; Android Framework PDF excerpts Chapter 7, Required Reading.
  2. Parikh, Vivek, and Prabhaker Mateti. "ASLR and ROP Attack Mitigations for ARM-Based Android Devices." In International Symposium on Security in Computing and Communication, pp. 350-363. Springer, Singapore, 2017.

6 End


Copyright © 2019 www.wright.edu/~pmateti • 2019-03-21