[Q] TWRP won't stay -- CM replaces with its own -- bootloops if replaced... - Xperia Z3 Compact Q&A, Help & Troubleshooting

Ok, so I got the Z3c just recently since CyanogenMod now apparently supports it (odd it's not listed in devices on the wiki, but it's on their standard build system, so this is not even an unofficial build.) I found t here's even an official TWRP build for it. I really kind of need TWRP on there as I need to be able to do all of the numerous stuff it can do without having to hook it up to a computer with adb/fastboot/etc every single time. There are a huge number of features and conveniences to TWRP that CWM and CyanogenMod recovery both lack (frankly it feels like TWRP is a modern recovery and those two still feel like they date back to the Android 2.x days. I can remember the stock recovery on my Archos 43 back in the day being practically the same as what I get with CyanogenMod recovery especially.)
Anyway, this one is a bit odd. I've also setup a Z2 Tablet for my grandmother with TWRP + CyanogenMod and there are no troubles at all there. I put TWRP on it and it works normally basically. However, on this Z3c it's going a bit wonky. CyanogenMod somehow seems to be replacing the recovery with its own. I've disabled automatic updates and the option to update the recovery was never even enabled at all. If I flash using dd directly to the partition as the official TWRP page says I once again have TWRP, but then the system either won't boot at all (staying stuck on the SONY logo) or it just boots straight to TWRP over and over as if TWRP were the normal system instead of the recovery.
I'm wondering whether something is just going really wrong or if, alternately, there's some oddity like it having some sort of "boot to recovery" flag that gets set and does not clear? Is this something I can fix, or am I just stuck with CyanogenMod putting its own recovery on there without asking?
Honestly, SONY did a lot of things great on their devices, but not having a true separate bootloader/recovery is something I will never be comfortable with.

I tried flashing to boot once with, as you know, the expected results. Most of the time I did as I said in the original post and followed those instructions exactly though.
And I would just swear at at least one point I rebooted back into TWRP and it was still there before CyanogenMod replaced it. Oh, and from the TWRP page on this device:
This utility is designed to work in conjunction with the current methods that most AOSP ROMs use for the ramdisk and can also be used on stock kernels. This setup means that you must have a kernel or boot image installed that will use the FOTAKernel method. Most AOSP based ROMs like OmniROM or CyanogenMod will support this method. Some stock kernels may also support the FOTAKernel method.
Click to expand...
Click to collapse
Note they explicitly specify that CyanogenMod supports its method.

Ok, I think I was misunderstanding something. It looks like CyanogenMod essentially has its own boot partition and this goes to a separate location. Rather than being "replaced" it's just going to CyanogenMod's separate recovery instead of TWRP. If so this begs the question of how one even gets to TWRP there (which isn't mentioned on that page at all.)
EDIT: It's a pain, but I tried fastboot flashing it to boot. It still goes straight into TWRP every time if I do that. The "recovery-from-boot" file is not present in /system. (It's a pain because I have to "reinstall" CyanogenMod and wait for it to optimize everything again now.) It's when I flash with fastboot that it gets stuck always booting straight into the recovery. Ironically, if I flash CyanogenMod's own boot image back on there manually it still gets stuck always going into recovery -- just CyanogenMod's recovery instead of TWRP.
EDIT2: I ran across this post: http://forum.xda-developers.com/showpost.php?p=58830666&postcount=206 I'm still getting CyanogenMod's own recovery though even when I follow that exactly.
EDIT3: Ok, I think I found a solution. Not sure if this is the best possible way to do it, but I found out that XZDualRecovery apparently works with CyanogenMod fine. I just have to remember to flash it after flashing CyanogenMod in the recovery and then during the bootup process I have to wait for the light to go green (instead of earlier in the process as that just gives me CyanogenMod's recovery still.) If I hold down once it goes green I get TWRP. http://forum.xda-developers.com/showthread.php?t=2261606

I tried recovery. The problem is, boot and recovery are the same thing on SONY devices like this. Anyway, that XZDualRecovery isn't perfect -- for one it ignores the setting for brightness, leaving the screen at 100% (which not only hurts my eyes, but obviously isn't good for it.) Other than that though this thing works very well.

