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

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.

Related

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

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!

New to CM7

Hi all,
So last night I decided to give Cyanogenmod7 a try. I came from MIUI.us 2.1.20 - I just love MIUI, but it's a bit too demanding for the Milestone. So I have CM7 up and running, and it is a lot more snappy. But now, I'm having trouble installing some apps.
I tried installing my bank's banking app, but it didn't install - checked the market and it doesn't appear. Same thing with WhatsApp!! If it were working, I might just become a CM7 user..but it's not working.
Am I missing something? I installed after doing a full wipe, after which I installed DT A2SD scripts and then gapps-20111216 (although didn't see gmail or market etc after gapps, so installed those via apk).
What's the deal here?
Thanks.
Sent from my Milestone using Tapatalk
Ok, just wiped again, and reinstalled all. CM7 then gapps then dt a2sd. So far it's working.
Sent from my Milestone using Tapatalk
googleservicesframework.apk and vending.apk are all you need for using market. Try to reinstall them. May you success.
Ok, so now my problem is A2SD. It's not working! A2SDGUI refuses to go in, and when I do a check, I get a segmentation fault...I've never had this issue before. I've tried reinstalling DT A2SD from withing recovery and still, nothing. Please assist, I just need to get set up properly now.
Regards
Sent from my Milestone using Tapatalk
DT scripts dont work ...use an external partition (app2ext)
d.casper.b: CM7 for Milestone already comes with its own ap2ext scripts that are automatically used if there is ext partition present on your sdcard.
You should not install any 3rd party app2ext scripts as they are very likely to be conflicting with the scripts that are already there.
Thanks kabaldan.
I'll check it out.
I was even going so far as trying to use Link2SD from the market..
How'd I know if it's working? By monitoring the available internal storage?
Sent from my Milestone using Tapatalk
d.casper.b said:
Thanks kabaldan.
I'll check it out.
I was even going so far as trying to use Link2SD from the market..
How'd I know if it's working? By monitoring the available internal storage?
Sent from my Milestone using Tapatalk
Click to expand...
Click to collapse
when you will enable app2ext you will see the total space in your storage rise to 197 mb
I am not winning. I did a factory reset and flashed cm7 and gapps (not dt a2sd).
I did a test, internal storage was at 191mb, then I installed opera mobile and it went down to 182mb. Then uninstalled it again. Went into cyanogenmod settings and set install location to external. Installed opera again, but it was no different. Moving it to sd under 'manage applications' increased the internal memory again, but that's just moving the app to the FAT32 partition of the sd card.
So it's not seeming to work for me for some reason.
Sent from my Milestone using Tapatalk
EDIT: I really don't want to be a nuisance, but now, looking at the available storage using "Quick System Info", I noticed after uninstalling "Opera Mobile", 9mb was freed on internal storage & 13mb on the ext partition.
So, perhaps it is working, and since the dalvik cache is (I assume) on internal storage, the storage is still decreasing. Am I correct? If so, is there a way to also move dalvik cache to the ext partition - I had it like this on MIUI & never looked at available memory ever again.
First of all, have you really partitioned your SD card? Make sure you followed the 3rd step on this guide: http://www.mrmuh.com/2012/01/update-a-motorola-milestone-from-motorola-firmware-to-cyanogenmod-7/ . You should have your SD Card partitioned with two partitions, the first should be FAT32 that's used normally on Android, and the second EXT3 or EXT4. Obviously, make sure you have a backup of your FAT32 partition before partitioning.
Second, you should understand how the apps2ext scripts on CM7 work. Application installs that would be stored on internal memory are rerouted to the EXT3/4 partition on the SDCard. This happens at the underlying system (linux) level, Android (that runs on top of linux) is not aware of this rerouting, so, as far as Android "knows", apps that are rerouted to the EXT partition are on the phone's internal memory. That means that you should make sure that apps you need installed on the EXT partition of the SD card are shown in "Applications > Manage applications" list to be installed on the internal memory. Yep, it's confusing, but once you understand how it works and why it works that way, it makes sense.
Third, the fact that apps are rerouted to the EXT partition doesn't mean that everything about the app will live on the ext partition: it means only the main application package will live on the ext partition, application data is still stored on the internal memory. For most apps, the amount of data used for application data are much smaller than the application package, but in some apps the amount of application data from the app may often surpass the size of the app itself - for example, in my phone, Tweekdeck stores about 9Mb of data, which is about 10 times the size of the application itself (820kb) - presumably this amount of data is cached tweets, pictures, etc. But that case is usually the exception, not the rule, I've just mentioned it so you understand that using apps2ext doesn't mean your internal memory will always stay unused, it just means it will be used (way) less.
Finally, regarding the CyanogenMod Settings location setting, if you understood what I said above, you should now understand that it should actually be set to always install to "Internal", rather than external. However, there's a bug in this that you should be advised, that not all apps will respect this setting: some apps will install to external regardless of how you've configured that setting (meaning the app will use Froyo/Gingerbread native Apps2SD, hence being installed to the FAT partition of the SDCard). So, when you install a new app, check on app management if it didn't get installed to the SDCard, and move it to the internal memory if that's the case. For these kind of apps, you'll have to do it every time you update the app too.
Thanks, I edited my previos post..
I actually have 3 partitions, a FAT32, an ext2 (maybe it's ext3, but doubt it - partitioned some months ago, so my memory's hazy), and a SWAP - which I should get rid of, but am too lazy.
I understand entirely what you've said, I know that internal is really ext if working, and sd is FAT32 partition.
You see, I'm just new to this rom and have to trial and error until I understand, with miui you just flashed the rom and the a2sd scripts and didn't bother again (maybe only to move an app that installed to FAT partition). But it seems CM7 is simply just to flash the rom and you're good to go. But as I was pondering in my previous post...is there any way to move dalvik cache to ext?
Thanks for putting up with me..I'm almost there.
Sent from my Milestone using Tapatalk
d.casper.b said:
Thanks, I edited my previos post..
I actually have 3 partitions, a FAT32, an ext2 (maybe it's ext3, but doubt it - partitioned some months ago, so my memory's hazy), and a SWAP - which I should get rid of, but am too lazy.
I understand entirely what you've said, I know that internal is really ext if working, and sd is FAT32 partition.
You see, I'm just new to this rom and have to trial and error until I understand, with miui you just flashed the rom and the a2sd scripts and didn't bother again (maybe only to move an app that installed to FAT partition). But it seems CM7 is simply just to flash the rom and you're good to go. But as I was pondering in my previous post...is there any way to move dalvik cache to ext?
Thanks for putting up with me..I'm almost there.
Sent from my Milestone using Tapatalk
Click to expand...
Click to collapse
in the market you will find an app called s2e which moves app data, davlik cache to sd
also link2sd also free's up more space and makes cm7 snappier
please don't install such things to CM7 for Milestone unless you know what you are doing and you are able to resolve conflicts with the existing scripts
dalvik-cache is already moved automatically
if you want to free more space in /data, enable lib2ext to move native libraries to ext - it's mentioned in the changelog for 7.1.2 release
app data itself should not be moved as it can cause instability
d.casper.b said:
Thanks, I edited my previos post..
I actually have 3 partitions, a FAT32, an ext2 (maybe it's ext3, but doubt it - partitioned some months ago, so my memory's hazy), and a SWAP - which I should get rid of, but am too lazy.
Click to expand...
Click to collapse
Yeah, get rid of swap, there won't be any use for it (for now anyway) and it's best for you at this point to have a known working structure (two partitions, 1st FAT, 2nd ext3/4) for your SD as you're troubleshooting your problems/questions, it'll make it easier for us too as this will eliminate potential points of failure or inconsistencies. And you should really consider upgrading to a journaled filesystem, either ext3 or ext4. Using ext2 is unreliable because Android doesn't umount the ext partition cleanly on reboot or shutdown, so you may have problems with apps disappearing or misbehaving every other reboot. Using ext3/4 with journal elimitates this problem since the journal is just replayed for the uncleanly umounted partition and the filesystems behaves more consistently.
d.casper.b said:
You see, I'm just new to this rom and have to trial and error until I understand, with miui you just flashed the rom and the a2sd scripts and didn't bother again (maybe only to move an app that installed to FAT partition). But it seems CM7 is simply just to flash the rom and you're good to go. But as I was pondering in my previous post...is there any way to move dalvik cache to ext?
Click to expand...
Click to collapse
The apps2ext script built on CM7 should do this by default - you probably already have your dalvik-cache on the ext partition. To check this, go into OR, enter the console and type: "ls /sddata/dalvik-cache" . If it returns a list of files, you've already got the dalvik-cache on your ext partition. Another option is setting the option dalvik.vm.dexopt-cache-only to 1 in the file /system/build.prop . This will put all dalvik-caches (both from user apps and system apps) on the phone's internal cache partition, thus still freeing space on the internal memory but without using the ext partition, but that's not recommended if you install too many apps because the cache partition may run out space and that will spawn all kinds of weird behavior on Android. The safer route is just using the default configuration anyway (user apps dalvik-cache on sd-ext).
Another option to further reduce internal memory use is using lib2ext, that will move user apps native libraries to the ext partition, but the memory gain in this case is dependent on which apps you use and how big their native libraries (if they even have one) are. To activate it, just go into the Terminal app (with Android booted) and type:
$ su
# lib2ext
And reboot. The libraries will be moved to the ext partition during boot. Make sure you have a big enough ext partition to hold everything (apps, dalvik-cache and apps libs) - the size to recommend is very dependent on how many apps you use and how big they are, but I'd say 512Mb would be the bare minimum.
in the market you will find an app called s2e which moves app data, davlik cache to sd
also link2sd also free's up more space and makes cm7 snappier
Click to expand...
Click to collapse
DON'T! JUST DON'T! These third-party apps will cause all kinds of problems with CM7 builtin apps2ext.
EDIT: Oh well, Kabaldan already put all my rambling much more succintly than I could... I'm way too talky
well i was jus trying to help.. .anyway guys thanks i guess i won't be needing those apps anymore ...sorry for my noobness
Thank you so much guys!
It seems like it's working. I will check out lib2ext & the other suggestions tonight or over the weekend (on my way to work now).
I must say, I thought the move to CM7 would be a temporary one, but the speed gain is just what I needed, & the tweaks I thought I'd miss I am finding hidden in the settings .
Just wondering on the battery now - but I've been fiddling non-stop.
So let me play a bit more the weekend & I'll merge my ext2 and SWAP partition into one ext3 partition.
Thanks all, and kabaldan for your hard work on this rom.
Sent from my Milestone using Tapatalk
Just as I was on my way...
Everything's running fine, A2SD works. But now, I partitioned my SD card with a 2nd partition (ext3, it was ext2), but now widgets are not loading. Checked the apps install location, and it's 'internal', ie. ext3. I never had this before. I think maybe it's due to the filesystem now?
EDIT: Ok, ext2 is doing the same. I can't keep starting from scratch the whole time guys.
EDIT2: It's now suddenly working! Just have a Fat32 and an Ext3 partition. But I don't understand because it's been setup like this twice before with no success. I'll hold thumbs!
PS, CyanogenMod is quite up my alley now, speed is awesome and I'm happy.
Sent from my Milestone using Tapatalk

[Q] Resize internal partitions

Hi,
This has been asked many times before with no real solution that applies to different devices.
I'm running out of space on my /system partition and can't install any more apps even though I don't have that many installed.
I want a way to re-size the Android partitions manually to whatever size I want. Or just delete all current partitions and create new ones.
How do I do that? Is there any GUI partitioning tools similar to the ones available for Windows?
I don't want to move files from /system to another partition. I want to change the partition size.
My current /system partition:
For what reason are you moving apps to /system? You can't install them there, you have to push/move them there, installs go to /data. So keep them in /data, where they're installed by default. You have tons of space available there.
Partition table (start addresses and sizes) is hard-coded in bootloader, and can be redefined in kernel boot parameters (in this case recovery needs to be recompiled with the same parameters too, otherwise it won't write to the same partitions the kernel will read from). You're welcome to hack any of those. As you could probably understand from this paragraph, I wouldn't expect having GUI tools for that.
Thanks for the reply.
I'm not trying to move apps to /system. I thought apps are installed there by default because every time I try to install a new app it gives me an error message saying that there is not enough space on /system.
Now I know that apps are not installed in /system.
I just need more space in /system so I can install new apps without any errors.
What can I do to get more space on /system partition? Can I replace the bootloader?
I don't have any Android programming experience. I probably need something that is available out there to do the job.
In stock form, you shouldn't even have write permissions to /system. Nothing should be ever written there, and it can be 99.99999% utilized - there shouldn't be any free space left for anything, it shouldn't normally be used.
If you're getting that error when trying to install an app - you need to check what's reporting the error. It's not a "real" error, it means there's something wrong with your phone.
Try wiping cache partition from recovery...does this make any difference?
Jack is correct.
Swyped from my DesireS
refer to this
if this may help you http://forum.xda-developers.com/showthread.php?t=1959691
:highfive:
mayank88288 said:
refer to this
if this may help you http://forum.xda-developers.com/showthread.php?t=1959691
:highfive:
Click to expand...
Click to collapse
Way to bump a year old thread :thumbup:
“I'm bad and I'm going to hell, and I don't care. I'd rather be in hell than anywhere where you are. ”*―*William Faulkner

[MOD][REC][29/10]Data2SD -- I/O-Boost

Data2SD MOD: Moves /data partition to External SD, noticeable performance increase
All files attached are flashable .zips Installation instructions updated.
clemsyns cpu OC 1800 kernel is out! Good stuff!
Symlink added to /data2 (internal storage now found as /sdcardi)
You will need to disable journaling using the guide in post #3 if you are on CleanROM 2.1 to 2.3
as the rom does this as standard. If not you will get error!
I have had nothing to do with the development of this MOD, all credit goes to TweakerL
Also a huge thanks to scrosler for the fantastic CleanROM
Thanks to clemsyn for the amazing kernel!
Feel free to go to original thread and give your thanks: http://forum.xda-developers.com/showthread.php?t=1803252
and also to seek information, the thread is full of it.
What/Why/How?
This MOD was developed to aid the I/O-issues the Transformer Prime has and the Infinity inherited. Since it was a known fact that the internal
storage was slow/poor, TweakerL decided to try mounting the /data partition to the MicroSD card. Hence an obvious necessity
will be that you have a fast MicroSD card. Several have been tried and there is no real conclution as to what is the best in regards
to manufacturer or class (a class 6 card can have better random write speeds than a class 10 card), I use a Sandisk 64GB UHS-I
class 10 card and so does several others with good results.
The way this works is that you change the ramdisk so that it mounts /data to the second partition of your micro sd. Your internal
storage (the old /data partition) will be mounted as /data2.
Requirements
1. Unlocked and Rooted
2. You MUST repartition your Micro SD. The .zip you flash will mount /data to mmcblk1p2, which basically says "mount /data to the
second partition in the external SD." also, the ramdisk expects that partition to be ext4, so essentially:
Make sure you have an external SD with at least two partitions and that the second partition is formatted to ext4. I use fat32 on the first partition
because it's recognized by most devices.You will also need to make both partitions "primary" partitions. I personally use Gparted to repartition
my stuff, but feel free to use whatever you like. Even if you're on windows you can still use gparted by using virtualbox, or you can use a tool
called MiniTool Partition Wizard, I haven't tried it myself but it is reported to be good.
3. Research your Micro SD, find out if it has good random write speeds. There is no use in this mod if you card is slower than your internal
memory.
4. Although it's not a requirement it is a recommendation to have gone through the Nvflash procedure. It has saved alot of people from bricks
and is just great to have.
5. Verify that the .zip is compatible with your ROM, if it is not listed feel free to ask for a version for your preferred ROM.
Disclaimer
I take no responsibility for whatever happens to your device using this MOD, it is flashing a kernel so take precautions!
Installation
1. Boot to recovery, flash your preferred ROM
2. Reboot to initial setup (Don't run through)
3. Reboot to recovery, flash the matching Data2SD.zip
4. Disable journaling (Optional on all ROMs except CleanROM)
5. Reboot
When it reboots you will get a blue progress bar and it will be just as you flashed a new rom, you'll get the device setup screen.With my
MicroSD I get about twice the Random Write speed with this mod; Internal=0.20mb/s External=0.40mb/s . We will have a look at doubling
these figures further down (I currently have Random write speed average of 0.8mb/s).
Reverting
Flash a ROM
Feel free to ask any questions!
MD5 checksum for cm10-1025data2sd : 78b9e62e27204efeb0bdd3c926c4a30a
MD5 checksum for CleanROM2-3Data2SD: 60eef4e666ec97216ee0801189233719
MD5 checksum for clemsyn's 600 OC kernel ver8: e07b4a5a5f7ae2976a86460e5309199a
MD5 checksum for clemsyn's 650 OC kernel ver8: cf6d36da2d26db2e72c1c110a87cad7f
MD5 checksum for clemsyn's 650 OC kernel ver22: 1ec0e9c5c5ac7b012e3095f03f7dd234
Modded Recovery
Enough with the screenshots, I think people know what it's all about by now!
TWRP 2.3.1.0 Data2SD Edition
Modded by flumpster, thanks a million!
Attached is a version of the latest TWRP recovery, the only mod done is changing where
it mounts /data so it backs up the correct partitions!
Backup to External will backup to your first partition (fat32 maybe) and backup to internal will
backup to your ext4/2 partition.It is recommended to back up to external which is the fat partition.
If you backup to internal which is now the ext partition and something goes wrong with that partition
you wont have access to your backup.
Instructions:
You must remove the old twrp settings from your prime for this to work correctly. Delete any
TWRP folders that are in sdcard, data2/media and removable/sdcard. If you have backups there
already that you want to keep leave the backups folder in the TWRP directories and then just
delete the files that are in the root of the TWRP folder to get rid of the settings left behind.
If you are on a windows pc just extract the zip somewhere and run the bat file and then follow the
onscreen instructions. It will flash it for you. If not, navigatate to the fastboot folder, find the .blob
and flash the usual way with fastboot.
I have tested it myself but would love some feedback on this as I am currently the only one testing.
Disabling journaling!
This is a mod that flumpster tested and found to work fine. I have tested it to and it is fast as a shark. It is somewhat
controvertial though, someone thinks disabling journaling on the ext4 file system could cause crashes. Also if you are
plagued with random reboots it can cause data loss. I've been running it for a couple of days without issues and getting fantastic results.
Here is a description on how to do it if you want to try:
To Disable Journaling in EXT4
Go into TWRP and then open a command prompt on your computer where adb is.
Type adb shell and enter it then type the following commands one at a time.
umount /data
umount /sdcard
e2fsck -f /dev/block/mmcblk1p2
tune2fs -O ^has_journal -c 1 -i 1d -m 0 /dev/block/mmcblk1p2
e2fsck -f /dev/block/mmcblk1p2
Watch out for the fourth line, after tune2fs - that is a capital O not a zero. The one further along the line is a zero.
To check if it has worked type the follwing after them
tune2fs -l /dev/block/mmcblk1p2 | grep features
If you don't see has_journal in the output all is good.
And the size of the ext4 partition should be?
I was planning on taking a stab at porting this project to the TF700 this weekend. Thanks for your work! Going to test ASAP.
maxrdlf95 said:
And the size of the ext4 partition should be?
Click to expand...
Click to collapse
That is up to you really, the ext4 partition will be your new "internal storage" so if you if you need to store alot there like big games etc. you'll need more. If like me you have little use for internal storage you increase the size of first partition. I have 49gb fat 32 as my first partition and 11gb ext4 as my second.
I transfer movies etc. from a windows machine to the fat32 partition.
Good question though, I should have mentioned it in the OP.
Sent from my ASUS Transformer Pad TF700T using xda premium
The mysterious CheckROM that you've mentioned twice is just CleanROM, right?
Kisakuku said:
The mysterious CheckROM that you've mentioned twice is just CleanROM, right?
Click to expand...
Click to collapse
Yes, of course. Thank you for pointing that out, I've used CheckROM on another device so it got mixed up. OP updated.
fordwolden said:
Data2SD MOD: Moves /data partition to External SD
Click to expand...
Click to collapse
This looks very interesting!
fordwolden said:
Disabling journaling!
Click to expand...
Click to collapse
Actually the ROM does this during install. However on 2.0 it was causing issues with the latest TWRP so I temporarliy took it out.
It ended up being a twrp issue. IM going to put it back in for version 2.1 (with will be 10.4.4.18 based) and revert to the old version of twrp. The newer 2.3.x builds dont seem as reliable at this time.
But good write up!
Also worth to mention that this mod makes it a little bit harder to do nandroids. But in TWRP you have a option to backup sd-ext, that will actually be a backup of your data partition. So to restore data you just restore sd-ext. All other partitions will backup and restore normally.
Edit: No longer applicable, sd-ext backup no longer supported. Modded TWRP recovery in post #2
fordwolden said:
Also worth to mention that this mod makes it a little bit harder to do nandroids. But in TWRP you have a option to backup sd-ext, that will actually be a backup of your data partition. So to restore data you just restore sd-ext. All other partitions will backup and restore normally.
Click to expand...
Click to collapse
heh... i was just going to ask about that. thanks for the clarification.
fordwolden said:
Also worth to mention that this mod makes it a little bit harder to do nandroids. But in TWRP you have a option to backup sd-ext, that will actually be a backup of your data partition. So to restore data you just restore sd-ext. All other partitions will backup and restore normally.
Click to expand...
Click to collapse
People really use Nandroid? lol :angel:
scrosler said:
People really use Nandroid? lol :angel:
Click to expand...
Click to collapse
Some feel more comfortable doing it! I feel like it's "bringing a knife to a gunfight"! False safety.
Since the 12/10 update to .18 that I installed just yesterday my performance skyrocketed. I don't experience any lag anymore, no hickups, much faster loading etc. I suddenly don't feel like this tablet was a waste of money anymore
It's all stock and normal.
So if you don't have this update yet, try it out before trying anything like this.
Would there be any way of getting this working on a rooted stock FW?
I saved root before updating to JB so I'm going to stay unlocked for as long as I have warranty.
Moning2 said:
Since the 12/10 update to .18 that I installed just yesterday my performance skyrocketed. I don't experience any lag anymore, no hickups, much faster loading etc. I suddenly don't feel like this tablet was a waste of money anymore
It's all stock and normal.
So if you don't have this update yet, try it out before trying anything like this.
Click to expand...
Click to collapse
Gospel singers from the General section? Now that's a first for me! I'm glad you're happy with your tablets,
now try downloading CleanROM 2.1 while multi-tasking on your device, still happy? I bet you want to unlock
before the download is finished!
New version for CleanROM 2.1 coming up, sorry for the delay. Been getting some sleep and my Inet connection
is about as stable as Uranium!
New version has symlinked /data2 partition so your internal storage will now be found in /sdcardi. Just for ease
of use.
rikc said:
Would there be any way of getting this working on a rooted stock FW?
I saved root before updating to JB so I'm going to stay unlocked for as long as I have warranty.
Click to expand...
Click to collapse
You meant going to stay locked, right! No, sorry this is not possible for locked bootloaders.
fordwolden said:
You meant going to stay locked, right! No, sorry this is not possible for locked bootloaders.
Click to expand...
Click to collapse
Ok, thanks, that's clear!
I want this on stock rooted unlocked ROM
fordwolden said:
New version for CleanROM 2.1 coming up, sorry for the delay. Been getting some sleep and my Inet connection
is about as stable as Uranium!
.
Click to expand...
Click to collapse
Oh come on, Uranium has been around Earth for four and a half billion years and it's still here, can't be that unstable
Gesendet von meinem GT-N7000 mit Tapatalk 2

[Q] SD-EXT on SGS4G with CM9?

I'm currently running bhundven's herring CM9 with no kernel modifications and CWM 6. I find that the internal storage for this phone is very low and only holds a small amount of applications, especially since many apps seem to not want to install at all (about 3/4 of the time I try to install things, I get either "Package invalid" or "Insufficient space available", which is extremely annoying and might be a separate problem).
Is there any way that I can get sd-ext to work on this phone with this setup? I'd rather not switch kernels (I'd love to get TWRP recovery but the flashable doesn't work for me and I don't want to switch kernels).
cpkelley94 said:
I'm currently running bhundven's herring CM9 with no kernel modifications and CWM 6. I find that the internal storage for this phone is very low and only holds a small amount of applications, especially since many apps seem to not want to install at all (about 3/4 of the time I try to install things, I get either "Package invalid" or "Insufficient space available", which is extremely annoying and might be a separate problem).
Is there any way that I can get sd-ext to work on this phone with this setup? I'd rather not switch kernels (I'd love to get TWRP recovery but the flashable doesn't work for me and I don't want to switch kernels).
Click to expand...
Click to collapse
I haven't used it but this app should do the trick.
https://play.google.com/store/apps/details?id=eu.codlab.int2ext
Let me know if it works.
I prefer Mounts2SD, which lets you completely configure things. I was running PACman with cache and dalvik offloaded which worked quite well. And free is a good price.
https://play.google.com/store/apps/details?id=com.spazedog.mounts2sd
That seems like it just switches the internal and external storage, not making an ext partition on the SD card. But can things like this really be done through an app? I thought these things had to be done through init.d or build.prop scripts.
Sent from my SGH-T959V using xda app-developers app
The app creates an init file. Or so it appears. Like I said I don't use it. It seems that raze does and I'd defer to him here. Either his app or the one I linked should work fine.
Thanks (given) to both of you. And any ideas on what else might be causing the invalid packages when downloading from the play store? It happens even though I have much more free app space than I would need (eg. I had 119 MB of free space and a 30 MB app download failed).
EDIT: Just tried using Mounts2SD, but it couldn't find the sd-ext partition. Do I need to create that manually, and how?
Sent from my SGH-T959V using xda app-developers app
Titanium backup had a feature to integrate app updates into the Rom.
Sent from my SAMSUNG-SGH-I547 using xda app-developers app
Another way is to create ext4 partition (about 1G is usually enough) on you SD card with free MiniTool Partition Wizard and then use Link2SD to link apps/dalvik to this partition. I've been using it like this for a long time and it works fine. There are plenty of guides on the Web how to do that.
I used CWM or TWRP to create the sd-ext partition. You need to create that first somehow... if MiniTool Partition Wizard will do it without wiping the sdcard, that's better than recovery though.
My method was boot to recovery, mount sdcard, copy everything to computer HD, unmount sdcard, partition sdcard with 2 GB sd-ext (because I wanted lots of space, but I'd probably cut it down to 1 GB next time), mount sdcard, copy everything back from computer HD, unmount sdcard, reboot to system. Then launch Mounts2SD, pick what format you want the sd-ext in (FAT or ext2 are the fastest, but you can take ext3 or ext4 if you're not going to just disable the safety features) and what stuff you want moved over.
Edit: Just found this link, which I haven't used but which explains how to do the sd-ext with MiniTool... apparently MiniTool DOES still wipe the partitions though, so you may as well just use CWM/TWRP and make your life easier.
http://forum.xda-developers.com/wik...#using_MiniTool_Partition_Wizard_Home_Edition
Theraze said:
I used CWM or TWRP to create the sd-ext partition. You need to create that first somehow... if MiniTool Partition Wizard will do it without wiping the sdcard, that's better than recovery though.
Click to expand...
Click to collapse
MiniTool will wipe the sd card to create the new partition as well. I wish there was a way to do it without wiping the card but there is not. So back that stuff up first.
Madein Cyberspace said:
MiniTool will wipe the sd card to create the new partition as well. I wish there was a way to do it without wiping the card but there is not. So back that stuff up first.
Click to expand...
Click to collapse
I used GParted to partition my SD card. NO WIPING. Move, resize, add partitions.
nevkuril said:
Another way is to create ext4 partition (about 1G is usually enough) on you SD card with free MiniTool Partition Wizard and then use Link2SD to link apps/dalvik to this partition. I've been using it like this for a long time and it works fine. There are plenty of guides on the Web how to do that.
Click to expand...
Click to collapse
Yes, but our herring kernel does not support EXT4 partition, I tried it myself
and it didn't work. I had to create EXT3 which is supported by almost all kernels.
Eh, my results varied. Worked fine for me with ext4. And worked fine for my wife as well.
Rebel_X said:
Yes, but our herring kernel does not support EXT4 partition, I tried it myself
and it didn't work. I had to create EXT3 which is supported by almost all kernels.
Click to expand...
Click to collapse
The OP says he's running CM9. That's what I'm running but I use Proton kernel as CM9 kernel has a video bug, and ext4 partition works just fine for me. Strange if Bryan really removed ext4 support, it's just a line in the config file.
Successfully made the partitions last night but my phone won't mount the SD card anymore. Was trying ext3, I'll try ext2 and ext4.
EDIT: Fixed the problem, changed my partition to ext2 and set both partitions to "Primary" (not sure which one did the trick).
cpkelley94 said:
Successfully made the partitions last night but my phone won't mount the SD card anymore. Was trying ext3, I'll try ext2 and ext4.
Click to expand...
Click to collapse
Make sure that you make the first partition Primary/FAT32. This will be your normal SD card. Just take about 1GB of space from it at the end. Then make second partition Primary/ext4 with size to the end of the card. You can try ext2/3 but I don't think it is really necessary.
MiniTool will NOT wipe your partition if you do it right.
dsexton had a guide posted on how to do it.
Is it worth making a swap partition? If I remember correctly it significantly degrades the life of the SD card (and microSD's are delicate as it is), and I don't know if it would significantly increase performance.
cpkelley94 said:
Is it worth making a swap partition? If I remember correctly it significantly degrades the life of the SD card (and microSD's are delicate as it is), and I don't know if it would significantly increase performance.
Click to expand...
Click to collapse
I also created 128MB swap partition, not supported too and not mounted.
I tried to used swapper2 app from the market, but it says not supported by
kernel. Now I lost that space till I feel motivated to format or repartition the SD
card again.
I am using hefe kernel btw on AOKP milestone 6-5.
No swap.
Sent from my SGH-T959V using xda app-developers app

Categories

Resources