◄ ▌[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.
Related
Here's an alternative way to gain more RAM and performance without odexing.
Get more RAM and faster responses by disabling verify-bytecode!
This process will usually give just as much as performance boost as odexing SYSTEM and USER app.
Click to expand...
Click to collapse
AS WITH ANY MODDING PROCEDURE/SCRIPTS FOR YOUR PHONE, THIS SCIPT ALSO COMES WITH NO WARRANTY. AUTHOR HOLDS NO RESPONSIBILITY FOR ANY DIRECT AND INDIRECT CONSEQUENCES OF RUNNING THIS SCRIPT. MAKE SURE YOU HAVE MADE A NAND BACKUP BEFORE PROCEEDING. MAKE SURE YOU HAVE AT LEAST 15% FREE ON /SYSTEM, THIS IS IMPORTANT BECAUSE IF YOU RUN OUT OF SPACE THINGS WILL GO BADLY WRONG..
Requires busybox.
If your system partition is almost full, have a look at http://forum.xda-developers.com/showthread.php?t=734236.
This script will *attempt* to odex all apks found at /system/app. Theming would be impossible once the ROM is odexed. Themes applied at the time of odexing will be preserved. If you plan on applying a theme, apply it before odexing. If you want to theme after odexing, you must deodex the ROM before theming. If you change themes often, odexing is not for you.
Quick Instructions for Windows:
Connect the phone with USB cable and enable USB debugging. (No wireless or Android Terminal shell)
Put the phone in airplane mode.
Download and extract the attached file and run odex.bat
Instructions for advanced users:
This attachment contains a folder called odex. Push that folder to data and set the permission of odex.sh to 4755. Mount system as r/w(could be done via adb remount system). Next, execute odex.sh. All of this should be done via USB using ADB shell. Do not use wireless adb or Android Terminal.
Advantages:
More free space in system partition.
Faster booting.
More free RAM(I was able to gain 20-30MB.)
Faster access to system apps.
Disadvantages:
Cannot be themed after odexing.
APK tweaks cannot be applied.
Might break some of the non-AOSP system apps such as Root Explorer if they are installed as system app.
Acknowledgments:
Only the odex.bat was created by me. Similar projects were done in past but most of the downloads are broken. So, I collected together different stuff from different places to put together this package.
adb.exe is from the RATC batch ROOT.
adb dlls are from Android SDK
odex.sh is from Paul O Brian from MoDaCo (pastebin.com/EZLWUdea)
zip, zipalign and dexopt-wrapper are from XDA (http://forum.xda-developers.com/showthread.php?t=734236)
Next aim: Odex for apps in data/app
Update:
I got 1017 on quadrant and 61.8fps on swiftdroid 2.0 M6 overclocked to 844MHz(offline mode with wifi on. No apps except system apps). It must be noted that sometimes odexed ROM performs slightly slower in benchmarks but the difference is very small. However, this does not mean their performance is lower. Odex means apps could load fast thereby making app switching, app loading really fast. And, it also reduces system RAM usage which means more apps could stay in memory making multi-tasking easier. Odexing is something like swap or compcache. Sacrifice something to gain something else. This is for some people who think odexing is useless. The drop in speed is so small that it cannot be noticed without a benchmark but the performance of the phone increases noticeably due to more space in dalvik and RAM.
Nice work.
Few remarks.
1) you need busybox installed for find
2) "busybox --install" defaults to /usr/bin (not available on android)
use "busybox --install ." when you cat-ed it to /system/xbin
Something seems not OK though with the odex.sh script?
Code:
Unable to create './Contacts.odex': File exists
zip warning: name not matched: classes.dex
zip error: Nothing to do! (./Contacts.apk)
Unable to open './Contacts.apk' as zip archive
failed on './Contacts.apk.new' - No such file or directory
Unable to create './VoiceSearch.odex': Permission denied
Unable to create './Music.odex': File exists
zip warning: name not matched: classes.dex
Cheers
Hmm, sorry, I just started to assume busybox is default since the two ROMs of concern(Joe's. Gingerbread and swiftdroid) had busybox.
Those apks are already odexed. You are on a partially odexed rom. Nothing to worry.
tweakradje said:
Nice work.
Few remarks.
1) you need busybox installed for find
2) "busybox --install" defaults to /usr/bin (not available on android)
use "busybox --install ." when you cat-ed it to /system/xbin
Something seems not OK though with the odex.sh script?
Code:
Unable to create './Contacts.odex': File exists
zip warning: name not matched: classes.dex
zip error: Nothing to do! (./Contacts.apk)
Unable to open './Contacts.apk' as zip archive
failed on './Contacts.apk.new' - No such file or directory
Unable to create './VoiceSearch.odex': Permission denied
Unable to create './Music.odex': File exists
zip warning: name not matched: classes.dex
Cheers
Click to expand...
Click to collapse
Sent from my GT540 using XDA App
i just applied a cm7 theme and the rom is still stable and the theme was applied after running the batch file
That depends on the theme. A theme that modifies odexed system apks will break things while an apk that modifies only the unodexed system apks will work. So, for most users, it would be safer to say that you shouldn't apply themes.
Sent from my GT540 using XDA App
First post has been updated.
Sent from my GT540 using XDA App
if you want to get even more ram odex your framework ... On my froyo with odexed framework i got 123mb ram with stock autokiller values This is only odexing system/app so you are able to theme your framework without problems ...
mikegapinski said:
if you want to get even more ram odex your framework ... On my froyo with odexed framework i got 123mb ram with stock autokiller values This is only odexing system/app so you are able to theme your framework without problems ...
Click to expand...
Click to collapse
I will try that. I was trying to odex data/apps. I odexed quadrant apk and saw a small gain of around 1% but it could be purely due to error or differences in conditions.
Framework isn't odexed doesn't mean all themes would work. Some themes modify other apks for more customizations. So, if you apply such a theme, it will break things. Better be safe than sorry. Saying that most themes would work, people might try to flash all themes thinking it won't break anything. It's just safer to deodex before theming. Of course, if you know what theme modify only framework and what theme modifies other apks, this shouldn't be a concern.
Update: odexing framework apk has reduced free memory to 60MB from previous 75MB
Might try add this into my app Root Toolbox if that's ok?
lukemovement1 said:
Might try add this into my app Root Toolbox if that's ok?
Click to expand...
Click to collapse
Hmm. You can but it's not a good idea. I tried odexing via terminal emulator but it fails.
Basically, this would not work if you try via root toolbox or rather it increases chances of being bricked. However, I noticed you had the scripts needed to flash an update.zip. If that's the case, you'll need to prepare an update.zip in real time and flash it via recovery.
http://forum.xda-developers.com/showthread.php?t=734236 This script moves the apps to SD and odexes. You will have to remove the appsupdate.sh and instead create an update.zip from odexed apps in sdcard. My script on the other hand, directly odexes without any user interaction.
On the other hand, I'd be glad to see this being simplified enough to pressing a button in root tool box. Only the bat script is mine. The rest are from other sources. I guess it shouldn't be a problem as long as you give credit to Paul O Brian from MoDaCo and the person who wrote deoxopt-wrapper.
And, btw, I noticed a small issue in your app. It has NO WARNINGS and NO CONFIRMATIONS! This is a real downer for an app like Root Toolbox which could brick your phone. You should ask for user confirmation whenever an user attempts to do a task that might brick your phone.
I am planning on adding the confirmation dialogs as soon as I can get back to my computer. For the odexing at runtime ill see if it works with app that don't have a GUI. If not ill do some kind of update.zip.
I'm on m6 and want to odex including framework how do I do this?
Sent from my GT540 using XDA App
Danzano said:
I'm on m6 and want to odex including framework how do I do this?
Sent from my GT540 using XDA App
Click to expand...
Click to collapse
Read start post.
And, to odex framework, you need to modify the line which says cd /system/app to cd /system/framework in odex.sh and go through same procedure.
I odexed framework but it made my ROM very unstable.
Hmmm maybe not such a good idea then
Sent from my GT540 using XDA App
this process connot access the file because it is being used by another process...
this process connot access the file because it is being used by another process...
this process connot access the file because it is being used by another process...
this process connot access the file because it is being used by another process...
starting odexing...it might take a few minutes to finish...
this process connot access the file because it is being used by another process...
this process connot access the file because it is being used by another process...
this process connot access the file because it is being used by another process...
this process connot access the file because it is being used by another process...
this process connot access the file because it is being used by another process...
this process connot access the file because it is being used by another process...
this process connot access the file because it is being used by another process...
your device is now odexed
is this right or is something wrong?
what way did you try and odex the rom?
the quick windows way
have you want to the system/app folder to see if any odex files there?
system/apps all apks no odex
try using script manager and set the script to run on boot to see if it work that way.
USING DSIXDA's KITCHEN TO CREATE YOUR OWN SOFT-MODs
(THIS IS MY FIRST BIG TUTORIAL, SO PLEASE CO-OPERATE AND HELP ME MAKING THIS GUIDE BETTER!!)
DsiXDA has created an excellent Kitchen for 'cooking' custom ROMs. So first THANKS goes to DsiXDA.
READ THIS BEFORE PROCEEDING:
Click to expand...
Click to collapse
For Kitchen to get working you need a Linux environment. My choice is go for Ubuntu 10.04 / 10.10 (I won't recommend 11.xx as Unity spoils the 'Cooking' experience). You should have a little bit of experience with Ubuntu. You can do it on Windows too. Install Ubuntu inside VirtualBox. I won't recommend using cygwin as it may reduce the performance.
Click to expand...
Click to collapse
GIVE CREDITS TO THE ORIGINAL DEVELOPER
I. Setup the Kitchen:
Download DsiXDA's Kitchen at https://github.com/dsixda/Android-Kitchen/archives/master. Download the 0.179 version
Get an 'original' ROM (not soft-modded). The ROM that I used in this tutorial is Pebe's CyanogenMod 7
Get JDK. It's necessary. Execute the following command in Terminal:
sudo apt-get install openjdk-7-jdk
When asked for password, enter the one which you use for logging in.
For 64-bit system, you need the ia32-libs ( sudo apt-get install ia32-libs )
Extract the contents of the dsiXDA's kitchen to a folder, say kitchen, in your Home folder (for convenience). Just inside the kitchen folder there should be the ./menu file
Open Terminal. Browse to your kitchen directory
cd ./kitchen
source ./menu
It should open up the Kitchen Menu
This is the basic setup of your Kitchen. Now move up to the next big step.
II. Actual ROM:
Copy the ROM (in my case, it is cm7_v2.zip (pebe's CM7)) and paste it in the original_update folder
Execute Kitchen (Step 5 from I). Select option '1. Setup working folder from ROM'. Another menu appears, hit ENTER. It'll show up the available ROMs list. It should display at least one ROM. In my case it was "(1) cm7_v2.zip". Enter selection number: 1. Hit ENTER. It'll prompt for changing the name, leave it, no need. Hit ENTER. It'll start extracting the ROM. In my case, it found the updater-script. It'll ask to convert the script into update-script. We want update-script at the moment, so just hit ENTER. It should say 'Finished setting the working folder!'. Hit ENTER. You'll be back to Menu.
The Menu shows various options like 'Adding Root permissions, installing busybox, etc'. You can play with them. As most of the ROMs have Root and Busybox installed, we don't need any of these features.
Now comes a bit advanced part. Select ADVANCED OPTIONS. There are various options like Deodex files, add Nano text editor, signing APKs, etc. I'll explain each of them:
Deodex: Merges ODEX and APK together. However, it's applicable for ODEXed ROMS (mostly Stock 2.1) only. Neither of GB and FroYo versions are ODEXed. So you can skip this step.
Add task killer tweak: It's a good alternative to Supercharger script. Only thing is, it isn't as versatile as Supercharger script. Leave this if you don't know anything about Task killer values like FOREGROUND APP, BACKGROUND APP, etc
Add data/app functionality: Suppose you've come across a situation that the system size reaches almost 150 MB (standard for GT540) and still you want to add some more apps, then this tweak is for you. It adds the /data/app folder. You can place apps in this folder. These apps will be directlty installed in the /data partition thus eliminating the 150MB limit.
Add Bash: Adds command-line completion in Terminal commands. Install if you want. Not needed.
Add Apps2SD: This is much primitive type of Apps2SD in which you have to create an ext partition on your SD card. Not recommended. Link2SD (app) is much better.
Add busybox run-parts: This tweak is most important one. I enables the startup scripts option, that means, scripts placed in /etc/init.d folder will get executed during the booting process. Recommended for Stock and AOSP ROMs only.
Add custom boot animation: If you want to add a custom boot animation to your ROM, then you need this. Select this option. It'll ask you to proceed, hit ENTER. A folder /data/local will be created inside the WORKING_xxxxxxx_xxxxxxx folder. Place your bootanimation.zip in that folder. Google some nice boot animations or if you want to create your own boot animations, Despotovski brothers had made a 'Boot Animation maker', check it here http://forum.xda-developers.com/showthread.php?t=1234611
Rest all tweaks are not required for now
III. Something's Cooking!
There will be a folder named something like WORKING_xxxxx_xxxxxxxx in your kitchen folder. Open it up. It contains the actual system, boot.img file, data directory etc.
The best feature of DsiXDA is that you can easily 'browse' the system.
Open the system folder. Here you can see the apps, etc, lib, usr, etc folders.
Adding / Removing Apps: Open the apps folder. You'll see APKs of all the system apps. Try removing some apps. You can remove Dev tools, pre-installed CM themes or any other app. Add your own apps. Copy-paste your apps here. If their filenames have spaces in them (like Root Explorer.apk) remove these spaces (like RootExplorer.apk). You can also use the /data folder for adding more apps.
Adding some other stuff: The /etc folder has a lot of cool stuff too. The apns-conf.xml file contains the APNs. System can auto-detect the APN according to your carrier. I got an apns-conf.xml file which contains a huge list of APNs. Just replace the existing file.
Adding Fonts: Pick your favorite font (I like Ubuntu). Grab the .ttf file of that font. Open /fonts folder. Remove the existing DroidSans.ttf file. Copy-paste your font file in it and rename it to DroidSans.ttf.
IV. Final Steps:
Open the kitchen menu. Advanced Options → Sign all APKs
Back to main menu. '9. Check update-script for errors'.
'6. Zipalign all APKs'
'99. Build ROM'. If it shows warning regarding BOOT-EXTRACTED folder exists, select y (remove BOOT-EXTRACTED).
Select a build option → 1. Interactive Mode
Would you like to Zipalign → n (we already did that before)
It'll start making update.zip.
Add updater-script to your ROM → y (We want compatibility with ClockworkMod)
Proceed with the change → y
Sign your ROM → y
Change the name → n
Once you're back to main menu, select Exit (x)
Your ROM is located in OUTPUT_ZIP folder (It'll be a zip file)
Copy this zip file on your SD card. Reboot into Recovery. Select 'Install zip from SD card', select the ZIP file.
Reboot. See if everything works properly.
I KNOW THERE MIGHT BE ZILLIONS OF ERRORS IN THIS GUIDE. IF YOU'RE STUCK AT SOME POINT OR CANNOT UNDERSTAND SOMETHING, TELL ME. I'LL TRY TO MAKE THIS GUIDE MORE EASIER TO UNDERSTAND.
THIS IS A BASIC SOFT-MODDING GUIDE. I'M DOING SOME INVESTIGATION REGARDING THEMING AND BUILD.PROP TWEAKS. I'LL BE ADDING THESE SECTIONS LATER.
WOW nice work making this TUT!!
Nice Work!
thanks!!
gonna try this out sometime
There is a search feature guys this was posted about like half a year ago
I tried the kitchen its not that great all you can do is zipalign change some options and re package
TBH androidboss you probably could do more using terminal and root explorer
Sent from my tf101 using xda premium 1.54Ghz
Guys! Before Soft-Modding please ask the Devs first. They worked and took up free time for those roms and they would like a thanks.
Danzano said:
There is a search feature guys this was posted about like half a year ago
I tried the kitchen its not that great all you can do is zipalign change some options and re package
TBH androidboss you probably could do more using terminal and root explorer
Sent from my tf101 using xda premium 1.54Ghz
Click to expand...
Click to collapse
really i should try one day!
with credits and thanks!!
Algud if you need tips or want a hand customizn give me a shout hell if you wana use enigma and just cretic it to you're liking be my guest
Sent from my tf101 using xda premium 1.54Ghz
Danzano said:
Algud if you need tips or want a hand customizn give me a shout hell if you wana use enigma and just cretic it to you're liking be my guest
Sent from my tf101 using xda premium 1.54Ghz
Click to expand...
Click to collapse
yeah thanx bro!!
i will try and make one during this weekend
once i get my phone fixed..
i will pm you if i need help with something about the
soft-mod!!
All good
Sent from my tf101 using xda premium 1.54Ghz
Danzano said:
All good
Sent from my tf101 using xda premium 1.54Ghz
Click to expand...
Click to collapse
pm' ed u!!
soz its a bit long!
I'll be writing the "Theming using UOT Kitchen" tutorial tonight
tejasdj12 said:
I'll be writing the "Theming using UOT Kitchen" tutorial tonight
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=18934516#post18934516
you can base on this if u want
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
I was always kinda crazy about update-script, if it is really correct while setting permissions and symlinks, so I took the one from wanam's ROM and fixed the wrong lines. It needed just some tweaks, by removing and adding some toolbox symlinks, and removing inexistent files lines. The result is very similar or even the same comparing to the structure when you flash the ROM from odin. I also organized the whole thing, removing useless stuff and making kernel/modem flashing faster.
- This is the META-INF folder used to install full ROMs.
It already comes with su binary and busybox. Delete init.d folder and update-script line if you are not going to use init.d.
I made the changes based on the new XXELKC-4.1.2 firmware.
[MOD] Internal <> External storage "swap" for 4.2.2. Simply, easy, safe.
UPDATE 26.06.2013
OK, we are alive again!
Some users have reported about boot loop. Use it at your own risk (be ready to use backup or ExternalStorageRestore).
ExternalStorageFullSwap_v1 for 10.3.A.0.423 DEODEX
ExternalStorageRestore_v1 for 10.3.A.0.423 DEODEX
Install it from Recovery.
Best swap solution. No root, no init.d, no remounts, exFAT support, easy to restore, full emulated storage support (4.2.2).
System will work as usual, sdcard0 will still be internal storage, sdcard1 will still be real SD-card. But all (most) apps (and games) will use sdcard1 as global storage path (getExternalStorageDirectory).
It is for any DEODEXED ROM based on 10.3.A.0.423 (4.2.2).
Patch will replace only one file - framework.jar and will not swap sdcard0 and sdcard1 (in reality). sdcard0 will still be internal storage, sdcard1 will still be real SD-card. If anything will go wrong just restore original framework.jar.
Kyrie1965 said:
It is for any DEODEXED ROM based on 10.1.A.1.434.
Patches will replaces only one file - framework.jar and will not swap sdcard0 and sdcard1 (in reality). sdcard0 will still be internal storage, sdcard1 will still be real SD-card.
There are two versions:
ExternalStoragePartialSwap (recommended). Install it from Recovery. This patch is doing one simple and outstanding thing - change EXTERNAL_STORAGE_ANDROID_DATA_DIRECTORY, EXTERNAL_STORAGE_ANDROID_MEDIA_DIRECTORY, EXTERNAL_STORAGE_ANDROID_OBB_DIRECTORY to external storage (sdcard1).
Most of games and apps stores their data and cache at /sdcard0/Android/data, /sdcard0/Android/obb, /sdcard0/Android/media. sdcard0 - is internal storage. After patching games and apps will use /sdcard1/Android/data, /sdcard1/Android/obb, /sdcard1/Android/media. After patch applying you need to move Android folder from sdcard0 to sdcard1 (by any file manager). Most of all other apps will use internal storage as usual.
ExternalStorageFullSwap (not recommended). Install it from Recovery. This patch is doing one simple and outstanding thing - change EXTERNAL_STORAGE_DIRECTORY to external storage (sdcard1).
Most of all apps will use sdcard1 as internal storage. By default when apps asks for a storage dir (getExternalStorageDirectory), system returns "/storage/sdcard0". After patch it will be "/storage/sdcard1" by default.
If anything will go wrong just restore original framework.jar (DEODEX, 10.1.A.1.434) ExternalStorageRestore. Install it from Recovery.
Click to expand...
Click to collapse
Hey Thank u for mod... Reserved..
Kyrie1965 said:
It is for any DEODEXED ROM based on 10.1.A.1.434.
Patches will replaces only one file - framework.jar and will not swap sdcard0 and sdcard1 (in reality). sdcard0 will still be internal storage, sdcard1 will still be real SD-card.
There are two versions:
ExternalStoragePartialSwap. Install it from Recovery. This patch is doing one simple and outstanding thing - change EXTERNAL_STORAGE_ANDROID_DATA_DIRECTORY, EXTERNAL_STORAGE_ANDROID_MEDIA_DIRECTORY, EXTERNAL_STORAGE_ANDROID_OBB_DIRECTORY to external storage (sdcard1).
Most of games and apps stores their data and cache at /sdcard0/Android/data, /sdcard0/Android/obb, /sdcard0/Android/media. sdcard0 - is internal storage. After patching games and apps will use /sdcard1/Android/data, /sdcard1/Android/obb, /sdcard1/Android/media. After patch applying you need to move Android folder from sdcard0 to sdcard1 (by any file manager). Most of all other apps will use internal storage as usual.
ExternalStorageFullSwap. Install it from Recovery. This patch is doing one simple and outstanding thing - change EXTERNAL_STORAGE_DIRECTORY to external storage (sdcard1).
Most of all apps will use sdcard1 as internal storage. By default when apps asks for a storage dir (getExternalStorageDirectory), system returns "/storage/sdcard0". After patch it will be "/storage/sdcard1" by default.
NO need root, init.d, etc. exFAT support (if you have exFAT mod). Absolutly safe (system will work as usual).
If anything will go wrong just restore original framework.jar (DEODEX, 10.1.A.1.434) ExternalStorageRestore. Install it from Recovery.
Click to expand...
Click to collapse
Awesome! Could you please tell me which files and lines you edited, so I can edit it myself for any ROM I use? (In case this mod breaks some tweaks and mods implemented in the jar file of the ROM)
Ape187 said:
Could you please tell me which files and lines you edited...
Click to expand...
Click to collapse
framework.jar > android > os > Environment.smali (constructor <clinit> method)
Just use any comparing tool and compare original and patched files.
Kyrie1965 said:
framework.jar > android > os > Environment.smali (constructor <clinit> method)
Just use any comparing tool and compare original and patched files.
Click to expand...
Click to collapse
Okay, thanks. I use notepad++ for editing.
Is it possible to have another version for stock rom?
Explain More
Kyrie1965 said:
framework.jar > android > os > Environment.smali (constructor <clinit> method)
Just use any comparing tool and compare original and patched files.
Click to expand...
Click to collapse
Could you please Elaborate More- I didn't understand Because ExternalStoragePartialSwap_434.zip file contains Only one file framework,jar file.
After extracting the This jar file , I have found 3 files inside-- classes.dex, MANIFEST.MF, and preloaded-classes.
I didn't Understand for "framework.jar > android > os > Environment.smali (constructor <clinit> method)", Where Can I find this and How !
Plz explain.
Thanks-- Anil
anielkumar said:
Could you please Elaborate More- I didn't understand Because ExternalStoragePartialSwap_434.zip file contains Only one file framework,jar file.
After extracting the This jar file , I have found 3 files inside-- classes.dex, MANIFEST.MF, and preloaded-classes.
I didn't Understand for "framework.jar > android > os > Environment.smali (constructor <clinit> method)", Where Can I find this and How !
Plz explain.
Thanks-- Anil
Click to expand...
Click to collapse
My message about Environment.smali was not for ordinary users. Only for users who know what is decompile, java, dalvik, etc.
After Flash Getting FC for user Installed App and Game not Starting
Hi,
I have flashed the ExternalStoragePartialSwap_434.zip thru TWRP in my C6602/sony Z.
I have doomloard v6 kernel and Glass Xperia V2. But after flashed i was getting FC for Linked Application using Link2SD.
Even if I unlinked the App , Still I am unable to Run. Game is also not launching.
So I have Re flashed ur ExternalStorageRestore file to Back original state.
I think this Patch need more testing.
I am also Semi Developer and tester. I have worked on Visual Studio.
Little bit I know Java.
It will help for me if you guide about What Compiler / decompiler use for Patching for framework.jar.
I have work on Eclipse.
Thanks--
anielkumar said:
Hi,
I have flashed the ExternalStoragePartialSwap_434.zip thru TWRP in my C6602/sony Z.
I have doomloard v6 kernel and Glass Xperia V2. But after flashed i was getting FC for Linked Application using Link2SD.
Even if I unlinked the App , Still I am unable to Run. Game is also not launching.
So I have Re flashed ur ExternalStorageRestore file to Back original state.
I think this Patch need more testing.
I am also Semi Developer and tester. I have worked on Visual Studio.
Little bit I know Java.
It will help for me if you guide about What Compiler / decompiler use for Patching for framework.jar.
I have work on Eclipse.
Thanks--
Click to expand...
Click to collapse
I use gui apk tool for decompiling/compiling (available here) and for editing the .smali files I use notepad++.
BTW, I use Windows 7 64bit for it.
GL2SD (temp Solution)
Ape187 said:
I use gui apk tool for decompiling/compiling (available here) and for editing the .smali files I use notepad++.
BTW, I use Windows 7 64bit for it.
Click to expand...
Click to collapse
Hi
Thanks. I am on it.
Mean while I am using GL2SD program for "data and obb" files for running the Games or Apps from SD1 card (ExternelSD).
External_storage_dumb ?
Kyrie1965 said:
framework.jar > android > os > Environment.smali (constructor <clinit> method)
Just use any comparing tool and compare original and patched files.
Click to expand...
Click to collapse
Hi,
I have decompile the framework.jar files (Both modified one and Original one).
Modifed (Your framework.jar) contains Following Line:
const-string v2, "EXTERNAL_STORAGE_DUMB"
const-string v3, "/storage/sdcard1"
Original ( from deodexed rom) contains Following Line:
const-string v2, "EXTERNAL_STORAGE"
const-string v3, "/storage/sdcard0"
So, Why have u modified ---
EXTERNAL_STORAGE To EXTERNAL_STORAGE_DUMB ???????????????
for Sdcard0 to Sdcard1 is OK.
Plz Check ?
Currently I am on progress......
anielkumar said:
So, Why have u modified ---
EXTERNAL_STORAGE To EXTERNAL_STORAGE_DUMB ???????????????
Click to expand...
Click to collapse
EXTERNAL_STORAGE is environment variable. If it exists system will use it value (path) and not your. It is not good and you must prevent it. EXTERNAL_STORAGE_DUMB is not exist at any case.
Please do not post such questions here. This topic is not for that.
Can we use this mod with rooted stock .434 version? Is anyone tried?
Sent from my C6603 using xda app-developers app
HoboTR said:
Can we use this mod with rooted stock .434 version? Is anyone tried?
Click to expand...
Click to collapse
No, you cann't. You need deodexed ROM.
Yep tried it on a stock rom and as he mentioned, it's not working in a stock rooted rom.
If he can manage to pull this off for stock roms it'd be really great, nice work though man. keep it up.
Can you share the smali script about swapping internal storage from framework.jar ?
danisariandi said:
Can you share the smali script about swapping internal storage from framework.jar ?
Click to expand...
Click to collapse
Here you go. The file is attached. Just unzip it. This is the full swap one.
Ape187 said:
Here you go. The file is attached. Just unzip it. This is the full swap one.
Click to expand...
Click to collapse
Could you give me a tutorial ?
Sent by brand new mindmap
danisariandi said:
Could you give me a tutorial ?
Sent by brand new mindmap
Click to expand...
Click to collapse
Of course.
First things first, you must have Java installed on your Windows computer and set the path variables. To do this go to Control Panel>System and Security>System>Advanced, till it looks someting like this. I have downloaded the 32bit version of java. It might look different to you. Just copy the path of your java bin folder and add it to the path field. Be sure to add a semicolon after the last entry before you add it.
After that install the program from here. It requires .NET Framework, but the necessary files you will find there.
Next thing, open the GUI apktool, select your framework.jar file you extracted from the .434 firmware and decopile shown here. Be sure to keep the original, you will need it later. I unticked the "Sign recently compiled apk?" box for safety. Check always the log after decompiling/compiling before doing anything!
After that, go to the decompiled path located in your personal folder. You can simply go there by clicking "Open decompiled output directory". Don't close the program. Go to framework.jar>smali>android>os and replace the Environment.smali I posted.
Then go to the program again and compile it. Name the compiled file "framework.jar" (without the quotes) for simplicity's sake. After it successfully compiled, go to the path by clicking on "Open compiled output directory" and open it with 7zip (very useful tool). Open your original framework.jar as well. Drag and drop the classes.dex file from your recently compiled file to your original and overwrite it. Don't flash the freshly compiled file, or the ROM will not boot.
All you need to do now, is to put it into a flashable zip and flash it via recovery. For safety, make a flashable zip with your untouched framework.jar in case something went wrong.
I hope, I covered everything. If I made some errors, then anyone can correct me.