[Q] Return to Stock from Linux - G2 Q&A, Help & Troubleshooting

Hello all,
I have a shiny new Sprint LG G2 that I want to flash with CM11. I haven't done anything to it yet; it's currently installing the ZV8 OTA update (and has been for about half an hour, but that's another story).
Before I flash it with anything, I want to make double sure that I can restore it to stock (or to stock post-OTA). Unfortunately, I run Ubuntu, and the only return-to-stock tutorials I have seen are like this one and require hacking up a copy of LG's Windows-only "LG Flash Tool".
I have found a procedure to recover from a few different kinds of soft-bricking, including trying to do an OTA on a non-stock recovery, or having messed up one's boot partitions so the secure boot checks do not pass. It appears that when the phone is in "qhsusb_bulk" mode, Ubuntu will automatically (with no additional drivers) detect it as a 36-partition block device, whereupon you can just dd things to and from all of the various partitions on the phone.
1. If were to get my phone into "qhsusb_bulk" mode, could I just dd all 36 partitions to their own image files from the host PC, and restore them later by doing the reverse?
2. How do I put a Sprint G2 variant (LS980) into "qhsusb_bulk" mode? Do I have to screw up something so that it will fail to boot?
3. Is there any documentation I can read on "qhsusb_bulk" mode? Is it possible to brick the phone so badly by overwriting the wrong partition that I can't get into it to fix it?
4. Is there some other equivalent of the LG Flash Tool process for Linux?
Thanks in advance!

You should just install custom recovery, backup stock ROM, factory reset everything, Install CM11 & GAPPS, and move the stock backup to your laptop or keep on your phone?
That's what I did when i first got my phone, I right away went home backed up stock ROM and flash Paranoid Android. I just went back to stock yesterday from my backup and it's working great
I'm running Ubuntu 13.10 and if anything goes wrong, meaning if you get into a bootloop or recoveryloop, I always adb sideload a ROM and get it up and running again.

xxxrichievxxx said:
You should just install custom recovery, backup stock ROM, factory reset everything, Install CM11 & GAPPS, and move the stock backup to your laptop or keep on your phone?
That's what I did when i first got my phone, I right away went home backed up stock ROM and flash Paranoid Android. I just went back to stock yesterday from my backup and it's working great
I'm running Ubuntu 13.10 and if anything goes wrong, meaning if you get into a bootloop or recoveryloop, I always adb sideload a ROM and get it up and running again.
Click to expand...
Click to collapse
That sounds like it will cover everything but the recovery partition.
How is the stock recovery image backed up in this method, if you overwrite it with the custom recovery as the first step? Is it not backed up? Does the factory reset somehow restore it?

OK, I've done some more experimenting and poking around on IRC, and I have found this (for Sprint models, because that's what I have):
1. ioroot15 can temporarily root the device, without replacing anythig or even instaling su. Just ctrl+c it at the prompt.
2. Once that's done, "adb shell" gives you root, so you can dd the stock recovery (or anything else) from its partition to an .img, and dd TWRP over it like this:
Code:
cd /sdcard
dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=stock-recovery.img
dd if=openrecovery-twrp-2.6.3.2-g2spr.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
3. If you don't even want to make your own backup the Sprint ZV8 stock partition images are all available for download. I can't tell you where they are, because I am apparently not allowed to post links. So if you ever need them you will have to cry and curse the forum admins. They can be flashed back with the temp-root method.
So, you can back up your recovery, flash a custom recovery, backup the rest of your system, and keep both those backups. To return to stock, restore your backup with your custom recovery, then do the temp-root and restore the stock recovery.

Related

Did anyone's TWRP become broken after updating to 4.4.2?

