change system partition from read-only to read-write - Samsung Galaxy S9 Questions & Answers

Dear to all, I have a samsung galaxy s9 g9600/ds (snapdragon) with last official firmware android 10 and rooted with magisk and with custom kernel of klabit87. Even if the device is rooted, system partition it's read-only (seems that is related to Android 10) but if I try to install and execute systemrw ( https://www.systemrw.com/ ), I 've message "Fatal error! No super partition detected". But if I run "cat /vendor/etc/*fstab*" I'll get the following outputs
Code:
:/ # cat /vendor/etc/*fstab*
# Android fstab file.
# The filesystem that contains the filesystem checker binary (typically /system) cannot
# specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
#TODO: Add 'check' as fs_mgr_flags with data partition.
# Currently we dont have e2fsck compiled. So fs check would failed.
#<src> <mnt_point> <type> <mnt_flags and options> <fs_mgr_flags>
/dev/block/bootdevice/by-name/system /system ext4 ro,errors=panic wait
/dev/block/bootdevice/by-name/userdata /data ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,encryptable=footer,quota,reservedsize=128M
#/dev/block/bootdevice/by-name/vendor /vendor ext4 ro,barrier=1,discard wait
/dev/block/bootdevice/by-name/persist /mnt/vendor/persistext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check
/dev/block/bootdevice/by-name/cache /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check
/dev/block/bootdevice/by-name/apnhlos /vendor/firmware_mnt vfat ro,context=u:object_r:firmware_file:s0,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337 wait
/dev/block/bootdevice/by-name/modem /vendor/firmware-modem vfat ro,context=u:object_r:firmware_file:s0,shortname=lower,uid=0,gid=1000,dmask=227,fmask=337 wait
/dev/block/bootdevice/by-name/dsp /vendor/dsp ext4 ro,nosuid,nodev,barrier=1 wait
/dev/block/bootdevice/by-name/efs /mnt/vendor/efs extnoatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check
/dev/block/bootdevice/by-name/dqmdbg /mnt/vendor/dqmdbg ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check
/dev/block/bootdevice/by-name/carrier /carrier extnoatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic defaults,nofail,check
#
# Need to have this entry in here even though the mount point itself is no longer needed.
# The update_engine code looks for this entry in order to determine the boot device address
# and fails if it does not find it.
/dev/block/bootdevice/by-name/misc /misc emmc defaults defaults
# /dev/block/bootdevice/by-name/nad_refer /nad_refer ext4 noatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic wait,check,formattable,factoryuse
# VOLD :: fstab.qcom
/dev/block/bootdevice/by-name/hidden /preload extnoatime,nosuid,nodev,noauto_da_alloc,discard,journal_checksum,data=ordered,errors=panic voldmanaged=preload:auto,check
/devices/platform/soc/8804000.sdhci/mmc_host/mmc* auto vfat defaults voldmanaged=sdcard:auto
/devices/platform/soc/a600000.ssusb/a600000.dwc3/xhci-hcd.0.auto/usb* auto auto defaults voldmanaged=usb:auto
# TODO: Needs to be checked by memory part
# /dev/block/zram0 none swap defaults zramsize=1073741824
:/ #
so system partition is read-only and I can't use app debloat or Link2SD app. Somebody have found a solution to this problem ?
p.s.: the same utility throw error message about dm-verity and dm-verification: "ERROR: Data from 'vbmeta' does not look like a vbmeta header" ... so I can know if verity and verification are disabled ?
In the install of the firmware and root I have made the followings steps:
in download mode: Odin install Android 10 stock firmware G9600ZHS9FVA4 from here https://samfw.com/firmware/SM-G9600/TGY
check and disable oembootloader
Reboot
in downlaod mode Odin install TWRP
Reboot into TWRP (recovery mode)
Install multidisabler-samsung-2.2_klabit
Install forceencrypt_remover_Q
Format data partition
reboot to recovery
Install g9600_klabit_q_v6.3
Install Magisk-v26.1
reboot to system
there is something that I have wrong?

Related

[GUIDE] Recovery Install w/out USB

