[MOD][2016-11-01][V3.01]TURBO DATA - Get an 8GB Data-Partition ... - HTC Sensation

TURBO DATA - Get an 8GB Data-Partition!​
Use SD-EXT as new Data partition​
presented by​
~~~~~~~~ delta-roh ~~~~~~~~ ​
HIT THANKS for delta-roh (1st post) ​And, please, don't forget to Rate this Thread - thank you!​
You love your Sensation, but:
The 1 GB of the data partition limits you?
You don't like Link2SD?
You don't want to use the to SDCard feature?
You don't want to use data2sd or similar scripts?
You are afraid of broken links?
Then this is the Turbo for your HTC Sensation​
Features of TURBO DATA
Version 3.01 (release date 01st Nov 2016)
new corrected error in cpio to support 2nd level subdirectories
new Mod for Ivanich CM11 to get Data on SD-Ext, but have Dalvik internally (FAST!!!) - refer to Post 2
Version 3.00 (release date 29th Mar 2015)
new now my Delta-Roh cpio.bat is integrated
new Delta-Roh cpio without cygwin! - all tools integrated als always
new No need of Windows 8.1 administrative rights (as for cygwin)!
new Now manual changes can be done to all scripts of the ramdisk
new Very easy handling!
new This version now also supports ViperS-Roms!
new If you like, you can download only the Delta-Roh cpio package (see below)
Version 2.02 (release date 02nd Mar 2015)
new now also handles .img (boot-Image files)
new added loop for performing patterns more flexible
new added patch check - exit if no pattern was found
new added ramdisk size check
Version 1.04 (release date 21st Feb 2015)
First Version by delta-roh
new handles normal flashable zip, that include a boot.img
new works fully automatically
new support of command line call
new Drag+Drop support
new A lot of checks to make the procedure safe
new Writes a logfile parallel to the screen output
new Does not change your original zip
new the resulting zip can be flashed directly
Click to expand...
Click to collapse
Idea:
Our beloved Sensation comes only with 1 GB of available internal memory and that is too less to work, even if you don't install a lot of games. When I tried several thinks (app2sd, app2sd-ext, Link2SD etc.) I recognized, that modern SD-Cards are very fast and our Sennsation has got a very good interface to suppport high speeds. Even better, the SD-Cards of SanDisk (SanDisk Extreme Pro, SanDisk Extreme Plus and SanDisk Extreme) are even faster, than the internal memory. Therefore I got the idea, to make a seperate external SD partition (SD-Ext) to the new Data partition. It works flawlessly and fast. But how does it work? The first step of the Android startup process is to mount the boot image and to mount a ramdisk, that is part of the boot image. In this ramdisk you will find the mount table for the primary partitions - it is called fstab.pyramid. Here you will find, that the data partition is mounted to /dev/block/platform/msm_sdcc.1/by-name/userdata or to /dev/block/mmcblk0p23. The only thing to do is, to change this to /dev/block/mmcblk1p2, which is the second partition of the SD-Card.
The attached ZIP now contains a Batch file together with all necessary tools to do this job for you completely automatically. It extracts the boot.img file from your flashable zip, extracts the kernel and the ramdisk.gz, unpacks the ramdisk, patches the fstab.pyramid as described above, repacks the ramdisk, repacks the boot.img, makes a copy of the original flashable zip, exchanges the boot.img in this new zip - done! You have got a new flashable zip, that will mount the second SD-Card partition as your new data partition. I do this with an 8 GB sd-ext partition and therefore now have got a Sensation with 8 GB of available internal memory - no need to care about memory or tools like Link2SD any longer!
Click to expand...
Click to collapse
Installation:
Take these steps:
the attached zip contains the batch and all needed utilities
extract the directory tree in the zip to a location on your Windows harddisk
place your flashable zip or boot-Image in the main directory which also contains this batch
open a cmd-windows by clicking "Start here.bat"
call "MakeNewImage" with your flashable zip or boot-Image: MakeNewImage <your-rom-or-image.zip>
or
just Drag+Drop your flashable zip or boot-Image to MakeNewImage.bat
after processing you will find the new flashable zip or boot-Image in the subdir "new"
all original parts (boot.img, kernel, ramdisk(.gz)) are in the subdir "original"
all new parts (boot.img, kernel, ramdisk(.gz) and your new flashable zip) will be in the subdir "new"
if you call the batch another time (or Drag&Drop a new image to MakeNewImage.bat, the complete subdirs will be deleted before processing the new fashable zip; the batch will then create the directories again with the new parts
if you like, you can make additional changes to the fstab.pyramid or init.rc ...
Click to expand...
Click to collapse
YOU MUST READ THIS OR YOU WILL BRICK YOUR DEVICE:
You have to know this - read carefully:
Tested with a lot of CM11 and CM12 Roms
It will only work for fashable zips that contain a boot.img, like @SultanXDA CM11, @ivanich CM12, @shantur CM12 - it will NOT work e.g. for @mike1986 Android Revolution, as this does not contain a boot.img.
ViperS 5.2.1 / Viper 5.3.0 do not work at the moment.
You should only make your sd-ext to the new /data partition if you have got a highspeed sd-card e.g. SanDisk Extreme-series; otherwise it will work, but your Sensation will slow down.
You need a sd-ext partition on your sd-card as second (!) partition (/dev/block/mmcblk1p2); create it within the recovery or use e.g. MiniTool Partition Wizzard and create a first partition as primary fat-formated and a second partition as primary ext4 formated. IF YOU HAVE NOT A SECOND PARTITION, YOUR DEVICE WILL NOT BOOT!
This is ONLY for the HTC Sensation/XE; it can work also for flashable images of other devices, but then you have to make your changes to fstab and/or init.rc manually!
After flashing the new image the /data partition will be created on the second SD-Card partition (sd-ext).
After booting for the first time you can restore a backup by using e.g. Titanium.
If you want to look at /data within the recovery you have to mount sd-ext and then flash the Aroma Filemanager; there you can see the complete data partition by browsing to sd-ext.
You can make a nandroid backup within the recovery. Note, that the sd-ext tar file is your (new) data partition.
If you want to go back, then just flash a nandroid of a former backup or flash a not patched zip and make a clean installation.
If your rom thread provides a seperate zip for the kernel, then have a look at the provided zip! If it contains a boot.img, then it has to be patched at first by using MakeNewImage.bat in the same way as with a complete rom. If the kernel zip does not contain a boot.img but only the kernel, then you can flash it directly.
If you want to wipe Dalvik-Cache you can't do it with the "wipe Dalvik"-command in Recovery; instead go into Recovery, mount sd-ext, flash the Aroma Filemanager or use the TWRP-Filemanager, navigate to the directory sd-ext (your new /data) and delete the directory dalvik-cache.
You can not restore a data partition from a former installation to sd-ext, because the tar file also stores the partition name and, therefore, does not restore a data file to the sd-ext partition, even it you rename the backup file. As said before: Make a clean installation and then restore via e.g. Titanium.
Click to expand...
Click to collapse
Thanks:
Special thanks to:
carliv (http://forum.xda-developers.com/member.php?u=5186178)
for mkbootimg.exe (https://github.com/bgcngm/mtk-tools)
GnuWin32 (http://gnuwin32.sourceforge.net/packages.html)
for sed.exe and grep.exe (libiconv2.dll, libintl3.dll, pcre3.dll, regex2.dll)
Igor Pavlov (http://www.7-zip.de/)
for 7z.exe and 7z.dll
Karl M. Syring (http://unxutils.sourceforge.net/)
for dd.exe, gzip.exe, od.exe, printf.exe, rm.exe, sha1sum.exe, tee.exe
@danishaznita for testing the first version
Click to expand...
Click to collapse
USE IT AT YOUR OWN RISK - NO SUPPORT! READ SECTION 'MUST READ' ABOVE CAREFULLY!​
DOWNLOAD TURBO DATA MOD V3.01​
DOWNLOAD Delta-Roh cpio Package V1.51 (already integrated in Turbo Data Mod)​
If you like my work, press​
THANKS for delta-roh ​
And, please, don't forget to rate this thread - thank you!​
If you want to use my work, please don't ask for permission, but leave my headers in my files, make a reference to me in your thread and respect the other persons in the thanks section, if you use their tools.​
copyright by delta-roh 2016

Reserved
Mod for Delta-Roh MakeNewImage-V3.01
EXPLICITLY for Ivanich CM11 ONLY!!!
This mod mounts a sd-ext partition to /data and leaves the dalvik-cache on the internal
memory. Therefore you will get e.g. an 4 GByte (depends ob your sd-ext partition size) data
partition and the original 1.1 GByte internal memory as additional and fast memory for
the dalvik cache. This is the fastest way regarding the porformance of the Sensation.
Installation:
- Download and extract "Delta-Roh MakeNewImage"
- start "MakeNewImage.bat" with "cm-11-20160810-UNOFFICIAL-pyramid.zip"
- answer the question "Do you want to auto-patch fstab [y/n]" with "n" (no) - don't close the command box!
- an explorer will open in the subdir of the new ramdisk, now do the following mods:
--- override the existing "init.rc" with the new one from this zip (Download below)
--- override the existing "fstab.pyramid" with the new one from this zip (Download below)
--- create a new directory "data0" in addition to the already existing data directory
--- copy/paste (press Ctrl-C then Ctrl-V) the file "data.attrib"
--- rename the new file ("data - Copy.attrib" or named similar) to "data0.attrib"
--- now you can close the Explorer and answer the question "Manual changes finished [y/n]" with "y" (yes)
Now you will get a "sdext_cm-11-20160810-UNOFFICIAL-pyramid.zip" that can be flashed.
NOTE: You will need a sd-ext partition on your sd-card.
DOWNLOAD Ivanich CM11 DATA MOD​

I think this a great idea, many thanks. I've been wanted to do it the since you mentioned the other day, I wanted a new phone too xD Well I did it today and then just seen your post. I did it on PC though (Linux) and mounted userdata as dalvik-cache so easy to wipe and maybe quicker loading (in theory). I may have mounted it differently to you (see screenshot), and are your attributes/flags the same?

hinxnz said:
I think this a great idea, many thanks. I've been wanted to do it the since you mentioned the other day, I wanted a new phone too xD Well I did it today and then just seen your post. I did it on PC though (Linux) and mounted userdata as dalvik-cache so easy to wipe and maybe quicker loading (in theory). I may have mounted it differently to you (see screenshot), and are your attributes/flags the same?
Click to expand...
Click to collapse
My Turbo Data mounts sd-ext to data (same to you) but don't mounts the old data to the dalvik-cache, because I have a SanDisk Extreme Plus and it is faster than the internal memory xD
BTW, my batch works completely with Windows and even without cygwin. At the moment I am working at a cpio batch that works with Windows without elevated rights and without cygwin as well...... xD
Question: what did you do to mount dalvik-cache to the original data partition? And which Filesystem manager did you use in the screen shots?

delta-roh said:
My Turbo Data mounts sd-ext to data (same to you) but don't mounts the old data to the dalvik-cache, because I have a SanDisk Extreme Plus and it is faster than the internal memory xD
BTW, my batch works completely with Windows and even without cygwin. At the moment I am working at a cpio batch that works with Windows without elevated rights and without cygwin as well...... xD
Question: what did you do to mount dalvik-cache to the original data partition? And which Filesystem manager did you use in the screen shots?
Click to expand...
Click to collapse
Yeah I must have the same SDcard as you by the sounds of it xD have so for ages and probably the reason I've been using Mounts2SD for so long but yeah got sick of it not working as expected as CM12/Android 5.x matures. Thanks to your idea/earlier post though and a bit of mucking around with it as I did have a few hiccups, eg. offset ramdisk address, all went well in the end and is quite a simple process once the know how. Over the time of using M2SD I felt like write speeds were slower (not actually tested but just how it felt) hence the reason why I use the f2fs file system on the sd-ext and I didn't want to leave my internal data partition all alone and unused. I was deciding and still am really for what to use it for, first ideas was for private storage or for app data but then I thought Dalvik-cache could be good because wiping it would be easier without modifying recovery or applying a script. I did this all on native linux (ubuntu) with a few binaries added, I was thinking of making a flashable zip to do the whole process if possible and I think it is but would be a bit of experimenting process and don't really have the time as yet and also you have got this underway already, so I probably wont. I don't mind posting the binaries I used and what I did if it will help, maybe you'd be into creating a version that doesn’t require a PC. The file manager I'm using is FX File Explorer (pro), I only just switched to it, well bout a month ago and I find it a good alternative to ES or Root explorer, it also has the material design theme which goes nicely with CM12 and has 90% of all the necessary features I need. I mounted internal data with fstab which I've attached for you and I've linked the /data/dalvik-cache/arm directory to it. You can name the internal data partition to whatever you like too.
This also could be good for those that corrupted their data partition too that was caused by the twrp recovery version from their site (not ivanich's version).
This is also good because I don't have to link things like Googles Drive cache to sd-ext anymore, for example it caches a copy into data say from a ROM downloaded with it.
Edit: Just checked my SDcard and it older than yours and probably not as quick but mines a 32Gb SanDisk Ultra SDHC-I and works fast enough for now.

hinxnz said:
Yeah I must have the same SDcard as you by the sounds of it xD have so for ages and probably the reason I've been using Mounts2SD for so long but yeah got sick of it not working as expected as CM12/Android 5.x matures. Thanks to your idea/earlier post though and a bit of mucking around with it as I did have a few hiccups, eg. offset ramdisk address, all went well in the end and is quite a simple process once the know how. Over the time of using M2SD I felt like write speeds were slower (not actually tested but just how it felt) hence the reason why I use the f2fs file system on the sd-ext and I didn't want to leave my internal data partition all alone and unused. I was deciding and still am really for what to use it for, first ideas was for private storage or for app data but then I thought Dalvik-cache could be good because wiping it would be easier without modifying recovery or applying a script. I did this all on native linux (ubuntu) with a few binaries added, I was thinking of making a flashable zip to do the whole process if possible and I think it is but would be a bit of experimenting process and don't really have the time as yet and also you have got this underway already, so I probably wont. I don't mind posting the binaries I used and what I did if it will help, maybe you'd be into creating a version that doesn’t require a PC. The file manager I'm using is FX File Explorer (pro), I only just switched to it, well bout a month ago and I find it a good alternative to ES or Root explorer, it also has the material design theme which goes nicely with CM12 and has 90% of all the necessary features I need. I mounted internal data with fstab which I've attached for you and I've linked the /data/dalvik-cache/arm directory to it. You can name the internal data partition to whatever you like too.
This also could be good for those that corrupted their data partition too that was caused by the twrp recovery version from their site (not ivanich's version).
This is also good because I don't have to link things like Googles Drive cache to sd-ext anymore, for example it caches a copy into data say from a ROM downloaded with it.
Click to expand...
Click to collapse
You mounted userdata to /dalvik-cache and I suppose you then changed the init.rc to link the dalvik-cache to /dalvik-cache - right?

delta-roh said:
You mounted userdata to /dalvik-cache and I suppose you then changed the init.rc to link the dalvik-cache to /dalvik-cache - right?
Click to expand...
Click to collapse
Yes that is correct.
Code:
# symlink dalvik-cache to internal location
symlink /dalvik-cache/arm /data/dalvik-cache/arm

hinxnz said:
Yes that is correct.
Code:
# symlink dalvik-cache to internal location
symlink /data/dalvik-cache/arm /dalvik-cache/arm
Click to expand...
Click to collapse
Why not this way?
Code:
symlink /data/dalvik-cache /dalvik-cache

delta-roh said:
Why not this way?
Code:
symlink /data/dalvik-cache /dalvik-cache
Click to expand...
Click to collapse
I did it this way because in the past, I've had issues with linking dalvik-cache to other locations due to SELinux but only on later versions of Android 5.x though.
But then again I haven't tried this approach with this configuration yet.

thanks delta roh..
so, at least how much R/W speed that need run this?
based on Sandisk Extreme spec, min speed is around 60MB/s for read. is it correct?

phan_tom said:
thanks delta roh..
so, at least how much R/W speed that need run this?
based on Sandisk Extreme spec, min speed is around 60MB/s for read. is it correct?
Click to expand...
Click to collapse
Sandisk Extreme is the highest u can go , i think any Class 10 sdcard can handle this , but with a little lower speed
Sent from my Note 2

phan_tom said:
thanks delta roh..
so, at least how much R/W speed that need run this?
based on Sandisk Extreme spec, min speed is around 60MB/s for read. is it correct?
Click to expand...
Click to collapse
The internal memory (original /data) has got about 30 MB/s read and about 15 MB/s write speed. The card has to match these values. But the speed declarations of the cards are allways higher, than they are in real life! A SanDisk Extreme matches these speeds in real live. The Extreme Plus and Pro are better and will give you REAL FUN!
Just try it - to have a Senni with e.g. 8GB internal memory is awesome!

danishaznita said:
Sandisk Extreme is the highest u can go , i think any Class 10 sdcard can handle this , but with a little lower speed
Sent from my Note 2
Click to expand...
Click to collapse
Right! Having 8GB of internal memory and no mem-problems any more is also worth a little bit less speed (in the case you got no SanDisk Extreme). BTW: Thank you for testing the pre-releases and did you try the release 1.04?

Unfortunately,
Your method does NOT suits me fine - extremely laggy and slow.
I have tried it with the latest ivanich CM11 and CM12 builds.
I have preliminary made an 8Gb ext4 partition on my 32GB class 10 MicroSD card.
I always set governor to intellidemand, clock to 1242MHz and use cfq for I/O.
Will test Links2SD method now.
Nevertheless,
keep up the good work!

ChimeyJimmey said:
Unfortunately,
Your method does NOT suits me fine - extremely laggy and slow.
I have tried it with the latest ivanich CM11 and CM12 builds.
I have preliminary made an 8Gb ext4 partition on my 32GB class 10 MicroSD card.
I always set governor to intellidemand, clock to 1242MHz and use cfq for I/O.
Will test Links2SD method now.
Nevertheless,
keep up the good work!
Click to expand...
Click to collapse
I tried the CM12 build of ivanich and it has got an extrem low performance of the runtime environment (in Antutu 77 compared to Sultans CM11 with 900) and I tested it with dalvik-cache in the data partition and not on sdext. It seems as if the runtime system was compiled with debug options.

delta-roh said:
I tried the CM12 build of ivanich and it has got an extrem low performance of the runtime environment (in Antutu 77 compared to Sultans CM11 with 900) and I tested it with dalvik-cache in the data partition and not on sdext. It seems as if the runtime system was compiled with debug options.
Click to expand...
Click to collapse
Huh I just downloaded Antutu from playstore to test myself, still on the same configuration and my score is way higher than you got on CM12 and even higher than your CM11 score, only ran the benchmark once so it not like the highest out of several either on stock frequency, governor, scheduler etc.

Will it work on viper sense5.0 and what if my mcard crashes because sometimes it stops working and I have to format my mcard. So what if it crashes will it affect my senny

cutejerk420 said:
Will it work on viper sense5.0 and what if my mcard crashes because sometimes it stops working and I have to format my mcard. So what if it crashes will it affect my senny
Click to expand...
Click to collapse
Nobody is able to answer these questions. Normally SD-Cards are absolutely stable. Make a regular nandroid backup e.g. every day.

hinxnz said:
Huh I just downloaded Antutu from playstore to test myself, still on the same configuration and my score is way higher than you got on CM12 and even higher than your CM11 score, only ran the benchmark once so it not like the highest out of several either on stock frequency, governor, scheduler etc.
Click to expand...
Click to collapse
Remarkable! Please post your configuration - do you use F2FS and on which partitions?

delta-roh said:
Remarkable! Please post your configuration - do you use F2FS and on which partitions?
Click to expand...
Click to collapse
I use f2fs on sd-ext and ext4 on userdata, I use the fstab which I posted earlier and added the symlink to init.rc, on line 319 to be exact xD
Unpacking, repacking and making boot image was done on Linux, not sure if that would make a difference though.

Related

[Q] Multi-Booting

Hi,
It just came into my mind. Since we can have custom recovery and android recovery also boots, can we have multi boot option in Defy as like in a PC's
Good question ..............i think there is no answer for this question
rvd_516 said:
Hi,
It just came into my mind. Since we can have custom recovery and android recovery also boots, can we have multi boot option in Defy as like in a PC's
Click to expand...
Click to collapse
some resources would have to be used by both ROMs..
with the current hacks it can't be done easily.
i guess some way of ramdisking the shared resources will have to be used.
basically, if you think about a hack for defy ask first:
can it be done in a completely open (=bootloader not locked) phone like nexus ?
if yes, ask:
is it WORKING?
if yes also, so maybe it can be done.
nevertheless, it's easy enough to create a script to backup & restore NANDROIDS.
but then every switch between roms will take like 25+ minutes, so it won't be a real multiboot.
Somebody at one point on the desire was working on something like this. Run rom from nand and other rom from sdcard.
Ephumuris.
ephumuris said:
Somebody at one point on the desire was working on something like this. Run rom from nand and other rom from sdcard.
Ephumuris.
Click to expand...
Click to collapse
I think there are two possibilities for this to happen: first of all, we should try NAND boot for the primary ROM, and try somehow to load the secondary ROM from the internal memory (it'll be faster than the SD Card, I think). The problem here would be allowing the bootloader to read from internal memory instead of NAND. I know this can be done based on the number of WinMo-Android and iOS-Android dual boot solutions, with a menu to choose which system to load, in the boot screen.
The second option is the method used by Wing Linux to run Android on old WinMo devices. In this method, you MUST boot in WinMo (or, in our case, in the primary ROM), then open the app that loads Android (the secondary ROM, for us). Android does NOT run emulated in this method, but, since the device can't dual boot directly, the app sends a signal for the device to restart running from the bootloader to the SD Card (for us, internal memory). This second option is, somehow, like the System Recovery app (not 2ndInit), that has an option that reboots directly into Recovery. So, if we can tell the phone to load from custom Recovery (which is, in fact, in internal memory, not in NAND), I think it's possible to make it load an entire ROM from the internal memory (without having to mount it everytime and waiting for the dalvik-cache to load).
However, it's surely a hard work to do.
Yes one from nand and one from sd card..........good......can we partition nand and use it both on the nand itself??
it should really work if we use virtual images or sdcard-partitions instead of system, data and cache partitions.
This can be changed in the init.rc-file(of 2nd-init).
The creator of the 2nd-init-bootmenu should implement this feature.
it is possible... just need 2 new partitions ext3 on sdcard for data and system...
you can use 2nd-boot profile in bootmenu to change dev block links and customize mount settings
Epsylon3 said:
it is possible... just need 2 new partitions ext3 on sdcard for data and system...
you can use 2nd-boot profile in bootmenu to change dev block links and customize mount settings
Click to expand...
Click to collapse
Did you try it?
Epsylon3 said:
it is possible... just need 2 new partitions ext3 on sdcard for data and system...
you can use 2nd-boot profile in bootmenu to change dev block links and customize mount settings
Click to expand...
Click to collapse
even i like to know tht did u tried tht?
I managed to boot from virtual system,data and cache partitions with the 2nd-boot-option of bootmenu like ep3 said.
It was a bit difficult because android-init remounts /dev so the changes will be lost but now I found a way.
And: I got recovery working for the virtual system so you don't need to prepare your images, BUT: only the wipe and restore are working. "install zip" will still affect your real system.
My scripts need some testing but after that I will release a first version.
the multboot works for me i writed a cutsom boot sh and init.rc and woila WORKS!
NOT PUBLUC because it not works for all rom
---------- Post added at 04:59 PM ---------- Previous post was at 04:36 PM ----------
this is a dualboot rom
http://forum.xda-developers.com/showthread.php?t=1225179
So here is the first (very early) version of 2nd-boot:
http://www.multiupload.com/Z17M0WO3SU
Before continuing please make a backup of your phone!
Installation:
Just install it via CWM.
This will place the script in your 2nd-boot and replace the "CWM-Lastest"-script so it will install into the images. BUt can still use the "CWM-Stable" option for your normal system.
I've created 3 empty 300MB ext3-images for system,data and cache so you don't have todo that. Download them here:
http://www.multiupload.com/VY3U4IXRO1
Just copy the folder "fsimages" to your sdcard.
Usage:
After installing the update-zip and copying the files to the sdcard you can reboot into bootmenu, select "Lastest Recovery" and Restore an backup.
Please DO NOT install a ROM with a zip-file. Currently this will affect your real system.
After you restored your backup into the virtual file-system you can boot them with the 2nd-boot-option in bootmenu.
I successfully installed CM7.1 and MIUI-Pikachu-Edition in the virtual filesystem.
I uploaded a new version of my multiboot-script(v0.2)
changelog:
- "Install zip from SDcard" works now
- changed hook-method so it works with more ROM's(including ICS)
Download:
http://www.multiupload.com/UT0TLPR3ZW
m11kkaa said:
So here is the first (very early) version of 2nd-boot:
http://www.multiupload.com/Z17M0WO3SU
Before continuing please make a backup of your phone!
Installation:
Just install it via CWM.
This will place the script in your 2nd-boot and replace the "CWM-Lastest"-script so it will install into the images. BUt can still use the "CWM-Stable" option for your normal system.
I've created 3 empty 300MB ext3-images for system,data and cache so you don't have todo that. Download them here:
http://www.multiupload.com/VY3U4IXRO1
Just copy the folder "fsimages" to your sdcard.
Usage:
After installing the update-zip and copying the files to the sdcard you can reboot into bootmenu, select "Lastest Recovery" and Restore an backup.
Please DO NOT install a ROM with a zip-file. Currently this will affect your real system.
After you restored your backup into the virtual file-system you can boot them with the 2nd-boot-option in bootmenu.
I successfully installed CM7.1 and MIUI-Pikachu-Edition in the virtual filesystem.
Click to expand...
Click to collapse
Thanks for your work.
Did the 2nd android system boots from sdcard?
Yes, but it's very flexible. By changing 2 lines you can let it boot from whereever you want.
I prefer storing it at the data-partition because it's over 1gb in size and my apps are using 200mb only.
I'm looking forward to better bootmenu-integration and boot-image-selection but for that I have to figure out how to compile bootmenu.
m11kkaa said:
Yes, but it's very flexible. By changing 2 lines you can let it boot from whereever you want.
I prefer storing it at the data-partition because it's over 1gb in size and my apps are using 200mb only.
I'm looking forward to better bootmenu-integration and boot-image-selection but for that I have to figure out how to compile bootmenu.
Click to expand...
Click to collapse
Ask pedrodh http://forum.xda-developers.com/member.php?u=2098689
He can help.
Nice work, thanks i will add this soon, in the future bootmenu versions
m11kkaa said:
Yes, but it's very flexible. By changing 2 lines you can let it boot from whereever you want.
I prefer storing it at the data-partition because it's over 1gb in size and my apps are using 200mb only.
I'm looking forward to better bootmenu-integration and boot-image-selection but for that I have to figure out how to compile bootmenu.
Click to expand...
Click to collapse
I released a dual boot version that uses 2nd-boot a few months back, hadn't have much time to improve it since.
I was using loop-back mount with /system and bind mount with /data since it's much more space efficient than just use an ext3 image.
Awesome job. I think u shud create a new thread for it. Dual booting cm7 and miui :O
Sent from my Moto Defy

Firerats + Data2ext Complete Installation Guide: Now works with Sense roms!

This thread serves as a guide to install both firerats and data2ext mods on a single rom and have them work simultaneously.
I do not take any credit for the creation of any files mentioned or attached, nor methods for the installation of each individual mod, nor roms, gapps, or otherwise mentioned content. All credit goes to those who created each mod, rom, gapps, and the methods for installing each individually. I only claim responsibility for my own research and the order and hierarchy of steps below that combine these incredible feats of development into a working system of internal storage expansion and space management.
Even though it is impossible to brick your phone using the guide below, I am not responsible if you break your device, because you have willfully chosen on your own to void your warranty by rooting your phone and installing the mods mentioned below.​
To make firerats work with data2ext simultaneously, follow these over-detailed instructions EXACTLY. This is written so that anyone who has never held a smartphone in their lives can understand and do this right the first time, so those of you that know what you're doing, sorry about the length, but it should be pretty easy for you.
Note: I've uploaded some pertinent files from the following steps and added all links to all files needed so you don't have to go find them yourself. I did not include any roms, gapps, or the freespace app from the Play Store(just download from your phone, or from the link in step 6d). Links for all necessary files are in their respective steps below. The only links to a rom or gapps are for ICS. Otherwise you'll have to find and use your own downloaded roms and the correct gapps for your rom. If you would rather use the links below to download the files instead of using the ones I provided, be my guest.
I've updated this guide to make installation much easier and work with Sense roms!​
Now on to the good stuff!!
Steps 1 through 7a are written for you to collect the files necessary, and to prepare your phone, sd card, and recovery for the correct method of installation of the collected files.
Steps 8 through 10 are to install the mods.
Preparation
1. Be sure to start from scratch!!! This means an UNPARTITIONED, FULLY WIPED sd card, fully wiped and rooted phone, and fully wiped recovery. Fresh file downloads for roms, gapps, and other mods you like wouldn't hurt either. If your phone is not rooted, go here, it's the best and easiest root method I've found.
1a. If you already have a partitioned sd card, insert it into your computer via a microsd adapter or other means(you cannot use your phone for this; it will not recognize that it's partitioned), delete the partitions and wipe the card using partition management software on your computer. I recommend EASEUS Partition Manager 9.1.1 Home Edition(Windows users only). If you use this program, after you delete partitions on your sd card, you will be left with unallocated space. Create a partition that takes up the entire unallocated space and set it as a Primary and FAT32 file system(remember, only do this to your sd card, NOT THE C: DRIVE!!!!).
2. Boot to recovery(hold down home, press and release power, then release home once recovery shows up)
2a. Be sure you have a recovery that supports flashing unsigned .zip files. If your recovery does not support flashing unsigned .zip files, flash a rom and then the corresponding gapps that are signed(cyanogenmod roms and gapps are the easiest way to go), boot into rom, sign in, download rom manager from Market/Play Store, open rom manager, flash clockworkmod recovery, and boot to recovery.
3. Make sure you are using latest 5.5.0.4 recovery, found here.
3a. If you are not already using the 5.5.0.4, flash the 5.5.0.4.zip in your current recovery(or follow the instructions from step 2a if you cannot flash unsigned .zip files) and reboot back into recovery.
4. In your new recovery, make sure you wipe everything, and go to advanced>partition SD card. Choose whatever size you want to have as internal storage(the 'M' means Megabyte, if you didn't already know...). I use 1024M or 2048M(i.e. 1Gb or 2Gb), depending on what mood I'm in, but it works with any of them. Then choose 0M swap size and wait for it to process.
5. Wipe everything once again(just to be safe), including sd-ext, and place your rom and preferred gapps on sd card, along with any other flashable modifications you like to use(I use the sd card speed boost, which can be found here. 2048Kb works best for my card, a 16Gb Class 4).
Note: For ICS users only! I use official, larger ICS gapps, found here(download the one next to 4.0.X, the link will be: '20120429'). The smaller gapps, as well as the current best ICS rom, can be found in whoshotjr2006's thread, here.
6. Make sure you have the latest firerats(1.5.8), which can be found here.
6a. Don't use any of the alphas or betas. Just 1.5.8. Download only the recovery-v1.5.8-CustomMTD_S.zip and boot-v1.5.8-CustomMTD_S.zip and place on sd card. Create a .txt file named 'mtdpartmap' and type 'mtd XXX XX'. These X's represent the size in numbers that you want your /system and /cache partition sizes to be, and therefore will not actually be used. See step 6b or 6c, depending on what rom you'll be using, for information on how to determine the correct partition sizes/numbers to use. DON'T KEEP THE X's IN THE FILE! REPLACE THEM WITH THE NUMBERS YOU WILL USE AFTER YOU DETERMINE WHAT YOUR /SYSTEM AND /CACHE SIZES SHOULD BE!
6b. For ICS users: If you are using the official, larger gapps, type 'mtd 190 60' into the text file and save to sd card. If you are using smaller gapps, type 'mtd 190 30'. Proceed to step 7.
6c. For Non-ICS users: To find out what numbers to replace the X's with in your mtdpartmap.txt, first wipe everything and install only the rom and gapps you'll be using this mod with. Then boot into rom, sign in, and follow step 6d. After you do this, however, you will need to repeat steps 5 and 6a, then proceed to step 7.
6d. You can download 'freespace' from the Play Store, which needs root access, and will show you the total size and space remaining for each of the /system, /data, /cache, /sdcard, and /ext partitions, so you can change the numbers in your mtdpartmap file to what you want the /system and /cache to be that best suits the rom you want to flash. The first number after 'mtd' is for the /system partition, the second number is for /cache. You can't change the /data, because it is dependent on what you set the system and cache sizes to, and will be set to what you partitioned the sd card to anyways. Also, keep at least a 5Mb allowance over what you need for both /system and /cache partitions as you will run into force closing problems if there is no breathing room, especially for the /cache partition.
7. The data2ext thread and .zip file can be found here.
7a. Download the unCoRrUpTeD_data2extV2.2.zip at the bottom of the post and place on sd card. DO NOT FLASH!!!
Summary of what should be accomplished after following steps 1 through 7a: You should now be using CWM Recovery 5.5.0.4, have a partitioned sd card, wiped everything, and placed the boot-v1.5.8-CustomMTD_S.zip, recovery-v1.5.8-CustomMTD_S.zip, unCoRrUpTeD_data2extV2.2.zip, mtdpartmap.txt, the rom and correct gapps, as well as any other mods you want to use onto your sd card. If all of this is true, move to step 8. If not, go back and find what you missed.
The Installation Process
8. Flash recovery-v1.5.8-CustomMTD_S.zip, then under mounts and storage, wipe /system, /cache, and /data in that order.
8a. Reboot to recovery(go to advanced>reboot recovery).
9. Flash rom, gapps, and whatever other mods you have or like, then flash boot-v1.5.8-CustomMTD_S.zip, then unCoRrUpTeD_data2extV2.2.zip, and reboot.
Note: the firerats installation thread for the HeroCDMA says to flash boot-v1.5.8-CustomMTD_S.zip after anything that changes the kernel specifications, but the unCoRrUpTeD_data2extV2.2.zip does not change these. The thread also says that adb is necessary to reboot; it's not. After wiping /system, /cache, and /data, just go to advanced>reboot recovery. It will work just fine, I promise. Newer recoveries don't need to use adb for this step.
10. Reboot immediately after signing in for data2ext to take effect.
That's it! You're all done! Set up your phone the way you want and start installing apps!
Summary of steps 1 through 10: By now, you should be using 5.5.0.4 recovery, have a partitioned sd card, have placed all necessary files, your rom, gapps, and other mods onto your sd card, flashed the correct files in the correct order and rebooted, signed in, and rebooted after signing in. You should now be looking at the home screen(or lockscreen) of your rom, and if you check storage from settings, you should see internal storage showing the size you partitioned the sd card to be in step 4.
Hopefully this wasn't too confusing...good luck!
If you have any questions, don't hesitate to post in this thread!
Thanks, great guide! Wish I had it back when I had my first experience...
Speaking as per my own experience:
I ended up using the latest Firerats (dunno if its an alpha or beta) since I found myself flashing different ROM's and ROM updates quite a bit, for me it didn't require the use of a boot flash, rom works fine for me (spare some thoughts on this?, maybe just not required for the Alpha/Beta as abandoned work)...
Side note:
If you dont want to download an app to flash from the market to find out the space your rom is going to use for /system (at least, and for fresh install only), simply unzip your ROM and GApps to the same directory and right click and view the properties, this is its uncompressed size, and using a 4Mb buffer my self (Id recommend 8Mb just to be safe for most), Its normally right on the money for SOD or Size On Disk...
Hammerfest said:
Thanks, great guide! Wish I had it back when I had my first experience...
Speaking as per my own experience:
I ended up using the latest Firerats (dunno if its an alpha or beta) since I found myself flashing different ROM's and ROM updates quite a bit, for me it didn't require the use of a boot flash, rom works fine for me (spare some thoughts on this?, maybe just not required for the Alpha/Beta as abandoned work)...
Side note:
If you dont want to download an app to flash from the market to find out the space your rom is going to use for /system (at least, and for fresh install only), simply unzip your ROM and GApps to the same directory and right click and view the properties, this is its uncompressed size, and using a 4Mb buffer my self (Id recommend 8Mb just to be safe for most), Its normally right on the money for SOD or Size On Disk...
Click to expand...
Click to collapse
What version of firerats are you using? And I agree with you about the unzip method, and would have included that, but I wanted it to be as easy as possible for people who don't know what they're doing, and usually, 'an app for that' is the best way to go. Not saying it isn't easy to unzip, check the size, and rezip, I just thought an app that checks it for you would have less possibility of confusion. It does make the process a bit longer, yes, but at least people don't have to mess with the file at all.
On my own side note: After the several hours spent writing, rewording, adding, changing, and moving things around in this guide, I'm pleased to say it's 100% complete. No further changes that I can see happening.
goliath714 said:
What version of firerats are you using? And I agree with you about the unzip method, and would have included that, but I wanted it to be as easy as possible for people who don't know what they're doing, and usually, 'an app for that' is the best way to go. Not saying it isn't easy to unzip, check the size, and rezip, I just thought an app that checks it for you would have less possibility of confusion. It does make the process a bit longer, yes, but at least people don't have to mess with the file at all.
On my own side note: After the several hours spent writing, rewording, adding, changing, and moving things around in this guide, I'm pleased to say it's 100% complete. No further changes that I can see happening.
Click to expand...
Click to collapse
I think 1.59 alpha... after a system crash a few months ago, i havent had the need to re-bookmark the firerats mediafire folder... I really should, and seeing as most file share hosts are closing down or restricting free access to files I really should re-download and archive them... god knows how many things I have lost because of the MAFIAA fiasco's...
Yeah that might be a good idea. Personally I've never used any alphas or betas so I really don't have any input for them lol
Sent from my HeroC using XDA
Bumping my own thread...lets get some more views for this thing! If you haven't tried it yet, or have questions about it, or simply don't know what it does, send me a message or post on this thread! It's really a very useful mod for those of you that use or like installing lots of apps...
Thanks for the guide to this. The only problem I may seem to have is that when I follow all your steps at 11b this is what I get:
mke2fs 1.41.12 (17-May-2010)
/dev/block/mmcblk0p2s apparently in use by the system; will not make a filesystem here!
Is that correct? Or am I doing something wrong?
I see no reason to use both scripts combined. The data2ext you can have 2048mb/2gb That should be more than enough space for all your apps. Although this is a good write up I see a lot of conflict with using both mods together. One or the other should do. I'd recommend data2ext. You can create a 2048 partition and it will run just fine on a class 4 or better sd. Anything lower and you might suffer glitches like screen freezing, apps missing,lock up's and reboots. If you have a stock sd or a higher capacity sd but without a class rating or class 2 then I recommend firerats mod. Also you could very well run both of these mods and have not one problem whatsoever so it just user experience and preference I'm referring to.
#Root-Hack_Mod*Always\=LTE
Hmoobphajej said:
Thanks for the guide to this. The only problem I may seem to have is that when I follow all your steps at 11b this is what I get:
mke2fs 1.41.12 (17-May-2010)
/dev/block/mmcblk0p2s apparently in use by the system; will not make a filesystem here!
Is that correct? Or am I doing something wrong?
Click to expand...
Click to collapse
You have to unmout the partition first.
#Root-Hack_Mod*Always\=LTE
App2sd
Yea, I got that too, is it not working for you.
If not, add "/system/etc/init.d/40data2ext --enable" That made it work for me. Don't add "".
after reboot and the memory still hasn't change then go back in to terminal manager and add the above line and then reboot, should work then, never got firerats to play nice with the script, so i just use data2sd
laie1472 said:
I see no reason to use both scripts combined. The data2ext you can have 2048mb/2gb That should be more than enough space for all your apps. Although this is a good write up I see a lot of conflict with using both mods together. One or the other should do. I'd recommend data2ext. You can create a 2048 partition and it will run just fine on a class 4 or better sd. Anything lower and you might suffer glitches like screen freezing, apps missing,lock up's and reboots. If you have a stock sd or a higher capacity sd but without a class rating or class 2 then I recommend firerats mod. Also you could very well run both of these mods and have not one problem whatsoever so it just user experience and preference I'm referring to.
#Root-Hack_Mod*Always\=LTE
Click to expand...
Click to collapse
That's all true, but the reason I combined both is to customize the /system and /cache partitions, while still allowing my 2gb data partition to work. This way I have control over what size I want each partition to be.
goliath714 said:
That's all true, but the reason I combined both is to customize the /system and /cache partitions, while still allowing my 2gb data partition to work. This way I have control over what size I want each partition to be.
Click to expand...
Click to collapse
You can still achieve that without the combination of both mods.
#Root-Hack_Mod*Always\=LTE
In step 11 you said to reboot into rom immediately after flashing data2ext2-v7.zip and open terminal emulator. But terminal emulator isn't preinstalled in my rom. Is it ok to install it from play store after I flash data2ext2-v7.zip or this is not right?
fforward72 said:
In step 11 you said to reboot into rom immediately after flashing data2ext2-v7.zip and open terminal emulator. But terminal emulator isn't preinstalled in my rom. Is it ok to install it from play store after I flash data2ext2-v7.zip or this is not right?
Click to expand...
Click to collapse
You can install from the market
Sent from my HERO200 using xda app-developers app
ajrty33 said:
You can install from the market
Sent from my HERO200 using xda app-developers app
Click to expand...
Click to collapse
Thanks a lot!
laie1472 said:
You can still achieve that without the combination of both mods.
#Root-Hack_Mod*Always\=LTE
Click to expand...
Click to collapse
How? The firerats mod allows you to change the /system and /cache partition sizes, but from what I can find, data2ext only applies the /ext partition to the /data partition to make the phone utilize the /ext partition as /data, and doesn't allow for modification of the /system and /cache partitions.
Updated
Edit: Updated again to fix minor wording issues and make links much prettier!
Can I use twrp recovery on this firerats. Or is it only the provided cwm recovery ?
Sent from my HERO200
So I flashed this data2ext on my desire, the phone recognized my ext partition as internal memory, but, I can't install any apps, I always get the message "application not installed".
Any ideas?
dankdank11 said:
Can I use twrp recovery on this firerats. Or is it only the provided cwm recovery ?
Click to expand...
Click to collapse
Firerats has nothing to do with recovery. It's about resizing partitions. Recovery functions on a level above, so whatever you do with firerats won't affect it. TWRP is a great recovery program.
Tux2609 said:
So I flashed this data2ext on my desire, the phone recognized my ext partition as internal memory, but, I can't install any apps, I always get the message "application not installed". Any ideas?
Click to expand...
Click to collapse
Try again. Go through the instructions verbatim, as outlined. I wouldn't deviate in any way.

[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

[MOD] Data2SD (Enhanced) - I/O Fix

At the suggestion of several users, I am forking the previous thread. I am planning on supporting several ROMs and this is the best course to keep everything organized and provide support.
What is this?
Background:
The speed of the flash memory in the Transformer line of tablets is very poor. This is very apparent when installing or updating applications from the Play Store, copying files over USB, or using an app that caches lots of data like a web browser. The tablet will hiccup and stutter due to the I/O bottleneck. Running Androbench shows random write speeds averaging less than .2MB/sec.
The workaround:
Utilizing a fast, class 10 microSD card, we can move the /data partition to something significantly faster. The /data partition is where apps are installed to and where they store their configuration information and data. By redirecting /data to these fast microSD cards, we eliminate this bottleneck from our devices. With a properly fast card, users have reported a complete elimination of I/O related hiccups and system freezes. I have based my enhancements on the initial work by TweakerL on the Transformer Prime. Credit to fordwolden to porting his work to the Infinity.
The enhancements:
Previous implementations of this mod had the internal data partition mounted to /data2, with the media subfolder (your internal user storage) only available via root apps. There were symlinks set up at /sdcardi, etc, but these still required root permission to access. This is due to permissions on the /data partition and applies to both /data and /data2. Google gets around this by creating a "virtual" sdcard that points to /data/media. I have created a second "virtual" sdcard that points to /data2/media. This mod creates the scenario below:
/data = ext4 partition on microSD (fast)
/data2 = ext4 partition on internal storage (slow)
New changes:
/data/media -> Virtual SD Card Daemon -> /storage/sdcard0
/data2/media -> Virtual SD Card Daemon -> /storage/sdcardi
/sdcardi -> Symlink -> /storage/sdcardi
/mnt/sdcardi -> Symlink -> /storage/sdcardi
/storage/sdcardi is the virtual SD card for the internal storage. You should see all the files you had saved to this space before using data2sd. These files should be accessibly by any standard non-root Android app.
Note to kernel developers: This mod is more than just changes to the kernel. In order for the internal storage to be properly mounted at /storage/sdcardi, I have modded the Virtual SD Card Daemon that comes with Android. The stock binary is /system/bin/sdcard. I made a copy, modified it using a hex editor, called it /system/bin/sdcardi, and included it in my flashable zips. If you wish to make a data2sd version of your kernel, you must include this file in your zip. Additionally, be sure to add the "service sdcardi" line to your init.cardhu.rc that I have in mine.
Installation
Requirements
1) Class 10 microSD, at least 8gb
2) A computer with card reader
3) Partitioning software. Recommended: gparted LiveCD
Instructions
1) Decide how big you want to make the ext4 partition for /data. Remember, this is going to be the space for installing applications AND the /sdcard space that games will use the cache their extra data. Kindle books, Dropbox files, pics from the camera WILL ALL GO HERE. Personally, I decided to make the ext4 partition the whole 64gb of my card.
The ext4 partition has to be partition #2 on the microSD card. Why? This is to give people with large cards the option of creating a FAT32 or NTFS area as partition #1. This allows the card to be read by a Windows or Mac computer using a card reader. I use my tablet as my card reader with the USB cable, so I wasn't worried about this. I used gparted to create a small 8mb unformatted partition as partition #1, then a second 64gb partition to fill the rest of the card. I formatted this second partition in ext4.
2) Format your microSD card - Download Gparted Live CD (http://goo.gl/dJQAu) and use Imgburn (http://goo.gl/33MY9) to write to disc. Boot to Gparted using your CD after setting the CD as the primary boot device in your BIOS. Once in Gparted, create the 2 partitions described above, the first partition is Fat32, the second partition is ext4 or ext2. Set both partitions to type: Primary.
3) Insert microSD into tablet and flash any data2sd kernel for your ROM. (Note: Flashing any ROM will overwrite your data2sd kernel. You will have to re-flash the data2sd kernel if you change ROM or even upgrade your current one) After booting back into Android, you should be greeted with the Setup Wizard. Remember, this is a fresh /data partition, so it's a clean slate. It's a good idea to take a TitaniumBackup** ahead of time. I am experimenting with ways to make the transition more painless.
**Note about taking a TitaniumBackup before switching to data2sd. After the conversion, your internal storage will be mounted to /sdcardi. By default, TitaniumBackup looks for previous backups in /sdcard not in /sdcardi. You have two choices. Copy the TitaniumBackup folder from /sdcardi to /sdcard and restart the app, or change the backup location to /sdcardi/TitaniumBackup in the app preferences. Either of these options should work fine.
Optional: Verify data2sd is working. Pick any method you like:
a) Open a file explorer such as Root Explorer, ES, etc. You should see /sdcard and /sdcardi and be able to browse the files within. /sdcard is your ext4 partion on the microSD while /sdcardi is the internal storage. You should able to copy data between them.
b) Download "Androbench" app from the market and run "micro" sdcard check, if you see 0.4mb/sec or more in random write you're on data2sd.
c) Power off your device, remove your microSD card, then power back on your device. You should received an error message "Encryption unsuccessful". Insert microSD and reboot to fix.
Uninstallation
Don't like data2sd? Just flash a non-data2sd kernel using recovery and when you boot back into Android your /data will be on the internal storage. This could also be accomplished by flashing your ROM on top of itself without wiping.
Troubleshooting
1) Grab the mount-data2sd.zip from the second post.
2) Boot into TWRP and flash the mount-data2sd.zip. This will mount the microSD as /data in recovery. It will allow us to wipe it, format, etc using recovery.
3) Wipe "Internal Storage". This will erase the entire ext4 partition on your microSD.
4) Flash ROM
5) Flash data2sd kernel for ROM
*CAUTION*: If you don't flash mount-data2sd.zip before your wipe, you will be wiping your internal memory.
Download data2SD kernels
These are flashable zips. It will disable journaling on the microSD ext4 partition. You do not have to do this manually! Flash these after flashing the ROM.
CyanogenMOD 10.1 - beta2: http://d-h.st/rOe (Based on 4-2 nightly and may behave unexpectedly on other builds)
CleanROM 3.2.2: http://d-h.st/sCa - WORKS WITH CleanROM 3.3!
clemsynTFUniversalCyano650GPUFsyncver3: http://d-h.st/duw
ClemsynTFUniversalStock: http://d-h.st/IBm
clemsynTFUniversal650GPUver7 (Stock/CleanROM): http://d-h.st/S4k
Recovery
I made a flashable zip to help the recovery console understand our modification. By default, if you go into recovery and do a factory reset, it is formatting the /data partition on the internal storage. The issue same applies to nandroids. We may be using the second partition of our microSD card for /data, but the recovery does not know this. It will look to the internal /data partition during backup and restores.
This zip does not make any modifications to your tablet or copy any files. It simply updates your recovery mount points. The changes are temporary and are lost during the next reboot. You will need to flash it each time you boot into recovery.
After flashing this zip you will be able to:
1) Wipe data / Factory reset. The /data partition on the microSD will be wiped
2) Backup and restore nandroids. The /data partition on the microSD will be backed up or restored.
3) Choose "Flash zip from internal sdcard" and browse the files on the internal storage
4) Access and flash zips from the microSD storage. Choose "Flash zip from internal sdcard" and notice the !microSD folder at the top. This is a symlink that will kick you over to the microSD storage. This !microSD folder appears on your internal storage after you flash this zip for the first time. It remains unless you delete it. Even so, next time you enter recovery this !microSD symlink will not go anywhere until you flash this zip.
Please report your experience with this.
http://d-h.st/pPe
This one too.
So this is basically flashable on CleanRom 2.3 right? Only thing wrong is that it doesn't show up in windows over USB? I can live with that as long as apps can read it in the Android OS itself.
can I use flash this on cleanrom 2.3 to diasable journalling on my ext4 partition
Diogenes5 said:
So this is basically flashable on CleanRom 2.3 right? Only thing wrong is that it doesn't show up in windows over USB? I can live with that as long as apps can read it in the Android OS itself.
Click to expand...
Click to collapse
Nope. This has changes to framework-res.apk which is ROM specific. I will post a CleanROM 2.3 version in a few minutes for you guys.
Thanks - Appreciate your hard work
---------- Post added at 08:46 PM ---------- Previous post was at 08:37 PM ----------
wow that was fast-thanks
---------- Post added at 08:58 PM ---------- Previous post was at 08:46 PM ----------
i was getting 6000 with clemsyn -I got low 5000's with this new mod
clownberg said:
i was getting 6000 with clemsyn -I got low 5000's with this new mod
Click to expand...
Click to collapse
This is not clemsyn's kernel, this is the stock CleanROM 2.3 kernel. I will mod clemsyn's latest kernel and post it for you.
Mistar Muffin said:
This is not clemsyn's kernel, this is the stock CleanROM 2.3 kernel. I will mod clemsyn's latest kernel and post it for you.
Click to expand...
Click to collapse
Unable to have it work with cleanrom. Boot loop
titou00075 said:
Unable to have it work with cleanrom. Boot loop
Click to expand...
Click to collapse
Use recovery to wipe the /cache partition. Due to the changes in framework-res.apk this may be necessary if you aren't coming from a completely clean install of a ROM.
I just booted to recovery and wiped my microSD /data partition. I also wiped /cache and /system. I installed CleanROM 2.3 and in the same recovery session I flashed the clemsynTF700ver22GPU650VC-data2sd kernel and it booted right up.
May be a stupid question but do you still need TWO primary partitions on the SD card (i.e., first is FAT32 while second is Ext4 and used by the mod)? If this isn't necessary or not possible, should the recovery (i.e., installation) files be placed in internal storage?
Forgot to mention I'm using Windows 7 MTP and CleanROM 2.3
Mistar Muffin said:
Use recovery to wipe the /cache partition. Due to the changes in framework-res.apk this may be necessary if you aren't coming from a completely clean install of a ROM.
I just booted to recovery and wiped my microSD /data partition. I also wiped /cache and /system. I installed CleanROM 2.3 and in the same recovery session I flashed the clemsynTF700ver22GPU650VC-data2sd kernel and it booted right up.
Click to expand...
Click to collapse
Ok thanks. Will do:thumbup:
Your Awesome, Thank you!
cheers
Thanks Gonna try this.
done the work install all three files in the OP, however it is taking a long time to boot....Can someone give me an idea as to how long this normally take onn first bootup after a fresh install?
please advise
tyfoxx
Couldyou make one for blackbean? i tried thecm 1029,but it doesnt boot. Would greatly appreciate it.
Sweet
I just ran every shortcut I could think of:
I used Mini partition tool to reduce reduce my 32 gig fat down to 16 gigs & then created a 16 gig ext4 partition.
Wiped everything in twrp and re flashed Clean 2.3 then the new zip.
All I can say is WOW.
Restored everything. Works great no more stalls and stable so far. Hope it stays this way. Now to focus on battery life.
Sent from my HTC Ruby using xda app-developers app
Diogenes5 said:
Restored everything. Works great no more stalls and stable so far. Hope it stays this way. Now to focus on battery life.
Sent from my HTC Ruby using xda app-developers app
Click to expand...
Click to collapse
Glad it's working! I've prepared a little treat for everyone to make our recovery lives a little easier. Need to test a few more things before I post!
I'm running CleanROM 2.3 and ClemsynTF700ver22GPU650VC (awesome combo, btw). If I want to use this MOD, should I need to flash first CleanROM-2.3-data2sd.zip and later ClemsynTF700ver22GPU650VC-data2sd.zip, right? Of course, also, formating my microSD using ext4.
Awesome work here Mistar!!!! Thank you so very much for this!!! Gonna replace my SanDisk 32gb Class 4 card with a SanDisk 64gb Class 10 before I run this on CleanRom. I'm super excited about this mod!!!!!! Thanks a million!!!!!!
Sent from my EVO 4G LTE using xda premium

