[Q] How to mount ext sdcard as read-only in 4.1.2 - Verizon Samsung Galaxy S III

Hi,
I have a Samsung Galaxy S3 verizon model. Its rooted and running CleanROM 6.0R2 ROM android 4.1.2.
I am trying to accomplish below
1. Mount external sdcard in read-only mode. This is to avoid files on the extsdcard being accidentally deleted.
I have music and some old photos in there. Sometimes my son plays with the phone. I don't want him
to delete all the photos/music on the external sdcard.
I have tried following, but none of then resolved the issue
1. Partition external sd card as ext3 and set all files/dir to read-only permission from ubuntu box.
This didn't work because, phone doesn't recognize the sdcard and partitions on it.
2. Partition extsdcard as vfat and set permission for the files/dir to read-only using root-explorer.
I cannot set permissions for vfat partition.
3. Partition extsdcard as vfat and Mount extsdcard as read-only using "root-explorer".
Doesn't work. Files can be deleted from other apps like Gallery.
4. Partition extsdcard as vfat and mount extsdcard as read-only using terminal and busybox.
This works. But files are owned by root. For group and other, permission is None. Hence
other apps are not able to view the files.
From reading many posts, I conclude, partition has to be vfat for apps like Gallery/video player etc to view it.
Only option to achieve read-only on a vfat partition is to mount it read-only. Based on this, any idea how I can achieve my objective?
Also, once set, what happens is the phone is rebooted? Anyway to repeat the sets at boot time?
Thanks

Related

[Q] SD Card will not mount after ext4 part.

