[Tutorial/HOWTO] Convert Your External SD Card from FAT/exFAT to EXT4! (3 ways!) - Galaxy S III General

Hello guys.
I was looking for a similar guide to link to my friend but didn't find anything, so I decided to write my own.
Personally I didn't find any good guide regarding partitioning from android itself, so I think it's also more unique guide because you can easily make your own partition layout without using PC at all.
Why I should use EXT4 instead of FAT/exFAT?
1. We're running Android, Android is based on Linux. EXT4 is native linux-proposed filesystem, while FAT/exFAT is not.
2. All our internal partitions (/efs /data /system /cache /preload) use ext4, natively.
3. CM has poor exfat support, while fat32 is not recommended for big file systems (over 2 GB) because it doesn't work well with them, thus microsoft implemented exfat.
4. EXT4 has better stability and performance, especially on Android devices, compared to exfat and fat.
When you should not use ext4 over fat/exfat?
- When you for whatever reason use your external sd card in windows environment physically. Android works in MTP mode, you'll use your ext4 external sd card the same way as you use internal one under windows. But if you for whatever reason puts your external sd card f.e. in usb adapter connected with windows then it won't work. So yeah, if you keep your external sd card in your phone then you're fine.
Expert Way (Requires fdisk/mke2fs utilities (busybox), works always):
1. Launch any terminal from Android environment (f.e. Android Terminal Emulator or adb shell through PC)
2. Make sure you have root (su command)
3. Make sure you have all required utilities. Type fdisk --help and mke2fs --help, both commands should print usage. If you get "command not found" then you don't have required utilities. Either install Busybox or CM-Based ROM with native busybox support (tested on ArchiDroid 2.X)
4. Unmount your external sd card (umount /storage/sdcard1)
5. Launch fdisk partitioning program on your external sd card (fdisk /dev/block/mmcblk1)
6. Destroy partition table (o), create new partition , make sure it's primary (p) and first one (1).
7. You can check if you're satisfied with your partition layout (p). When you're done exit and save changes (w)
8. Create ext4 filesystem on your partition (mke2fs -t ext4 /dev/block/mmcblk1p1)
9. Reboot
Android should automatically detect and mount external sd card in ext4 after reboot.
Here you can find a short movie which shows going through expert way recorded by me
Intermediate Way (Requires USB Adapter and some patience, should work like a charm):
1. You'd need USB Adapter or any device which can read micro sd cards on PC
2. Open any linux-supported partitioning program (f.e. partition magic, gparted, parted), it needs to support ext4.
3. Delete all partitions from your external SD Card (typically, one fat/exfat) and create one ext4 partition.
4. In case you'd also want hardswap create 2 partitions, one primary ext4 one and second primary swap one.
Newbie Way (Requires PhilZ Touch Recovery, may not work):
1. Launch PhilZ Touch Recovery
2. Select "Mounts & Storage" => "format /external_sd"
3. Select "ext4" as a filesystem
4. Please note that it can take some time. This way you should get running ext4 filesystem, but personally I didn't test this method, as I prefer more advanced ones .
This guide is more or less universal but I'm using sgs3 external sd card paths so I want to make sure nobody bricks other phones . Personally I suggest using expert way, as it's probably the easiest one.
Hit thanks if it helped, I hope it did .

@JustArchi thanks for the tutorial. Now for the sake of sdcard wearing. I would like to disable Journaling. How do you do that?
EDIT: also i noticed after formatting the externalsd card there is 3 GB occupied by nothing (?) This is normal?

cba1986 said:
@JustArchi thanks for the tutorial. Now for the sake of sdcard wearing. I would like to disable Journaling. How do you do that?
EDIT: also i noticed after formatting the externalsd card there is 3 GB occupied by nothing (?) This is normal?
Click to expand...
Click to collapse
tune2fs -O ^has_journal /dev/block/mmcblk1p1 should do the trick. You can put it in init.d if needed.
Also no, you should get full size of your sdcard. Are you sure that you've firstly destroyed partition table (o) and then created new full-size partition , as showed in the video?
You can use fdisk also to get information about your external sd card and find why is it smaller than it should be.

HI, My 64gb is two partitioned one hardswap and other primary.
Will I lose data on both partitions if I delete partition and format to EXT4?

golti said:
HI, My 64gb is two partitioned one hardswap and other primary.
Will I lose data on both partitions if I delete partition and format to EXT4?
Click to expand...
Click to collapse
You will lose data contained in the partition you are formatting. If you leave the other partitions untouched, you won't lose their data.

golti said:
HI, My 64gb is two partitioned one hardswap and other primary.
Will I lose data on both partitions if I delete partition and format to EXT4?
Click to expand...
Click to collapse
Just don't use (o), as it will destroy everything. Use an option to delete selected partitions (d, if I remember correctly) and create them through n.

System Data
Hi, thanks for te help, but now a have a 1 gb lost by system data or 0.8gb if i disable the journaling, that is right??? Thanks

vazio said:
Hi, thanks for te help, but now a have a 1 gb lost by system data or 0.8gb if i disable the journaling, that is right??? Thanks
Click to expand...
Click to collapse
It depends on your rom and also if you created ext4 properly. I've formatted my 2 GB SD Card to EXT4 and I got 1,80 GB free (yes with journaling). This is because 5%-10% is reserved for "super blocks". Read more -> http://en.wikipedia.org/wiki/Ext4

