yashsingh1/xdaforums huggingface dataset:
[Transformer TF300T Android Development] untermensch:
I finely got data2sd to work how I like.

to activate data2sd:

the first partition on the card must be ext4 formatted

AND have a label of "data2sd", that is it! you don't have

to copy ANYTHING the tablet will behave just like it does

after a factory reset/wipe data and you can restore the

tablet from the "cloud". if you want to revert to stock

just eject the card.

/sbin/data2sd.sh

#!/system/bin/sh

DEVPATH=/dev/block/
DATA2SD=mmcblk1p1
DATA=mmcblk0p8
BUSYBOX=/system/xbin/busybox
MOUNTOPT=noauto_da_alloc,noatime,nosuid,nodev,nomblk_io_submit,errors=panic
FSTYPE=ext4

# wait for system to mount
while [ ! -d /system/app ] ; do
done

# check for busybox
if [ ! -e $BUSYBOX ] ; then
exit 1
fi

# check superblock for "data2sd" remount data if needed
if [ -b $DEVPATH$DATA2SD ] ; then
if $BUSYBOX dd if=$DEVPATH$DATA2SD skip=1144 bs=1 count=16 | $BUSYBOX grep data2sd ; then
$BUSYBOX mount -o rw,remount -t rootfs rootfs /
$BUSYBOX mkdir /internal_sd
$BUSYBOX mount -o ro,remount -t rootfs rootfs /
$BUSYBOX mount -o $MOUNTOPT -t $FSTYPE $DEVPATH$DATA /internal_sd
$BUSYBOX umount -l /data
$BUSYBOX mount -o $MOUNTOPT -t $FSTYPE $DEVPATH$DATA2SD /data
$BUSYBOX mkdir /data/media/internal_sd
$BUSYBOX mount -o bind /internal_sd/media /data/media/internal_sd
fi
fi

exit 0

/init.mods.rc

# init.mods.rc

service initd /system/xbin/busybox run-parts /system/etc/init.d/
class main
user root
group root
oneshot

service data2sd /system/bin/sh /sbin/data2sd.sh
user root
group root
oneshot

on property:init.svc.data2sd=stopped
trigger post-fs-data
load_persist_props

on post-fs
start data2sd

on post-fs-data
# copied from init.cardhu.rc "on boot"
# GPS
mkdir /data/gps
chown system system /data/gps
chmod 770 /data/gps
# Wiimote connect status
write /data/misc/wminput/connected 0
chmod 0666 /data/misc/wminput/connected
# ril
mkdir /data/modem 0770 radio system

then hook init.mods.rc by adding "import /init.mods.rc" to init.rc

import /init.${ro.hardware}.rc
import /init.usb.rc
import /init.trace.rc
import /init.mods.rc

EDIT:

some info about sdcards

http://xdaforums.com/showthread.php?p=15269669#post15269669

http://www.tomshardware.com/reviews/microsdhc-memory-card-performance,3011-12.html
[Transformer TF300T Android Development] jgaf:
Hey Unt, is it possible to restore from a TWRP backup using a similar prompt as Nik said: "mount /dev/block/mmcblk1p2 /data"? Making it a lot easier to restore Data.
[Transformer TF300T Android Development] untermensch:
Yes, I am using the first partition so the command would be

mount -t ext4 /dev/block/mmcblk1p1 /data
[Transformer TF300T Android Development] jgaf:
Unt just tried your kernel, it seemed it didn't work since my tablet started as it always does, all apps and stuff is in the same place.

It seemed something was written into the Ext4 partition since after it said it had 1GB of used space, but dont know what happend. Going to try Nik's kernel now.
[Transformer TF300T Android Development] untermensch:
the partition must have the label "data2sd" it must be the first partition. or it will be ignored, you can try e2label to set the partition label.

format partition:

mke2fs -L data2sd -T ext4 /dev/block/mmcblk1p1
tune2fs -c 0 /dev/block/mmcblk1p1

