Any way to add "mnt/extSdCard" mount point - Nexus 7 (2013) Q&A

There are a few custom programs that i use that create directory's and save files to "mnt/extSdCard" and while every other device I have has that option my nexus 7 2013 is lacking (for obvious reasons)
(I don't mind what 4.4.4 ROM I use OEM or custom as I switch often)
Is there any way I can create that mount point and have it linked to an otg usb drive or even a directory on the internal memory?
Thanks for any info.

I find
USB Mount All
works best, one of the few that also recognise and mount the ext4 filesystem properly, unlike stickmount.

Related

[Q] Where are the config file(s) located for USB disk mode mounts (SD/EMMC)

I have currently running Virtuous 2.6 and I managed to get /emmc to mount at /emmc/subsonic. I modified the file virtuous-install_apps located at /etc/init.d so the internal storage is mounted at boot, using the following command:
sleep 11
mount -o rw,nosuid,nodev,noexec,uid=1000,gid=1015,dmask=07020,iocharset=iso8859-1,shortname=mixed,utf8 -t vfat /dev/block//vold/179:3 /sdcard/subsonic
This works great and the internal storage is still accessable from /emmc, but I have to run a script to unmount the internal storage before I connect in disk mode so my PC recognizes them. I would like the internal storage would automatically be unmounted then mounted when disconnected.
Also is their a default initialization file for android that runs at boot similar to an autoexec.bat on older PCs? I tried messing around and the file I listed above was the only thing I could find that runs at boot.
I tried searching around Google and XDA for quite a while and wasn't able to find any answers. I'm not looking for someone to hold my hand, just point me in the right direction and hopefully I'll learn a thing or two.

[Q] Format /sdcard and /emmc as ext3?

Has anyone successfully reformatted either /sdcard or /sdcard/external_sd/ /emmc as ext3? I'm not talking about an Apps2SD partition, I'm talking about reformatting the whole volume as one partition, transparent to apps. I do not use Windows so I do not need interoperability, I am fine with ext filesystems.
My goal is to be able to use symlinks (not to mention a more robust filesystem) to redirect certain hard-coded items to store on a different storage volume than it defaults to, but symlinks are not permitted on vfat (FAT32) filesystems.
Thanks!
Anything that I look an answer for, is just not answered. :-(
I am looking for the same information. Wonder why the native ext file systems are not allowed, given that its a Linux kernel running.
You could format it to ext3 and see how it works. Worst case scenario is your phone will tell that sdcard to fu*k off. Given that our phones can and do read the ext format I'm sure you can do it. I'm just not sure how well it will work as far as mounting and such.
On top of that, Windows can read ext formats. You just need a program to do it. I use it all the time.
Thanks for reviving this thread. Surely there must be someone out there who has tried this, and I was hoping to hear from them before I gave it a go, but looks like I'll just have to give it a shot myself.
When I find the time to backup & wipe my sdcard to try and reformat & mount it, I'll report back here.
With my Galaxy Note N7000 I can format a USB Stick to EXT3, and the phone uses it perfectly well as USB Storage...
(rooted, w/w SpeedMod kernel)

[How-to] Using an ext4 formated SD card.

Update: I've since made a flashable zip that automatically creates a modified sdcard1 binary and extracts an init.d script to handle it all. Will make a thread in a more general location as this could be used on many TouchWiz devices. Link.
Hello everyone,
The mailman brought me a new 64GB microSD card this morning, and I wanted to try formatting it in ext4 instead of exFAT. Both for the heck of it and in case I wanted to give AOSP ROMs a try down the road.
The usual caveats apply.
Required:
init.d support
a mounting script
a mounting updater-script for custom recoveries.
You can get init.d support with the stock kernel on many devices by having the run-parts command launch from a custom install-recovery.sh script. See the following thread for files and a how-to:
[MOD]Term-init & Zip-init: Enable Init.d for Any Phones w/o Need of Custom Kernels!!!
SD card removal:
Should you need to remove the card it can be unmounted and safely removed from the storage settings as usual. Mounting it again requires either a reboot or manually executing the mount command and then activating the card in the storage settings.
Mounting script:
Make sure you have proper line endings, file name (e.g. 95mountsdext4) and permissions set.
Code:
#!/system/bin/sh
# Mount SD Card Ext4 Script
mount -rw -t ext4 /dev/block/mmcblk1p1 /storage/extSdCard
Mounting in CWM/TWRP:
The other piece in this is the attached zip file, which simply runs the appropriate mount command for Clockworkmod Recovery. Unmount as usual. This way you can also store nandroid backups and other update zips on the external as well.
Technical considerations:
The mounting occurs early enough during the boot process that the media scanner and MTP services have no issues with this.
There may be are some permissions related glitches to look out for, but it hasn't been an issue for me so far. (One possible fix would be a recursive chmod/chown added to the mounting script.)
Update: The camera app saves the photos properly to the SD card, but leaves them with improper permissions which prevent subsequent viewing or editing again until you chmod the files. To be continued...
If your init.d support comes from the install-recovery.sh trick, CWM will prompt to delete the script before reboot. Don't.
If the mounting script doesn't run for some reason, or you try to activate the card before having mounted it manually, the phone will give an error and ask if you want to format the card. Don't.
Enjoy,
Darkshado
I have been looking for a way to do this for a long time for numerous reasons (symlinks, >4GB file size, linux-only environment, etc.). I'll be giving this a try very soon.
Thanks for sharing!
EDIT: Just wanted to add that I think it's ridiculous Android doesn't support this natively.
The permissions issues are frustrating. I can take photos and store them on the card, but the umask for JB has been set as 077, in other words, rwx------ permissions, and ownership by the application's user.
I tried different arguments for the mount command to try and force permissions and ownership one way or another with no luck so far. Ironically, an NTFS formatted card might work better in this respect.
A similar mod had been made on the Nexus S and one of the posters resorted to an apk that regularly ran chmod -R 0777 on new files, I tried using it but it just hung there and did nothing on the Note II.
Another possibility would be using FUSE, although I'm not sure how to go about doing this yet.
Also, I pondered the possibility of using UDF instead of ext4, it is a standardized format and just about every major OS out there supports it too...
Any updates? Is it working already or...?
Despite all the good of Android, Google/carriers, whoever, not including ext2/3/4 support natively is just a slap in the face. Good to see someone working to right a wrong that subjugating software has done.
You should NOT be doing this. The Android hardware requirements clearly state that all shared storage directories must be case insensitive and must not have permissions. FAT32 is the only supported filesystem which meets these requirements. Mounting an EXT filesystem directly will break applications.
The newer versions of Android come with an "sdcard" utility which uses a FUSE driver to wrap a native EXT filesystem and exposes a pseudo filesystem which is case insensitive and is without permissions. You should mount the EXT SD card at a different location (/dev/fuse) and use the "sdcard" utility to emulate it at /storage/whatever. You can see the command line syntax of the "sdcard" utility in the source code.
CM10.1 does this automatically. https://github.com/CyanogenMod/android_system_core/tree/cm-10.1/sdcard
KurianOfBorg said:
You should NOT be doing this. The Android hardware requirements clearly state that all shared storage directories must be case insensitive and must not have permissions. FAT32 is the only supported filesystem which meets these requirements. Mounting an EXT filesystem directly will break applications.
The newer versions of Android come with an "sdcard" utility which uses a FUSE driver to wrap a native EXT filesystem and exposes a pseudo filesystem which is case insensitive and is without permissions. You should mount the EXT SD card at a different location (/dev/fuse) and use the "sdcard" utility to emulate it at /storage/whatever. You can see the command line syntax of the "sdcard" utility in the source code.
CM10.1 does this automatically. https://github.com/CyanogenMod/android_system_core/tree/cm-10.1/sdcard
Click to expand...
Click to collapse
Again, Android not natively supporting ext4 is a slap in the face. Usability over technical merit disgusts me.
muqali said:
Again, Android not natively supporting ext4 is a slap in the face. Usability over technical merit disgusts me.
Click to expand...
Click to collapse
It does support EXT4! Officially. All Google ROMs and AOSP can mount EXT4 partitions as /storage/*. The correct way to mount it is to use the command "sdcard" not "mount". I'm pretty sure any AOSP ROM will automatically mount an EXT4 SD card using the "sdcard" command just like Cyanogenmod does.
Thanks for the info. I'll look into this soon-ish, once my exams are over.
Sent from my SGH-T889V using xda app-developers app
KurianOfBorg said:
It does support EXT4! Officially. All Google ROMs and AOSP can mount EXT4 partitions as /storage/*. The correct way to mount it is to use the command "sdcard" not "mount". I'm pretty sure any AOSP ROM will automatically mount an EXT4 SD card using the "sdcard" command just like Cyanogenmod does.
Click to expand...
Click to collapse
It's still a second class citizen to a xFATx filesystem.
muqali said:
It's still a second class citizen to a xFATx filesystem.
Click to expand...
Click to collapse
No it's fully supported by AOSP exactly the same as FAT on AOSP and exFAT/NTFS on Samsung ROMs. It's the manufacturer's fault for REMOVING support from their ROM. When you insert an EXT SD card on AOSP, it gets mounted at /storage/* just like any other SD card.
In my N7100 with CM 10.1, ext4 has stopped working for my 32gb SDCard on 05-01-2013 nightly, even after reformatting, going back to stock, then reinstalling CM 10.1. I also noticed that my ext4 formatted 8GB SdCard still works, however, so I am not sure if it's a storage size issue in my case (32gb vs 8gb). I am trying a hybrid of 8mb fat32 / 28.*gb ext4 to see if that will work.
KurianOfBorg said:
No it's fully supported by AOSP exactly the same as FAT on AOSP and exFAT/NTFS on Samsung ROMs. It's the manufacturer's fault for REMOVING support from their ROM. When you insert an EXT SD card on AOSP, it gets mounted at /storage/* just like any other SD card.
Click to expand...
Click to collapse
clearday said:
In my N7100 with CM 10.1, ext4 has stopped working for my 32gb SDCard on 05-01-2013 nightly, even after reformatting, going back to stock, then reinstalling CM 10.1. I also noticed that my ext4 formatted 8GB SdCard still works, however, so I am not sure if it's a storage size issue in my case (32gb vs 8gb). I am trying a hybrid of 8mb fat32 / 28.*gb ext4 to see if that will work.
Click to expand...
Click to collapse
Is it formatted properly as ext4? Using mke2fs or (tune2fs to convert to ext4). All ROMs only mount the first partition on the SD card regardless of the file system. Sometime after mounting USB Mass Storage an the SD card doesn't remount properly so you need to reboot the device. You'll most probably want to use MTP with ext4 anyway.
KurianOfBorg said:
Is it formatted properly as ext4? Using mke2fs or (tune2fs to convert to ext4). All ROMs only mount the first partition on the SD card regardless of the file system. Sometime after mounting USB Mass Storage an the SD card doesn't remount properly so you need to reboot the device. You'll most probably want to use MTP with ext4 anyway.
Click to expand...
Click to collapse
Finally fixed the problem by running this command in ROM Toolbox Lite:
"find /storage/sdcard1/ -print0 | xargs -0 chown root:media_rw"
http://forum.xda-developers.com/showthread.php?p=38182488#post38182488
clearday said:
Finally fixed the problem by running this command in ROM Toolbox Lite:
"find /storage/sdcard1/ -print0 | xargs -0 chown root:media_rw"
http://forum.xda-developers.com/showthread.php?p=38182488#post38182488
Click to expand...
Click to collapse
Then it's not mounted properly! Your ext4 SD card has directly been mounted at /storage/* instead of through the FUSE driver. You should NOT be able to see permissions when it's mounted at /storage/*. The physical partition should be mounted at /dev/fuse. Reboot the device and check again whether permissions are visible at /storage/*.
KurianOfBorg said:
Then it's not mounted properly! Your ext4 SD card has directly been mounted at /storage/* instead of through the FUSE driver. You should NOT be able to see permissions when it's mounted at /storage/*. The physical partition should be mounted at /dev/fuse. Reboot the device and check again whether permissions are visible at /storage/*.
Click to expand...
Click to collapse
It's still visible at storage
How do I fix it?
clearday said:
It's still visible at storage
How do I fix it?
Click to expand...
Click to collapse
It should show up at /storege/* but that should be the FUSE driver's mount point with permissions stripped away. The real ext4 partition will be at /dev/fuse.
Any further progress?
I want to use symlinks and ext4 on my note 2 also.
On aosp roms just use the sdcard binary with an initd script.
Gesendet von meinem GT-N7105 mit Tapatalk 2
DerTeufel1980 said:
On aosp roms just use the sdcard binary with an initd script.
Click to expand...
Click to collapse
I'm trying to do this on Tweaked. There is an sdcard binary, however, it appears to be modified by Samsung as it's hardcoded to mount to /storage/sdcard0 and overrides the internal sdcard mount when I use it. It doesn't take a destination parameter like the AOSP/CM version does.
If anyone has an AOSP/CM build environment, could I trouble you for a statically linked version of the sdcard binary? I downloaded CM10.2-nightly, but it's dynamically linked and, of course, doesn't work on the stock based ROMs.
EDIT
It might still be nice, but I figured out a way around it. I hex edited the sdcard binary from the Note2 to use /storage/sdcard1. Then in the mount script, bind mounted it over to /storage/extSdCard. I've rebooted a few times and it seems to be working fine. I am copying data to it over MTP right now. I've attached a zip of the files I'm using.
NOTE: THIS IS NOT A FLASHABLE ZIP.
I might make one later, but this kind of needs to be a manual process anyway.
put the sdcard1 file in /system/xbin
chmod 755 /system/xbin/sdcard1
put the script file in /etc/init.d
set permissions/ownership on it
Now, if you have an ext4 formatted SD, and it's not mounted, you should be able to run the script and have it mount it, run the sdcard1 binary on it, and bind mount it over to the normal extSdCard spot. It will happen at boot if you got it all right.
There are probably improvements that can be made, my shell scripting is a bit rusty. Hopefully this will get people interested in it again, now that the permissions issues are resolved.

[Q] OUYA doesn't recognize external storage formated to ext4/3/2

I'm not exactly new to linux, or android, but I'm not familiar with how android treats external storage vs. internal.
I had advised a few people to format their external drives as ext4 since the kernel would probably support it (and the system, data and cache partitions are ext4 so it DOES). However, when I format my external storage (32gb and 1gb USB sticks) to ext*, it doesn't show up, even in the logcat or in ES File Explorer (or a mount command, but with no root or fdisk -l i didn't dig too far).
So I was wondering if anyone happens to know why thats the case. Clearly the kernel supprots ext4, but you can't mount external storage with it?
FYI, so far that I've seen, I can't format external storage with the ouya. It also only supports NTFS read, and FAT32 R/W.
kill-9 said:
I'm not exactly new to linux, or android, but I'm not familiar with how android treats external storage vs. internal.
I had advised a few people to format their external drives as ext4 since the kernel would probably support it (and the system, data and cache partitions are ext4 so it DOES). However, when I format my external storage (32gb and 1gb USB sticks) to ext*, it doesn't show up, even in the logcat or in ES File Explorer (or a mount command, but with no root or fdisk -l i didn't dig too far).
So I was wondering if anyone happens to know why thats the case. Clearly the kernel supprots ext4, but you can't mount external storage with it?
FYI, so far that I've seen, I can't format external storage with the ouya. It also only supports NTFS read, and FAT32 R/W.
Click to expand...
Click to collapse
I've asked this question too, I tried with different harddrives to all the ext formats and nothing picks it up. there are a few apps like ntfs mounter which supports ext but requires rooting.
Android only recognises FAT32 and I think CDFS and UDF. May also recognise FAT16. NTFS and exFAT are both patented so need expensive licenses for a manufacturer to include them in devices (a few do on their modified firmwares).
I have no idea why ext isn't supported though. I presume it is something to do with the relative rarity of ext drives outside of Linux boot devices.
SixSixSevenSeven said:
Android only recognises FAT32 and I think CDFS and UDF. May also recognise FAT16. NTFS and exFAT are both patented so need expensive licenses for a manufacturer to include them in devices (a few do on their modified firmwares).
I have no idea why ext isn't supported though. I presume it is something to do with the relative rarity of ext drives outside of Linux boot devices.
Click to expand...
Click to collapse
isnt the internal memory ext4?
anyone who has there ouya rooted could you please try one of the harddrive mounting apks like paragon or ntfs mounter and see if the ext formats get picked up?
got ext3 working with usb otg helper app. You need root access.
No problem mounting ext4
Just made myself a 15GB ext4 formatted second partition on a 32GB usb drive. Just because Ouya only looks at the first partition, and assumes it's fat32 should not discourage you. Just open a adb shell to your Ouya, become superuser, create a directory /mnt/mydata, and mount it:
In adb shell:
1. su
2. mkdir /mnt/mydata
3. mount -t ext4 /dev/block/vold/8\:2 /mnt/mydata
kill-9 said:
I'm not exactly new to linux, or android, but I'm not familiar with how android treats external storage vs. internal.
I had advised a few people to format their external drives as ext4 since the kernel would probably support it (and the system, data and cache partitions are ext4 so it DOES). However, when I format my external storage (32gb and 1gb USB sticks) to ext*, it doesn't show up, even in the logcat or in ES File Explorer (or a mount command, but with no root or fdisk -l i didn't dig too far).
So I was wondering if anyone happens to know why thats the case. Clearly the kernel supprots ext4, but you can't mount external storage with it?
FYI, so far that I've seen, I can't format external storage with the ouya. It also only supports NTFS read, and FAT32 R/W.
Click to expand...
Click to collapse
Not Actually True
SixSixSevenSeven said:
Android only recognises FAT32 and I think CDFS and UDF. May also recognise FAT16. NTFS and exFAT are both patented so need expensive licenses for a manufacturer to include them in devices (a few do on their modified firmwares).
I have no idea why ext isn't supported though. I presume it is something to do with the relative rarity of ext drives outside of Linux boot devices.
Click to expand...
Click to collapse
There is in fact a standard read-only NTFS driver in LInux, and it's supported on the OUYA. An NTFS-formatted USB hard drive automounts upon hot plugin.
I finally got a reply back from ouya support about ext3/4 not being recognized and they said its been resolved. Looking forward to the next firmware.

[Q] [HELP] SM 113 Unable to mount external partition as sd-ext

Initially Titanium Backup's "move to SD" feature looked like a great way to use tools I was already familiar with to make the most of limited internal storage. While searching for answers on how to set up what TB needed, it became clear that pretty much any similar app or solution - e.g. Mounts2SD - would need this partition mounted to function properly.
Problem is I can't seem to get it to work, despite trying EVERYthing that all of xda forums and Google can tell me. And there's a lot of info on this topic.
This is the mount command in Terminal emulator:
Code:
su
busybox mount -t ext4 /dev/block/mmcblk1p2 /sd-ext
(where I've confirmed that /dev/block/mmcblk1p2 is the partition I want to mount, ext4 is replaced by correct filesystem, and /sd-ext exists and is the desired mount point.)
It seems to go fine... I don't get any errors or feedback. But TB doesn't detect the partition even after adding an "app" folder using "mkdir" command.
Here's way more info than necessary about my situation in case it might help...
Device is SM-113, KK 4.4.4. Rooted, stock everything, selectively debloated using Titanium Backup Pro
Recovery is TWRP 3.0.0
Busybox by Stericson from Google Play
This is what I've done, in all possible combinations:
— Have used 3 separate SD cards: 32GB fresh out of the package (largest size officially supported by this tab) and 2 used 64GB (no documentation but it mounted and works fine for regular storage!)
— Used TWRP, AParted (from Play store) and Minitool (on Windows) to create the partitions
— 2nd partition formatted as ext2 & ext4 (read somewhere that ext3 wasn't a good idea...)
— Size of the 2nd partition ranging from less than 10% of SD card size up to 10GB
— Mounting to /sd-ext, /system/sd, and /data/sd (per TB's knowledgebase, linked above )
I've also attempted using a few apps from Google PIay as recommended by various threads on the subject from this forum (don't even remember which but I can look them up if necessary). I've since wiped and restored a nandroid backup so that none of these can potentially get in the way.
This IS working on my (also stock, MM 6.0.1) Galaxy S5 (G900W8) with one of the cards that didnt work on this tab - a 4GB ext4 partition on a 64GB SD card. After TB recognized it I set up init.d support and it happily mounts on every boot.
So it looks like it's something to do with this device, which sadly has extremely limited space that makes me want to cry. Therefore, I hope someone else with the 113 can lend a hand.
If necessary, I'm totally willing to flash stock, re-root, and set everything up again in order to make this work!
Not too sure. I use Aparted and Link2SD on a couple of my older toys...lol. I use ext 3 too. I have a 210, I'll play with it and see if I can figure it out.
Thanks @RealWelder! Don't know if that'll help as it's a different device, but let me know what, if anything, you figure out.
Personally, I'm going to give it another shot using the 'Mounts2SD' app (even though I'd wanted to do this WITHOUT any new apps... oh well, if it works at least I'll have plenty of space!)
I got it to work! *happy dance* Absolutely NO idea exactly what did it, but there was a lot of fiddling with permissions, and rebooting, and painfully typing "mount -t ext4 etc. etc." into terminal, and making adjustments to init.d scripts until finally ... TB recognized it.
Thank you XDA forum!
Sent from my Samsung SM-T113 using XDA Labs

Categories

Resources