MTD Custom Partition Sizes (resize System, Cache, and Userdata) - EVO 4G Android Development

In case anyone want's to resize their System, Cache, and Userdata partitions on their EVO. This may be useful for some of the newer ROMs that require a larger system partition.
Default partition sizes for EVO are 350MB for System, 160MB for Cache, and 427.625MB for Userdata.
I did not create this. It was developed by FireRat who's account is now inactive on XDA. I started looking into it because I wanted to resize my Boot partition from 2.5M to 3M because I have bad NAND blocks in my Boot partition and can't flash ANY Sense-based Gingerbread ROM, even the leaked official one from HTC. I get the following error when debugging by flashing the boot.img using Fastboot:
FAILED (remote: image update error) ...
With all that said, it doesn't work to resize your Boot partition. I modified the source to make it resize Boot partition as well, it passes the parameters to the kernel correctly, but the system does NOT like it and gives a bunch of errors about unsupported block addresses. If you want to read more about this issue, see my post: here
How This Works
This is simple a shell script that extracts the recovery and/or boot images and modified the commandline passed to the kernel so that it recognizes different partition mappings for the NAND partitions.
Warnings
First of all, there is no brick risk if you have Fastboot access (.76 ENG HBOOT). That said, I'm not in anyway responsible if something happens and your device gets bricked. Two things could potentially go wrong:
* Recovery Flash Corrupt - This happened to me a few times when I was playing with trying to get the Boot partition to change sizes, but never when I was just attempted to resize System, Cache, and Userdata.
Easiest way to fix is to re-flash the recovery.img from Fastboot. You may also be able to re-flash the recovery via your ROM using ROMManager.
* Corrupt System, Cache, and Userdata partitions - This will happen if you don't wipe the three partitions after you do the resizing. You need everything removed from them because their start points are being remapped.
To fix this, you can use Fastboot:
Code:
fastboot erase system -w
You can also use your recovery (advanced menu) and manually wipe System, Cache, and Userdata.
I Understand What Has Been Said, Let's Get Started
1. Before you begin, you need to create a file on the root of your sdcard called mtdpartmap.txt. This file is where we set the partition sizes we want. To create this file, you can use adb shell or a terminal program on your phone. Simply type:
Code:
echo "mtd 350 160" > /sdcard/mtdpartmap.txt
Replace 350 and 160 with the sizes you want your System and Cache partitions. Your Userdata partition is automatically given the remained. For example, if I used "mtd 300 100" I would be gaining 110MB on my Userdata partition ((350-300)+(160-100) = 110). Your sizes must be divisible by .125.
2. Make a nandroid backup. After we modify the partition sizes for the recovery, you can restore it, or you can flash a whole new ROM.
3. The next step is to Flash a file in recovery. I recommend you Flash the recovery-v1.5.9-Alpha3-CustomMTD_TESTRUN.zip. This will NOT perform any changes, only make sure everything looks good. If you get no errors here, you can then proceed.
4. Wipe System, Cache, and Userdata. This is very important. You have a nandroid backup.
5. Flash recovery-v1.5.9-Alpha3-CustomMTD_R.zip, This will make the changes to your recovery.img and re-flash it to your phone. All it's doing is adding kernel commandline parameters so that the recovery knows where your System, Cache, and Userdata partitions start.
6. Reboot recovery. This is easier in CWM than RA. CWM offers a menu option for it. In RA, I normally just select the menu item to power off. Then restart the phone and hold volume down, then select Recovery from the Bootloader menu.
7. Nandroid restore or flash a new ROM.
8. Very important! Flash boot-v1.5.9-Alpha3-CustomMTD_S.zip. This does basically the same thing as in Step 5 but instead of changing the kernel commandline for recovery, it does it for your boot.img.
9. Reboot.
Important Notes
If you ever flash your recovery to a new version, or change recoveries, you must redo step #5 so that your new recovery has the partition sizes and start points passed to it.
If you ever flash a new ROM, you must perform step #8 again so that the ROMs kernel has the partition sizes and start points passed to it.
Reverting/Backing Out
1. Make a nandroid backup if you want to keep your current ROM. If not, or you will be restoring a previous nandroid backup, you can skip this step.
2. Wipe System, Cache, Userdata. This is very important.
3. Flash recovery-v1.5.9-Alpha3-CustomMTD_REMOVE.zip. This will remove the kernal commandline from the recovery and boot partitions.
4. Reboot recovery.
5. Nandroid restore or flash a new ROM.
6. If you restored a nandroid backup that had custom partitions mapped to it, you must re-flash recovery-v1.5.9-Alpha3-CustomMTD_REMOVE.zip at this point so the restored boot.img has the kernal commandline removed.
6. Reboot.
Other Thoughts
If anyone has any ideas on how to resize the Boot partition, let me know.

You know Calkulin has already posted a custom partition mod based off of Firerat's work, right??

Apparently not, or I wouldn't have wasted my whole morning writing this up.

fldash said:
Apparently not, or I wouldn't have wasted my whole morning writing this up.
Click to expand...
Click to collapse
maybe you shoulda searched first...
http://forum.xda-developers.com/showthread.php?t=855424

I did search using Google and limiting it to the XDA site but it never came up. Only FireRat's original thread and a few others, but none in the Supersonic forum. Oh well, sorry for wasting your precious time. Just ignore the thread and move on...

At least the OP has newer links.
This never really caught on with the EVO since there is a2sd in almost every ROM and the default space was enough for most... and if not 2.2. allows at least some apps to be moved.
Back on my HeroC ... it was a blessing

I didn't even know this was an option OP. So thanks for educating me and a few others at least.
Sent from my Infected EVO using XDA Premium App.

O.M.J said:
maybe you shoulda searched first...
http://forum.xda-developers.com/showthread.php?t=855424
Click to expand...
Click to collapse
Haters gonna hate. Thanks for the info. Wouldn't have known about it otherwise.

There are tons of people posting about ways to root and unroot and many of them are basically writing about the same method but in different words so why is there a problem with the OP writing about Custom Partition Sizes? I cosign with not knowing about Caulkin's post either. Is it because the OP has a small "Thanks" meter? Caulkin has extremely helpful posts and threads but other people can post helpful threads as well.