Attempting to partition sd card with ext4 -a process I completed multiple times successfully on a Nexus One, the process appeared to complete but now the phone will not mount the sd card. I've tried a wipe/reset, to no avail. I can still access and partition the sd card through adb, but the phone cannot mount it to format/partition, restore from recovery, partition sd-card from within ClockWork Recovery, nothing. I've re-partitioned the sd card through adb, which indicated a successful completion, but the phone still refuses to mount the sd card. If this weren't a Nexus S with it's cursed internal sd-card I would simply swap out the sd card with another or format it externally like all the google topics I pull up on the subject suggest.
Is this fixable or has the fused sd-card scenario become a liability?
Common Error messages:
Can't mount /sdcard
Can't mount /sdcard/.android_secure
Phone: Nexus S (US, T-Mobile, manufactured Dec. '10)
Recovery Img: ClockworkMod Recovery 3.0.2.4
Rom: CM 7.0.3 (now wiped, cannot put back on since sd card won't mount)
fstab:
/dev/block/mtdblock4 /cache yaffs2 rw
/dev/block/platform/s3c-sdhci.0/by-name/userdata /data ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/system /system ext4 rw
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
Can mount everything except the last one, /sdcard.
I've tried all the recommended procedures garnered from the first 10 or so pages in google, xda, cyanogem forum, etc:
Restore from nandroid: Not possible, can't mount the SD,
Wipe/Reset: can't wipe /media as sd card won't mount,
partition sd card from within Clockwork: indicates success but does nothing,
format from within clockwork: unable to mount,
repartition using adb: works, parted can see them, I can move files to from, but the phone will not mount,
clearing fstab: no effect,
Fastboot works, but I don't have the proper images. ADB works, as do the installed utilities. Have not tried ODIN as again, I don't have the proper images. Should I attempt to compile my own images from source?
Update: SOLVED, Microsoft Windows. To whom it may concern: I was able to mount the /dev/block/platform/s3c-sdhci.0/by-name/media from two different laptops running OSX and Fedora/Ubuntu then successfully been able to partition them with fat32 as the ClockworkMod (and maybe Cyanogen?) expect with 0 progress. Then I pulled out an old Windows machine, installed the JDK/ADK's +tools and performed the same procedure and that time it worked. I'm uncertain as to what particular quality a 'genuine' Windows formatting provides, but either this phone or the particular software combination I'm running require it. I was able to mount & re-partition the /sdcard in Clockwork, then manually remove rebuild them and upgrade to ext4 using tune2fs as usual. In the interim for work and such, I had to find a surrogate (for the SIM) and could only find and old k750i (which still had a full charge and worked flawlessly all day, btw). Wow phones used to be small.
I think I was missing something about the way ClockworkMod handles fstab, because everytime I would modify it specifically to the specs I passed to parted while creating the partitions with mkpartfs, it would either ignore or overwrite them. So be careful messing with the sd-card, the S's aren't like the One's in the sense that if you screw it (the sd-card) up or it goes bad you can't just take it out and format it in another machine/phone, you have to appeal to ClockworkMod. ODIN $ucks by the way, I found fastboot to be much more effective.
If you format the sd partition ext4, then you should change the fstab too.
from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard vfat rw
to from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard ext4 rw
or from
Code:
/dev/block/platform/s3c-sdhci.0/by-name/media /sdcard auto rw
The 2nd last entry there is the file system type.
Likely, this would have solved your problem.
Of course, I don't know, whether the recovery has the vfat type in fstab. You might have to change it there too. On my linux box auto works very well in fstab.
Of course, if you partition your sd partition ext4, you won't be able to use it as usb memory from windows. (At least I am pretty sure you can't, haven't tried)
Well of course I couldn't let it die, I went back and started tinkering again now that I have a way back. I can't change the fstab it seems, whatever I change it to gets over written everytime either Clockwork or the Rom starts. It's weird, I know I'm missing something and I don't know much about CWMod. (had Amon_Ra on the N1, which had the nifty fsupgrade script)
The 2nd last entry there is the file system type.
Likely, this would have solved your problem.
Click to expand...
Click to collapse
I'm quite familiar with unix style fs and fstab, it's the stubbornness I'm not used to. I'm also spoiled by vi and nano. CW has some nice scripts built in as well though.

[Q] KitKat CM11 SDCard Usage (Best) Options

EDIT:
I am a programmer with experience working on Linux, brand new to Android. Recently I got my first Android phone, a Moto G 4G (XT1045) and installed CM11-20141009-NIGHTLY-peregrine on it. Today I bought a 32GB SDCard and formatted it to ext4 filesystem with AParted.
So it seems like cyanogenmod kernel should have SDCard fix for kitkat built in. Now I have a specific problem. I am trying to switch Titanium Backup to use sdcard1 as backup the location. So I have to browse to that folder.
My sdcard seems to be mounted in two places:
/mnt/media_rw/sdcard1
/storage/sdcard1
but both of them have problems. /storage/sdcard1 is a fuse mount and is read-only, even to root. I can browse there with TitaniumBackup, but then TitaniumBackup can't write any backups. /mnt/media_rw/sdcard1 is writable, and I can make directories on it from adb. But TitaniumBackup cannot browse inside of it, because media_rw is only accessible to user 1023(AID_MEDIA_RW). So I can't point TitaniumBackup to my sdcard!
How to fix this?

Vold.fstab missing?

For some reason I don't have the vold.fstab file under system/etc/ . I want to swap sdcard0 and sdcard1 but without vold.fstab I'm not sure if there are other methods. Thanks in advance for swapping suggestions or answers to the missing vold.fstab file. I'm on Lollipop.
yang_k_vue said:
For some reason I don't have the vold.fstab file under system/etc/ . I want to swap sdcard0 and sdcard1 but without vold.fstab I'm not sure if there are other methods. Thanks in advance for swapping suggestions or answers to the missing vold.fstab file. I'm on Lollipop.
Click to expand...
Click to collapse
It's been deprecated since android 4.3 the sdcard is now mounted in fstab which means you would have to unpack the boot.img
I too hav the same prob plz help...
Unjustified Dev said:
It's been deprecated since android 4.3 the sdcard is now mounted in fstab which means you would have to unpack the boot.img
Click to expand...
Click to collapse
Plz help me guys void. Fstab is missing on my device.... What to do
I'm really stuck on this too. I switched to a Sony Z1C recently, but it had a locked bootloader. I can't install Cyanogen. My last phone had Cyanogen and my SDcard is mounted ext4. I really want to mount this card while keeping the ext4 filesystem (it's 128GB. It's also full. All my music...well A-W...ran out of space. It took forever. I'm not reformatting. Don't ask).
I can mount the sdcard manually via the adb shell:
mount -t ext4 /dev/block/mmcblk1p1 /storage/sdcard1
And if I look at the directory in the console, everything shows up. But it doesn't show up in any apps! What gives? How do I fix this?
download Link2 Sd on playstore.
djsumdog said:
I'm really stuck on this too. I switched to a Sony Z1C recently, but it had a locked bootloader. I can't install Cyanogen. My last phone had Cyanogen and my SDcard is mounted ext4. I really want to mount this card while keeping the ext4 filesystem (it's 128GB. It's also full. All my music...well A-W...ran out of space. It took forever. I'm not reformatting. Don't ask).
I can mount the sdcard manually via the adb shell:
mount -t ext4 /dev/block/mmcblk1p1 /storage/sdcard1
And if I look at the directory in the console, everything shows up. But it doesn't show up in any apps! What gives? How do I fix this?
Click to expand...
Click to collapse
Go into link2 sd on phone and the first time you open it IT WILL ASK YOU 1 time!! pick wisely.. which ext1 (2) (3) you want to run... Solved!!

[IDEA] Need community help! A safer solution for memory woes on Marshmallow.

When I installed Android 5.0 and later 6.0 ROM on our Xperia L experience was much better than stock. These ROM's are simply fantastic! However, we have memory issues. Yeah we can use apps like Link2SD or foldermount, but that's too much of a hassle. Thet's not really a long-term solution.
The main problem is that /data partition is too small to handle modern app file sizes. It's only 1GB.
And /sdcard partition also exists (which is seperate from data) and represents internal memory - that's 4GB.
On top of that our phone has externalSD slot - /extSD option.
When you install an app it always directly installs to /data. Yeah you can move it. But still 1GB is not enough, somehow I keep getting not enough memory notification.
So the first solution by @Kahana82 was to repartition. That way we could remove 2GB from /sdcard and give it to /data. But the problem is that when we change partitions our phone gets bricked when stock ROM is flashed again.
But I have come across a new idea that could work. Just need community help for that as I am not that experienced.
So instead of repartitioning we could simply mount /SDCard as /data (just rename it!) and mount /data as /SDCard. That way we could increase /data from 1GB to 4GB and I think it is enough for basic app needs. And therefore flashing stock ROM should work as it is just change in kernel or system. Only 1GB internal memory wouldn't be a problem since Android 6.0 allows us to mount externalSD as internal memory.
Now how to do it. I have taken a look at this thread for 2011 Xperia Arc. Looks like ramdisk could be modified to do so as I see that mountpoint is there.
EDIT: OK, I've managed to unpack boot.img and ramdisk. Here's what I get:
fstab.qcom file
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults recoveryonly
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=/persist/footer
/dev/block/platform/msm_sdcc.1/by-name/userdata /data f2fs rw,nosuid,nodev,noatime,nodiratime,inline_xattr wait,formattable,check,encryptable=/persist/footer
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check
/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel /recovery emmc defaults defaults
/devices/platform/msm_sdcc.1/mmc_host/mmc0* auto auto defaults voldmanaged=sdcard0:32,nonremovable,noemulatedsd
/devices/platform/msm_sdcc.3/mmc_host* auto auto nosuid,nodev voldmanaged=sdcard1:auto,encryptable=userdata
I propose another solution.
Format "SD 0" as EXT4.
Then mount during the boot of Android, "SD 0" as DATA partition.
Simply replace "date" with "SD 0" at the time of installation of partitions.
This does not alter the structure of partitions and would give the 4 GB device for apps installation.
I've done tests. It's easy to format using the TWRP "SD 0" as EXT4.
The same process is easy to reverse.
It is safe because it does not change the structure of the partitions. If there is any problem just restore the Stock ROM.
Soon just need help to know which Android configuration files need to change mount "SD 0 in EXT4" like the DATA unit.
The Xperia L pass from 1,57GB to 4 GB !!!
Help, please !!!!
All the MM ROMs for Xperia L should have Adoptable Storage. You could format a partition of your SD Card as Adoptable Storage (using Apps2SD). And you can then move most of the apps to that partition in its entirety. Apps downloaded from Play Store would automatically go to the Adopted Storage.
Only certain apps like WhatsApp and Maps would refuse to move. You could use Link2SD to force move such apps to Internal SD of your device. It will move a big part of it.
On older ROMs, you should be able to setup a partition of your SD as linkable storage, allowing Link2SD or Apps2SD to move the whole app to the partition.
DragonClawsAreSharp said:
All the MM ROMs for Xperia L should have Adoptable Storage. You could format a partition of your SD Card as Adoptable Storage (using Apps2SD). And you can then move most of the apps to that partition in its entirety. Apps downloaded from Play Store would automatically go to the Adopted Storage.
Only certain apps like WhatsApp and Maps would refuse to move. You could use Link2SD to force move such apps to Internal SD of your device. It will move a big part of it.
On older ROMs, you should be able to setup a partition of your SD as linkable storage, allowing Link2SD or Apps2SD to move the whole app to the partition.
Click to expand...
Click to collapse
There are advantages to swap partitions instead of using the SD Card:
- The new partition date would be within the device's NAND memory. So there are the risks involved in using a sdcard always fragile ...
- How the partition is within the NAND memory beyond the security there is the highest performance.
The only downside is that the restriction would increase from 1,57GB to 4GB.
In my case I not use the smartphone for gaming. All of my APPs would fit into 2.5GB.
If I still needed more space, could use "Adoptable Storage".
- Could unmount and remove the SD card when wanted, after all was being used only for personal files and not apps.
Also it would be a great experimental situation of low risk to learn how to configure mount partitions on Android.
ConceptBR said:
There are advantages to swap partitions instead of using the SD Card:
- The new partition date would be within the device's NAND memory. So there are the risks involved in using a sdcard always fragile ...
- How the partition is within the NAND memory beyond the security there is the highest performance.
The only downside is that the restriction would increase from 1,57GB to 4GB.
In my case I not use the smartphone for gaming. All of my APPs would fit into 2.5GB.
If I still needed more space, could use "Adoptable Storage".
- Could unmount and remove the SD card when wanted, after all was being used only for personal files and not apps.
Also it would be a great experimental situation of low risk to learn how to configure mount partitions on Android.
Click to expand...
Click to collapse
Guys, devs are apparently working on unifying partitions. That's the best solution.
It is already working on Xperia T. So it is possible on Xperia L as well.
Let's just wait and see for now.
IMO This is actually top priority for Xperia L lol other that this the device is working just fine.
ConceptBR said:
I propose another solution.
Format "SD 0" as EXT4.
Then mount during the boot of Android, "SD 0" as DATA partition.
Simply replace "date" with "SD 0" at the time of installation of partitions.
This does not alter the structure of partitions and would give the 4 GB device for apps installation.
I've done tests. It's easy to format using the TWRP "SD 0" as EXT4.
The same process is easy to reverse.
It is safe because it does not change the structure of the partitions. If there is any problem just restore the Stock ROM.
Soon just need help to know which Android configuration files need to change mount "SD 0 in EXT4" like the DATA unit.
The Xperia L pass from 1,57GB to 4 GB !!!
Help, please !!!!
Click to expand...
Click to collapse
That's the same thing I was thinking. But yeah, thanks for the info that SDCard can be formatted to ext4. Then I think this can happen:
Code:
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults recoveryonly
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/devices/platform/msm_sdcc.1/mmc_host/mmc0 /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=/persist/footer
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check
/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel /recovery emmc defaults defaults
/devices/platform/msm_sdcc.3/mmc_host* auto auto nosuid,nodev voldmanaged=sdcard1:auto,encryptable=userdata
Ehh, will try to make boot.img soon. You guys think this code would succeed? Then /sdcard wouldn't exist but let's just see if data would.
I've tried it and it f..ked my phone. I had to reflash stock and go to mm from there ...
cojocar.andrei said:
I've tried it and it f..ked my phone. I had to reflash stock and go to mm from there ...
Click to expand...
Click to collapse
Sorry to hear that...
In my case I need an even simpler solution ...
Using TWRP formatted "SD 0" as EXT4.
I managed to UnMount "/DATA" and "/sdcard".
I would like to reverse the mounts.
Partitioning modifies the structure of partitions.
Mounting is by software changes and safe.
The solution will allow any time to install the ROM Stock since the structure of the partitions will not be changed.
As in TWRP Terminal can ride correct partitions?
if I'm wrong then correct me, please ...
Device Configuration Partitons
sdcard -> /dev/block/mmcblk0p32
Userdata-> /dev/block/mmcblk0p31
CHANGE
sdcard -> /dev/block/mmcblk0p31
Userdata-> /dev/block/mmcblk0p32
------------------------------------------------------------
Is it correct? ADB Shell or Terminal?
unmount /sdcard/
unmount /Userdata/
mount -o rw /dev/block/mmcblk0p32/ /userdata/
mount -o rw /dev/block/mmcblk0p31/ /sdcard/
And reboot smartphone?
/system/init/init.rc?
------------------------------------------------------------
Sorry my bad english...
ConceptBR said:
In my case I need an even simpler solution ...
Using TWRP formatted "SD 0" as EXT4.
I managed to UnMount "/DATA" and "/sdcard".
I would like to reverse the mounts.
Partitioning modifies the structure of partitions.
Mounting is by software changes and safe.
The solution will allow any time to install the ROM Stock since the structure of the partitions will not be changed.
As in TWRP Terminal can ride correct partitions?
if I'm wrong then correct me, please ...
Device Configuration Partitons
sdcard -> /dev/block/mmcblk0p32
Userdata-> /dev/block/mmcblk0p31
CHANGE
sdcard -> /dev/block/mmcblk0p31
Userdata-> /dev/block/mmcblk0p32
------------------------------------------------------------
Is it correct? ADB Shell or Terminal?
unmount /sdcard/
unmount /Userdata/
mount -o rw /dev/block/mmcblk0p32/ /userdata/
mount -o rw /dev/block/mmcblk0p31/ /sdcard/
And reboot smartphone?
/system/init/init.rc?
------------------------------------------------------------
Sorry my bad english...
Click to expand...
Click to collapse
In theory it should work. I've tried it but it didn't come up right for me. I suspect the line in fstab.qcom for the user data that I've replaced (/devices/platform/msm_sdcc.1/mmc_host/mmc0).
I think we should replace
/dev/block/platform/msm_sdcc.1/by-name/userdata
with
/dev/block/platform/msm_sdcc.1/by-name/sdcard
and of course format sdcard as ext4.
I see no reason why it shouldn't work. Probably I'll try it again in a few weeks, when I'll have some spare time ...
So for this to work the fstab.qcom needs to look like this:
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/platform/msm_sdcc.1/by-name/boot /boot emmc defaults recoveryonly
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
/dev/block/platform/msm_sdcc.1/by-name/sdcard /data ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=/persist/footer
/dev/block/platform/msm_sdcc.1/by-name/sdcard /data f2fs rw,nosuid,nodev,noatime,nodiratime,inline_xattr wait,formattable,check,encryptable=/persist/footer
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 noatime,nosuid,nodev,barrier=1,data=ordered,noauto_da_alloc,journal_async_commit,errors=panic wait,check
/dev/block/platform/msm_sdcc.1/by-name/cache /cache f2fs rw,nosuid,nodev,noatime,nodiratime,inline_xattr wait,check
/dev/block/platform/msm_sdcc.1/by-name/FOTAKernel /recovery emmc defaults defaults
/devices/platform/msm_sdcc.1/mmc_host/mmc0* auto auto defaults voldmanaged=sdcard0:31,nonremovable,noemulatedsd
/devices/platform/msm_sdcc.3/mmc_host* auto auto nosuid,nodev voldmanaged=sdcard1:auto,encryptable=userdata
Great job! It's usable?
Option58 said:
Guys, devs are apparently working on unifying partitions. That's the best solution.
It is already working on Xperia T. So it is possible on Xperia L as well.
Let's just wait and see for now.
IMO This is actually top priority for Xperia L lol other that this the device is working just fine.
Click to expand...
Click to collapse
That's great, but what are people who can't use SD cards are supposed to do? Where will they store their data?
stuckbootloader said:
That's great, but what are people who can't use SD cards are supposed to do? Where will they store their data?
Click to expand...
Click to collapse
Want to hear my advice? Install ROM that gives you most data space, I don't know which ROM that is. And use your device as-is until you buy new one. You could also replace your motherboard.
I know this is not xda-spirit like, but I have to say give up messing with your existent motherboard before you hard-brick your device, I destroyed mine. Had to buy new device. Xperia L can be hard-bricked if you mess with partitions.
stuckbootloader said:
That's great, but what are people who can't use SD cards are supposed to do? Where will they store their data?
Click to expand...
Click to collapse
In Xperia T, i think what @Adrian DC use a sdcard emuled for this...
Option58 said:
Want to hear my advice? Install ROM that gives you most data space, I don't know which ROM that is. And use your device as-is until you buy new one. You could also replace your motherboard.
I know this is not xda-spirit like, but I have to say give up messing with your existent motherboard before you hard-brick your device, I destroyed mine. Had to buy new device. Xperia L can be hard-bricked if you mess with partitions.
Click to expand...
Click to collapse
Other Roms? In Galaxy S2 for example, with PIT partitions(other method), all ROMS working today with pits (official cyanogenmod inclusive) . I'm sorry, but, this is the price of testing
Thread closed at OPs request

method to set 0123-4567 as mount point for removable sdcard

This is a very annoying issue but I have not found any thread about it.
I'm trying to upgrade my external/removable sdcard for an android 6 device.
The new sdcard gets mounted to /mnt/media_rw/XXXX-XXXX (i.e. not 0123-4567), so no app works as files can't be found.
The linux way (ln) wont work. Simply creating /mnt/media/0123-4567 causes bad bootloop on my device. This suggests that FolderMount app or Magisk modules such as fbind are a bad idea. selinux is enforcing.
It appears that Android assigns different mount points are to different sdcards and the first sdcard always gets 0123-4567. It that's right, Android probably stores sdcards' identifiers so as to know which mount point to use at boot time. So, deleting the identifiers database would probably mean that the next card inserted would get 0123-4567 as mount point.
I have looked at the data of com.android.externalstorage, but there is nothing there. I don't see other obvious candidate apps.
Where is this ext sdcard data stored?
I was wrong. Android sets mount points matching sdcard uuid
How to change vfat partition UUID?
How do I change the UUID of a vfat partition? For ext2 / ext3 / ext4, this is done with a simple: tune2fs -U <new-uuid> /dev/<partition> Is there a similar command for vfat partitions?
superuser.com

Categories

Resources