Did anyone's TWRP become broken after updating to 4.4.2? Thought I'd ask because everytime I attempted to gain access to Recovery Mode, I would get an error (it said something like "No connecrtion"). I had to manually flash TWRP with Wugs and was able to successfully gain access to Recovery Mode again.
urbanman2004 said:
Did anyone's TWRP become broken after updating to 4.4.2? Thought I'd ask because everytime I attempted to gain access to Recovery Mode, I would get an error (it said something like "No connecrtion"). I had to manually flash TWRP with Wugs and was able to successfully gain access to Recovery Mode again.
Click to expand...
Click to collapse
I've not updated my Nexus 7 to KitKat yet, but I just noticed on my Nexus 5 that TWRP is broken after updating to the 4.4.2 OTA. I don't get the "No connection" error, I just get the little dead android icon with the red exclamation point. Too bad I'm at work and won't be able to re-flash it until I get home.
You're not alone.
urbanman2004 said:
Did anyone's TWRP become broken after updating to 4.4.2? Thought I'd ask because everytime I attempted to gain access to Recovery Mode, I would get an error (it said something like "No connecrtion"). I had to manually flash TWRP with Wugs and was able to successfully gain access to Recovery Mode again.
Click to expand...
Click to collapse
Lacking any and all details about how you upgraded, I would have to say that is to be expected. The OTAs usually directly overwrite the recovery with a new version of the stock recovery.
Moreover, the most recent OTA used that "/system/recovery-from-boot.p" patch file and associated script "/system/etc/install-recovery.sh" mechanism that automatically overwrites the recovery by patching the boot partition image; I think this happens either on every boot (or maybe during a clean shutdown).
So, not having noticed that, I flashed a custom recovery & booted the stock ROM... and next time I rebooted into recovery, I was back at the stock recovery ... WTF?, right?
I renamed those files to stop that from happening. I think some of the recoveries are aware of this and perform similar tricks on your behalf when they "install root" for you, but if you continue to get your recovery overwritten by stock, this is the place to look.
FYI I capture a full nandroid backup of every new stock release, whether or not I plan on using stock. I set them aside (copy them to a PC) so that they are always available.
I do this by:
- TiBu user app & data backup
- make a nandroid backup of my current ROM
- restore a nandroid backup of the prior release of the pure Stock ROM including it's matching stock recovery
- take the OTA and apply it (note everything is COMPLETELY, 100% stock during this operation)
- soft-boot a custom recovery via fastboot ("fastboot boot ...")
- make a nandroid backup of the new pure Stock ROM, including it's matching stock recovery
- flash a custom recovery and either restore a different ROM, or root the stock ROM and move forward with TiBu
This may seem like a lot of work, but it preserves maximum flexibility and safety:
(a) I can roll back to pure stock (any version!) any time I please from my archive of stock nandroid backups.
(b) I never - ever - have problems with OTA installation (including hazardous things like bootloader installs)
(c) I never need to go begging on the internet "please anybody, can you send me file "xxxx" from the stock release "xyz" ? I already have them - all of them.**
hope that helps
** note that TWRP's ".win" files are just tar archives. You don't even need to restore prior ROMs to pluck out individual stock ROM files.

[Q] Soft brick after trying to flash resurrection

