FORUMS

What Do You Think About Fingerprint Scanners?

More and more phones are featuring fingerprint scanners, and with many promising … more

What’s Next for Samsung and Its Flagships?

If we were to say that the Galaxy S6 was a leap of faith made by Samsung, we … more

The Ultimate Showcase of dBrand Skins

In the search for ways to protect, accessorize, and personalize; a user has many options. One … more

Huawei’s Rapid Rise to Third Place in the Smartphone Race

Huawei has quickly grown to become one of the world’s biggest … more

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

772 posts
Thanks Meter: 2,291
 
Post Reply Subscribe to Thread Email Thread
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 !
The Following 47 Users Say Thank You to alireza7991 For This Useful Post: [ View ]
 
 
20th May 2013, 03:55 PM |#2  
Senior Member
Flag Nashville
Thanks Meter: 77
 
More
Bull*hit. JUST INSTALL pimpmyrom and finish ..Easy.
20th May 2013, 03:56 PM |#3  
broodplank1337's Avatar
Recognized Contributor / Recognized Developer
Flag Nijmegen
Thanks Meter: 10,153
 
Donate to Me
More
Someone had to document this ^^, good job
The Following 2 Users Say Thank You to broodplank1337 For This Useful Post: [ View ]
20th May 2013, 04:18 PM |#4  
alireza7991's Avatar
OP Senior Member
Flag Shahrekord
Thanks Meter: 2,291
 
Donate to Me
More
Quote:
Originally Posted by RobyRc

Bull*hit. JUST INSTALL pimpmyrom and finish ..Easy.

Pimp uses one of the worst method to add this feature to your ROM ! it doesn't effect on kernel so : 1- running init.d is slower 2- init.d is not stable at all 3- not usable for ones want to add this feature to his/her kernel 4- not run init.d at end of boot so some script which needs some binaries that are not loaded yet doesn't work 5- Can not be used for room devs

This method is the official method which is used on most famous kernels such as brood kernel . and best for devs and users

any way that depends on users idea that this is good or not
The Following 8 Users Say Thank You to alireza7991 For This Useful Post: [ View ]
20th May 2013, 04:25 PM |#5  
Stefano187's Avatar
Senior Member
Flag Frosinone
Thanks Meter: 242
 
Donate to Me
More
Quote:
Originally Posted by RobyRc

Bull*hit. JUST INSTALL pimpmyrom and finish ..Easy.

Why are you so rude?
There are ways and ways to express own opinions... And alireza has just explained you why this method is better then PIMPMYROM.

Sent from my AriesVe using xda premium
The Following 5 Users Say Thank You to Stefano187 For This Useful Post: [ View ]
21st May 2013, 08:42 PM |#6  
Senior Member
Flag Nashville
Thanks Meter: 77
 
More
Quote:
Originally Posted by alireza7991

Pimp uses one of the worst method to add this feature to your ROM ! it doesn't effect on kernel so : 1- running init.d is slower 2- init.d is not stable at all 3- not usable for ones want to add this feature to his/her kernel 4- not run init.d at end of boot so some script which needs some binaries that are not loaded yet doesn't work 5- Can not be used for room devs

This method is the official method which is used on most famous kernels such as brood kernel . and best for devs and users

any way that depends on users idea that this is good or not

You are wrong.
21st May 2013, 09:26 PM |#7  
Senior Member
Flag Pescara
Thanks Meter: 1,222
 
More
Quote:
Originally Posted by RobyRc

You are wrong.

well, if he is wrong you can explain why, he explained why according to him is better this way, you could explain why not
The Following User Says Thank You to ktulu84 For This Useful Post: [ View ]
25th May 2013, 04:40 PM |#8  
Senior Member
Thanks Meter: 17
 
More
What happens if your ROM doesn't have /system/bin/sysinit?
25th May 2013, 06:33 PM |#9  
alireza7991's Avatar
OP Senior Member
Flag Shahrekord
Thanks Meter: 2,291
 
Donate to Me
More
Quote:
Originally Posted by vMAC

What happens if your ROM doesn't have /system/bin/sysinit?

* Your rom has sysinit -> You have already init.d support and no need to this guide

* Your rom has'nt it -> You need to do my guide to get init.d support
The Following 3 Users Say Thank You to alireza7991 For This Useful Post: [ View ]
20th June 2013, 07:58 PM |#10  
GT-af's Avatar
Senior Member
Flag Paris
Thanks Meter: 68
 
More
Quote:
Originally Posted by alireza7991

* Your rom has sysinit -> You have already init.d support and no need to this guide

* Your rom has'nt it -> You need to do my guide to get init.d support

And is it possible to create sysinit and init.d folder with an updater script?
21st June 2013, 05:40 AM |#11  
alireza7991's Avatar
OP Senior Member
Flag Shahrekord
Thanks Meter: 2,291
 
Donate to Me
More
Quote:
Originally Posted by GT-af

And is it possible to create sysinit and init.d folder with an updater script?

sure but do'nt forget :

1- your kernel must support init.d ( look at first post step 1)
2- do step 2 at fist post on sys init or you wo'nt have init.d support !
The Following User Says Thank You to alireza7991 For This Useful Post: [ View ]

Read More
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes