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

Search This thread

Darnell_Chat_TN

Senior Member
Nov 29, 2008
2,444
503
Chattanooga, TN
Google Pixel 4 XL
Hello guys,
How Do I know if my tf700t is running on my sd card ?

Anyone can send me a step by step to how install data2SD ?

1)Boot on TRWRP
2)erase internal data
3)Install cromi-3.2.x-data2sd
4) installCleanROM 3.4.7 Inheritance ODEX_Signed
5) boot

that is it ??

thanks once again everybody

Here's what you want to do:

  1. Flash mount-data2sd.zip
  2. Flash CleanROM 3.4.7 Inheritance DEODEX v2_Signed.zip
  3. (if you want _that's latest Kernel) Flash that-data2sd-detect-6.zip
  4. (if you want _that's latest Kernel) Flash that-kernel-10.4.4.25-6.zip
  5. Enjoy!

If you want to do any wipes, you would do those after step #1.

You may have to search for the necessary files.

cromi-3.2.x-data2sd is obsolete.

Sent from my ASUS Transformer Pad TF700T using Tapatalk HD
 
  • Like
Reactions: cingrasci

callousparade

Member
Aug 24, 2010
34
3
um. wow. with fsync off and the data2sd mod i'm getting a 250000% (yes, two hundred and fifty THOUSAND percent) increase in random write speed.

I wouldn't believe me either, so screenshots

thanked and donated! simply incredible.
 

focusbra

Senior Member
Oct 11, 2012
66
0
Here's what you want to do:

  1. Flash mount-data2sd.zip
  2. Flash CleanROM 3.4.7 Inheritance DEODEX v2_Signed.zip
  3. (if you want _that's latest Kernel) Flash that-data2sd-detect-6.zip
  4. (if you want _that's latest Kernel) Flash that-kernel-10.4.4.25-6.zip
  5. Enjoy!

If you want to do any wipes, you would do those after step #1.

You may have to search for the necessary files.

cromi-3.2.x-data2sd is obsolete.

where I download mount-data2sd.zip ? I just find cromi-3.2.x-data2sd !

This new one is much better ?

If I already flash using cromi-3.2.x-data2sd what's the steps do re-flash

thanks again
 

awilson77584

Senior Member
Apr 18, 2011
270
38
Thanks for the earlier help. I have my tab up and running again. I have Cromi 3.4.7 odex with that6. The scard, SanDisk 32gb, is freshly formatted to fat32 and ext4 using gparted.

My first attempt to move to data2sd this time, I tried to flash mount-data2sd in recovery (TWRP 2.4.4.0) and I get a red "Failed".

Do I skip mount-data2sd and go to the that data2sd patch? Should the reboot after the patch take a while to copy the sdcardi to sdcardi?

Thanks!
 

_that

Recognized Developer / Inactive RC
Oct 2, 2012
4,821
4,211
My first attempt to move to data2sd this time, I tried to flash mount-data2sd in recovery (TWRP 2.4.4.0) and I get a red "Failed".

I think it fails on a completely empty filesystem because there is no /media directory (for /data/media) yet. I never tried to start from scratch, I always copied my existing data partition to the sdcard manually.
 
  • Like
Reactions: awilson77584

SolidHelix

Senior Member
May 1, 2011
388
33
Mount Pearl
www.freedom-cig.com
What is the quickest way to determine if data2sd is set up and working correctly? My internal storage in system info is showing as 27gb. And external is showing as 16gb. Is this enough to know for sure its set up right?

Sent from my Galaxy Nexus using Tapatalk 2
 

_that

Recognized Developer / Inactive RC
Oct 2, 2012
4,821
4,211
What is the quickest way to determine if data2sd is set up and working correctly? My internal storage in system info is showing as 27gb. And external is showing as 16gb. Is this enough to know for sure its set up right?

In a root shell, type 'mount'. If it displays that data is mounted on /dev/block/mmcblk1p2, it is set up and working correctly. If it is mmcblk0p8, it is your internal storage.

If you don't have adb access to your device and no terminal emulator app, go install jackpal's terminal emulator from the Play store.
 
  • Like
Reactions: SolidHelix

callousparade

Member
Aug 24, 2010
34
3
That's because with fsync off you are now benching your RAM instead of the SD card. :)

That makes waaaaaay more sense. Knew those numbers had to be lying to me.

Still. Incredibly snappy with no lag at all. Better than it was pre data2sd no doubt.

Question about fstrim though, now it always says 0bytes trimmed from /data and /cache (still getting normal numbers for /system)
 

BloomTwig

Senior Member
Oct 12, 2011
159
11
Stockholm
Data2sd is working great. There is just the slight issue that I cant use google play at all.. I get error -24 and install fails.. any advice?

Edit: I am currently using _that 6 with data2sd detect.
 
Last edited:

awilson77584

Senior Member
Apr 18, 2011
270
38
I think it fails on a completely empty filesystem because there is no /media directory (for /data/media) yet. I never tried to start from scratch, I always copied my existing data partition to the sdcard manually.

I did a little more research. fdisk says the partition table is not valid. I used gparted on a fedora laptop with a USB sd card reader. Should I try a mkfs directly or use parted on the cmd line?

Thanks!
~~~~~~~~~~

Disk /dev/block/mmcblk1p2: 23.4 GB, 23425597440 bytes
4 heads, 16 sectors/track, 714892 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

Disk /dev/block/mmcblk1p2 doesn't contain a valid partition table

//edit Fedora 17 fdisk thinks the ext4 partition is ok and mounts it.
 
Last edited:

awilson77584

Senior Member
Apr 18, 2011
270
38
I think it fails on a completely empty filesystem because there is no /media directory (for /data/media) yet. I never tried to start from scratch, I always copied my existing data partition to the sdcard manually.

I booted into recovery and attempted to execute the commands in the mount-data2sd updater-script and it fails on the umount -f /data.

Any thoughts?

Thanks!

dexter:android arw$ cat updater-script
ui_print("");
ui_print(" Mounting microSD as /data");
ui_print("**********************************************************");
ui_print("* Wiping /data or a factory reset will wipe the microSD! *");
ui_print("* Making a Nandroid backup will also backup the microSD! *");
ui_print("**********************************************************");
run_program("umount", "-f", "/data");
mount("ext4", "EMMC", "/dev/block/mmcblk1p2", "/data");
ui_print("");
ui_print(" Mounting internal as /emmc");
ui_print("**********************************************************");
ui_print("* Choose zip from internal will still be internal files! *");
ui_print("* Use !microSD link under internal zip to access microSD *");
ui_print("**********************************************************");
run_program("mkdir", "-p", "/data2");
mount("ext4", "EMMC", "/dev/block/mmcblk0p8", "/data2");
symlink("/data2/media", "/emmc");
symlink("/data/media", "/emmc/!microSD");
ui_print("");
 

BloomTwig

Senior Member
Oct 12, 2011
159
11
Stockholm
Data2sd is working great. There is just the slight issue that I cant use google play at all.. I get error -24 and install fails.. any advice?

Edit: I am currently using _that 6 with data2sd detect.

Please help! I am stuck at the slow speed of the internal memory... Do you think I need to reformat the sd-card? The mod works, but I can't install anything from play store...

Sent from my HTC One X using xda app-developers app
 

evilnick

Member
Apr 7, 2008
28
13
I've spent countless hours attempting to get this to work. Please can someone provide simple instructions to go from CM10.1 installed on the internal memory to CM10.1 with /data moved to the external microSD card?

My microSD card has a FAT32 primary partition of ~50GiB and an ext4 primary partition of ~14GiB. I've got backups of everything (apps/appdata). I'm happy with using either TWRP or CWM in recovery. I'm even happy using fastboot to recover.

Each time I have flashed the CyanogenMOD 10.1 - beta2 kernel image then rebooted either:
The CM logo displays, animates and then reboots. This then loops. OR
the CM logo starts to display (but really faintly, you can just about see the image onscreen) and then the tablet reboots. This then loops. OR
the CM logo displays, animates and continues seemingly for ever. I've left this on for 30 minutes.

I welcome any advice.
 

buhohitr

Senior Member
Nov 30, 2011
5,966
1,821
I've spent countless hours attempting to get this to work. Please can someone provide simple instructions to go from CM10.1 installed on the internal memory to CM10.1 with /data moved to the external microSD card?

My microSD card has a FAT32 primary partition of ~50GiB and an ext4 primary partition of ~14GiB. I've got backups of everything (apps/appdata). I'm happy with using either TWRP or CWM in recovery. I'm even happy using fastboot to recover.

Each time I have flashed the CyanogenMOD 10.1 - beta2 kernel image then rebooted either:
The CM logo displays, animates and then reboots. This then loops. OR
the CM logo starts to display (but really faintly, you can just about see the image onscreen) and then the tablet reboots. This then loops. OR
the CM logo displays, animates and continues seemingly for ever. I've left this on for 30 minutes.

I welcome any advice.

1. Boot into twrp and create a nandroid backup of the normal cm10.1
2. Flash mountdata2sd.zip
3. In the wipe section- wipe cache, dalvik cache and internal
4. Do a restore of your cm10.1, once done flash cm10.1 beta2 kernel (data2sd kernel).
Reboot, done.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 70
    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
    15
    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
    7
    I partitioned using minitool. I couldn't get gparted to work. I can be a little dense so I may need some explicit detailed instructions to get gparted to work. Also, I'm not entirely sure how to disable journaling - I thought Cleanrom 2.3 and 2.4 did this already?

    mini-tool is well documented to NOT work very well for our purposes here. GParted or any other Linux based partition tool should work as well. I have used both the partition tools found in Kubuntu and OpenSuse to success. I actually prefer the Suse version, it allows you to disable journal during the format.
    If you are truly "that dense"....maybe this isn't for you. I don't mean to be insulting at all, please don't take it that way. This is pretty advanced stuff and not everybody possess the skills to accomplish this.

    Gather these files:
    Gparted Live CD iso
    mount-data2sd.zip
    the ROM of your liking
    the data2sd kernel that corresponds to the ROM you have chosen.
    If you are going to run CM10, Paranoid Android etc...you will need the gapps..."google apps"

    PARTITION THE microSD
    1) download the GParted "Live" CD .iso and use Imgburn to burn the iso to a CD-R
    2) Boot your computer to the CD you just burned. GParted should open by default and scan your drives. Select the correct drive and create 2 partitions. I suggest the first be formatted as FAT32 and be large enough to hold a nandroid backup and the ROMS/Kernels/mods you will be flashing. 2 or 3 gig should suffice, but the more the merrier. The second partition needs to be EXT4 and should occupy the rest of your card.
    Set BOTH partitions as "Primary" and if you can, flag the second partition as "boot". Personally, I don't think flagging it as boot has much effect either way.

    Disable Journaling on the microSD
    3) Insert the newly formatted microSD card into tab, use the recovery to backup your entire tablet, /system, /data, /boot...etc to the "external_sdcard". This may come in handy later. ;)
    4) Connect your tab to your computer via USB cable and boot to recovery. You must have working ADB drivers and some form of the Android SDK installed on your system to do this. There are several "smaller" alternatives to this. But it may be best if you just download the Android SDK and be done with it.
    5)Once you think you have all of this done, open a command prompt, you will either have to place the Android SDK in your "system path" or you can change directory to the location that holds the "platform-tools". For me this was weird at C:\Users\Brad\AppData\Local\Android\android-sdk\platform-tools. Once you get there.......
    6) Type into the command prompt: adb devices and hit the enter key. It should prompt you that the adb daemon has started and list your connected device if everything to this point is correct. (have only one android device connected to your computer when you do this)
    7) If the above worked, Type: adb shell and hit the enter key, you will be shown some weird looking characters like: ~ # ←[6n. This is normal. From there, follow the instructions carefully on disabling journal. Type adb reboot.

    ROM installation
    8)Once you have disabled journaling, boot your tab back into recovery, Install the "mount-data2sd.zip. This tells the recovery WHERE the new /data directory is and where it will install /data files to.
    9a) Factory reset, wipe /cache, wipe the dalvik cache. If you are coming from a different ROM than the one you will be flashing, wipe /system. If it is the same, you should be fine leaving it.
    9b) Flash the ROM you have chosen. OR: (see option)
    10) Optional: at this point you can restore the backup you made earlier if you are coming from the ROM you will be running in data2sd. if not, flash the ROM, flash the data2sd kernel reboot and Profit!
    11) flash the correct data2sd kernel for the ROM you installed.
    12) Profit!
    NOTE: Everytime you want to do a nandroid backup from recovery, or install the updated version for your rom, you must FIRST FLASH "mount-data2sd.zip so that recovery "knows" where the correct stuffs are located.

    This is a fairly compressed step by step, and I leave it to you to fill in the blanks with info already posted in these forums. If you are unable to fill those in...read, search, study, read, search and study until you understand it.

    If this helped you, please hit the thanks button. If it REALLY REALLY helped you and you are so inclined, hit the donate button. It's all good. Money sent to me will probably be forwarded to the developers doing all the real work.

    Regards,
    Brad
    7
    Can someone please baby step me through this process? I've read the posts but I really do need to be carefully walked through it. I know the towel was thrown in on CleanROM but I figured since sdbags took over and he's still churnin' out data2sd versions with CROMI 3.2x that maybe it would work for me but I guess I'm just not understanding it the way it was written. Ain't no shame in my game though. I've already set my Class 10 SD card up with Mini Tool. I need help and I ain't afraid to ask:confused:. Thanks for your time and great efforts in making this OS faster.

    TF700T Transformer Infinity

    First of all, you have to format the microSDcard with Gparted. Do not use minitool. You can create a gparted boot disk and boot with it to run it - do a google search to find the gparted iso.

    Second of all, you may need to be on the 10.4.4.25 bootloader. Not sure if it is required, but it does not hurt to upgrade to it.

    Then, I prefer buhohitr's procedure:

    First, using TWRP, install CleanRom 3.2.2 normally on your tablet, reboot into it, and go through the setup. Power off the tablet.

    1. Using Gparted, Format your microSDcard with first partition fat32 and the second partion ext4, with the boot flag.

    2. Copy your required zip files onto the fat32 partition:

    cromi-3.2.x-data2sd.zip
    mount-data2sd.zip
    that-kernel-10.4.4.25-1-data2sd.zip (or the overclock version, that-kernel-10.4.4.25-1-oc-data2sd.zip)

    3. Insert the microSDcard and make sure it's working by boot into twrp. Tap on install and twrp should see all the previous copied zip files on the fat32 partion.

    Action:

    1. In TWRP, take a nandroid - backup to the external microSDcard

    2. Flash mount-data2sd.zip

    3. Restore the backup you just made

    4. Flash cromi-3.2.x-data2sd.zip

    Optional: flash that-kernel-10.4.4.25-1-data2sd.zip (or the overclock version, that-kernel-10.4.4.25-1-oc-data2sd.zip). I personally find the Clemsyn kernel flashed by cromi-3.2.x-data2sd.zip works fine.

    5. Reboot - Done. You should see all your stuff, but now it's running on data2sd.

    buhohitr, please correct me if I have anything wrong here.
    6
    I am bit confused what the exact procedure is for a working Data2sd tablet and reading some of the posts in this thread didnt help me either.

    1. Format your card with Gparted
    2. install mount-data2sd.zip
    2. Install cromi-3.4.x-data2sd.zip
    3. Install CROMI 3.4.1 rom
    4. reboot

    I dont know if doing it in that order is correct. Can anyone please show me the right order to get Data2sd working? And how do i disable journal?

    I have kingston 32gb class10 which I have formated using Gparted (Partitions 1st: 8mb fat32 2nd: 29GB ext4). And this is my first time installing Data2sd.

    I can also confirm that MiniTool _doesnt work_ !


    You may need to be on the 10.4.4.25 bootloader. Not sure if it is required, but it does not hurt to upgrade to it.

    Then, I prefer buhohitr's procedure:

    First, using TWRP, install CleanRomI normally on your tablet, reboot into it, and go through the setup. Power off the tablet.

    1. Using Gparted, Format your microSDcard with first partition fat32 and the second partion ext4, with the boot flag.

    2. Copy your required zip files onto the fat32 partition:

    cromi-3.4.x-data2sd.zip
    mount-data2sd.zip
    that-kernel-10.4.4.25-1-data2sd.zip (or the overclock version, that-kernel-10.4.4.25-1-oc-data2sd.zip)

    3. Insert the microSDcard and make sure it's working by booting into twrp. Tap on install and twrp should see all the previous copied zip files on the fat32 partion.

    Action:

    1. In TWRP, take a nandroid - backup to the external microSDcard

    2. Flash mount-data2sd.zip

    3. Restore the backup you just made

    4. Flash cromi-3.4.x-data2sd.zip

    Optional: flash the overclock kernal version, that-kernel-10.4.4.25-1-oc-data2sd.zip

    5. Reboot - Done. You should see all your stuff, but now it's running on data2sd.