Articles

What is init rc file in Android?

What is init rc file in Android?

The init file is a key component of the Android boot sequence. It is a program to initialize the elements of the Android system. These programs are: ‘init. rc’ and ‘init. rc’ (this machine name is the name of the hardware that Android is running on).

What is .rc file?

A resource file is a text file with the extension . rc. The file can use single-byte, double-byte, or Unicode characters. The syntax and semantics for the RC preprocessor are similar to those of the Microsoft C/C++ compiler.

What is post FS data?

post-fs-data. /data decrypted (if necessary) and mounted. early-boot. Run after property service has been initialized, but before booting rest.

What is booting process in Android?

The Android Booting process

  1. Step 1: Power On and System Startup. When we press the power button, the Boot ROM code starts executing from a pre-defined location which is hardwired in ROM.
  2. Step 2: Bootloader.
  3. Step 3: Kernel.
  4. Step 4: init process.
  5. Step 5: Zygote and Dalvik.
  6. Step 6: System service.

Where do I find the init.rc file?

All services whose binaries reside on the system, vendor, or odm partitions should have their service entries placed into a corresponding init .rc file, located in the /etc/init/ directory of the partition where they reside. There is a build system macro, LOCAL_INIT_RC, that handles this for developers.

What is rootdir.init.rc in Android?

It’s probably instructive to look at some example rcfiles: this foldercontains some rcfiles for Android that are copied to the root of the Android device, and hence the folder name rootdir. init.rc The primary file is init.rc. It isn’t particularly long, at 700+ lines, and it’s possible to trace through it to figure out what exactly it’s doing.

Where do I find the init file in Android?

The init.${ro.hardware}.rcfile is a vendor specific file, for example marlin (the Google Pixel XL), has its rcfile here. There are also other rcfiles located in system/core, for example lmkd, the low memory killer, has a rcfile here, which describes how to start lmkd, what class it is, what user group it should be started as, etc.

Where does init load logcatd.rc in Android?

The LOCAL_INIT_RC macro in the Android.mk file places logcatd.rc in /system/etc/init/ during the build process. Init loads logcatd.rc during the mount_all command and allows the service to be run and the action to be queued when appropriate.