Without Ninthsense and Roothorick this would not be possible, and all credit for this belongs to them!
This is a guide for installing a recovery.img from your SDcard, without the use of your USB port, ODIN, or CWM
This is through the android terminal emulator app, with root permissions. or via ADB over WIFI
**The issue: I cannot transfer data at all through my USB port and was not gonna attempt flashing out of fear of brick!
I was able to extract the recovery.img from the ODIN flashable CWMrecovery 6.0.1.2 package developed by Terinfire but was unable to create a CWM flashable zip because I lack the expertise. (I still have my old CWM touch recovery developed by Aquethys).
After reaching out Ninthsense and Roothorick helped me with the command line to make this possible.
Whats needed:
1) a broke USB (don't attempt this unless its the very last option)
2) the recovery image file for this phone
3) ROOT ACCESS!!!
4) a terminal app or ADB over WIFI
Below is the Partition Table for the Glide(thanks ninthsense):
Starting recovery on Fri Dec 28 19:23:18 2012
framebuffer: fd 4 (480 x 800)
ClockworkMod Recovery v6.0.0.1
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /boot emmc /dev/block/mmcblk0p9 (null) 0
2 /cache ext4 /dev/block/mmcblk0p3 (null) 0
3 /data ext4 /dev/block/mmcblk0p6 (null) 0
4 /recovery emmc /dev/block/mmcblk0p8 (null) 0
5 /sdcard vfat /dev/block/mmcblk0p4 /dev/block/mmcblk0 0
6 /system ext4 /dev/block/mmcblk0p2 (null) 0
7 /efs ext4 /dev/block/mmcblk0p1 (null) 0
To connect ADB over WIFI (thanks ninthsense):
Connect your phone and laptop to your wifi.
Goto Settings developer options - turn on "ADB over netwrok"
adb connect 192.168.x.x:5555
**if doing this using ADB you must enter a shell and run the su command
adb shell
su
Now do the following:
1) move "recovery.img" to root of SDcard
2) backup current recovery:
(if in terminal and not ADB over WIFI you must enter "su" before continuing)
dd if=/dev/block/mmcblk0p8 of=/sdcard/current-recovery.img​
3) Install new recovery:
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p8​
Thats it!!!! reboot recovery and enjoy!!!
Hey you forgot the first step :laugh: , on how to connect to the device through "ADB over network".
ninthsense said:
Hey you forgot the first step :laugh: , on how to connect to the device through "ADB over network".
Click to expand...
Click to collapse
I will modify the OP, I figured I would list the terminal steps because of its ease of use Ill add both!
**edit** done! how's that looking?
Cprager said:
I will modify the OP, I figured I would list the terminal steps because of its ease of use Ill add both!
Click to expand...
Click to collapse
Add the list of partitions as well, maybe somebody will find it useful for backing up and restoring something else as well.
ninthsense said:
Add the list of partitions as well, maybe somebody will find it useful for backing up and restoring something else as well.
Click to expand...
Click to collapse
done!
You're a life saver!!!!
Cprager said:
Without Ninthsense and Roothorick this would not be possible, and all credit for this belongs to them!
This is a guide for installing a recovery.img from your SDcard, without the use of your USB port, ODIN, or CWM
This is through the android terminal emulator app, with root permissions. or via ADB over WIFI
**The issue: I cannot transfer data at all through my USB port and was not gonna attempt flashing out of fear of brick!
I was able to extract the recovery.img from the ODIN flashable CWMrecovery 6.0.1.2 package developed by Terinfire but was unable to create a CWM flashable zip because I lack the expertise. (I still have my old CWM touch recovery developed by Aquethys).
After reaching out Ninthsense and Roothorick helped me with the command line to make this possible.
Whats needed:
1) a broke USB (don't attempt this unless its the very last option)
2) the recovery image file for this phone
3) ROOT ACCESS!!!
4) a terminal app or ADB over WIFI
Below is the Partition Table for the Glide(thanks ninthsense):
Starting recovery on Fri Dec 28 19:23:18 2012
framebuffer: fd 4 (480 x 800)
ClockworkMod Recovery v6.0.0.1
recovery filesystem table
=========================
0 /tmp ramdisk (null) (null) 0
1 /boot emmc /dev/block/mmcblk0p9 (null) 0
2 /cache ext4 /dev/block/mmcblk0p3 (null) 0
3 /data ext4 /dev/block/mmcblk0p6 (null) 0
4 /recovery emmc /dev/block/mmcblk0p8 (null) 0
5 /sdcard vfat /dev/block/mmcblk0p4 /dev/block/mmcblk0 0
6 /system ext4 /dev/block/mmcblk0p2 (null) 0
7 /efs ext4 /dev/block/mmcblk0p1 (null) 0
To connect ADB over WIFI (thanks ninthsense):
Connect your phone and laptop to your wifi.
Goto Settings developer options - turn on "ADB over netwrok"
adb connect 192.168.x.x:5555
**if doing this using ADB you must enter a shell and run the su command
adb shell
su
Now do the following:
1) move "recovery.img" to root of SDcard
2) backup current recovery:
(if in terminal and not ADB over WIFI you must enter "su" before continuing)
dd if=/dev/block/mmcblk0p8 of=/sdcard/current-recovery.img​
3) Install new recovery:
dd if=/sdcard/recovery.img of=/dev/block/mmcblk0p8​
Thats it!!!! reboot recovery and enjoy!!!
Click to expand...
Click to collapse
:victory::victory::victory::victory::victory::victory::victory::victory::victory::victory::victory::victory::victory::victory::victory:
I cannot thank you enough for this post! I was trying to locate that partition since the USB doesn't work on the Glide I am repairing, and alas! - you came and saved the day!
Thanks alot, mate!
:good::good::good::good::good::good::good::good::good::good::good::good::good::good::good::good:

