[Dev] Improve Internal SD card speed - Atrix 4G Android Development

http://forum.xda-developers.com/showthread.php?t=1023664
Using the same method there
by editing /sys/devices/virtual/bdi/179:0/read_ahead_kb to 4096 I seem to have imrpoved my internal SD card's speed. Only until reboot as i cant find /system/etc/init.d using root explorer.
However, can kennethpenn, Ririal and any other devs bake it into the rom?

+1 (please)

Correct me if I am wrong, but you should be able to create an init.d file in wordpad and put the script in there to run on boot. I did that for a memory tweak on my former Galaxy S.
Sent from my soon-to-be-hacked Bell Atrix.

GibMcFragger said:
Correct me if I am wrong, but you should be able to create an init.d file in wordpad and put the script in there to run on boot. I did that for a memory tweak on my former Galaxy S.
Sent from my soon-to-be-hacked Bell Atrix.
Click to expand...
Click to collapse
I'm hoping you are right!!

GibMcFragger said:
Correct me if I am wrong, but you should be able to create an init.d file in wordpad and put the script in there to run on boot. I did that for a memory tweak on my former Galaxy S.
Sent from my soon-to-be-hacked Bell Atrix.
Click to expand...
Click to collapse
I know it can... But there isnt an init.d folder in /system/etc/

(Noob question?) What are you guys use to read/edit these files (on phone)? I don't mean the ".rc" ones, but those with a page-and-badge icon in Root Explorer (example: "/init", not "/init.rc"). I'm not even sure on the file type... Thanks.

We'll see about this. I'm doubtful. But I'm adding it to my list of prospects.

kennethpenn said:
We'll see about this. I'm doubtful. But I'm adding it to my list of prospects.
Click to expand...
Click to collapse
It does show improvement in SD Tool.
However, I use my external SD for camera so gallery reads from it... so not sure if it has real world improvement...

Create a init.d folder in /system/etc and push this script there
But it won't work until you install the script or another is already installed in init.d folder
http://db.tt/18JjeOl direct link

cdesai said:
Create a init.d folder in /system/etc and push this script there
But it won't work until you install the script or another is already installed in init.d folder
http://db.tt/18JjeOl direct link
Click to expand...
Click to collapse
Do you know for sure it will be executed just by creating the folder? is the init.d folder supported?

One of the earlier versions of aroot added init.d support, however i am not sure if the later versions (gladiatrix root) does this (see this thread)
I used the aroot method when I reflashed 1.26 to do some tweaking and the init.d folder is in /system/etc/

Girgizzlemuf said:
One of the earlier versions of aroot added init.d support, however i am not sure if the later versions (gladiatrix root) does this (see this thread)
I used the aroot method when I reflashed 1.26 to do some tweaking and the init.d folder is in /system/etc/
Click to expand...
Click to collapse
The problem is I am on 4.1.57 gingerblur... And I am not sure if it has init.d support :S

tianqi said:
I know it can... But there isnt an init.d folder in /system/etc/
Click to expand...
Click to collapse
There is on mine..
Sent from my soon-to-be-hacked Bell Atrix.

My question is, will this work for the external sd card as well? I transfer most but not all of my less priority apps to my external sd card. The SD Card app that test the speed is not accurate, fyi.
I also tried the link previously and changed it to max kb but occasionally it is a hit or miss on the speed.

tianqi said:
The problem is I am on 4.1.57 gingerblur... And I am not sure if it has init.d support :S
Click to expand...
Click to collapse
Im pretty sure I flashed back to 4.1.26 to use the root method I mentioned before specifically so I could use 4.1.57 with init.d support. I did notice that the "prefered" root method doesnt make mention of init.d, but its fully working for me now
Sent from my MB860 using XDA App

What Motorola did was bake in the native linux install from the android-backend with the webtop system. Thus, the directory you're looking for is /osh/etc/init.d/
Code:
echo "$YOURLINE" >> /osh/etc/init.d/rc

Also anyone know which one to edit for the external sd? So we can improve both sd?

Request.... please pretty please..
I brought this up in the gladiatrix thread 2 days ago and was also not able to get it to work after reboot or on the external SD.
Would someone please create a CWM zip for this when it is completed?
It could be added to the wiki or the sticky's thread

