master-hax / pixel-backup-gang

backup tools for OG pixel & pixel XL
40 stars 6 forks source link

Galaxy S20 crashes after mounting drive (last step) #9

Open chorong761 opened 3 weeks ago

chorong761 commented 3 weeks ago

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.

master-hax commented 3 weeks ago

(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.

chorong761 commented 3 weeks ago

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

master-hax commented 3 weeks ago

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.

chorong761 commented 3 weeks ago

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 commented 2 weeks ago

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

master-hax commented 1 week ago

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.

chorong761 commented 1 week ago

Thanks for the update! Take your time :)