1, 是否是 64 bit apk,在对应的 full_sky828_8s70.mk 里面,这里主要包含64 bit apk的支持, 还有zygote的启动方式,64 bit apk fork的简要过程
Inherit from hardware-specific part of the product configuration.
$(call inherit-product, device/skyworth/sky828_8s70/device.mk)
Inherit from the common Open Source product configuration.
(callinherit−product, (SRC_TARGET_DIR)/product/core_64_bit.mk)
(callinherit−product, (SRC_TARGET_DIR)/product/aosp_base.mk)
$(call inherit-product-if-exists, vendor/google/products/gms.mk)
这个里面主要的内容是:
Copy the 64-bit primary, 32-bit secondary zygote startup script
PRODUCT_COPY_FILES += system/core/rootdir/init.zygote64_32.rc:root/init.zygote64_32.rc
Set the zygote property to select the 64-bit primary, 32-bit secondary script
This line must be parsed before the one in core_minimal.mk
PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.zygote=zygote64_32
TARGET_SUPPORTS_32_BIT_APPS := true
TARGET_SUPPORTS_64_BIT_APPS := true
这里主要是表明编译系统support 32 , 64 apk, 还有把zygote 名字ro.zygote设置为 zygote64_32,
在L之前启动zygote 是直接在 init.rc 里面通过
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
这个来启动的, 但L上由于可能有2个zygote, 所以把zygote的启动脚本抽象到一个单独的rc文件里面, 根据ro.zygote来区分。
这个单独的脚本是在init rc里面include的。 具体如下
import /init.environ.rc
import /init.usb.rc
import /init. ro.hardware.rcimport