Quantcast
Channel: xda-developers - Galaxy S Plus I9001 Android Development
Viewing all articles
Browse latest Browse all 315

[GUIDE] How To Add Init.d Support to Your Kernel & Rom

$
0
0
What is init.d ?

Init.d is a feature which allows you to run brunch of scripts at boot . Thats really useful while you want to set values which reset at boot or run/do any thing at every boot or install tweaks , engines and....

There are some ways to add this feature to you rom but always best way is to add init.d support directly by your kernel . I want to help you to do this :)

Requirements

1- Ability to unpack boot.img & ramdisk
2- Some basic linux shell knowloedge
3- Having Busybox located in /system/bin/busybox at your rom

Step 1: Making kernel ready

1- Unpack kernel then ramdisk
2- Open Init.rc with a text editor
3- Add this codes at the end , before the paragraph which there is "stop bootanim" command in it :

Code:

service sysinit /system/bin/sysinit
oneshot

4- Save , Exit and repack ramdisk and boot.img

Step 2 : Making Rom Ready !

1- Open /system/bin/sysinit
2- Add this codes :

Code:

#!/system/bin/sh
export PATH=${PATH}:/system/bin:/system/xbin
chmod 777 /system/etc/init.d/*
logwrapper busybox run-parts /system/etc/init.d/

3- Set permissions of sysinit to 777 or 755 ( rwxrwxr-x | rwxrwxrwx )
4- Make a directory at system/etc and name it init.d

Now you have init.d support !

Viewing all articles
Browse latest Browse all 315

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>