Related
Hi, I have been testing several NAND set-ups
-system to NAND and data to resized data,img
-system to resized system.img and data to resized data.img
-system to NAND and data to ext2
...
I am currently using NAND and data to ext2 partition, so all apps are installed there. After lots of reading I can not understand posts that are obsolete and posts that are not so I would appreciate if someone can explain me the basics and optimal setup for incubus superfroyo RLS14/15 roms:
I have now 4 partitions:
1) fat32,
2) 1,5G ext2 (app, app-private etc),
3) 1,5G ext2 (lost+found folder) and
4) 96M lynux-swap.
- How can I turn ext2 to ext3? do I need to do so? I have also read about ext4. Upgrading to ext3/ext4 applies to my 2) partition, to my 3) partition or to both? will I loose data stored? "there is no ext3/ext4 fs because there isn't the support on the compiled kernel. Ext3/ex4 are journal file system so are bad for limited writing device like nand or sd and thre is no good rease to use it" answered by l1qd1.
- How can I check if my lynux-swap is enabled and used by the rom?
- Do partitions 2) and 3) really need to be <1,5 G? why so?
- Can I take apk from apps folder in partition 2) in case I want to keep them for future fresh installs?
- What is lynux-swap optimal size? a 1,5G partition would be worse than 96 M? Why?
- Which tools are you using with incubus roms to manage installaion location and similar functionalities?
Another big mark I have is about deoxeding installed aps (not belonging to the ROM). Should I do it? why? how?
Pretty basic stuff I guess for experienced users & programmers, but I am new to lynux and android. Have read lots of things but it is difficult to learn by myself what would work with our Polaris and incubus ROMS and dzo/kk kernels,
Stick to ext2 man, you won't turn your old engine to 240mph on a Ford Model T.
You're not getting some major boost if the hardware dosn't use it, so I'd stick with ext2.
And you also want Super FroYo on your ext2 partition, yes? I'm here to help.
- How can I check if my lynux-swap is enabled and used by the rom?
adb shell
Code:
free
if on swap you have 0 it isn't enabled.
Code:
swapon /dev/device
to enable it or i suggest you tu use compcache.
- Do partitions 2) and 3) really need to be <1,5 G? No
- Can I take apk from apps folder in partition 2) in case I want to keep them for future fresh installs? Yes but not all apk support this
- What is lynux-swap optimal size? a 1,5G partition would be worse than 96 M? Why? Too Big = more sparse but it's a problem only for real disk so you can create a swap big as you want but it's unuseful (100 M is enaught)
i suggest you to switch to my kernels because are more updated and kk move to another device.
Yah l1q1d I love ur kernels. Eager for more !
l1q1d, I am testing your kernel as you advised me. I could apply the wifi patch without problems using your androiupdate18-09-10, as you told me some time ago they are both 2.6.25.
However I do not manage to turn linux-swap on: that's what I do: I install ubuntu, I use G-Parted to create partitions on the sd card. When I do so, the third partition is always shown as linux-swap in G-Parted but when I test adb shell -> parted -> print, it always shows as ext2. I can not dismount and can not swap on it.
The other way round, if I deleted all partitions with G-Parted and create the partitions with mkpartsfs or if I use mkfs to change the third partition from ext2 to linux-swap, then sometimes I can swap on it (directly on adb shell or with G-Parted) but when I unplug the device will tell me the card is empty and will not be able to mount it, access it from ubuntu or from the device. If I reboot then, the system will hang until I install both data and sysetm to nand. This happens no matter if I activate or not from the polaris or even if I switch on or off usb mode. The card at that point is useless. I guess the partition table or some other basic file is messed.
Could you please explain a little more how can I come with a 13.5G fat32 partition, a 2,4 ext2 partiions and a 0,1 lynux swap swapped on partition??
I really need to test this set up, since with the standard set-up (system to nand, fat32 for files and ext2 for installed apps I can not install all apps I use since performance drops significantly).
regards
well, ... dumb me, maybe with compcache you are referring to launch a script?
where do I get this compcache.sh? how do I launch it? from adb? from the terminal? from the sd card?...
I'm using Xionia CWMA v1.2518.6 Recovery on my Rooted Optimus V (froyo) using the RodimusROM 1.2.3 with Xionia Kernel 005
Right now I'm using Link2SD to move individual apps to my sd card (ext3 partition) it created symlinks in the /data/app/ folder that references the moves data located at /sdext2/ and /sdext/dalvik-cache/ (the mounted ext2 artition on my sdcard)
Would using data2ext defeat the need for this? would it move ALL currently installed apps to my SD partition automatically?
Would all future installed apps be moved automatically as well?
would it be possible to have some apps still on the phone or is the /data/ folder totally gone for good off the phones internal storage?
If I have a class 10 MicroSD how much of a performance boost would I see? would it be worth doing?
Is there any GUI I can install to manage things after installing data2ext?
Does data2ext even support ext3?
Do I need a newer recovery for data2ext?
Will my android version/rom support ext4?
thanks for any info!!!!
__________________
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
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)
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.