Using TWRP recovery to repair LineageOS System - LineageOS Questions & Answers

Hello,
i have run into a problem with my BQ Aquaris M5 (piccolo) and would be gratefull for someone to help.
What happened:
Yesterday plugged phone in over night for charging and today I tried to unlock it (Code). Every time I entered the code the phone did not unlock. I just saw the unlock screen again and again. The phone uses an unofficial microG rom, so instabilities were expected. I decided a restart might be needed, so I restartet it normally. On boot the phone got stuck on the LineageOS startup until it put me into TWRP after 30s.
What I tried:
I have a TWRP backup from beginning of this year and made one in TWRP after the error had happened. Just restoring from the latest backup yields to either TWRP complaining "can`t mount system" or working fine but running into the boot problem again.
Restoring from the older backup always leads to a "can`t mount system" error.
What I would like to have:
A functioning phone with the app data from todays TWRP backup.
I am only an educated beginner when it comes to custom ROMs, so any help regarding specific order of operations or possible solutions would be very appreciated.
Other info:
LineageOS 15.1 microG unofficial
TWRP 3.4.0
rooted through magisk

Z4_ said:
Hello,
i have run into a problem with my BQ Aquaris M5 (piccolo) and would be gratefull for someone to help.
What happened:
Yesterday plugged phone in over night for charging and today I tried to unlock it (Code). Every time I entered the code the phone did not unlock. I just saw the unlock screen again and again. The phone uses an unofficial microG rom, so instabilities were expected. I decided a restart might be needed, so I restartet it normally. On boot the phone got stuck on the LineageOS startup until it put me into TWRP after 30s.
What I tried:
I have a TWRP backup from beginning of this year and made one in TWRP after the error had happened. Just restoring from the latest backup yields to either TWRP complaining "can`t mount system" or working fine but running into the boot problem again.
Restoring from the older backup always leads to a "can`t mount system" error.
What I would like to have:
A functioning phone with the app data from todays TWRP backup.
I am only an educated beginner when it comes to custom ROMs, so any help regarding specific order of operations or possible solutions would be very appreciated.
Other info:
LineageOS 15.1 microG unofficial
TWRP 3.4.0
rooted through magisk
Click to expand...
Click to collapse
Instabilities expected. But not because of microG. I guess, it's a hardware or magisk issue.
I would try to restore newest backup, try what files i see on computer through usb cable.
I would wipe system and re-install the exactly same lineageOS version. That reverts magisk installation and every other system modification without deleting user data. We caches and restart.

kurtn said:
Instabilities expected. But not because of microG. I guess, it's a hardware or magisk issue.
I would try to restore newest backup, try what files i see on computer through usb cable.
I would wipe system and re-install the exactly same lineageOS version. That reverts magisk installation and every other system modification without deleting user data. We caches and restart.
Click to expand...
Click to collapse
Wiping system and reinstalling the original system .zip does not work. It leads to Error 7 which seems to be caused by 'can´t mount system'.
Restoring to an even older backup before I installed anything does not work either.
If I try to run "repair filesystem" on the system partition I get error 4 in TWRP. (No Idea what that means)
I can normally access the phones sd and internal storage through usb.

Z4_ said:
Wiping system and reinstalling the original system .zip does not work. It leads to Error 7 which seems to be caused by 'can´t mount system'.
Restoring to an even older backup before I installed anything does not work either.
If I try to run "repair filesystem" on the system partition I get error 4 in TWRP. (No Idea what that means)
I can normally access the phones sd and internal storage through usb.
Click to expand...
Click to collapse
There is twrp 3.4 out now. Fixed many android 10 bugs

kurtn said:
There is twrp 3.4 out now. Fixed many android 10 bugs
Click to expand...
Click to collapse
As you might have read in my original post: I was on android 8 and using twrp 3.4. It still did not work.
I have now switched to an unofficial CrDroid ROM with Android 9, as any attempts to restore my backups or install my used ROM lead to errors. This makes the restore of app data difficult, but my smartphone is back to action. I still do not know what caused the errors.

Related

How to repair Wileyfox Swift when I can get into TWRP but not bootloader

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.

Oneplus 3 can't boot into OxygenOS after deleting file