[Q] Replace Internal Data Partition for External SD

Let me start with: I know that there have been many posts on this, but before you get mad, I was unable to find an answer to what I specifically want to do.
For reference: I am a software developer and sysadmin with a decent amount of Linux experience, but not a lot of android specific experience.
Now that the introduction is out of the way:
What I would like to do is completely remove the "USERDATA" partition (the "Internal SD card"), grow the "SYSTEM" partition to fill that space, and then mount my SD Card (external) as the SD Card that the system sees.
I'm currently on Cyanogenmod 10.1 but want to upgrade to 11 soon.
The reason I want to do this is because:
I have all if my apps that I can set to install to SD Card
Both "internal" partitions are full (only about 200MB is available for pictures/etc. and I can no longer update apps)
Camera (and pretty much everything else as well) stores to the Internal SD card by default
If the system partition was 1.1+1.4=2.5GB and all of my apps were "installed" to a real SD card, it would be a lot more comfortable.
So, here's what I am thinking *might* work (maybe not in the right order, though?):
Point the fstab entry for the internal SD card to the external SD card
I have the PIT file. I will delete the "USERDATA " and grow "SYSTEM" to fill the space
When I write it out in steps, it seems pretty simple...
My concerns:
Will a ROM update (to CM11) re-partition back to the old way (and, in the process, break a bunch of stuff)?
I don't ever plan to go back to stock android or change to another ROM (other than upgrades).
Thanks for reading this long post and for any insight you may be able to provide.
--mobrien118
It's a wonderful idea if it works.
Sent from my SAMSUNG-SGH-T769 using xda app-developers app
Modifying partitions is a bit dangerous.
But I have to ask you why do you need another GB of /system storage?
There was a line you can put in the build.prop that flips your ext. SD with the internal one on cm10 I believe.
This'd interest me if I could get rid of usbdisk and sdcard0 merged.
It would need the phone to be repartitioned though, causing issues with the backups and ROMs.
You may even have to compile cm from source.
Its a lot of trouble
Sent from my SAMSUNG-SGH-T769 using Tapatalk
I just did so on S4 Mini with cm-11 Android 4.4.
First I was thinking of using symlinks and/or bind mounts to redirect to the the external sdcard, but that's a bit of a hassle because
1) Since 4.2: both emulated and external storage is mounted with a fuse layer on top not supporting symlinks
2) Since 4.4: no more global write access on external storage
So moving data was the simplest solution. Besides providing (much) more space my sdcard is also around 20% faster in sequential writes: 8.5 MB/s internal vs 10.5 MB/s external. Is it really 2014?
I haven't yet decided what to do with the original data partition, so for the moment I left it unused. Hence I haven't touched the internal partition table.
Quick summary
partition sdcard (gdisk)
I recommend using GPT, this lets you work with partition names rather than numbers. For the sake of still having an "official" external sdcard I made two partitions. Keep in mind that it's usually the first partition which gets automatically mounted as external sdcard. So I made the 2nd partition the new home for data. This partition however has to be manually specified in the ramdisks fstab which involves flashing the boot partition.
format the new partitions (mkfs.ext4)
copy the original /data directory tree to the new data partition
extract initrd from boot.img (abootimg)
extract files from initrd (gunzip & cpio)
replace the /data entry in fstab pointing at your new data partition
re-pack initrd and boot.img (gzip, cpio & abootimg)
flash boot.img onto the boot partition (dd)
If you use recovery, you also have to edit it's fstab (analog to boot.img mentioned above)
done
Alternatively has anyone tried an init.d script? I see those scripts get executed before the mounting of data & sdcard
Meanwhile the original userdata partition got replaced by 3 new partitions: system2, cache2 & userdata2 which are now used for a dual boot ROM.
I've only changed GPT, not PIT. ROMs and Recovery don't use PIT, so as long as Heimdall/Odin isn't involved it should not cause any issues.
Hey guys,
So after read all that, I am also vry interested in what the OP has suggested. I get that the pit doesn't need to be affected, but as the OP asked, when flashing a new rom or updating an existing, would the partition be reformatted back to the way android handles it, ie; back to the system and data seperate and the sdcard not being used as the internal partition?
I am no developer and only have minimal knowledge in linux and android programing, but I am a quick study and any guide to help me sort this would be greatly appreciated.
Also I am about to get a second S4 mini specifcally for doing things like this so if I brick I don't care?
My next question is could it be possible to code the PIT file to do this for you so that you can just flash that through odin, but again would flashing roms affect this.
Cheers,
Sora.
aguaz said:
I just did so on S4 Mini with cm-11 Android 4.4.
First I was thinking of using symlinks and/or bind mounts to redirect to the the external sdcard, but that's a bit of a hassle because
1) Since 4.2: both emulated and external storage is mounted with a fuse layer on top not supporting symlinks
2) Since 4.4: no more global write access on external storage
So moving data was the simplest solution. Besides providing (much) more space my sdcard is also around 20% faster in sequential writes: 8.5 MB/s internal vs 10.5 MB/s external. Is it really 2014?
I haven't yet decided what to do with the original data partition, so for the moment I left it unused. Hence I haven't touched the internal partition table.
Quick summary
partition sdcard (gdisk)
I recommend using GPT, this lets you work with partition names rather than numbers. For the sake of still having an "official" external sdcard I made two partitions. Keep in mind that it's usually the first partition which gets automatically mounted as external sdcard. So I made the 2nd partition the new home for data. This partition however has to be manually specified in the ramdisks fstab which involves flashing the boot partition.
format the new partitions (mkfs.ext4)
copy the original /data directory tree to the new data partition
extract initrd from boot.img (abootimg)
extract files from initrd (gunzip & cpio)
replace the /data entry in fstab pointing at your new data partition
re-pack initrd and boot.img (gzip, cpio & abootimg)
flash boot.img onto the boot partition (dd)
If you use recovery, you also have to edit it's fstab (analog to boot.img mentioned above)
done
Alternatively has anyone tried an init.d script? I see those scripts get executed before the mounting of data & sdcard
Click to expand...
Click to collapse
I just managed to replace my internal sd with the external sd following your ruff guide. thank you very much! At first I struggled a bit getting it to work, because I had encrypted my data partition before -.- this seems to change something in the fstab / mounting / boot-up process, I couldn't get my S4 mini to boot with just changing the fstab.qcom in boot.img. With my recovery (TWRP) it worked from the start editing recovery.img's fstab.twrp /data mount point.
After decrypting(formatting) /data and re-editing fstab.qcom in boot.img it finally works I'm so happy! Enjoying a lot of space on my sdcard now!
usefull threads / information I learnt from:
Partition structure of S4 Mini
Encryption of ExtSD & some fstab information
Editing initrd
abootimg ReadMe
(Links last tried 28.05.2015)

Categories

Resources