[DEV][S-OFF] Custom MTD Partitions (resize data, system, and cache) - Desire Android Development

Good news for those who have disabled security on their HTC Desire.
Having tried Firerat's Custom MTD patch on my HTC Desire and almost bricking it twice, I decided to break it apart and examine things in more detail.
As it currently stands v1.5.3 of his patch will corrupt your mtd0 partition if applied to your desire, so do not try it!
I read through lbcoder's custom partitions layout thread, then broke apart Firerat's patch to determine what it was doing, and what was going wrong on the HTC Desire.
The result, I have modified Firerat's Custom MTD script so it works on the HTC Desire and have successfully modified the partitions on my phone so system is 125MB, cache is 5MB, and data is 317MB.
Now after moving all my apps & dalvik-cache from SD-EXT back to DATA I still have 130MB free! w00t!
I will be providing minimal support for this, I am purely providing this to allow others to modify their partition table just as I have done. Ensure you read Firerat's original thread for further information and/or troubleshooting, it's 99% his patch/work, I just made a small change to stop mtd0 from being overwritten.
These are the steps I performed on my phone and are based on ClockworkMod Recovery v2.5.0.7.
If none of this makes sense to you then this is not for you:
Disable security on your phone. (S-OFF in FASTBOOT)
Place bravo-recovery-v1.5.3-CustomMTD.zip & bravo-boot-v1.5.3-CustomMTD.zip on SD card
Reboot into recovery
Take a Nandroid backup
Create mtdpartmap.txt on SD card with size of system & cache, the example provided sets system to 125MB and cache to 5MB, this will depend on your ROM: echo "mtd 125 5" > /sdcard/mtdpartmap.txt
Format system, data, and cache (found under mounts and storage)
Flash bravo-recovery-v1.5.3-CustomMTD.zip, this patches recovery to use the new partition sizes
Reboot into recovery
Format system, data, and cache again for good measure (found under mounts and storage)
Flash ROM, or restore Nandroid backup, it will be flashed to NAND based on new partition sizes
Prior to rebooting, flash bravo-boot-v1.5.3-CustomMTD.zip, this patches ROM kernel to load with same partition sizes.
Enjoy
Warnings:
Do not attempt to flash radio via recovery/ZIP, only do it via fastboot.
Has only been tested on HTC Desire, may not work on other phones.
Some users have suggested small cache size affects performance in games, if you play games on your phone it may be worth setting cache to 20-35MB
Uninstalling:
Removing this is simple.
Boot in to fastboot
Fastboot flash the original unmodified clockwork img
Reboot into recovery
Format system, data, cache
Install ROM/ZIP, gapps etc, reboot
Download:
bravo-recovery-v1.5.3-CustomMTD.zip
bravo-boot-v1.5.3-CustomMTD.zip
Credits:
AlphaRev - for bringing S-OFF to HTC Desire
Firerat - for the original patch. I will be forwarding you the exact changes/details shortly.
Lbcoder - for coming up with the idea
Skraw ( CM forums ) - for getting lbcoder interested
Koush - for AnyKernel
Cyanogen & Co - for giving us all such great ROMs to play with
Amon_RA and Koush - for giving us something to patch
Techjosh - for fixing the patchers for use with Rogers (EBi1)
Mblaster - for pointing out my nasty habit of using -r zip flag at the end of command ( breaks compatibility with older zip versions, fixed in AutoPatcher v1.5)
Kali- for porting CM6 to Desire thanks a bunch
I don't take any credit for this, other than the time invested to get it working on the Desire.
Code:
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 208112 0 208112 0% /dev
tmpfs 208112 0 208112 0% /mnt/asec
/dev/block/mtdblock3 128000 123932 4068 97% /system
/dev/block/mtdblock5 315008 184048 130960 58% /data
/dev/block/mtdblock4 5120 776 4344 15% /cache
/dev/block/mmcblk0p2 505636 2307 477224 0% /sd-ext
/dev/block/vold/179:1
7431564 5413644 2017920 73% /mnt/sdcard
/dev/block/vold/179:1
7431564 5413644 2017920 73% /mnt/secure/asec
/dev/block/dm-0 3124 1504 1620 48% /mnt/asec/com.google.android.stardroid-1

Reserved
Just in case

Interesting
Nice work.

Now THIS is what I was waiting for when I s-offed my desire

Good stuff can't wait to try it out.
Thanks.

Yeahaa ... that's what many people waiting for ... Thank you very much for that work !

Nice work!

Very very Interesting...
HTC Desire
DeFrost 5.1 rom

Which is the command to see the partition sizes? i undestand is under adb but cant find the commands

wait a sec... couldn't this be used to resize the /system to fit the complete Desire HD rom... ofc that would not allow you to have custom apps, but still

daedelus82, you seem to have made the most out of your nightshift . Thanks from all of us wondering how to put S-Off to good use.

