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

Search This thread

mbnaeem

Senior Member
Jan 18, 2015
156
24
London
start with data2sd unless you want to test multiple roms an what kind of sdcard do you have to see if it is worthwhile.

I just use the tablet for basic tasks like surfing the web but everything so laggy. I don't need multiple roms. Will be using a 16 or 32gb class 10 microsd. I'm tempted to try the new zombi 5.1 Rom.
 

sbdags

Inactive Recognized Contributor
Jun 24, 2007
12,753
15,558
Kenilworth, Coventry
OnePlus 9 Pro
I just use the tablet for basic tasks like surfing the web but everything so laggy. I don't need multiple roms. Will be using a 16 or 32gb class 10 microsd. I'm tempted to try the new zombi 5.1 Rom.

Yes try the new zombi rom - if you format /data first (remember it takes 90+ mins so don't interrupt it) you will find it very smooth :)
 
  • Like
Reactions: mbnaeem

n8mack33

Senior Member
Oct 7, 2007
148
7
Reformat SD

Is it ok to reformat the micro SD back using Windows disk management? What format do I format it to? I don't have a CD drive on the computer I am using. If so, what format would be best for a Surface Pro 3? If not I can use a computer at work. Any instructions would be awesome :)
 

h?2

Member
Jul 23, 2012
34
14
Is there any modern ROM that works with data/rom2sd and disk encryption? Disk encryption is a must for my use case, but the internal storage is sooo slow. People say that disk encryption increases lag, but since cpu is totally not the bottleneck on this device, it is neglegible (at least for me). Any ROM this works on?
I already tried some CrombiKK with Rom2SD a while back, but when I hit encrypt in the settings the device just reboots :(

Thanks for your help!
 

berndblb

Inactive Recognized Contributor
Nov 22, 2012
4,875
2,113
Los Angeles, CA
I had better results with a Scandisk class 4 than a class 10 on data2sd. Really depends on the card.
But data2sd is kinda dated. The winning combo for the TF700 to nowadays is: ZOMBi-Pop with internal data on f2fs after a full format of /data in TWRP.
 
  • Like
Reactions: anjey.k and RD274

RD274

Senior Member
Jan 16, 2011
160
9
Toronto
I had better results with a Scandisk class 4 than a class 10 on data2sd. Really depends on the card.
But data2sd is kinda dated. The winning combo for the TF700 to nowadays is: ZOMBi-Pop with internal data on f2fs after a full format of /data in TWRP.

Thanks for replying. I am currently benchmarking all my SD cards looking for the fastest/most reasonable combo. So far my Transformer does 12mb read/5mb write which is whats causing the lag I guess. I tried a 8gb Sandisk class 2 (10mb read/4mb write), 32gb Strontium class 10 (18mb read/13mb write) and now waiting for that 16gb Strontium card to make my final decision.

Now for your winning combo - This f2fs thing is new to me. I've been reading up on this thread. So basically I don't need app2sd or any sd card. Just formatting my transformer internal memory with this new file system and flashing a compatible rom that will take advantage of it like zombipop is enough to cure lag and give a reasonably good experience?
 

sbdags

Inactive Recognized Contributor
Jun 24, 2007
12,753
15,558
Kenilworth, Coventry
OnePlus 9 Pro
Thanks for replying. I am currently benchmarking all my SD cards looking for the fastest/most reasonable combo. So far my Transformer does 12mb read/5mb write which is whats causing the lag I guess. I tried a 8gb Sandisk class 2 (10mb read/4mb write), 32gb Strontium class 10 (18mb read/13mb write) and now waiting for that 16gb Strontium card to make my final decision.

Now for your winning combo - This f2fs thing is new to me. I've been reading up on this thread. So basically I don't need app2sd or any sd card. Just formatting my transformer internal memory with this new file system and flashing a compatible rom that will take advantage of it like zombipop is enough to cure lag and give a reasonably good experience?

It will certainly help that's for sure...
 
  • Like
Reactions: RD274

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.