problem using expert method
Hi Guys,
I am new fairly new to rooting and using terminal emulators.
I have a rooted samsung galaxy note 2 with superSU, busybox and shell terminal emulator. I verified fdisk and mke2fs
(fdisk --help and mke2fs --help) but then when I tried the command
"umount /storage/extSdCard"
I get the error message "Operation not permitted"
Can anyone tell me why this might be?
Thanks
/storage/extSdCard is the path to the external sdcard on my device.

Hottot2 said:
Hi Guys,
I am new fairly new to rooting and using terminal emulators.
I have a rooted samsung galaxy note 2 with superSU, busybox and shell terminal emulator. I verified fdisk and mke2fs
(fdisk --help and mke2fs --help) but then when I tried the command
"umount /storage/extSdCard"
I get the error message "Operation not permitted"
Can anyone tell me why this might be?
Thanks
/storage/extSdCard is the path to the external sdcard on my device.
Click to expand...
Click to collapse
Did you login as root before? (su)

JustArchi said:
Did you login as root before? (su)
Click to expand...
Click to collapse
I did not.
However, I did try again and got the sane result. I used these commands in shell terminal emulator:
su -
mount
umount /storage/extSdCard
result: "Failed: Operation not permitted"
I have verified root with root checker...and after typing the command "su -" I was prompted by supersu to "allow"
I believe this issue will likely be something simple that I am not aware of.
I have tried this on my galaxy note 2 and my tab3 8.0 with the same results.
I really appreciate any help offered.

Hottot2 said:
I did not.
However, I did try again and got the sane result. I used these commands in shell terminal emulator:
su -
mount
umount /storage/extSdCard
result: "Failed: Operation not permitted"
I have verified root with root checker...and after typing the command "su -" I was prompted by supersu to "allow"
I believe this issue will likely be something simple that I am not aware of.
I have tried this on my galaxy note 2 and my tab3 8.0 with the same results.
I really appreciate any help offered.
Click to expand...
Click to collapse
Try to execute su -c "umount /storage/extSdCard"
It worked flawlessly in my case.