Good write up!
Thanks
~ I'm a fungi

interesting...another good subject that I never know existed.

I actually want to thank you OP because I was thinking just today to try the Virus Kingdom REVOlution and was wondering the way to do this so, THANK YOU!!!!
Sent from my Xoom using XDA Premium App

I use this because of Calk's write up. I like the idea of having more internal space. I hear it helps the rom function better but who knows. However, I found your thread because I was still searching for some answers. One thing I am noticing, is how well this works on non sense roms, but how I can't even get past the splash screen on a sense rom like synergy and merge. So, I found your thread very informative because you explain the math behind the science. I think I will go back to Calk's thread, and use some of what I learned here to see if a few tweaks in the mtdpartmap.txt makes a difference. I will report back. If you have any advice along these lines, I am all ears.
cns

Might wanna add in the nandroid not to backup recovery...some people might not know this... Thanks for the write up. Thanks button hit.
Sent from my PC36100 using xda premium

Related

lose everything every time ROM reinstalled?

I notice that a lot of people on here continually update to the latest build of Cyanogens ROM and they may reinstall their ROMS several times a day perhaps.
when these people do this do they lose everything?
im only asking because im having the most difficult time deciding which ROM to go with because i dont want to have to keep flashing a new ROM every time i find out theres a problem or issue with the ROM i have installed etc and then having to redownload all my apps again and contacts etc.
nextelbuddy said:
I notice that a lot of people on here continually update to the latest build of Cyanogens ROM and they may reinstall their ROMS several times a day perhaps.
when these people do this do they lose everything?
im only asking because im having the most difficult time deciding which ROM to go with because i dont want to have to keep flashing a new ROM every time i find out theres a problem or issue with the ROM i have installed etc and then having to redownload all my apps again and contacts etc.
Click to expand...
Click to collapse
When you upgrade within a ROM type (ie. CyanogenMod 3.9.8 -> 3.9.9.1) you dont need to wipe first unless you run into problems.
If you switch between ROMs (not just an updated version of the same one) You can restore your personal data (settings, smss, call history, etc) by flashing the data.img that you backup before flashing. To do this you need to have the engineering SPL http://forum.xda-developers.com/showthread.php?t=529019. Then you need a recovery with nandroid backup.
Before you flash your ROM, do a nandroid backup. Copy the newly backed up data.img file to your computer. Do a wipe and flash your new ROM, reboot and make sure you like the ROM. Then boot the phone into fastboot mode (Back+Power) with the phone connected to your computer. Then type
Code:
fastboot devices (to ensure the phone has been recognized)
fastboot flash userdata data.img (the one you backed up previously)
fastboot reboot
When you reboot all of your data should be restored.
Let me know if you have any other questions.
The thing for me that takes up most time when I flash a new ROM is redoing all my folders, home screen icons and widget setup. Am I right in thinking there's nothing that'll back such things up and restore them?
Loccy said:
The thing for me that takes up most time when I flash a new ROM is redoing all my folders, home screen icons and widget setup. Am I right in thinking there's nothing that'll back such things up and restore them?
Click to expand...
Click to collapse
Read the post above you. If you
Code:
fastboot flash userdata data.img
you will get all of that back.
I use My Backup to save home screen layouts including folders. Its on the market.
I've heard that Backup For Root Users has that functionality as well but ive not tried it yet.
HTH
bcrook said:
Read the post above you. If you
Code:
fastboot flash userdata data.img
you will get all of that back.
Click to expand...
Click to collapse
Doesn't work:
Code:
sending 'userdata' (22972 KB)... OKAY
writing 'userdata'... INFOsignature checking...
FAILED (remote: signature verify fail)
This is a data.img from a fresh Nandroid backup taken just before the new ROM was flashed.
Anyway, I'd always assumed that flashing the userdata got you the data (i.e. text messages, contacts - which I get back from the Google cloud anyway - and so on) but not the settings (i.e. icons, email configuration, etc).
Edit: doesn't work doing it from an adb shell in recovery console either, i.e.
Code:
cd [to nandroid backup dir]
flash_image userdata data.img
seems to work but gives a reboot loop on Drizzy's 1.3 Full Hero build.
Start asking your questions in the right sub-forum (Q&A) (Theme) or even in (General), or i will be forced to ban you for 3 days or till you learn.
Thanks
Thread Trashed!!

[MOD][RECOVERY] Firerat's Custom MTD Partitions (resize Data,System and Cache)