Hi, that seems very good news and tool but can you explain me the advantage to resize or manipulate the partition ??
My English is not perfect for understand "lbcoder's custom partitions layout thread" or "Firerat's patch".
Regards, Oijkn.

Short Question: Is there anything that prevents us from mounting /dev/block/mmcblk0pX as /data? Seems like a trivial Apps2SD for me, but perhaps that would be too easy...
Otherwise ~420MB /system would be possible. Don't know if thats enough for those DesireHD Roms.
Oijkn said:
Hi, that seems very good news and tool but can you explain me the advantage to resize or manipulate the partition ??
My English is not perfect for understand "lbcoder's custom partitions layout thread" or "Firerat's patch".
Regards, Oijkn.
Click to expand...
Click to collapse
The main use is to get more space for apps on /data by shrinking /system to exactly the size needed for the rom you use and shrinking /cache as it is not really used anyway (at least on g1 it was only used for ota updates, which you don't get on a custom rom).
Other use would be to fit a huge rom on a blown up /system partition.

Question before you release it: how to predict what size of /system I need? It is equal to size of /system folder in ROM's flashable file?
Second question: it is good idea to shrink /system to something like 5 MB and move all system apps to /data (then all apps can be easily uninstalled and updated)?

mblaster said:
The main use is to get more space for apps on /data by shrinking /system to exactly the size needed for the rom you use and shrinking /cache as it is not really used anyway (at least on g1 it was only used for ota updates, which you don't get on a custom rom).
Other use would be to fit a huge rom on a blown up /system partition.
Click to expand...
Click to collapse
Thanks mate for the explain ^^ I understood a little better. Do you think that patch will make my desire more efficient ??

I think this will benefit the community a lot.
Sense HD users might finally get the whole system on nand.
AOSP users will have more memory to install appss on nand.
Win-win for everybody

Will this script Resize the Partitions automatically depending on which ROM you are flashing?

wow
it sounds great
worst case we delete some unnecessary apps, and HD port can fit to the device
wow

i tried this on my g1, trust me its not worth the trouble. stick with apps2sd if youre having space problems.

warsng said:
i tried this on my g1, trust me its not worth the trouble. stick with apps2sd if youre having space problems.
Click to expand...
Click to collapse
But thats just it though... I am using using A2SD and still having space trouble!

Related

[New Solution] - Faster Virtual Ram !!!!!

Hi,
I'm not a developer but I think my idea is great.
1. Using CACHE partition (50Mb) as virtual ram​
- I see that we are using swap ext partition to increase virtual ram, but access data speed of sdcard is not fast enough (for class2 or class4 sdcard),
- And I see that we have 50Mb free in cache partition which are only used when we use OTA update. But if we use a moded rom, why do we use OTA update ? access data speed of internal memory is really good, why don't we use cache partition as virtual ram ???
2. Runing faster with dalvik-cache on internal memory.​
- As you know, after install an application, we will have apk file in data/app or data/app-private and some odex file in dalvik-cache.
- If we only use app2sd with data/app and data/app-private, our application will run faster.
There was already an idea like that.
You mean using CACHE as swap partition.
At the moment this isn't possible because we would have to format this partitions and recovery wouldnt work then.
maxisma said:
There was already an idea like that.
You mean using CACHE as swap partition.
At the moment this isn't possible because we would have to format this partitions and recovery wouldnt work then.
Click to expand...
Click to collapse
What are the partitions formatted as now?
ivanmmj said:
What are the partitions formatted as now?
Click to expand...
Click to collapse
YAFFS2
Swapfiles aren't compatible with it.
Only 1 solution:
Create a loop-ext-file and loop mount it, put a swapfile on it and you're set.
But thats slow.
The partition wouldn't have to be formatted, you can use zeroed images for swap space, I've done it in Solaris before and I'm sure some of the memory techniques for Android have implemented this before, don't quote me!
maxisma said:
There was already an idea like that.
You mean using CACHE as swap partition.
At the moment this isn't possible because we would have to format this partitions and recovery wouldnt work then.
Click to expand...
Click to collapse
Is it not possible to use something like a swap file on the cache partition? I'm not familiar enough with the workings of Android, but I know that swap files are supported in Linux and I've seen it mentioned for Android, so is there any reason this wouldn't work? It would be an amazing improvement. I see you answered while I was typing this post, thanks.
I do wish people would stop putting their ideas as [new solution] and stuff and just put it forward as an [idea] or [concept] until there's a working implementation.
maxisma said:
YAFFS2
Swapfiles aren't compatible with it.
Only 1 solution:
Create a loop-ext-file and loop mount it, put a swapfile on it and you're set.
But thats slow.
Click to expand...
Click to collapse
Would the loop mounting be slow to create or slow for performance? I wouldn't mind a bit more boot time if it meant onboard swap, but obviously if it's a slowdown vs SD or none at all, it's probably not worth it.
How would u format a folder like that??? We could elimate the recovery and instead of useing it for 50 mb swap. Let's use it on the system folder. And then we could than drag eclair in our phones but then we would have to be stuck have just one rom. We could also ask rom devs to make us img instead of .zip roms so we could just flash the images
What about Nandroid etc?
This is a must-have.
Also I think the formation of the partition would be overwritten with every reboot..
But idk.
Won't try it out.
there's an issue for using /cache as swap or compcache like maxisma said.. recovery uses a small portion of /cache to write it's files to temporarily so this wouldn't be an easy work around. this idea was already started a long time ago by shafty and well, it never turned out.
maxisma said:
YAFFS2
Swapfiles aren't compatible with it.
Only 1 solution:
Create a loop-ext-file and loop mount it, put a swapfile on it and you're set.
But thats slow.
Click to expand...
Click to collapse
You don't need a swap partition, neither real nor looped
Code:
# dd if=/dev/zero of=/cache/swapfile bs=1M count=XX
# mkswap /cache/swapfile
# swapon /cache/swapfile
Ooops, forget about it: swapon (as a busybox internal) can't do that on my CM. It does work on my machines :/
But remember guys we also have the spl as backup. We could make the nandro-backup into a .nbh file to flash but it takes a longer time to do it. We could make an app or script that does it for as. I tried to customize the init.rc, build.prop, and fstab but it changes everytime - reboot. What should I do? These files were rewriten when I rebooted. If you guys want to talk this over with me and some of my friends on gtalk, I'll create a group for us to talk more in depth. My email address is [email protected].
jroid said:
there's an issue for using /cache as swap or compcache like maxisma said.. recovery uses a small portion of /cache to write it's files to temporarily so this wouldn't be an easy work around. this idea was already started a long time ago by shafty and well, it never turned out.
Click to expand...
Click to collapse
How much code do we have for recovery? I know there are modified recovery images, I have used Cyano and RA. It seems like it would be possible to create a small ramdisk or loop mount for recovery to use and recover this RAM for use by our applications. Or a mod to the init script to format that device properly for recovery when it boots and run mkswap on it when we boot to normal mode. I'm not real familiar with Android at this level, so perhaps I'm way off base here.
Do you know how to put a custom init.rc on to the g1? When I reboot it is gone and goes back to the orginal init.rc
mohsinkhan47 said:
Do you know how to put a custom init.rc on to the g1? When I reboot it is gone and goes back to the orginal init.rc
Click to expand...
Click to collapse
You have to change the one in the initial ram disk.
1) unpack boot.img
2) change initrc
3) repack boot.img
4) flash
farmatito said:
You have to change the one in the initial ram disk.
1) unpack boot.img
2) change initrc
3) repack boot.img
4) flash
Click to expand...
Click to collapse
I did that but got " broken image file ". What do I do now?
If the 50MB on the cache partition is never used, would it be possible to re-map it to /system? Probably something akin to what the "Death" SPL did.
That is what I said but then I guess you would have to reformat the phone to accept a different amount of info in this case megabytes. We would have to reformat the system folder to hold more info on it.
rgawenda said:
You don't need a swap partition, neither real nor looped
Code:
# dd if=/dev/zero of=/cache/swapfile bs=1M count=XX
# mkswap /cache/swapfile
# swapon /cache/swapfile
Ooops, forget about it: swapon (as a busybox internal) can't do that on my CM. It does work on my machines :/
Click to expand...
Click to collapse
YAFFS2 doesn't support swapfiles.
Thats why would need a loop mounted ext-image.
Placing a swap file/partition in internal memory is risky business. Flash memory has a limited number of write cycles, and swap does many writes per second. Whereas an SD card can be replaced if worn out, internal memory cannot, so the phone becomes a brick if the flash memory is damaged by swapping.