Sgs3 cm10.1 ums rooted (ext4 xfat)

Hi all,
since i could not use the UMS mode on my sgs3 and all of the tested Applications do not work i made 2 scrips for gscrip.
First check if all mount points are correct for you, if not correct them. Run mount, check mount point of sdcard (/dev/fuse /storage/sdcard1)
But i think on all sgs3 with cm10.1 it should be the same.
edit:
I get a transfer rate of ~8.5MB/s writing and ~ 18MB/s reading so for copying mp3 to the mobile i will still plug the card to the pc.
!!! AND DON'T FORGET TO UNMOUNT/EJECT YOUR SDCARD BEFORE ums_off !!!
And don't forget you are working as root so you can screw up a lot
[email protected]:/ # mount
...
/dev/block/vold/179:49 /mnt/fuse/sdcard1 ext4 rw,dirsync,nosuid,nodev,noexec,noatime,barrier=1 0 0
/dev/fuse /storage/sdcard1 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
...
Click to expand...
Click to collapse
ums_on
Code:
setprop persist.sys.usb.config mass_storage,adb
umount /storage/sdcard1
echo /dev/block/vold/179:49 > /sys/devices/platform/s3c-usbgadget/gadget/lun0/file
ums_off
Code:
echo "" > /sys/devices/platform/s3c-usbgadget/gadget/lun0/file
setprop persist.sys.usb.config mtp,adb
vold
Hints:
If you are using Linux and your sdcard is ext4 like mine and can't write as a user to the root of the sdcard just add a group to "/etc/group" for me it was (the id you see when you type mount)
Code:
mobile_sd:x:1023:dark-wulf
Check and Disable journal on ext4 sdcard with a card-reader
Code:
root # tune2fs -l /dev/sdXY | grep has_journal
root # tune2fs -O ^has_journal /dev/sdXY
And remove reserved blocks for root
Code:
root # tune2fs -m 0 /dev/sdXY
Thanks to http://forum.xda-developers.com/showpost.php?p=27282116 for bringing me the idea
Greetings
dark-wulf

nexus with broken file system, cannot wipe