If you dont understand what this Modification is doing, why it needs to be done, or what possible benefits come from it, then...
PLEASE DO NOT TRY THIS MOD.
***Even tho it is impossible to brick your phone when flashing this i still highly recommend you UNDERSTAND what you are attempting to do before you do it. If someone explains you are freeing up internal memory from other places not using it and you still have to ask what the benefit is, then you obvisouly dont fully understand the mod and your phone and should turn away now.***
Thank You.
Click to expand...
Click to collapse
Now onto the mod: Heres a quick description of what this mod is doing. Pretend your phone is a pizza cut into 3 even pieces. Each piece is memory for /cache, /system, /data. Your aneroxic sister "aka cache" doesnt eat a lot so most of her slice will always be left, your fat obese brother "/data" always eats his whole slice and is left wanting more. You are healthy "/system" and only eat what you need and never less never more.
What this mod is doing is taking that original pizza and RECUTTING the slices to better fit whos eating them, so since your aneroxic sister barely eats and your obese brother is always hungry it takes all the extra pizza "aka memory" from your sister and gives it to your brother. As for you "aka /system" you only eat exactly what you need "aka the size of the rom and files it install" so it resizes your own slice to exactly the number it needs to install the rom and its gapps/files and leaves you with just a little wiggle room.
That being said, i tried this on my buddies CDMA Hero that i rooted for him and it worked like a charm. he went from something around 170mb internal storage to around 350+mb internal storage while on CM6 - Froyo 2.2.
***One thing i noticed when using a hero CDMA is that adb is crucial. one of the steps after flashing the recovery file is to reboot back into recovery and i noticed it was impossible to do it the right way without plugging your phone in and using ADB***
Original Files and Instructions: Firerats Original G1/MT3G thread found here - http://forum.xda-developers.com/showthread.php?t=717874
After you read thru firerats original instructions just know that itll be slightly different on your hero!
1. Click on the link i posted above and download these files: FR-recovery-v1.5.3-CustomMTD_S.zip and FR-boot-v1.5.3-CustomMTD_S.zip
2. Put both those files onto your SDCard.
3. While in your SDCard, make a .txt file named "mtdpartmap.txt"
4. Open your new mtdpartmap.txt file and...
- If you are using CM6 then type
Code:
mtd 102 2
- If you are using a larger Sense Rom like Fresh or ZenHero then type
Code:
mtd 182 4
5. Once all 3 files are saved on the root of your SDCard, reboot your phone into recovery
6. Format/Wipe your system and cache.
7. Flash the file: FR-recovery-v1.5.3-CustomMTD_S.zip
8. Once the file is done flashing, itll prompt you to wipe cache, system, and dalvik again.
9. Once its wiped, plug ur phone in and pull up command to adb reboot recovery (if you try to reboot into recovery any other way itll mess up the partitions and ull get cache memory.log errors and that will mean the mod didnt work correctly) by using this
Code:
adb shell
reboot recovery
10. if you did step 9 correctly, then youll get back to your recovery menu and itll say "formatting cache..." at the bottom of your screen but your recovery menu is instantly able to be used and you dont have to wait. ***On the newest version i think it no longer says this and your just got to go***
11. Flash CM6 if you used 102 for /system or Flash your larger Sense Rom if you used 182 for /system
12. Optionally, flash any kernal you may be choosing to use
13. Flash the file: FR-boot-v1.5.3-CustomMTD_S.zip
14. Click the top option on your recovery menu to reboot your system.
15. Once your system is fully booted you can go into menu > settings > sd card and internal storage , and check all the new added internal memory you have.
FYI : anytime you flash a new rom after this mod, or flash a new kernal to a currently flashed rom, you will ONLY NEED TO FLASH THE SECONDARY FIRERAT BOOT file named "FR-boot-v1.5.3-CustomMTD_S.zip".
so say after this mod you want to try a new kernal, you flash the kernal, flash boot, and reboot the system.
or say you want to flash a new cm6 nightly update, you flash the new rom/update, flash boot, reboot.
or say u want a new nightly and a new kernal, you flash the nightly, flash the kernal, flash the boot, reboot.
its very simple, if anything u flash overwrites current kernal specifications, u need to flash the boot file to make sure it knows how to set itself up. this goes for nandroid back ups aswell.
Fine Tweaking/Trouble Shooting: To get the most space you possibly can do go into adb or terminal and type
Code:
df -h
and it'll tell you what % you are using on your system. if you are at 60% then you can go ahead and decrease your /system value in your mtdpartmap.txt to about 2mb over the value it says you are using. so if your rom uses 115mb of /system you can change your mtd to "mtd 117 2".
So if you are getting an error while trying to flash a rom after doing this modification you most likely dont have enough /system space and will want to up your value to something more then enough like "mtd 200 4" then run the above code and re-scale down back to 2mb over what the current rom is using.
Enjoy CDMA users!!!
Not sure if Ill try this personally, but thank you.
tailsthecat3 said:
Not sure if Ill try this personally, but thank you.
Click to expand...
Click to collapse
Trust me, well worth it. At first i thought it was amazing gains on the g1 and mytouch, but after being the first person in the world to try it on the Sprint Hero CDMA the benefits blow all passed expectations out of the water.
It nearly doubled my buddies internal memory.
i remember on his stock rom with a handful of his favorite apps he was at around 40mb internal memory. after i rooted his phone and flashed FRESH HERO onto his phone with apps2sd he had around 150, now with this mod-cm6-apps2sd hes got over 300.
my win7 drivers are goofy and sometimes won't do adb when its in recovery mode. if you screw up the restart part - ie: can't get into adb to reboot by typing the command and those messages appear - is the device bricked or anything? Is it a one-time? Recoverable? etc...
thank you for the info. i was down to bout 20 mbs free and now well over 100. kept running into problems until i changed the cache size to a little bigger. i had a spare hero to experiment with so alls good.
Skeptical...idk why. I don't wanna risk bricking yet another Hero I guess.
SammyM00782 said:
Skeptical...idk why. I don't wanna risk bricking yet another Hero I guess.
Click to expand...
Click to collapse
Can you please enlighten us as to how you bricked your Hero?
I've been thinking about trying this. I hate having 80+ mb free in system that I can't use. Would love to just add it to /data
This won't brick your hero. The only way you can brick it is by flashing the wrong bootloader or radio. This does none of these.
Hey has anyone tried this on a different rom..
oldjackbob said:
Can you please enlighten us as to how you bricked your Hero?
Click to expand...
Click to collapse
Well.....first time was an accident. First time rooting, first time messing with a phone. I just kinda jumped right into it because when I found XDA it was pretty exciting. I always support the small guy coming from small businesses my whole life. Anyway, second time was probably due to incorrectly flashing a rom or something but regardless, I went to reboot and the phone was totally unresponsive afterwards. I trust you guys though, especially the devs. So do you think it's worth a shot?
I just did it, running cm6, and it took away that extra 80mb in system, took away all that unused space in cache, and moved it all to data. I went from 20mb free (still using apps2sd mind you) to almost 200! and so far, no issues, market works fine, everything works. Just one little note: I took somethings out of /system/app before flashing both in the rom and the gapps, things I don't use, like calculator (prefer realcalc), voice search, maps, quicksearch(all updated and installed elsewhere), and I only have 3mb free in system, so you may want to see about the customizing given in firerat's thread to increase system to say 100mb (it's 90 by default)
im trying to do this mod but every time i flash the recovery all i get the htc logo and it stays there.. i am using cm6.. any help please
You don't flash a new recovery, this patches your current one. Flash the one labeled recovery like any rom.zip in the recovery, wipe everything, flash your rom or restore, then flash the boot zip as an update.
Sent from my HERO200 using XDA App
danaff37 said:
You don't flash a new recovery, this patches your current one. Flash the one labeled recovery like any rom.zip in the recovery, wipe everything, flash your rom or restore, then flash the boot zip as an update.
Sent from my HERO200 using XDA App
Click to expand...
Click to collapse
i also was stuck on the white htc screen...
can you explan which file to us.
i couldnt get this to work with clockwork recovery, so changed my recovery first to darchs 1.7.0. you have to make the custom file first and put it on your sd card. i had to have at least 10mb of cache memory specified or i got stuck on the white htc screen.
have to read firerats thread for that.
danaff37 said:
I just did it, running cm6, and it took away that extra 80mb in system, took away all that unused space in cache, and moved it all to data. I went from 20mb free (still using apps2sd mind you) to almost 200! and so far, no issues, market works fine, everything works. Just one little note: I took somethings out of /system/app before flashing both in the rom and the gapps, things I don't use, like calculator (prefer realcalc), voice search, maps, quicksearch(all updated and installed elsewhere), and I only have 3mb free in system, so you may want to see about the customizing given in firerat's thread to increase system to say 100mb (it's 90 by default)
Click to expand...
Click to collapse
Hell yea, glad to see people flashing this mod correctly and enjoying the results!
if you end up customizing your partitions to diff sizes let all the guys know what values they should set and/or how to set them up themselves.
I dont get to use my buddies CDMA Hero a lot so i dont know how smoothly everything has been working over the past 2 days but i havent gotten any complaints or calls to fix bugs so i assume its all working very well with firerats default values but i dont know for sure.
so far ive seen these suggestions
1. up cache to 3mb
2. up system to 100mb
@danaff37, did you set your own values or are you using defaults still?
can you us this on cyanogenmod? its 2.2.... i have tryed every way and all it gets me is the white htc screen and never does on from there... please help
i checked before i flashed to see what all i was using. i had quick system info installed already so was easy for me to see. i was already using 130mb for system, prob because of dalvic-cache, so i upped it to 150mb for future use. default setting for cache was no go, changed it to 10 mb and all is fine.
I'm using default still, but downloading the latest nightly and noticed it's about 5mb bigger than before, so I'm going to go ahead and change it to 100mb when I flash it later (after I make my mods). Anybody using it should keep in mind that most rom files, the bulk of the space it takes up is in system, so be sure to partition accordingly (including gapps on aosp roms)
I left the cache at the default, try to go to /cache afterwards and it symlinks straight to /data/cache, so I don't understand how leaving it bigger would solve anything, but I've seen stranger things occur with these damn phones. lol

[Q] Sequence to installing rom?

Hi guys, i am brandspanking new at android as i have only had my phone (lg p500) for 2 weeks. i have however quickly picked up on roms,kernels,basebands etc.. I would really appreciate it if one of you TopDogs would explain to me which i should do first? My question is what sequence must items be installed in ie Rom the gapps then kernel then baseband? or is it baseband first then kernel then rom then gapps?? i really do appologise if this sounds stupid but i will need direction in this regard to be confident enough to go through with flashing a rom which im actually lank amped to do.
Anyways, thanks in advance and keep up the awesome work boys.
Okay..
In regards to baseband, kernel, rom type info, I believe most kernels are packaged with the roms themselves, and if there's any other information about a special installation it would be included on the rom page.
First thing you wanna do is research a bit about your phone and what roms are available to see if you even want to risk bricking your phone for the additional features. You can search for your phone at the top right hand side of the XDA forums. From there you can see what forms of development are available. Most popular forms are NAND and SD based roms. Research a bit on each to see which fits your needs more. NAND will completely replace the stock system but also presents more opportunity for things to go wrong and potentially damage your phone. SD doesn't replace your system, but runs off of your SD card. In any case, selecting the method that works for you is the first step. There will be indications on the rom download pages as to what type of rom it is (NAND or SD).
Second step is prepping your device for the right system. I have and HTC HD2, and it was required for me to install HSPL and update the device radio. These are very important steps and must be done properly or everything following will likely not work.
Next you want to install your boot loader (if one is required). For my device, cLK and Magloader are the popular onese, however yours will likely be different if you need one at all.
Next you will install ClockworkMod(CWM) Recovery on your device, which is the core system that allows the flashing of roms, storage management, and a few other things. Make note of the partition information of the rom you select, because when you flash CWM you will need to partition the boot/system/cache. If you don't do this properly you will likely encounter a boot loop or total failures to boot.
Once you've got CWM on your device, you can download the rom you've selected on your pc and transfer it to your SD card on your phone (which is done by enabling mass storage through CWM). After you've got the rom on your sd card you do the following:
In CWM, select "flash zip from sd" >> "choose zip" >> select your rom zip file >> approve the flash
Sometimes the developers of these roms allow for some selection or customization in the flashing process, so be sure to pay attention to what's going on. You may also need to write down error codes if something goes wrong and you need help.
That's really all there is to it, though it can be more or less complicated than I explained depending on your device and which roms you pick.j
Hope this helps, good luck!
Enter Recovery,
Full Wipe/ Factory Reset
Wipe Cache
Wipe System
Wipe Dalvik Cache
Wipe Battery Stats
Select Zip, Flash ROM
Reboot
Krystov said:
Okay..
In regards to baseband, kernel, rom type info, I believe most kernels are packaged with the roms themselves, and if there's any other information about a special installation it would be included on the rom page.
First thing you wanna do is research a bit about your phone and what roms are available to see if you even want to risk bricking your phone for the additional features. You can search for your phone at the top right hand side of the XDA forums. From there you can see what forms of development are available. Most popular forms are NAND and SD based roms. Research a bit on each to see which fits your needs more. NAND will completely replace the stock system but also presents more opportunity for things to go wrong and potentially damage your phone. SD doesn't replace your system, but runs off of your SD card. In any case, selecting the method that works for you is the first step. There will be indications on the rom download pages as to what type of rom it is (NAND or SD).
Second step is prepping your device for the right system. I have and HTC HD2, and it was required for me to install HSPL and update the device radio. These are very important steps and must be done properly or everything following will likely not work.
Next you want to install your boot loader (if one is required). For my device, cLK and Magloader are the popular onese, however yours will likely be different if you need one at all.
Next you will install ClockworkMod(CWM) Recovery on your device, which is the core system that allows the flashing of roms, storage management, and a few other things. Make note of the partition information of the rom you select, because when you flash CWM you will need to partition the boot/system/cache. If you don't do this properly you will likely encounter a boot loop or total failures to boot.
Once you've got CWM on your device, you can download the rom you've selected on your pc and transfer it to your SD card on your phone (which is done by enabling mass storage through CWM). After you've got the rom on your sd card you do the following:
In CWM, select "flash zip from sd" >> "choose zip" >> select your rom zip file >> approve the flash
Sometimes the developers of these roms allow for some selection or customization in the flashing process, so be sure to pay attention to what's going on. You may also need to write down error codes if something goes wrong and you need help.
That's really all there is to it, though it can be more or less complicated than I explained depending on your device and which roms you pick.j
Hope this helps, good luck!
Click to expand...
Click to collapse
Krystov, thank you very much for the awesome reply, you are the man.
Sent from my LG-P500 using XDA
I have flashed most of the ROMS on HTC 32A magic ..
The Below process i have followed always and achieved expected results
1. Must Have custom recovery Image which supports your Phone Borad
2.Download and keep the custom ROM ready
3.Copy the Rom to root of SD card
Reboot phone into Recovery
Enter Recovery,
Full Wipe/ Factory Reset
Wipe Cache
Wipe System
Wipe Dalvik Cache
Wipe Battery Stats(Optional)
Select Zip file which you would like to Flash ROM
After Successful flashing
Reboot
Phone will start with New custom ROM
Cheers
Happy Flashing
Thanks
HTC MAGIC 32A
HTX MIUI 0.23 HINTAY MOD
NR 6.35.x.x.
Yeah I forgot that part. you do want to clear your data, cache, and system files while in CWM, otherwise you'll be writing over your old system. A lot of roms are custom teaked and packed in way different than the stock rom and it can just get screwy if you don't. Make it a good habit of doing that before you flash! You can also back up your roms through CWM so if you don't like the changes you've made after a flash you can always revert back like nothing ever happened. Just don't wipe your SD card or you'll lose your backups! Only do that if you're okay with losing the data on your SD.
As mentioned above...
Full Wipe/ Factory Reset
Wipe Cache
Wipe System
Wipe Dalvik Cache
Wipe Battery Stats
Flash ROM
Flash Kernel
Flash gapps
Reboot
This should work out, if you do the kernel flash before the ROM, it will be replaced with whatever kernel that was packaged with the ROM. If you are trying to flash an ICS based ROM, you may need to flash the ROM a couple times (if it installs too quickly, as in 5 to 10 seconds). This is a known issue.

Malata Zpad T2

After searching for ages, I stumbled upon a solution for my tablet. Although all GTab ROMS work in the Zpad, I haven't been able to use the full 1GB RAM present in my Zpad.
So Finally today I stumbled upon a solution posted in slatedroid by Micky.
Instead of flashing the Viewsonic ROM to start with, we need to flash this ROM instead.
After you download the ROM from the link above, search for the TeamDRH CWM 5.5.0.4 and download. Extract the RAR file and replace the recovery.img in the folder with the TeamDRH CWM, cuz the one in the ROM is too old and doesn't support the latest ROMs.
[Note: If you want a larger system partition, follow this.
Open the file flash.cfg and find this no. 209715200 and replace it with this no.419430400
Now when you flash this ROM, you will get a system partition of 400MB.
If you use this method, you don't need to delete any system files after install from the ROM.]
Reboot the tab to CWM and wipe data/factory reset and wipe dalvik cache. Twice.
Shutdown and reboot to APX mode and connect to PC
NV Flash the ROM, let it boot and then shutdown.
Now to flash Jelly Bean.
Download Smoother Bean by nobe1976
Then boot the tablet to CWM
Again wipe data/factory reset and wipe dalvik cache. Twice just to be sure.
Flash the Smoother Bean zip file
Do not wipe data/factory reset or wipe dalvik cache this time.
Just reboot
Let it boot and run for a few minutes.
[Optional: Now install an app from play store to delete system apps and also a keyboard, Swipe or as such.
Open the system app remover and uninstall Gmail and AOSP Keyboard.
A few more apps can also be uninstalled, such as wallpapers, DSP Manager, Music FX, but not all.
Before deleting the AOKP Keyboard, you can copy it from the system folder if you want the stock keyboard. LatinIME.apk file.
(This does not apply if you modify the flash.cfg for larger system partition)
We need to uninstall these apps cuz after flashing with the above ROM, the system partition is only 209MB, so after flashing JB, we get around 5-6 MB free in the system partition. After uninstalling the apps, we get around 34 MB free.]
Hats off to nobe1976. He is able to develop a JB ROM that can be installed in a 200 MB system partition.
Well after everything, I hope whoever tried this in their MALATA Zpad is able to see full 1GB RAM, or around 850 MB approx.
[After this succesfull experiment, I would like to request a developer to kindly help us modify the system partition of the above ROM to 350 MB or more if possible.
Its a small request from us Zpad users.
(Note: From the help of all the users, I have been able to increase the system partitiom to 400MB)]
If anyone could help, I will be gratefull, we all will be very gratefull.
This is really pushing the limit.
Edit: Now you can use 1GB RAM present in your tablet and all the space available in the flash memory.
Note: This method can be used in all variants of the Zpad which has 1GB RAM and 16GB ROM.
Note: This tablet is sold by different names all over the world. The one I use is HCL AP10-A1
kank_fraud said:
Well after everything, I hope whoever tried this in their MALATA Zpad is able to see full 1GB RAM, or around 850 MB approx.
Click to expand...
Click to collapse
Can you post the 3 .txt files produced by these commands (reboot the tablet first)?:
Code:
$ [B]su -c dmesg > /mnt/sdcard/dmesg.txt[/B]
$ [B]cp /proc/meminfo /mnt/sdcard/meminfo.txt[/B]
$ [B]free > /mnt/sdcard/free.txt[/B]
After this succesfull experiment, I would like to request a developer to kindly help us modify the system partition of the above ROM to 350 MB or more if possible.
Click to expand...
Click to collapse
Though @rajeevvp is the best person on xda to give you solution that is more logical on this, I will tell you quick and dirty way to do this, which I have adopted.
1> download stock zpad rom if you don't have it already "ftp://112.5.164.225/tablePC/T2_nvflash_mp_3g(WCDMA)_20110824.rar"
2> unzip it, delete recovery.img from unzipped directory, copy part9.img from DRH nvflash which is used for prep 350M system partition to this directory, rename it to recovery.img
3> edit "android_fastboot_full_i_malata.cfg” change "size" of partition id 11 (which is a system partition)
Make sure you do not give any arbitrary size here; calculate it with the formula @rajeevvp posted here "http://forum.xda-developers.com/showpost.php?p=22138304&postcount=14"
4>now nvfalsh your tablet in apx mode with download.bat, now format /data /system /cache and flash whichever rom you want on top.
memory/partition config is supplied to kernel through CMDLINE parameter, so even if you nvflash tab with above procedure, its not necessary that default memory/partition sizes are maintained created by above prcoess, Team DRH boot.img has a blank CMDLINE. That is the reason
Above process will work on most of the ROM, which is using TeamDRH boot.img.
(more technical explaination stright from one of the posts of @rajeevvp "When the bootloader runs, it reads PT (partition 3) and constructs a command line telling the kernel what the partition layout is on the onboard NAND flash. Normally, the bootloader will pass this command line to the kernel as part of the boot-up process. However, if the bootloader sees that the boot.img already contains a default command line then that will take precedence")
I replaced the recovery image in the ROM as instructed in the first post but before flashing I edited the flash.cfg file to change the APP partition (id=11) size to 262144000 (250MB). I then followed the steps above but after flashing Smoother Bean it would always restart in recovery. I found I had to partition the internal SD to 4096/0 and then reload the rom and flash again. I now have a ZPad with a 250MB system partition and a total RAM of 871124 bytes. Thanks very much as it seems much faster now. Note I didn't have to remove any system apps in the process.
I replaced the recovery image in the ROM as instructed in the first post but before flashing I edited the flash.cfg file to change the APP partition (id=11) size to 262144000 (250MB). I then followed the steps above but after flashing Smoother Bean it would always restart in recovery. I found I had to partition the internal SD to 4096/0 and then reload the rom and flash again. I now have a ZPad with a 250MB system partition and a total RAM of 871124 bytes. Thanks very much as it seems much faster now. Note I didn't have to remove any system apps in the process.
Click to expand...
Click to collapse
glad to hear that it worked, BTW you will have to change /system size to minimum 350MB if you plan to use TeamDRH rom in future (hopefully with camera working)
I'll have a try later.Thanks So much.
Thank You all for the help.
I have already replaced the stock recovery CWM to 5.5 from the first flash.
Well I have tried to modify the system partition to 512 MB(536870912) in the flash.cfg and it failed. So I tried 400MB(419430400) and it worked.
It shows 419 MB in Titanium Backup
I am happy with it.
Its way better then before.
Thanks evryone
Problem solved
If anyone has formated or resized the internal memory resently, please try the maximum possible size for the system partition.
I tried 512MB but it didn't work. Maybe 490MB might work.
According to my knowledge, Android should support atleast upto 999MB for any partition.
Is it cuz of our tab or is it cuz of the architecture.
And if anyone knows, is it possible to create a larger internal partition.
As in 8GB or if possible the whole internal memory.
CWM doesn't allow more than 4GB internal space.
kank_fraud said:
I have already replaced the stock recovery CWM to 5.5 from the first flash.
Well I have tried to modify the system partition to 512 MB(536870912) in the flash.cfg and it failed. So I tried 400MB(419430400) and it worked.
Click to expand...
Click to collapse
Well this was expected result, /system partion resides on NAND flash chip (with is only 512MB) and not on SDcard.
Read this "http://raywaldo.com/2011/07/format-the-gtab/" and this "http://forum.xda-developers.com/showpost.php?p=15558724&postcount=12"
Also you need to bare in mind that other partitions also use 512MB nand flash as per explanation in above threads.
so if you take a close look at falsh.cfg file in nvflash directory you will understand that size allocation is sequential ("allocation_policy=sequential") and system partition (11) which is last to allocate the space, so you need to calculate it accordingly if you want to utilize all remaining space from NAND flash chip.
Well I cant open the page "http://raywaldo.com/2011/07/format-the-gtab/".
So according to this info I have hit the limit. I am already using 489MB of the 512MB flash. And as always, cuz of our storage manufactures, we get only 490MB in a 512MB chip.
What I wonder is why Malata and Viewsonic did not utilise the full NAND space available in the first place.
Is it used for something else.
I mean even the 350MB prep for Viewsonic GTab uses 350MB instead of 400MB.
It is so easy to to utilise and partition the NAND, then why not use the full available space.
What is the empty space used for!???
Or is it just a waste!!!
hi all,
tks for the useful informations above..but since my poor tech knowledge, its possible to produce a flashable rom for all T2 user with the max 490MB flash?
thanks in advance!
FG
fanguru said:
hi all,
tks for the useful informations above..but since my poor tech knowledge, its possible to produce a flashable rom for all T2 user with the max 490MB flash?
thanks in advance!
FG
Click to expand...
Click to collapse
Its already there.
Goto the first post and download the ROM
Extract the RAR file and find the file flash.cfg, right click and edit
Search this no. 209715200, it should be in the last 5-6 lines.
Delete the whole no. and type this no. 419430400
Save the file and close it.
Start your tablet in APX Mode and flash your tablet using download.bat.
Now you are using the full flash memory available.
You loose a few hundred kilobytes but thats it.
You cant use the whole flash memory as system partition.
There are additional partitions for the bootloader, recovery, logo, etc. which take up 89MB approx.
So 400MB is what you will get for system partition.
I would suggest flash as less as possible. Flash memory can written only a few hundred times. If it reaches the limit, then our tablet is dead.
Flash only major updates or if your ROM gives problem
rajeevvp said:
Can you post the 3 .txt files produced by these commands (reboot the tablet first)?:
Code:
$ [B]dmesg > /mnt/sdcard/dmesg.txt[/B]
$ [B]cp /proc/meminfo > /mnt/sdcard/meminfo.txt[/B]
$ [B]free > /mnt/sdcard/free.txt[/B]
Click to expand...
Click to collapse
Well I am very sorry for such a late reply. :angel:
I missed your post as I was out of station.
After I came back there were already solutions posted by a couple of users. :victory:
Well today while updating my original post, I noticed ur first reply. :silly:
Well thank you for your reply.
And thanks to all the ppl who provided for the solutions to our ZPad.
I guess the problems are solved for now.
:highfive: :highfive: :highfive: :good:
kank_fraud said:
Its already there.
Goto the first post and download the ROM
Extract the RAR file and find the file flash.cfg, right click and edit
Search this no. 209715200, it should be in the last 5-6 lines.
Delete the whole no. and type this no. 419430400
Save the file and close it.
Start your tablet in APX Mode and flash your tablet using download.bat.
Now you are using the full flash memory available.
You loose a few hundred kilobytes but thats it.
You cant use the whole flash memory as system partition.
There are additional partitions for the bootloader, recovery, logo, etc. which take up 89MB approx.
So 400MB is what you will get for system partition.
I would suggest flash as less as possible. Flash memory can written only a few hundred times. If it reaches the limit, then our tablet is dead.
Flash only major updates or if your ROM gives problem
Click to expand...
Click to collapse
Thank You kank_fraud,
i do these steps, and it works!
after, i've tried to flash "Smoother Bean " but tab continues to reboot i nrecovery mode. I've tried also to partition 4096 like suggested above, but same results.
So, the onlyu one rom working is the first?
ty again!:good:
FG
kank_fraud said:
I guess the problems are solved for now.
Click to expand...
Click to collapse
I'd still like the output of those commands--for my own edification.
fanguru said:
Thank You kank_fraud,
i do these steps, and it works!
after, i've tried to flash "Smoother Bean " but tab continues to reboot i nrecovery mode. I've tried also to partition 4096 like suggested above, but same results.
So, the onlyu one rom working is the first?
ty again!:good:
FG
Click to expand...
Click to collapse
Well for Me it worked the first time itself.
Why don't u try giv it a few more couple of times. :laugh:
BTW, are you using the Malata Zpad or Viewsonic Gtab
If you are using Gtab, try TeamDRH method but modify the size of the partition.
If u are using Zpad, try again.
Clear cache and reset before installing.
Try previous older ROMs and gradually update to newer ones.
Reset and wipe before each update.
As I didn't get any problems, so I can't say whats wrong with your installation.
And very sorry for the late reply.
I have exams.
But my tablet is very stable after this.
Everything is running smooth, even HD games.
Goodluck :fingers-crossed::fingers-crossed::fingers-crossed:
rajeevvp said:
I'd still like the output of those commands--for my own edification.
Click to expand...
Click to collapse
I tried it in terminal emulator, but it says 'Operation not permitted'
kank_fraud said:
I tried it in terminal emulator, but it says 'Operation not permitted'
Click to expand...
Click to collapse
same here.
kank_fraud said:
I tried it in terminal emulator, but it says 'Operation not permitted'
Click to expand...
Click to collapse
Fixed commands. Try them again.
I seem to have everything running and it seems really fast, the only problem I have is that the home button (hardware and soft) does not work!
I've tried installing a different home app, tried home switcher and I get asked when the tablet boots as to which home app to use, but still the buttons don't work (back and recent apps work).
Any ideas???

[Q] Need to Start over - what to wipe in TWRP

I've TWRP 2.7 and Crombi-KK. V11.0-20140402-Crombi-kk4.4.2.tf700t. All my apps are "not responding". Would like to clear everything out and reboot in a raw Crombi (don't want to reflash it if possible). Also heard that formatting to fs2f is a screamer, which WOULD mean a reflash, but THAT would be alright if the bennies out-weigh me doing it.
What do I wipe (I HAVE read many other posts, but if I don't ask, I'll **** it up - I have)?
Thanks.
I'm assuming that I factory wipe, wipe cache, then flash cm-11.0-20140921-tf700t-crombi-kk-R1_signed - which will start me over.
Your reluctance to reflash the rom doesn't really make sense to me. All your apps are not responding, you want to "clear everything out" but not reflash? Why?
You could try to just wipe cache and Dalvik and see if that clears out whatever is going on (assuming you are not that well versed in reading a logcat which would be the analytic way to go about this....). That would not touch anything of your current setup.
If that doesn't do it you would have to at least wipe data and then all your apps are gone anyway - why not reflash the rom at the same time????
But you are on a rom that is no longer supported, no further development will happen here, so I would recommend you grab this chance to give your tablet a facelift and switch to where the action is
To do that do these steps in order:
1. Copy anything worth a damn off the tablet
2. fastboot flash lj50036's Kang TWRP 2.8.6 from the Development section (or use his flashable zip in your current recovery). Reboot
3. download ZOMBi-POP and put it onto a fat32 formatted microSD
4. boot into TWRP, go to Wipe > Advanced and format data. This will take up to 90 minutes - do not interrupt it, deep cleaning is going on.
5. Under the Wipe menu find the change/repair file system option and change data (and only data) to f2fs (I have a guide on how to do it in the General section)
http://forum.xda-developers.com/tra.../guide-convert-data-to-f2fs-twrp-2-8-t3073471
6. Flash ZOMBI-POP
7. go through basic setup, then leave it alone for 30 minutes to settle in
8. prepare to be amazed
berndblb said:
Your reluctance to reflash the rom doesn't really make sense to me. All your apps are not responding, you want to "clear everything out" but not reflash? Why?
You could try to just wipe cache and Dalvik and see if that clears out whatever is going on (assuming you are not that well versed in reading a logcat which would be the analytic way to go about this....). That would not touch anything of your current setup.
If that doesn't do it you would have to at least wipe data and then all your apps are gone anyway - why not reflash the rom at the same time????
But you are on a rom that is no longer supported, no further development will happen here, so I would recommend you grab this chance to give your tablet a facelift and switch to where the action is
To do that do these steps in order:
1. Copy anything worth a damn off the tablet
2. fastboot flash lj50036's Kang TWRP 2.8.6 from the Development section (or use his flashable zip in your current recovery). Reboot
3. download ZOMBi-POP and put it onto a fat32 formatted microSD
4. boot into TWRP, go to Wipe > Advanced and format data. This will take up to 90 minutes - do not interrupt it, deep cleaning is going on.
5. Under the Wipe menu find the change/repair file system option and change data (and only data) to f2fs (I have a guide on how to do it in the General section)
http://forum.xda-developers.com/tra.../guide-convert-data-to-f2fs-twrp-2-8-t3073471
6. Flash ZOMBI-POP
7. go through basic setup, then leave it alone for 30 minutes to settle in
8. prepare to be amazed
Click to expand...
Click to collapse
Thank for your extensive reply. I had already (after re-reading what I had posted) decided to do as you have described. Am installing TWRP today, tomorrow the rest.
I'm using the TWRP Manager having informed it that this is a tf700t, and I'd like to "flash" 2.8.6, it is asking me if /dev/block/mmcblk0p4 && reboot is correct to write to. As I DO NOT profess to be anything other then a 2* newbie with android - I ask, on a T700 is this correct?
AND may I ask a few more questions should I need to? Although the rest is straight forward.
I would not use TWRP manager for anything - even if it happens to identify the correct partition in this case. p4 is the staging partition and that is ok, but still - I have seen TWRP manager do bad stuff - don't use it.
And you don't have to. lj's kang twrp comes in a flashable zip. Just download it, enter your current recovery, flash it and reboot. Bingo - you are now on TWRP 2.8.6
http://forum.xda-developers.com/tra...overy-kang-twrp-tf700t-2-8-x-xarea51-t3049395
Post 2, second link
Ask as much as you like. I don't HAVE to answer, right?
Except for that itch I seem to have to keep scratching :silly:
berndblb said:
I would not use TWRP manager for anything - even if it happens to identify the correct partition in this case. p4 is the staging partition and that is ok, but still - I have seen TWRP manager do bad stuff - don't use it.
And you don't have to. lj's kang twrp comes in a flashable zip. Just download it, enter your current recovery, flash it and reboot. Bingo - you are now on TWRP 2.8.6
http://forum.xda-developers.com/tra...overy-kang-twrp-tf700t-2-8-x-xarea51-t3049395
Post 2, second link
Ask as much as you like. I don't HAVE to answer, right?
Except for that itch I seem to have to keep scratching :silly:
Click to expand...
Click to collapse
The more I read the more I was disinclined to use the Manager, but couldn't find - and I DID look, the blob, or flashable zip to use!?!?!
So I'm formatting extfs4, THEN changing to f2fs? I changed it to f2fs, which took 10 seconds, then realized I had reversed it. No harm no foul I assume as it is formatting now - and finished in about 30 minutes?
Is this th eversion you suggest: ZOMBi-POP-5.1_B6_omni_tf700t-KANG_signed.zip
Well, I do not have any hard data on this and my knowledge of block devices is more than rudimentary, but the background is this:
Since about TWRP 2.7.x this recovery does a "secure erase" if you format your data partition ext4. All the blocks get wiped before the new file system is created. Just changing the file system to f2fs does not do that and my thinking is: Can't hurt to really, totally wipe your data partition after a couple of years of use, so why not do it once in a while.
Here's what the master said about that:
http://forum.xda-developers.com/showpost.php?p=60189650&postcount=1806
Is it necessary to format ext4, then switch to f2fs? I doubt it. Is it better? I have no idea, but that's what I did
Yes, the b6 is the latest version of ZOMBi-POP. Flash it
berndblb said:
Well, I do not have any hard data on this and my knowledge of block devices is more than rudimentary, but the background is this:
Since about TWRP 2.7.x this recovery does a "secure erase" if you format your data partition ext4. All the blocks get wiped before the new file system is created. Just changing the file system to f2fs does not do that and my thinking is: Can't hurt to really, totally wipe your data partition after a couple of years of use, so why not do it once in a while.
Here's what the master said about that:
http://forum.xda-developers.com/showpost.php?p=60189650&postcount=1806
Is it necessary to format ext4, then switch to f2fs? I doubt it. Is it better? I have no idea, but that's what I did
Yes, the b6 is the latest version of ZOMBi-POP. Flash it
Click to expand...
Click to collapse
I agree, wiping -I assume the format "checks the disc" is not a bad idea. What I'm a little confused about is that everything I've read - including your thread (which started this whole thing - see what you did?) - states it's a 90 minute or so process. When I change the data partition to f2fs, it's a coupla seconds, and when I format it (which defaults to ext4) it only took 30 minutes or so for the 32 gig.
AND I don't see anywhere where I can "check" the disc for stats and condition, so I'd know what it was/is before I install - unless of course it's staring me in the face - I have problems with things that stare at me.
RBraverman said:
I agree, wiping -I assume the format "checks the disc" is not a bad idea. What I'm a little confused about is that everything I've read - including your thread (which started this whole thing - see what you did?) - states it's a 90 minute or so process. When I change the data partition to f2fs, it's a coupla seconds, and when I format it (which defaults to ext4) it only took 30 minutes or so for the 32 gig.
AND I don't see anywhere where I can "check" the disc for stats and condition, so I'd know what it was/is before I install - unless of course it's staring me in the face - I have problems with things that stare at me.
Click to expand...
Click to collapse
I - and others - say 90 minutes so that people leave it alone, I guess. A few months back, when TWRP first implemented the secure erase, we had lots of people who thought the tablet was stuck and they interrupted the format which led to lots of "help - can't mount anything" posts...
90 minutes is on the extreme outside, but better safe than sorry....
berndblb said:
I - and others - say 90 minutes so that people leave it alone, I guess. A few months back, when TWRP first implemented the secure erase, we had lots of people who thought the tablet was stuck and they interrupted the format which led to lots of "help - can't mount anything" posts...
90 minutes is on the extreme outside, but better safe than sorry....
Click to expand...
Click to collapse
Understood. Been a week of amazement . . . . . . .
It was a WHOLE lot faster when first installed, but slowed a bit now BUT still now actually useable.
MANY MANY thanks for "walking" me through this - I've been in IT since large building, that were VERY cold, but now-a-days need to bounce stuff off someone to know I'm thinking correctly.
I've a coupla questions about the setup, but I'll run them through in the correct thread.

Categories

Resources