[LB]C5502_[LP 5.1.1] TWRP Cannot mount system as rw - Sony Xperia ZR

I just got locked out of my phone while trying out lockscreen apps, and then when I tried to restore using TWRP, I got the message - unable to mount system as rw. Earlier, while taking a backup, mounting as read only was solving this problem, but obviously read only would not work in restore operation. I used PRF Creator to create a pre-rooted firmware. I used NUT's latest dual recovery, BETA-SuperSu 2.49 zip and the Indian LP 5.1.1 FTF that I downloaded using XperiFirm. I threw in the Xposed Framework as an added zip as well. Is this a common problem with TWRP or was I facing something specific? Is there a way to mount system as rw from within TWRP using the command shell?
[Update]: TWRP system mount as rw is working in LP 5.0.2. Only in 5.1.1 the problem persists. Any Backup-Restore operation now needs to go through LP 5.0.2 fresh install, root, install recovery and then restore.

There is a option to mount /system and unmount /system inside recovery.
If you are using a zip file which is the be flashed, check it's updater-script. From there you could further investigate.

You will see when you seaarch on @Nut s original twrp subject. You should find new twrp beta .22 there. http://nut.xperia-files.com/?ql=0849e100ec98cef32653090c81c9c97cf56fddb5

falptekin said:
You will see when you seaarch on @Nut s original twrp subject. You should find new twrp beta .22 there. http://nut.xperia-files.com/?ql=0849e100ec98cef32653090c81c9c97cf56fddb5
Click to expand...
Click to collapse
download the latest version it works great and can mount the system
it was a bug i think and it was fixed

Related

Unable to mount 'data,storage,system'

How do i fix this, i dont know what is wrong. CM12 wont flash, even though it is on te device.
Mention your current recovery (PhilZ/ TWRP) and version.
sharkymyn said:
Mention your current recovery (PhilZ/ TWRP) and version.
Click to expand...
Click to collapse
It is TWRP recovery v. 2.8.5
sharkymyn said:
Mention your current recovery (PhilZ/ TWRP) and version.
Click to expand...
Click to collapse
Thanks for the reply, but i fixed it, I just formatted the data again, then copied cm12 onto the phone, flashed it, then it booted up!
unable to mount system after deleting os accidentally
pliz help
Even I am having the same problem. When I flash it says " E unable to mount "/system" I gather from googling that it is malformed partition issue. But I am not able to find fixes for it. Please help
I think the problem was with the Cm 12.1 zip. I installed another rom.zip file (Blisspop rom) and it is working fine now.

Forein moun root

Hi,
I'm trying to root a recent Mediatek arm64 Lollipop ROM and get that not having a patched recovery is a real problem
But I Have a Factory ROM, with scatter file. So I can readback/reflash /system with flashtools.
This make me think I can root the ROM using a shell script after mount /system on a Linux (Ubuntu) PC replicating, at last, part of what SuperSU install script do.
I'll glad to read others ideas about that and what maybe the install method:
- Do a preroot work, reflash and install supersu from Google Play
- Do a full root work installing supersu in /system/app and let SuperSU autocheck finish it at first boot after reflash.
Thanks in advance,
--
Josemi

Needed: stock "install-recovery.sh"