Hi everybody,
I'm in deep troubles with my nexus (maguro).
Yesterday, it started to reboot after showing for about 5-10 seconds the lock screen.
the phone is rooted, Iand the last rom (cyanogenmod) was running stable in the last 6 months.
twrp 2.8.0.1 was installed, so I Rebooted to fastboot to flash the 2.8.6.0.
And then the weird part begins:
it's like every partition is read only, but from the mount command it doesn't look like it.
flashing the new recovery is a success, but after reboot the 2.8.0.1 is still there.
factory reset successful, and everything is like before.
wiping sdcard, nothing happens.
if I try to create a backup in twrp, it fails after 20 seconds or so. (I've copied everything to the pc using the pull command in adb).
Try to fix or to change the partitions filesystem in twrp doesn't change anything.
I tried also to change the file system in parted, through the adb shell,this happens:
Code:
~ # ←[6nparted /dev/block/mmcblk0p12 mkfs ext2
parted /dev/block/mmcblk0p12 mkfs ext2
Warning: The existing file system will be destroyed and all data on the
partition will be lost. Do you want to continue?
parted: invalid token: ext2
Yes/No? yes
yes
yes
Partition number? 1
1
1
File system type? [ext2]?
Error: File system was not cleanly unmounted! You should run e2fsck. Modifying
an unclean file system could cause severe corruption.
Ignore/Cancel? i
i
i
Error: File system has an incompatible feature enabled. Compatible features are
has_journal, dir_index, filetype, sparse_super and large_file. Use tune2fs or
debugfs to remove features.
You found a bug in GNU Parted! Here's what you have to do:
Don't panic! The bug has most likely not affected any of your data.
Help us to fix this bug by doing the following:
Check whether the bug has already been fixed by checking
the last version of GNU Parted that you can find at:
...
Please check this version prior to bug reporting.
If this has not been fixed yet or if you don't know how to check,
please visit the GNU Parted website:
...
for further information.
Your report should contain the version of this release (1.8.8.1.179-aef3)
along with the error message below, the output of
parted DEVICE unit co print unit s print
and the following history of commands you entered.
Also include any additional information about your setup you
consider important.
Error: SEGV_MAPERR (Address not mapped to object)
Aborted
and of course nothing changes.
so, I have access to adb in recovery and to fastboot, there is a way to wipe completely the filesystem and start from scratch, or load a different kernel, that would help?
If I send with adb push a new rom to the sdcard, twrp fails and at the next reboot the files disappear.
this is my mount result:
Code:
~ # ←[6nmount
mount
rootfs on / type rootfs (rw)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,seclabel,relatime)
/dev/block/mmcblk0p11 on /cache type ext4 (rw,seclabel,relatime,user_xattr,barri
er=1,data=ordered)
/dev/block/mmcblk0p12 on /data type ext4 (rw,seclabel,relatime,user_xattr,barrie
r=1,data=writeback)
/dev/block/mmcblk0p12 on /sdcard type ext4 (rw,seclabel,relatime,user_xattr,barr
ier=1,data=writeback)
/dev/block/mmcblk0p10 on /system type ext4 (rw,seclabel,relatime,user_xattr,barr
ier=1,data=ordered)
and remounting in rw the partitions has no effect.
Even the parted, e2fsck, etc files disappear from /sbin after each reboot.
thank you
edit:
Having a second nexus, I could take a look at the partitions, and the difference seems to be the data=writeback options.
I'm looking for a procedure to make them "ordered" as the other phone.
edit2:
Code:
/tmp # ←[6ntune2fs -l /dev/block/mmcblk0p12 | grep features
tune2fs -l /dev/block/mmcblk0p12 | grep features
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
Filesystem features: has_journal ext_attr resize_inode filetype needs_recov
ery extent sparse_super large_file
/tmp # ←[6ne2fsck -f /dev/block/mmcblk0p12
e2fsck -f /dev/block/mmcblk0p12
e2fsck 1.42.9 (28-Dec-2013)
/dev/block/mmcblk0p12: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway<y>? y
y
yes
e2fsck: unable to set superblock flags on /dev/block/mmcblk0p12
/dev/block/mmcblk0p12: ********** WARNING: Filesystem still has errors *********
*
/tmp #
/tmp # ←[6ntune2fs -O ^has_journal /dev/block/mmcblk0p12
tune2fs -O ^has_journal /dev/block/mmcblk0p12
tune2fs 1.42.9 (28-Dec-2013)
The needs_recovery flag is set. Please run e2fsck before clearing
the has_journal flag.
Stuck here at the moment, cannot set superblock flags..
edit3:
Tested every possible superblock position, no luck.
I'm starting to think that the internal memory could be dead, but the phone in fastboot and recovery mode works fine.
I forgot to say that I've tried also the fastboot -w command, it works a lot (about 270 seconds) but no effect.

Unbricking my Fonepad7 k00e with a currupted partition.

