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

delta-roh

Senior Member
Jan 22, 2010
1,406
1,826
0
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


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!


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 ...


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.


Thanks:


USE IT AT YOUR OWN RISK - NO SUPPORT! READ SECTION 'MUST READ' ABOVE CAREFULLY!



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 :cool:
 

Attachments

Last edited:

delta-roh

Senior Member
Jan 22, 2010
1,406
1,826
0
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.

 
Last edited:
  • Like
Reactions: devrruti

hinxnz

Senior Member
Jul 21, 2009
2,821
2,410
193
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?
 

Attachments

  • Like
Reactions: devrruti

delta-roh

Senior Member
Jan 22, 2010
1,406
1,826
0
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?
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?
 
Last edited:

hinxnz

Senior Member
Jul 21, 2009
2,821
2,410
193
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?
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.
 

Attachments

Last edited:
  • Like
Reactions: devrruti

delta-roh

Senior Member
Jan 22, 2010
1,406
1,826
0
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.
You mounted userdata to /dalvik-cache and I suppose you then changed the init.rc to link the dalvik-cache to /dalvik-cache - right?
 
  • Like
Reactions: banesi

hinxnz

Senior Member
Jul 21, 2009
2,821
2,410
193
You mounted userdata to /dalvik-cache and I suppose you then changed the init.rc to link the dalvik-cache to /dalvik-cache - right?
Yes that is correct.
Code:
    # symlink dalvik-cache to internal location
    symlink /dalvik-cache/arm /data/dalvik-cache/arm
 
Last edited:

hinxnz

Senior Member
Jul 21, 2009
2,821
2,410
193
Why not this way?
Code:
symlink /data/dalvik-cache /dalvik-cache
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.
 
  • Like
Reactions: delta-roh

phan_tom

Senior Member
Oct 3, 2010
232
129
0
Batam
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?
 

delta-roh

Senior Member
Jan 22, 2010
1,406
1,826
0
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?
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!
 
  • Like
Reactions: phan_tom

delta-roh

Senior Member
Jan 22, 2010
1,406
1,826
0
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
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?
 
  • Like
Reactions: danishaznita

ChimeyJimmey

Senior Member
Oct 21, 2008
104
15
0
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! ;)
 

delta-roh

Senior Member
Jan 22, 2010
1,406
1,826
0
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! ;)
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.
 

hinxnz

Senior Member
Jul 21, 2009
2,821
2,410
193
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.
Huh :confused: 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.
 

Attachments

cutejerk420

Senior Member
Apr 17, 2013
327
54
0
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
 

delta-roh

Senior Member
Jan 22, 2010
1,406
1,826
0
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
Nobody is able to answer these questions. Normally SD-Cards are absolutely stable. Make a regular nandroid backup e.g. every day.
 

delta-roh

Senior Member
Jan 22, 2010
1,406
1,826
0
Huh :confused: 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.
Remarkable! Please post your configuration - do you use F2FS and on which partitions?
 

hinxnz

Senior Member
Jul 21, 2009
2,821
2,410
193
Remarkable! Please post your configuration - do you use F2FS and on which partitions?
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.
 
Last edited:
  • Like
Reactions: devrruti