[Q] Init.d support - Samsung Galaxy SL i9003

Can anyone confirm that UC V9 kernel has proper support for init.d scripts? I have tried several scripts and checked the values through terminal emulator and it seems that none of the scripts are executed. I'm on stock KPQ with UC V9 kernel.
Thanks a lot!

I can't test it because I'm not currently using UC kernel, but are you sure that those scripts are executable or that there aren't other scripts that override your settings? When I used it (an older version) they worked.
Code:
ls -l /etc/init.d
This will show a list all your scripts with their permissions. They should be
Code:
rwxr-xr-r
Or try to execute one of the scripts and see if the values you want to change effectively change.

UC kernel V9 has support for init.d scripts! As they said.
And, I did test it with a older version!
Sent from my I9100 using XDA app

I've tried repeatedly and finally I've realised that it was the scripts that were not working. UC V9 kernel supports scripts seemlessly via /system/etc/init.d.
Thank you guys for your replies!

Related

[Q] My init.d script does not work, why?

Hello,
I want to change my voodoo colors at boot, so I made a script in init.d folder:
Code:
#!/system/bin/sh
echo 2447339790 >/sys/devices/virtual/misc/voodoo_color/red_multiplier
echo 2159029280 >/sys/devices/virtual/misc/voodoo_color/green_multiplier
echo 2782492160 >/sys/devices/virtual/misc/voodoo_color/blue_multiplier
echo -14 >/sys/devices/virtual/misc/voodoo_color/red_v1_offset
echo -17 >/sys/devices/virtual/misc/voodoo_color/green_v1_offset
echo -18 >/sys/devices/virtual/misc/voodoo_color/blue_v1_offset
And here is my init.d folder : http://i.imgur.com/nhkdy.png , 99voodoo is my script.
When I paste this codes to android terminal emulator, it is working flawlessly.
But it does not work in init.d folder. Tried different roms which support init.d scripting, but no luck.
What is wrong with it? Can anyone help?
Thanks.
I had the same issue with couple of kernels not sure why im prety sure they even support (Eugene and glados)
you have to set full permissions on the script also but still didn't work for me
I gave up and just used ROM toolbox and made it run at startup works no problem
There must be a solution. What am I doing wrong!?
Do you have Busybox installed?
Hostile89 said:
Do you have Busybox installed?
Click to expand...
Click to collapse
Yes, preinstalled with the rom I've been using:
http://forum.xda-developers.com/showthread.php?t=1397358
features "root, busybox, zipalign, Bash, init.d scripts ... etc".
Any help? No solution?
What is your ROM and kernel combination?
I was using Aosp+ Rom and ICUP-Speedy-3 kernel.
Now, I have just flashed CyberGR rom. Comes with GLaDOS 2.7 kernel. Feature list says "Init.d scripts support", but no luck for me. My script doesn't work with this rom too. What is wrong with it :S
I found the solution.
I was trying to move my script to init.d folder manually via RootExplorer app.
But pushing the same file via adb just worked.
Thanks to this: http://forum.xda-developers.com/showthread.php?t=1424032

[Q] Init.d i/o script

I am trying to write a script to switch the i/o scheduler to sio. I am misticninja's kernel (that has the sio scheduler, init.d support) and following this guide
http://forum.xda-developers.com/showthread.php?t=1473921
but the script doesn't seem to work.
I can run it manually from the /system/etc/init.d driectory after I boot but it won't run at boot on its own and defaults to noop.
What am I missing here? Is there something different about the Asus Transformer in regard to init.d scripts? Does the script need to have a specific name?
Sent from my Transformer TF101 using Tapatalk
Any luck yet? I was able to get it to work. I put the script in /system/etc/init.d and called it sioscheduler then set the permissions to 755 ( rwxr-xr-x ) using File Manager HD.
I tried out misticninja's kernel and the script did not work but it does work with TestyMeh.
I sort of gave up I am using guevor's kernel now I will try it again.
EDIT: Looks like it works with guevor's kernel and megatron rom

[MOD] EZ InitD - init.d the EZ way !!

