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
or
- 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>
- 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:
- 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
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
Attachments
-
51.7 KB Views: 7,542
-
102 KB Views: 7,480
-
107.1 KB Views: 7,485
Last edited: