In Unix, Linux, and similar Unix-based operating systems, init is the first program that gets started by the kernel during the booting process. Init is assigned the process ID 1 and is responsible for starting all the other processes. This kinda makes Init the parent of all the other processes running on the OS. Init relies on configuration files to handle various different operations and these are saved under locations like /etc/rc.local and etc/init.d. The ‘init.d’ directory contains scripts that the user could manually run through a Terminal.
For instance, to start a networking interface on a Linux system, you can simply execute the below command in the Terminal:
Android is based on Linux and it uses a custom init process during boot. Although the functionality of init.d in Android is very limited by default. Thanks to developers, we can now tweak the init.d to make it more powerful. With the tweak, init executes scripts inside the /system/etc/init.d directory in alphanumeric order by their filename, during boot.
Enable Init.d support on any Android device
Enabling Init.d support on an Android device is as straightforward as it gets. There are several ways to do this. You can –
- Install an app that enables init.d support.
- Flash a zip file to enable init.d support.
- Modify the Android system files directly to enable init.d support.
- Make a full backup of your device before proceeding.
- This process needs your device to be rooted to work.
All of the above methods are very easy and gives the same result. Although, we always recommend going with the first method as it is relatively easier and most users are very familiar with installing an app. There are tons of apps on Google Play Store that claim to enable init.d support on Android devices but we recommend using the below two apps:
You can simply download and install the above apps just like any other Android app. When you open any of these apps, you will be asked to grant root permissions; do the same.
Check if you have Init.d support on your ROM
- Open a root file manager of your choice.
- Navigate to ‘/system/etc‘ folder and look for a folder named init.d inside it.
- If the folder exists, then your ROM most probably supports init.d.
Advantages of having Init.d support on Android
With the init.d support on your Android device, you can –
- Create and execute scripts in background at specified intervals.
- Enable swap at boot.
- Modify kernel parameters at boot instead of having to do them via an app. This saves a lot of RAM.
- Mount partitions not defined in the device’s fstab at boot.
- Start and stop native Android processes as and when needed.
If you are a power user with a rooted Android device, init.d support is a great addition to your tweak, without a doubt. There are tons of init.d scripts from various developers for various devices; you would be surprised with what you would find with a quick search!