SwitchRom.sh Question Help - G1 Q&A, Help & Troubleshooting

Ok
i posted a question in the switchrom thread, but no one help
so my question is:
If i have Cyanogens ROM currently tagged using the script whatever
I want to install a new build(Elitev0.5 DrizzyHero)
But my question is
In order to install hero with no hicups, your supposed to wipe,wipe ext2/3,reboot recovery,then wipe again, then check filesystems, then flash.
But my question is with Switchrom.sh script
Do i need to just wipe with alt+w
then flash
or do i need to do something els, like...
Wipe(alt+w)
then erase the app folder/dalvik chache
then reboot recovery, then wipe again
then check filesystems (wouldn't that corrupt the script???)
then flash
then to return back to cyan
use the same method??

jf4888 said:
Ok
i posted a question in the switchrom thread, but no one help
so my question is:
If i have Cyanogens ROM currently tagged using the script whatever
I want to install a new build(Elitev0.5 DrizzyHero)
But my question is
In order to install hero with no hicups, your supposed to wipe,wipe ext2/3,reboot recovery,then wipe again, then check filesystems, then flash.
But my question is with Switchrom.sh script
Do i need to just wipe with alt+w
then flash
or do i need to do something els, like...
Wipe(alt+w)
then erase the app folder/dalvik chache
then reboot recovery, then wipe again
then check filesystems (wouldn't that corrupt the script???)
then flash
then to return back to cyan
use the same method??
Click to expand...
Click to collapse
I had to read your question about 4 times to understand what you're asking and I'm still not too clear.
I don't even know how many questions your asking. Perhaps it just the layout of your post.
Anyway. I'll give it a try because I often use the script to bounce between CM ROMs and Hero ROMs. If your currently using a stable NON-Hero build then store your build by performing a nadroid backup and then use the console:
# mount system/sd
# sh system/sd/switchrom.sh -s ROMNAME
And if your going to install a new rom like Hero it's recommended to first wipe everything on your ext partition like it was freshly formated. Wipe in Recovery then flash your Hero build (make sure you meet all the requirements first). Depending on your Hero build you may need to push the app_s folder onto your ext partition. Other builds do it for you (such as the one I'm using. Ref to my signature.) Once you have that all set up and you want to store it reboot back into Recovery and go back into console again:
# mount system/sd
# sh system/sd/switchrom.sh -s HEROROMNAME
This will backup the necessary files for your Hero rom. It is now okay to simply enter:
# sh system/sd/switchrom.sh -r ROMNAME to restore your original Non-Hero rom. You do not need to remove any folders (such as app_s) because the script does this for you.
To return to your Hero ROM it is the same way:
# mount system/sd
# sh system/sd/switchrom.sh -r HEROROMNAME
Once you have to two ROMs set it and properly stored then you should easily be able to switch between the two.
Advice:
Before you use the script ALWAYS make sure that you have significant battery remaining. Failure to do so (based on my experience) may cause your apps to be restored but not your Nandroid Recovery which may result in issues.
Always remember to do a Nandroid backup BEFORE running the script as it is necessary for the script to work properly. Otherwise you may find your recent saved rom may possibly become a crossbreed of apps with a different ROM.
Remember to delete your old Nandroid files. Since they are copied over to the SwitchROM directory, they are not necessary (except for the most recent one).
I personally do not always do a filesystem check but it is recommended.

Binary100100 said:
I had to read your question about 4 times to understand what you're asking and I'm still not too clear.
I don't even know how many questions your asking. Perhaps it just the layout of your post.
Anyway. I'll give it a try because I often use the script to bounce between CM ROMs and Hero ROMs. If your currently using a stable NON-Hero build then store your build by performing a nadroid backup and then use the console:
# mount system/sd
# sh system/sd/switchrom.sh -s ROMNAME
And if your going to install a new rom like Hero it's recommended to first wipe everything on your ext partition like it was freshly formated. Wipe in Recovery then flash your Hero build (make sure you meet all the requirements first). Depending on your Hero build you may need to push the app_s folder onto your ext partition. Other builds do it for you (such as the one I'm using. Ref to my signature.) Once you have that all set up and you want to store it reboot back into Recovery and go back into console again:
# mount system/sd
# sh system/sd/switchrom.sh -s HEROROMNAME
This will backup the necessary files for your Hero rom. It is now okay to simply enter:
# sh system/sd/switchrom.sh -r ROMNAME to restore your original Non-Hero rom. You do not need to remove any folders (such as app_s) because the script does this for you.
To return to your Hero ROM it is the same way:
# mount system/sd
# sh system/sd/switchrom.sh -r HEROROMNAME
Once you have to two ROMs set it and properly stored then you should easily be able to switch between the two.
Advice:
Before you use the script ALWAYS make sure that you have significant battery remaining. Failure to do so (based on my experience) may cause your apps to be restored but not your Nandroid Recovery which may result in issues.
Always remember to do a Nandroid backup BEFORE running the script as it is necessary for the script to work properly. Otherwise you may find your recent saved rom may possibly become a crossbreed of apps with a different ROM.
Remember to delete your old Nandroid files. Since they are copied over to the SwitchROM directory, they are not necessary (except for the most recent one).
I personally do not always do a filesystem check but it is recommended.
Click to expand...
Click to collapse
i was kind of curious about this as well. thank you for the detailed guide. will try this out soon
also just out of curiosity, how is the 69mb swap size treating you on hero? also what about when you go back to cyanogen's rom?

