[Q] Why not using compressed fs (cramfs,squashfs) for /system (nand p2)? - Touch Cruise Android Development

Hey all,
assumed that within /system will only written at installation time (and yeah, by OTA upgrades, root usage, etc.), would it be a mess to use a compressed fs?
There are cramfs (r/o) and squashfs (r/o). These are also used by other embedded systems like openwrt.
So when it is r/o , could it be overlayed by another partition? So nand p3 could overlay /system and /data would be a normal folder in the overlay and does'nt need its own mount.
Just some thoughts to increase user space on my good old device which is now reborn, thanks to Android.
Cheers,
Sven

Related

Nandroid backups - Why Yaffs2 and not Ext3

Hey guys!
It has been already a while messing around with my Defy but one question still remains unanswered for me.
If /cache, /data and /system partitions are Ext3 formatted (you can check this by typing mount in Terminal Emulator), why do nandroid backup images have Yaffs2 filesystem then? Why does this conversion occur? Doesn't it make much more sense to image the partition in its original filesystem?
Thanks in advance...
Nandroid backup - image with YAFFS filesystem. - not dump of partitions.
When recovery is simply unpack files on the ext3 partition.
i suppose earlier (android) adoption of yaffs2 played a big part of that decision, but now it may very well be tar.
it's just a lot easier not to change what's not broken, isn't it?
Will soon be changed to TAR format (Recovery 4.0 will support the two formats)
It sounds good.
Wish the recovery would be more powerful after its source open.

Smartphone Architecture compared to PC

I have a few questions related to smartphones. Searched and couldn't find anything like I was looking for.
I am vary familiar with PC's and would like to compare in my mind where things reside on a smartphone.
On a smartphone, where does the operating system reside? Is it in the ROM(I know is Read-only-memory)? Or is the ROM similar to the BIOS on a PC and contains the basic instructions to interact with the between software and hardware?
Just having a little problem comparing what is where.
i think its in ROM memory, but there is additonal memory for system/internal apps too.
In my XPlay I have 512mb+400mb.
There isn't anyth like bios but u can flash recovery
From what I know, everything is stored in NAND flash. There is a boot partition which contains the kernel, and a system partition which contains the OS (firmware) itself. Those essentially double as ROM. Technically it's not read-only memory but its contents won't change unless you root your phone and change them yourself.
Also, I don't think an embedded system such as a smartphone would benefit much from having a full-blown BIOS. Hardware initialization, I believe, is done during the boot sequence, not prior to it. Look up "Board support package".
If someone knows more about this subject, feel free to correct me and provide additional information.
I'm quite interested in embedded systems myself, but only have had the opportunity to work with simple microcontrollers.
So basically everything inside is more like a solid state hard drive? Just partitioned for different tasks? I figured the rom was not really a rom. Usually you have to build an interface and cut traces on the board in order to flash a rom.
Are we able to browse the rom? Like with root explorer? Or is that partition "hidden"?
Also, what are the caches for. I am familiar with caches like in ie. But the davlik seems to be persistent. Thanks for the answers so far guys.
Usually when you load a new os, the cache is usually wiped. But with phones, a step is to wipe the caches. Confusing when trying to grasp with the knowledge I have of older electronics. Lol I just called pc's old.
I wish there was some guide already making the comparison but Google can't find it!
Yes, you can browse those partitions in Root Explorer. It will allow you to mount even the /system partition r/w so you can modify the contents.
As for the caches, I'm not sure what exactly gets stored on the /cache partition, but the reason you have to wipe/format it when you flash a new ROM, is because it's separate from the /system partition. That's probably what you meant by "persistent".
It's actually convenient when you think about it. If you want to flash an update of the ROM you are currently using, you probably don't want the cache to be wiped as well. On the other hand, sometimes you may want to wipe just the cache. Same goes for the /data partition, when you are doing a factory reset, for example.
I would also assume that since /system partition normally isn't written to, and /cache and /data are, keeping them separate helps in case the filesystem gets corrupted.
Now you are confusing me.
/system is a folder. Not a partition. It may be in a folder but it is not a partition afaik. There is a root partition which is basically everything you see when you open file explorer that includes the system folder, then any other partitions are mounted under /mnt. Those include /asec /obb /sdcard and /secure. (using what I see in my kf for this example)
So when we flash the "rom" we are really only flashing one partition of a rom that has several partitions. That would be the basic partition containing the system files? We are not flashing the entire rom. Does that sound correct?
In Linux partitions are mounted under directories. So /cache, /data and /system are really just mount points for those partitions. It's understandable that this would confuse you if you haven't had experience with Linux. Windows handles partitions somewhat differently.
When you flash a ROM, you are actually flashing only the system partition. Kernel is flashed to the boot partition, and others (cache, data, sdcard, etc.) are used by the system itself.
DeVelox said:
In Linux partitions are mounted under directories. So /cache, /data and /system are really just mount points for those partitions. It's understandable that this would confuse you if you haven't had experience with Linux. Windows handles partitions somewhat differently.
When you flash a ROM, you are actually flashing only the system partition. Kernel is flashed to the boot partition, and others (cache, data, sdcard, etc.) are used by the system itself.
Click to expand...
Click to collapse
Yes i have a little knowledge, albeit very little, of Linux. But if it is an actual partition it will also show under /mnt after you mount it, correct? That is how you tell if it is an actual partition. I do realize that the others partitions like /sdcard are being automatically mounted. And you can browse them through the /sdcard folder or /mnt/scard.
/cache is no where under /mnt or any subs of any partitions that are mounted so that tells me the /cache folder that shows under root is actually only a folder. Well there is a cache subdirectory underone of the partitions under /mnt but the contents are different than the contents of the cache folder running off of root.
Sorry bout all of the questions. I have done a lot to my phone and kf. I just like to know what it's being affected when when I do what I am doing. And why I am doing what I am doing.
Like i said before, the term rom confused me as when i was flashing roms on other devices I was having to build a hardware interface and cut traces on the board, sometimes install jumpers across traces. All of that to flash "roms". This was on xboxes and satellite receivers mainly.
No, /mnt is just a directory like any other. In fact, it is rarely used for mounting purposes in modern Linux distributions.
When you open /cache, /data or /system in Root Explorer, please check the "x MB used, y MB free" line at the top. You will notice that it shows different values for each of those directories. That should be enough to convince you that they are indeed partitions, and not ordinary directories.
You will also notice that, for example, /etc shows the same used/free info as /system. That is because /etc is actually a symlink to /system/etc.
You should read up more on Linux, or just take my word for it.
P.S. If you have Terminal Emulator app installed, try the "df -h" command. It will list all the partitions, their mount points, and used/free space info. Mind you, only entries starting with "/dev/block" are actual partitions, tmpfs is something else.
I see said the blind man. I also found this as an example of the partitions on my kf.
Scrolling down I see all of the active partitions.
http://kindlefirenews.org/expand-app-storage-on-the-kindle-fire/
Thanks for the explanations. But I will say that ROM it's a misnomer!
Open a console on your android and type "df".
You will see the partitions.