Hey,
I wanted to create an nandroid backup in TWRP and got error 255 in the process.
I got the log of the failed update:
cloud.directupload.net/dfZq
So i searched for a solution, and the internet said that i should remove the file wich causes backup to fail. The logs said it was '/system/app/AndroidPay'
This is a file, not a folder.
So i removed the file, keeping an backup of it, booted into TWRP and the backup still failed.
To my surprise the boot into OxygenOS fails now. It shows the Oneplus Powerd by Android logo, turns black and reboots into twrp. Recovery and Bootloader seems to work fine.
So I connected my device with my computer and tried to get the file back to '/system/app' using adb.
I tried 'adb push AndroidPay /system/app' and it seems to be transferred succesfully, however the boot into oxygenOS is still not working.
I think it can be fixed by formatting the device and flash OxygenOS new to it, but I really don't wanna do that.
General Information:
Oneplus 3
OxygenOS 3.3.4
Rooted
Xposed Installed
No custom kernal
TWRP 3.0.2-0
File wich may be broken: cloud.directupload.net/dfZs
Is there an easyer way than resetting my whole phone to get it to work ?
I'm sorry for language mistakes or maybe leaving relevant information.
Thank you for help
I've had same problem today, my solution is restore "System" part (only system) from old backup, it saved my data and OP3 works fine after that
Wipe system, then flash OOS and it should work fine. If it doesn't Im afraid you need to do a full clean install since it isn't system related then.

Android 8.1 + Magisk

Hi!
Does Magisk (including root, etc.) work flawlessly on a Pixel C with Android 8.1? Or is better to stay with 8.0 and wait a little bit?
Thanks in advance and kind regards,
star3141.
It works, initially it would force close but now seems stable. I used v14.5 beta.
On the other hand super su by chainfire does not work. Would flash but app missing. Downloading from play store and updating binaries through app causes boot loop.
v14.5 works perfectly here, no problems at all.
Hi!
Thanks for the replies. Maybe I will give it a try at Christmas or alternatively wait for the first update of 8.1 in January.
Hello!
Today, I gave it a try but unfortunately faced some kind of total reflection.
1. I downloaded and flashed the latest android factory image (ryu-opm1.171019.016 = 8.1 from Feb. 2018) from Google.
2. I downloaded and booted (without installing) twrp-3.2.1-0-dragon by means of "fastboot boot twrp-3.2.1-0-dragon.img"
3. In TWRP I mounted the system partition rw
However, after mounting the system partition rw, android won't boot into the system anymore. I am alway getting the green android guy laying on its back with "No command". When I boot into TWRP and mount /system in ro-mode, then will boot afterwards without any problems. So the problem must be related to mounting /system in rw-mode by TWRP.
I have also tried twrp-3.0.0-0-dragon-ryu-02112016-1.img, which worked on my previous 8.0 installation, but it won't work in this 8.1 release anymore.
Any ideas how to get rid of this problem?
Thanks in advance and kind regards,
star3141.
Hello!
I found a solution!
If someone else suffers from similar problems then try the following which hopefully will fix everything: :fingers-crossed:
1. Download and flash the latest (in my case Android 8.1 from Feb. 2018) android factory image from Google.
2. Complete the standard android setup procedure and, when the system is up and running, enable "USB debugging" in the "Developer Options".
3. Restart your device in bootloader mode by "adb reboot bootloader".
4. Format your /data partition by "fastboot format userdata" to remove the filesystem encryption.
5. Download the latest TWRP (in my case "twrp-3.2.1-0-dragon.img") and start it by "fastboot boot twrp-3.2.1-0-dragon.img".
6. In TWRP mount /system in rw-mode and just to be sure check if the /data partition can be accessed. If not, just wipe/format it as ext4 again.
7. Download the latest Magisk (in my case "Magisk-v15.3.zip") and sideload it by "adb sideload Magisk-v15.3.zip" in TWRP.
8. Reboot into the android system and install the Magisk app (in my case "MagiskManager-v5.5.5.apk")
9 Viola! Enjoy a working and rooted android 8.1. :victory:
Kind regards,
star3141.
didn't have any problems with magisk 15.3 on 8.1 but with 16.0 the pixel won't boot anymore (stays at the google logo, not even reaching the bootaniamtion). anyone else having this issue? after flashing boot-image and reinstalling magisk 15.3 it works fine again...
For me as well, get 16.0 not to run, Bootloop
Yep, same here, then I bricked it restoring a nandroid backup where it destroyed system, then I couldn't get past encryption password in TWRP. So it's been one of those days...
m+a+r+k said:
Yep, same here, then I bricked it restoring a nandroid backup where it destroyed system, then I couldn't get past encryption password in TWRP. So it's been one of those days...
Click to expand...
Click to collapse
did you already try "default_password" (without quotes of course)? had this issue too some time ago after restoring a nandroid – reflashing twrp via fastboot and decrypting with default_password helped
doumer said:
did you already try "default_password" (without quotes of course)? had this issue too some time ago after restoring a nandroid – reflashing twrp via fastboot and decrypting with default_password helped
Click to expand...
Click to collapse
Yes, tried that as well. I think I just corrupted the system, wiped data and system in trying to get around the Magisk problem.
m+a+r+k said:
Yes, tried that as well. I think I just corrupted the system, wiped data and system in trying to get around the Magisk problem.
Click to expand...
Click to collapse
Hm, as long as you still have fastboot access, I would try to manually flash partiotions (system, vendor etc), flash twrp, install masgisk 15.3, start from scratch and restore the apps with titanium backup (hopfully you have a backup!). as long as its not a hard brick, it's all fixable
doumer said:
Hm, as long as you still have fastboot access, I would try to manually flash partiotions (system, vendor etc), flash twrp, install masgisk 15.3, start from scratch and restore the apps with titanium backup (hopfully you have a backup!). as long as its not a hard brick, it's all fixable
Click to expand...
Click to collapse
Oh, I'm back to normal now. I couldn't get it to connect to PC as all I had was fastboot and recovery. I discovered the only way to get adb/fastboot connection from PC was to go into TWRP and ADB Sideload. Once that was established it made the connection and I installed 8.1 from the command line with the flash-all.bat.
Then I could restore the nandroid. All is well now, thanks.
good to hear!
Same problem here with 16.0. Seems to be either a bug or some kind of incompatibility with the pixel c.
Magisk 16 and Pixel C
Any word on resolution of the boot loop issue?
Reflash + downgrade to 15.3 seems the only working solution at the moment.
I have re-rooted using Magisk 15.3 from SuperSu. Am I OK updating to 16.0 through Magisk, or should I try 16.3?
mightywhites29111971 said:
I have re-rooted using Magisk 15.3 from SuperSu. Am I OK updating to 16.0 through Magisk, or should I try 16.3?
Click to expand...
Click to collapse
16.0 causes a boot loop. Somebody else had an issue with 16.3. I'd stay with 15.3. Just turn off update notifications and Magisk won't bother you.
Cheers