Here are the facts:
my tablet was throwing errors about google app and google search box crashing. I restarted the tablet and it got stuck at boot loop.
K00E with firmware,UL-K00E-WW-7.6.0.0-user, not rooted.
what I've tried:
factory reset under droidboot:
Code:
E:failed to mount /cache (Invalid argument)
unable to mount /cache! we skip check debricking
SD download of the latest RAW file under under droidboot:
again
Code:
E:failed to mount /cache (Invalid argument)
unable to mount /cache!
Installing the firmware zip file using custom recovery:
I used this to run CWM. I cleared cache, user data, factory reset and then tried to install using external SD zip file.
Code:
failed to mount /dev/block/mmcblk0p8 at /system: Invalid argument
trying to re partition the internal SD:
from here
I tried to run parted to fix it but I am getting this
Code:
~ # parted
parted
/sbin/parted: line 1: syntax error: unexpected word (expecting ")")
~ #
I added no arguments to parted, and still it is giving me this error. I even tried pushing another copy of parted and chmodding it to execute it, still the same thing occurs.
I also tried this
on running th second command I have
Code:
~ # tune2fs -O extents,uninit_bg,dir_index -C 1 /dev/block/mmcblk0p8
tune2fs -O extents,uninit_bg,dir_index -C 1 /dev/block/mmcblk0p8
tune2fs 1.41.11 (14-Mar-2010)
tune2fs: Bad magic number in super-block while trying to open /dev/block/mmcblk0
p8
Couldn't find valid filesystem superblock.
~ #
any ideas how to move forward?

Question I think I messed up my B Slot Partition(s)

I have a Poco F3 Global, and I currently am running TWRP 3.5.2_11-Nebrassy.
If I tap Reboot and it shows my Current Slot as A, then under Mount I see the following:
System, system_ext, Product, Vendor, ODM, Metadata, Data, Cust, and Firmware
And I can check each of them. I can also perform Wipe -> Format Data -> yes.
But if I boot into Slot B, and tap Mount it doesn't let me click the checkmarks for System, system_ext, Product, or Vendor.
And if I try to execute Wipe -> Format Data -> yes it shows "Failed to mount" in red for all of the following:
'/system_root', '/system_ext', '/product', '/vendor' (Invalid argument)
(Some of them are in there multiple times)
Running cat /etc/fstab in B outputs:
Code:
/dev/block/sda18 /metadata ext4 rw 0 0
/dev/block/sda35 /data f2fs rw 0 0
/dev/block/sda29 /cust ext4 rw 0 0
/dev/block/bootdevice/by-name/modem_b /firmware vfat rw 0 0
/dev/block/sda22 /persist ext4 rw 0 0
/usb_otg vfat rw 0 0
Running cat /etc/fstab in A outputs:
Code:
/dev/block/dm-2 /system_root ext4 ro 0 0
/dev/block/dm-3 /system_ext ext4 ro 0 0
/dev/block/dm-1 /product ext4 ro 0 0
/dev/block/dm-4 /vendor ext4 ro 0 0
/dev/block/dm-0 /odm ext4 ro 0 0
/dev/block/sda18 /metadata ext4 rw 0 0
/dev/block/sda35 /data f2fs rw 0 0
/dev/block/sda29 /cust ext4 rw 0 0
/firmware vfat rw 0 0
/dev/block/sda22 /persist ext4 rw 0 0
/usb_otg vfat rw 0 0
For both A and B going to Wipe -> Advanced Wipe it only shows Dalvik / ART Cache, Metadata, Data, Internal Storage, and USB-OTG
I can still install an OS, but that is finicky at times.
How can I fix my B Partition?
Solved it:
Download the MiFlash Tool, and the Fastboot version of the Stock ROM. Extract the contents of the zip (and within the zip the tar file) to a directory without spaces in it (I just extracted it directly to C: drive). Open MiFlash, click Select and choose the directory you just extracted. At the bottom of the MiFlash app select "Clean All", NOT "Clean all and Lock" (unless that's what you want). Click Refresh (if phone doesn't appear, make sure your phone is in fastboot mode and connected to PC). Then click Flash. Mine failed the first time with some error about "Antirollback check error". If you get this you have to manually edit the "flash_all.bat" file within the extracted directory and remove the lines that don't start with "fastboot", then save the bat file, and restart the flash. It took MiFlash 604 seconds to complete, and ended with a status of "error: Not catch checkpoint, ..., flash is not done" you can ignore that, or remove that checkpoint in the MiFlash configuration settings. My phone restarted and booted into the stock ROM.
following had the same errors when i mistakenly ignorantly wiped system etc while trying to flash a rom

Categories

Resources