[Q] Create sd-ext parttition.

Hi,
Do anyone knows if there is a real advantage in creating a partition in the phone sd card, [sd-ext]?
I read that it solves this error: E:can't mount /dev/block/mmcblk1p2
(File Exists).
But, does the phone has a real gain when you format and create a new sd-ext partition?
Thanks,
If you have a ROM that has data2ext or app2ext then you'll notice a speed increase as well as a drop in usage on your phone's internal memory. I have a MT3GS and with data2ext I went from an 1100 in quadrant to a 1600
dbzfanatic said:
If you have a ROM that has data2ext or app2ext then you'll notice a speed increase as well as a drop in usage on your phone's internal memory. I have a MT3GS and with data2ext I went from an 1100 in quadrant to a 1600
Click to expand...
Click to collapse
Thanks for the quick reply,
When you say, data2ext or app2ext, are you saying app's that can be installed in the ex-sd card?
Can I do that in cwm or there is a better way?
Cheers,
Data2ext and app2ext are ROM add-ons that enable you to either move the entire data partition to your sd-ext or just all of your installed apps. If you use data2ext your apps are automatically moved since they're stored in the data partition. You would flash them the same way you flash a ROM if the mods are available for your phone. Just search the forum for your phone if you want to know if you have those options.
Thanks mate,
I installed move2sd enabler.
So I can to move all the apps to the sd-ext partition I created?
I'm going to search for that.
I honestly haven't used move2sd so I'm not sure how that works. It should be a separate script like I mentioned before.
I created a new partition in clockworkmod 512mg 32mg swap.
The phone restarts, all seems ok, but when I restart again in CWM and select format sd-ext partition, it says that I don't have one.
I'm trying to find a way to fix this issue but until now nothing...
Check if you have a blocksize of 4096 (there's a command, don't know it offhand) and make sure it's actually an ext partition, it might be a different type or may be the wrong type of ext, such as ext2 when it needs ext3 or vice versa.
Already did the check,
su
sf
And there's no new partition created.
CWM erased all the data inside my card but did not create a new partition.
Do you thing it's because I have lagfix on with ext4 part type?
Honestly I have no idea. I used the parted script/command from adb to do my partitioning. Maybe try that or try converting to ext2?
Thanks,
I'm going to try and take a look in to that.
I see a lot of posts that say to use RA-Recovery with sdk adb but does it works with an SGS?
I don't know honestly, you'll need to look in the SGS forum and see if a Ra recovery is posted there. Parted works with adb and can be added to any ROM regardless of recovery menu.
From what I saw Ra-recovery is not for sgs's.
I still didn't saw any posts that explains how to do a sd-ext new partition for a Samsung Galaxy S, only for HTC's and other phones.
If you happen to find anything that explains how to do this for a SGS be a friend and tell me ok?
Thanks
A friend of mine has an SGS so I'll ask him and see what he's done with his. I know he rooted and flashed CM to it but i'm not sure if he did anything else like data2ext or anything like that.
Thanks mate,
I'll be waiting for your reply...

