[Replicant] access to sdcard partitions (was: default rights on storage)

Fil Lupin fillupin at protonmail.com
Sat Sep 4 21:36:18 UTC 2021


Waiting for other ideas, I checked the place where is mounted internal storage as I understand it.

Rebooting to recovery, I mouned /emmc which fails, error log is following:
---
Warning: No file_contexts
Error mounting /emmc
init.svc.ueventd=running
init.svc.recovery=running
service.adb.root=1

I: Checking for extendedcommand...
I: Skipping execution of extendedcommand, file not found...
mount:
mount: mounting /dev/block/mmcblk0p11 on /emmc failed: Invalid argument
Error mounting /emmc!
I: Can't partition non-vfat: auto
I: Can't format unknown volume: external_sd
I: Can't partition non-vfat: auto
----

Since I'm not sure installation succeed completely, I checked several config files in case someone can show me the default files content.

In recovery mode, when checking /etc/fstap and /etc/revoery_fstabI got
----
~ # cat /etc/fstab
/dev/block/mmcblk0p7 /cache ext4 rw
/dev/block/mmcblk0p10 /data ext4 rw
/dev/block/mmcblk0p11 /emmc auto rw
/dev/block/mmcblk0p9 /system ext4 rw
/dev/block/mmcblk1p1 /sdcard auto rw
----
and
----
~ # cat /etc/recovery.fstab
# mount point fstype device

/boot emmc /dev/block/mmcblk0p5
/recovery emmc /dev/block/mmcblk0p6

/efs ext4 /dev/block/mmcblk0p1
/cache ext4 /dev/block/mmcblk0p7
/system ext4 /dev/block/mmcblk0p9
/data ext4 /dev/block/mmcblk0p10
/preload ext4 /dev/block/mmcblk0p12

/emmc auto /dev/block/mmcblk0p11
/sdcard auto /dev/block/mmcblk1p1 /dev/block/mmcblk1
----

When rebooting in normal mode:
----
shell at android:/ $ cat /etc/vold.fstab
## Vold 2.0 Generic fstab
## - San Mehat (san at android.com)
##

#######################
## Regular device mount
##
## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>
## label - Label for the volume
## mount_point - Where the volume will be mounted
## part - Partition # (1 based), or 'auto' for first usable partition.
## <sysfs_path> - List of sysfs paths to source devices
######################

# internal sdcard
dev_mount sdcard0 /storage/sdcard0 11 /devices/platform/dw_mmc/mmc_host/mmc0/mmc0 nonremovable,encryptable

# external sdcard
dev_mount sdcard1 /storage/sdcard1 auto /devices/platform/s3c-sdhci.2/mmc_host/mmc1

# USB storage device
dev_mount usbdisk0 /storage/usbdisk0 auto /devices/platform/s3c_otghcd/usb
----

Please let me know if you have any idea where to look at. :)

- Fil Lupin.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Saturday, September 4th, 2021 at 4:35 PM, Fil Lupin via Replicant <replicant at osuosl.org> wrote:

> It seems from https://redmine.replicant.us/projects/replicant/wiki/DataPartition no partition corresponds to sdcard0 or usbdisk0.
>
> One of my application was Markor, which seems to look data into /storage/sdcard0/Documents by default. I did not change the default parameters from this application.
>
> If no partition corresponds to /storage/sdcard0, I wonder where I could find those data.
> Do you have any idea?
>
> - Fil Lupin.
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Saturday, September 4th, 2021 at 2:48 PM, Fil Lupin via Replicant <replicant at osuosl.org> wrote:
>
>> Hello,
>> sorry for my first mail, sdcard0 and usbdisk0 are not mounted, my problem is obviously not a permission problem.
>> I'll look this way to solve that.
>>
>> Happily, it could allow me to get back some data I lost while reinstalling since no data has been written on sdcard0 and usbdisk0, I could be able to get back data if it has not been wiped during installation.
>> I read page https://redmine.replicant.us/projects/replicant/wiki/BackupTheDataPartition#Backing-up-the-data-partition and I get a backup (with adb pull) from every partition in /dev/block/platform/dw_mmc/ of my Galaxy S2. I imagine it could be sufficient to get my data back from sdcard0 and usbdisk0, I just need to understand how to access them. I you have any idea, I'm aware :)
>>
>> - Fil Lupin.
>>
>> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
>> On Friday, September 3rd, 2021 at 12:00 AM, Fil Lupin via Replicant <replicant at osuosl.org> wrote:
>>
>>> Hi,
>>> reinstalling replicant 4.2 worked !
>>> However, I noticed that /storage is not configured the same for each mounting point :
>>> -----
>>> shell at android:/storage $ ls -la
>>> drwxrwxr-x system system 2021-09-02 20:32 sdcard0
>>> d---rwxr-x system sdcard_rw 1970-01-01 01:00 sdcard1
>>> drwxrwxr-x system system 2021-09-02 20:32 usbdisk0
>>>
>>> 1|shell at android:/storage $ df
>>> Filesystem Size Used Free Blksize
>>> /dev 395.2M 48K 395.2M 4096
>>> /mnt/secure 395.2M 0K 395.2M 4096
>>> /mnt/asec 395.2M 0K 395.2M 4096
>>> /mnt/obb 395.2M 0K 395.2M 4096
>>> /mnt/fuse 395.2M 0K 395.2M 4096
>>> /system 503.9M 241.6M 262.3M 4096
>>> /cache 98.4M 54.9M 43.5M 4096
>>> /efs 19.7M 8.1M 11.5M 4096
>>> /data 2G 805.4M 1.2G 4096
>>> /preload 503.9M 96.1M 407.8M 4096
>>> /storage/sdcard1 29.7G 13.1G 16.6G 32768
>>> -----
>>> Currently, I can only write into /storage/sdcard1
>>> /storage/sdcard0 and usbdisk0 should be writable but does not seem to be recognised.
>>> I wiped sdcard when installing.
>>> Did I forgot some steps? (perhaps is it due to the encryption of the phone before reinstallation)
>>>
>>> Regards,
>>>
>>> - Fil Lupin.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/replicant/attachments/20210904/e46b6b7c/attachment-0001.html>


More information about the Replicant mailing list