can someone please upload the stock "install-recovery.sh"?
It's located in /system/etc.
I forgot to backup it, while rooting the device.
I need it for the OTA updates.
thanks
@vel_tins
Do not flash the ota if you are rooted, you might get bootloop. Full unroot your device before attempting to update. Anyhow, the ota will most likely fail since you already modified your system partition. Your best option is to unroot your device and capture the ota link, modify the ota updater-script and remove the lines that are showing "unexpected contents" errors. The original "install-recovery.sh" is still there, supersu renamed it to something like "/system/etc/install-recovery_original.sh". Keep in mind, you might loose your custom recovery if you renamed it back to "install-recovery.sh".
Well, OTA was a pain in the a**.
Because I had no stock "install-recovery.sh", I've edited the updater-script and removed all the matching entries.
Executed a full un-root.
Tried to flash the modified update.zip via TWRP, but failed because TWRP couldn't mount partitions with this name scheme:
Code:
"/dev/block/platform/[B]7824900.sdhci/by-name/system[/B]", "/system",
(will investigate later, any ideas?)
Because too lazy to modify the updater-script again,
I've booted into fastboot and loaded my "modded" stock recovery, which accepts also self-signed .zips.
Flashing worked well, but on reboot, I got a nice bootloop because of the formerly installed Xposed framework.
Had to restore from a Nandroid Backup and after reboot, I removed Xposed completely.
Eventually, I was able to flash the OTA and got back a working device...
Gosh...
^^
??
vel_tins said:
Well, OTA was a pain in the a**.
Because I had no stock "install-recovery.sh", I've edited the updater-script and removed all the matching entries.
Executed a full un-root.
Tried to flash the modified update.zip via TWRP, but failed because TWRP couldn't mount partitions with this name scheme:
Code:
"/dev/block/platform/[B]7824900.sdhci/by-name/system[/B]", "/system",
(will investigate later, any ideas?)
Because too lazy to modify the updater-script again,
I've booted into fastboot and loaded my "modded" stock recovery, which accepts also self-signed .zips.
Flashing worked well, but on reboot, I got a nice bootloop because of the formerly installed Xposed framework.
Had to restore from a Nandroid Backup and after reboot, I removed Xposed completely.
Eventually, I was able to flash the OTA and got back a working device...
Gosh...
Click to expand...
Click to collapse
If you still have the original OTA zip, can you please post it for future reference?
As for TWRP mounting /dev/block/platform/7824900.sdhci/by-name/system, what error message did you get? Try running "ls -l /dev/block/platform/7824900.sdhci/by-name/" in both normal Android and TWRP, then compare the results.
pawitp said:
If you still have the original OTA zip, can you please post it for future reference?
Click to expand...
Click to collapse
No problem
pawitp said:
As for TWRP mounting /dev/block/platform/7824900.sdhci/by-name/system, what error message did you get? Try running "ls -l /dev/block/platform/7824900.sdhci/by-name/" in both normal Android and TWRP, then compare the results.
Click to expand...
Click to collapse
Stock and Cyanogen recovery are working with this partition naming scheme.
But in TWRP, I get the following error message:
Code:
ls: /dev/block/platform/7824900.sdhci/by-name: No such file or directory
For TWRP I have to use the following syntax in recovery.fstab:
Code:
/cache ext4 /dev/block/mmcblk0p29
/system ext4 /dev/block/mmcblk0p25
/data ext4 /dev/block/mmcblk0p31 length=-16384
.........etc.
vel_tins said:
No problem
Stock and Cyanogen recovery are working with this partition naming scheme.
But in TWRP, I get the following error message:
Code:
ls: /dev/block/platform/7824900.sdhci/by-name: No such file or directory
For TWRP I have to use the following syntax in recovery.fstab:
Code:
/cache ext4 /dev/block/mmcblk0p29
/system ext4 /dev/block/mmcblk0p25
/data ext4 /dev/block/mmcblk0p31 length=-16384
.........etc.
Click to expand...
Click to collapse
On TWRP, try running "find /dev/block/platform" and see if anything is created there.
The directory should have been populated by init. See https://android.googlesource.com/pl...0ab94b7d5a888f0b6920b156e5c6a075fa0741a^!/#F0.
That code should also be in TWRP, but something might have prevented it from working properly on this device. You might find some clues in dmesg or TWRP's logs.
Well, eventually I've got it.
In TWRP, the naming is a little bit different from stock or Cyanogen recovery.
I had to change:
Code:
/dev/block/platform/[COLOR="Red"]7824900.sdhci[/COLOR]/by-name/cache <--- STOCK
to
/dev/block/platform/[COLOR="Blue"]soc.0[/COLOR]/by-name/cache <--- TWRP
However, the "/dev/block/mmcblk0p" naming worked also in TWRP, so this was only a minor issue.
vel_tins said:
Well, eventually I've got it.
In TWRP, the naming is a little bit different from stock or Cyanogen recovery.
I had to change:
Code:
/dev/block/platform/[COLOR="Red"]7824900.sdhci[/COLOR]/by-name/cache <--- STOCK
to
/dev/block/platform/[COLOR="Blue"]soc.0[/COLOR]/by-name/cache <--- TWRP
However, the "/dev/block/mmcblk0p" naming worked also in TWRP, so this was only a minor issue.
Click to expand...
Click to collapse
IMO, you should fix TWRP so that it has the same naming convention. Otherwise OTA packages using the "stock" naming convention can't be flashed on TWRP.
Personally, I prefer the "by-name" mapping rather than the "/dev/block/mmcblk0p" because it is harder to make mistakes if you use a name. With numbers, if a wrong number is typed, then you might end up flashing the wrong partition and bricking the device.
EDIT: It might have something to do with the "system/core" repository you've used to build your recovery. Which Android tree did you use to build Cyanogen Recovery and which one did you use to build TWRP?
vel_tins said:
Well, OTA was a pain in the a**.
Because I had no stock "install-recovery.sh", I've edited the updater-script and removed all the matching entries.
Executed a full un-root.
Tried to flash the modified update.zip via TWRP, but failed because TWRP couldn't mount partitions with this name scheme:
Code:
"/dev/block/platform/[B]7824900.sdhci/by-name/system[/B]", "/system",
(will investigate later, any ideas?)
Because too lazy to modify the updater-script again,
I've booted into fastboot and loaded my "modded" stock recovery, which accepts also self-signed .zips.
Flashing worked well, but on reboot, I got a nice bootloop because of the formerly installed Xposed framework.
Had to restore from a Nandroid Backup and after reboot, I removed Xposed completely.
Eventually, I was able to flash the OTA and got back a working device...
Gosh...
Click to expand...
Click to collapse
Hi sir ,
Please share to us , how you do this , because I have status 7. Install-recovery.sh problem
I have stock recovery , and I'm only make a root for my device by kingroot .
Please share update.zip file and tel me how to make ota update
pawitp said:
IMO, you should fix TWRP so that it has the same naming convention. Otherwise OTA packages using the "stock" naming convention can't be flashed on TWRP.
Click to expand...
Click to collapse
Exactly this is the point...
pawitp said:
EDIT: It might have something to do with the "system/core" repository you've used to build your recovery. Which Android tree did you use to build Cyanogen Recovery and which one did you use to build TWRP?
Click to expand...
Click to collapse
I have to correct myself, Cyanogen has exactly the same problem.
I've used the latest CM 12.1 and Omnirom source trees to build TWRP, but with the same result.
TWRP/Cyanogen only detects "soc.0" instead of "7824900.sdhci" and that will break compatibility with OTA packages (Until you patch "updater-script").
So how you made this ota update after all ?
theeteempire said:
So how you made this ota update after all ?
Click to expand...
Click to collapse
OTA doesn't work with rooted devices.
Do a full un-root and try again.
vel_tins said:
OTA doesn't work with rooted devices.
Do a full un-root and try again.
Click to expand...
Click to collapse
I did it , full unroot , I couldn't update even that with full-unroot , I used kingroot for root ,
Also error status 7 , install-recovery. Sh shown on the update after full-unroot my device !!!
can you help me please !!!!!
theeteempire said:
....I used kingroot for root ,
Also error status 7 , install-recovery. Sh shown on the update after full-unroot my device...
Click to expand...
Click to collapse
I would strongly suggest, to open an new thread, because I guess a lot more people will or had run into these issues.
I don't know what Kingsoft (never used it) has modified/replaced, so in your case I would search for a stock "install-recovery.sh" and replace the modified.
Everything else would be too complicated. (You have read my post on the first page).
vel_tins said:
I would strongly suggest, to open an new thread, because I guess a lot more people will or had run into these issues.
I don't know what Kingsoft (never used it) has modified/replaced, so in your case I would search for a stock "install-recovery.sh" and replace the modified.
Everything else would be too complicated. (You have read my post on the first page).
Click to expand...
Click to collapse
So I need the stock install-recovery. Sh ,.
Are you have it ?
vel_tins said:
Exactly this is the point...
I have to correct myself, Cyanogen has exactly the same problem.
I've used the latest CM 12.1 and Omnirom source trees to build TWRP, but with the same result.
TWRP/Cyanogen only detects "soc.0" instead of "7824900.sdhci" and that will break compatibility with OTA packages (Until you patch "updater-script").
Click to expand...
Click to collapse
This is just a guess. Try adding "TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/" to BoardConfig.mk.
If you know C, you might want to try mucking around in system/core/init/devices.c and see why it's behaving that way.
pawitp said:
This is just a guess. Try adding "TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/" to BoardConfig.mk.
.....
Click to expand...
Click to collapse
Seems to work, thanks!
PS: A google search for "TARGET_PLATFORM_DEVICE_BASE" threw only six results, so it doesn't seem to be a very popular flag.
vel_tins said:
Seems to work, thanks!
PS: A google search for "TARGET_PLATFORM_DEVICE_BASE" threw only six results, so it doesn't seem to be a very popular flag.
Click to expand...
Click to collapse
From my experience, you can't rely too much on Google for ROM development. I've found the flag by reading the source file I've previously mentioned.
Sent from my Nexus 4 using XDA Free mobile app