david1171 said:
i was kind of curious about this as well. thank you for the detailed guide. will try this out soon
also just out of curiosity, how is the 69mb swap size treating you on hero? also what about when you go back to cyanogen's rom?
Click to expand...
Click to collapse
I love the 69mb swap. Much better then 32mb.
I don't see any difference using the 69mb on Cyanogen Roms then when I was using the 32mb. The most I ever had my phone on since the adjustments was 34 hours and for some reason I was getting a few FC/Waits and I decided that it was about time for a reboot. I was going to try it with Hero but then Cyanogen 4.1 came out and I only made it to about 12 hours or so.

Related

Switchrom script request to automate the save process

I wanted to post this in the DEV or APP forum, but I figured I'd ask here to be safe because I wasn't sure.
I notice that some apps, such as the Cyanogen updater can reboot the phone and flash an update (because of a script during startup?). I started thinking and was wondering if there was a way to run a script (while the phone is booted and up) that could do this:
1. Asks for a name, (or autopopulates based on build)
2. Reboot recovery
3. Runs switchrom -s {name from step 1}
4. Reboot recovery or just recovery
5. End so I can wipe and flash or whatever.
I'm using Aman-RA's recovery (RA-dream-v1.2.2) which has switchrom built in, so mounting and all that won't be an issue.
There are a lot of possibilities for expanding on this in my head, but I'm just looking for this in particular for now. Once I get the syntax, I may be able to modify it enough to get dangerous. I'm not sure of the limitations, but I see a lot of use coming out of this. Eventually even bart could be integrated? There's talk of that in Aman-RA's thread. Any help would be appreciated. TIA
have you either pm'ed devsk or asked in the switchrom thread to see if it is possible. this is a great idea and i would like to see it implemented
Good idea! Doing that now

[Guide] CM6 Installation with a2sd and swap

I was trying to upgrade to CM6 from CM5 and was facing lot of issues so I followed below process and got it worked. I thought of sharing it with everybody as lot of person are having issues.
I know most of the information is available on XDA but not on a single place.
I have made a separate thread because A2sd and SWAP are not supported by CM6 officially.
This is not an official method of installing CM6, this is how I got it worked and you can use it for reference.
1) Preperation: You need to get the below mention files, Please get these files from below mentioned thread:
a) CM6 and Gaaps
b) CustomMTD Patch - You only need FR-recovery and FR-boot latest version.
c) Script for a2sd and swap - get the latest script.
d) Fastboot - Fastboot should be setup and working, If you are on Linux go here
e) SD Card Partition - If you are not sure how to partition the sd card. If you want to use a2sd and swap, please partition your sd-card.​Store all files on root of sd-card.
2) Connect the phone to PC, do not mount the phone.
3) Wipe the phone:
a) Boot into recovery(reboot while holding home and power). Wipe everything.
b) Boot in fastboot mode. (reboot while holding back and power)
Enter the command in terminal or command prompt on the PC
fastboot erase system -w​ c) reboot into recovery.​
4) Install the custom MTD. (If you already have custom MTD then this step is not required.)
a) Flash customMTD fr-recovery file.
b) Reboot into recovery.​
5) Install CM6 Gapps and boot loader.
a) Flash CM6
b) Flash Gapps
c) Flash Boot Loader fr-boot file
d) reboot phone​
6) Once phone is booted and you are on the home screen, go to
CyanogenMod Settings > Application Settings > Install location - Set Install location as Internal, make sure allow application moving is not checked.
CyanogenMod Settings > Performance Settings - make sure that Compcache, JIT, dithering is not checked. If something is checked please uncheck it.
Lock home in memory can be checked, but some guys has reported that it drains a lot of battery.
Reboot the phone.
7) Go to terminal type below code
su
sh /sdcard/fr-patch140.txt a2sd​
It will ask if you want to install a2sd, type Y and press enter. Once APKManager is installed, type quit to exit.
Reboot the phone.
8) If you are not using a2sd and want to setup swap, please enter the below command in the terminal otherwise continue to step 9.
su
sh /sdcard/fr-patch140.txt sdext​
reboot the phone.
9) Go to terminal type below code
su
sh /sdcard/fr-patch140.txt swap​
It will ask for swappiness, I use 60 there, but its your own preference. After that it will ask you if you want to use swap-file, press n and enter.
After this enter below to terminal
Free​If you get swap setup it will show in front of swap in terminal, if the result show zero swap then reboot and do the step 9 again.
Now you have a CM6 with apps2sd and swap. All the newly installed apps will automatically go to ext.
If you don't like 3d gallery and want it to replace it with old gallery..This has been provided by ZilverZurfarn on CM6 thread.
Extract Gallery.apk from a older CM update (like 5.0.8) somewhere (c:\temp in the example below)
Using adb:
adb remount
adb shell rm /system/app/Gallery3D.apk
adb push c:\temp\Gallery.apk /system/app/Gallery.apk​
Also there are some apps which I don't prefer, as I don't use android native keyboard, Android browser, POP email, amazon MP3 etc. So I have created a script for my use which has been shared and it can be run from the terminal..
download remove-app-v1.0.txt and store it to root of your sd card. than enter below commands in terminal
su
sh /sdcard/remove-app-v1.0.txt​
currently this script will remove below mention apps based on user input.
Amazon MP3, Live Wallpaper picker, CM Wallpapers, POP Email, Android Native Browser, Android Native Onscreen Keyboard, Genie Widget...
Note: - Before removing browser and keyboard please make sure you have a replacement for them.
I do not take any credit for work, its just a reference for installing CM6. Thanks to Cyanogen and team, Firerat, Lbcoder for producing these amazing roms and methods.....
Please provide your feedback and suggestion for the guide.
If you like my guide and want to Donate
Can I have swap without app2sd?
I skipped the app2sd part, but the swap wouldn't work.
it didn't ask me about the swap file.
It ended with:
use
/system/bin/swappy on # to turn swap on
supa2001 said:
Can I have swap without app2sd?
I skipped the app2sd part, but the swap wouldn't work.
it didn't ask me about the swap file.
It ended with:
use
/system/bin/swappy on # to turn swap on
Click to expand...
Click to collapse
Yes, swap can be there without A2sd..
Do you have Fr-Patch139.txt script or any other version...could you please reboot and so the step 8 again
I did it many times
Do I need to create some files like userinit ?
Thanks for replying.
supa2001 said:
I did it many times
Do I need to create some files like userinit ?
Thanks for replying.
Click to expand...
Click to collapse
Try below command:
sh /sdcard/fr-patch139.txt sdext​
reboot the phone
sh /sdcard/fr-patch139.txt swap​
If this doesn't work, could you please pass on the message you are getting from the script.
G1sanju said:
Try below command:
sh /sdcard/fr-patch139.txt sdext​
reboot the phone
sh /sdcard/fr-patch139.txt swap​
If this doesn't work, could you please pass on the message you are getting from the script.
Click to expand...
Click to collapse
It works now. Thanks.
What does sdext do ?
When I ran sdext, it said "danger detected" though, is it still safe?
Same thing appeared when I did swap.
G1sanju said:
I was trying to upgrade to CM6 from CM5 and was facing lot of issues so I followed below process and got it worked. I thought of sharing it with everybody as lot of person are having issues.
I know most of the information is available on XDA but not on a single place.
I have made a separate thread because A2sd and SWAP are not supported by CM6 officially.
This is not an official method of installing CM6, this is how I got it worked and you can use it for reference.
1) Preperation: You need to get the below mention files, Please get these files from below mentioned thread:
a) CM6 and Gaaps
b) CustomMTD Patch - You only need FR-recovery and FR-boot latest version.
c) Script for a2sd and swap - get the latest script.
d) Fastboot - Fastboot should be setup and working, If you are on Linux go here
d) SD Card Partition - If you are not sure how to partition the sd card. If you want to use a2sd and swap, please partition your sd-card.​Store all files on root of sd-card.
2) Connect the phone to PC, do not mount the phone.
3) Wipe the phone:
a) Boot into recovery(reboot while holding home and power). Wipe everything.
b) Boot in fastboot mode. (reboot while holding back and power)
Enter the command in terminal or command prompt on the PC
fastboot erase system -w​ c) reboot into recovery.​
4) Install the custom MTD. (If you already have custom MTD then this step is not required.)
a) Flash customMTD fr-recovery file.
b) Reboot into recovery.​
5) Install CM6 Gapps and boot loader.
a) Flash CM6
b) Flash Gapps
c) Flash Boot Loader fr-boot file
d) reboot phone​
6) Once phone is booted and you are on the home screen, go to
CyanogenMod Settings > Application Settings > Install location - Set Install location as Internal, make sure allow application moving is not checked.
CyanogenMod Settings > Performance Settings - make sure that Compcache, JIT, dithering is not checked. If something is checked please uncheck it.
Lock home in memory can be checked, but some guys has reported that it drains a lot of battery.
Reboot the phone.
7) Go to terminal type below code
su
sh /sdcard/fr-patch139.txt a2sd​
It will ask if you want to install a2sd, type Y and press enter. Once APKManager is installed, type quit to exit.
Reboot the phone.
8) Go to terminal type below code
su
sh /sdcard/fr-patch139.txt swap​
It will ask for swappiness, I use 60 there, but its your own preference. After that it will ask you if you want to use swap-file, press n and enter.
After this enter below to terminal
Free​If you get swap setup it will show in front of swap in terminal, if the result show zero swap then reboot and do the step 8 again.
Now you have a CM6 with apps2sd and swap. All the newly installed apps will automatically go to ext.
If you don't like 3d gallery and want it to replace it with old gallery..This has been provided by ZilverZurfarn on CM6 thread.
Extract Gallery.apk from a older CM update (like 5.0.8) somewhere (c:\temp in the example below)
Using adb:
adb remount
adb shell rm /system/app/Gallery3D.apk
adb push c:\temp\Gallery.apk /system/app/Gallery.apk​I do not take any credit for work, its just a reference for installing CM6. Thanks to Cyanogen and team, Firerat for producing these amazing roms and methods.....
Please provide your feedback and suggestion for the guide.
Click to expand...
Click to collapse
Thanks mate this will really help me to put my apps on SDcard..as past days m really trying to get my phone memory safe...
supa2001 said:
It works now. Thanks.
What does sdext do ?
When I ran sdext, it said "danger detected" though, is it still safe?
Same thing appeared when I did swap.
Click to expand...
Click to collapse
"danger detected" message is for SPL, It checks for the SPL first and you have danger spl installed.
By default CM6 does not mount ext partition as it does not support a2sd right now. sdext creates a mount point for ext partition. a2sd internally does that but as you are not using a2sd this was not done.
vermaekansh said:
Thanks mate this will really help me to put my apps on SDcard..as past days m really trying to get my phone memory safe...
Click to expand...
Click to collapse
Thanks, If you use this guide then please provide your feedback and suggestion towards it.
Sorry, but is there a script to disable swap? I am gonna do some test to see what works best.
Thanks.
supa2001 said:
Sorry, but is there a script to disable swap? I am gonna do some test to see what works best.
Thanks.
Click to expand...
Click to collapse
In the terminal
sh /sdcard/fr-patch139.txt rev swap​
this will turn the swap off.
Watch out...newbie in the room
Okay, you are going to love this.... I'm sorry if this is too long but I hope you can help a newbie trying to learn this stuff!
I am REALLY new to all this, and did a Root and Rom Update as the Unlockr.com videos taught me, to get CM6. And then also added the gapps file because I read a thread that that was needed to get gmail and the market on my phone. Once rebooted, everything worked ok but slow. Then I noticed that my gmail wasn't syncing, and then it started to force close. So I did a wipe and loaded CM5 because I saw on a thread that that was faster for the G1. With all of this, after reading your thread and suggestion, I am wondering...
1. Is CM6 slow for you?
2. Should I have loaded gapps? IS that how to get gmail and should it sync automatically? If not, is there a way to make it?
3. Should I stick with CM5 or try CM6 following these suggestions??
And big ones.... I wish there was a website somewhere with definitions to all the terms and apps used. Lol.. I Google all of them but don't always find anything that actually describes what they are.
Swap and app2sd were mentioned on the video instructions for loading a new ROM but do they automatically come in the ROM zip files? Because in the video they didn't load them separately. They partition the card "for" them, but don't show installing them. Obviously I assume App2sd is a program to store your apps on your sd card. Is this something that I SHOULD install? Is swap something I should install?
And what is a CustomMTD Patch? Annnnnnd, what is fastboot??
I know this is a lot of questions... I decided to ask them all here because they pertain to this thread because I'm wondering if I should do this...
Thanks for any and all answers!
I would assume that you have a G1, and my answer is based on that assumption. If you have different phone let me know.
1. Is CM6 slow for you?
If I don't use a2sd and swap, answer is yes. I install lot of apps, with cutomMTD it works fine in starts but slows down after some time. With a2sd and swap it is worth a try.​
2. Should I have loaded gapps? IS that how to get gmail and should it sync automatically? If not, is there a way to make it?
CM roms does not distribute google apps with the rom as its not legal. So if you want gapps then yes that file has to be flashed. CM6 can be run without gapps, but you won't get gmail, market etc..once you have gmail it should sync automatically.​
3. Should I stick with CM5 or try CM6 following these suggestions??
CM5 is quite stable rom and runs fine. Choice is yours...CM6 is in initial stages, but is good too...I go with CM5 for my daily driver as a2sd is not officially supported. It will be there in CM6.1....​
And what is a CustomMTD Patch? Annnnnnd, what is fastboot??
G1 was build with a low memory and the way internal memory has been partition todays rom can't fit into it. That's why dangerSPL, but there is a risk involved in installing dangerSPL. If you don't follow the instruction you can brick your phone. CustomMTD is a safe method. This increase the size of data partition so you can install more apps internally. link for that thread is in first post.​
a2sd is a way to store apps on sdcard, sdcard needs to be partitioned to support that..step 1 - e in my guide. That's a manual way of doing it. If you have AmanRA recovery then it will have a menu option for that. Most of the rom supports it automatically, so if you have sd card partition then rom will automatically do that.
CM6 does not support a2sd so it has to done in different way. CM5 supports it but in settings - application - a2sd has to be checked on to move your apps to sdcard.​
Swap is kind of extra memory to help running the applications. if you run multiple application together then you need swap on CM5 and CM6.​
G1sanju said:
CM5 is quite stable rom and runs fine. Choice is yours...CM6 is in initial stages, but is good too...I go with CM5 for my daily driver as a2sd is not officially supported. It will be there in CM6.1....​
Click to expand...
Click to collapse
So when CM6.1 is comming out for G1..do you have nay idea about HCTCLAY's ROM over CM6
vermaekansh said:
So when CM6.1 is comming out for G1..do you have nay idea about HCTCLAY's ROM over CM6
Click to expand...
Click to collapse
Nope I don't follow htcclay but it is based on CM so should be updated
Sent from my HTC Dream using XDA App
G1sanju said:
Nope I don't follow htcclay but it is based on CM so should be updated
Sent from my HTC Dream using XDA App
Click to expand...
Click to collapse
No hard feeling for CM but for me htcclay's ROM's are more stable than CM's.....any release date for CM6.1 for G1?
vermaekansh said:
No hard feeling for CM but for me htcclay's ROM's are more stable than CM's.....any release date for CM6.1 for G1?
Click to expand...
Click to collapse
Roms are personal preferences, I also tried lot of roms before settling on CM... and for CM there are no eta it will be released when it's done...
Sent from my HTC Dream using XDA App
WOW!
THANK YOU!!! You are awesome for going through all of those!
Yes, it is a G1.
Are there any features in CM6 that aren't in CM5, or is it faster than CM5 with the ap2sd & swap?
I believe I partitioned the sd card when I loaded the CM6 ROM.
So I'd like to try the CM6 with the ap2sd, swap and the CustomMTD. I do have the AmanRA recovery, but not sure about how to select the ap2sd.
Any chance you would tell me how to get the ap2sd, swap and CustomMTD on the phone if I have already Flashed CM6 on there?
Thanks again, regardless. The info you gave me helped me learn a little more. I'm still a bit confused about what fastboot is though. But I will just keep at it and keep learning!
Are there any features in CM6 that aren't in CM5, or is it faster than CM5 with the ap2sd & swap?
CM6 is based on froyo, latest version of android...its good and yes speed is comparable. Also CM has added new stuff in it, like fully customizable power bar and other stuff...Full changelog is there in CM6 thread.​
I believe I partitioned the sd card when I loaded the CM6 ROM.
So I'd like to try the CM6 with the ap2sd, swap and the CustomMTD. I do have the AmanRA recovery, but not sure about how to select the ap2sd.
For CM6 a2sd is through script, instruction is in first post. I have included customMTD also there. So if you follow the guide, you will be having customMTD, a2sd and swap...swap require an partition on your sdcard, if you don't have that partition then it will ask for swap file.​
Any chance you would tell me how to get the ap2sd, swap and CustomMTD on the phone if I have already Flashed CM6 on there?
you can wipe and start over again, first post should be good for you.​
Thanks again, regardless. The info you gave me helped me learn a little more. I'm still a bit confused about what fastboot is though. But I will just keep at it and keep learning!
Oh I forgot about the fastboot, fastboot and adb are tool, which give an option to control, flash and do other thing on the phone from PC. The link for setup guide is in first post.​
Thanks again!!
Man! You are great! Thanks again for all your help! Now let's see if I can manage to follow your thread and not brick my phone! Lol
Until next time....

