Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount point is not shown in google photos #32

Closed
brosahay opened this issue Jan 4, 2025 · 6 comments
Closed

Mount point is not shown in google photos #32

brosahay opened this issue Jan 4, 2025 · 6 comments

Comments

@brosahay
Copy link
Contributor

brosahay commented Jan 4, 2025

I was trying to mount an SD card using a card reader, before mounting my EXT4 FAT32 external drive, but the device is unable to see the same in google photos. Files application is showing the mount point. Not really sure what is wrong? I am using a pixel 2 XL running lineageOS

$ mount

....
/dev/block/vold/public:8,145 on /mnt/media_rw/90B7-1911 type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,gid=1077,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/mnt/media_rw/90B7-1911/the_binding on /mnt/runtime/write/emulated/0/the_binding type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997)
/mnt/media_rw/90B7-1911/the_binding on /mnt/runtime/full/emulated/0/the_binding type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997)
/mnt/media_rw/90B7-1911/the_binding on /mnt/pass_through/0/emulated/0/the_binding type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997)
/mnt/media_rw/90B7-1911/the_binding on /mnt/runtime/default/emulated/0/the_binding type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997)
/mnt/media_rw/90B7-1911/the_binding on /mnt/runtime/read/emulated/0/the_binding type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997)

# stat /storage/emulated/0/the_binding/
  File: /storage/emulated/0/the_binding/
  Size: 16384	 Blocks: 32	 IO Blocks: 512	 directory
Device: 65h/101d	 Inode: 76	 Links: 5	 Device type: 0,0
Access: (0775/drwxrwxr-x)	Uid: (    0/    root)	Gid: ( 9997/everybody)
Access: 2025-01-04 00:00:00.000000000 +0530
Modify: 2025-01-04 18:08:06.000000000 +0530
Change: 2025-01-04 18:08:06.000000000 +0530
@master-hax
Copy link
Owner

master-hax commented Jan 5, 2025

You can't have 2 different drives mounted at the same time without modifying the scripts, as they both will try to mount to same directory. One option is to manually change the script to use "the_binding1" for one of the drives.

Gphotos needs to be force closed & reopened for the new files to appear, since it only scans for new media periodically.

Also i'm not sure if your pixel 2's OS is based on the same android version as the OG pixel - what is the output of adb shell getprop ro.build.version.release on your device?

@brosahay
Copy link
Contributor Author

brosahay commented Jan 5, 2025

I am reverting to the https://dl.google.com/dl/android/aosp/taimen-rp1a.201005.004.a1-factory-2f5c4987.zip just to minimize the changes from stock. Additionally, I am trying to mount one drive only, sorry in the OG post I mentioned it as ext4 whereas it's vfat at the moment. I will get to ext4 after I get vfat working on Google photos.

EDIT: still facing the same issue.

:/data/data/com.termux/files/home/pixel-backup-gang # mount
....
/dev/block/vold/public:8,113 on /mnt/media_rw/90B7-1911 type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,gid=1077,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/mnt/media_rw/90B7-1911/the_binding on /mnt/runtime/write/emulated/0/the_binding type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997)
/mnt/media_rw/90B7-1911/the_binding on /mnt/runtime/full/emulated/0/the_binding type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997)
/mnt/media_rw/90B7-1911/the_binding on /mnt/pass_through/0/emulated/0/the_binding type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997)
/mnt/media_rw/90B7-1911/the_binding on /mnt/runtime/default/emulated/0/the_binding type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997)
/mnt/media_rw/90B7-1911/the_binding on /mnt/runtime/read/emulated/0/the_binding type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997)

:/data/data/com.termux/files/home/pixel-backup-gang # df -h
Filesystem                          Size  Used Avail Use% Mounted on
....
/dev/block/vold/public:8,113         30G  702M   29G   3% /mnt/media_rw/90B7-1911
/mnt/media_rw/90B7-1911/the_binding  30G  702M   29G   3% /mnt/runtime/write/emulated/0/the_binding

:/data/data/com.termux/files/home/pixel-backup-gang # getprop ro.build.version.release
11

EDIT: Downgrading to https://dl.google.com/dl/android/aosp/taimen-qq3a.200805.001-factory-305df20c.zip to check if this only works for Android 10.

@brosahay
Copy link
Contributor Author

brosahay commented Jan 5, 2025

Closing the issue, this is working on Android 10 for me, if anyone has some answers for android 11 and above kindly post :).

@brosahay brosahay closed this as completed Jan 5, 2025
@brosahay
Copy link
Contributor Author

brosahay commented Jan 7, 2025

I was able to make it work on Android 10+ on FAT so far, using android pixel 5a, so I guess any android should work that way. This is without using sdcardfs as a file system.
Outlining the basic steps below

# gain root access
su -M
# identify the mount point of the FAT device
df -h
....
/dev/block/vold/public:8,129 238G 236G  2.8G  99% /mnt/media_rw/3B65-1BF0
# mount into internal storage (i.e. I have created a folder usb_storage in the sdcard)
mount /mnt/media_rw/3B65-1BF0/files/ /mnt/pass_through/0/emulated/0/usb_storage/
# verify the mounts
mount
....
/dev/block/vold/public:8,129 on /mnt/pass_through/0/emulated/0/usb_storage type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,gid=1077,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,time_offset=330,errors=remount-ro)
/dev/block/vold/public:8,129 on /data/media/0/usb_storage type vfat (rw,dirsync,nosuid,nodev,noexec,noatime,gid=1077,fmask=0007,dmask=0007,allow_utime=0020,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,time_offset=330,errors=remount-ro)
# send broadcast to identify the folder
am broadcast -a android.intent.action.MEDIA_SCANNER_SCAN_FILE -d file:///storage/emulated/0/usb_storage/

@master-hax
Copy link
Owner

master-hax commented Jan 8, 2025

I was able to make it work on Android 10+ on FAT

without using sdcardfs as a file system

great job @brosahay - would you be willing to put up a PR to update remount_vfat.sh with your improvements? i'm happy to test any changes on my side.

@brosahay
Copy link
Contributor Author

brosahay commented Jan 8, 2025

I was able to make it work on Android 10+ on FAT

without using sdcardfs as a file system

great job @brosahay - would you be willing to put up a PR to update remount_vfat.sh with your improvements? i'm happy to test any changes on my side.

sure, absolutely in a few days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants