Is there any way to Enable init.d scripts support for Stock ROM/Kernel ?
In "Xperia T Android Development" forum ....many thread seems need Unlock & Flash kernel
Thanks
Yes.
Install busybox from market and copy this - http://d-h.st/YZi - in /system/etc folder. Set permissions rwx r-x ---.
Create init.d folder and use your scripts.
peetr_ said:
Yes.
Install busybox from market and copy this - http://d-h.st/YZi - in /system/etc folder. Set permissions rwx r-x ---.
Create init.d folder and use your scripts.
Click to expand...
Click to collapse
It works~
Thanks
Related
If you are trying to install the SuperCharger script and can't find a busybox installation equal to or less than 1.18.2 please find attached 1.17.1. You can install with a simple xcopy deployment on top of an existing busybox install. More than likely busybox installed to /system/xbin but you should check first. You can use an app like Root Checker to find the real location. After you have identified where it is installed simply remount the file system as r/w and copy the attached file over the busybox installation you found. I used the app Root Explorer to remount the file system r/w and copy of my busybox install.
Update: I could not attach the file as it was not of an acceptable file ext so here is a link:
jayflowers.com/Misc%20Downloads/busybox
Update: I forgot to mention that you need to make sure that you set execute permissions on the busybox binary after you copy it over...
Hello!
This is a small mod, inspired by non other than our great DoomLord (so if it helped you, thank him/donate to him/worship him ) and his thread in the X10 section.
I am trying a lot of things on my phone, so I often switch back and forth from stock kernel to DoomKernel.
However, I use lots of init.d scripts (my favorite one being SuperCharger)
and I just don't want to lose this feature when I'm on stock.
So, without further ado, here are the steps that are needed to make init.d scripts run automatically at boot on stock kernel.
Requirements:
1. Stock Kernel
2. Root
3. Busybox
4. CMW Recovery for Stock Kernel by nAa.
5. Root Explorer or any other similar app.
Instructions:
1. Download the attached zip and place it in a folder in your SD card.
2. With Root Explorer, go to /system/etc. Press the Mount RW button on top right corner.
a. If the file install-recovery.sh is not there, then press Menu and create a New File.
Name it install-recovery.sh and then long-press on it and select Open in Text Editor.
Paste this text in it:
Code:
#!/system/bin/sh
# init.d support
busybox run-parts /system/etc/init.d/
Save it and delete any .bak file that Root Explorer might have created. Set the permissions as in the attached screenshot.
OR
b. If the file install-recovery.sh is already there, long-press on it and select Open in Text Editor. Paste this text in the end:
Code:
# init.d support
busybox run-parts /system/etc/init.d/
In both scenarios, don't forget to leave one empty line at the end of install-recovery.sh file. ***
3. Reboot into Recovery and flash the init.d-autorunner-stock.zip.
4. Reboot your phone and with Root Explorer go to /data/local/tmp.
There should be a txt file there named "init.d_log_test.txt" and once you open it, you should see the word "done".
5. Now you can use your favorite init.d scripts on stock kernel!
If you want to check if the scripts you want to use actually work, please refer to one of my older threads about how to test them.
*** I am not including an install-recovery.sh because this is the file that Link2SD depends on, so it's better if you modify it yourself, rather than use mine.
Let me know if it worked for you!
iridaki said:
Hello!
This is a small mod, inspired by non other than our great DoomLord (so if it helped you, thank him/donate to him/worship him ) and his thread in the X10 section.
I am trying a lot of things on my phone, so I often switch back and forth from stock kernel to DoomKernel.
However, I use lots of init.d scripts (my favorite one being SuperCharger)
and I just don't want to lose this feature when I'm on stock.
So, without further ado, here are the steps that are needed to make init.d scripts run automatically at boot on stock kernel.
Requirements:
1. Stock Kernel
2. Root
3. Busybox
4. CMW Recovery for Stock Kernel by nAa.
5. Root Explorer or any other similar app.
Instructions:
1. Download the attached zip and place it in a folder in your SD card.
2. With Root Explorer, go to /system/etc. Press the Mount RW button on top right corner.
a. If the file install-recovery.sh is not there, then press Menu and create a New File.
Name it install-recovery.sh and then long-press on it and select Open in Text Editor.
Paste this text in it:
Code:
#!/system/bin/sh
# init.d support
busybox run-parts /system/etc/init.d/
Save it and delete any .bak file that Root Explorer might have created. Set the permissions as in the attached screenshot.
OR
b. If the file install-recovery.sh is already there, long-press on it and select Open in Text Editor. Paste this text in the end:
Code:
# init.d support
busybox run-parts /system/etc/init.d/
In both scenarios, don't forget to leave one empty line at the end of install-recovery.sh file. ***
3. Reboot into Recovery and flash the init.d-autorunner-stock.zip.
4. Reboot your phone and with Root Explorer go to /data/local/tmp.
There should be a txt file there named "init.d_log_test.txt" and once you open it, you should see the word "done".
5. Now you can use your favorite init.d scripts on stock kernel!
If you want to check if the scripts you want to use actually work, please refer to one of my older threads about how to test them.
*** I am not including an install-recovery.sh because this is the file that Link2SD depends on, so it's better if you modify it yourself, rather than use mine.
Let me know if it worked for you!
Click to expand...
Click to collapse
Was looking for this...!!! Thanks...!!!
Sent from my LT15i using xda premium
thank you. but what is this script for? Can you explain it 2 me?
mercury_beta said:
thank you. but what is this script for? Can you explain it 2 me?
Click to expand...
Click to collapse
This is a setup in order for scripts placed in /system/etc/init.d to be executed automatically at boot. Such scripts can do lots of things, like RAM optimisation, CPU scaling, mount options, etc etc etc.
Can the script be added to hw_config.sh? Will it be execute on boot? Inteks' swap2cache script can be added to hw_config.sh too.
Sent from my digital typewriter..
emannxperia said:
Can the script be added to hw_config.sh? Will it be execute on boot? Inteks' swap2cache script can be added to hw_config.sh too.
Sent from my digital typewriter..
Click to expand...
Click to collapse
Sorry, I don't know for sure. But probably yes.
Great post mate, thanks. (already give you thanks button)
Seeing if this works on ray
I get this file in the init.d folder after.flashing the file
#!/system/bin/sh
touch /data/local/tmp/init.d_log_test.txt
echo "done" >> /data/local/tmp/init.d_log_test.txt
Not in data/ local
I have ran supercharger script and files are appearing in inlit.d folder think it's working
Edit : tested it as per the thread further up it would seem its all working!
Sweet
Hope it is ok I have shared this on the Ray thread? (I have linked back to your thread)
sent from my gorgeus Xperia Ray
Hi iridaki thanks for your little mod here! I just want to give a hint of what might been a little issue but might make your whole mod is not running. You do mention about changing permission on install-recovery.sh, but you gave it as a picture. The Problem is XDA on web these days is not arranging the image as inline, but as an attachment. So i and chiefy009 did the same mistake, not changing the permission because it is just a one line and not clear enough. Please add additional step like:
3. Make sure install-recovery.sh have permissions of rwxr-xr-x
Click to expand...
Click to collapse
Thanks
Worked for me. I'm using Sony Ericsson Xperia Pro MK16i with stock rom (root + cwm including).
Hello
doesn't worked for me ;(
Sony Xperia Arc S (LT18i) build ver. 4.1.B.0.587
nAa's CWM 5.0.2.7
rooted
there is no this test log file in /data/local/tmp afret applying the zip
so what i have after "apply zip file" in recovery meny and rebooting:
in /system/xbin new binary file run-parts
in /system/etc new folder init.d with test99 script in it
in /sysrem/etc file install-recovery.sh which was made by us previously
it looks like would work...but it does not
So, what can i do myself?
Thank you in any way
◄ ▌[24.Jan.13][MOD][Guide] Brainmaster's Tweaks for Android 4+ ▌►
Here is the description of the Tweaks:
Scripts in the /system/etc/init.d folder:
08dalvik - Moves the Dalvik cache from the ext4 /data/dalvik to the faster yaffs /cache/dalvik partition
95zipalign - This is more enhanced zipaligning method. Its zipaligning the apps in the /system/app and /data/app. It also creates the database that contains infos on apps that are already zipaligned, and checks that databe on reboot. If all apps are zipaligned, it skips the zipalign process. Zipaligning is useful because its reducing the amount of used RAM
99bmtweak - Contains the tweaks that I've collected and enhanced over the time. Included are IO tweaks, TCP tweaks, SDCard ReadAhead tweak, SQLite Vacuum Database tweak
hosts file in the /system/etc folder:
Hosts file makes your Phone ADFree.
resolv.conf file in the /system/etc folder:
Google DNS Servers
placeholders in the /system/app and /data/app folders:
If you want to add a system app or install data/app with the CWM Zip file, just drop the apk in the /system/app or /data/app folder in the CWM Zip file and they will be installed when you flash the CWM Zip.
/kernel folder:
Enables the init.d script support.
updater-script in the /META-INF/com/google/android folder:
Deletes the Cache and Dalvik Cache, mounts the /data and /system partitions, copying the needed files. It sets the permissions. If you are editing that file, be SURE to use the Notepad 2 or Notepad ++ and use the Unix file system encoding when saving the file, not the regular Notepad Windows app.
build.prop tweaks Injector in the /tmp folder:
Injects the values in the /system/build.prop file. The /tmp/mytweaks.sh file shouldn't be edited! The file /tmp/misc contains the buildprop tweaks. You can add your own build.prop tweaks in that file.If you are editing that file, be SURE to use the Notepad 2 or Notepad ++ and use the Unix file system encoding when saving the file, not the regular Notepad Windows app, also IF you use comments (#Disable.ADB.Notification.Icon), DON'T use spaces, use ONLY the underline or dot character! These tweaks are included:
Code:
#Disable.ADB.Notification.Icon
persist.adb.notify=0
#Disable.Google.OTA.Checkin
ro.config.nocheckin=1
#Disable.Google.Reports
profiler.force_disable_err_rpt=1
profiler.force_disable_ulog=1
#Enable_Google_DNS_Servers
net.dns1=8.8.4.4
net.dns2=8.8.8.8
#HSPA.Tweaks
ro.ril.hsxpa=2
ro.ril.gprsclass=12
ro.ril.hsdpa.category=16
ro.ril.hsupa.category=8
#Dalvik.Optimization
dalvik.vm.execution-mode=int:jit
dalvik.vm.verify-bytecode=false
dalvik.vm.dexopt-flags=v=n,o=v
Installation
Step 0: You must be rooted!
Step 1: Download the Busybox installer app and install the Busybox to /system/xbin. Again - install the Busybox to /system/xbin not to /system/bin!
Step 2: Reboot to recovery and install the BM.Tweaks.NEXUS.S.zip file.
Optional Memfree tweak - set to 100 MB:
In order to use the Memfree tweak on every ROM, extract the /system/framework/services.jar from the ROM and upload it to android.mimic.ca, let the site edit the file, download the edited services.jar and put it in the BM Memfree zip file. Then flash the BM Memfree zip in the Recovery.
The attached Memfree zip is for the stock JZO54K ROM.
Optional BM Seeder:
You can read everything about the tweak here.
This is my version adjusted for the Nexus S.
How can I be sure that the tweaks are working?
Open the RootExplorer and click on the /cache folder. IF the dalvik-cache folder is present, THEN the tweaks are working properly. Check also your /system/build.prop file for the #Brainmaster Tweaks area.
The tweaks are universal - not ROM version related, and can be flashed over any ROM but ONLY for NS or NS4G.
Disclaimer:
ALWAYS make a NANDroid Backup of your current ROM so that you can go back if you don't like the tweaks.
I will NOT reply any users PM's regarding this thread or my ROMs, only the DEVs should contact me over PM.
If you are user and have questions, write HERE in the thread.
BEFORE asking any questions, make sure that you read this post.
I have edited the Mobile_Sensei's ROM prepare tool and added the deletion of the /sdcard/.android_secure folder.
Now when you flash new ROM and want to do a clean install, just flash this file.
It does following:
deletes /sdcard/.android_secure
deletes /cache
deletes /data/dalvik-cache
formats /cache
formats /data
formats /boot
formats /system
Happy flashing!
Here you can also find just the Dalvik-Wiper when you're updating your ROM.
Reserved 2.
Reserved 3.
Reserved 4.
Nice!
Sent from my Nexus S using XDA App
Thank you for sharing this
Transmitted from somewhere in space... from my Nexus S... and Tapatalk.
Thanks!
Now I have something more to play with my personal version of MIUI ICS
Thanks man
But I have a question, For the ICS custom rom, most of them come with boot.img and I tried on KANGY-S but i got stock on google sign in the beginning of boot.
So can you tell me which package should I use?
Thx
10char
v2 uploaded.
Changelog: Bugfixes in Build.prop Injector script.
If you are using the /tmp/misc to add your build.prop tweaks DON'T use commented explanations, like this one:
Code:
#Disable ADB Notification Icon
Use only the tweaks!
after heard your announcement yesterday , this kinda makes me feel this is your "legacy"(no offence) ...
and , thanks for share all of these
v3 comes later today.
How do we merge multiple languages in one rom?
djjonastybe said:
How do we merge multiple languages in one rom?
Click to expand...
Click to collapse
When compiling the new ROM, fetch existing language strings and compile.
For existing ROM - like MIUI - decompile apps and framework, add language strings, recompile apps and framework. Language strings need to match every build, you can't use strings from older builds on newer without editing.
Enough said.
Changelog:
v3:
Code:
- Corrected errors in the RAM and TCP Tweaks
- Added Google DNS Servers in resolv.conf and build.prop injector
- Added tweaks for the CM9
@ Brainmaster`s Dude thanks a lot for this release,
Just I want to request something, can you make a package for gingerbread rom which come with boot.img. the one you released i doesnt come with boot.img.
i really appericate it buddy.
frost866 said:
@ Brainmaster`s Dude thanks a lot for this release,
Just I want to request something, can you make a package for gingerbread rom which come with boot.img. the one you released i doesnt come with boot.img.
i really appericate it buddy.
Click to expand...
Click to collapse
Which one? Have you checked if there is already /system/etc/init.d folder present on your ROM?
brainmaster said:
Which one? Have you checked if there is already /system/etc/init.d folder present on your ROM?[/QUOTE
Actually, Im using CM7.2.0 Kang and yes there is init.d folder on my rom, but i couldnt find any of your tweaks in this folder. can i just simply add to the rom using root explorer?
Actually , I meant the first package in the list which is belongs to ICS and gingerbread roms.
Click to expand...
Click to collapse
frost866 said:
Actually, Im using CM7.2.0 Kang and yes there is init.d folder on my rom, but i couldnt find any of your tweaks in this folder. can i just simply add to the rom using root explorer?
Actually , I meant the first package in the list which is belongs to ICS and gingerbread roms.
Click to expand...
Click to collapse
That is strange - so you have installed it through the CWM and yet there are still no tweaks present in the init.d?
Yes, copying them in the init.d folder and setting the permission to 750 also works.
I am trying to change the folder permission of the "data/gps" folder to "rwx rwx rwx", by default, it's set to "rwx --- ---".
I can do this by using ES File Explorer but the folder permission gets reverted to the default upon reboot. So I'm guessing ES File Explorer can't change it permanently.
My question is, is there any method that I can use to change it permanently? I have Terminal Emulator installed, but I've never used it before so I don't want to go around messing with it just yet (unless if I can get a confirmation that it'll do what I need it to do).
I would appreciate any help on this. Thanks.
Update:
I tried it with Terminal Emulator, "chmod 777 /data/gps". No luck, the permissions still reverted to default upon reboot.
I was informed that all scripts placed within "/etc/init.d" folder are executed on boot. So I created a shell script file and placed it in that folder.
#Change folder permission
chmod 777 /data/gps
Click to expand...
Click to collapse
Unfortunately, that didn't work either. I don't know if the script above is incorrect or incomplete. One thing I can't figure out though, are all the scripts in the folder executed with superuser privilege? Correct me if I'm wrong but in order to change the permission for "/data/gps" folder, superuser privilege is required. I have tried the following scripts, nothing works.
#Change folder permission
su chmod 777 /data/gps
Click to expand...
Click to collapse
#Change folder permission
sudo chmod 777 /data/gps
Click to expand...
Click to collapse
#Change folder permission
sudo su chmod 777 /data/gps
Click to expand...
Click to collapse
Anyone with ideas?
UPDATE: I have got this fixed! Turns out that there was nothing wrong with the script. Placing the script in the init.d folder does the trick, it's just that I couldn't get it to work with CM9, it works perfectly on OneCosmic ROM. Maybe CM9 doesn't support init.d?
Dear all, I need help im modifying system.img from Stockrom. I can delete apks (de-bloating) but I do not know how to add new apks!
So far I have done the following steps:
1. Untar AP*.tar.md5
2. Extract with LZ4 system.img.lz4
3. simg2img system.img system-new.raw
4. sudo mount -t ext4 -o loop system-new.raw mnt/
5. delete bloatware apps from system/app and system/priv-app
6. add additional apks to system/app and system/priv-app????
7. umount, img2simg, lz4, tar and flash (e.g. Odin)
I have real issues with step 6, everything I tried so far did not work.
a) add apks to system/app and system/priv-app with user root and 644
b) create directories in system/app and system/priv-app
c) replace apks in system/app and system/priv-app
While the de-bloating works, step 6 is broken! The new apps are not usable. They show up with the generic android "robot icon" and their canonical name (e.g. org.fdroid.fdroid...) and are immediately stopped.
What is the correct approach to add additional apks to an existing stock rom image? Please help.