"Cannot restore System -- mounted read only." even if my storage is read-write - General Questions and Answers

"Cannot restore System -- mounted read only." even if my storage is read-write
I am trying to restore from a previous backup that I made with TWRP recovery, but every time i do it, it fails saying:
"Cannot restore System -- mounted read only"
I have tried multiple storage devices, and even tried internal storage for a while until eventually that started to yield the same error. I decided to use a pendrive connected to an OTG cable, which I verified was not read only through Command Prompt, and my phone would still refuse to restore from backup, reporting the same problem as previously mentioned.
As to why I had to restore from a previous backup in the first place, I was trying to install ResurrectionRemix for my phone and one of the instructions mentioned to perform a full wipe. I took this the wrong way and wiped EVERYTHING in my phone, which includes data, internal storage, and system (although the next step is to wipe system so that doesn't really matter.) I proceeded with the other instructions and I realized shortly that something didn't really work out, so I decided to restore from a backup I made previously, which brings us to this point in time.
I should add that I was able to flash the custom ROM through the very same SD that I tried to use for recovering from the backup that I created.
My phone is a Samsung J5(SM-J500F) which had the latest Android Marshmallow 6.0.1 prior to wiping everything in my phone.
Thank you for taking the time to help me with my problem!
PS: I am using TWRP 3.0.2-0 recovery, which is not the latest build.

Related

[Q] TF101 Installing Custom ROM on Encrypted device

I recently managed to successfully root my TF101.
I installed CWM (Via ROM Manager) and downloaded CM9
I boot into CWM and attempt to do a nandroid...can't find path.
I attempt to just install from SDCard...can't find path
Realization (and research) hits that CWM can't see the external sd, and the system doesn't see it as SDCARD but EXT-.
CWM can't see the internal SDCard because apparently on the Tablet the ICS encryption locks that down (but doesn't on my EVO since the SC Card isn't part of the internal storage)
I attempt to perform a factory data wipe to clear out the encrtyption , but upon reboot CWM loads. I try to perform the boot-launcher data wipe, but then CWM loads.
I try to use CWM to factory reset but since it can see the damned SDCard because of the encryption, no dice.
My machine is not bricked, as I can still boot into the previous install but I can't seem unable to format the thing to install CM9.
What to do, and thanks.
It has been said multiple times before DO NOT USE ROM MANAGER.
Either use Thing O Doom's peri to install a different CWM or Gnufabio's Recovery installer or NVFlash a rom to completely wipe. And don't use encryption there is no point 99% of the time
I didn't check here first, which is obviously what was my first mistake.
Will any of those recoveries be able to access and format the SD Card area?
Also, I use encryption as I do have sensitive things on my machine that I don't want exposed in case the machine is stolen. First time I've ever had it give me a problem, as the phone encrypts differently.
Team roug's recovery has internal and external sd support and i think the encryption is an ics/tegra 2 bug more than anything
Ok, so I managed to get the new recovery on via Thing O Doom's peri. And I was able to install Revolver via the ext card...but upon boot I was prompted for my encryption pin and got the message that android was updating...My Build number is now Revolver but everything is the same as it was. I still can't factory wipe this damned thing.
Upon request to wipe, it boots back to recovery and says formatting data and cache, data wipe failed.
Tis site states http ://0xfeedface.org/blog/lattera/2012-06-04/installing-cm9-encrypted- android-tablet
The dilemma
When you encrypt your Android device, the /data partition is what gets encrypted. The partition in full is encrypted and cannot be mounted within CWM. CWM also cannot perform a wipe, since it cannot mount the /data partition. And CWM cannot mount the external SD card. This is our dilemma. No access to the internal SD. No access to the external SD. No way to perform a wipe and format the internal SD from CWM.
The Solution
What we need to do, then, is use adb while the tablet is in recovery mode to reformat the internal SD card, thereby removing the encryption. On the US Transformer Prime, the internal SD card is at /dev/block/mmcblk0p8. The partition for our spare SD card will be at /dev/block/mmcblk1p1. You will need to replace those device entries for any other device you might attempt this on. After formatting the internal SD card, we will mount it and then mount the external SD card at /data/media:
In CWM, wipe cache
adb shell
mke2fs -t ext4 /dev/block/mmcblk0p8 # Warning: This can take a while. Be patient.
mount /data
mount /dev/block/mmcblk1p1 /data/media
Now go back to CWM on your device, then go ahead and flash your CM9 and gapps zips like normal. You now have CM9 installed! The /data partition is not encrypted. If you do not need to flash any other ROMs (unlikely if you're reading this article), feel free to re-encrypt your device.
Click to expand...
Click to collapse
I don't know the block numbers for the TF01
you need to undo the encryption before you can wipe anything
You can't. Hence my problem. I cannot mount,delete, or format the SDCard. It sounds like the process in the above post is the solution, but I don't know how to find out what block numbers the tf101 uses.
If you don't mine losing your data NVflashing a rom will resolve all the problems
Yep nvflash will do the trick otherwise as the solution you found yourself explains
Use adb in recovery ( in other words hook it up on a pc ) for this you will need android sdk runnin on your pc
More info about adb u can find here
http://forum.xda-developers.com/showthread.php?t=1751439&highlight=adb+help
Good luck
Thanks to all, I have resolved my issue!
I had to download the stock rom, extract the blob, and use Wheelie for PC to NVFlash everthing abck to stock. I was then able to update over OTA, and use the excellent Thing O Doom's peri to re-root and flash the working recovery.
There should be several items in the Root FAQ up top, such as:
If you are encrypted and going to root, factory reset to get rid of the encryption FIRST since the encryption locks down the SDCARD partition (Unlike on the phone)and none of the recoveries can access it to mount. DON"T use ROM manage on the TF101 and always, always check XDA first.
:good:
darthrater said:
Thanks to all, I have resolved my issue!
I had to download the stock rom, extract the blob, and use Wheelie for PC to NVFlash everthing abck to stock. I was then able to update over OTA, and use the excellent Thing O Doom's peri to re-root and flash the working recovery.
There should be several items in the Root FAQ up top, such as:
If you are encrypted and going to root, factory reset to get rid of the encryption FIRST since the encryption locks down the SDCARD partition (Unlike on the phone)and none of the recoveries can access it to mount. DON"T use ROM manage on the TF101 and always, always check XDA first.
:good:
Click to expand...
Click to collapse
That FAQ is sadly pretty outdated, I wish I could liberate the OP
Glad all is working now though.

[Q] Corrupted internal storage

ill keep this simple. tried to advanced wipe data and cache with TWRP which returned an E:/ unable to mount for both data and cache. internal storage is now saying its 0MB after i "fastboot erase" on as many of the partitions it would return success with (ie, what was mounted) flashall is asking me for a specific device.
How do i reset the internal partitions so they become mountable again? i believe in erasing the ones i had, it has deleted them altogether and i need to flash original firmware to get it to auto restructure (im guessing)
EDIT: so i downloaded this (link not allowed) i just dont know how to implement it through adb or fastboot
somewhere i read that the latest moto PQ versions for CWM and TWRP both have some selinux problem when wiping data, causing a force unmount (parroting. i DONT know what im talking about)
the first time i installed with CM11 with twrp (after CMW only allowing me to install 10.2) it worked great, except google play and whisperpush(whatever that is) crashing consistently. i should have used 'fix permissions' instead of going for a wipe+re-install
please help, what commands do i need to use through fastboot to restore the partitions, or where can i get the fxz file to use with RSD?
this is a brand new out of the box Sim-modded and pre-rooted PQ
SOLVED (i think)
god im so ****ing stupid.
due to corrupting the file structure and not being able to mount the cache or data partitions, when i installed CM11 snapshot it picked my external SD as the data storage /android/data/
FIX: unmounting and removing the external SD i rebooted to system, booted back to recovery. -> factory reset.... auto reboot, cant mount messages, then a second time it said SELinux supported message. ->factory reset again and finally no red messages, wipe to system (got an error, but probably cause system = external SD). i then inserted the external SD, installed the ROM and everything looks normal and working right
TWRP will restore file structure with 'factory reset' BUT ONLY IF you remove your external sd
i hope this thread saves time and headaches for someone.

Error Mounting XT1032

So, I wanted to install a custom ROM, but somewhere along the way something went wrong and I got stuck in a bootloop, I've been reading up on some threads and I followed some steps that were supposed to fix it, but I feel like I'm in even more trouble now (Well, my phone is still alive so I still have hope but yeah..)
Anyways, I'm using Philz custom recovery now, I tried to do a wipe to install a new or stock ROM, at first it said the wipe was succesful, so I tried installing the ROM, but during the install I kept getting:
E: Error mounting /data
It did say the installation was succesful, but after I rebooted it kept trying to wipe eventhough I did not ask for this.
Got another mount error and said Wipe Failed.
Now when I try to sideload stock ROM I get errors like:
Formatting Cache
Formatting /sd-exxt
E: Uknown volume for path /sd-ex
(I also don't know why it's doing that since this phone has no SD card) I got the Falcon edition with the internal storage. Also when my computer recognizes my phone and I want to open the phone folder, there is no longer an Internal Storage folder.
Anyways after those errors it says Data Wipe Complete, Wiping System, Now flash new ROM
But nothing flashes properly it seems due to the mounting error. I've looked for solution, but I can only seem to find threads that involve Samsung
and when I find a solution video it has something to do with either taking your battery out of your phone (which you can't do with this phone) or something
with your SD card (which this phone doesn't have).
So yeah, I'm running out of ideas here and any help would be greatly appreciated!
Cheers.
runittwiice said:
So, I wanted to install a custom ROM, but somewhere along the way something went wrong and I got stuck in a bootloop, I've been reading up on some threads and I followed some steps that were supposed to fix it, but I feel like I'm in even more trouble now (Well, my phone is still alive so I still have hope but yeah..)
Anyways, I'm using Philz custom recovery now, I tried to do a wipe to install a new or stock ROM, at first it said the wipe was succesful, so I tried installing the ROM, but during the install I kept getting:
E: Error mounting /data
It did say the installation was succesful, but after I rebooted it kept trying to wipe eventhough I did not ask for this.
Got another mount error and said Wipe Failed.
Now when I try to sideload stock ROM I get errors like:
Formatting Cache
Formatting /sd-exxt
E: Uknown volume for path /sd-ex
(I also don't know why it's doing that since this phone has no SD card) I got the Falcon edition with the internal storage. Also when my computer recognizes my phone and I want to open the phone folder, there is no longer an Internal Storage folder.
Anyways after those errors it says Data Wipe Complete, Wiping System, Now flash new ROM
But nothing flashes properly it seems due to the mounting error. I've looked for solution, but I can only seem to find threads that involve Samsung
and when I find a solution video it has something to do with either taking your battery out of your phone (which you can't do with this phone) or something
with your SD card (which this phone doesn't have).
So yeah, I'm running out of ideas here and any help would be greatly appreciated!
Cheers.
Click to expand...
Click to collapse
The phone has a virtual SD card.
I had a similar issue. Try flashing TWRP recovery and go to wipe > format data (THIS WILL DELETE ALL DATA) then reboot recovery. Worth a shot if you're not able to use your phone. You can copy over SD card contents to a computer first via TWRP by mounting MTP, or use USB OTG..

[Q] bad scenario

Hello, i am quite panicked about this problem so i will cut to the chase.:crying: I will write down stuff i did in numerical orders.
1. Using TWRP 2.8.6.1, I was curious to try to go to Wipe>Advanced>full wipe (wiping everything). After i did and tried to reboot, it said there is no OS. So i tried flashing my flashable stock rom 4.4.4 in zip form but it didn't boot.
2. So i flashed to stock in fastboot. (For flashing to stock, i used this instructions http://androidforums.com/threads/guide-how-to-flash-a-nexus-factory-image-manually.706533/). After finish flashing, i went to stock recovery and wiped dalvik cache and data.
3. After that, i rebooted and... that when it didn't seem right. Nexus 5 COULD connect to my PC but it only showed "Internal Storage" and nothing else. If i tried to move something to the storage, it would immediately say i can't move it there.
4. So i thought this was because the full wipe i did before and that the system partition got totally wiped. So i used TWRP again but to restore my old nandroid backup.
5. After i flashed my nandroid backup, twrp said this one line that goes in red "unable to mount /firmware. I ignored and rebooted. It still had the problem where i couldn't move anything to my storage by MTP but also adb push. It even couldn't save screenshots and download anything from internet like apk or some sort. When i went into the app called "Zipper", it said 'no sdcard'.
6. I searched through the internet to fix this but i kept failing to solve it. I tried going to TWRP and doing chmod, chmod 755, using these instructions (http://forum.xda-developers.com/google-nexus-5/general/sdcard-problems-upgrading-android-t2938749)
TL;DR : I did a full wipe in TWRP and lost all permissions to read or write. Nandroid backup didn't help. Whatever i flash in twrp, it says "unable to mount /firmware" at the end.
metallikoh said:
Hello, i am quite panicked about this problem so i will cut to the chase.:crying: I will write down stuff i did in numerical orders.
1. Using TWRP 2.8.6.1, I was curious to try to go to Wipe>Advanced>full wipe (wiping everything). After i did and tried to reboot, it said there is no OS. So i tried flashing my flashable stock rom 4.4.4 in zip form but it didn't boot.
2. So i flashed to stock in fastboot. (For flashing to stock, i used this instructions http://androidforums.com/threads/guide-how-to-flash-a-nexus-factory-image-manually.706533/). After finish flashing, i went to stock recovery and wiped dalvik cache and data.
3. After that, i rebooted and... that when it didn't seem right. Nexus 5 COULD connect to my PC but it only showed "Internal Storage" and nothing else. If i tried to move something to the storage, it would immediately say i can't move it there.
4. So i thought this was because the full wipe i did before and that the system partition got totally wiped. So i used TWRP again but to restore my old nandroid backup.
5. After i flashed my nandroid backup, twrp said this one line that goes in red "unable to mount /firmware. I ignored and rebooted. It still had the problem where i couldn't move anything to my storage by MTP but also adb push. It even couldn't save screenshots and download anything from internet like apk or some sort. When i went into the app called "Zipper", it said 'no sdcard'.
6. I searched through the internet to fix this but i kept failing to solve it. I tried going to TWRP and doing chmod, chmod 755, using these instructions (http://forum.xda-developers.com/google-nexus-5/general/sdcard-problems-upgrading-android-t2938749)
TL;DR : I did a full wipe in TWRP and lost all permissions to read or write. Nandroid backup didn't help. Whatever i flash in twrp, it says "unable to mount /firmware" at the end.
Click to expand...
Click to collapse
EDIT: alright i did a mess up. When i flashed the stock, i didn't rename the radio from radio-hammerhead-m8974a-2.0.50.1.16 to radio.img.

not booting after encryption attempt - stuck on cyanogen logo -- phone now restored

I have a phone that was rooted with the original rom (CyanogenOS but not cyanogenmod I think?) and had TWRP 2.8.5.1 installed. I initiated the encryption process and let it run. I returned to it after a couple of hours and found it displaying the cyanogen logo. I waited another 30 minutes before deciding it was stuck. I tried restarting the phone but it would get stuck on the cyanogen logo.
I then booted to recovery and was prompted for the decryption code, but the correct code was rejected. After researching here I concluded that the TWRP version was part of the problem so I flashed version 3.2.1-0
I was then able to boot to TWRP and decrypt the data partition and browse files. Unfortunately it still gets stuck at the cyanogen logo.
I also tried wiping the cache, and wiping and replacing the persist.img.
I'm not very experienced or skilled with these issues. I'm looking for a way to restore the phone to how it was before my encryption attempt; for now I'm abandoning the idea of encrypting the phone.
If it isn't in bad taste or obnoxious to ask this here, I'm willing to pay for help.
edit-0:
I was thinking of using TWRP to backup the decrypted data partition, wiping the encrypted version, then restoring the decrypted version.
It seems like this should restore the pre-encryption state, but am I missing something? Any downside to trying this?
edit-1: a follow-up
I was able to restore the phone by the method proposed above in edit-0
I made a backup with TWRP using a method similar to what's discussed in these threads:
https://forum.xda-developers.com/general/general/twrp-backup-including-internal-storage-t3660479
https://forum.xda-developers.com/android/general/tutorial-create-internal-storage-backup-t3389172
I followed roughly these steps:
1) temporarily rename the "media" folder to "mediabak" from the TWRP file manager
2) confirm size of the "data" partition has increased to expected value after renaming
3) plug in USB drive and mount
4) backup data partition to USB drive
5) make a backup copy of the USB drive to PC
5) wipe the data partition
6) restore the data partition using the backup on the usb drive
7) reboot to TWRP recovery (not a necessary step as far as I can tell)
8) note that at this point apparently TWRP automatically re-creates the "media" directory
9) delete the TWRP-generated "media" directory and rename the "mediabak" to "media"
10) reboot to TWRP recovery and browse restored files to see if things look right
11) reboot phone
Rebooting phone took longer than normal, as I think one would expect.
After lingering for a while the "cyanogen" logo animation disappeared and the message about android updating apps appeared
Phone seems to be working normally.
In retrospect my only exposure to actual data loss the database of Signal app messages. It seems like everything else I could have extracted from file based backups and also directly from the phone after I upgraded to TWRP 3.2.1-0

Categories

Resources