All I can tell you here is that I tried flashing to recovery instead of boot and it didn't work. Perhaps there's some special way you have to trigger it beyond the usual methods (perhaps like the way XZDualRecovery has its own portion of the startup where the LED goes green and the motor vibrates to let you know it's time to press a button if you want it to boot one of its recoveries.) Nothing mentions this anywhere that I could find though and I definitely haven't triggered it on my own.

Given that it works at all but is determined to either utterly ignore TWRP or go straight to only its own recovery it must have some sort of check then and just simply reject TWRP I guess.
Anyway, a this point there's really nothing I can do with it. I lack the development experience, time, or knowledge to go about trying to fix it and submit patches or whatever. I'm just going to stick with XZDualRecovery since it works fine in every way except ignoring the brightness setting (I do hate that, but at least on long operations it still shuts off the display.) Just to be clear, you do understand that XZDualRecovery DOES let me boot TWRP from it? I don't know if it may be a modified version or something (the fact that it's ignoring the brightness setting makes me think it may be) but everything seems to work normally within it other than that (I'm wondering if that may be more an issue with the startup process.)

In developer options there is an option that should be unchecked. Can't remember but it's says not to update recovery or something similar

Indeed. I always uncheck that first thing and actually disable automatic updates entirely anyway (this is about updating through the standard interface. I update by downloading builds and installing through TWRP for several reasons that I won't get into right now.) Unfortunately though, that is kind of a separate thing really. It's more just in reference to the fact that CyanogenMod now has its own actual recovery so you can set it to automatically update that part as well. Just to be completely clear though, because of the way it works, TWRP would no longer come up after installing CyanogenMod at all and it can't be just simply flashed back on. I guess feherneoh has the right of it really. Perhaps it's compressed incorrectly (or shouldn't be compressed at all) or whatever. If I knew what I was doing I could probably manually do this part myself, but I don't really feel very confident about that. I'll just stick to XZDualRecovery with its TWRP 2.8.7.0 build that works great in every other way but the fact it ignores the display brightness setting.

Related

Z1 stuck in boot loop after fumbling my way around a Chinese recovery

So I recently tried updating MIUI v5 to MIUI v6. However, I stupidly opted for the FOTA update, rather than updating using recovery.
After running the update, my phone rebooted and it worked fine, MIUI v6 running great. However, because I'd updated using the in-built updater, my data and apps were still there from before. This was causing no-end of 'process stopped running' alerts, which drove me crazy after around 10 minutes.
Therefore, I decided to try and wipe my data. I went to the recovery menu and found that MIUI had installed its own Chinese recovery, my previous TeamWin one was gone. So I fumbled around and managed to find the 'Wipe data' etc. option, and chose it. I was presented with a couple more options which I didn't understand, and (stupidly) accepted both. This left me with a phone that would no longer boot past the 'Sony' logo. I was also unable to access the Chinese recovery menu.
Feeling a little worried at this point, I started to Google around for guides on how to flash a recovery back onto a phone stuck in a boot loop. After hours of searching, I decided it wasn't possible and instead follow a guide for fixing 'boot loops' through flashing an original Sony 'ftf' firmware using flashtool.
Now, the guide I was following was quite old, and provided a link to 'C6903_14.2.A.0.290_Global LTE' - so this is what I used to flash (which I'm now regretting). Before flashing, I was presented with some options, for which the guide I was following recommended I deselect the 'kernel' option. So I did this too.
After around 10-15 minutes and what seemed like a successful flash, I tried turning the phone on. This time, the Sony logo appears, then disappears to a black screen, and then the backlight turns off, followed by the Sony logo, then a black screen, then backlight turning off, etc. So slightly different behaviour to before, but still boot looping.
I think what may have happened is that MIUI includes an updated kernel, and through flashing the 14.2.A.0.290 firmware without a kernel, I've introduced some sort of incompatibility.
The problem I'm having now is getting another firmware onto the phone in order to resolve this. For some reason, despite flashtool recognising the phone being plugged in with flash mode, it refuses to load the firmware - I'm instead presented with the message:
"You must have the according fsc script to flash this device."
Does anyone know how I might be able to get around this? I admit to being a bit of a noob when it comes to flashing so have probably dug my own hole here, and seem to have left myself completely unable to work out what I need to do in order to get back out! Any help would be hugely appreciated.
Please see the attached screenshot of what I see when I try flashing with flashtool. The whole flash takes around 2 seconds, so it appears as though nothing's actually happening. However, it did flash successfully before, only without the kernel (which I think is what's causing my problems).
Please help!
langauld said:
Please see the attached screenshot of what I see when I try flashing with flashtool. The whole flash takes around 2 seconds, so it appears as though nothing's actually happening. However, it did flash successfully before, only without the kernel (which I think is what's causing my problems).
Please help!
Click to expand...
Click to collapse
This version of Flashtool you're using is known to require some files for your device to be able to work.
Try using the version before it.
Oh and NEVER:
- Wipe /system and /data using recovery with unlocked bootloader (it will remove everything and the phone will not be able to boot).
- Flash an ftf of a older android version (like flashing kitkat on top of lollipop) without including kernel because that will cause a bootloop. (not sure about flashing lollipop on top of kitkat but I think it's the same)
Just2Cause said:
This version of Flashtool you're using is known to require some files for your device to be able to work.
Try using the version before it.
Oh and NEVER:
- Wipe /system and /data using recovery with unlocked bootloader (it will remove everything and the phone will not be able to boot).
- Flash an ftf of a older android version (like flashing kitkat on top of lollipop) without including kernel because that will cause a bootloop. (not sure about flashing lollipop on top of kitkat but I think it's the same)
Click to expand...
Click to collapse
You sir, are a god amongst men. I'd never have thought to try the previous version of FlashTool. From reading around, I knew some devices had issues with it, but because it lists the Z1 as being 'supported', I didn't think that would apply to me.
I flashed again without deselecting the kernel and it booted first time. Thank you again.
langauld said:
You sir, are a god amongst men. I'd never have thought to try the previous version of FlashTool. From reading around, I knew some devices had issues with it, but because it lists the Z1 as being 'supported', I didn't think that would apply to me.
I flashed again without deselecting the kernel and it booted first time. Thank you again.
Click to expand...
Click to collapse
Glad I could help.

Treble ROMs working?

Has anyone managed to get any Treble ROMs working? I tried the 3 from this post but they just cause a bootloop https://www.xda-developers.com/flash-generic-system-image-project-treble-device/
Do yourself a favour and remove your password / pin / pattern as i've just flashed one via fastboot (no treble recovery)
And it didn't work, now i can't get back into TWRP.
Any ideas?
No new treble ROMs work with our P20 pro's.. its the same for me which is why I'm back on stock for now... As every new version of treble ROMs I have tried do not boot for me they just stick me in a boot loop as well, its the same for the new version of lineageos.. Not sure if it will ever be fixed in the future though on newer builds considering the whole Huawei locking bootloader permanently thing... will probably put developers off Huawei phones all together...
danielfrancisarthurs said:
No new treble ROMs work with our P20 pro's.. its the same for me which is why I'm back on stock for now... As every new version of treble ROMs I have tried do not boot for me they just stick me in a boot loop as well, its the same for the new version of lineageos.. Not sure if it will ever be fixed in the future though on newer builds considering the whole Huawei locking bootloader permanently thing... will probably put developers off Huawei phones all together...
Click to expand...
Click to collapse
How did you get back to Stock? I have no OS now at all lol, i'm in limbo
Erecovery I used.. when booting and you get the unlock boot screen it will tell you to hold volume up I think for 3 seconds to go to erecovery and then just download and restore stock firmware and recovery and let the phone do it's work!
danielfrancisarthurs said:
Erecovery I used.. when booting and you get the unlock boot screen it will tell you to hold volume up I think for 3 seconds to go to erecovery and then just download and restore stock firmware and recovery and let the phone do it's work!
Click to expand...
Click to collapse
Yea i used eRecovery a little earlier myself, we really need twrp which actually allows decryption or even twrp which allows treble
Either that or decrypt and use no verity, haven't bothered with all that yet.
After today though, jesus i'm thinking about it, i literally ended up with nothing, all my wifi networks in work need a second log in, something which eRecovery can't offer.
Completed it when i got home.
Have you managed to install any treble roms? Has anybody?
I don't think it's possible on my device in it's current state, i tried TWRP, Fastboot, several different roms on both and nothing.
Spotted this earlier, might actually work on our devices, what do you think?
https://forum.xda-developers.com/hu...rp-3-2-1-0-t3782866/post76668571#post76668571
It's a treble recovery from the p20 lite forum, similar device, might work, anyone fancy trying it
PS: If i flash this can i just flash my Unofficial TWRP from our forum should it not work? Or can damage be done?
I have no idea! I assume the issues are because of twrp or something in that area.. I have tried flashing system images via fastboot but for some reason I get errors trying it.. I'm not sure what the main issue is on why they don't boot but i would strongly suggest to not try flashing any twrp that's not specifically for our device as you could brick or even break your phone!
danielfrancisarthurs said:
I have no idea! I assume the issues are because of twrp or something in that area.. I have tried flashing system images via fastboot but for some reason I get errors trying it.. I'm not sure what the main issue is on why they don't boot but i would strongly suggest to not try flashing any twrp that's not specifically for our device as you could brick or even break your phone!
Click to expand...
Click to collapse
Apparently you don't need to use twrp at all, I've successfully flashed system images, via fastboot, but they've never booted which is horrible because there's just nothing else here.
In regards to flashing twrp, again apparently if it goes wrong then we can just flash the stock recovery, personally I think flashing another functional recovery would work too. But in all fairness the one in the p20 lite thread doesn't work any more than ours does in the pro thread.
Just hoping things move along.
Yeah I'd assume so.. I haven't been able to flash any image via fastboot but I'd assume it's the ROMs not the recovery.. anyway just heard that Huawei have released the Source code for the P20 so maybe it might be good news for the treble ROMs if they were to implement fixes for the boot loops!
danielfrancisarthurs said:
Yeah I'd assume so.. I haven't been able to flash any image via fastboot but I'd assume it's the ROMs not the recovery.. anyway just heard that Huawei have released the Source code for the P20 so maybe it might be good news for the treble ROMs if they were to implement fixes for the boot loops!
Click to expand...
Click to collapse
Sounds superb on any other flagship in the world, really hope this one picks up, it's a great device, never been happier with a stock ROM before, I think with all aosp lineage ROMs there's going to be huge issues fixing the cameras. Twos hard enough, 3 lol very hard.
Not trying to be negative just a bit worried is all
Can someone take a video of the boot loop
There's actually a method to how this phone loops. It could indicate the problem
Not sure about the camera but there's always ports into the future.. anything is possible! But could be a while till we are able to be booting any decent treble ROMs.. but then again as the source code has been released it may not be that long.. depends how quick the developers for treble react and whether or not they have a Huawei device to work with to fix our issues..
All we can do is hope!
---------- Post added at 11:12 PM ---------- Previous post was at 11:09 PM ----------
I will give it a try flashing a system image again tomorrow and take a video of it if I'm able to! But someone else needs to give it a try too just incase I don't get time please? The best way I can explain it is once the system.img is flashed in twrp I restart system as normal and it boots up normally with the Huawei logo when phone turns on then goes to bootloader unlocked screen and press different buttons for different options to boot from or wait until device boots normally so I wait for it to boot normally and soon as I get past the unlocked bootloader screen it just instantly reboots and just keeps rebooting doing that!
virtyx said:
Can someone take a video of the boot loop
There's actually a method to how this phone loops. It could indicate the problem
Click to expand...
Click to collapse
What signs are you looking for?
First time I tried it went from the press up for 3 seconds page then black, then vibrate then back to solid white Huawei, repeated 3 times until eRecovery asked to wipe.
For me after that point I flashed another and it went through to a lower case android sign, changing times from white to silver in a flow type effect, it stayed that way for around 10 minutes then back to eRecovery, flashing another treble ROM did the same thing.
Currently running: c782, 110, L09 p20 Pro, unofficial twrp and magisk.
The initial installation was via twrp, subsequent flashes wereb performed via fastboot.
Thats pretty much the same for me of what happens! Just boots then get a boot loop and black screen and back to the Huawei logo again from the start.. never able to actually boot a rom..
danielfrancisarthurs said:
Thats pretty much the same for me of what happens! Just boots then get a boot loop and black screen and back to the Huawei logo again from the start.. never able to actually boot a rom..
Click to expand...
Click to collapse
I thought the idea of treble was to match the Android version?
Seems as though it's trial and error with what's allowed.
Treble is still a work in development at the moment.. it doesn't help as well that Huawei are being assholes and making developers want to stay away from Huawei completely due to the whole locking bootloader thing but hopefully there are a couple of developers out there that keeps our devices in mind and hopefully means we will see a fix for our devices soon.. but when that is I have no idea..
danielfrancisarthurs said:
Treble is still a work in development at the moment.. it doesn't help as well that Huawei are being assholes and making developers want to stay away from Huawei completely due to the whole locking bootloader thing but hopefully there are a couple of developers out there that keeps our devices in mind and hopefully means we will see a fix for our devices soon.. but when that is I have no idea..
Click to expand...
Click to collapse
Aye it looks grim, that being said though, the stock ROM with a few tweaks is excellent, I've never once liked a stock ROM before on any device.
Root is easy, twrp is workable, bootloader was a breeze, we only have one actual ROM (LOS) but by all accounts even the p20 Pro camera works exactly the same on that, with that in mind what more do we need?
Course I'd like to be up to my neck in baked ROMs but if you're honest we truly only stick with one or two, as it turns out the two we have are pretty great.
Maybe I'm being optimistic
Just had a reply from another thread, quite interesting...
dladz said:
So in order...
Wipe
Flash ROM / IMG
Factory rest via twrp?
We're you referring to me by the way?
Click to expand...
Click to collapse
Yes, lol
the way i did it was with a stock recovery and system image
boot into erecovery and do a factory reset or a fastboot -w
boot back into the bootloader
flash the system image for the treble rom
then go into erecovery and do a factory reset
and then it should boot no problem at all
twrp cant wipe properly on treble roms
ive done the same on my p20 lite today, all stock and no issues booting at all
let me know how you get on
:good:
From this thread
https://forum.xda-developers.com/huawei-p20-lite/development/recovery-twrp-3-2-1-0-t3782866/page2
Hi, i have been occupied all day to get this to work, it just doesnt. i have followed the exact steps you layed out but when i try to factory reset after flashing the treble rom using fastboot it just gives me the error: "reset failed". I have tried using other GSI images but none work, had to restore my phone thrice because of this. I dont know what is the issue. These are the steps i followed:
1. Went completely stock ( no twrp or root )
2. Successfully factory reset my device.
3. Boot into fastboot and then flash a treble GSI.
4. as soon as the device turned on, went to the recovery to attempt a data wipe but at around 60% of the process completion the recovery gives the error with a red exclamation mark enclosed in the circle.
My device is a CLT-29 (C185). Was really looking forward to treble as my previous device was a Oneplus.
psycho.b94 said:
Hi, i have been occupied all day to get this to work, it just doesnt. i have followed the exact steps you layed out but when i try to factory reset after flashing the treble rom using fastboot it just gives me the error: "reset failed". I have tried using other GSI images but none work, had to restore my phone thrice because of this. I dont know what is the issue. These are the steps i followed:
1. Went completely stock ( no twrp or root )
2. Successfully factory reset my device.
3. Boot into fastboot and then flash a treble GSI.
4. as soon as the device turned on, went to the recovery to attempt a data wipe but at around 60% of the process completion the recovery gives the error with a red exclamation mark enclosed in the circle.
My device is a CLT-29 (C185). Was really looking forward to treble as my previous device was a Oneplus.
Click to expand...
Click to collapse
Ah the OnePlus , got the 5 still with me, great phone, great development.
Perhaps if your device was debrand? Could that be it?
Maybe it's just not meant to be

What New Hell Is This? Boot loop, will not even completely power off.

I thought I had finally reached nirvana with this device thanks to the help of so many here. I had TWRP, root, defeated encryption, and a nicely running Android. I was even able to make TWRP backups of /data and /boot (to be precise, at one point - not sure when it was but I think after initial Android setup - I was able to make a much more complete TWRP backup with many partitions never shown again but that disappeared at some point).
So I went on with my transition from my old Note3 phone to this device. I spent all day yesterday moving TiBackups of user apps, copying across data, making more limited TWRP backups (of data and boot the only options - except if I mounted system_root, which allowed me to include /system but that did not actually work either), polishing settings, and thinking I had it made! Throughout all of this I had no problems or signs of problems other than some apps not working on the new device and having to be replaced with alternatives which I completely expected.
At cocktail hour I decided to do a reboot to see the "finished product" of all this effort. When I did, the device tried to boot into Android: I saw the thinq logo but no boot animation, just the thinq logo for a very long time - followed by a screen blank and bootloop. I was able to enter TWRP and things looked "normal" from there. I kept trying to boot into system with no progress. I tried wiping /data, I tried restoring the backups I had made. Nothing changed - still bootlooping.
From within TWRP I can use adb shell to look around. I can see familiar stuff from my installed apps in /data/data and /data/app - including from one of the very last apps I installed (from Play not via TiBackup). I know this was not in any TWRP backup I had taken or restored. So this makes me think that my attempts to restore /data from backups or even wiping /data from TWRP have had no effect despite no errors showing. I wanted to see what was in /system so I mounted system and now in adb shell I can see familiar stuff in there too - including busybox installed into xbin. I can also mount vendor and in /vendor/etc I can see the fstab.judypn with encryptable for /data.
One thing I do NOT see is the result of one of the last things I did/tested. I installed Termux, installed the dropbear package, and copied the resulting dbclient binary to /data/local. After doing this I actually invoked /data/local/dbclient with success. Now, I do not see anything in /data/data/com.termux/files/usr related to dropbear nor do I see the dbclient in /data/local.
When I tried to power off from TWRP, the device never fully turned off. The animation showing the power level remained showing all the time but it was just a circle with lightening bolt but no actual power level showing. Removing power cable made no difference. Finally, I left the device in TWRP and powered on. At least I could blank the screen and prevent the battery from running dry.
All of this is with slot A current as reported by TWRP. I cannot seem to enter fastboot mode (I was previously able to do this from a power off condition by holding volume up and inserting USB). Of course, I am not able to achieve a real powered-off condition. Thankfully, I am still able to enter engineering mode and see the device in QFIL. But I have not tried anything here as of now. I can switch to slot b and get into download mode by holding power up and inserting USB. All attempts to use other TWRP boot options (save recovery and "power off") just put me into bootloop again.
I am stumped as to what is happening, how to "fix" this, or what to do.
Thanks for any suggestions.
Same thing happened to me. Yesterday.
I was going through my system programs, and nuked several of the extra Google Play items (Movies, Music, etc.). Same thing. Boot to V40 ThinkQ screen. Sat there for a while. Then reboot.
Nothing I did brought the old girl back to life. So I started over with kdz and redid everything again. Pain in the ass, but it's working again. Interestingly enough, loading the full kdz didn't relock the bootloader. I used both Refurbish and Partition DL on two separate attempts. Bootloader stayed unlocked throughout, and is still unlocked.
Had a devil of a time getting system to mount. Tried over and over again to get Magisk installed.
What finally worked was rebooting into recovery after pushing the .magisk file, and only then installing Magisk.
[NG]Owner
NGOwner said:
Same thing happened to me. Yesterday.
I was going through my system programs, and nuked several of the extra Google Play items (Movies, Music, etc.). Same thing. Boot to V40 ThinkQ screen. Sat there for a while. Then reboot.
Nothing I did brought the old girl back to life. So I started over with kdz and redid everything again. Pain in the ass, but it's working again. Interestingly enough, loading the full kdz didn't relock the bootloader. I used both Refurbish and Partition DL on two separate attempts. Bootloader stayed unlocked throughout, and is still unlocked.
Had a devil of a time getting system to mount. Tried over and over again to get Magisk installed.
What finally worked was rebooting into recovery after pushing the .magisk file, and only then installing Magisk.
[NG]Owner
Click to expand...
Click to collapse
Well, they say misery loves company and I do feel a bit better just knowing I am not alone here.
Since I could enter download mode, I too decided to try re-flashing the .kdz using LGUP's partition dl and specifically NOT checking boot_a, laf_a or boot_b as described here <https://forum.xda-developers.com/showpost.php?p=82206107&postcount=115>. I was not fast enough to get into TWRP on the automatic reboot and saw that I was brought to a bootable system and an Android start page with the boot loader still locked and TWRP still there.
So did the partition dl again and managed to catch TWRP. I mounted vendor but when I tried to push the fstab I got something I have not seen before "remote could not create file: Read-only file system" and 0 files pushed. To be sure, I used adb shell and cat'ed /vendor/etc/fstab.judypn and it contains force encrypt. So I know things are not quite right.
Trying again from the partition dl. And this time I managed the push. I think I missed re-doing the ramdisk and rebooting into recovery. I made sure to do that this time and now I can proceed. I seem to have managed to get back to a bootable Android with TWRP, Magisk, and defeated encryption once again.
So I wonder if I should try to restore anything from a backup or just redo all of yesterday's efforts (like the movie Groundhog Day)?
Can I ask which device and firmware you are using? Thanks
I would not use any backups aside from the backups in your google account. Redo all of yesterday's efforts (except the one thing that caused the reboot loop ... whatever that was!).
You said your bootloader was relocked after LGUP? Or did you mistype there?
Odd. Mine wasn't, not once. Despite multiple LGUP loads.
I've got a crossflashed Sprint LM-V405UA to US specs 20E.
And yes, misery does love company!
[NG]Owner
NGOwner said:
I would not use any backups aside from the backups in your google account. Redo all of yesterday's efforts (except the one thing that caused the reboot loop ... whatever that was!).
You said your bootloader was relocked after LGUP? Or did you mistype there?
Odd. Mine wasn't, not once. Despite multiple LGUP loads.
I've got a crossflashed Sprint LM-V405UA to US specs 20E.
And yes, misery does love company!
[NG]Owner
Click to expand...
Click to collapse
No, you are correct - I mistyped. My bootloader has remained unlocked (this time I got it right)
Nor sure it matters any, but mine if a 405QA with 20E.
I have read some recently (while searching for this bootloop problem) that LG seems to have long had a problem with bootloops on their devices. Not sure I saw anything specifically about the V40 though. Seems that in the past they were "fixed" with software updates. I do not expect any updates beyond 20E and wonder if 20a (which I think I had earlier) would be any different/better.
I have had great luck with Nandroid and TWRP backups in the past. They have really saved me (most often from myself but also from apps/mods gone wild). Indeed, I used TWRP restore yesterday with the previous night's auto-made backup on my Note 3. It seems that in doing something - maybe the TiBackup of all user apps/data - the phone got messed up and even reboots would not fix it. The TWRP restore certainly did!
I am new to the whole Magisk "systemless" root as I have always used SuperSu before. As I understand it (which is limited for sure) the idea here is to NOT modify system in any way. But I also note that this does not seem to preclude me from modifying things in system using my file manager, for example. And I did some of this sort of thing. If you are nuking pre-installed apps, that would be changing system as well, no? I wonder if that is the activity that caused this?
I am a bit hesitant to re-live yesterday. At least not until I have some idea of what I did that caused this. Not sure what I will do.
Thanks for all the help.
PS - given that I had TWRP backup (of at least /data) and how often I rely upon these in everyday life, I decided to at least try restoring and see what happened. Hard to imagine ending up worse that I was earlier this morning. I did the restore and rebooted to system. I was shocked, quite frankly, to see the system come right up and have many of my previously installed apps visible and working. I did find that I had to re-enable the modules in EdXposed (even though they showed as enabled already) since they were not working) and that brought them back to life.
So I guess I can move forward from here being careful, taking TWRP backups even more often, and rebooting more often to see what, if anything, kills this again.
NGOwner said:
Same thing happened to me. Yesterday.
I was going through my system programs, and nuked several of the extra Google Play items (Movies, Music, etc.). Same thing. Boot to V40 ThinkQ screen. Sat there for a while. Then reboot.
Nothing I did brought the old girl back to life. So I started over with kdz and redid everything again. Pain in the ass, but it's working again. Interestingly enough, loading the full kdz didn't relock the bootloader. I used both Refurbish and Partition DL on two separate attempts. Bootloader stayed unlocked throughout, and is still unlocked.
Had a devil of a time getting system to mount. Tried over and over again to get Magisk installed.
What finally worked was rebooting into recovery after pushing the .magisk file, and only then installing Magisk.
[NG]Owner
Click to expand...
Click to collapse
Well, this happened to me once again. I saw no reason why it should not do so. So I have been re-introducing apps from my TiBackup slowly and in under a strict protocol in an effort to (a) limit the damage done to my work and (b) try to isolate the culprit(s). I decided, since I found that I could restore TWRP backups of /data after re-doing the most of the TWRP install and defeat encryption process, that I would install apps slowly and execute them and in small groups. After each group I would do a reboot to see if that worked. If that worked, I would go into TWRP, run a backup, and name the backup of /data with something to id the app group that was added and seemed fine.
I started working backwards by the first letter of the app name. I first did U-Z and found that worked fine. Took a backup and went on to S-T. After this group it was bootloop time! So I put humpty-dumpty back together, restored the /data backup from U-Z, and this time installed only those apps starting with T. After this a no-problem reboot and a backup of /data and I will continue to plod on with those apps starting with S (and so on).
Horribly tedious. I can see no other way to proceed unless someone has a better idea.
PS - So I re-installed apps starting with S and basically had no problems. Hmmm. But I do recall that when testing execution of some of these apps the first time around, I decided to install busybox (Stericson), AdAway, and Afwall+ out of sequence. Before I did this I decided to check a bit more. I found that there is a Magisk busybox module and even though I have always used Stericson without troubles, I thought it best to use the Magisk module for this. I also found that Magisk has a setting for systemless hosts which could be affected by AdAway. So I enabled that before doing anything with AdAway. I also checked to see if AfWall+ might have any issues and found none. So I guess it is possible that using Stericson busybox or failing to use systemless hosts could have been an issue. I may never know for sure but at least so far I am fine after installing apps that I previously installed and had a bootloop. So FYI.
Alright, I'm a total idiot. I went and did this again, following the mantra: If it aint broke, you're not trying hard enough.
Setting all that aside, I went and tried to do some more debloating of my v40 (used this guide, that I was linked to from here), and wound up in "this fresh hell" again. Dammit! Crap.
So apparently there is a system application that is crucial to the boot of the phone that I uninstalled.
There is a fix to this, but it comes at a cost. Get into TWRP. Navigate to advanced, select Fix Recovery Reboot. Your phone will boot normally now. But you will lose root. And (so far) any attempt to reinstall Magisk to re-obtain root will result in the same bootloop again.
So here's where I need some help:
1) So if I wanted to reinstall my system partition to get back to stock from a KDZ, but still keep my installed apps, etc., how do I do that?
2) How do I get my Slot B to work correctly? It has only bootlooped there. Since I got my phone. Once I get my phone back to operational state with root, how do I make sure that Slot B works (so I have a backup I can fall back on if (when) I bork something else?
[NG]Owner

[Question] regarding installation of Magisk from recovery

Hi,
Please indulge me if this it a bit silly, but I am confused about installing magisk from recovery. I flashed the patched image to recovery partition, as per the github guide (https%3A//topjohnwu.github.io/Magisk/install.html%23boot-image-patching, sorry for the encoding, system forbids me to post link cuz I am new). Yet at this point I am unsure about what to do next. This is what I see now when I boot my phone to recovery using key combo:
- Reboot system now
- Apply update from ADB
- Apply update from internal storage
- Wipe data/factory reset
- Wipe cache partition
- Mounts a storage
If I select "Reboot system now", nothing seem to happen and it all looks like a normal startup.
In short, I would like to know how to run to a ystem with Magisk enabled.
Thanks in advance!
You're not actually supposed to boot to recovery. You need to release the key combo once you see the splash screen. Reference:
https://topjohnwu.github.io/Magisk/install.html#magisk-in-recovery
Edit: and don't worry... Everyone's a noob at some point or another.
Didgeridoohan is right: It sounds like you're booting into your phone's stock recovery, instead of your custom recovery.
Forgive my presumptions, or if I sound condescending, but if you happened to have patched and flashed your partition mods with a PC, you might want to check if you even have a custom recovery installed. (I know that some phones aren't capable of having a custom recovery flashed, so your situation might be different.) If you don't have one, that would be the first step (most folks use TWRP). Once you can boot into your custom recovery, though, you should be good.
Sent from my LG V20 (VS995), Alpha Omega ROM, Oreo 8.0, rooted (Magisk 20.4), using Tapatalk
Didgeridoohan said:
You're not actually supposed to boot to recovery. You need to release the key combo once you see the splash screen. Reference: ...install.html#magisk-in-recovery
Edit: and don't worry... Everyone's a noob at some point or another.
Click to expand...
Click to collapse
Right, this is the part where I get confused. I did follow the link you mentioned. After pressing [power] & [volume up] for about 8 seconds, I feel a vibration and the screen lights up, thats when i released the keys. I ended up getting that menu i describe above...(tears)...
Ideally, what should I see if things go right?
NeoHiPPy1980 said:
Didgeridoohan is right: It sounds like you're booting into your phone's stock recovery, instead of your custom recovery.
Forgive my presumptions, or if I sound condescending, but if you happened to have patched and flashed your partition mods with a PC, you might want to check if you even have a custom recovery installed. (I know that some phones aren't capable of having a custom recovery flashed, so your situation might be different.) If you don't have one, that would be the first step (most folks use TWRP). Once you can boot into your custom recovery, though, you should be good.
Sent from my LG V20 (VS995), Alpha Omega ROM, Oreo 8.0, rooted (Magisk 20.4), using Tapatalk
Click to expand...
Click to collapse
No worries. Any suggestion is much ppreciated. Just to be sure (correct me if i m wrong), I thought that patching an image file is an independent way of installing magisk in case custom recovery is not available. So that s my case.
Anyhow, I would really like to learn a bit more about the situation where recovery partition contains both the stock recovery and custom recovery/patched image. There doesnt seem to be any difference whether i release the key combo or not once I see a splash screen. I always end up with that blue menu in recovery.
Wubwubdubdub said:
No worries. Any suggestion is much ppreciated. Just to be sure (correct me if i m wrong), I thought that patching an image file is an independent way of installing magisk in case custom recovery is not available. So that s my case.
Anyhow, I would really like to learn a bit more about the situation where recovery partition contains both the stock recovery and custom recovery/patched image. There doesnt seem to be any difference whether i release the key combo or not once I see a splash screen. I always end up with that blue menu in recovery.
Click to expand...
Click to collapse
If you don't mind my asking, which model of phone do you have? Most phones have a similar button combo, but are a bit quirky to get into the recovery.
Ex: On my LG V20, I have to hold Vol-, and Power, but release the power button at the splash screen for 0.5-1 seconds (while still holding Vol-) and then press/hold the Power button again...
As a suggestion, you may want to see if your phone has a similar quirk, depending on the make /model.
Sent from my LG V20 (VS995), Alpha Omega ROM, Oreo 8.0, rooted (Magisk 20.4), using Tapatalk
[Solved] by flashing boot image instead of recovery image
I am still puzzled by the complications with booting into recovery mode. To work around it, I attemped installing Magisk using boot image patch and succeeded. Objective achieved yet question remains. Anyways, a big thanks to Didgeridoohan and NeoHiPPy1980. Knowing that someone will provide help is what stopped me from giving up.
NeoHiPPy1980 said:
If you don't mind my asking, which model of phone do you have? Most phones have a similar button combo, but are a bit quirky to get into the recovery.
Ex: On my LG V20, I have to hold Vol-, and Power, but release the power button at the splash screen for 0.5-1 seconds (while still holding Vol-) and then press/hold the Power button again...
As a suggestion, you may want to see if your phone has a similar quirk, depending on the make /model.
Sent from my LG V20 (VS995), Alpha Omega ROM, Oreo 8.0, rooted (Magisk 20.4), using Tapatalk
Click to expand...
Click to collapse
I have a Ulefone, not sure if you ve heard of it
But that won't matter. I managed to get it working another way (see to my last post). I should probably have done that before making this post. Thanks for your assistance!
Great to hear you got things working, but why did you think you needed to use the recovery image for your device? Was any of the installation instructions unclear and in need of improvement (I'm just trying to learn for future reference)?
Didgeridoohan said:
Great to hear you got things working, but why did you think you needed to use the recovery image for your device? Was any of the installation instructions unclear and in need of improvement (I'm just trying to learn for future reference)?
Click to expand...
Click to collapse
Frankly, I find the Magisk Installation Guide to be one of very few documentation that is concise, coherent and user-friendly for both regular user and developer. So a big thumb up for you all! For your reference, here is the process of how I was lead to believe I needed the recovery img:
1.
I followed the instruction on "know your device" (https%3A//topjohnwu.github.io/Magisk/install.html#knowing-your-device). The first command returns nothing and the seconde comand returns true. Naturally, I assumed this means that my device is using system-as-root on a non-A/B device.
2.
I then read:
If your device is NOT A/B, but IS using system-as-root, then you will have to install Magisk to the recovery partition of your device. Follow the instructions in Boot Image Patching, but instead of using your boot image, use your recovery image. "
Click to expand...
Click to collapse
(https%3A//topjohnwu.github.io/Magisk/install.html#getting-started)
I am not sure if I misunderstood sth. At this point I still believe that according to the instruction I should have patched my recovery image. I do not know what system-as-boot actually is...
Yes, it does seem like your device is A-only system-as-root, which would normally mean you need to use the recovery image.
Unfortunately, with the Android ecosystem being as fractured as it is there will always be exceptions...
Thanks for the detailed response.
Hi Guys
Wubwubdubdub, I have got a question for you. I followed the same instructions as you mentioned in first post and ran into problems as well. How did you get around this problem? What is the difference between the two ways you mentioned here? (I believe I used the first way).
Wubwubdubdub said:
I flashed the patched image to recovery partition, as per the github guide
Click to expand...
Click to collapse
Wubwubdubdub said:
To work around it, I attemped installing Magisk using boot image patch and succeeded. Objective achieved yet question remains.
Click to expand...
Click to collapse
Thanks in advance!
MM

Having trouble flashing a custom rom. Tried Graphene now trying to put Lineage but no luck

I originally was able to put GrapheneOS using their site's instruction and web based system. I was having lot of issues with it though, like I could not get group texting to work properly then found an app that supports it but I kept receiving old texts that were already sent to me before so kept trying to find a text app that works and was having no luck. Then I went to make a phone call and realized it was not even letting me do a phone call, it would just drop as soon as it tries to dial.
So I gave up with that and tried to load Lineage, following these instructions:
Install LineageOS on bramble | LineageOS Wiki
wiki.lineageos.org
Though maybe one thing I SHOULD have done that I didn't, is I did not bother putting in stock android back on, I just went straight to the steps for Lineage. I unsecured boot loader, enabled USB debug and all that too, then proceeded to load the recovery image. This is where things started to go south. After it was done loading, if I tried to boot into recovery, it did not do it. If I do try to boot into recovery I see the Google logo for a bit then it just goes back to fastboot. I also tried different ways to load it such as --slot all etc.
Now it's just doing the google logo, and then goes to the screen that warns about image being unsecure, then back to google logo and just doing that recursivly. If I try to hold down power button and any volume button (up or down) it will interrupt it and give me option to pause it, but that's it.
I put it in the freezer for now to see if it kills the battery faster as maybe it will stop doing this once the battery dies and it can actually shut down... but I am open to any other options.
Did I brick it? I have a feeling I got myself a $700 paperweight. I presume there must be a way to remove the storage chip and put a new one in or something right? Thanks in advance.
Ended up getting it going, letting it die completely so the loop stops let me get into fastboot mode again. It was quite painstaking but I eventually managed to get CalyxOS on it. I could not get Lineage because the recovery partition step of the install always failed, CalyxOS uses a different way to get the rom on that does not use that step.

Categories

Resources