[Q] Hboot vs. /Cache size

Hi all.
I am curious about the differences in the Engineering bootloaders that we have for our devices (0.98.xxxx, 6.xx.xxxx, 2.00.2002) in terms of partitioning.
So I would like to gather some statistics from the you (users in this forum) about the size of your /cache partition and the bootloader (hboot) that you are using to see is there a difference.
For the hboot version you just have to reboot to bootloader from the power menu
for the size of the /cache partition use the Android Terminal Emulator (free from the Market) and type:
Code:
df
then look at the row that is written /dev/block/mmcblk0p27 - the size is next to it (under the 1K-blocks column)
Thank you in advance!
/cashe is 302356K total
My hboot is stock (0.98.0002)
my cache is 138mb using new ENG HBOOT 2.00.2002
HBOOT 2.00.2002 (The leaked one from about a month ago).
150mb/138mb free.
i have the same cache as u but cannot see the lib partition anywhere after updating to the new hboot. can u?
Eclipse_Droid said:
i have the same cache as u but cannot see the lib partition anywhere after updating to the new hboot. can u?
Click to expand...
Click to collapse
I think this works only with the leaked Deseire S Sense 2.0 [2.3.5], ported by proxuser and its kernel. Because this bootloader appeared in the forum for the new kernel users. I am not aware whether any of the custom ROMs supports that kernel, so maybe this hboot 2.00.2002 is useful only for the leaked stock roms (proxuser's and the new OTA one). Just my assumption...
P.S.: Thank for the posted so far!. Looks fro your posts that the stock bootloader offers the most cache space. Looking for other inputs
I'm running the new HBOOT 2.xx.xxxx and I'd like a decent in lay-mans terms explanation of where the 150Mb that CACHE has lost has gone to, I believe LIB but I can't see a LIB partition? So is it being used or will it be used....someone please explain? I've read some attempted explainations but I'm afraid to say that I'm still not happy that I completely understand - I also believe that this is a particular question that many other users would appreciate an answer to.
Code:
$su
# df
/dev: 313160K total, 64K used, 313096K available (block size 4096)
/system: 562404K total, 493304K used, 69100K available (block size 4096)
/data: 1184268K total, 417700K used, 766568K available (block size 4096)
/cache: 146124K total, 4252K used, 141872K available (block size 4096)
/mnt/asec: 313160K total, 0K used, 313160K available (block size 4096)
/mnt/obb: 313160K total, 0K used, 313160K available (block size 4096)
/app-cache: 8192K total, 0K used, 8192K available (block size 4096)
/data/DxDrm/fuse: Permission denied
/mnt/sdcard: 31322160K total, 7923328K used, 23398832K available (block size 16384)
/mnt/secure/asec: 31322160K total, 7923328K used, 23398832K available (block size 16384)
/system/etc/virtuous_oc: 313160K total, 24K used, 313136K available (block size 4096)
#
EDIT: changed CACHE back to ext4 so altered numbers for CACHE to reflect this!
Swyped from my Desire S using XDA Premium
Eclipse_Droid said:
i have the same cache as u but cannot see the lib partition anywhere after updating to the new hboot. can u?
Click to expand...
Click to collapse
Btw have you flashed the PG88IMG that is attached in the hboot 2.002.002 guide?? This is your lib partition, but it works only on Sense based ROMs or even only Sense Stock ROMs (like the one from proxuser)?.
@ben_pyett
+1. This was the main reason for starting this thread. Because in my desire to be up to date I flashed all the new stuff that came around, but now I start to question myself is this really necessary...
amidabuddha said:
Btw have you flashed the PG88IMG that is attached in the hboot 2.002.002 guide?? This is your lib partition, but it works only on Sense based ROMs or even only Sense Stock ROMs (like the one from proxuser)?.
@ben_pyett
+1. This was the main reason for starting this thread. Because in my desire to be up to date I flashed all the new stuff that came around, but now I start to question myself is this really necessary...
Click to expand...
Click to collapse
Just released the somehow my CACHE had become ext3? no idea when or how this happened so convered to to ext4 using 4EXT recovery and reformatted.
So I altered the numbers in the above post to reflect changes this made.
I used a different method as I was S-OFF via XTC Clip! [GUIDE] XTC-Clip users guide to new HBOOT 2.00.2002
Its depends on the rom and the install script.
Proxusers OTA is compatible with the old HBOOT, so it doesnt use the new lib partition.
If you flash the untouched version you have the lib partition.
caravanquello said:
Its depends on the rom and the install script.
Proxusers OTA is compatible with the old HBOOT, so it doesnt use the new lib partition.
If you flash the untouched version you have the lib partition.
Click to expand...
Click to collapse
Yep, you are right. I meant the early proxuser's versions that I was happy to use up to v8 (IMO very good work). But then I gave up on Sense and not regretting a bit. Anyway according to your explanation my logic is right and this 2.00.2002 hboot is only useful for HTC ROMs, although modified by the devs here, but is pointless to use with ROM's that are not supporting it i.e. most of them.
@ben_pyett
I think that the new radio installation is messing with the cache partition, because I had the "cache_log" error after flashing it, also I am reading a lot of feedbacks from users that had to restore/reformat this partition after flashing the radio due to "not enough space" error when installing apps from the Market.
amidabuddha said:
@ben_pyett
I think that the new radio installation is messing with the cache partition, because I had the "cache_log" error after flashing it, also I am reading a lot of feedbacks from users that had to restore/reformat this partition after flashing the radio due to "not enough space" error when installing apps from the Market.
Click to expand...
Click to collapse
I possibly can agree with that as I also encountered that problem with the market after installing both the latest radio and being on latest HBOOT.
Although market space error was simply resolved by a CACHE wipe, although I'm still unsure what particular process or step put my CACHE to ext3?
ben_pyett said:
I possibly can agree with that as I also encountered that problem with the market after installing both the latest radio and being on latest HBOOT.
Although market space error was simply resolved by a CACHE wipe, although I'm still unsure what particular process or step put my CACHE to ext3?
Click to expand...
Click to collapse
exactly same thing happened to me too. just formatted back to ext4. byy the way i am now back on old ENG HBOOT and i have got my full 300mb cache partition back
Eclipse_Droid said:
exactly same thing happened to me too. just formatted back to ext4. byy the way i am now back on old ENG HBOOT and i have got my full 300mb cache partition back
Click to expand...
Click to collapse
Can you please explain how you did this, because I am also on the old bootloader but my /cache is still halved (150 MB)??
EDIT: when I reboot in the Recovery my /cache is exactly 300 MB, but the "df" command in the Terminal is showing 150 MB?? Is this the same in your case?
EDIT2: I have wiped the cache and now it shows 300 MB in the terminal. Hooray!
Just to confirm my assumption that the radio is the reason for this mess. What I did to the current state was:
1) I think I was the first one that flashed it over 2.00.2002 (almost immediately after it was posted, even before the ben_pyett's first question on the OTA radio thread, and I stuck with the famous "cache_log" error. I was scared that my eMMC is gone. So I reflashed RUU with the intention to go to the repair center with the stock hboot, etc.
2) then I saw that my system is fine (oh how happy I was) I used the revolutionary tool
3) then I flashed the old ENG HBOOT 0.98.2000
4) then I flashed the new OTA radio again
5) then I flashed the CM7 Nightly, Tiamat kernel and the GApps
6) after booting the ROM I installed the 4EXT recovery
7) after that I rebooted in the Recovery and had again the "cache_log" error, but I was calm this time and just formatted it as ext4
8) then I have noticed that my /cache is 150 MB???
so only thing that I have made extra than prevously was the new radio. CM has no customized partitioning and for me the only cause of the can be this Radio...
amidabuddha said:
Can you please explain how you did this, because I am also on the old bootloader but my /cache is still halved (150 MB)??
EDIT: when I reboot in the Recovery my /cache is exactly 300 MB, but the "df" command in the Terminal is showing 150 MB?? Is this the same in your case?
EDIT2: I have wiped the cache and now it shows 300 MB in the terminal. Hooray!
Just to confirm my assumption that the radio is the reason for this mess. What I did to the current state was:
1) because I was stuck with the famous "cache_log" error and I think I was the first to flash it over 2.00.2002 (almost immediately after it was posted, even before the ben_pyett's first question on the OTA radio thread, I was scared that my eMMC is gone. So I reflashed RUU with the intention to go to the repair center with the stock hboot, etc.
2) then I saw that my system is fine (oh how happy I was) I used the revolutionary tool
3) then I flashed the old ENG HBOOT 0.98.2000
4) then I flashed the new OTA radio again
5) after that I had again the "cache_log" error in the recovery, but I was calm this time and just formatted it as Ext4
5) then I flashed the CM7 Nightly, Tiamat kernel and the GApps
6) then I have noticed that my /cache is 150 MB???
so only thing that I have made extra than prevously was the new radio. CM has no customized partitioning and for me the only cause of the can be this Radio...
Click to expand...
Click to collapse
interesting!
everything you experienced with the cant mount errors after flashing the new radio happened to me too! i too feared i had fried the emmc chip! I am still on new radio now and everything is fine after reformatting the cache partition.
In answer to your question i believe it MUST be the new radio trying to alter partition of the cache. This would explain why it is giving you the same "cant mount cache" error as it gives when flashing new HBOOT. Something in the installation of the radio package must be trying to split the partition.
Anyway, im happy now! and by the sounds of it u are too, and have pretty much the same base setup as i do
OLD ENG HBOOT ALL THE WAY!!
@ben_pyett
Just an addition to my previous assumption.
I doubt that the Stock ROM natively supports ext4. So if the radio is altering somehow the /cache partition it of course is designed to search and manipulate an ext3 type partition (most probably this is the cause of the error). When you have reformatted, it was restored as it was labeled by the radio script - as an ext3. So the restoration solved your Market problem, you just noticed the ext3 type later.
Sent from my HTC Desire S using XDA App
amidabuddha said:
@ben_pyett
Just an addition to my previous assumption.
I doubt that the Stock ROM natively supports ext4. So if the radio is altering somehow the /cache partition it of course is designed to search and manipulate an ext3 type partition (most probably this is the cause of the error). When you have reformatted, it was restored as it was labeled by the radio script - as an ext3. So the restoration solved your Market problem, you just noticed the ext3 type later.
Sent from my HTC Desire S using XDA App
Click to expand...
Click to collapse
this is a very good point! but why is it only changing the cache partition and not the rest?
Eclipse_Droid said:
this is a very good point! but why is it only changing the cache partition and not the rest?
Click to expand...
Click to collapse
I think that at this point already some of the devs has to clarify further
Edit: now a conversation with Nexx in his CM7 thread comes to me. He said that the new partition (lib) is taking up space from the /cache not from /system (which fact is verified by the results in this thread). So maybe the script is checking for the "properly" mounted partitions and when is not finding the lib.img is trying to remount or to force reformat/rebuild that is causing the corruption. Just a theory of mine but linux is working quite straightforward as far as I know
Sent from my HTC Desire S using XDA App
amidabuddha said:
I think that at this point already some of the devs has to clarify further
Edit: now a conversation with Nexx in his CM7 thread comes to me. He said that the new partition (lib) is taking up space from the /cache not from /system (which fact is verified by the results in this thread). So maybe the script is checking for the "properly" mounted partitions and when is not finding the lib.img is trying to remount or to force reformat/rebuild that is causing the corruption. Just a theory of mine but linux is working quite straightforward as far as I know
Sent from my HTC Desire S using XDA App
Click to expand...
Click to collapse
i guess this could be true! either way, we are both running new radio now without any issues
just a bit annoying having to go through this process before you have it working
Well done gentlemen!
It's good to at least get to the bottom of why the file system ext3->ext4 conversion occurred.