I have a G2 from Verizon (VS980).
It was running KitKat 4.4.2 stock rooted.
I run a Nandroid backup using TWRP.
I flashed the Resurrection Remix ROM.
On restart I entered a boot loop.
Turned off, rebooted into TWRP recovery, did a complete swipe (system, cache, dalvik and data).
Tried restoring from Nandroid backup and could not find any backup files (perhaps I don't know where to look but all folders appear empty).
Tried rebooting into download mode and got stuck at installing some drivers (could take 10 minutes) with nothing happening.
Screen says Rooted and I am guessing that could be the issue. I don't know how to proceed.
Can someone help please?
Download another 4.4.2 based ROM. I'm assuming you are attempting to flash a lollipop 5.0.2 ROM. Is that the case?
untamed1 said:
I have a G2 from Verizon (VS980).
It was running KitKat 4.4.2 stock rooted.
I run a Nandroid backup using TWRP.
I flashed the Resurrection Remix ROM.
On restart I entered a boot loop.
Turned off, rebooted into TWRP recovery, did a complete swipe (system, cache, dalvik and data).
Tried restoring from Nandroid backup and could not find any backup files (perhaps I don't know where to look but all folders appear empty).
Tried rebooting into download mode and got stuck at installing some drivers (could take 10 minutes) with nothing happening.
Screen says Rooted and I am guessing that could be the issue. I don't know how to proceed.
Can someone help please?
Click to expand...
Click to collapse
I ran in to that problem when trying to go from a G3 rom to Lollipop. My solution was this:
1. Boot in to TWRP
2. Plug phone in to computer (pc should recognize it; sometimes it wouldn't and I had to mount then unmount /system partition from TWRP
3. Drag and drop a Kit Kat based rom (and GAAPS if need be) from your computer on to the root of your device
4. Flash from there
Let me know if you have any issues with that. I did manage to lose everything saved on my device which led me to a valuable lesson learned, that being: once you back up the device in TWRP, be sure to transfer that backup to your PC in case you mistakenly wipe the device clean later.
RETRObruzzin said:
I ran in to that problem when trying to go from a G3 rom to Lollipop. My solution was this:
1. Boot in to TWRP
2. Plug phone in to computer (pc should recognize it; sometimes it wouldn't and I had to mount then unmount /system partition from TWRP
3. Drag and drop a Kit Kat based rom (and GAAPS if need be) from your computer on to the root of your device
4. Flash from there
Let me know if you have any issues with that. I did manage to lose everything saved on my device which led me to a valuable lesson learned, that being: once you back up the device in TWRP, be sure to transfer that backup to your PC in case you mistakenly wipe the device clean later.
Click to expand...
Click to collapse
Retobuzzing, thank you for the quick response. Thanks also for your last recommendation, gotta do that too next time.
I have actually found my solution reading in a post that I should try entering download mode by pressing both volume keys together while you connect the micro usb connector. That worked even though the screen gives you no feedback except for the led turning red (kind of scary at first :fingers-crossed.
After doing that I was able to follow the directions in the article titled: "How to unbrick LG G2 with stock firmware" at the Androidcure.com site.
The phone was restored to the original stock conditions and later I was able to update it to software version 26A.
Note to Forum Moderators: You can close this tread if desired. Thanks.
Yes I am!
Snuzzo said:
Download another 4.4.2 based ROM. I'm assuming you are attempting to flash a lollipop 5.0.2 ROM. Is that the case?
Click to expand...
Click to collapse
Your assumption is right on the money.:good:
Do you have a suggestion on a better lollipop ROM for the G2?
Any idea on could have caused the boot loop after flashing Resurrection remix?
untamed1 said:
Your assumption is right on the money.:good:
Do you have a suggestion on a better lollipop ROM for the G2?
Any idea on could have caused the boot loop after flashing Resurrection remix?
Click to expand...
Click to collapse
Only 1 assumption. Didnt downdate back to 12b bootloader/modem.

Dirty Santa and Restoring From Backups - Suck in some kind of limbo?

So I would have asked this question directly in the DirtySanta thread, but apparently I don't have enough posts to actually do anything there yet.
So my device is now in a rather bizzare zombie state. I did manage to get my device fully rooted with TWRP installed. Followed the instructions on how to get everything working with no problems. I ended up wanting to try to flash some audio mods (V4A and such), however they did not install properly, so I went and did what anyone else would do - restored to a full backup I made of the device before I started mucking about.
The restore did complete successfully, and I still have a device that has a working recovery, and an OS with root permission...but I can't flash anything anymore from TWRP. TWRP is unable to mount the /system partition after the restore, and seems convinced that I have no OS installed, even though there is one and the phone boots into it just fine. The restore I'm on now is post-flashing the Konverged Kernel. Attempting to restore to an even earlier backup (one I made just before flashing Konverged) produces similar results - the restore succeeds and produces a bootable phone, but TWRP still can't flash anything.
Just to cover bases I also tried running "fastboot flash recovery twrp-3.0.2-1-us996.img" again in case TWRP got messed up (trying to get the "Swipe to allow system changes" prompt to reappear - it didn't), with no changes - TWRP still works fine, but cant mount and edit /system and still claims I have no OS installed when requesting a reboot.
Any advice on how to get things working again would be greatly appreciated! Thanks!
This may be an issue with TWRP. When I had my Galaxy S3 rooted back in the day I would have this issue, also with a Nexus tablet I rooted as well. It turns out I needed to flash a specific "fixed" version of TWRP to fix the mount/flash issue. That was a long time ago though, so this might not be the problem, but I thought I would at least tell you my experience.
Sent from my LG-LS997 using Tapatalk
biglightbt said:
So I would have asked this question directly in the DirtySanta thread, but apparently I don't have enough posts to actually do anything there yet.
So my device is now in a rather bizzare zombie state. I did manage to get my device fully rooted with TWRP installed. Followed the instructions on how to get everything working with no problems. I ended up wanting to try to flash some audio mods (V4A and such), however they did not install properly, so I went and did what anyone else would do - restored to a full backup I made of the device before I started mucking about.
The restore did complete successfully, and I still have a device that has a working recovery, and an OS with root permission...but I can't flash anything anymore from TWRP. TWRP is unable to mount the /system partition after the restore, and seems convinced that I have no OS installed, even though there is one and the phone boots into it just fine. The restore I'm on now is post-flashing the Konverged Kernel. Attempting to restore to an even earlier backup (one I made just before flashing Konverged) produces similar results - the restore succeeds and produces a bootable phone, but TWRP still can't flash anything.
Just to cover bases I also tried running "fastboot flash recovery twrp-3.0.2-1-us996.img" again in case TWRP got messed up (trying to get the "Swipe to allow system changes" prompt to reappear - it didn't), with no changes - TWRP still works fine, but cant mount and edit /system and still claims I have no OS installed when requesting a reboot.
Any advice on how to get things working again would be greatly appreciated! Thanks!
Click to expand...
Click to collapse
I beleive you have to do Dirty Santa over again....The steps that is.
biglightbt said:
So I would have asked this question directly in the DirtySanta thread, but apparently I don't have enough posts to actually do anything there yet.
So my device is now in a rather bizzare zombie state. I did manage to get my device fully rooted with TWRP installed. Followed the instructions on how to get everything working with no problems. I ended up wanting to try to flash some audio mods (V4A and such), however they did not install properly, so I went and did what anyone else would do - restored to a full backup I made of the device before I started mucking about.
The restore did complete successfully, and I still have a device that has a working recovery, and an OS with root permission...but I can't flash anything anymore from TWRP. TWRP is unable to mount the /system partition after the restore, and seems convinced that I have no OS installed, even though there is one and the phone boots into it just fine. The restore I'm on now is post-flashing the Konverged Kernel. Attempting to restore to an even earlier backup (one I made just before flashing Konverged) produces similar results - the restore succeeds and produces a bootable phone, but TWRP still can't flash anything.
Just to cover bases I also tried running "fastboot flash recovery twrp-3.0.2-1-us996.img" again in case TWRP got messed up (trying to get the "Swipe to allow system changes" prompt to reappear - it didn't), with no changes - TWRP still works fine, but cant mount and edit /system and still claims I have no OS installed when requesting a reboot.
Any advice on how to get things working again would be greatly appreciated! Thanks!
Click to expand...
Click to collapse
So your phone isn't booting beyond TWRP? I'm assuming that's what you are saying. I only want clarification because you mentioned how it won't flash anything.
Try this. Go to "mount" and make sure system is checked. Then power off the device. Then use the button combo to boot back into recovery. It's power + volume down, as soon you see the LG logo let go of the power button and then press it again and hold it (never let go of the volume down button though). If done correctly you'll get a white screen asking you if you want to factory reset. Choose yes for both questions. This will boot you back into recovery. Once in recovery again go back to mount and check system again. Now reboot system. This method got me out of being stuck in TWRP after I had tried every other method I could think of.
PS. Make sure you are on a fully stock version of the ROM that came on your phone. This may work for any backup you have but just incase use the most stock version backup you have.
imucarmen said:
So your phone isn't booting beyond TWRP? I'm assuming that's what you are saying. I only want clarification because you mentioned how it won't flash anything.
Try this. Go to "mount" and make sure system is checked. Then power off the device. Then use the button combo to boot back into recovery. It's power + volume down, as soon you see the LG logo let go of the power button and then press it again and hold it (never let go of the volume down button though). If done correctly you'll get a white screen asking you if you want to factory reset. Choose yes for both questions. This will boot you back into recovery. Once in recovery again go back to mount and check system again. Now reboot system. This method got me out of being stuck in TWRP after I had tried every other method I could think of.
PS. Make sure you are on a fully stock version of the ROM that came on your phone. This may work for any backup you have but just incase use the most stock version backup you have.
Click to expand...
Click to collapse
Sorry if I wasn't clear, its a bit confusing to me also. Normally TWRP saying you have No OS installed is pretty bad news, but it seems to be a bit confused itself, since there IS and OS installed, and the phone boots into it.
The phone basically works exactly as you'd expect after the DirtySanta exploit. It can boot into whatever backup I restore it back to, and works just fine, root included. I can also boot into TWRP just fine also..... Its just that within TWRP, if I try to flash anything at all (apps, zip files, kernels) it comes back with an error just after "Updating Partition Details". The specific error is "failed to mount /system (invalid argument)". If I had to guess I'd think that /system was somehow marked as Read Only after I did the restore. I haven't needed to use the button combos for anything since ADB and Fastboot commands all work just fine too.
If I go into the "Mount" section in TWRP "System" is unchecked, if I tap it to try to check it the phone vibrates as if it accepted the input, but the check never appears. If I select "Mount System as Read Only" I can mount it though. I followed the instructions in the DirtySanta thread to a T, and am using all the recommended software versions.
I also tried restoring back to the backup I made just before flashing Konverged Kernel, with similar results. The restore works, and the phone boots into Android, but if I try to pick up where I left off and flash Konverged again from within TWRP, it fails with the "failed to mount /system (invalid argument)" again.
biglightbt said:
Sorry if I wasn't clear, its a bit confusing to me also. Normally TWRP saying you have No OS installed is pretty bad news, but it seems to be a bit confused itself, since there IS and OS installed, and the phone boots into it.
The phone basically works exactly as you'd expect after the DirtySanta exploit. It can boot into whatever backup I restore it back to, and works just fine, root included. I can also boot into TWRP just fine also..... Its just that within TWRP, if I try to flash anything at all (apps, zip files, kernels) it comes back with an error just after "Updating Partition Details". The specific error is "failed to mount /system (invalid argument)". If I had to guess I'd think that /system was somehow marked as Read Only after I did the restore. I haven't needed to use the button combos for anything since ADB and Fastboot commands all work just fine too.
If I go into the "Mount" section in TWRP "System" is unchecked, if I tap it to try to check it the phone vibrates as if it accepted the input, but the check never appears. If I select "Mount System as Read Only" I can mount it though. I followed the instructions in the DirtySanta thread to a T, and am using all the recommended software versions.
I also tried restoring back to the backup I made just before flashing Konverged Kernel, with similar results. The restore works, and the phone boots into Android, but if I try to pick up where I left off and flash Konverged again from within TWRP, it fails with the "failed to mount /system (invalid argument)" again.
Click to expand...
Click to collapse
I would run the dirtysanta exploit again from the beginning. Your assumption about being stuck in read only seems correct. I'm guessing you might have chosen read only on accident one time when you booted into TWRP and now it's stuck there.
Or you could try using flashfire to flash the TWRP.img
I am having the same issue. I tried doing the DAC mod that enables high impedance as always on. Audio quit working along with the stock music app. Did a restore from after I flashed the konverged kernel. And now no r/w ability and twrp will not mount system unless I check mount as read only. I was able to reinstall supersu from the recovery. But still have the issues.
Only thing I can think of is waiting for a return to stock unrooted method to Come out and re-root.
biglightbt said:
So I would have asked this question directly in the DirtySanta thread, but apparently I don't have enough posts to actually do anything there yet.
So my device is now in a rather bizzare zombie state. I did manage to get my device fully rooted with TWRP installed. Followed the instructions on how to get everything working with no problems. I ended up wanting to try to flash some audio mods (V4A and such), however they did not install properly, so I went and did what anyone else would do - restored to a full backup I made of the device before I started mucking about.
The restore did complete successfully, and I still have a device that has a working recovery, and an OS with root permission...but I can't flash anything anymore from TWRP. TWRP is unable to mount the /system partition after the restore, and seems convinced that I have no OS installed, even though there is one and the phone boots into it just fine. The restore I'm on now is post-flashing the Konverged Kernel. Attempting to restore to an even earlier backup (one I made just before flashing Konverged) produces similar results - the restore succeeds and produces a bootable phone, but TWRP still can't flash anything.
Just to cover bases I also tried running "fastboot flash recovery twrp-3.0.2-1-us996.img" again in case TWRP got messed up (trying to get the "Swipe to allow system changes" prompt to reappear - it didn't), with no changes - TWRP still works fine, but cant mount and edit /system and still claims I have no OS installed when requesting a reboot.
Any advice on how to get things working again would be greatly appreciated! Thanks!
Click to expand...
Click to collapse
Hey I was having the same problem and I fixed it myself messing around with a few things I could think of.
Here it is pasted from another thread.
Dinked around with a few ideas and got my problem fixed! Heres what I did.
1. Made a backup of system in twrp just in case.
2. Formatted system in wipe > advanced > and only checked system.
Panicked because I thought I bricked my device, wouldnt boot farther than the lg logo,
(next steps might be unnecessary but I panicked and tried them lol)
3. still had fastboot access so I repeated step 3 in the root method.
4. Reflashed boot2.img
5. Rebooted to recovery with volume- power, release power while keeping volume- at lg for a second then repress and hold power. Yes twice to get to recovery.
6. Restored system backup. (was able to fully boot now but with lag)
7. Reflashed konverged kernel.
And everything is working perfect now and I have my r/w ability and can mount system in recovery without having to select mount as read only.
---------- Post added at 09:57 AM ---------- Previous post was at 09:10 AM ----------
You can probably just wipe your system like I said in the previous post then Just restore it. I panicked and did a bunch of extra stuff. I realized that when I did my initial backup of my system, or said that its size was about 126247251477482716MB. So I'm guessing when I did my restore (possibly what happened to yours) that it somehow messed up the system.

no bootloader(/fastboot) menu, rooted stock rom lolipop. cannot install custom rom

Hello,
I am having some problems since today i flashed the su binaries over my completely new lineageos install. (a14.4, fully wiped before).
it was stuck during boot at the android logo(let it boot for half an hour, multiple times, no progress). so naturally i wanted to boot to recovery, though it would not boot into recovery with any imaginable key combo.
so i went into bootloader mode (which, in my case, is jsut download mode, no fastboot whatsoever, and yes, i checked fastboot devices, (also adb), nothing to be found there)
next, knowing i had no other choide at that moment, i flashed a stock rom, via download mode. worked so far.
stock rom was running (ics), bootloader was still download mode only, and recovery was now stock android rec.
my next step was flashing a custom rom, since this was the most important thing to get to working then.
via adb sideload i fashed lineageos, once again. was working fine, so recovery next. but nothing worked.
included with lineageos is root access, so i enabled all the stuff, incl. adb, on my phone. but adb sideload always spit out errors (code 7 or 255) on rec install (twrp 2.8.something touch.zip) [some error about /tmp/update.zip] trying cwm resulted in the same thing, like did flashing gapps.
pushing the files to the internal memory (/sdcard) did not help, since 'flash from sdcard' resulted in an empty sdcard folder with no files to install (in recovery. in the file explorer while running the os, the files where there)
then i tried rashr (not sure exactly which app it was) to install rec. it said everything worked fine, trying to install cwm. so i rebooted
and nothing worked. the rom would not boot anymore (again, stuck at android logo) since the stock recovery only allows for adb access in form of sideload, no push whatsoever, and sideload did not let me install the os via zip, it was back to flashing a stock rom once again.
so i did that again (this time lolipop)
this is where i am now:
the rom boots perfectly, like does the kinda stock recovery, but again: no files in the sdcard path within the rec menu, though i pushed them there, and they appear there in the file manager.
i installed root, for those neat apps, that maybe one would work, but they need root and the stock rom does not know how to give those rights to apps, no option found for this whatsoever.
also, download mode is gone. (still no fastboot)
when i try to boot the bootloader, i just goes on to usual os boot (key combo and adb reboot bootloader result in the same thing)
recovery is still working, but pretty useless still. when i try to sideload a file, it quits with failed verification of the file. which is no surprise to me, since it shows the message halfway through the send process (observed from the adb terminal on my pc, never gets even close to 100% before the message appears on the phone which also cuts the connection therefore the file send process.)
i have absolutely no idea what the hell will get this working again. i dont really care about the download mode, but what i really need is a custom recovery to finally work, so i can install all of my stuff again.
does anyone have any idea on what i could try next?
hopefully yours,
azyrael
SOLVED
so i noticed for root apps i need to install supersu (or something like this) to give root access to apps if there is no native way within the rom to do this stuff.
install supersu and found out i somehow had no root access at all. tried ioroot etc, did not work
so i installed a stock jb android rom, rooted the device via ioroot, install recovery via autorec, and it finally worked!
this took me only two days.
thx xda for providing all of the tools i needed for this <3
kinda unsolved
so, it got recovery to work. installation of lineageos also worked perfectly., though this bricks my device.
no matter what i wipe, installing a custom rom will stop it from booting. this could only be fixed by installing a stock rom again, which also reverses root and install a stock recovery. since i only need root and the rec for installing a custom rom, which does not work anymore, i wont bother with this anymore. i have abosutely no idea whatsoever, and tried everything even barely coming to my mind.
still open for suggestions, but the stock rom will have to suffice for now.

TWRP x86 directory

Hi
Trying to flash TWRP but no ADB & Fastboot directory under Windows 10 program files/x86?!? Also should GApps go here? 32bit? What if SD card & internal storage is merged? End result is Lineage OS...
Could anyone link a good guide?
Which adb/fastboot utility did you install? If you install Minimal ADB 1.4.2, on my computer it's present under C:\Program Files (x86)\Minimal ADB and Fastboot. For 1.4.2: https://www.androidfilehost.com/?fid=745425885120698566
If you're trying to flash TWRP (ensure you've got either TWRP 3.0.2 or a more recent version, 3.1.1 for example, and that it's for athene devices), you could follow this guide: https://forum.xda-developers.com/showpost.php?p=67031805&postcount=3 Also, double check you've unlocked your bootloader before attempting any of this: https://forum.xda-developers.com/showpost.php?p=67031801&postcount=2 Bear in mind unlocking your bootloader will wipe your device and void your warranty.
Once you've flashed TWRP, then reboot straight to recovery - this is to ensure TWRP is not overwritten by the stock recovery. Once you've booted to the recovery, then TWRP should stick and you may reboot as normal.
EDIT - instead of flashing TWRP, you may wish to boot to TWRP (and look at step 4 below):
Copy the TWRP image file to your adb folder.
Boot into the bootloader and connect your device to your computer.
Open your adb client and verify your device is communicating by executing 'fastboot devices' without the quotes. You should get a response with your device's serial number.
To boot in TWRP, execute in the adb terminal 'fastboot boot <name of TWRP image>' without the quotes. E.g if your TWRP is twrp-3.1.1-athene_shreps.img, then the command you'd use is 'fastboot boot twrp-3.1.1-athene_shreps.img' (without quotes).
Afterwards, you'll be able to flash LineageOS and GApps. The main instructions for flashing a custom ROM are usually listed in the first post of each custom ROM (here's the link for the official LineageOS: https://forum.xda-developers.com/moto-g4-plus/development/rom-cyanogenmod-14-1-t3522101)
If you have your SD card and internal storage merged, then unless you can save the encryption key from your stock, your SD card will be wiped/inaccessible. SD cards mounted as portable storage appear to operate okay under both custom and stock ROMs. Thus, back up your SD card to your computer. You may wish to re-format your SD card as portable storage (and from what I've read on the Lenovo Motorola forums, that might help your SD card last longer, as it's not being subjected to encryption as it would be with adoptable storage).
1)You'll be flashing the LineageOS and GApps (can use either OpenGApps or BeanGApps) zips using TWRP. You need 7.1 arm Gapps (32 bit).
2)Download LineageOS and GApps to your device. Do not unzip them.
3)Reboot to TWRP recovery. Tap the Backup option on the main menu.
4)Back up your device in TWRP (make a note this is your stock backup). If you want this backup to be OTA friendly for stock updates, then do not 'swipe to allow modifications'. Back up the stock ROM, verify you've got the backup then reboot to TWRP, and then 'swipe to allow modifications'.
5)Go back to the main menu, and tap the 'Wipe'.
6)Under 'Advanced Wipe', select Dalvik/ART cache, system, data and cache. Double check these are the only ones you have ticked.
6a)Swipe to wipe.
7)Go back to the TWRP main menu.
8)Tap Install and locate your LineageOS and GApps zips.
9)Flash LineageOS first and then GApps.
10)Reboot to LineageOS.
If your device screen goes to sleep whilst in TWRP, press on the volume keys to wake up your device.
If you wish to revert back to near stock, you can flash your TWRP backup of your stock ROM (though this will revert any messages to the point when your backup was taken, you may wish to use Titanium Backup or MyPhoneExplorer to backup). If you decide to revert completely to stock, then if you were on the June 2017 stock update, please only flash the June 2017 or later stock firmwares: https://forum.xda-developers.com/moto-g4-plus/how-to/stock-rom-npjs25-93-14-4-march-1-t3608138
@echo92 if he would decide to flash back to a clean StockRom (by fastboot) in order to start with a complete unmodified System (stock boot, stock kernel & stock recovery) wouldn't it be better not to "flash" but just to "boot" once into TWRP and take a backup of the clean StockRom in order to save the stockrecovery too? So he could simply restore his clean stock if he wants to take a future OTA.
If he "flashes" TRWP permanently onto StockR he would backup Stock with modified recovery and might wonder, why he couldn't install an OTA.
Please correct me, if I'm wrong.
bullfinch110 said:
@echo92 if he would decide to flash back to a clean StockRom (by fastboot) in order to start with a complete unmodified System (stock boot, stock kernel & stock recovery) wouldn't it be better not to "flash" but just to "boot" once into TWRP and take a backup of the clean StockRom in order to save the stockrecovery too? So he could simply restore his clean stock if he wants to take a future OTA.
If he "flashes" TRWP permanently onto StockR he would backup Stock with modified recovery and might wonder, why he couldn't install an OTA.
Please correct me, if I'm wrong.
Click to expand...
Click to collapse
Oh definitely, that's an option, booting into TWRP and backing up the stock ROM. As I understand it, you have to back up your device without allowing TWRP to modify your system partition. If the backup is taken after that, I recently read that enabling that will cause an OTA to fail (since the type of OTA monitors if the system was ever mounted as read/write), even if the backup you took had no other changes.
It honestly depends on how much flashing the opening poster is planning on doing, if it's simply just LineageOS and OpenGApps, then might be worth booting into TWRP. However, to keep updated then you'd have to perform the updates when you've got a PC available (to be able to boot into TWRP), in which case the inconvenience of booting into TWRP with a PC might outweigh the downside of a custom recovery. For custom ROMs, we might have a similar issue ironically, where a user downloads an update for custom ROMs and cannot flash the update because they do not have TWRP on their device (albeit this issue is easier to fix). I concur that simply booting into TWRP may be more suitable for new users and those that do not realise the requirements/downsides of having a custom recovery. I'll add in the option of booting to TWRP in the previous post As the saying goes, with great power comes great responsibility.
Also, if the user flashes other files (e.g. a custom logo.bin to hide the bootloader warning), then the OTA would fail anyway, and custom logos aren't backed up by TWRP. For a logo.bin though, that can be easily replaced by a stock logo.bin (from the appropriate stock ROM) flashable in fastboot or in TWRP.
If the xda pros would establish a new status, like "Recognized Explainer", you were the first who 'd deserve it.
Thx!!!
I have successfully installed Lineage Flo (2013) on a Nexus 7! This practice (fell at every hurdle) & your post should bring the matter to a swift finish.
Many thx.

Categories

Resources