Huawei Ascend G330 U8825-1 resize internal partitions to gain space for apps

the g330 comes with a reasonable storage. But there is not enough space for apps on /data. The internal sd-card got a lot of space. resizing /data (part. 18) may be critical and requires another recovery image. So my idea is to log in the phone, start fdisk /dev/block/mmcblk0, delete internal sd-card partition (19), then create a e.g. 1 GB partition with ext4, which I will mount on /data/app, and give the rest to a new partition 20 for internal sd-card.
I think this approach is more fail-save and can be done quite fast. I have to change just init.rc to add one mount and vold.fstab. Has somebody tried this?
yes, i know, the dalvik-cache and /data/data will still load the /data partition, and app2sd would save the same space from /data. But app2sd needs one mount for each app (at least in GB), so booting takes very long time and I have to wait until I can launch an app.
I read sometimes, the kernel get the offsets of the partitions of flash as parameters when booted - so some offsets would be wrong when I change the partion table. This would cause to fail mount /data/app - what about this?
rregn said:
the g330 comes with a reasonable storage. But there is not enough space for apps on /data. The internal sd-card got a lot of space. resizing /data (part. 18) may be critical and requires another recovery image. So my idea is to log in the phone, start fdisk /dev/block/mmcblk0, delete internal sd-card partition (19), then create a e.g. 1 GB partition with ext4, which I will mount on /data/app, and give the rest to a new partition 20 for internal sd-card.
I think this approach is more fail-save and can be done quite fast. I have to change just init.rc to add one mount and vold.fstab. Has somebody tried this?
yes, i know, the dalvik-cache and /data/data will still load the /data partition, and app2sd would save the same space from /data. But app2sd needs one mount for each app (at least in GB), so booting takes very long time and I have to wait until I can launch an app.
I read sometimes, the kernel get the offsets of the partitions of flash as parameters when booted - so some offsets would be wrong when I change the partion table. This would cause to fail mount /data/app - what about this?
Click to expand...
Click to collapse
I tried this and it works
its for g300 but it works on g330
http://www.htcmania.com/showthread.php?t=428466
sorry, its in spanish haha use the google tranlator
xals1997 said:
I tried this and it works
its for g300 but it works on g330
http://www.htcmania.com/showthread.php?t=428466
sorry, its in spanish haha use the google tranlator
Click to expand...
Click to collapse
Did i get the idea? You use link2SD (from Bülent Akpinar) , but instead of using a 2nd partition of the external SD-card with ext2, you use the internal SD-card for link2SD?
But i heard that link2SD need a ext2/3 partition? Also, in my version of link2SD there is:
mount -t ext2 -o rw /dev/block/vold/179:2 ...
btw. how is /system/etc/install-recovery.sh triggered

[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