android_init

android init

boot sequence

early-init, init, early-boot, boot

early-init -> init -> early-boot -> boot

  1. property_get works, but may have random issues. (have not checked yet)
  2. getenv doesn’t work in init itself. Process forked in init also doesn’t work.

system/core/init/property_service.c
load_properties_from_file(PROP_PATH_SYSTEM_BUILD);
property_set()

It will read property file from /system/build.prop and set them.