[SCRIPTS][GUIDE] Resizing Tattoo partitions - damn simple

Hello Friends,
If you want to re-size you tattoo to have more space for system and data partitions
Here is simple how to do.
No chance of bricking your phone, and it doesn't involve SPL
It works for installed ROM as well as new installations
It was done using the the scripts and information from following thread
http://forum.xda-developers.com/showthread.php?t=717874
Installation instructions:
download FR-recovery-v1.5.3-CustomMTD_S.zip and FR-boot-v1.5.3-CustomMTD_S.zip
reboot to recovery
and use following commands to specify partition size
Explanation of commands used below : after the mtd command first number is system size and the next is cache and remaining will be data partition
choose your cache partition size based on the fact, whether it uses for dalvik-cache or not.
If it used for dalvik-cache do not go less than 80mb (roughly) other wise 20 mb is fine.
Code:
adb shell
mount /sdcard
echo "mtd 200 20" > /sdcard/mtdpartmap.txt
backup your rom
wipe cache + data
If you are 'growing' system, make sure cache and data are clean
if your 'shrinking' system make sure system is clean
To wipe system you need clockworkmod-recovery​
flash FR-recovery-v1.5.3-CustomMTD_S.zip
repeat wipe cache + data
reboot to recovery
At this point if you can either restore your existing installation
OR Flash fresh ROM and other extras
Finally flash FR-boot-v1.5.3-CustomMTD_S.zip
reboot
You could see re-partitioned tattoo with more space for system and data
Here are my Tattoo partition sizes before
Code:
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 95188 0 95188 0% /dev
/dev/block/mtdblock3 [B][COLOR="Red"]153600[/COLOR][/B] 137452 16148 89% /system
/dev/block/mtdblock4 [B][COLOR="Red"]153600[/COLOR][/B] 1172 152428 1% /cache
/dev/block/mtdblock5 [B][COLOR="Red"]169088[/COLOR][/B] 56596 112492 33% /data
and after following above instructions
Code:
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 95188 0 95188 0% /dev
/dev/block/mtdblock3 [B][COLOR="Red"]204800[/COLOR][/B] 118140 86660 58% /system
/dev/block/mtdblock4 [B][COLOR="Red"]20480[/COLOR][/B] 1164 19316 6% /cache
/dev/block/mtdblock5 [B][COLOR="Red"]251648[/COLOR][/B] 123200 128448 49% /data
It is recommended to use clockworkmod-recovery, although i could use AmornRA recovery (for a fresh install of ROM)
HELP TIPS or POINTS
You don't need to flash both of the files each time you install a new ROM.
You only need to flash the recovery patch once, unless you want to re-size or you installed a new recovery.
The boot patch *must* be flashed after you have installed a new ROM or kernel (boot.img) or for every restoring of backup.
If you are 'growing' system, make sure cache and data are clean
if your 'shrinking' system make sure system is clean
In order to wipe system, data, cache partitions
flash clockworkmod-recovery, and from recovery the recovery menu
go to "mounts and storage" option and wipe required partitions
If you want to restore original MTD, flash original recovery to wipe custom MTD
Here is the information for Developers to include this in their ROMs
ROM Zip Patcher for Devs
To make life even simpler for end users it is possible to integrate the 'patch' within a ROM
AutoMTD_partitionPatcher_v1.5.3.zip
currently Linux only,
within the zip is a tarball, untar that.
get that directory into your PATH, ( or just cd into it )
and then execute
Code:
PatchUpdateScript.sh <zip file to patch>
it will then
create a temp directory ( in your current directory )
copy your zip to it
extract required files
patch update(r)-script
zip and sign.
It simply saves the user from flashing the boot patch after flashing your ROM
Click to expand...
Click to collapse
Hope that is useful
All credit goes to Firerat (Custom MTD Partitions)
i have tested this now!
And it works great...
Although my linux machine did not have the java packs installed to patch the boot.img, i simply made nandroid backup and put img into zip afterwards.
Thanks for guide
Dexter_nlb said:
i have tested this now!
And it works great...
Although my linux machine did not have the java packs installed to patch the boot.img, i simply made nandroid backup and put img into zip afterwards.
Thanks for guide
Click to expand...
Click to collapse
Good that you could use it
I didn't have time to look in to ROM patching script, But how do you mention the partition sizes with this script?
Please let me know.
Cheers
rallapag said:
I didn't have time to look in to ROM patching script, But how do you mention the partition sizes with this script?
Click to expand...
Click to collapse
i initially used the txt file on /sdcard to configure the recovery, then when rom was installed patched it. then a nandroid backup and copied rom to my update.zip and reinstalled rom normally, with patch included..
this solution is of course for one size of mtd's, but it was even easier..
Sorry for my misunderstanding I just went through the autoMTD script and realized what you said earlier.
Auto MTD script patches boot.img, so for patched ROM's as well you need flash FR-recovery with mtdpartmap.txt in user sd card defining partition sizes.
Cheers

MIUI_CM7 v2 and GApps Ported to SD Card, 03 Jul 2012

MIUI: http://www.mediafire.com/?oqvzpc61x3s5w44
GApps: http://www.mediafire.com/?1c2br6sw6330lwn
These flashable zips and corresponding procedure are intended for intermediate to advanced users, i.e. those who have 1) unlocked their Atrix, 2) partitioned their SD card for dual boot, and 3) have a working knowledge of ClockWorkMod (CWM) Recovery and how to install and configure dual boot. If you are not in this category or would simply like a refresher, you can review some of my other threads on this topic, namely:
Dual Boot threads:
http://forum.xda-developers.com/showthread.php?t=1651356
http://forum.xda-developers.com/showthread.php?t=1642185
http://forum.xda-developers.com/showthread.php?t=1645344
Please understand this MIUI port is not a “dual boot flashable zip” (DBFZ); rather it is a single boot flashable zip of MIUI ported to SD card. However it should preserve your existing primary ROM (ROM1) along with /cache and /data, and thus is actually more versatile than DBFZ which gives you two ROMs that you may not even want.
I strongly recommend that after flashing MIUI, you first reboot to MIUI before flashing GApps.
To reboot to ROM1 after installing MIUI, you could fastboot flash a ROM1 boot image (easiest and fastest way), or configure dual boot as described here ( http://forum.xda-developers.com/showthread.php?t=1645344 ) . I have often found it convenient to simply extract the /Boot directory of an existing DBFZ and customize from there by inserting the boot images of my choice.
If you presently have dual boot and need to wipe the /cache and /data partitions of your second ROM (ROM2) before installing MIUI, then CWM-flash these zips:
Wipe /cache: http://www.mediafire.com/?mc881zjhl9oqr0q
Wipe /data: http://www.mediafire.com/?4k4fey6gxe1nbn0
Now you may be wondering... How do I backup an existing ROM2 since stock recovery tools cannot backup an SD card-based ROM? Here is one way:
Boot phone to CWM 5.0.2.0, connect it to ADB-enabled computer and enter:
Code:
adb devices (make sure device is listed)
adb shell (should get # sign, indicating “root” on Android)
umount /cache (since internal memory /cache is mounted by default)
mount /sdcard
mkdir /sdcard/ROM2-backup
cat /dev/block/mmcblk1p2 /sdcard/ROM2-backup/system.img
cat /dev/block/mmcblk1p3 /sdcard/ROM2-backup/cache.img
cat /dev/block/mmcblk1p4 /sdcard/ROM2-backup/data.img
Standard disclaimers apply. In short, I am not responsible for any harm you or your phone may incur by using any or all of this material.
Many thanks to stevendeb25 (MIUI ported to Atrix), www.angeeks.com (GApps), the CM/Photon/Atrix/Android dev teams and to Koush (CWM Recovery).
yeah....downloading...
tks mate,tks very much,u make my wish come true and every one here who love miui,is there any way i can help u 'cause i dont have visa to donate for u
Sent from my MB860 using Tapatalk 2
mafiarock93 said:
tks mate,tks very much,u make my wish come true and every one here who love miui,is there any way i can help u 'cause i dont have visa to donate for u
Sent from my MB860 using Tapatalk 2
Click to expand...
Click to collapse
Thank you... I am so glad to know that you and your friends can benefit in some way from this little project.
If you have PayPal, you can click the "Donate to me" button, and it takes you to my PayPal donation site. I would probably use the funds to buy a faster SD for experimentation.
Take care.

Tip for dirty flashers.(special AOKP from CM)

hey guys. i dirty flashed aokp from cm and got into bootloop ( :/) i couldnt wipe data because i really needed my apps and didnt have a fast internet atm. so i went to recovery, pluged the phone on my pc.on the pc i opened a cmd prompt and typed adb shell.
once on the shell i typed cd data/da*
then i was on /data/dalvik-cache directory.
i typed ls and it showed some dex files.
all of them were [email protected]@package.dex
except for one ([email protected]@com.android.settings-provider.dex
then i typed cd ..
(so it gone to data)
then typed cd data (so it gone to /data/data)
typed
rm com.android.provider.settings/*
rm com.android.provider.settings/*/*
rm com.android.provider.settings/*/*.*
rmdir com.android.provider.settings/*
rmdir com.android.provider.settings
then i restarted the phone(no cleaning cache or dalvik)
and boom it started pretty quickly to the optimizing apps screen(i hav e 233 installed right now).
once all was working i just flashed aokp gapps and boom. no bugs and fast so far.
hope this helps not only on aokp but on any other room.
Shorter:
Code:
adb shell
$ su
# rm -rf /data/data/com.android.providers.settings/
# reboot
tvall said:
Shorter:
Code:
adb shell
$ su
# rm -rf /data/data/com.android.providers.settings/
# reboot
Click to expand...
Click to collapse
well that saved me from a TL;DR situation
I'll try this whenever I'm stuck when i drunk flash.
Sent from my Nexus 4
opssemnik said:
hey guys. i dirty flashed aokp from cm and got into bootloop ( :/) i couldnt wipe data because i really needed my apps and didnt have a fast internet atm. so i went to recovery, pluged the phone on my pc.on the pc i opened a cmd prompt and typed adb shell.
once on the shell i typed cd data/da*
then i was on /data/dalvik-cache directory.
i typed ls and it showed some dex files.
all of them were [email protected]@package.dex
except for one ([email protected]@com.android.settings-provider.dex
then i typed cd ..
(so it gone to data)
then typed cd data (so it gone to /data/data)
typed
rm com.android.provider.settings/*
rm com.android.provider.settings/*/*
rm com.android.provider.settings/*/*.*
rmdir com.android.provider.settings/*
rmdir com.android.provider.settings
then i restarted the phone(no cleaning cache or dalvik)
and boom it started pretty quickly to the optimizing apps screen(i hav e 233 installed right now).
once all was working i just flashed aokp gapps and boom. no bugs and fast so far.
hope this helps not only on aokp bu
t on any other room.
Click to expand...
Click to collapse
you can always get a nandroid backup of the rom and after changing the rom, just restore app+data from titanium backup.. simple as that
misal6666 said:
you can always get a nandroid backup of the rom and after changing the rom, just restore app+data from titanium backup.. simple as that
Click to expand...
Click to collapse
it will lead to a bootloop because its the same as just dirty flashing... the data of the app that conflicts will be restaured and will bootloop....
and if u like me who have <2gb avalaible nandroids arent an option...
opssemnik said:
it will lead to a bootloop because its the same as just dirty flashing... the data of the app that conflicts will be restaured and will bootloop....
and if u like me who have <2gb avalaible nandroids arent an option...
Click to expand...
Click to collapse
I have flashed around 300-400 roms and haven't caused bootloop a single time by restoring apps..
And my backups are 1.2 gigs tops..
You're gonna keep One nandroid anyway for emergency restore so storage is not issue
opssemnik said:
it will lead to a bootloop because its the same as just dirty flashing... the data of the app that conflicts will be restaured and will bootloop....
and if u like me who have <2gb avalaible nandroids arent an option...
Click to expand...
Click to collapse
Don't dirty flash the data partition in recovery. Use TiBu to just extract and restore the apps and app data from the nandroid.
hp420 said:
Don't dirty flash the data partition in recovery. Use TiBu to just extract and restore the apps and app data from the nandroid.
Click to expand...
Click to collapse
diferences?will do the same thing anyway. i want all apps to have the same config. not just downloaded ones
misal6666 said:
I have flashed around 300-400 roms and haven't caused bootloop a single time by restoring apps..
And my backups are 1.2 gigs tops..
You're gonna keep One nandroid anyway for emergency restore so storage is not issue
Click to expand...
Click to collapse
but i want all apps with restored data, not downloaded ones...
Well I have been restoring my backup in TB (apps+data) from even a different phone never had any bootloop. In my case, I only restore user apps though. If you restore system apps then all hell break lose..lol.
Of course that's not the case here right? Gonna try this too if my luck runs out and I'm stuck. Thanks.:thumbup:
opssemnik said:
diferences?will do the same thing anyway. i want all apps to have the same config. not just downloaded ones
Click to expand...
Click to collapse
No, it does not do the same thing. You are assuming (app data = android user data)....not true.
When you restore your data partition with recovery, you are restoring the backed up userdata.img file, with literally everything you have done since the moment your phone booted the first time after flashing a clean rom. This includes everything you've done since the first time you restored a data partition with this method, assuming you've done this repeatedly after flashing several times. Any issues you had with permissions, etc. located in the /data directory will be carried over. Also, depending on what rom you are coming from/going to, you may encounter incompatibilities between some things that this will restore. For example, if you backed up a ported sense rom and restore it after flashing official aosp, you're most likely going to get a bootloop because some things are non-existent in one rom or another, or may require different permissions.
When you restore app data only (we're not talking about call log, texts, wifi apns, etc. from the system files....those are fine to restore with TiBu) all you are restoring is the saved data for a given app. This is not like restoring your android user data, because it won't restore android settings, and other changes made to the android system from within the /data directory. It will get you probably 90% restored to how your device was before flashing, and the rest (like the system settings, etc.) is up to you to do manually. This is the best way to ensure you will have a nice solid running rom, and guarantees no issues that may have existed in your last rom won't be carried over. Even when you are just flashing a new update, you never know what incompatibilities may exist between releases when you restore the whole userdata partition.
I'll give you an example of what I mean. Let's say you are playing around in an official aosp rom with developer options and it results in a bootloop. If you back up your rom with recovery, wipe all partitions, reflash a new rom, then restore the rom data, you will get a bootloop for the exact same reason you did prior to wiping. If, instead, you have a current TiBu backup on hand, then you can full wipe with recovery, flash a new rom, then restore with TiBu. Your bootloop will be solved because it won't have restored your incorrect setting that resulted in the bootloop in the first place.

Categories

Resources