copy data:

mkdir /data2sd
mount /dev/block/mmcblk1p1 /data2sd
cp -frp /data/* /data2sd/
[Transformer TF300T Android Development] jgaf:
Yeah I set the label on minitool not sure what happened. I'm currently downloading Ubuntu to use it on VirtualMachine and use gparted since everyone says its better.

---------- Post added at 05:49 AM ---------- Previous post was at 05:42 AM ----------

Something I'm doing wrong since Nik's kernel did the same nothing changed :-/

Whenever I flash the kernels I'm getting and error at the end it says

E:Unable to mount '\staging'

Could this be the problem? If so how could I fix this?

---------- Post added at 06:17 AM ---------- Previous post was at 05:49 AM ----------

Should it work just by flashing the update.zip? Or are there any other steps?
[Transformer TF300T Android Development] Niksunen:
Nice work man :)

Only thing that comes to my mind, is that implemation forgot entirely mount internal data to use. Internal memory is big 32gb and it is good storage to movies, mp3, large stuffs etc.
[Transformer TF300T Android Development] petter244:
Wow, that's impressive Untermench! Way to go!

Is the latest kernel for the 3g version, or wifi only? Or have you somehow magically managed to merge them into one kernel?

I tried the kernel, but my fstab.cardhu still says its using mmcblk0p8 for some reason. First partition on sd card is labeled data2sd (via gparted) and filesystem is ext4.

Any suggestions on what i could be doing wrong?
[Transformer TF300T Android Development] untermensch:
good point, updated the post with new version.
[Transformer TF300T Android Development] untermensch:
fstab is not being edited, this is the 10.4.4.16 source it has most of the code

for mobile data to work, but don't know it does.
[Transformer TF300T Android Development] BrateloSlava:
Ie I can just reformat the memory card microSD, and then give it a label "data2sd"? And do not create any additional sections on this card?

This memory card, I still only use to expand the internal memory.
[Transformer TF300T Android Development] untermensch:
yes, that is how I am using it.
[Transformer TF300T Android Development] petter244:
On the kernel in the OP (TG version) i get 5000+ IO points in quadrant. Whereas on the new kernel i get 800-900, so im guessing somthing has gone wrong with the data2sd, because i see Niksunen getting 8000+ points with a class 6 card, and 10000+ on a class 8 card.

And like I mentioned earlier, sd-card is formatted pr. your instructions. So if you have any advice I would appreciate it!

PS: Anyone else getting 5000+ IO on quadrant with stock JB + Seans build.prop? I thought i read somewhere that stock is 900-1000?!

By creating a folder called test in the regular /data folder, I am able to verify that this is the one that boots, and that the external sd is unused.

If all you have to do in order to make this work is to format the first partition on the sd card to ext4 and label it data2sd then i have no idea why this isnt working.
[Transformer TF300T Android Development] jgaf:
I don't understand I'm unable to get this working T_T. Nik's kernel won't boot and Unt's doesn't change anything. I just tried doing one partition EXT4 labeled data2sd in gparted and still it started as I left it with everything in place. Are you guys using TWRP 2.3.1.0 I think that's the problem I keep getting the same error: E: Unable to mount ' /staging'

Any help would be apreciated, thanks in advance

Note: Tried downloading previous version of TWRP but the servers are down :(
[Transformer TF300T Android Development] Niksunen:
i use twrp earlier version, (2.2.0.0? i dont remember correct version number)
[Transformer TF300T Android Development] untermensch:
are you ejecting the card after you format, it wont mount it the file system is "dirty".
[Transformer TF300T Android Development] jgaf:
No luck so far tried several times with each kernel on the latest TWRP and then with 2.2.2.0 TWRP (which doesn't show any errors) no luck. I'm partitioning using Gparted Live OS, booting it before windows - formatting - creating partitions - turning off computer - taking out card from card reader - inserting card on turned off tablet - turning on into recovery - flashing kernel - rebooting. Nothing seems to work T_T I'm thinking of starting off with a fresh ROM don't know if that would help.
[Transformer TF300T Android Development] untermensch:
I updated the data2sd script to search all partitions on mmcblk1 for the "data2sd"

label. I cant make it anymore idiot proof.

Edit:

added busybox CWM/TWRP? flashable
[Transformer TF300T Android Development] .psd:
Any chance you will update it to move cache and dalvik (or other major components similar to /data) to SD as well?
[Transformer TF300T Android Development] untermensch:
dalvik is at /data/dalvik-cache it is already moved, I don't think cache is used

for anything other than firmware updates and recovery logs. So no.
[Transformer TF300T Android Development] untermensch:
I just thought of something, you also need busybox installed at /system/xbin/busybox

or the script will quit. I assume any flashable root would include busybox and

install it to /system/xbin because installing it anywhere else will conflict with

the stock android utilities. if you need busybox let me know and I will whip up

a flashable busybox.
[Transformer TF300T Android Development] jgaf:
Okay I just formatted and partitioned the sdcard through adb using the commands you said "mke2fs.... and tune2fs...." Everything went okay, there weren't any errors (there only one partition EXT4 labeled data2sd). After that I rebooted into recovery and flashed the latest "idiot-proof kernel" :p wiped caches and rebooted. Nothing happened booted into same, as if nothing had changed. I saw your busybox post, I do have busybox installed in /xbin I just updated it just in case using busybox installer. Rebooted again no go.
[Transformer TF300T Android Development] untermensch:
post your dmesg
[Transformer TF300T Android Development] jgaf:
Here's my latest dmesg, I tried reformating again on minitool and this is the result:
[Transformer TF300T Android Development] untermensch:
this looks to be the problem, which card is this? if it is cheap enough I'll see about purchasing one and adding support for UHS-1 cards to

the kernel source. If you want to use the whole card for data2sd you could remove all the partitions and just format the bare device

mke2fs -L data2sd -T ext4 /dev/block/mmcblk1
tune2fs -c -1 /dev/block/mmcblk1

50/50 chance that it will work, if it does work performance will likely suck.

<4>mmc2: host does not support reading read-only switch. assuming write-enable.
<6>mmc2: new ultra high speed SDHC card at address e624
<6>mmcblk mmc2:e624: Card claimed for testing.
<6>mmcblk1: mmc2:e624 SU32G 29.7 GiB
<3>mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00
<4>mmcblk1: retrying using single block read
<3>mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0x0
<3>mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00
<4>mmcblk1: retrying using single block read
<3>mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0x0
<3>mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00
<4>mmcblk1: retrying using single block read
<3>mmcblk1: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0x0
<6> mmcblk1: unable to read partition table
<6>[mmc]:mmc_rescan_try_freq:2060 mmc2: SD completed
[Transformer TF300T Android Development] jgaf:
So the culprit all this time has been the incompatibility with UHS-1 T_T, Bah I decided to get this card since some ppl on the prime Data2SD thread had gotten them to work. I'm gonna try you suggestion and see how it goes. Anyways this is the exact card I got: http://www.amazon.com/gp/product/B007XZM6VG/ref=oh_details_o01_s00_i00

Thanks for all the help :)

Tried the above and the tablet went into bootloop on ASUS screen, so yeah reverted back to the latest kernel on OP and formatted the sdcard back to Fat32 to use for storage.
[Transformer TF300T Android Development] untermensch:
My Lexer 32Gb class 10 works but performance is terrible for data2sd, so I'm using a Sandisk 16Gb class 6 performance is about the same

as the internal overall I'm not that impressed with data2sd.
[Transformer TF300T Android Development] BrateloSlava:
Yesterday, I tried to create a partition on microSD (ext4). MiniTool Partition Wizard Home Edition 7.6

After the end of the program the memory card (Team microSD 32 GB) was unreadable. When connected to the tablet, it is defined, but no partitions on it are not. So it is not mounted.

Today, I'll take the memory card to the service center. And at the same time buy a new one.

Advise the normal program for windows to create ext4 partition.
[Transformer TF300T Android Development] petter244:
This is the card I have to, but I dont think performance will suck! http://www.integralmemory.com/faq/what-uhs-1

This is a good and popular card (big bang for the buck), and I really hope to see it working one day!

Heds up!! I tried earlier having just one partition on it, but it did not work.
[Transformer TF300T Android Development] petter244:
I found this:

mmcblk0: error -84 transferring data

mmcblk0: error -84 transferring data

end_request: I/O error, dev mmcblk0, sector 581756

Error 84 is EILSEQ: "Basic format problem with the received or sent data (e.g. CRC check failed, incorrect opcode in response or bad end bit)".

Over here --> http://code.google.com/p/sim1/wiki/SDCard

Not sure if it helps at all, yust thought i'd let you know..
[Transformer TF300T Android Development] Niksunen:
My Extreme Pro UHS-1 arrived today. And just like this, my kernel doesent support it, i get just same error in dmesg.
[Transformer TF300T Android Development] jgaf:
You think the support could be added in the future?
[Transformer TF300T Android Development] Niksunen:
well anything is possible. I look out for it, as soon i have time (ive really busy right now. Move to new appartment, and school works etc.
[Transformer TF300T Android Development] untermensch:
I just ordered a 64Gb UHS-1 card

http://www.amazon.com/gp/product/B007WTAJTO/ref=oh_details_o00_s00_i00

so I will start working on the UHS-1 issue when the card shows up.
[Transformer TF300T Android Development] BrateloSlava:
If the memory card microSDHC UHS-1 directly into the tablet include - does not work, and if through the SD adapter - all right.

Not determine the type of card, if connect the memory card directly?
[Transformer TF300T Android Development] jgaf:
Mine works, it just doesn't work on the data2sd kernel. Right now I'm using it as storagr fat32 and it is recognized.
[Transformer TF300T Android Development] BrateloSlava:
I don`t use data2sd kernel, but card is not recognized. :(
[Transformer TF300T Android Development] qwahchees:
What's everyone's read/write's using this kernel?

I'm getting 20 MB/s Sequential Read, 5.94 MB/s Sequential Write.

Random speeds are knocked to 15/3 :L
[Transformer TF300T Android Development] BrateloSlava:
microSDHC UHS-1

untermensch

Yesterday, for the tests, I installed JellyBean-Hydro 4.1. The memory card (Team Xtreem MicroSDHC UHS-1 32GB) is recognized and works fine. However, after I installed the kernel, the memory card has disappeared from the list of available devices. The memory card is formatted as FAT32 without a label. I saved all the kernels that are in this thread. Before each test, I return all the data from the backup. But even with this version of the kernel is not working.
[Transformer TF300T Android Development] untermensch:
Thanks, the linked kernels are based on TF700T kernel source code built up from TF300T source by patches, my card is scheduled to arrive Monday once the card arrives it should be pretty easy to track down the change(s) that is causing the UHS-1 issue.
[Transformer TF300T Android Development] BrateloSlava:
Noticed one more thing. After installing Hydro 4.1 2D performance in the test (Quadrant) 3 times higher than in your kernel. About 330 to your kernel and about 1,000 in Hydro. Everything else - worse.
[Transformer TF300T Android Development] untermensch:
fstab.carhu got reverted to stock during the data2sd addition, you just need to remount with the option noauto_da_alloc, and they are probably setting force GPU rendering

for 2D in developer options.
[Transformer TF300T Android Development] BrateloSlava:
untermensch

Clearly, we will wait for the arrival of the card to you.
[Transformer TF300T Android Development] stevtec86:
sorry guys, the kernel 10.4.4.16 'is possible to OC or still too early? ?

Thank
[Transformer TF300T Android Development] BrateloSlava:
Yes, 1.7 GHz.
[Transformer TF300T Android Development] xSvenHD:
Hi guys

I wanted to install this kernel that i downloaded on the first post but i got some questions:

I don't wanna use data2sd is that posible?

And how do i install the kernel ontop of cleanrom?

like this? :

copy tf300.zip on my device and go to TWRP recovery ;

wipe cache & dalvik-cache -> Install ! ;

Hope you guys dont mind me posting this questions here!

Thanks
[Transformer TF300T Android Development] BrateloSlava:
Maybe someone will need it ... :) So I checked the memory card MicroSDHC UHS-1 compatibility with CleanROM 2.5. All right...

At the same time added to the post test results of this card.
[Transformer TF300T Android Development] BrateloSlava:
If we not make a special section on the memory card or format the entire card completely into ext4 - there will be no data2sd.
[Transformer TF300T Android Development] xSvenHD:
ok thanks and how about my other questions? can u awnser them ?
[Transformer TF300T Android Development] BrateloSlava:
Yes.
[Transformer TF300T Android Development] xSvenHD:
ok thanks gonna try it out.
[Transformer TF300T Android Development] stevtec86:
Sorry and where to download?
[Transformer TF300T Android Development] BrateloSlava:
Latest kernel here

Although, in my tests, the overall performance is not very affected by overclocking.

untermensch did a great job to improve the overall performance of the kernel.
[Transformer TF300T Android Development] stevtec86:
Sorry, I wanted to say that I also have the TWRP and not what I wrote ... write error!

Thank's
[Transformer TF300T Android Development] untermensch:
it should not be a problem with any recovery, the stock ASUS performance profiles

in the notification menu still work, power savings is 1Ghz max clock, balanced

is 1.3Ghz max clock , and performance is 1.6Ghz. and the overclock apps

in the android market will work also.
[Transformer TF300T Android Development] Niksunen:
First quick result. Quadrant at 1600 mhz on data2sd mode (sadly i have only class 6 card now, so the speed is best possible, but soon i get faster sd card)
[Transformer TF300T Android Development] stevtec86:
Sorry guys, i use fastboot, I gave the right commands, and says waiting for device ... what?

the command is written a few posts ago, I copied the boot file in the folder fastboot ...

who tells me well as I do?

because he says "waiting for device"?

My commands with fastboot are there:

reboot into recovery

I select the icon of the USB and connect the tablet to PC

then open the command promt (as an administrator)

and I write:

cd c:\Fastboot ==> Start

fastboot devices ==> start

fastboot flash boot kernel.blob ==> start

the Promp command says: waiting for device

The procedure are corret or not?
[Transformer TF300T Android Development] ppmeis:
Great news and great job! Better OC than through ICS based ROMS! Now we have one of the most powerful tablets worldwide! (Nexus 7 goes first...for now lol). Thanks a lot.

Could these files been flashed on any Stock/Custom Rom based on latest JB? I suppost these files will be added on other Roms soon...but my patient is very short :eek::eek::eek:

I wanna flash NOW!!!!! lol
[Transformer TF300T Android Development] cdrshm:
Im stock, but rooted.... can i install the kernel?
[Transformer TF300T Android Development] ppmeis:
What do you mean with "data2sd mode"? I use DirectoryBind but only for /sdcard/Android/data files, like Gameloft games and others...Do you use the same or you also use external SD for system files? How?

Thanks a lot.
[Transformer TF300T Android Development] Niksunen:
I have whole /data and /cache moved to sd card. And on the sd card i have 3 partitions, one fat32 for "normal sd card" and two ext4 partitions for /data and /cache. This mod increase io speed, but now i have only class 6 card so its write/read speed are quite low. I ordered fast sd card, and test then again.

Basicaly you have to partition sd-card right, and flas kernel wich support this data2sd and, install / or copy all /data to sd card. More this subject in seans hydro rom topic.
[Transformer TF300T Android Development] stevtec86:
no help me?
[Transformer TF300T Android Development] ppmeis:
I want to do this mod because I have 32gb Samsung Class 10 card and I noticed much differences in games like NOVA 3, Asphalt 7...Just curious games moved to sd card have longer loading times but gameplay are smoother than before. Any tutorial for do this mod? I have CleanRom and I used Seans Hydro Rom before but I don't see any moded kernel for this...

Thanks for the info.
[Transformer TF300T Android Development] Sib64:
Post deleted ;)
[Transformer TF300T Android Development] surdu_petru:
Hi !

First , nice work here !

...for flash kernel , I think that your command should be :

> fastboot -i 0x0B05 flash boot kernel.blob

Good luck ! :good:
[Transformer TF300T Android Development] untermensch:
I dropped the "-i 0x0b05" part by mistake once and it still worked so I don't

use it anymore. I am on Linux, it my be required on Windows or Mac.
[Transformer TF300T Android Development] Sib64:
Could you insert on your OP the process for flashing your kernel with line commands for windows and Mac (if you can)

This to avoid having to answer the same answer several times...

1 - Reboot into your recovery

2 - Select the icon of the USB and connect the tablet to PC

3 - Open the command lines promt into your PC, and type those lines command:

cd c:\fastboot

Flashing the kernel via fastboot

fastboot -i 0x0B05 flash boot kernel.blob

modules are optional install via adb while in recovery

adb shell sh -c "rm -fr /system/lib/modules/*"

then cd into the directory with the modules

adb push ./ /system/lib/modules

and for finish

fastboot -i 0x0b05 reboot

Well done @untermensch :good:
[Transformer TF300T Android Development] stevtec86:
Sorry guys, but the modules that serve?

once you have installed the kernel with OC, I still have to copy the modules?
[Transformer TF300T Android Development] Sib64:
Absolutely, you need to push the modules in : system/lib/

What are exactly the modules for kernel?

Look at this from "[REF][TWEAKS] Kernel Governors, Modules, I/O Schedulers, CPU Tweaks, AIO App Configs" by @droidphile
[Transformer TF300T Android Development] stevtec86:
I was wondering, since you can make the OC, you can also implement the GOVERNOR and I / O Scheduler, or it is still early?
[Transformer TF300T Android Development] untermensch:
I added the simple I/O scheduler, and V(R) I/O scheduler from motley-git Nexus 7 kernel source

last night. and will probably add GPU overclocking motley-git's source also.

I'm not really into publishing pre-built kernel's so if you want something special you may want

to pull the code and hack on it yourself.
[Transformer TF300T Android Development] untermensch:
added the Samsung pegasusq governor.
[Transformer TF300T Android Development] stevtec86:
so you can have the Governor and I / O here?

how do they add?
[Transformer TF300T Android Development] DMardroid:
Thanks. Musta missed that one

Giving it a test run
[Transformer TF300T Android Development] untermensch:
I have the UHS-1 issue fixed the problem was that the TF300T does not support

DDR mode while the TF700T does, also ASUS had capped the max card frequency

to 41Mhz so I changed that back to 50Mhz. My first run with Quadrant got an I/O

score of 7961 on the stock ASUS firmware which is the highest I have got so far.
[Transformer TF300T Android Development] Godswrath:
Notice a lot of people here are using the Data2SD mod, can someone give me a link to a guide you used? Is it from the 700t forums? If so, did you have to do any modifications? I've been looking all over the 300t forums without much luck. I need some sort of installation procedure, lol. Thanks so much.

-Gods
[Transformer TF300T Android Development] jgaf:
This is just a regular kernel not data2sd? Anyways I'm installing it now xD
[Transformer TF300T Android Development] untermensch:
it does data2sd
[Transformer TF300T Android Development] jgaf:
Ok I'll try it with the my UHS-1 card, gotta go reformat it first xD