Decryption failed after update to lineageos 17

Hello
I'm currently in a very tricky situation.
I've decided that I want to update my oneplus 3 (non t) to the newest lineageos 17.1 nightly build. I've been running lineageos 15.x before (I havent updated in a very, very long time).
These are the steps I took as best as I remember:
from a working state: boot into TWRP 3.3.0.1 , backup system & boot onto interal storage
then flash stable9.0.6 firmware + modem, flash lineage-17.1-20200615-nightly, flash gapps
then I wiped dalvik cache and cache and booted into system.
The boot process itself went fine, however I was greeted with a "decryption failed" screen which claimed that the decryption password was correct, but the data was corrupt. TWRP also claims that the default decryption password does not work (it has not asked me for any decryption password before) and entering my screen lock pattern according to the /faq/openrecoveryscript.html page on twrp(dot)me does not yield any different result either.
Since I've neglected to copy the backup to any other place other than internal storage, thinking that just a firmware and system flash would be no risk to it, I now have no way of restoring the previous state.
First I tried updating TWRP to the newest version (3.3.1.1) which yielded no difference, I attempted to flash both the old firmware (I know that it was 5.0.x, so I went with 5.0.8) and an old version of lineageos (some unofficial release of lineageos 15.1 from 2017 that I found on xda, since the official releases arent available that long) which resulted in a successful boot, but unsuccessful decryption just as with lineageos 17.
I have also attempted to follow the steps at /r/LineageOS/comments/anivml/ , though the backup fails silently (pc says `Now unlock your device and confirm the backup operation...`, nothing happens on my phone)
I would be thankful for any ideas on how I could recover from this without data loss.
I apologize for the weird links, but I am a new user and cant post external links yet
Lotzisty said:
Hello
I'm currently in a very tricky situation.
I've decided that I want to update my oneplus 3 (non t) to the newest lineageos 17.1 nightly build. I've been running lineageos 15.x before (I havent updated in a very, very long time).
These are the steps I took as best as I remember:
from a working state: boot into TWRP 3.3.0.1 , backup system & boot onto interal storage
then flash stable9.0.6 firmware + modem, flash lineage-17.1-20200615-nightly, flash gapps
then I wiped dalvik cache and cache and booted into system.
The boot process itself went fine, however I was greeted with a "decryption failed" screen which claimed that the decryption password was correct, but the data was corrupt. TWRP also claims that the default decryption password does not work (it has not asked me for any decryption password before) and entering my screen lock pattern according to the /faq/openrecoveryscript.html page on twrp(dot)me does not yield any different result either.
Since I've neglected to copy the backup to any other place other than internal storage, thinking that just a firmware and system flash would be no risk to it, I now have no way of restoring the previous state.
First I tried updating TWRP to the newest version (3.3.1.1) which yielded no difference, I attempted to flash both the old firmware (I know that it was 5.0.x, so I went with 5.0.8) and an old version of lineageos (some unofficial release of lineageos 15.1 from 2017 that I found on xda, since the official releases arent available that long) which resulted in a successful boot, but unsuccessful decryption just as with lineageos 17.
I have also attempted to follow the steps at /r/LineageOS/comments/anivml/ , though the backup fails silently (pc says `Now unlock your device and confirm the backup operation...`, nothing happens on my phone)
I would be thankful for any ideas on how I could recover from this without data loss.
I apologize for the weird links, but I am a new user and cant post external links yet
Click to expand...
Click to collapse
Data on userdata partition is gone (for details see: https://forum.xda-developers.com/oneplus-3t/how-to/guide-cope-9-0-3-5-0-8-firmware-barrier-t3941164 ).
Format (not wipe) the data partition (los recommends ext4).
nvertigo67 said:
Data on userdata partition is gone (for details see: https://forum.xda-developers.com/oneplus-3t/how-to/guide-cope-9-0-3-5-0-8-firmware-barrier-t3941164 ).
Format (not wipe) the data partition (los recommends ext4).
Click to expand...
Click to collapse
Well ****.
Thank you for the information

[HELP] XT1794 stuck at fastboot/twrp after infinite boot anim on the latest los16

Hi everyone, I was usually providing help on this forum, now i'm the one desperate for help after some unforeseen consequences.
Bear in mind I'm kind of a noob anyway.
I have seen the message on the telegram groups for our device regarding solving the los 17 problems with the ril and camera. So i have followed the steps. I flashed the last twrp 3.4 by jarl using the official twrp app and then rebooted to recovery, wiped everything beside the internal storage and tried flashing the last los 16 zip.
And then the disaster happened. firstly the log returned error 7 so i've rebooted to recovery again and attempted to flash the same zip again without wiping anything. well the flashing worked apparently but i couldnt boot into it as it showed me an infinite boot animation.
Then i rebooted to recovery and it prompted me with a decryption key request which i didn't set before. I cancelled the prompt and I moved forward and proceeded wiping everything including the internal storage thinking that was the problem. Maybe it was maybe it wasnt, now I'm no longer prompted by any decryption key, but I was hoping i could connect to my pc through mtp, transfer some zips and flash some functional rom. Even though I enable mtp and my pc detects the phone I can't access any storage nor the internal, nor the sd card.
I tried going through multiple versions of twrp as i can still access my bootloader and i can still flash recoveries through fastboot but i feel that i'm stuck and I dont know what i should try anymore.
Before trying all this I was on an older build of los16 with the oreo firmware.
First of all, use this TWRP: https://build.twrp.me/twrp-3.4.0-0-montana.img
Second of all, do not flash TWRPSARer (if you did). Make sure the LOS16 zip isn't corrupted (which normally causes error 7), then format system, data, cache, vendor and dalvik. Reflash LOS16 and boot
JarlPenguin said:
First of all, use this TWRP: https://build.twrp.me/twrp-3.4.0-0-montana.img
Second of all, do not flash TWRPSARer (if you did). Make sure the LOS16 zip isn't corrupted (which normally causes error 7), then format system, data, cache, vendor and dalvik. Reflash LOS16 and boot
Click to expand...
Click to collapse
I wasnt using the twrp sar, i was using the exact version you linked. And I can't flash any rom because i cant get the zip inside my internal memory.
You can try using adb sideload. adb sideload path/to/zip
worked like a charm. thanks a lot, Jarl.
And this, is the story of someone who didn't want to wait long enough for the ROM to boot
Nah JK, but long boot-times normally = Force Encrypt Enabled
Some random said:
And this, is the story of someone who didn't want to wait long enough for the ROM to boot
Nah JK, but long boot-times normally = Force Encrypt Enabled
Click to expand...
Click to collapse
it might have been the problem, but if it is it should be a disclaimer for that on the los16 page. the boot time is way longer than the usual.
Aythriel said:
it might have been the problem, but if it is it should be a disclaimer for that on the los16 page. the boot time is way longer than the usual.
Click to expand...
Click to collapse
Yes, I'll make sure to note that

Categories

Resources