pixel-backup-gang icon indicating copy to clipboard operation
pixel-backup-gang copied to clipboard

Galaxy S20 crashes after mounting drive (last step)

Open chorong761 opened this issue 1 year ago • 9 comments
trafficstars

I'm trying to do this on a rooted Galaxy S20, running android 14.

Since the sh -c "$(curl -fSs https://raw.githubusercontent.com/master-hax/pixel-backup-gang/master/install.sh)" command doesn't work in termux for me (bin/sh access denied), I decided to manually copy the scripts into the termux "home folder".

This method works fine until the last step, which is the mounting part. As soon as I run the mount command, the command runs for a second and the phone would lock up and reboot.

I wonder if it's because I'm running a newer version of android or it's not a pixel?

Since it locks up right away, I couldn't take a screenshot of termux. I could try again and take a picture of the screen if it would help with diagnostics.

chorong761 avatar Aug 21 '24 08:08 chorong761

(this project has only been tested on the original pixel)

can you share the output of the following commands from your device?

  1. getprop ro.product.manufacturer
  2. getprop ro.product.model
  3. getprop ro.product.name
  4. getprop ro.build.id
  5. getprop ro.build.version.sdk
  6. getprop ro.build.version.min_supported_target_sdk
  7. cat /proc/filesystems

please share the mount command you ran. you can also try running each command from the mounting script independently to see where it crashes.

master-hax avatar Aug 21 '24 20:08 master-hax

getprop ro.product.manufacturer = samsung getprop ro.product.model = SM-G9810 getprop ro.product.name = x1qzhx getprop ro.build.id = TP1A.220624.014 getprop ro.build.version.sdk = 33 getprop ro.build.version.min_supported_target_sdk = 22 cat /proc/filesystems =

Without su cat: /proc/filesystems: Permission denied With su

at /proc/filesystems                           <
nodev   sysfs
nodev   rootfs
nodev   tmpfs
nodev   bdev
nodev   proc
nodev   cpuset
nodev   cgroup
nodev   cgroup2
nodev   configfs
nodev   debugfs
nodev   tracefs
nodev   sockfs
nodev   bpf
nodev   pipefs
nodev   ramfs
nodev   devpts
        ext3
        ext2
        ext4
        vfat
        msdos
        sdfat
nodev   ecryptfs
nodev   sdcardfs
        ntfs
        fuseblk
nodev   fuse
nodev   fusectl
nodev   overlay
        f2fs
nodev   selinuxfs
nodev   pstore
nodev   functionfs

The command I used to mount is ./mount_ext4.sh /dev/block/sde2, the last line I see in termux before the phone crashes is setenforce 0

chorong761 avatar Aug 22 '24 09:08 chorong761

i think the newer android kernels might require selinux to be enabled. we can probably use magiskpolicy to fix this.

to confirm this is the case, let's try running the script again but skip the setenforce 0 command. the files from the drive under /the_binding should be now visible to apps but not readable.

master-hax avatar Aug 22 '24 11:08 master-hax

I removed setenforce 0 from the mounting script, and it did not crash after running.

I could only see the "the_binding" folder via mnt/runtime/default/emulated/0/the_binding and mnt/my_drive, but not via the normal "internal storage" area.

chorong761 avatar Aug 24 '24 15:08 chorong761

Sorry for sounding like I'm rushing you, but may I ask if there are any updates on this?

chorong761 avatar Aug 31 '24 23:08 chorong761

Sorry, I haven't had a chance to look into this further. Also, I don't have a Galaxy S20 or any Android 13 device to test.

I believe that replacing the broad setenforce 0 with a finer grained policy change using magiskpolicy might fix the issue. I would try playing around with this and see if it works.

master-hax avatar Sep 03 '24 14:09 master-hax

Thanks for the update! Take your time :)

chorong761 avatar Sep 03 '24 15:09 chorong761

@chorong761 can you try mounting a FAT32 drive instead of an ext4 drive? it does not require disabling selinux so it may work on your device

master-hax avatar Nov 27 '24 09:11 master-hax

another contributor discovered that sdcardfs isn't needed either: https://github.com/master-hax/pixel-backup-gang/issues/32#issuecomment-2576098531

master-hax avatar Jan 08 '25 07:01 master-hax

bump @chorong761 were you able to try out the FAT32 mounting script?

master-hax avatar Jun 11 '25 04:06 master-hax

come back @chorong761

master-hax avatar Sep 12 '25 00:09 master-hax