I am using stock kernel and Hyperion9 rom. I want to add init.d support. I dont want to install any app like Universal Init.d for init.d support.
I have created init.d directory in /system/etc & sysinit file in /system/bin , as mentioned in other xda threads.
But When I add '/system/bin/sysinit' or 'exec /system/bin/sysinit' to init.rc and init.bcm21553.rc. Then I repack & flash the modified boot.img.
Nothing happens. Scripts present in init.d donot run on boot. I have checked the file permissions. All are OK.
Please guide me, Where should I add '/system/bin/sysinit' ?
Related
I have problem runing script from init.d folder. Script maked by link2sd work, but every script i add wont run on boot.
I set same permision liki in link2sd script... any idea?
when try to open script from init.d folder with root explorer there is no txt. :/
Have you tried script manager?
sent from my gt540 mur4ik RC0 806mhz
yes, it`s work when run script manueli... but not working when set run on boot.
goto data/local and edit the userinit and put this code in it
sh /system/etc/init.d/scriptname
that should force the script to run.
i dont have userinit in data/local
just to create it, or...?
yes just create a userinit.sh file then put the command in it
not working, strange...
can you upload the script you are trying to run so i can do some tests for you?
yes, it`s simple script to enable swap on swap partition. work fine when run it with gscript, script manager... but i want to run it auto on boot.
edit the script to look like this
Code:
#!/system/bin/sh
#
# enable swap on ext partition
#
echo 30 > /proc/sys/vm/swappiness
swapon /dev/block/mmcblk0p3
noup, mmcblk0p3: no such file or directory.
have you partitioned your sdcard properly and what way did you do it?
yes, i partitioned it with recovery. swap work fine when i run script manuele, or run comand with terminal. problem is than script wont run on boot, not only this one, v6 super charger wont run eather.
--------
i forgot, i use greendroid 2.0 and 666 infernal kernel
god thats odd what rom are you using mur4iks,joes or one of the softmod GB
greendroid 2.0 and 666 infernal kernel
this kernel hava init.d suport... i think.
it should support swap ok because init.d folder belongs to busybox which the ROM has i would say for you to get the best from your phone is to upgrade to a gingerbread rom preferably CM7 as it supports swap straight fro boot and it also allow V6 SuperCharger to run properly i can help with a 2.1 rom because i only had 2.1 on my phone for 30seconds before flashing a 2.2 CM6 rom.
i use CM7 before (mur4iks M6 was last i try), but every day there was some little bug, and i have big problem with battery, gps... so i went back to 2.1.
tnx for try helping me.
no problem sorry i couldn't help more.
I've flashed Dharam's Stock Performance ROM. It has Fugumod kernel (etc/init.d support) and ZiplAlign, RamHack, etc...
But when I wanted to find the ZipAlign's log file I haven't found anything. There is a line in the zipalign script:
"LOG_FILE=/data/zipalign.log"
So it supposed to be "somewhere" a "zipalign.log" file. But there is no any zipalign.log, so there is no zipaligning at startup, so you can put any script in the folder "etc/init.d", it won't do anything... Right?
Or how can I check that the init.d scripts worked or not? And if the zipalign script didn't do anything, how I can get it work?
SRQ642 said:
I've flashed Dharam's Stock Performance ROM. It has Fugumod kernel (etc/init.d support) and ZiplAlign, RamHack, etc...
But when I wanted to find the ZipAlign's log file I haven't found anything. There is a line in the zipalign script:
"LOG_FILE=/data/zipalign.log"
So it supposed to be "somewhere" a "zipalign.log" file. But there is no any zipalign.log, so there is no zipaligning at startup, so you can put any script in the folder "etc/init.d", it won't do anything... Right?
Or how can I check that the init.d scripts worked or not? And if the zipalign script didn't do anything, how I can get it work?
Click to expand...
Click to collapse
its wrkin for me with fugumod ultra & 2.4beta... I use dis for underclocking cpu at d start up & prevent freezing..
Sent from my GT-I5800 using Tapatalk
I've figured out that the scripts have to be named like S* (e.g., S01_myscript, S02_zipalign)...
"------ Note for startups scripts
- Put your script in /system/etc/init.d
- Scripts with Filename starting with E* (earlystartup scripts) are executed before script with filename starting with S* (users scripts)
- Scripts are executed before playlogo and after init.rc"
from http://forum.xda-developers.com/showthread.php?t=997367
Hello, is it possible to do that ?
Regards
Sure, you have a few options.
The best way (hardest):
-requires root and knowledge of the boot.img and ramdisk partitions of Android
-create the symlink or mountpoint by adding the necessary lines the /init.rc file.
Next best way (not hard if you have init.d support):
-requires root
-requires init.d support
-simply write a script to create your symlink/mountpoint, name it appropriately, and place it in the /system/etc/init.d directory.
-with init.d support, this will automatically run the script at boot and set the parameters you've outlined in said script.
The "other" method (avoid this if possible since it relies on loading an app on boot):
-requires root
-download Script Manager from the play store
-write a script to create your mountpoint or symlink
-configure Script Manager to execute the script on boot.
Hello
I found /init.rc, also found init.00.rc and init.01.rc, but i guess we are talking about the first one (init.rc)
I wasn't able to edit it with a text editor on my tf101, do i need something i don't have to edit it ? Or notepadd++ will be enough ?
In case i fail completly with this, is tasker able apply the line for me too ?
Thanks you for your time.
Regards
Magissia said:
Hello
I found /init.rc, also found init.00.rc and init.01.rc, but i guess we are talking about the first one (init.rc)
I wasn't able to edit it with a text editor on my tf101, do i need something i don't have to edit it ? Or notepadd++ will be enough ?
In case i fail completly with this, is tasker able apply the line for me too ?
Thanks you for your time.
Regards
Click to expand...
Click to collapse
The /init.rc can't be directly modified that way. Everything in the root filesystem "/", as well as the kernel zImage, are loaded at boot from the boot.img image. Therefore, any changes you make will just be reverted when you reboot because it reloads the original from the boot.img image. In order to modify /init.rc, you must pull your boot.img and then extract the files from it. Now you can add the necessary lines to it. After that, you re-combine everything back into the boot.img, and push it back to your device.
If all that sounds unfamiliar to you, you will have some reading to do. Most of this will need to be done on a linux machine too.
What ROM are you running? If you have init.d support, that would be the most straightforward way to accomplish your goals.
I'm running asus' rom .24 on a tf101
I don't know if it support init.d, didn't found this file on my device.
Regards
You can also use an app from here, XDA, called directory bind. It all depends what you're looking to do with those symlinks.
Sent from my Sprint Evo View 4G (PG41200) using Xparent Purple Tapatalk 2
Hello, i plan to move game data to sdcard and symlink it to the old internal place.
Also plan to symlink some folders to the movie folder
Regards
Then directory bind app is designed for just your need. All these solutions require rooting your device.
Sent from my HTCEVOV4G using Xparent Purple Tapatalk 2
I will look at this, thanks.
Directory bind run during boot or after boot ?(little delay before things get re symlinked ?)
Regards
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 !
Reserved for future changes !
Pls tell me about this '' init'' on my supersu dialog box...
It's my first time to see this and I don't know what is this for?
Is this harmful? Or very important not to loose it...
Educate me... I really don't know what is is for...
... What? why? how?
Thanks much!
Sent from my GT-I9300 using XDA Premium HD app
'' Init '' or '' init.d''
Pls differentiate....
What is this for?
Sent from my GT-I9300 using XDA Premium HD app
leio rusher said:
'' Init '' or '' init.d''
Pls differentiate....
What is this for?
Sent from my GT-I9300 using XDA Premium HD app
Click to expand...
Click to collapse
leio rusher said:
Pls tell me about this '' init'' on my supersu dialog box...
It's my first time to see this and I don't know what is this for?
Is this harmful? Or very important not to loose it...
Educate me... I really don't know what is is for...
... What? why? how?
Thanks much!
Sent from my GT-I9300 using XDA Premium HD app
Click to expand...
Click to collapse
Read in the op what is init.d section...
Inviato dal mio GT-I9070 con Tapatalk 2
MyMinds_Kernel_Swap
===================
Based on AnyKernel, but pretty much rebuilt in every way so that it will actually work. So, many thanks to Koush for the idea.
The Idea and What It Does...
=======================
Some but not all of this script has been snippets here and there from ArchiKitchen and DSIXDA Kitchen.
This has allowed me to formulate a zip as such without the need to technically build from scratch saving me LOADS OF HOURS.
It currently uses my static compiled mkbootimg, unmkbootimg, and mkbootfs binaries to allow editing, and rebuilding of the boot.img.
Some serious modifications were made to get this to work successfully with MUCH DEBUGGING. If you change something and it breaks another function then that is on you!
# IT IS CURRENTLY STABLE!
1. It will pull your current boot.img using dd.
2. It will search for the Android! header in the boot.img and remove the unnecessary junk before it if needed to.
3. It will split the boot.img in to the kernel and ramdisk.
4. It will unpack the contents inside the ramdisk.
5. It will modify the default.prop file giving you insecure ADB. If you already have it then this will not affect you.
6. It will modify the init.rc file to give support for init.d. If you already have it then this will not affect you.
7. It will write to sysinit and install-recovery.sh for the completion of init.d support. If already done, then this will not affect you.
8. It will make the init.d folder under /system/etc on your device with required permissions.
9. It will place an init.d script to test to see if init.d is fully working. If it works, you will find a file called, HAS_INIT, located in the /dev directory of your device.
10. It will swap out the original kernel with a new prebuilt kernel upon rebuilding the new boot.img
11. It will repack you a new ramdisk using mkbootfs to be applied to your new boot.img upon rebuilding it.
12. It will remove your old modules and push your new modules that came with your new prebuilt kernel.
13. It will write your new boot.img to your boot partition using dd.
14. Hopefully, more to come!
MAKE SURE YOU CHANGE...
=======================
"$BOOT_PARTITION" ACCORDING TO YOUR DEVICE BEFORE USING THIS SCRIPT!!!!!!
How to use it...
==============
1. Place your prebuilt kernel in the prebuilt folder and insure it is named, zImage.
2. Place kernel modules in the modules folder.
3. Zip, and flash in TWRP recovery.
If you have any suggestions then let me know. My ears are open to them.
https://github.com/ModdingMyMind/MyMinds_Kernel_Swap
Sent from my C525c using Tapatalk