tianqi said:
GibMcFragger said:
Correct me if I am wrong, but you should be able to create an init.d file in wordpad and put the script in there to run on boot. I did that for a memory tweak on my former Galaxy S.
Click to expand...
Click to collapse
I know it can... But there isnt an init.d folder in /system/etc/
Click to expand...
Click to collapse
Pulling stuff from memory, so I might be a bit off here and there.
The original root methods (SuperOneClick and aRoot) put a script in /system/etc/install-recovery (or something like that) which had one line in it which told it to execute every script in /system/etc/init.d. They also created the /system/etc/init.d directory and put a single script in there which remounted /system as rw.
But, the 4.1.57 update deleted the script, so most of you probably don't have it any longer (unless the re-root process put that script back?). In any case, I suspect that's the information you're looking for.

So 4.1.57 isnt capable of running init.d?

Related

Input Script into Startup

So I recently came across a script at Modaco Forums that allows me to light up the capacitive buttons while using the Desire Port. I was wondering if there was a way for me to implement that into the ROM without having to go to GScript everytime. I have Dsxdsi's ROM Kitchen installed so I'm thinking I could use that. I just don't know where the file would go.
I attached the file that contains the script. And this is the thread I got it from.
http://android.modaco.com/content/g...ble-capacitive-buttons-for-nexus-desire-roms/
add a shortcut to your homescreen directly to the script, voila.
though it would be nice to have this on bootup..
That's what I mean.
/system/etc/init.d/
Rename the script to have numbers in the beginning, or just link it in 20userinit.
Depending on what 20userinit you've got (system/etc/init.d/) some look to the sd card for a script called userinit.sh and executes it if it exists.
Load up userinit.sh on your sd card with whatever you like (using #!/system/bin.sh) and go wild. It's a great way to set everything up that you need... especially after you've just installed a new build (mine restores all my settings before I even get to the home screen - bliss). It runs in a root context so if you copy or create files or directories you'll need to chmod as necessary.
add a shortcut to your homescreen directly to the script, voila
Click to expand...
Click to collapse
Out of curiousity, how do you do that with a script? I use GScript but it doesn't work right with some of my scripts and would love to hear of any alternatives.
-------------------------------------
Sent from a device of some sort.

[HOWTO] Delete system apps

There is many of you that asks how to remove this and that preinstallaed apps in different ROM
When a developer put apps in system/app it can not be removed so easy.
But if you have RomManager or fakeflash´s update.zip there is a other way.
I have attached a zip fil that contains a ordinare ROM installation script that only contains delete and copy.
Download file and unzip on your computer and take a look in the folders
data/app
META-INF/com/google/android/update-script
system/app
If your only wish is to remove a systemapp
edit the file update-script (textfile)
and add line with the filename of what you want to remove:
(example)
delete SYSTEM:app/unwanted.apk
delete SYSTEM:app/unwanted.odex
If you want to install some apps put them in system/app for not installable
and data/app for apps that can be removed as usual
rezip folders and install zip with RomManager NO WIPE!!
cm6 azures you will get a error because not same structure for data/app
never mind just select reboot. Delete will work anyway.
Sometimes there will be .so files in system/libs too. They are little more difficult to know which to remove so that demands more knowledge of the app.
Use for instance Astro filemanager or Estrong to look in system/app for correct filename to delete
Script work even if *.odex not exist.
The fact that when you zip folders it will not be signed so file will not work with adb recovery
Googleapps filenames:
CarHomeGoogle.apk, CarHomeLauncher.apk, com.amazon.mp3.apk,
Facebook.apk, GenieWidget.apk, Gmail.apk, GoogleBackupTransport.apk,
GoogleCalendarSyncAdapter.apk, GoogleContactsSyncAdapter.apk,
GoogleFeedback.apk, GoogleGoggles.apk, GooglePartnerSetup.apk, GoogleQuickSearchBox.apk, GoogleServicesFramework.apk, googlevoice.apk,
HtcCopyright.apk, HtcEmailPolicy.apk, HtcSettings.apk, kickback.apk, LatinImeGoogle.apk, LatinImeTutorial.apk, Maps.apk, MarketUpdater.apk, MediaUploader.apk, NetworkLocation.apk, OneTimeInitializer.apk, PassionQuickOffice.apk, SetupWizard.apk, soundback.apk, Street.apk, Talk.apk, talkback.apk, Twitter.apk, Vending.apk, VoiceSearch.apk, YouTube.apk, QuickSearchBox.apk, Provision.apk
Other apps:
ADWLauncher.apk, Gallery3D.apk
but filename may be different depending of ROM
Mainpart must exist for using phone normally
Hope that this help to remove "non-removable" systemapps in future.
/Snakehult
Good guide.
via Legend using XDA-app
Thanks snakehult - great guide and very useful!!
snakehult said:
(example)
delete SYSTEM:app/unwanted.apk
delete SYSTEM:app/unwanted.odex
Click to expand...
Click to collapse
It may be worth explaining how people:
- can find out the name of the app they want to remove;
- how they know whether to add the suffix of *.apk or *.odex, or both;
Thanks again for your efforts!
c_man said:
Thanks snakehult - great guide and very useful!!
It may be worth explaining how people:
- can find out the name of the app they want to remove;
- how they know whether to add the suffix of *.apk or *.odex, or both;
Thanks again for your efforts!
Click to expand...
Click to collapse
Yes you can use some regular filemanager such Astro or Estrongs and look in system/app
Always delete both, script work even if odex file is missing
c_man said:
It may be worth explaining how people:
- can find out the name of the app they want to remove;
- how they know whether to add the suffix of *.apk or *.odex, or both;
Thanks again for your efforts!
Click to expand...
Click to collapse
cool guide!
anyway you have to detect the filename of the apps this way:
enter the recovery mode (in modaco-root-r4: recovery-windows.bat)
now type:
adb shell
mount -t yaffs2 /dev/block/mtdblock3 /system
ls -l /system/app
(this will give you the list of system apps, with space usage)
you have to delete both .apk and .odex files (the latter may not exist)
I use to delete the bigger ringtones too, the list is given by
ls -l /system/media/audio/ringtones
it is safe to delete, after you setup the google accounts (ie after first boot):
HTCSetup*
com.htc.Setup*
Stock*
HtcFoot*
NewsRead*
wow its working......thanks dude........
Uploaded with ImageShack.us
http://android.modaco.com/content/h...apps-from-the-htc-desire-with-adb-in-windows/
Simple guide from MoDaCo
That must be the hardest way to remove apps i guess Have you seen "modaco guide"? All you have to do is reboot your phone in to recovery mode and type 2-3 commands in ADB. Simple as that.
Thanks anyway for your efforts
Many way för same thing
But with a custom-made zipfile you always remove/install favourite apps without adb. And quick modify new ROM install.
Sent from my Legend using XDA App
Hello,
Good guide.
The Legend may be rooted to do this?
I am a newbie.
Thanks.
bobstar_fr said:
Hello,
Good guide.
The Legend may be rooted to do this?
I am a newbie.
Thanks.
Click to expand...
Click to collapse
As I see it, no use to do much in the dev forum without an rooted Phone
hey guys, thanks for bringing this up. i just tried modaco site method and i deleted stock and its widget only. the internal storage shot from 113 mb to 122 mb and ram from 42 to 134 mb !
what else can i delete
Learners Lisence said:
hey guys, thanks for bringing this up. i just tried modaco site method and i deleted stock and its widget only. the internal storage shot from 113 mb to 122 mb and ram from 42 to 134 mb !
what else can i delete
Click to expand...
Click to collapse
Just delete what you will never use and....no regret
thank you cryshop for your expert advise
i tried deleting Innovation.mp3 by this script -
adb-windows shell rm /system/media/audio/ringtones/Innovation.mp3
said file not found even though its listed.
whats my mistake ?
i will try snakehults method also but later.
thanks
im trying to use modaco's method but what is the green recovery menu?
i dont understand i go in fastboot then recovery and then?thank you
edit done im stupid
Learners Lisence said:
thank you cryshop for your expert advise
i tried deleting Innovation.mp3 by this script -
adb-windows shell rm /system/media/audio/ringtones/Innovation.mp3
said file not found even though its listed.
whats my mistake ?
i will try snakehults method also but later.
thanks
Click to expand...
Click to collapse
Hmm, did you forget a slash or a letter in the command? because I tried and I could actually delete it.
@kdma : install ROM Manager from the Market, and there is an option inside the app : Reboot into Recovery (easiest way to get into recovery mod)
I also deleted /system/etc/clock* and saved some space again
(of course I don't need Htc clock widgets)
cryshop said:
Hmm, did you forget a slash or a letter in the command? because I tried and I could actually delete it.
Click to expand...
Click to collapse
cryshop, i was typing in the wrong directory
Ps - snakehults's appfixer is real delight ! smooooth.
except that my winzip is a trial version and legend dont recognize winrar files.
I was wondering how i got such good figures for change in space and ram the first time. i havent since then. my legend just likes the rebooting involved coz i dont use task killers anymore. and maybe i deleted more than just stock the first time
Will this work with android 2.2 on Hero?
Hey I've been looking all over for something like this. I downloaded the zip, added the lines
delete SYSTEM:app/mms.apk
delete SYSTEM:app/mms.odex
delete SYSTEM:app/email.apk
delete SYSTEM:app/email.odex
and rezipped it.
I used Rom Manager and selected install rom from SD card. It rebooted, seemed to execute the zip. But the original email and mms apps are still installed. What am i doing wrong?
kdma said:
im trying to use modaco's method but what is the green recovery menu?
i dont understand i go in fastboot then recovery and then?thank you
edit done im stupid
Click to expand...
Click to collapse
The first thing you should do is download the required zip file from modaco (I'm a new user of xda and is not permitted to post outside links here. You may easily find that post "24/May r4 - HTC Legend rooting guide - Now with 1.31.x" in android.madaco.com)
I think many of us rooted the device followed the instructions of Paul. So that file might be already in your hands.
Fastboot and then recovery, as you have done before. Run Recovery-linux.sh (or Recovery-windows.bat, if you use Windows) in a terminal window - your device shall be at the green recovery screen.
Open another terminal window and enter:
./adb-linux shell mount /system
and then you can push, pull or rm file. For example,
./adb-linux shell rm /system/app/Calculator.apk
./adb-linux push abc.so /system/lib
--
I didn't notice you have already solved the problem, when I compiled this post. It is no longer useful.

One click ODEXing a ROM for more RAM and better speed.

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.

[DEV] EFS Autobackup script for ROM Developers & Users

I have created a autobackup script for the EFS partition that contains information for your IMEI number.
I am addressing all ROM Developers to include this script in their ROM's!
What does this script do? It creates efs_autobackup folder on your SDCard and then tars the whole EFS partition into efs-backup.tar.gz file. Once this file is created, you can safely copy it to your PC. The script also looks for that file on reboot and if the file exists, it won't create another one.
What are the benefits of the tar file?
It keeps the permissions information for your EFS partition, so that when you want to restore your EFS partition, you only need to extract that file with the RootExplorer to your EFS partition and overwrite the old files. It sets the permissions automatically for you, so you don't need to mess or handle that yourself.
Please Developers, include this in your ROM so that users that forget to backup their EFS partition, don't have to regret that.
INSTRUCTIONS:​
For Users:
If you are on ROM that don't have this script integrated - you can flash the attached zip file in your Recovery to integrate the script.
For Developers:
Either take the file from the attached zip or create 01efstar file (very important to name it with 01 prefix, since it runs as first when the Phone starts, otherwise it won't work) in the /system/etc/init.d folder with this content:
Code:
#!/system/bin/sh
# EFS Autobackup script for Samsung Nexus S
# By Brainmaster
mount /dev/block/platform/s3c-sdhci.0/by-name/media /sdcard
if [ ! -f /sdcard/efs_autobackup/efs-backup.tar.gz ];
then
mkdir /mnt/sdcard/efs_autobackup
busybox tar zcvf /sdcard/efs_autobackup/efs-backup.tar.gz /efs
fi
umount /sdcard
Reserved 1.
What a good idea.
Should I implement this on the radio zip file too?
window7 said:
Should I implement this on the radio zip file too?
Click to expand...
Click to collapse
No, this is ROM based. If the ROM don't support the scripts, then it won't work.
BUT, I am working on a version that can do this directly in the recovery (undependable from ROM) - then you can integrate it in every Radio flash file.
Well done,good job !
Sent from my Nexus S using XDA App
brainmaster said:
No, this is ROM based. If the ROM don't support the scripts, then it won't work.
BUT, I am working on a version that can do this directly in the recovery (undependable from ROM) - then you can integrate it in every Radio flash file.
Click to expand...
Click to collapse
you only have to modify the updater-swcript? easy as a pie!
Sent from my Nexus S using XDA Premium App
i hope ur miui rom has this or else should i flash it?
Borky_16 said:
you only have to modify the updater-swcript? easy as a pie!
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
Not so easy to mount the efs partition through the updater-script.
ancilary said:
i hope ur miui rom has this or else should i flash it?
Click to expand...
Click to collapse
From the next release on. If you want you can flash the script now.
yeah i dunno, first i made my own script and put into etc/init.d (running netarchy 1.3.9 which obv supports init.d scripts) - no dice. so i removed that file and flashed the zip and still getting no backup on sd.
ideas?
brainmaster said:
Not so easy to mount the efs partition through the updater-script.
Click to expand...
Click to collapse
oh that is right! :O forgot about it
Script successfully injected into my current installation of CM nightly, and successfully executed on reboot.
Uploaded the resulting file to Dropbox -- where I know I'll never lose it!
Two thumbs up!
I will include this script in my next rom update. I believe every dev should do the same.
Sent from my Google Nexus S using XDA Premium App
Good idea to put this into every ROM. Some people probably are not aware of the danger and if anything happens at least they can find the backup files on their sdcard. Maybe one should also add a small text file as an explanation what this backup is good for, so they do not accidentally delete it. Maybe you could also change the backup file on the sdcard to read-only.
Btw, you can also make a simple backup image with 'dd if=/dev/block/mtdblock6 of=efs.img'.
And for the record: I wondered why the /efs partition is mounted read-write and thought it might be a good idea change this to read-only. Problem was, without write access to /efs the SIM card would not unlock anymore. So not a good idea.
Just got my phone back from Regenersis with the IMEI restored! Shows that it can be done!
Ezekeel said:
Good idea to put this into every ROM. Some people probably are not aware of the danger and if anything happens at least they can find the backup files on their sdcard. Maybe one should also add a small text file as an explanation what this backup is good for, so they do not accidentally delete it. Maybe you could also change the backup file on the sdcard to read-only.
Btw, you can also make a simple backup image with 'dd if=/dev/block/mtdblock6 of=efs.img'.
And for the record: I wondered why the /efs partition is mounted read-write and thought it might be a good idea change this to read-only. Problem was, without write access to /efs the SIM card would not unlock anymore. So not a good idea.
Click to expand...
Click to collapse
Actually it should be as follows seeing as we get a read-only error;
dd if=/dev/block/mtdblock6 of=/mnt/sdcard/efs.img
Sent from my Nexus S using XDA Premium App
atrixboy said:
Actually it should be as follows seeing as we get a read-only error;
dd if=/Dec/block/mtdblock6 of=/months/sdcard/efs.img
Sent from my Nexus S using XDA Premium App
Click to expand...
Click to collapse
Please, IF you want to use the option to make efs.img (I don't know why would you like to do that, because tar is easier to extract and keeps the permissions), THEN you need right command.
You misspelled allot.
Code:
dd if=/dev/block/mtdblock6 of=/sdcard/efs.img
Yea I realised that after I hit post. I agree rfs is much nicer and cleaner to deal with.
dd if=/dev/block/mtdblock6 of=/mnt/sdcard/efs.img
Or efs.rfs. however you prefer. Rfs being the more logical
Sent from my Nexus S using XDA Premium App
brainmaster said:
Please, IF you want to use the option to make efs.img (I don't know why would you like to do that ...)
Click to expand...
Click to collapse
Because mtd6 contains more than the visible files mounted on /efs, such as the wimax keys.
My question is how to restore the partition without having to worry about this:
Dees_Troy said:
Using dd on mtd devices is a bad idea when it comes time to restore. It's a quick path to a brick. It tends to inadvertently mark blocks as bad.
Click to expand...
Click to collapse
Maximilian Mary said:
Because mtd6 contains more than the visible files mounted on /efs, such as the wimax keys.
My question is how to restore the partition without having to worry about this:
Click to expand...
Click to collapse
Darn. I did not know that.
Turns out one should use nanddump and nandwrite from mtd-utils (http://git.infradead.org/mtd-utils.git). Maybe someone can compile a version for Android. That would be quite useful.

[HowTo] [for cooks] preload partition / how and why you should use it!

Hi folks,
an other very short tutorial for the people (cooks), who do not know how to use the preload (hidden) partition and symlink system apps to it.
Some basics on preload-partition and why you should use it:
We have the so called 'hidden/preload partition' (mmcblk0p12) on our device. Besides the system partition with around 840 mb space, this hidden partition has additional 500 mb...this 500 mb were thought from sammy in the beginning mainly for their own crap like gamehub apps or learning hub and so on. But as system partition is on the edge right now with jelly bean they also use it for placing system apps inside --> the reason is that 840 mb in system is far to less for all files!
Usually most cooks just transfered system apps to data partition (located on your usb storage) to get out of this mess. This method with using hidden partition just gives great opportunity to keep your system partition smaller and you can transfer apps to it which you can not move to data! Your device will probably also perform faster with less space used inside system-partition. Our kernel dev Phil also made it possible now to backup/restore preload-partition within nandroid on his newer CWM-recoveries --> so now you can do a full backup/restore including this preload-partition....before it was not possible!
How to symlink system-apps to preload-partition:
just take the app 'Notepad++' (google for it) on your PC/Laptop, open it, create a new file and put the following inside ('nameofapp.apk' is just an example for any app you wanna symlink):
Link: /preload/symlink/system/app/nameofapp.apk
Click to expand...
Click to collapse
save and close as 'nameofapp.apk' --> this is the one to put inside /system/app to symlink to the original one you put inside /preload/symlink/system/app.
Now do this steps with every system app you wanna symlink...
This is the manual way to this, though I know scripts can be used to do these steps automatically... But this way you at least get a basic understanding how it works!
I won't tell you how to push apps to preload-partition inside CWM-flashable ROM in general, cause this is basic knowledge when you wanna cook a ROM - but you could download any ROM already using this method and look inside 'META-INF\com\google\android\updater-script' and you will know how to do this.
Thanks for the guide mate. I'm sure this will help a lot of us out
In dsixda's Kitchen the symlinks are automatically generated with a few lines of code in updater-script.
I'll will try to extract them when continuing to work with my Rom/Tutorial, so non-kitchen-builders can user it in their updater-scripts.
Have to say: it's very nice that you share your knowledge and experience with us, eybee. Thanks for that.
Thanks for the knowledge.
You're the man..
Sent from my GT-N7000 using Tapatalk 2
Hey eybee. Nice guide.
One question. I'm using dsixda kitchen to build a rom but the zipaligning falls over when it reaches the nameofapk.apk text file. Anyway round this?
Sent from my GT-N7000 using xda premium
maskerwsk said:
Hey eybee. Nice guide.
One question. I'm using dsixda kitchen to build a rom but the zipaligning falls over when it reaches the nameofapk.apk text file. Anyway round this?
Sent from my GT-N7000 using xda premium
Click to expand...
Click to collapse
What do you mean by "nameofapk.apk"?
Maps.apk? (Then I know what you mean).
eybee won't give explanations for that because he doesn't use the kitchen.
ThaiDai said:
What do you mean by "nameofapk.apk"?
Maps.apk? (Then I know what you mean).
eybee won't give explanations for that because he doesn't use the kitchen.
Click to expand...
Click to collapse
yeah for example i moved MusicPlayer.apk to preload and created notepad++ file for MusicPlayer.apk which i put in system/app.
but when zipaligning apks in kitchen, when it reached the system/app/MusicPlayer.apk it fails
maskerwsk said:
yeah for example i moved MusicPlayer.apk to preload and created notepad++ file for MusicPlayer.apk which i put in system/app.
but when zipaligning apks in kitchen, when it reached the system/app/MusicPlayer.apk it fails
Click to expand...
Click to collapse
of course i fails...you can not zipalign a symlink
just zipalign before, when all apps are still in /system/app and move to /preload afterwards
eybee1970 said:
of course i fails...you can not zipalign a symlink
just zipalign before, when all apps are still in /system/app and move to /preload afterwards
Click to expand...
Click to collapse
The problem is explained in the kitchen itself. You get a warning to move all apps first before de-odexing.
But I didn't get any mistake like this when zipaligning - I think the related script checks if there are symlinks. I move the apps before the de-odexing step in the Advanced options but not when zipaligning. So maybe he has some other problems.
ThaiDai said:
The problem is explained in the kitchen itself. You get a warning to move all apps first before de-odexing.
But I didn't get any mistake like this when zipaligning - I think the related script checks if there are symlinks. I move the apps before the de-odexing step in the Advanced options but not when zipaligning. So maybe he has some other problems.
Click to expand...
Click to collapse
As explained: he is trying to zopalign the symlink in /system/app which of course fails (it is just a link named .apk!)...the original app he already moved to preload
eybee1970 said:
of course i fails...you can not zipalign a symlink
just zipalign before, when all apps are still in /system/app and move to /preload afterwards
Click to expand...
Click to collapse
Awesome. Thats what I was after
Sent from my GT-N7000 using xda premium
This is excellent! We can now take control of an extra 500mb that Samsung thought we would never have access to
Sent from my GT-N7000 using xda app-developers app
shoey63 said:
This is excellent! We can now take control of an extra 500mb that Samsung thought we would never have access to
Sent from my GT-N7000 using xda app-developers app
Click to expand...
Click to collapse
this partition is well known since Galaxy S2 (paulobrien was talking about it back in Aug 2011)....but was not really needed til now
eybee1970 said:
As explained: he is trying to zopalign the symlink in /system/app which of course fails (it is just a link named .apk!)...the original app he already moved to preload
Click to expand...
Click to collapse
Using a simple more powerfull line in update script
Code:
symlink("/preload/symlink/system/app", "/system/app");
this symlinks the whole folder to system/app so all that is in preload is also visible and active in a linked system/app folder.
This removes the whole functionality of the /system/app folder though but you have a very fast and clean system saves a lot of typing/ copypasting though
Robbie Hood said:
Using a simple more powerfull line in update script
Code:
symlink("/preload/symlink/system/app", "/system/app");
this symlinks the whole folder to system/app so all that is in preload is also visible and active in a linked system/app folder.
This removes the whole functionality of the /system/app folder though but you have a very fast and clean system
Click to expand...
Click to collapse
yes, I saw in your script already
eybee1970 said:
yes, I saw in your script already
Click to expand...
Click to collapse
Always finding ways to improve :highfive:
So there is NO /system/app folder in my rom
@RobbieHood. How would you do in user space? Using linux commands in terminal for example?
Sent from my GT-N7000 using xda app-developers app
Robbie Hood said:
Always finding ways to improve :highfive:
So there is NO /system/app folder in my rom
Click to expand...
Click to collapse
for all: but there will be one after installation, but just containing symlinks...
eybee1970 said:
for all: but there will be one after installation, but just containing symlinks...
Click to expand...
Click to collapse
well not exactly
The folder is linked so when you open it via /system/app or any browser you are virtually in /preload/symlink/system/app with the real apks
its somewhat the same principle as the sdcard on galaxy s3 which is linked to /data/media and does not have its own partition
Robbie Hood said:
well not exactly
The folder is linked so when you open it via /system/app or any browser you are virtually in /preload/symlink/system/app with the real apks
its somewhat the same principle as the sdcard on galaxy s3 which is linked to /data/media and does not have its own partition
Click to expand...
Click to collapse
Ok...this is the correct way to say it
Just did not want anybody coming in here then and say "hey, when i open with Root Explorer i still can see /system/app and all apps inside..."

Categories

Resources