[Q] Q. Regarding Data Storage on BootMenu's 2nd System

I posted this in a thread in the Dev. section but that's probably not the appropriate place for it - I've been installing ROMS (SCV7, Swifty Trix) with BootMenu on the second system with Leak #1 on the primary system. On the primary system I have ~ 4 gigs allotted to app storage and on the second I only have ~ 200 mbs. I can't even begin to install a basic set of application... are there any suggestions on how to remedy this situation? I've been Google-ing the subject but haven't found much information so far.
EDIT - So, I guess "RTFM" should always be in mind:
Q: I have a "low storage space" on 2nd system?
Webtop partition size is only 1.3GB.
To make thing simple, the included boot_second.sh script bind mount /system & /data inside this webtop partition.
You have at least 4 option, if you want to have bigger /data
1.Reassign /data to /sdcard (IO speed depend on sdcard speed rating)
2.Reassign /data to /dev/block/userdata (this will replace all your data for stock system)
3.Reassign /data to /dev/block/cache (bind /cache to somewhere else e.g : /webtop/cache)
4.Use a lightweight ROM (/system size = small)
You need to modify these files to suit your needs.
/preinstall/bootmenu/script/boot_stock.sh
/preinstall/bootmenu/config/stock.recovery.fstab
/preinstall/bootmenu/script/boot_second.sh
/preinstall/bootmenu/config/second.recovery.fstab
Sorry, for now you all have to configure this files manually.
--------
So, this is a little beyond what I've done with Android thus far... for now I haven't been able to figure out how to work it out. Any suggestions would be much appreciated. Thanks!
goto
1) mounts/format
2) format webtop
3) toggle second system recovery (main menu)
4) install/restore whichever ROM u desire
i think erasing webtop will pretty much free system space in "second system"
and remember second system is usually considered as trial purpose
as far as my exp. changing something in first system will somtime affect the second system
Happy flashing
aguacateojos said:
I posted this in a thread in the Dev. section but that's probably not the appropriate place for it - I've been installing ROMS (SCV7, Swifty Trix) with BootMenu on the second system with Leak #1 on the primary system. On the primary system I have ~ 4 gigs allotted to app storage and on the second I only have ~ 200 mbs. I can't even begin to install a basic set of application... are there any suggestions on how to remedy this situation? I've been Google-ing the subject but haven't found much information so far.
EDIT - So, I guess "RTFM" should always be in mind:
Q: I have a "low storage space" on 2nd system?
Webtop partition size is only 1.3GB.
To make thing simple, the included boot_second.sh script bind mount /system & /data inside this webtop partition.
You have at least 4 option, if you want to have bigger /data
1.Reassign /data to /sdcard (IO speed depend on sdcard speed rating)
2.Reassign /data to /dev/block/userdata (this will replace all your data for stock system)
3.Reassign /data to /dev/block/cache (bind /cache to somewhere else e.g : /webtop/cache)
4.Use a lightweight ROM (/system size = small)
You need to modify these files to suit your needs.
/preinstall/bootmenu/script/boot_stock.sh
/preinstall/bootmenu/config/stock.recovery.fstab
/preinstall/bootmenu/script/boot_second.sh
/preinstall/bootmenu/config/second.recovery.fstab
Sorry, for now you all have to configure this files manually.
--------
So, this is a little beyond what I've done with Android thus far... for now I haven't been able to figure out how to work it out. Any suggestions would be much appreciated. Thanks!
Click to expand...
Click to collapse
All of that is not needed, and you will mess up your install on first system too.
I get trying new things out and trail blazing, but next time do a little research first. There are people who don't think and search for a problem and find your solution try it and learn they now have to fxz, but don't know how or can't.
This appears to be way beyond you. Next time try something a little smaller and less likely to screw something up for those that don't know or not very capable.
shardul.phatak said:
goto
1) mounts/format
2) format webtop
3) toggle second system recovery (main menu)
4) install/restore whichever ROM u desire
i think erasing webtop will pretty much free system space in "second system"
and remember second system is usually considered as trial purpose
as far as my exp. changing something in first system will somtime affect the second system
Happy flashing
Click to expand...
Click to collapse
What he said ^^