Thanks Archi. I was wandering around looking for a solution to the problem with my sd(I'm nooo0b if it goes about Linux/Android ). My Archidroid 2.3.3 did not recognized/mount my external card, so after following your instructions (using the terminal in android) now I can enjoy my 64gb sd card.. Great job!

JustArchi said:
Try to execute su -c "umount /storage/extSdCard"
It worked flawlessly in my case.
Click to expand...
Click to collapse
Ok. That worked. Thanks.
I then tried (su -c "fdisk /dev/block/mmcblk1")
Then...press m for help...or pressing "o" gets me a syntax error.
I have attached a screenshot.
Thanks again
Ryan

Hottot2 said:
Ok. That worked. Thanks.
I then tried (su -c "fdisk /dev/block/mmcblk1")
Then...press m for help...or pressing "o" gets me a syntax error.
I have attached a screenshot.
Thanks again
Ryan
Click to expand...
Click to collapse
Okay, you're user, not root. This is a weird android shell, that's why.
Try to use "su -i" to get root shell, then use fdisk (without su).

JustArchi said:
Okay, you're user, not root. This is a weird android shell, that's why.
Try to use "su -i" to get root shell, then use fdisk (without su).
Click to expand...
Click to collapse
Still didnt work. After typing "su -I" the next line still says "[email protected]:/$"
I was thinking I could try a reinstall of shell terminal emulator...or perhaps you could recommend a different one to use.
I will try again later tonight.
Thanks
Ryan

Hottot2 said:
Still didnt work. After typing "su -I" the next line still says "[email protected]:/$"
I was thinking I could try a reinstall of shell terminal emulator...or perhaps you could recommend a different one to use.
I will try again later tonight.
Thanks
Ryan
Click to expand...
Click to collapse
Try android terminal emulator, you must gain root shell. Typically "su" command does that, "su -l" should as well.

JustArchi said:
Try android terminal emulator, you must gain root shell. Typically "su" command does that, "su -l" should as well.
Click to expand...
Click to collapse
Alright...typed su and gained root....got through ttothe last step.
I typed "mke2fs -t ext4 /dev/block/mmcblk1p1"
and the result was: "mke2fs: invalid option -- t"
I have trying to read about mke2fs and the -t option but no luck so far.
Thanks
Ryan

Hello Archi and thanx for the tutorial
I followed all the steps, done it to the end, but after reboot I couldn't make any folder on SD card.
Card is recognized, formated as EXT4, but for some reason there is no way to put anything to it
Tried again with gparted, ended with same result.
Tried to change ownership, but that also didn't work out...
Now i reverted card to fat32...
Any idea what could be wrong?
btw, using NeatROM 4.4.2 with boeffla kernel and Philz 6.00.8
thanx in advance

Tom-Tom07 said:
Hello Archi and thanx for the tutorial
I followed all the steps, done it to the end, but after reboot I couldn't make any folder on SD card.
Card is recognized, formated as EXT4, but for some reason there is no way to put anything to it
Tried again with gparted, ended with same result.
Tried to change ownership, but that also didn't work out...
Now i reverted card to fat32...
Any idea what could be wrong?
btw, using NeatROM 4.4.2 with boeffla kernel and Philz 6.00.8
thanx in advance
Click to expand...
Click to collapse
Ext4 support is broken in your rom.
Hottot2 said:
Alright...typed su and gained root....got through ttothe last step.
I typed "mke2fs -t ext4 /dev/block/mmcblk1p1"
and the result was: "mke2fs: invalid option -- t"
I have trying to read about mke2fs and the -t option but no luck so far.
Thanks
Ryan
Click to expand...
Click to collapse
Your rom doesn't support mke2fs properly.

Related

DDMS Error

When i try to push or pull anything it says, e/ddms the file cannot be pushed because its a read-only file system. Any help?
Mdawg112 said:
When i try to push or pull anything it says, e/ddms the file cannot be pushed because its a read-only file system. Any help?
Click to expand...
Click to collapse
You have to remount the FS in read/write mode.
With adb it's 'adb remount'.
smw6180 said:
You have to remount the FS in read/write mode.
With adb it's 'adb remount'.
Click to expand...
Click to collapse
Ha, I feel stupid now.
Mdawg112 said:
Ha, I feel stupid now.
Click to expand...
Click to collapse
Happens to everyone at times. Don't sweat it
So what do you do, if you run adb remount
and it still say's read-only system when trying to push?
been dealing with it for a few days, looked all around the forums and didn't find anything that helped :-/
jubi23 said:
So what do you do, if you run adb remount
and it still say's read-only system when trying to push?
been dealing with it for a few days, looked all around the forums and didn't find anything that helped :-/
Click to expand...
Click to collapse
Good question. Unfortunately I have no idea. Never seen it fail. theoretically there's a command line you can run in adb shell to mount the FS read/write, but I can't remember it off the top of my head.
Something like mount -o rw /dev/m3blk (as I said I can't remember the exact filesystem name). I'd do a search for 'mount -o' on the forums. It's been posted more than once and I'm too lazy to find it for you
I believe you're refering to
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
if so, tried that too :-/ still nothing
i read someone had reformatted their card on xp vs 7, so tried that to and still nothing haha
i give up
thanks btw
Yeah, I'm having the same problem as you sometimes. Other times it works. It's very strange! It annoys me. Anyone have any idea on a fix?
jubi23 said:
I believe you're refering to
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
if so, tried that too :-/ still nothing
i read someone had reformatted their card on xp vs 7, so tried that to and still nothing haha
i give up
thanks btw
Click to expand...
Click to collapse
Yeah that's the one, thanks.
Have you tried that from recovery? Are you using a2sd and if so, what ext?
Are you able to mount the card as a disk drive? Are you sure the SD card isn't going bad on you?
Sounds like you've checked anything else I would have thought of...wish I could help.
Have you tried that from recovery? Are you using a2sd and if so, what ext?
Are you able to mount the card as a disk drive? Are you sure the SD card isn't going bad on you?
Click to expand...
Click to collapse
Well i'm actually trying to flash a new recovery (all in the pursuit of installing flipz new fresh rom with ext4 haha), so was doing it from the computer
I tried using a2sd but i'm pretty sure it didn't work, because i went to ext4 and to my knowledge fresh 2.0d can't use ext4, so yea, i fail
i am able to mount the card as a disk drive and can move things back and fourth via explorer, play music, everything except this seems to be fine, it's only a few weeks old, so i really hope it's not dying
jubi23 said:
Well i'm actually trying to flash a new recovery (all in the pursuit of installing flipz new fresh rom with ext4 haha), so was doing it from the computer
I tried using a2sd but i'm pretty sure it didn't work, because i went to ext4 and to my knowledge fresh 2.0d can't use ext4, so yea, i fail
i am able to mount the card as a disk drive and can move things back and fourth via explorer, play music, everything except this seems to be fine, it's only a few weeks old, so i really hope it's not dying
Click to expand...
Click to collapse
That could be it. ext4 doesn't play nicely with ext3 based stuff. It's 'semi' backward compatible (meaning you can mount ext4 as ext3) but it seems to have some serious inconsistencies that way. I'd recommend a re-partition and then upgrade ext3->ext4 AFTER you install the new ROM.
Heh. I had all KINDS of problems restoring an ext3 based nandroid after upgrading to ext4. Had to repartition and then restore the nandroid to get it to work.
well, loaded recovery, re-partitioned my sdcard, upgraded to ext3 and left it there, still nothing
the sd card wouldnt have any bearing on the ability to adb remount.
the /system partition is stored on the phone itself, so the mount -o ..yadda yadda
remounts the /system partition in this case /dev/block/mtdblock3.
the only reason a sd card would come to play is if youre runnign a2sd, in which case it makes symlinks (shortcuts) to the sdcard, if the sdcard is formatted improperly then a2sd will either cause a bootloop, or crash and then youre phone should boot normally but you wont have access to your ext4 partition (the partition with your apps).
im not sure how to fix a problem with adb remount, perhaps try a new version of the SDK or just a clean one.
good luck
I'm wondering if there is something wrong with my mounting
When i'm in the shell
if i cd /sdcard
then do a ls
nothing is returned
I've also directly copied the recovery image from my computer to the sdcard, and attempted to run the flash_image command and it says no such file or directory
I do have usb debugging enabled and am selected to mount the sdcard, is there some other step or something i'm missing?
nenn, i had actually just a little bit ago downloaded the latest sdk on a completely different machine and still same results
Alrite, so I was able to copy the image recovery from
explorer and flash from.terminal on my phone
Although I'd prefer to work from the pc, anyone have any other possible ideas?! I'm at a loss
-------------------------------------
Sent from my HERO200

[Q] "Damaged SD Card" notification?

What does this notification really mean? I'm running CM7 off an 8G SanDisk. The /sdcard filesystem appears intact, it mounts properly on CM7 and Linux, but this notification won't go away.
fsck on Linux reports no problems.
Might something be confused about partitions? I can't mount /emmc for some reason, CWM can't mount it when I tell it to format it, and USB mode doesn't export it, although it looks like it's trying to; Linux reports a /dev/sde (along with /sdcard at /dev/sdd), but it can't be used:
Code:
# fsck /dev/sde
e2fsck: No medium found while trying to open /dev/sde
Any ideas?
Thanks!
Dennis
Fixed it!
To recap, I'm running CM7 from SD. I was getting a "Damaged SD Card" notification, and my /emmc vanished, and it wouldn't export via USB ("No media present" was the error reported by Linux, although /dev/sde was created), and CWM couldn't format it for me (why not?).
Both were apparently from the same cause. I repaired mmcblk0p8, and now my /emmc is back and the Damaged notification is gone.
So, if you're getting that notification, it may not be about your SD card!
Details: I couldn't use dd from Linux, but I could dd if=...blk0p8 within Terminal Emulator. My busybox doesn't have mkfs.vfat, so I used dd to copy /boot onto the partition; this gives it a (small but sane) filesystem. I rebooted to get /emmc mounted properly (check fstab.vold for the gory details), connected the cable to my Linux PC, checked that the expected contents were on /dev/sde, unmounted it (command line, not via GUI) and ran sudo mkfs.vfat -I -n MyNookColor /dev/sde from the Linux command line. All is now well.
i hv the same issue but since i'm a noob at nook color and i dont knw anything abt linux... i hv no clue what your are talking about...
it would be a gr8 help to me and others who are not well versed with linux, if you could tell me exactly what did u do to fix this problem.
please help me with this issue.
ty
sd
stavan_d said:
i hv the same issue but since i'm a noob at nook color and i dont knw anything abt linux... i hv no clue what your are talking about...
it would be a gr8 help to me and others who are not well versed with linux, if you could tell me exactly what did u do to fix this problem.
Click to expand...
Click to collapse
Android is just as much a Linux system as Ubuntu or Fedora.
This applies if and only if Settings/Storage claims that you have no /emmc or /mnt/emmc, and if you've installed CM7 to emmc. Read the headers carefully.
Start Terminal Emulator.
In this window, type su. The prompt changes to #.
Type df.
If there's a listing for /mnt/emmc or just /emmc, try something else; this isn't for you.
We're going to reconstruct /emmc by copying /boot onto it. THIS WILL ERASE /emmc!!!
Type VERY CAREFULLY:
dd if=/dev/block/mmcblk0p1 of=/dev/block/mmcblk0p8
That's blk zero pee one and blk zero pee eight.
This will grind away for quite some time.
When it's done, reboot.
If you still get the notification, you have some other problem.
You now have a tiny /emmc instead of the 5G partition that should be there. Plug the cable into your PC, enable USB mounting, and verify that one of the volumes looks like a boot partition. If you run a Linux PC, check the device name (mine was /dev/sde, yours is probably different), unmount it, and do the mkfs I showed before.
If you run Windoze, tell it you're done with the /boot drive (like you would do with a thumb drive), and format that device (E:, F:, whichever it was) by (IIRC) right-clicking on it in an Explorer window and selecting Format. Again, SELECTING THE WRONG DEVICE WILL SCREW YOU UP. I am not responsible.
If you're not sure about ANY of these steps, please get expert local help.
Good luck!
Sent from my NookColor using XDA Premium App
i m booting cm7 from the sd card... and settings/storage/additional storage/mnt/emmc Unavailable...
so how do i fix this...
also when i plug NC in boot OS it shows 2 partitions, 1.undefined and 2. 4.98gb... instead of 5gb single partition originally present...

[Q] About custom roms and storage

Hey GT540 users!
I tryed many roms so far, for example utopia, aokp 4.0.4, project icecreamswift, some 2.3.7 roms which i dont remember the developers and etc. On every single custom rom i realise that i have space probs. I install around 15 apps and my device runs out of storage (or space) really really fast.
Please can you suggest some ideas about this problem? I allready made an ext3 partition on my sd card and really really care to use it smarter and wiser. I tryed link2sd but seems it crash a lot and all my apps are really messed up. If again ext3 is not needed, thats fine. i really need some suggestions.
Is anything i can do without an application? If not, do u mind suggest me some application please that works 100%?
Anything you want to ask im here.
Thanx in advance!!!
For 2.2 and 2.3 roms just use this, http://forum.xda-developers.com/showthread.php?t=1171531
i really really dont think thats a good idea... i really prefer i simple way than this...
manthos1978 said:
Hey GT540 users!
I tryed many roms so far, for example utopia, aokp 4.0.4, project icecreamswift, some 2.3.7 roms which i dont remember the developers and etc. On every single custom rom i realise that i have space probs. I install around 15 apps and my device runs out of storage (or space) really really fast.
Please can you suggest some ideas about this problem? I allready made an ext3 partition on my sd card and really really care to use it smarter and wiser. I tryed link2sd but seems it crash a lot and all my apps are really messed up. If again ext3 is not needed, thats fine. i really need some suggestions.
Is anything i can do without an application? If not, do u mind suggest me some application please that works 100%?
Anything you want to ask im here.
Thanx in advance!!!
Click to expand...
Click to collapse
I use link2sd without any issues - try an ext2 partition
Also, try the link -Grift- posted. That is actually quite easy, all you do is boot into fastboot, connect to PC, run a program, click some buttons DONE!
If you don't want to do any of these, then you are a bit stuck, sorry to say!
ok thanx for your info!
will try make an ext2 1st and retry link2sd, if not changing partiotion is my last hope
ok i installed link2sd and this time seems it works fine... well.. so far
the only problem i got, when i reboot the phone, the application link2sd requires a 2nd restart (soft one) because cant mount the apps. Is this ok or done again something wrong?
Cheers
manthos1978 said:
ok i installed link2sd and this time seems it works fine... well.. so far
the only problem i got, when i reboot the phone, the application link2sd requires a 2nd restart (soft one) because cant mount the apps. Is this ok or done again something wrong?
Cheers
Click to expand...
Click to collapse
I have the same problem too. link2sd cannot automount the 2nd partition at boot so each time I have to reboot the phone I must reboot it 2 more times to get link2sd mount the 2nd partition correctly. How can I solve this problem
no1 intrested to help us?
In Link2SD, Press the menu button, then select 'More'. Select Recreate mount script. Choose your ext partition type, then ok. Reboot your phone. If it still asks you to remount, try these command on Terminal:
Code:
mount -rw -t ext2 -o remount /dev/block/vold/179:2 /data/sdext2
then
Code:
mount -rw -t ext2 -o remount /dev/block/mmmcblk0p2 /sd-ext
If it's not an ext2 partition, change the 'ext2' in the command with what your ext partition is.
Did you use the Android "Move to USB storage" or "Move to SD card" idk function? on android 2.2 and above?
You don't need to repartition your SD card for it
I would suggest to use Apps2ROM app. This is an application that has the ability to move normal (user) application into the ROM and use them as system apps. Th application can also uninstall system apps.
So, first you can get rid of system applications that you do not use and you utilize also the available system memory. Be careful not to go under 20 MB of the system mem.
You need root access to do so and some care not to uninstall essential system apps for the stability of the Operating system.
Sent from my LG GT540 using XDA
jhonnyx1000 said:
In Link2SD, Press the menu button, then select 'More'. Select Recreate mount script. Choose your ext partition type, then ok. Reboot your phone. If it still asks you to remount, try these command on Terminal:
Code:
mount -rw -t ext2 -o remount /dev/block/vold/179:2 /data/sdext2
then
Code:
mount -rw -t ext2 -o remount /dev/block/mmmcblk0p2 /sd-ext
If it's not an ext2 partition, change the 'ext2' in the command with what your ext partition is.
Click to expand...
Click to collapse
When i type the 1st code, the terminal is keep question me if im root....
To be exact it says:
Code:
mount: permission denied (are you root?)
Any solutions?
ahh type
su
first
the start of the line should change from
$
to a
#
jhonnyx1000 said:
In Link2SD, Press the menu button, then select 'More'. Select Recreate mount script. Choose your ext partition type, then ok. Reboot your phone. If it still asks you to remount, try these command on Terminal:
Code:
mount -rw -t ext2 -o remount /dev/block/vold/179:2 /data/sdext2
then
Code:
mount -rw -t ext2 -o remount /dev/block/mmmcblk0p2 /sd-ext
If it's not an ext2 partition, change the 'ext2' in the command with what your ext partition is.
Click to expand...
Click to collapse
I guess the 1st code is fine, no errors on my phone, but when i type the 2nd code, i get this message:
Code:
mount: mounting /dev/block/mmmcblk0p2 on /sd-ext failed: Invalid argument
So... what have i done wrong now?

Mount EXT4 MicroSD Card

I've given up on reformatting the internal memory as EXT4 (my last post). However now, I want to mount an external SD card that is EXT4 (or any file format that has UNIX permissions). I can't get my device to mount the card, it says the filesystem is unsupported. Now, that's bull**** since Android has built in support for EXT. After searching threads here on XDA and Google, and even purchasing EzyMount as recommended, I can't get it to mount. I've tried BusyBox and mount commands (as root), with various errors such as "mount operation not supported on transport endpoint". I'm at my wit's end by now, trying to get some filesystem which has support for symlinks and UNIX permissions... any ideas?
kcattakcaz said:
I've given up on reformatting the internal memory as EXT4 (my last post). However now, I want to mount an external SD card that is EXT4 (or any file format that has UNIX permissions). I can't get my device to mount the card, it says the filesystem is unsupported. Now, that's bull**** since Android has built in support for EXT. After searching threads here on XDA and Google, and even purchasing EzyMount as recommended, I can't get it to mount. I've tried BusyBox and mount commands (as root), with various errors such as "mount operation not supported on transport endpoint". I'm at my wit's end by now, trying to get some filesystem which has support for symlinks and UNIX permissions... any ideas?
Click to expand...
Click to collapse
you fully rooted with custom kernel or only with rdlv etc?
First you gotta figure out how to mount this damn thing, gotta be possible.
Then you need to get this done on bootup, either in init.rc or init.d or smth.
You probably just use wrong commands? But I could be wrong, didnt try that yet but would also be interested. Having the file permissions also on SD would be nice, but it could cause trouble with mtp maybe?
zroice said:
you fully rooted with custom kernel or only with rdlv etc?
First you gotta figure out how to mount this damn thing, gotta be possible.
Then you need to get this done on bootup, either in init.rc or init.d or smth.
You probably just use wrong commands? But I could be wrong, didnt try that yet but would also be interested. Having the file permissions also on SD would be nice, but it could cause trouble with mtp maybe?
Click to expand...
Click to collapse
I am rooted, but stock ROM and kernel. MTP is for connecting to a computer? If it is, I don't need that. I have tried
mount -rw -t ext4 /dev/block/mmcblk1p1 /storage/extStorageCard
and variants switching the flags and options.
Interesting... I just typed that command in to make sure I didn't make any typos.... and my phone crashed and rebooted. I typed it again to see if it would cause another crash and it appears to have mounted the card! Whwn I type "df" at the prompt it now shows a 28.6 GB filesystem at that location, which has to be my sd card.
Why, how, I don't know. It works, it's all I can say.

Link2SD on Amazon Fire TV

Problem statement
The Amazon Fire TV has a limited memory sotrage of less than 5GB.
FolderMount allows for moving App data/obb to a USB device. Remaining components of the App, which sometimes are the larger part of the app, can't be transfered using
These remaining components can be 100s of MB and even above 1GB (Sine Mora is 292MB, Walking Dead is 1.14GB)
Solution
Link2SD allows for moving these components to an external SD card in the phone world. Below I'll describe how to do this on the Amazon Fire TV with a USB device.
This post heavily relies on tweaking a post by sashavasko. Major kudos to him. Up to finding his post I was not successful in mounting in a way that Link2SD could see the mount. This was due to a change in Android 4.2+ where one App's mounting isn't seen by others.
Below is a step by step guide for running this. I've posted a script for automating this here : http://forum.xda-developers.com/showpost.php?p=54601505&postcount=33
Requirements: Root, Mouse, Terminal Application
Step 0 - Preparations : Format a USB device to the Ext4 File system and install Link2SD
Ext4
Link2SD refers to parititoning your SDcard to both Ext4 and FAT, this is not required on our USB device. All we need is an Ext4 partiton we can mount for Link2SD.
I had a high end USB device I used for FolderMount. For testing, I got a 16GB Lexar Jump Drive, which got decent reviews. $8 at Staples ( even less with the right coupon. Other sizes are also cheap). Both went into my Powered USB hub.
You can also partition a single FAT32 USB device to two partitons - FAT32 and Ext4. I have verified both options. Please note that for this second option, if you already have files on your FAT32 USB device, you'd have to first copy them to a backup, as the partitioning trashes your data. You will then need to restore the backed up files to the FAT partition.
Format/Partition your USB device to Ext4 using free MiniTool Partition Wizard Home Edition on your Desktop/Laptop. Below is a nice post on this (Refer only to step 1), you can find others. Please note that this refers to an SDCard. We will be doing this on a USB device.
http://forum.xda-developers.com/showpost.php?p=37405779&postcount=1
In partitioning, please verify the partitions are created as Primary. Also, not sure is this is required, but I didn't name my partitions.
There are also linux commands to do this - I didn't investigate these.
Stick the Ext4 partitoned USB device into your Amazon Fire TV and power it up. We will need the device in for Step 2.
Link2SD
Download Link2SD from the Google Play store, or sideload it
Make the directory Link2SD requires
Code:
su
mkdir /data/sdext2
exit
Step 1 - Fix adb localhost
Follow step 1 in sashavasko's post
http://forum.xda-developers.com/showpost.php?p=45102645&postcount=1
Note1:
You will need a terminal app for this
Note2:
This step should only be run once. Running multiple times can mess the /data/misc/adb/adb_keys file as the key values will concatenate with sashavasko's method. This will cause mounting at boot not to work. If you did this or not sure if you've done this, just erase the duplicate keys from the /data/misc/adb/adb_keys file (the end of a single key is "[email protected] ). Or, better yet, if you aren't seeing any other different keys there - simply su and copy /sdcard/.android/adbkey.pub onto this file.
Step 2 - Install scripts
Follow step 2 in sashavasko's post
http://forum.xda-developers.com/showpost.php?p=45102645&postcount=1
Note 1
Look for your Ext4 partitoned device after running:
Code:
adb shell cat /proc/partitions
You should find the Ext4 device under /device/block starting with sd.
For example: My first USB device is sda1, the Ext4 partitoned one was sdb1 (sdb2 when the Lexar drive was partitoned to FAT32 and Ext4).
You should be able to recognize the devices according to their partition sizes.
Note 2
The msd2.sh file should be changed to be:
Code:
#!/system/bin/sh
mount -t ext4 [COLOR="Purple"]/dev/block/[/COLOR][COLOR="Red"]sdb1[/COLOR][COLOR="purple"] /data/sdext2 [/COLOR]&& sleep 5 && /system/bin/vold
where the sdb1 device should be replaced by the device you located in Note 1.
Step 3 - Test the script and grant su permissions
Run this (no su command required, no path to the sd.sh file is required)
Code:
sd.sh
Verify you aren't seeing any errors. You will be granting SU permissions.
Run Link2SD. Go to the menu at the top right. Select "Storage Info" - Verify Link2SD recognizes the Ext4 partiton in the third line (under SD Card 2nd Part. ).
Step 4 - Auto Mount at initialization
For this I'm using the /system/etc/install-recovery.sh script which you should already have. This script loads at boot and calls /system/etc/install-recovery-2.sh (a non existent file).
Create a file at /sdcard/install-recovery-2.sh which contains
Code:
#!/system/bin/sh
/system/xbin/sd.sh
Now move the file to its place:
Code:
su
mount -o rw,remount /system
cp /sdcard/install-recovery-2.sh /system/etc/
chmod 755 /system/etc/install-recovery-2.sh
mount -o ro,remount /system
exit
Now Reboot (Long press remote Select + Play)
Step 5 - Link2SD ready to go
Open Link2SD to verify (as you verified before) that after boot Link2SD sees the Ext4 partiton.
Start moving files using Link2SD :
Select an App
Go to "Create Link" - You will be asked which file types to move. Check them all (not the paid option if you haven't paid).
Link2SD will show "Creating Link...", then an advert (in the non payed version) and then: Application files linked and moved to SD card
Note the expected storage change in the Amazon Fire TV's "About" menu option will be seen after Rebooting.
"Remove Link" works properly
"Move to SD card" is not relevant
Final Words
Don't use this to move system apps, or system-like apps
Responsibly for running this is solely on you. I am only describing what works for me.
Works great thanks
I'd love to see a standalone app for installing this.
Sent from my SM-N900V using XDA Premium 4 mobile app
The msd2.sh file mentioned in Step2/Note2 is used to create a fake external SD Ext4 partition for Link2SD.
You can also use it to create a fake external SD FAT partition at /storage/sdcard1 for FolderMount.
FolderMount automatically recognizes this partition and suggests this as the initial path for its destination path suggestion.
In my case - sda1 is the FAT partition (For me - a USB stick fully formatted to FAT32), and sdb1 is the ext4 formatted USB stick. The same should work with a single partitioned USB stick (but different sd* device names - see original post).
The updated msd2.sh file looks like:
Code:
#!/system/bin/sh
[COLOR="DarkGreen"]mount -t vfat /dev/block/[COLOR="Red"]sda1[/COLOR] /storage/sdcard1[/COLOR] && mount -t ext4 [COLOR="Magenta"]/dev/block/[/COLOR][COLOR="Red"]sdb1[/COLOR] [COLOR="Magenta"]/data/sdext2[/COLOR] && sleep 5 && /system/bin/vold
SaltyCookie_OnLoan2FM_SVE said:
The msd2.sh file mentioned in Step2/Note2 is used to create a fake external SD Ext4 partition for Link2SD.
You can also use it to create a fake external SD FAT partition at /storage/sdcard1 for FolderMount.
FolderMount automatically recognizes this partition and suggests this as the initial path for its destination path suggestion.
In my case - sda1 is the FAT partition (For me - a USB stick fully formatted to FAT32), and sdb1 is the ext4 formatted USB stick. The same should work with a single partitioned USB stick (but different sd* device names - see original post).
The updated msd2.sh file looks like:
Code:
#!/system/bin/sh
[COLOR="DarkGreen"]mount -t vfat /dev/block/[COLOR="Red"]sda1[/COLOR] /storage/sdcard1[/COLOR] && mount -t ext4 [COLOR="Magenta"]/dev/block/[/COLOR][COLOR="Red"]sdb1[/COLOR] [COLOR="Magenta"]/data/sdext2[/COLOR] && sleep 5 && /system/bin/vold
Click to expand...
Click to collapse
The one annoying thing about this is during boot it will read the entire partition. This in turn in my case makes booting the Fire TV really slow. Lets hope I dont have to reboot much because it now takes around 2-3 minutes to boot up.
MadFlava said:
I'd love to see a standalone app for installing this.
Sent from my SM-N900V using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I 2nd this. This is as close as we're gonna get to downloading Apps, ets., straight to an attached external drive but I know enough about this stuff to be somewhat intimidated by the initial instructions. Not that they're not clear, it just looks like I'd have too many avenues to brick my box.
Still...very good work OP. Thanks again.
MarkBP said:
I 2nd this. This is as close as we're gonna get to downloading Apps, ets., straight to an attached external drive but I know enough about this stuff to be somewhat intimidated by the initial instructions. Not that they're not clear, it just looks like I'd have too many avenues to brick my box.
Still...very good work OP. Thanks again.
Click to expand...
Click to collapse
Come on guys, this is XDA developers
OK, I have this brewing. Should post it by tomorrow.
awesome. how easy is it to reverse this entire process? I'd really like to know the risks before I take the plunge
I think the process can be greatly simplified. On my computer I created install-recovery-2.sh with the two lines below:
#!/system/bin/sh
mount -t vfat /dev/block/sda1 /storage/sdcard1 && mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
Then I connected via adb to the fireTV from my computer.
Then an adb push of install-recovery-2.sh to /sdcard and then did an adb shell to the fireTV from my computer and su once there.
Copied from install-recovery-2.sh from /sdcard to /system/etc
Did a chmod 755 on the file to make it executable and then rebooted and all seems to be working well with partitions recognized.
tselling said:
I think the process can be greatly simplified. On my computer I created install-recovery-2.sh with the two lines below:
#!/system/bin/sh
mount -t vfat /dev/block/sda1 /storage/sdcard1 && mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
Then I connected via adb to the fireTV from my computer.
Then an adb push of install-recovery-2.sh to /sdcard and then did an adb shell to the fireTV from my computer and su once there.
Copied from install-recovery-2.sh from /sdcard to /system/etc
Did a chmod 755 on the file to make it executable and then rebooted and all seems to be working well with partitions recognized.
Click to expand...
Click to collapse
Just tried this, didn't work for me (mount not detected).
- tselling, is Link2sd working with this ?
- If someone is working succesfully with Link2sd using tselling's method please report back. This is indeed a shorter route.
failed for me for tselling method
SaltyCookie_OnLoan2FM_SVE said:
Just tried this, didn't work for me (mount not detected).
- tselling, is Link2sd working with this ?
- If someone is working succesfully with Link2sd using tselling's method please report back. This is indeed a shorter route.
Click to expand...
Click to collapse
Link2sd found ok and I linked sevzero without problems. Should note that I use sda1 and sda2 for fat32 in first primary partition and ext4 on second primary pzrtition of same usb flash drive. Any other setup would need to have different script to match your drive setup.
Sent from my SAMSUNG-SGH-I497 using Tapatalk
why does this need more than 1 partition to work anyways? Is it just because the app requires it for some weird reason?
edit: also which partition needs to be the bigger one? do the sizes matter? and does stickmount need to be disabled for this to work?
desc
meadtj said:
why does this need more than 1 partition to work anyways? Is it just because the app requires it for some weird reason?
edit: also which partition needs to be the bigger one? do the sizes matter? and does stickmount need to be disabled for this to work?
Click to expand...
Click to collapse
why does this need more than 1 partition to work anyways? - Link2sd description in play store:
What you need for linking apps:
● root permission.
● a second partition on your SD card.
You should have two partitions on SD card and both should be primary.
The first FAT partition is your standard SD card storage. The second partition is used for application files and can be ext2, ext3, ext4, f2fs or FAT.
You need to use a non-FAT file system (ext2, ext3, ext4 or f2fs) on your second partition in order to link app's private data files. Because the FAT file system (FAT16, FAT32 or exFAT) does not support UNIX file ownership or permissions and will cause a security breakdown of app's private files.
Link2SD Plus can move app's private data files if you have a non-FAT partition
Click to expand...
Click to collapse
So we may be able to use FAT (haven't tried it) but we will lose some moving capabilities.
From my testing - FolderMount does work with the ext4 partiton, so I need two partitions (or 2 usb sticks).
also which partition needs to be the bigger one? - No restriction. Allocate as per your decision and experience with storage costs of apps.
do the sizes matter? - Don't believe her. It does.
Sorry. Uncalled for. Apologies. Not personal. I just had to.
and does stickmount need to be disabled for this to work? - No, it doesn't
983
tselling said:
Link2sd found ok and I linked sevzero without problems. Should note that I use sda1 and sda2 for fat32 in first primary partition and ext4 on second primary pzrtition of same usb flash drive. Any other setup would need to have different script to match your drive setup.
Click to expand...
Click to collapse
Ok, let's try and minimize this. Could it be due to tselling using a single partitioned USB drive, while I'm using two drives ?
I need a report back from someone with a single USB drive who tried tselling's simpler approach. If it failed - Maybe tselling added something along that he wasn't aware of. If it passed - Maybe that's a requirement for the simpler approach.
In other news, the script to automate this is take slightly more than I thought, due to unix-android differences (I come from a unix background). That, and the fact that we may have a simpler solution is delaying me. Oh, also had to stay late at work yesterday, Oooh and the dog ate my laptop.
What about Foldermount?
What about FolderMount for Data and OBB files? Can I still use it with Link2SD on same card?
SaltyCookie_OnLoan2FM_SVE said:
Ok, let's try and minimize this. Could it be due to tselling using a single partitioned USB drive, while I'm using two drives ?
I need a report back from someone with a single USB drive who tried tselling's simpler approach. If it failed - Maybe tselling added something along that he wasn't aware of. If it passed - Maybe that's a requirement for the simpler approach.
In other news, the script to automate this is take slightly more than I thought, due to unix-android differences (I come from a unix background). That, and the fact that we may have a simpler solution is delaying me. Oh, also had to stay late at work yesterday, Oooh and the dog ate my laptop.
Click to expand...
Click to collapse
I think it has to do with the mount points. I have the ext4 partition mounted to /data/ext2 where I think link2sd looks. I think that you could use an entire usb stick with one partition as ext4 mounted to /data/ext2 but your script would change
FROM
##############################################################################################
#!/system/bin/sh
mount -t vfat /dev/block/sda1 /storage/sdcard1 && mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
#############################################################################################
TO
###################################################
#!/system/bin/sh
mount -t ext4 /dev/block/sda1 /data/sdext2 && /system/bin/vold
###################################################
However, I have not tried this. I may try this later today since I have a second fireTV and usb stick arriving today.
also, I am planning to use foldermount with the first fat32 partition I created, but I haven't gotten that far as I want to use the Pro version but need the play store loaded first.
OOPS, I did forget one part "mkdir /data/sdext2" (otherwise the mount fails).
tselling said:
I think it has to do with the mount points. I have the ext4 partition mounted to /data/ext2 where I think link2sd looks. I think that you could use an entire usb stick with one partition as ext4 mounted to /data/ext2 but your script would change
FROM
##############################################################################################
#!/system/bin/sh
mount -t vfat /dev/block/sda1 /storage/sdcard1 && mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
#############################################################################################
TO
###################################################
#!/system/bin/sh
mount -t ext4 /dev/block/sda1 /data/sdext2 && /system/bin/vold
###################################################
However, I have not tried this. I may try this later today since I have a second fireTV and usb stick arriving today.
also, I am planning to use foldermount with the first fat32 partition I created, but I haven't gotten that far as I want to use the Pro version but need the play store loaded first.
Click to expand...
Click to collapse
tselling said:
OOPS, I did forget one part "mkdir /data/ext2" (otherwise the mount fails).
Click to expand...
Click to collapse
i did that too but still didnt work, maybe bc i have 3 partitions. Fat then Ext2 then NTFS
meadtj said:
i did that too but still didnt work, maybe bc i have 3 partitions. Fat then Ext2 then NTFS
Click to expand...
Click to collapse
Sorry, the directory is /data/sdext2
Your mount command is:
mount -t ext4 /dev/block/sda2 /data/sdext2 && /system/bin/vold
Also I am not 100% sure that ext2 filesystem works. ext4 works for sure.

Categories

Resources