Hi all,
I had been using CyanogenMod 13.x on my Nexus 5x and was interested in trying out Copperhead OS 14.x. Before I embarked on this journey, I did a backup using my usual method:
1. Reboot into TWRP
2. Use
Code:
adb pull /dev/block/mmcblk0 backup.img
to copy the disk to my hard drive
I proceeded to install Copperhead OS from its factory image files. I decided it wasn't for me, and I attempted the following to restore my backup:
1. Reboot into TWRP
2. Use
Code:
adb push backup.img /dev/black/mmcblk0
This brought me to the "enter your passcode to decrypt the disk" prompt. I entered my passcode, and it failed with the following message:
The password you entered is correct, but unfortunately your data is corrupt
Click to expand...
Click to collapse
So I assumed that something went wrong with the backup, and I decided to use the same restoration method using a different, known-good backup.img file. I know that this older backup.img file is good because I used it 100% successfully just 3 weeks ago. Unfortunately, this backup is also now failing with the same message.
The thing I don't understand is what could have changed that is now preventing my older backup from working on the same phone? My understanding of /dev/block/mmcblk0 is that writing to it should have cleared anything that may have changed while I had Copperhead OS installed.
Any advice would be most helpful. Thanks in advance!
Related
Hi
I'm getting this error when I try to restore:
Code:
Error : run 'nandroid-mobile.sh restore' via adb!
So I tried to restore it through adb.
But then I get this error message:
Code:
"error: unable to mount /system, aborting
/sdcard/nandroid/SH0CJPL05354/BCDAS-20110610-1442"
The thing is it worked the first time I tried it but it won't work anymore and since I've wiped, I can't boot up at all. I can only access Recovery and the Bootloader
I always wipe before restoring and for what it's worth, I had to restore in the first place because I flashed the Bravo Sense hboot.
I'm AmonRa 2.0.1
Alpharev S-Off
Seems like /system is not mounted? Try
Code:
adb remount
then have another go?
stringer7 said:
Seems like /system is not mounted? Try
Code:
adb remount
then have another go?
Click to expand...
Click to collapse
Is that right after I load the adb shell?
If so I'm getting this when I do adb remount:
Code:
/sbin/sh: adb: not found
I think I'm doing it wrong.
Ok, try to get your PC to recognise your device using
Code:
adb devices
There is s good guide on installation and use here:
http://forum.xda-developers.com/showthread.php?t=879701
stringer7 said:
Ok, try to get your PC to recognise your device using
Code:
adb devices
There is s good guide on installation and use here:
http://forum.xda-developers.com/showthread.php?t=879701
Click to expand...
Click to collapse
The phone is listed under adb devices and I have successfully located the nandroid on my sdcard using adb, it's just the restore fails as above. (Interestingly, it lists the phone under adb devices when I'm in Recovery but it won't do so when I'm in the bootloader screen.)
Anyway, this is what I'm getting with adb remount:
Code:
C:\>adb remount
remount failed: invalid argument
What would suggest from here?
Thanks for helping out, btw. It's very very much appreciated
Ok so you currently have s-off, RA recovery, access to bootloader and recovery, but no working rom and a nandroid backup that won't restore - that right?
stringer7 said:
Ok so you currently have s-off, RA recovery, access to bootloader and recovery, but no working rom and a nandroid backup that won't restore - that right?
Click to expand...
Click to collapse
If it was me I would wipe everything (I know you did already but just to be sure) download fresh version of the rom to your sd via PC, insert in phone and flash it through recovery. That gets you a functioning phone at least!
Then work on the restore issue. The backup was made with the same version of RA that you are currently using I assume? I'm not sure where to go with it really, and hope someone with more knowledge will pitch in...!
Something like that has already happened to me twice. First, I was running low on sd space. Second, my recovery was corrupted somewhat: fixed by reflashing the same recovery. Hope this helps you in troubleshooting.
stringer7 said:
If it was me I would wipe everything (I know you did already but just to be sure) download fresh version of the rom to your sd via PC, insert in phone and flash it through recovery. That gets you a functioning phone at least!
Then work on the restore issue. The backup was made with the same version of RA that you are currently using I assume? I'm not sure where to go with it really, and hope someone with more knowledge will pitch in...!
Click to expand...
Click to collapse
I managed to get it sorted. A guy on another forum mentioned this exact same solution. Which means props to you too.
Thanks for the help.
You are welcome!
Remember to pass it on and help where you can...
sak01 said:
I managed to get it sorted. A guy on another forum mentioned this exact same solution. Which means props to you too.
Thanks for the help.
Click to expand...
Click to collapse
Post the solution here to help other people.
^^sorry I missed your post.
It's this solution posted by stringer7 earlier
stringer7 said:
If it was me I would wipe everything (I know you did already but just to be sure) download fresh version of the rom to your sd via PC, insert in phone and flash it through recovery. That gets you a functioning phone at least!
Click to expand...
Click to collapse
Or as Rastaman over at AF put it:
if youve wiped, try and flash a new rom without restoring nand and see if it rebuilds the system partition
once done see if a nand restore will work (although it was done without ext :/)
Click to expand...
Click to collapse
So basically, flashing a new rom rebuilds the system partition and then the nand restore works.
if so, would be usefull to restore without the boot.img from nandbackup.
never used nandbackup, i have ridden that was availaible through some advanced features from nand restore on amonRA
this is a point already raised early by someone named Brandall
Hello,
I hope someone will be able to help with this, although it is very much a case of user error! I upgraded my G3 to Marshmallow using the steps detailed here:
http://forum.xda-developers.com/lg-g3/development/stock-d855-30b-images-kdz-flashables-t3282012
It all worked perfectly until I decided to encrypt the handset. The encryption process worked as expected, but as I always did on previous Android versions, I used the CryptFS Password app to change the encryption password. The app advised that it was unable to change the password and that I should run the command via shell, which I did and it seemed to work. The problem is, I changed it to an alphanumeric password and my lock screen is just a numeric PIN, so upon reboot it prompts me to enter the password to decrypt but only allows me to enter numbers.
So, I kicked myself for not changing the lockscreen from PIN to password before rebooting, but figured I could just wipe/reflash and start again. However, when I reflash, I still get prompted for the encryption password at boot. So I figured I'd just enter the password wrong 30 times and factory reset the device that way, except that doesn't work either. It says it's going to reset, reboots to recovery (TWRP 2.8.7.0) and says it has reset, but then boots back to the encryption screen again (which now advises that I am -5 of 30 attempts!!).
Flashing CM13 or 12 works fine. I have settled on CM12 at the moment because it seems to be a bit more stable, but I'd ideally like to get back to stock Marshmallow. Is this possible?
I have tried wiping all partitions and data from within TWRP, and formatting partitions, all to no avail.
Is there any way I can reinstall stock Marshmallow?
Trying flashing marshmellow KDZ and it should reset everything
Let me know how things go
TTib said:
Hello,
I hope someone will be able to help with this, although it is very much a case of user error! I upgraded my G3 to Marshmallow using the steps detailed here:
http://forum.xda-developers.com/lg-g3/development/stock-d855-30b-images-kdz-flashables-t3282012
It all worked perfectly until I decided to encrypt the handset. The encryption process worked as expected, but as I always did on previous Android versions, I used the CryptFS Password app to change the encryption password. The app advised that it was unable to change the password and that I should run the command via shell, which I did and it seemed to work. The problem is, I changed it to an alphanumeric password and my lock screen is just a numeric PIN, so upon reboot it prompts me to enter the password to decrypt but only allows me to enter numbers.
So, I kicked myself for not changing the lockscreen from PIN to password before rebooting, but figured I could just wipe/reflash and start again. However, when I reflash, I still get prompted for the encryption password at boot. So I figured I'd just enter the password wrong 30 times and factory reset the device that way, except that doesn't work either. It says it's going to reset, reboots to recovery (TWRP 2.8.7.0) and says it has reset, but then boots back to the encryption screen again (which now advises that I am -5 of 30 attempts!!).
Flashing CM13 or 12 works fine. I have settled on CM12 at the moment because it seems to be a bit more stable, but I'd ideally like to get back to stock Marshmallow. Is this possible?
I have tried wiping all partitions and data from within TWRP, and formatting partitions, all to no avail.
Is there any way I can reinstall stock Marshmallow?
Click to expand...
Click to collapse
try booting into twrp, go into command terminal, manually format data partition using command line, then reflash cm12 and wipe cache and dalvik (you may not need to reflash it but why not if you are going back to mm)
if your partitions are the same as mine this is the command you want to run.
mke2fs -T ext4 /dev/block/mmcblk0p44
make sure you don't format the wrong partition check that your variant has the same partition (grab an app called diskinfo and click on data partition then alter the last parameter to w/e ur data partition is)
mmcblk0p44 is the paramater you want to change if yours isn't identical. this should reset encryption as data is the partition that gets encrypted.
after all of this use a guide to install marshmallow (kdz or something)
(when i encrypted my data partition twrp could no longer mount the partition to format it, but if you use command land format it formats the partition without mounting it.)
i'm assuming this is your issue as well.
KronicSkillz said:
try booting into twrp, go into command terminal, manually format data partition using command line, then reflash cm12 and wipe cache and dalvik (you may not need to reflash it but why not if you are going back to mm)
if your partitions are the same as mine this is the command you want to run.
mke2fs -T ext4 /dev/block/mmcblk0p44
make sure you don't format the wrong partition check that your variant has the same partition (grab an app called diskinfo and click on data partition then alter the last parameter to w/e ur data partition is)
mmcblk0p44 is the paramater you want to change if yours isn't identical. this should reset encryption as data is the partition that gets encrypted.
after all of this use a guide to install marshmallow (kdz or something)
(when i encrypted my data partition twrp could no longer mount the partition to format it, but if you use command land format it formats the partition without mounting it.)
i'm assuming this is your issue as well.
Click to expand...
Click to collapse
Hi, thanks for the advice, I gave it a try last night. My /data partition was named /dev/block/mmcblk0p43 according to DiskInfo, so I made sure the partition was unmounted in TWRP and formatted it via the terminal following your instructions and then reflashed the MM zip from the original link and... still encrypted.
I haven't tried flashing the kdz yet, as I use Linux and I don't believe there is a way to flash kdz files using *nix. I'll have to wait until the weekend and I'll try and do it via a VM.
I don't understand how this encrypted partition is still even there. I have CM12 installed and working, it's showing the full amount of disk space available, I've done multiple wipes, formats and resets, yet the minute I put MM on it, the phone thinks it's encrypted again.
I do actually know the encryption key, is there any way I can unlock the phone via ADB or something similar?
Not sure if it's relevant, but my phone model is D855. I don't think I mentioned that before.
Thanks for the help, I really appreciate it!
TTib said:
Hi, thanks for the advice, I gave it a try last night. My /data partition was named /dev/block/mmcblk0p43 according to DiskInfo, so I made sure the partition was unmounted in TWRP and formatted it via the terminal following your instructions and then reflashed the MM zip from the original link and... still encrypted.
I haven't tried flashing the kdz yet, as I use Linux and I don't believe there is a way to flash kdz files using *nix. I'll have to wait until the weekend and I'll try and do it via a VM.
I don't understand how this encrypted partition is still even there. I have CM12 installed and working, it's showing the full amount of disk space available, I've done multiple wipes, formats and resets, yet the minute I put MM on it, the phone thinks it's encrypted again.
I do actually know the encryption key, is there any way I can unlock the phone via ADB or something similar?
Not sure if it's relevant, but my phone model is D855. I don't think I mentioned that before.
Thanks for the help, I really appreciate it!
Click to expand...
Click to collapse
very strange when i did that it got rid of my encrypted partition... i'm not sure what else to say except maybe see if someone will lend you a windows pc to do kdz flash.
KronicSkillz said:
very strange when i did that it got rid of my encrypted partition... i'm not sure what else to say except maybe see if someone will lend you a windows pc to do kdz flash.
Click to expand...
Click to collapse
I flashed the kdz via LGUP and... now the phone won't boot to anything except TWRP. Have tried restoring two previous nandroid backups, installing CM12 and MM, all install without reporting errors. LGUP detects it as an unknown device, so can't flash kdz again. Might have bricked this one. :crying:
Phew. Okay, solved! I followed the following guide to flash an old version of the stock firmware: http://www.androidrootz.com/2014/07/how-to-unroot-lg-g3-all-variants.html.
Then, I upgraded, rooted, flash TWRP and finally installed MM again and it seems to be back to normal ("Android is starting" screen as we speak. Fingers crossed!). Thanks to everyone who helped me out with this one!
Hi. I've just updated CM13 to the latest nightly using TWRP, but now the system just boots into TWRP - that's whether I select boot system, recovery, or bootloader. I tried restoring from a TWRP backup or another copy of the nightlies zip - it all seems to work fine but doesn't solve the problem. I can connect to the 'recovery' device using adb but adb restart bootloader just loads TWRP again. I've tried wiping first the dalvik/cache, then everything but the internal card, then finally everything but nothing seems to work.
I did get something a little bit like this a few days ago because SuperSU was complaining that I needed to update the binary. I let it do it the way that it suggested one does when TWRP is installed and afterwards couldn't reboot into system, but after a few minutes of frustration sorted things by wiping various partitions.
I attempted to load the full system restore files (cm-13.1-ZNH2KAS29G-crackling-signed-fastboot-74bb753396.zip) using TWRP but that didn't work (I imagine because they're designed to be run via fastboot). I tried loading them via the ADB sideloader option included in TWRP but it failed after a few seconds (I think the message was 'transmitting 0.0x'
I opened that zip and copied the various files to the external card, but I then baulked at installing the image files manually because the only partition option I'm given is boot and my understanding is that each image file should go into its own partition.
The only other potentially pertinent information I can think of:
TWRP keeps reporting "E: Unable to find partition size for '/recovery'"
Has anyone got any ideas please? I had been musing that my next phone would have OTG and NFC, but I wasn't planning to upgrade just yet if I don't absolutely have to.
Have you got it fixed? And if yes - how? I am stuck in a similar situation and can't find a solution for it. Tnx in advance.
In an attempt to unroot my OP3 I managed to (almost?) brick it. Fastboot still works so I could flash back TWRP which I already had replaced by the stock recovery. Also I have a backup available on the phone which I hoped to be able to restore. And here is where my problem comes in: I cannot choose any partition to restore because there are none and hence the restore fails with "No partitions selected for restore.".
What can I do now? Originally I was trying to sideload the current Oxygen OS using the stock recovery but that didn't work. Any ideas?
simu_lacrum said:
In an attempt to unroot my OP3 I managed to (almost?) brick it. Fastboot still works so I could flash back TWRP which I already had replaced by the stock recovery. Also I have a backup available on the phone which I hoped to be able to restore. And here is where my problem comes in: I cannot choose any partition to restore because there are none and hence the restore fails with "No partitions selected for restore.".
What can I do now? Originally I was trying to sideload the current Oxygen OS using the stock recovery but that didn't work. Any ideas?
Click to expand...
Click to collapse
Your not bricked at all. Just stuck with a phone without OS I think? Why does ADB sideload not work? Do you get the "cannot read" error? Use adb push file directory then manually flash it with twrp. Make sure you are in the latest one from Bluspark!
Yes, I'm stuck with a phone without OS. I did get the "cannot read" error but I don't know why because all the necessary files were in the very same directory from where I issued the adb commands. Where do i find or define an adb push file directory? Currently I habe TWRP 3.0.3-0. installed. Will that be sufficient?
Please keep in mind that I've also lost my partition information. adb sideload alfeady didn't work before that because of the "cannot read" error. Still I don't know what's the reason for that error.
Here you will find everything you need to recover your phone:
https://forum.xda-developers.com/oneplus-3/how-to/guide-mega-unbrick-guide-hard-bricked-t3405700
Hi everyone. I hope this is the right forum for this question.
Edit: I found the thread for TWRP and it says there is a known issue with decryption for Android 10. I think that is the root of my problems. I'm going to try to downgrade to Android 9 since I hate Android 10 anyway. It was causing all sorts of problems with my phone...random reboots, etc.
I have a Pixel 3 XL running the latest version of Android (image-crosshatch-qp1a.191005.007). I want to root it, but am having problems with TWRP.
I have the google usb drivers and adb and fastboot. I downloaded them all through the latest version of Android Studio.
I then used the official guide from twrprecovery.me (slash) google-pixel-3-xl/ to try to install TWRP. When I follow that guide I have 2 issues.
First, the '.\fastboot boot recovery recovery.img' command does not work. I get this error:
Code:
fastboot: error: cannot load 'recovery': No such file or directory
I am able to use .\fastboot boot recovery.img. When I do that I encounter the second problem.
Second, if I boot into TWRP using the command .\fastboot boot recovery.img, the file system is encrypted. It shows no data in the /sdcard folder and it shows the available storage space in Internal Storage as 0MB.
I've seen a lot of threads about that, but none of the suggestions work (I.e., setting a pin, setting a password, disabling home screen security all together, setting the phone to require a password or pin on boot (that option isn't available on the Pixel 3 XL), etc).
What I have been able to do is use TWRP to chmod 755 the /sdcard folder and then use adb push to transfer the recovery.img file. This was more of a test since I didn't expect it to actually be able to flash it. To my surprise, that worked, even though it couldn't mount any of the partitions. Of course, doing it that way removed the OS because it was flashing it to System not Recovery (I think...this is the first Pixel I've installed TWRP on).
That wasn't an issue since unlocking the bootloader had already wiped all my data. I just reinstalled the stock OS. After reinstalling the stock OS I just see a dead Android when I boot to recovery. I think that's either because A) TWRP was never installed to the recovery partition, or B) the stock OS overwrote it.
To summarize, I need to 1) boot into recovery so I can install recovery.img without wiping the OS, and 2) decrypt the file system.
Can anyone help me out?
Thanks