Root IS required !!
This mod will add init.d support to any rom even stock roms without editing the ramdisk. Instead it uses the post_boot.sh file that is in most if not all roms. It should work on most devices, if it does not work on yours please look in /system/etc and post the name of the file that contains "post_boot.sh".
This mod has been tested on the OneX and OneS.
To use just flash in recovery and add your favorite scripts to init.d.
For devs:
To add this method to your rom simply edit the post_boot.sh file and add this line at the bottom:
Code:
/system/etc/init.d/*
Easy right ? Suprised it hasn't been done before, well at least that i know of.
All files in init.d will be executed at boot just like regular init.d. You can also manually add the line and make it whatever directory you want.
Download:
http://goo.im/devs/smokin1337/Mods/EZ-InitD.zip
reserved.....
I did something similar to the Garminfone to give it init.d support. One question, have you considered using the runparts command (in busybox I believe) to execute the scripts. That is the standard way of doing it. You can also use logwrapper to have it output to logcat.

[Q] [JB Sense] Can't get init.d scripts to run at boot

I've been running the ElementalX kernels on HatkaXL Rom, and they run fine, but they don't seem to be applying any of the custom settings using /etc/init.d/99elementalx. If I run it manually (using adb shell), it does work (loads all the modules, can see them using lsmod, and also adds the cpu governers, which I can see in kernel tuner).
I've been trying to figure out why my init.d script isn't running, and I'm stuck. Here's what I've tried:
* Flash boot.img manually using fastboot
* Update permissions to init.d scripts manually (they're all a+rwx and owned by root:root)
* boot boot.img manually (fastboot boot boot.img)
All of these methods fail in running my init.d scripts. As far as I can tell the init.rc inside the boot image is running the init scripts correctly (using run-parts).
Why aren't my init.d scripts running?
Any pointers on how to debug this further would be greatly appreciated.
I'm using one of the first batches of One XL's (AT&T) and am still running hboot 1.09.
I don't know anything about this stuff but I know having cpu app like kernel tuner set to run at boot can cause problems.
Sent from my VenomXL using Xparent Red
ImagioX1 said:
I don't know anything about this stuff but I know having cpu app like kernel tuner set to run at boot can cause problems.
Sent from my VenomXL using Xparent Red
Click to expand...
Click to collapse
Ah, I should have added that I disabled Kernel Tuner running at boot, and merely use it to verify my cpu settings/tweaks are indeed applied.
thatdutchguy said:
I've been running the ElementalX kernels on HatkaXL Rom, and they run fine, but they don't seem to be applying any of the custom settings using /etc/init.d/99elementalx. If I run it manually (using adb shell), it does work (loads all the modules, can see them using lsmod, and also adds the cpu governers, which I can see in kernel tuner).
I've been trying to figure out why my init.d script isn't running, and I'm stuck. Here's what I've tried:
* Flash boot.img manually using fastboot
* Update permissions to init.d scripts manually (they're all a+rwx and owned by root:root)
* boot boot.img manually (fastboot boot boot.img)
All of these methods fail in running my init.d scripts. As far as I can tell the init.rc inside the boot image is running the init scripts correctly (using run-parts).
Why aren't my init.d scripts running?
Any pointers on how to debug this further would be greatly appreciated.
I'm using one of the first batches of One XL's (AT&T) and am still running hboot 1.09.
Click to expand...
Click to collapse
I haven't used that rom, does it have busybox? Does 99elementalx have execute permissions (eg: chmod 777 /etc/init.d/99elementalx)
There is an easier workaround. Edit /etc/init.qcom.post_boot.sh and add /system/etc/init.d/99elementalx at the very bottom. Ensure init.qcom.post_boot.sh has execute permission.
flar2 said:
I haven't used that rom, does it have busybox? Does 99elementalx have execute permissions (eg: chmod 777 /etc/init.d/99elementalx)
There is an easier workaround. Edit /etc/init.qcom.post_boot.sh and add /system/etc/init.d/99elementalx at the very bottom. Ensure init.qcom.post_boot.sh has execute permission.
Click to expand...
Click to collapse
I'll try that. I added busybox myself (I think it was already on there too though) and permissions seem to all be right. It even loads the wp_mod, but I can't figure out where it loads it.
Stay tuned to see if that worked
*update*
I added:
Code:
busybox run-parts /system/etc/init.d
to my /system/etc/init.qcom.post_boot.sh, and that solved my problem.
Still wonder why it was not running init.d to begin with, since I see a similar snippet in init.rc (inside the boot.img).

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

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 !
Bull*hit. JUST INSTALL pimpmyrom and finish ..Easy.:victory:
Someone had to document this ^^, good job
RobyRc said:
Bull*hit. JUST INSTALL pimpmyrom and finish ..Easy.:victory:
Click to expand...
Click to collapse
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
RobyRc said:
Bull*hit. JUST INSTALL pimpmyrom and finish ..Easy.:victory:
Click to expand...
Click to collapse
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
alireza7991 said:
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
Click to expand...
Click to collapse
You are wrong.
RobyRc said:
You are wrong.
Click to expand...
Click to collapse
well, if he is wrong you can explain why, he explained why according to him is better this way, you could explain why not
What happens if your ROM doesn't have /system/bin/sysinit?
vMAC said:
What happens if your ROM doesn't have /system/bin/sysinit?
Click to expand...
Click to collapse
* 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
alireza7991 said:
* 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
Click to expand...
Click to collapse
And is it possible to create sysinit and init.d folder with an updater script?
GT-af said:
And is it possible to create sysinit and init.d folder with an updater script?
Click to expand...
Click to collapse
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 !
I have MTK 6577 device this will work ?
andrman1 said:
I have MTK 6577 device this will work ?
Click to expand...
Click to collapse
all android devices are supported
alireza7991 said:
all android devices are supported
Click to expand...
Click to collapse
In init.rc file I haven't code "stop bootanim" why and where I put this code ?
And I haven't in /system/bin file "sysinit" ?
andrman1 said:
In init.rc file I haven't code "stop bootanim" why and where I put this code ?
And I haven't in /system/bin file "sysinit" ?
Click to expand...
Click to collapse
Place those codes on the middle of init.rc ; the only difference is execute order . if you put it at first init.d wont execute becuase we have'nt system mounted still and if you put it at the end you will stop at your homescreen for a few secound so its better to execute it while you are seeing bootanimation
make new file name it sysinit and put codes siad in OP inside it .
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/
Is this needed?
I've seen some ROMs not having /system/bin/sysinit but init.d kernel support, and I've tested a ROM myself not having this file, but the
99test init.d script gave some output to /data/tmp. So I guess it was executed properly.
t-ryder said:
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/
Is this needed?
I've seen some ROMs not having /system/bin/sysinit but init.d kernel support, and I've tested a ROM myself not having this file, but the
99test init.d script gave some output to /data/tmp. So I guess it was executed properly.
Click to expand...
Click to collapse
There are many ways to get init.d working , you may include sysinit in init.rc or you may completely remove it and use a direct code in init.rc to execute init.d scripts or ....
Here in this method , I used sysinit in user-space to let init.d be dynamicly modifed or removed without repacking the kernel
alireza7991 said:
There are many ways to get init.d working , you may include sysinit in init.rc or you may completely remove it and use a direct code in init.rc to execute init.d scripts or ....
Here in this method , I used sysinit in user-space to let init.d be dynamicly modifed or removed without repacking the kernel
Click to expand...
Click to collapse
So just the file
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/
would make it run (having busybox in /xbin) without having to mess around in the kernel using e.g. virtous ten studio?
t-ryder said:
So just the file
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/
would make it run (having busybox in /xbin) without having to mess around in the kernel using e.g. virtous ten studio?
Click to expand...
Click to collapse
there are many strange and not suggested methods which add init.d without repacking kernel but the best method is using init.rc .
But I have some ideas on getting init.d working withouy messing around kernel . I am going to test them ;
alireza7991 said:
there are many strange and not suggested methods which add init.d without repacking kernel but the best method is using init.rc .
But I have some ideas on getting init.d working withouy messing around kernel . I am going to test them ;
Click to expand...
Click to collapse
Hi; I googled for a while to find a way to add init.d to my ROM and found your thread. Can you also explain how to adjust the source tree before compilation that I get the init.d? I am compiling AOSP with the stock kernel. I saw a few posts before that this method just works for a kernel which supports init.d. I have no clue if the stock kernel does. Thanks

Categories

Resources