[MOD][ALPHA][2013-02-14] Save internal memory: dalvik-cache on /system AROMA

WARNING: This is far from complete, read carefully to know whether it is safe!
I created a tiny mod that automatically moves dalvik-cache to your /system partition in order to gain space on /data. The idea to do it came from here: http://petermolnar.eu/linux-tech-coding/how-to-move-dalvik-cache-to-system-partition-in-android/
Fiddling with the bootimage seemed to cumbersome and on a ROM supporting init.d-scripts, it should be possible to fix all from there (remount /system rw and check whether symlink is damaged from a dalvik-cache wipe attempt). This is my first working-for-me zip to automate the process in a flashable zip.
The installer contains an option to revert the mod -- works for me.
Prerequisites
For this to work, you need:
A ROM that supports init.d scripts
busybox installed (of course)
A custom recovery with all busybox links in place (should work on most)
Enough free space on /system for dalvik-cache
Limitations
Untested -- so far tested only on my Sensation with SuperXE 4.2.1 ROM
Prerequisites unchecked -- this includes busybox and space requirements on /system. Check yourself for now before flashing
Dalvik cache wipe non-functional -- at least for me on 4EXT Touch recovery. But it doesn't do any harm, at least.
Benefits
More space on /data -- around 150 MB for me
Downsides
/system must be kept rw
TODOs
Check some prerequisites to make it safer to flash
Analyze why dalvik-cache wiping does not work, maybe provide own wiping-option in AROMA
Check whether this works on ROMs with dalvik-cache on /cache; it already looks there after /data, so it SHOULD work
dalvik-syscache_0.2a_ALPHA.zip - use at your own risk.Nandroid keeps you safe, so please test after backup !
Older versions
dalvik-syscache_0.1a_ALPHA.zip
Changelog
* 0.2a:
Added dalvik-cache wipe option in AROMA
Minor cosmetic changes
Very nice idea!
On a related note - is there no safe way to repartition our device and just shrink the /system partition, giving it to /data instead?
manuelkuhs said:
Very nice idea!
Click to expand...
Click to collapse
Thanks, although the idea is old, just tried to automate it.
On a related note - is there no safe way to repartition our device and just shrink the /system partition, giving it to /data instead?
Click to expand...
Click to collapse
I don't think so. No idea what kind of partition table is used, but given the fact it's all on the same internal mmc block device, even the recovery partition, I assume it would be quite risky. But maybe someone around knows better?
wipe dalvike-cache option added in aroma ...
great job!
but i want to know if there any harm to our phone when system partition been read and write much more frequently than before?
AW: [MOD][ALPHA][2013-02-14] Save internal memory: dalvik-cache on /system AROMA
theggs said:
great job!
but i want to know if there any harm to our phone when system partition been read and write much more frequently than before?
Click to expand...
Click to collapse
No worries there, it's the same underlying block device. The only "issue" with having /system rw is it's maybe easier to accidently mess with your Rom at the command prompt. But wear on the flash is the same, no matter what partition is used for dalvik-cache.
Sent from my HTC Sensation XE using xda app-developers app
trying it out
trying it on cm10.1..it works!save 200+mb in /data. now more apps can be installed. now i can install much more apps thx for your great job!
just for one thing, this mod just move dalvik-cache in /data to /system, and dalvik-cache in /cache is still there. so still can only creat 50mb swap partition in /cache with the turbo boost.
Sent from my HTC Sensation using Tapatalk 2
theggs said:
trying it on cm10.1..it works!save 200+mb in /data. now more apps can be installed. now i can install much more apps thx for your great job!
just for one thing, this mod just move dalvik-cache in /data to /system, and dalvik-cache in /cache is still there. so still can only creat 50mb swap partition in /cache with the turbo boost.
Click to expand...
Click to collapse
Hi, thanks for testing!
For your issue: I think there should be only one dalvik-cache (either in /data or in /cache), the other one probably being a leftover of another rom. could you try wiping dalvik-cache & cache and see which one is re-created at boot? [If really both, I'll gonna have a look at CM 10.1 myself...]
edit: uninstall the mod before wiping please ...
tired and still get dalvik-cache in both /date and /cache without this mod. and with this mode, dalvik-cache in both /cache(67.73mb) and /system(238.32mb).
theggs said:
tired and still get dalvik-cache in both /date and /cache without this mod. and with this mode, dalvik-cache in both /cache(67.73mb) and /system(238.32mb).
Click to expand...
Click to collapse
Ok thanks ... I just researched a little on this and probably your ROM splits dalvik-cache in two parts, for system apps (on /cache) and user apps (on /data).
Of course I could make this mod move both of them to /system, but I think I'll first try to implement some checks for available space in order to make this a safe operation. I'll think about solutions ...
edit: for stripped-down / AOSP roms, this should always be safe, having around 450 to 500 MB free space on /system -- but in order to make this mod safe for all, I think I'll have to work a little on it
Looking forward to the next vision. thx for your work again!
Nice idea!
Just wondering since most of us have s-Off, isn't there a way to repartition the band, so I can make more space on data instead of system? I always use aosp roms, so there isn't needed much space on system for me
Sent from my HTC Sensation using xda premium
Caspertje19 said:
Just wondering since most of us have s-Off, isn't there a way to repartition the band, so I can make more space on data instead of system? I always use aosp roms, so there isn't needed much space on system for me
Click to expand...
Click to collapse
Yep, I had that idea, too. Especially using AOSP, the space on /system is wasted.
I'm still not sure whether repartitioning is possible, but now I think I wouldn't dare to, given the fact that recovery resides on the same block device -- I'd worry to brick my phone fiddling with the partition table.
So, for me, moving dalvik-cache to system and installing apps I constantly use to /system/app seemed to be the "next-best" solution.
I'll update this mod probably this weekend, adding some logic checking space-requirements should make it safe to flash.
Caspertje19 said:
Nice idea!
Just wondering since most of us have s-Off, isn't there a way to repartition the band, so I can make more space on data instead of system? I always use aosp roms, so there isn't needed much space on system for me
Sent from my HTC Sensation using xda premium
Click to expand...
Click to collapse
Only people I know who can create custom hboots are alpharev and thalmus_
Sent from my HTC Sensation using xda app-developers app
It's an old thread, but has anyone a working link to download this ?
I think this is relevant for today.

Categories

Resources