Recovery missing and unable to update SuperSU after flashing new ROM

Hi all,
I rooted my Z3C following the instructions here.
Yesterday I decided to update my phone as I wanted to get rid of the OTA notification.
So I have downloaded a pre-rooted rom from this post (23.4.A.1.264) and installed via TWRP.
But after updating I found some issues
Recovery is missing
BusyBox is not installed
Can't update SuperSU, even in "normal" mode
Can't mount /system as rw
I'm still getting the OTA notification (to update to the same version I have)
Apart from that the phone seems to be still rooted.
How can I fix that? I tried installing BusyBox with various tools but as I can't remount /system nothing works.
Tried installing TWRP wit the manager but doesn't work either.
Running su mount -o remount,rw /system gives me "bad command".
Tried running dualrecovery installation again as per the original rooting method but doesn't seems to work: the phone reboots but there is no recovery.
I made a backup with TWRP before updating but can't use it without TWRP (or can I)?
Looks like I managed to restore it.
Using the official adb (from Android SDK) I couldn't get rw on /system. I used the version included in DualRecovery and that worked.
After getting rw on /system I was also able to install busyBox.
I've then downloaded the latest version of DualRecovery and with that I was able to install the recovery.
The only problem left is that the OTA notification keeps coming up.
You can disable the automatic search for updates. Go to about phone, press the three dots in the upper right corner and open settings. Disable the option for automatic updates.

