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

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

Open
chorong761 opened this issue Aug 21, 2024 · 7 comments
Open

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

chorong761 opened this issue Aug 21, 2024 · 7 comments

Comments

@chorong761
Copy link

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
Copy link
Owner

master-hax commented Aug 21, 2024

(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
Copy link
Author

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
Copy link
Owner

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 master-hax changed the title Phone crashes after mounting drive (last step) Galaxy S20 crashes after mounting drive (last step) Aug 22, 2024
@chorong761
Copy link
Author

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
Copy link
Author

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

@master-hax
Copy link
Owner

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
Copy link
Author

Thanks for the update! Take your time :)

@master-hax master-hax added the help wanted Extra attention is needed label Sep 4, 2024
@master-hax master-hax added help wanted (non-pixel) and removed help wanted Extra attention is needed labels Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants