import /system/etc/init/hw/init.${ro.zygote}.rc on early-fs export LD_PRELOAD : mkdir /mnt/runtime/full 0755 root root mkdir /mnt/runtime/full/self 0755 root root mkdir /apex 0777 root root mount tmpfs tmpfs /apex mode=0755,uid=0,gid=0 restorecon /apex export ANDROID_RUNTIME_ROOT /apex/com.android.runtime export ANDROID_TZDATA_ROOT /apex/com.android.tzdata symlink /system/product /product symlink /system/system_ext /system_ext mount none /system/phh/empty /sbin/adbd bind mkdir /apex/com.android.mediaprovider 0777 root root mkdir /apex/com.android.apex.cts.shim.v1_with_prebuilts 0777 root root mkdir /apex/com.android.vndk.current 0777 root root mkdir /apex/com.android.vndk.v28 0777 root root mkdir /apex/com.android.sdkext 0777 root root mkdir /apex/com.android.i18n 0777 root root mkdir /apex/com.android.art 0777 root root mkdir /apex/com.android.media.swcodec 0777 root root mkdir /apex/com.android.media 0777 root root mkdir /apex/com.android.os.statsd 0777 root root mkdir /apex/com.android.extservices 0777 root root mkdir /apex/com.android.runtime 0777 root root mkdir /apex/com.android.neuralnetworks 0777 root root mkdir /apex/com.android.cellbroadcast 0777 root root mkdir /apex/com.android.vndk.v27 0777 root root mkdir /apex/com.android.vndk.v26 0777 root root mkdir /apex/com.android.adbd 0777 root root mkdir /apex/com.android.tzdata 0777 root root mkdir /apex/com.android.permission 0777 root root mkdir /apex/com.android.tethering 0777 root root mkdir /apex/com.android.resolv 0777 root root mkdir /apex/com.android.ipsec 0777 root root mkdir /apex/com.android.vndk.v29 0777 root root mkdir /apex/com.android.conscrypt 0777 root root mkdir /apex/com.android.wifi 0777 system system mount none /system_ext/apex/com.android.mediaprovider /apex/com.android.mediaprovider bind mount none /system_ext/apex/com.android.apex.cts.shim.v1_with_prebuilts /apex/com.android.apex.cts.shim.v1_with_prebuilts bind mount none /system_ext/apex/com.android.vndk.current /apex/com.android.vndk.current bind mount none /system_ext/apex/com.android.vndk.v28 /apex/com.android.vndk.v28 bind mount none /system_ext/apex/com.android.sdkext /apex/com.android.sdkext bind mount none /system_ext/apex/com.android.i18n /apex/com.android.i18n bind mount none /system_ext/apex/com.android.art.debug /apex/com.android.art bind mount none /system_ext/apex/com.android.art.release /apex/com.android.art bind mount none /system_ext/apex/com.android.media.swcodec /apex/com.android.media.swcodec bind mount none /system_ext/apex/com.android.media /apex/com.android.media bind mount none /system_ext/apex/com.android.os.statsd /apex/com.android.os.statsd bind mount none /system_ext/apex/com.android.extservices /apex/com.android.extservices bind mount none /system_ext/apex/com.android.runtime /apex/com.android.runtime bind mount none /system_ext/apex/com.android.neuralnetworks /apex/com.android.neuralnetworks bind mount none /system_ext/apex/com.android.cellbroadcast /apex/com.android.cellbroadcast bind mount none /system_ext/apex/com.android.vndk.v27 /apex/com.android.vndk.v27 bind mount none /system_ext/apex/com.android.vndk.v26 /apex/com.android.vndk.v26 bind mount none /system_ext/apex/com.android.adbd /apex/com.android.adbd bind mount none /system_ext/apex/com.android.tzdata /apex/com.android.tzdata bind mount none /system_ext/apex/com.android.permission /apex/com.android.permission bind mount none /system_ext/apex/com.android.tethering /apex/com.android.tethering bind mount none /system_ext/apex/com.android.resolv /apex/com.android.resolv bind mount none /system_ext/apex/com.android.ipsec /apex/com.android.ipsec bind mount none /system_ext/apex/com.android.vndk.v29 /apex/com.android.vndk.v29 bind mount none /system_ext/apex/com.android.conscrypt /apex/com.android.conscrypt bind mount none /system_ext/apex/com.android.wifi /apex/com.android.wifi bind mkdir /apex/com.android.art.debug 0777 root root mount none /apex/com.android.art /apex/com.android.art.debug bind mkdir /apex/com.android.art.release 0777 root root mount none /apex/com.android.art /apex/com.android.art.release bind exec -- /system/bin/apexd --bootstrap mkdir /linkerconfig 0777 root root mount tmpfs tmpfs /linkerconfig mode=0755,uid=0,gid=0 restorecon /linkerconfig #vndk-detect is a shell script so requires a working linker config. But linkerconfig will default to vndk v27 #So we need to 1. setup some linkerconfig (being v27 is ok on v26 just to run a shellscript), 2. autodetect vndk; 3. regenerate linkerconfig exec -- /system/bin/linkerconfig --target /linkerconfig exec - root -- /system/bin/vndk-detect exec u:r:phhsu_daemon:s0 root -- /system/bin/resetprop_phh ro.vndk.version ${persist.sys.vndk} setprop ro.vndk.version ${persist.sys.vndk} exec -- /system/bin/linkerconfig --target /linkerconfig setprop ro.product.manufacturer phh setprop ro.product.model phh setprop persist.sys.usb.config adb mkdir /data/system_de 0770 system system mkdir /data/system_ce 0770 system system mkdir /data/misc_de 01771 system misc mkdir /data/misc_ce 01771 system misc mkdir /data/user 0711 system system mkdir /data/user_de 0711 system system mkdir /data/vendor 0711 system system mkdir /data/vendor_de 0711 system system rm /data/user/0 mkdir /data/user/0 0700 system system mount none /data/data /data/user/0 bind rec mkdir /data/misc/installd 0700 root root mkdir /data/misc/credstore 0777 system system mkdir /data/rollback 0700 system system setprop sys.usb.config adb setprop ro.build.fingerprint unknown/unknown/unknown:11/RP1A.200720.011/phh:userdebug/test-keys # Create mirror directory for jit profiles mkdir /data_mirror/cur_profiles 0700 root root mount none /data/misc/profiles/cur /data_mirror/cur_profiles bind rec mkdir /data_mirror 0777 root root start adbd_apex on post-fs-data mkdir /data/system_de 0770 system system mkdir /data/system_ce 0770 system system mkdir /data/misc_de 01771 system misc mkdir /data/misc_ce 01771 system misc mkdir /data/user 0711 system system mkdir /data/user_de 0711 system system mkdir /data/vendor 0711 system system mkdir /data/vendor_de 0711 system system rm /data/user/0 mkdir /data/user/0 0700 system system mount none /data/data /data/user/0 bind rec mkdir /data/misc/installd 0700 root root mkdir /data/misc/credstore 0777 system system mkdir /data/misc/apexdata 0711 root root mkdir /data/misc/apexdata/com.android.wifi 0771 system system chown system system /data/misc/apexdata/com.android.wifi mkdir /data/rollback 0700 system system init_user0 service adbd_apex /apex/com.android.adbd/bin/adbd --root_seclabel=u:r:su:s0 class core socket adbd stream 660 system system disabled override seclabel u:r:adbd:s0 on post-fs-data mkdir /data/misc/installd 0700 root root mkdir /data/misc/credstore 0777 system system mount tmpfs tmpfs /data_mirror nodev noexec nosuid mode=0700,uid=0,gid=1000 restorecon /data_mirror mkdir /data_mirror/data_ce 0700 root root mkdir /data_mirror/data_de 0700 root root # Create CE and DE data directory for default volume mkdir /data_mirror/data_ce/null 0700 root root mkdir /data_mirror/data_de/null 0700 root root # Bind mount CE and DE data directory to mirror's default volume directory mount none /data/user /data_mirror/data_ce/null bind rec mount none /data/user_de /data_mirror/data_de/null bind rec on fs exec u:r:su:s0 -- /system/bin/umount -l /product exec u:r:su:s0 -- /system/bin/rmdir /product symlink /system/product /product on property:sys.usb.state=adb restart adbd_apex on property:sys.usb.state=mtp,adb restart adbd_apex