SuperSU making /system read-only in TWRP and FlashFire?

Hi,
I'm running CyanogenMod13 on my galaxy S4 with TWRP 3.1.1.0 and I wanted to flash XPosed. The xposed page says that it's only compatible with SuperSU so I installed latest Stable SuperSU 2.82 and deactivated root access on CM13 in developer options. Then I tried flashing Xposed framework zip but it complained about /system beeing a read-only file system and I realized that TWRP didn't ask me anymore if I want read-only file system (which it always did before I installed SuperSU) anymore. Looking into "Mount" I see that "system" is not mounted by default but also making a checkbox there doesn't change anything even if "Mount system read-only" is not checked. BTW: Do I have to apply the mounts somehow or is activating the "checkbox" actually enough. Maybe my problem is just that system is not mounted r/w which is my current guess but I don't know how to mount it r/w now that SuperSU is installed.
Then I though, ok if mounts are incorrect in TWRP let's use FlashFire. So I selected to mount system r/w in option for flashing and started the flash. Again even if I selected mount system partition r/w flashfire reported read-only file system. I also tried downgrading to SuperSU 2.79 but same effect.
What the hell is going on since I flashed SuperSU. Is my root now partially broken? The Apps all are working fine, it's just modifying system partition is somehow not possible neither in TWRP nor FlashFire....
Any help or insight will be greatly appreciated.
marcelser said:
Hi,
I'm running CyanogenMod13 on my galaxy S4 with TWRP 3.1.1.0 and I wanted to flash XPosed. The xposed page says that it's only compatible with SuperSU so I installed latest Stable SuperSU 2.82 and deactivated root access on CM13 in developer options. Then I tried flashing Xposed framework zip but it complained about /system beeing a read-only file system and I realized that TWRP didn't ask me anymore if I want read-only file system (which it always did before I installed SuperSU) anymore. Looking into "Mount" I see that "system" is not mounted by default but also making a checkbox there doesn't change anything even if "Mount system read-only" is not checked. BTW: Do I have to apply the mounts somehow or is activating the "checkbox" actually enough. Maybe my problem is just that system is not mounted r/w which is my current guess but I don't know how to mount it r/w now that SuperSU is installed.
Then I though, ok if mounts are incorrect in TWRP let's use FlashFire. So I selected to mount system r/w in option for flashing and started the flash. Again even if I selected mount system partition r/w flashfire reported read-only file system. I also tried downgrading to SuperSU 2.79 but same effect.
What the hell is going on since I flashed SuperSU. Is my root now partially broken? The Apps all are working fine, it's just modifying system partition is somehow not possible neither in TWRP nor FlashFire....
Any help or insight will be greatly appreciated.
Click to expand...
Click to collapse
Try my SuperSU systemmode from here.
Thanks for the link and it also gave me hint what to google for. It seems that my SuperSU is running in systemless mode, so I would need Systemless Xposed too. Unfortunately this also requires Magisk to be installed and Magisk doesn't work with adoptable storage which I can not live without. So I will give your SuperSU version a try and run it in System Mode and try to install official xposed too. Hopefully this works.
Edit:
I had a hard-time switching from systemless mode to system mode cause you have to completely unroot and restore the patched boot image fully (just un-rooting and restoring doesn't do the trick) fortunately I had a nandroid backup from prior to rooting with untouched backups of "boot" and "system" which I could restore. Finally I was able to install the system mode SuperSU (although I didn't use your package, but created a .supersu file with SYSTEMLESS=false) and flashed it.
This now enabled me to run latest Xposed in system mode which was failing when trying to flash in systemless mode. I would have needed magisk (which is incompatible with adoptable storage) to run it systemless. I tried using the old 86.2 systemless xposed but that always resulted in a boot loop whenever I activated one of the xposed modules). Now it's working fine., Thanks for the hint ho led me find out what system mode and systemless really is.
So actually my problem is solved, just couldn't find out how to edit the thread title....

Categories

Resources