S7+ Android 12 - Cannot Mount /system? - Samsung Galaxy Tab S7 / S7 Plus Questions & Answer

Hi all,
Just unlocked bootloader of my S7+ and had Magisk / TWRP installed (https://forum.xda-developers.com/t/twrp-for-the-samsung-galaxy-tab-s7-5g-t976b.4163853/)
I was trying to install the Debloater module for Magisk. I tried to install first using Magisk Manager but it always gave me an error.
I felt curious and decided to install from TWRP instead. But under TWRP it just gave me an error 1 when it was trying to mount /system , so that installation always failed.
I went to Advanced Wipe trying to repair the partition. Interestingly, /system wasn't among the listed options.
I seem to be able to browse the files under /system using TWRP's file manager just fine. So what's with the inability to mount it?
Any help is appreciated. Thanks! I've flashed multi disabler and VBmeta (that didn't seem to matter)

Related

Need help recovering/flashing HTC Desire 601

I am just trying to root my HTC Desire 601 (don't care what android version it has - I just need a rooted phone for testing) - but not been having much luck so far.
I have unlocked the bootloader via HTC, and that all seemed to go fine.
The first guide I found said to use the "philz_touch_6.19.3-zara.zip" recovery. The links were dead but I found a copy, and it seemed to install (I could enter recovery), but had lots of mount errors.
I then wasn't able to install any the superSU images that the guides suggested - I got various different errors.
I then tried TWRP (https://forum.xda-developers.com/de...recovery-twrp-2-8-0-0-touch-recovery-t2874948). Once again, I could enter recovery.
But somewhere along the line I seem to have corrupted the OS - as I can only boot into the bootloader now. So I have now tried to install a system image - namely, the one described at:
https://forum.xda-developers.com/desire-601/orig-development/test-builds-cyanogenmod-12-t3041646
But the link didn't work, but I seem to have found it here:
https://www.androidfilehost.com/?fid=95916177934534985
(the filename seems to match quite well)
But when I try to install it, I just get various mount errors:
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/system at /system: No such file or directory
...
and so on
and finally:
E:Error executing updater binary in zip '/external_sd/...'
Anyone have any ideas?
richjhart said:
I am just trying to root my HTC Desire 601 (don't care what android version it has - I just need a rooted phone for testing) - but not been having much luck so far.
I have unlocked the bootloader via HTC, and that all seemed to go fine.
The first guide I found said to use the "philz_touch_6.19.3-zara.zip" recovery. The links were dead but I found a copy, and it seemed to install (I could enter recovery), but had lots of mount errors.
I then wasn't able to install any the superSU images that the guides suggested - I got various different errors.
I then tried TWRP (https://forum.xda-developers.com/de...recovery-twrp-2-8-0-0-touch-recovery-t2874948). Once again, I could enter recovery.
But somewhere along the line I seem to have corrupted the OS - as I can only boot into the bootloader now. So I have now tried to install a system image - namely, the one described at:
https://forum.xda-developers.com/desire-601/orig-development/test-builds-cyanogenmod-12-t3041646
But the link didn't work, but I seem to have found it here:
https://www.androidfilehost.com/?fid=95916177934534985
(the filename seems to match quite well)
But when I try to install it, I just get various mount errors:
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/system at /system: No such file or directory
...
and so on
and finally:
E:Error executing updater binary in zip '/external_sd/...'
Anyone have any ideas?
Click to expand...
Click to collapse
How did you unlock the bootloader?

Android Pay (Safety Net) on Rooted/Unlocked phone

This guide is to help anyone who wants to use Android Pay but his XC phone is unlocked and rooted. It begins with an unlocked phone with a valid backup of the TA partition as well as an unrooted /system partition.
Prerequisites:
1. A backup of TA partition (https://forum.xda-developers.com/crossdevice-dev/sony/universal-dirtycow-based-ta-backup-t3514236)
2. Unlocked bootloader
3. Working fastboot driver and command
4. Clean /system partition without any trace of su. Systemless root is fine because it will be overwritten by the new kernel. If needed, flash the stock system partition again.
5. TWRP image for XC (https://drive.google.com/open?id=0B0j3VJ1Xp5N8M1ZGbzBBMTdyRnM)
6. Stock kernel image (Extract kernel.sin from official FTF)
7. Trim Area Proof Of Concept (https://forum.xda-developers.com/crossdevice-dev/sony/poc-real-trim-instead-drm-fix-t3552893)
8. Tobias kernel repack tool (https://forum.xda-developers.com/xp...oot-automatic-repack-stock-kernel-dm-t3301605)
9. Magisk v12.0 flashable zip, not Manager app (https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445)
Procedures:
1. Run TA PoC (DOUBLECLICKME.bat). You'll be asked to select your kernel image (kernel.sin) and TA backup (your TA backup file). Choose also to disable DM-Verity, Sony RIC but keep Force-encrypt (my data partition is encrypted, your choice). At the end a new file new_boot.img will be created.
2. Copy the new_boot.img in step 1 to Tobias tool folder. In the same folder, execute the following command. Again, disable Sony RIC, don't install TWRP, don't install DRM fix and don't install Busybox. At the end, another file boot.img will be created.
Code:
rootkernel.cmd new_boot.img boot.img
3. Power off your phone. Power on again while holding volume up rocker to enter fast boot mode. Execute the following command to flash the new boot image. Replace boot.img with your new image in step 2 with full path.
Code:
fastboot.exe flash boot [I]boot.img[/I]
4. Reboot your phone. No root or SuperSU app should be found.
5. Copy Magisk zip file into phone internal storage.
6. Dial *#*#7378423#*#*, followed by Service Test > Security to check if DRM is detected properly. At this point of time, your phone should be su free and DRM working properly.
7. Power off your phone. Power on again while holding volume up rocker to enter fast boot mode. Execute the following command to boot TWRP. Replace twrp.img with your TWRP image with full path.
Code:
fastboot.exe boot [I]TWRP.img[/I]
8. In TWRP, flash Magisk zip
9. Reboot your phone. Install Magisk Manager app (no long available in Play Store) (http://tiny.cc/latestmanager)
10. Run Magisk Manager and turn on Magisk Hide. You should see Magisk installed successfully and properly rooted with MagiskSU. Tap SafetyNet button to check if it can be passed.
11. (optional) Install Xposed using Magisk app, not official method. Xposed will break Safety Net again. But you can always disable it in Magisk Manager easily.
Remarks:
1. Trim Area Proof Of Concept is required to restore full DRM functionality so that Safety Net thinks the phone is still locked.
2. /system partition must be clean and free of any trace of previous su installation.
3. Magisk Manager app cannot be used to install Magisk because it requires root in the first place. Even with systemless root, after Magisk is installed this way, trace of su can be found in /vendor partition.
4. Tobias tool has to be used to repack the boot image because I found that if PoC image is used directly, phone will reboot unexpectedly after Magisk is installed.
This is the clearest guide I found so far for rooting x compact :good: (Your old guide also help me understand some of the concept)
I get most of the steps but want to confirm whether I understand it correctly
itandy said:
1. Run TA PoC (DOUBLECLICKME.bat). You'll be asked to select your kernel image (kernel.sin) and TA backup (your TA backup file). Choose also to disable DM-Verity, Sony RIC but keep Force-encrypt (my data partition is encrypted, your choice). At the end a new file new_boot.img will be created.
Click to expand...
Click to collapse
TA PoC modify the boot image and the modified boot image will mount the TA backup image during boot and "trick" the system/kernel into thinking that is the original TA Partition, and it is untouched.
itandy said:
2. Copy the new_boot.img in step 1 to Tobias tool folder. In the same folder, execute the following command. Again, disable Sony RIC, don't install TWRP, don't install DRM fix and don't install Busybox. At the end, another file boot.img will be created.
Click to expand...
Click to collapse
- Drm fix is not needed because of the trick in step 1. This step is only needed because of incompatibility of boot image generated from step 1 with magisk (mentioned in the remarks section.).
- TWRP is not needed because in this guide TWRP will be booted by fastboot through PC without actually installing it on the phone (Step 7)
- Busybox is now included in magisk I think?
itandy said:
6. Dial *#*#7378423#*#*, followed by Service Test > Security to check if DRM is detected properly. At this point of time, your phone should be su free and DRM working properly.
Click to expand...
Click to collapse
- This is to prove the TA PoC mount trick above is working. No kernel fix is done.
The advantage of this method instead of kernel drm fix is that you can have completely stock kernel/system and only have modified boot image (and some extra data in data partition). Can you theoretically update the system and exclude the boot and data partition and still have the root intact? Or is that not recommended as new update might have some change in the boot partition as well?
I still need to do more reading about magisk and why the manager need to be installed manually (and what does it do)
trewelu said:
This is the clearest guide I found so far for rooting x compact :good: (Your old guide also help me understand some of the concept)
I get most of the steps but want to confirm whether I understand it correctly
TA PoC modify the boot image and the modified boot image will mount the TA backup image during boot and "trick" the system/kernel into thinking that is the original TA Partition, and it is untouched.
- Drm fix is not needed because of the trick in step 1. This step is only needed because of incompatibility of boot image generated from step 1 with magisk (mentioned in the remarks section.).
- TWRP is not needed because in this guide TWRP will be booted by fastboot through PC without actually installing it on the phone (Step 7)
- Busybox is now included in magisk I think?
- This is to prove the TA PoC mount trick above is working. No kernel fix is done.
The advantage of this method instead of kernel drm fix is that you can have completely stock kernel/system and only have modified boot image (and some extra data in data partition). Can you theoretically update the system and exclude the boot and data partition and still have the root intact? Or is that not recommended as new update might have some change in the boot partition as well?
I still need to do more reading about magisk and why the manager need to be installed manually (and what does it do)
Click to expand...
Click to collapse
Your understanding is correct. As for busybox, I didn't install it because I don't use it. You can try and see if it affects Safety Net detection.
Yes, system partition can be updated without losing root.
trewelu said:
This is the clearest guide I found so far for rooting x compact :good: (Your old guide also help me understand some of the concept)
I get most of the steps but want to confirm whether I understand it correctly
TA PoC modify the boot image and the modified boot image will mount the TA backup image during boot and "trick" the system/kernel into thinking that is the original TA Partition, and it is untouched.
- Drm fix is not needed because of the trick in step 1. This step is only needed because of incompatibility of boot image generated from step 1 with magisk (mentioned in the remarks section.).
- TWRP is not needed because in this guide TWRP will be booted by fastboot through PC without actually installing it on the phone (Step 7)
- Busybox is now included in magisk I think?
- This is to prove the TA PoC mount trick above is working. No kernel fix is done.
The advantage of this method instead of kernel drm fix is that you can have completely stock kernel/system and only have modified boot image (and some extra data in data partition). Can you theoretically update the system and exclude the boot and data partition and still have the root intact? Or is that not recommended as new update might have some change in the boot partition as well?
I still need to do more reading about magisk and why the manager need to be installed manually (and what does it do)
Click to expand...
Click to collapse
Just found that you can actually enable busybox in Magisk Manager so you don't have to pack it into the boot image.
Sent from my F5321 using Tapatalk
Done the step above and gained root and pass safety check in magisk.
Is there a way to disable the bootloader unlocked message during boot? I don't mind the message but it delay booting process I
trewelu said:
Done the step above and gained root and pass safety check in magisk.
Is there a way to disable the bootloader unlocked message during boot? I don't mind the message but it delay booting process I
Click to expand...
Click to collapse
I'm not aware anyone is able to do that so far.
itandy said:
I'm not aware anyone is able to do that so far.
Click to expand...
Click to collapse
You would need to alter bootloader....
Remark for Android 7.0 Users
If you will use this guide on Nougat, you will need to DISABLE force-encrypt, because data partition is encrypted by default on Nougat. On top of that, you will need to first boot to TWRP, wipe DATA partition without decrypting / mounting it and then reboot system to re-create unencrypted data partition. Only then you can flash Magisk..
ondrejvaroscak said:
If you will use this guide on Nougat, you will need to DISABLE force-encrypt, because data partition is encrypted by default on Nougat. On top of that, you will need to first boot to TWRP, wipe DATA partition without decrypting / mounting it and then reboot system to re-create unencrypted data partition. Only then you can flash Magisk..
Click to expand...
Click to collapse
Just curious, I'm on MM and my data partition is encrypted. But I didn't have to decrypt it first before installing Magisk. Is there anything on Nougat that makes it different?
itandy said:
Just curious, I'm on MM and my data partition is encrypted. But I didn't have to decrypt it first before installing Magisk. Is there anything on Nougat that makes it different?
Click to expand...
Click to collapse
Yes, quite substantially .... the TWRP does NOT support /data decryption on Nougat. On MM it works, on Nougat there is no way, until someone compiles TWRP with support for Nougat encrypted /data. The workaround is to DISABLE force-encrypt, wipe /data to force re-create unencrypted /data, install anything you need and then encrypt in Settings/Security. Once you do it, there is no way to get into /data in recovery...
ondrejvaroscak said:
Yes, quite substantially .... the TWRP does NOT support /data decryption on Nougat. On MM it works, on Nougat there is no way, until someone compiles TWRP with support for Nougat encrypted /data. The workaround is to DISABLE force-encrypt, wipe /data to force re-create unencrypted /data, install anything you need and then encrypt in Settings/Security. Once you do it, there is no way to get into /data in recovery...
Click to expand...
Click to collapse
And why is data partition decryption support needed in TWRP in this case? Flashing Magisk requires modification on data partition?
itandy said:
And why is data partition decryption support needed in TWRP in this case? Flashing Magisk requires modification on data partition?
Click to expand...
Click to collapse
I don't think so. I just re-did the step (accidentally locked back my bootloader when trying to remove the unlocked message). On twrp, it ask for password which I don't even know as after BL unlock wipe, I haven't set my screen lock yet. I skip that part, mount the sd card and flash magisk. Magisk modify the boot image and I can have root and safety net working.
Ps: You might need to update the step, the magisk manager stub will force you to download the app from play store, but it is already pulled. I need to download the app directly from magisk thread and side load it.
Edit: I was wrong. Magisk do use /data for magisk.img, but it have workaround instalation in case it is inaccessible during flashing install script. See #15
trewelu said:
Ps: You might need to update the step, the magisk manager stub will force you to download the app from play store, but it is already pulled. I need to download the app directly from magisk thread and side load it.
Click to expand...
Click to collapse
Updated. Thanks!
itandy said:
And why is data partition decryption support needed in TWRP in this case? Flashing Magisk requires modification on data partition?
Click to expand...
Click to collapse
Magisk installs file magisk.img into /data. This file is than mounted as /magisk. I am not sure, how Magisk handles installation if /data is not accesible/mountable during flashing, did not try it.
ondrejvaroscak said:
Magisk installs file magisk.img into /data. This file is than mounted as /magisk. I am not sure, how Magisk handles installation if /data is not accesible/mountable during flashing, did not try it.
Click to expand...
Click to collapse
I'm not good with script, but here is my understanding,
In case of inaccessible data during flash, magisk will flash magisk.img temporarily in cache partition. During booting (after data is unencrypted), magisk check if the workaround image in cache exist and move it to data
scripts/flash_script.sh
Code:
if (is_mounted /data); then
IMG=/data/magisk.img
else
IMG=/cache/magisk.img
ui_print "- Data unavailable, use cache workaround"
fi
jni/daemon/bootstages.c
Code:
// Merge images
if (merge_img("/cache/magisk.img", MAINIMG))
goto unblock;
if (merge_img("/data/magisk_merge.img", MAINIMG))
goto unblock;
jni/magisk.h
Code:
#define MAINIMG "/data/magisk.img"
trewelu said:
I'm not good with script, but here is my understanding,
In case of inaccessible data during flash, magisk will flash magisk.img temporarily in cache partition. During booting (after data is unencrypted), magisk check if the workaround image in cache exist and move it to data
Click to expand...
Click to collapse
Cool, very clever. I did not make the effort to study in in depth, but expected some sort of solution to exist when users succesfully installed Magisk even when they can not mount /data in TWRP. This temporary /cache mount is just nice example of clever programming
Hey, I think I pseudo-bricked my device while following these steps. I used fastboot to boot into TWRP, without disabling encryption, on Nougat 7.1. I didn't notice the requirement to disable encryption in Post #8 until afterwards.
Now the device appears to be on (my computer detects an unknown device when I plug it in), but it doesn't show any LEDs or react to any buttons. Is my only recourse to wait till the battery dies in a few days and try again, or is there another way?
HAHA, I found if I hold EVERY button (power, vol up, vol dn, and camera), the phone restarts and I have access again. w00t!
Just wondering if somebody tried this with Nougat 7.1? I can't get TA_POC to work, security test displays error and sim card is not detected.
baz1 said:
Just wondering if somebody tried this with Nougat 7.1? I can't get TA_POC to work, security test displays error and sim card is not detected.
Click to expand...
Click to collapse
Yes this works with 7.1 the same as with 7.0. How did you perform the update to 7.1?
I followed the guide to perfection, and everything works perfectly...but...If I want to turn a user app into system apps, link2sd gives me this error: mount: '/dev/block/bootdevice/by-name/system'->'/system': Device or resource busy" and system app mover gives me this error : "could not remount /system".
is system read only? why? I've already tried to enable "rw" "ro" through the command line without success...
Can anyone help me?
p.s. I have granted root permissions to the applications mentioned above at their opening

TWRP can't mount storage (Samsung SM-G355HN)

I've been trying to fix a bootlooping Samsung Galaxy Core 2 by installing a custom rom, but after installing Lineage twice (and failing) I tried to wipe the folders again to try to install a different rom. This was met with multiple errors "E : Unable to mount '/data'" and the likes.
I've already tried to repair and change the file system and back, mount the partitions manually (can only select SD Card), factory resetting and fixing SELinux contexts. None of those worked.
No OS is currently installed
TWRP version is 2.8.5.0
TheFrisianGamer said:
I've been trying to fix a bootlooping Samsung Galaxy Core 2 by installing a custom rom, but after installing Lineage twice (and failing) I tried to wipe the folders again to try to install a different rom. This was met with multiple errors "E : Unable to mount '/data'" and the likes.
I've already tried to repair and change the file system and back, mount the partitions manually (can only select SD Card), factory resetting and fixing SELinux contexts. None of those worked.
No OS is currently installed
TWRP version is 2.8.5.0
Click to expand...
Click to collapse
sed -i 's/forceencrypt/encryptable/g' /vendor/etc/fstab (or fstab name under that directory) should fix /data issues but use TWRP with adb shell
TheFrisianGamer said:
I've been trying to fix a bootlooping Samsung Galaxy Core 2 by installing a custom rom, but after installing Lineage twice (and failing) I tried to wipe the folders again to try to install a different rom. This was met with multiple errors "E : Unable to mount '/data'" and the likes.
I've already tried to repair and change the file system and back, mount the partitions manually (can only select SD Card), factory resetting and fixing SELinux contexts. None of those worked.
No OS is currently installed
TWRP version is 2.8.5.0
Click to expand...
Click to collapse
Wich ROM did you installed?
I'm looking for ROM's for SM-G355HN and can't find anything... So I'm trying to port form SM-G355H to SM-G355HN (no success at the moment)

Question with Stock Rooted Tab S6 SM-T860

Hello Everyone,
I have an SM-T860 WiFi, with the stock T860XXU3BTJ2 update. I was able to root it with Magisk. When I initially opened Magisk, it needed to reboot to complete the rooting. I then installed a few apps, and got prompted for root. I approved it, and was able to browse root.
Usually I will go for an AOSP rom, but I was considering the idea of just removing the APK's I don't want (Google, Samsung), and replace them with alternatives.
I tried a few different things, but *it appears that* every time I modify the /system/app-priv folder, and I reboot, my Magisk changes to "NA"! For some reason, reflashing the Magisk_modified file I made in Odin doesn't return root to the device.
At one point, I used Material File manager to mount the root directory as read/write, so I could delete the APKs. I assume flashing the CSC file will mean the / mountpoint will mount as read only, moving forward.
I also downloaded and used the debloat Magisk Module. It appeared to complete successfully, but I have the same Magisk problem when I reboot.
Here's how i flash the Odin Image:
1. Downloaded the firmware with Frija (Really amazing app after first trying Sammobile).
2. Modified it on the tablet with Magisk Manager, copied it back off the device.
3. Flashed Device with BL, Modified Magisk AP, and no CSC (without the "HOME" option) (My understanding is this will delete all data on the device).
4. After Odin finishes, I immediately hold Volume + and Bixby. I immediately get to the recovery, and run a factory reset.
5. Go through initial setup
6. Use ADB to install Magisk Manager apk to Device
7. Upon opening Magisk Manager, it doesn't prompt me to reboot and complete installation (like I saw before), it just says "N/A".
I appreciate your help!
edit-- I ran ls -la on / with adb, and got the line below, so I think that confirms we are read only.
drwxr-xr-x 22 root root 4096 2008-12-31 09:00 system
hello,
how did you root it?!
stock T860XXU3BTJ2 for me it dont work?

Get current installed Android/Frimware version in twrp

As the title says, i want the figure out which firmware version is installed on my phone. OnePlus 9 Pro.
I am currently in a bootloop and try to reflash the boot.img to minimize the data loss. tried a few versions without success. (thread calling for help for that is here).
To break down the problem i want to flash the correct boot img, but need to know which one.
I can boot twrp temporarily with fastboot and access some data. I couldnt find build.props file as suggested.
Is there any other possibility to find the firmware version?
thanks in advance!
Speaka said:
(...) I couldnt find build.props file as suggested.
Is there any other possibility to find the firmware version?
(...)
Click to expand...
Click to collapse
In TWRP, you need to mount the system to see the content.
What do you mean with mount? Menu entry "mount" in twrp means mounting it to the usb connection, as far as i know....
In twrp menu advanced->file manager i can see the root directory and /system (and more).
Where do i have to look?
TWRP -> Mount -> (mark the square) System
Only then will File Manager see the contents of the system partition.
Ah okay. This was a misconception. it is mounted. unter /system is se bin,etc,lib64 and usr. Browsing araound i did not find build.props.

Categories

Resources