Saturday, May 28, 2016

INIT.D SUPPORT Kernel method *adds INIT.D folder*

HI guys

I just discovered a way to make init.d work on my rom and it should work on other roms as long as everything is followed down to the T

Basically there are 5 things you need to do

1: BootImageExtractor *links to follow* need to get it from my other laptop
2: Notepad++ *ask google*
3: Rashr *or any other apps that can flash kernels I just use this one*
4: Rooted Device
5: Rootexplorer *or any apps that let you dig deep into the root of THE android*

Ok lets start

First up is to unpack your boot.img and you should see your RAMDISK folder
now go ahead and look for init.rc and open it with notepad++ now add this code either at the very top or below the import scripts.

Code:

import /init.d.sh
You can use any name really as long as you have the same import script and name of the sh file

Now on to the next step which is to create a .sh file
Open up notepad++ and add this code in

Code:

#!/system/bin/sh

on property:sys.boot_completed=1
    start sysinit
   
service sysinit /sbin/sysinit.sh
    oneshot
    class late_start
    user root
    group root
    disabled

Now save as and use all types and name it init.d.sh and be sure its in the ramdisk folder

Having fun yet?

now last but not the least the sysinit.sh file!
same method as above but with a different code and is saved in the sbin folder

Code:

#!/system/bin/sh

mount -o remount,rw /;
mount -o rw,remount /system

# init.d support
if [ ! -e /system/etc/init.d ]; then
  mkdir /system/etc/init.d
  chown -R root.root /system/etc/init.d
  chmod -R 755 /system/etc/init.d
fi

# start init.d
for FILE in /system/etc/init.d/*; do
  sh $FILE >/dev/null
done;

And there you have it folks!
I would like to credit where I got the idea from but alas the guy who gave me the boot.img says he got it from another site and got it randomly.... so would like to thank my buddy Car *actually a human not a machine*

I already tried using the 00test script by Ryuinferno to see if it works and after two reboots I found the test log file in /data

I am new at this so please be gentle and I am still working on this because I want to integrate the scripts of Ryuinferno into the kernel *scripts being the 00test and the 00setperm* he will allow me to use them.

Again thanks XDA! my new home

Feedback please ^_^


from xda-developers http://ift.tt/1UkIiml
via IFTTT

No comments:

Post a Comment