install lineageOS -- failure on verification - Sony Xperia M

Hey, I think I read all the threads that could be helpful (development, Q&A, lineageos & cm-installguides, twrp-install and so on), but I don't get my phone to work.
I have a Xperia M2 Dual c2005 and want to get LineageOS working. I have no data left that I would need, so I try to start from new...
Steps already taken:
- unlocked bootloader for both IMEIs https://zifnab.net/~zifnab/wiki_dump/Install_CM_for_nicki.html#What_does_.22unlocking.22_mean.3F --> worked
- flashed boot.img (extracted from lineage-14.1-20170131-nightly-nicki-signed.zip) in fastboot-mode and went to recovery
- wanted to copy zip to device, but adb (also with sudo!) says: unauthorized (Please check the confirmation dialog on your device. ... but there is none)
- in CM-recovery i tried to flash via sideload, but it stops transferring data at around 50% and saying: E: signature verification failed ... and E: error 21
- had the md5sum created and put it in folder, still the same
- also tried, what shouldn't be done fastboot flash boot twrp-3.0.2-0-nicki.img --> doesn't work b/c of FOTA, so how to install twrp?
Any ideas how to install clean lineageOS? Thanks in advance.

...usually this problem cause bad kernel or image .. so wipe format,data,cache,dalvik cache, make factory reset in cwm... boot again to recovery and flash TWRP 2.8.6.0 zip. file via recovery and reboot again to recovery .. now flash latest lineage os , without any extract
.. here is link for twrp..: https://forum.xda-developers.com/xp...very-cwm-twrp-recoveries-custom-roms-t3016507
..dont forget!! flash this 2.8.6.0 version ... if doesnt work this little guide, try to format sdcard via recovery in advanced option "this is partition where is everithyng set on 0 " ... and try again

Thanks a lot! For me it worked the following way, since I didn't have CWM present:
- downloaded TWRP 2.8.7.0 from the link you provided
- extracted FOTAKernel.img
- in fastboot mode: sudo fastboot flash boot FOTAKernel.img
- reboot in recovery (worked well!)
- adb push lineageos14.1.xxx.zip /sdcard/
- install and choose image
Thanks a lot, after a couple of days of trying I do now understand Sony a little more (for my own, I only use Nexus, which works quite simple ).

jeensg said:
Thanks a lot! For me it worked the following way, since I didn't have CWM present:
- downloaded TWRP 2.8.7.0 from the link you provided
- extracted FOTAKernel.img
- in fastboot mode: sudo fastboot flash boot FOTAKernel.img
- reboot in recovery (worked well!)
- adb push lineageos14.1.xxx.zip /sdcard/
- install and choose image
Thanks a lot, after a couple of days of trying I do now understand Sony a little more (for my own, I only use Nexus, which works quite simple ).
Click to expand...
Click to collapse
no problem, iam glad i could help

Related

Flashing recovery went terribly wrong on Xperia S

Hi
So yesterday I was trying to install TWRP recovery in order to install Cyanogenmod 11 on Xperia S , I followed a tutorial on techglen, the problem is that now I only have the recovery on my phone , it boots instead of the system , the system files are still there but I can't boot on it , If i connect my phone to my computer I can't access the storage even if I mount it using TWRP
So i have some questions
Is my phone broken?
Instead of flashing a .elf file i flashed the .img instead , is that the source of the problem? ( i didn't do it on purpose , but i didn't pay attention :/ )
can i flash the boot.img of the old system to get it back on booting ?
If there's a way of pushing the CM11 into my phone and installing it would that fix my problem?
Can i use flash tool to flash my old system back ?
Hi,
do you have the zip file of your custom rom on internal stockage ?
(browse file with 'Install" on TWPR)
If yes, you just have to flash it with TWPR.
Here's what I did (will do a clean install and delete previous setting, contact, app data ...) :
- Download ROM + Gapps and copy to sdcard (internal stockage)
- Flash boot.img with FlashTool
- Reboot on recovery (TWPR)
- Factory Reset (Wipe --> "Switch to Factory Reset")
- Format System (Wipe --> Advanced Wipe --> Select System)
- Install New ROM (Install and choose Zip)
- Reboot on ROM to set basic settings
- Reboot on recovery to Flash Gapps
- Wipe Cache (Wipe --> Advanced Wipe --> Select Cache)
- Reboot on System
If you don't have zip file on internal stockage, you may go back first on Stock Rom with FlashTool.
Flash stock ftf(6.2.b.1.96), you can easily find it using search function.
Then you can do like I explained.
jeremux said:
Hi,
If you don't have zip file on internal stockage, you may go back first on Stock Rom with FlashTool.
Flash stock ftf(6.2.b.1.96), you can easily find it using search function.
Then you can do like I explained.
Click to expand...
Click to collapse
Well thanks a lot for your answer man !
when i put on flash mode and try to flash it with flashtool , the phone leaves flash mode after like 40 seconds
I tried installing the drivers ( from flashtool/drivers ) but it didn't change anything :/
Do not confused Fastboot and Flashmode.
Normaly you just have to :
(I guess your tft is already in "firmwares" folder of FlashTool)
- start FlashTool (with Administrator Rights on Windows)
- clic on "Flash device"
- select "Flashmode"
- select all file in "Content"
- clic on "Flash"
- your xperia s must be poweroff and unpluged
- Press the back button (still powered off)
- Then plug the USB cable
After that your phone boot in Flashmode and flashing start.
If they don't work, what is the error ?
ImSoFresh said:
Well thanks a lot for your answer man !
when i put on flash mode and try to flash it with flashtool , the phone leaves flash mode after like 40 seconds
I tried installing the drivers ( from flashtool/drivers ) but it didn't change anything :/
Click to expand...
Click to collapse
Don't put your device on flashmode until flashtool tell you because flashtool takes about 1 minute and 20 seconds to finish extract ftf file
Sent from my LT26ii using XDA Premium 4 mobile app
ImSoFresh said:
Hi
So yesterday I was trying to install TWRP recovery in order to install Cyanogenmod 11 on Xperia S , I followed a tutorial on techglen, the problem is that now I only have the recovery on my phone , it boots instead of the system , the system files are still there but I can't boot on it , If i connect my phone to my computer I can't access the storage even if I mount it using TWRP
So i have some questions
Is my phone broken?
Instead of flashing a .elf file i flashed the .img instead , is that the source of the problem? ( i didn't do it on purpose , but i didn't pay attention :/ )
can i flash the boot.img of the old system to get it back on booting ?
If there's a way of pushing the CM11 into my phone and installing it would that fix my problem?
Can i use flash tool to flash my old system back ?
Click to expand...
Click to collapse
You can simply try pushing the CM11 zip to Your phone when You are in twrp and Your phone is detected on the PC. You won't be able to see it as mounted storage. You will see the device when You run:
Code:
adb devices
Then Use the command to push:
Code:
adb push path/to/rom /sdcard
And then flash the ROM.
Mirhawk said:
You can simply try pushing the CM11 zip to Your phone when You are in twrp and Your phone is detected on the PC. You won't be able to see it as mounted storage. You will see the device when You run:
Code:
adb devices
Then Use the command to push:
Code:
adb push path/to/rom /sdcard
And then flash the ROM.
Click to expand...
Click to collapse
That's exactly what i did , but it still didn't work , i flashed the recovery.elf ( at first i flashed it .img ) and then installed the rom , now it works perfect , thanks a lot guys for your help , if some people are having trouble this video helped me a lot
youtube.com/watch?v=Hn4E3fKX7WM
Hi,
Good news if it works now.
So enjoy yourself with custom rom

Please Help me intall Lineage OS (constant Softbrick)

Hi,
I used Lineage for a long time on my Nexus 4 (mako) without a problem. But for some reason I could not flash it on this phone if my life would depend on it. I updated the stock rom to OPXS27.109-49-5 (XT1789-06) and tried all the following combinations TWRP 3.2.1-1 and 3.2.2-2 with Lineage 15.1 2018/07/03 | 2018/07/10 | 2018/07/17.
I follow this steps:
- start developer mode and push twrp-3.2.2-2 to sdcard
- reboot bootloader
- fastboot boot twrp 3.2.2-2 image
- install twrp 3.2.2-2.zip
- reboot to recovery
- reboot to bootloader
- fastboot -w
- until this point everything works like a charm
- fast setup no connects etc.
- activate developer mode
- push os (lineage-15.1-20180717-nightly-nash-signed.zip)
- push twrp 3.2.2-2.zip
- reboot to recovery
- optional: wipe Dalvik/ART Cache | System | Data
- install OS.zip
- optional: reinstall twrp.zip
- reboot system
- Softbrick
The phone will now constantly reboot and it is even impossible to turn it off. I can get to bootloader if I connect the phone to a PC and hold the key combination for bootloader. In bootloader I can't choose anything using the phone itself and I can't call recovery from fastboot either. I can however allfalsh back to stock or use reboot and reboot bootloader command.
I would be most grateful for some help or suggestions what might be the problem here.
Thanks in advance.
Regards.
After 07-17, the process is much simpler.
Start with a Flashall at this point.
Reboot, confirm you're on at least 27.1.2
Go to bootloader, boot TWRP 3.2.2 image.
Then follow the steps given by npjohnson(https://forum.xda-developers.com/z2-force/development/official-lineage-os-15-1-t3816540)
In TWRP, click "Wipe", "Format Data", then type "yes" as prompted.
(Optionally) Flash the newest TWRP Installer also found at the Official TWRP Project Site if you wish to maintain TWRP, though please note that it will need to be re-installed on update.
ADB sideload the newest weekly
Click "Reboot, then choose "Recovery", this will boot you to either Lineage Recovery or TWRP depending on your choice to install TWRP or not. It is necessary to reboot between ROM flash and GApps/Addon flash due to verity/slot-swap logic.
(Optionally) Flash GApps - Only MindTheGApps arm64 are compatible, OpenGApps are not compatible with A/B yet: MindTheGApps.
(Optionally) Flash SU - you'll need to turn it on from in developer settings after first boot Lineage OS SU Addon. - Magisk works fine, though is not supported.
Reboot
Unseeablething said:
After 07-17, the process is much simpler.
Start with a Flashall at this point.
Reboot, confirm you're on at least 27.1.2
Go to bootloader, boot TWRP 3.2.2 image.
Then follow the steps given by npjohnson(https://forum.xda-developers.com/z2-force/development/official-lineage-os-15-1-t3816540)
In TWRP, click "Wipe", "Format Data", then type "yes" as prompted.
(Optionally) Flash the newest TWRP Installer also found at the Official TWRP Project Site if you wish to maintain TWRP, though please note that it will need to be re-installed on update.
ADB sideload the newest weekly
Click "Reboot, then choose "Recovery", this will boot you to either Lineage Recovery or TWRP depending on your choice to install TWRP or not. It is necessary to reboot between ROM flash and GApps/Addon flash due to verity/slot-swap logic.
(Optionally) Flash GApps - Only MindTheGApps arm64 are compatible, OpenGApps are not compatible with A/B yet: MindTheGApps.
(Optionally) Flash SU - you'll need to turn it on from in developer settings after first boot Lineage OS SU Addon. - Magisk works fine, though is not supported.
Reboot
Click to expand...
Click to collapse
+1000 - Thanks for letting him know. This is the right process to follow.
npjohnson said:
+1000 - Thanks for letting him know. This is the right process to follow.
Click to expand...
Click to collapse
Thank you both for your replies and the guide.
I tried this method, but sadly it failed in Step 2/2 install ( ADB sideload the newest weekly) with the error "Unable to find partition for path '/cache'.
I see you list OCSX-version in your guide which points to the US-Version of the phone (Single-SIM) whereas the rest of the world including me got dual-Sim.
Is it really only for the US-phone (I would guess that is not the case.) or is my error completely unrelated to that?
Thanks in advance.
HorstA said:
Thank you both for your replies and the guide.
I tried this method, but sadly it failed in Step 2/2 install ( ADB sideload the newest weekly) with the error "Unable to find partition for path '/cache'.
I see you list OCSX-version in your guide which points to the US-Version of the phone (Single-SIM) whereas the rest of the world including me got dual-Sim.
Is it really only for the US-phone (I would guess that is not the case.) or is my error completely unrelated to that?
Thanks in advance.
Click to expand...
Click to collapse
Our phone does not have a cache partition.
If it helps, take a tour to the guides: https://forum.xda-developers.com/z2-force/how-to/guides-bootloader-twrp-custom-roms-root-t3805737

[D5503] Lollipop 5.1.1 goes AICP 13.1 Oreo 8.1 /// Beginners Link Collection

Hello hello,
this will be my "live" thread of bringing AICP 13.1 to my xperia z1c, I found some Guide's that I will follow and I will share with you all the links and knowledge I gained as a newbie that I used to understand and fix my problems on the way.
Maybe this will help you, too.
Main Tutorial: LINK
Target of all this: LINK
My Device:
Sony XPERIA Z1C, 14.6.A.1.236 , Lollipop 5.1.1
My best hint: read carefully, take your time to understand what you're trying to do and do your own research!
Hopefully you will get a aicp custom rom out of it.
_____________________________________________
_____________________________________________
General information: Android 5.1.1 cannot be rooted due to its high security standards, therefore we will downgrade to a lower security stock rom and create root access there. Root access will be needed as well as an unlocked bootloader to install real recovery (TWRP) which is the tool to flash custom roms like aicp. But the aicp custom rom will not have a good working camera, don't ask me why, but the camera seems to be a really difficult thing from the point of developer's view, let's accept this. Aside of that disadvantage, this custom rom is a very nice software and it makes my z1c kind of new. I don't use my camera anyway often at all.
During all this flashing thing I had a very big ??? while implementing real recovery. I was able to flash the .236.ftf but not the openbootloader.ftf as described in section 5 in the main tutorial. The result was twrp boot failed.
Error description:
flash .236.ftf works
flash openbootloader fails
flash twrp works
boot twrp fails
boot stock rom works
My solution:
I restarted from scratch and finally with the kind of messed up secquenceI got it:
flash .236.ftf works
flash openbootloader fails
flash twrp works
boot twrp fails
flash openbootloader works
flash twrp works
boot twrp works
UPDATE 06.12.2018 as a solution for REAL RECOVERY with working camera <<< RECOMMENDED
0. boot into rom works
1. flash openbootloader works
2. boot into rom works
3. flash .236.ftf works
4. boot into rom & check camera works
3. flash twrp ( business as usal ) works
4. boot twrp ( First boot is damn important, don't miss it! Press Vol- & Power, wait for vibration, release Power & keep Vol- until twrp boots up ) works
5. full wipe, flash aicp-rom, flash gapps, flash magisk-root, boot system works
6. enjoy Oreo 8.1 & camera check !!! works !!!
This routine worked straight forward for me where I started from scratch with my second device.
Flashing aicp was pretty easy, good to know for flashing the rom was full wipe = advanced wipe and select everything except of micro sd
To complete my aicp 13.1 Oreo 8.1 device the camera problem has to be fixed ( Saving the taken picture fails, display goes into freeze, no chance to solve this with camera mods, camera apps )
But @lm089 gave me the right hint, and finally this was my solution! Thanks again @lm089!!
Have fun with your new >> SONY XPERIA Z1 COMPACT <<
How to update TWRP
1. Turn Off your device
2. Start device in fastboot mode by connecting via usb cable to your pc and press Vol- until blue led tuns on
3. use fastboot flash recovery twrp.img to flash it
4. boot twrp ( This first boot is damn important, don't miss it! Press Vol- & Power, wait for vibration, release Power & keep Vol- until twrp boots up ) works
How to update to aicp 14.0 pie 9.0
starting with the running and latest aicp 13.1 oreo 8.1 rom above I just followed the Instructions here. As a specialty I had to install the Magisk Manager App manually into the rom to get root. Downloading supersu.apk from www.supersuroot.org works fine as well.
Your fastboot connection doesnt work for some reason though u had this workin fine in the past? maybe u had a windows update. install your drivers again.
>> LETS KEEP THIS DEVICE ALIVE <<
_____________________________________________
_____________________________________________
More helpful links that I used:
Debug apps by creating logs
what is adb? an xda tutorial
ADB working Download Link and ADB Article on xda
xda flashtool error during setup: click
[NOOBIE] Basic adb commands and device partition overview
Latest TWRP 3.2.3-0 for z1c
root solution using flash tool
Restore DRM functionality after UB
If TA Backup dry restoration restoration fails: Solution and Download *.dll
Boot into recovery or fastboot mode
How to install TWRP
Magisk beats superSU
How to Install Custom ROM using TWRP for Android!
change boot animations
[TUTORIAL] Design Your Own Bootanimation
Backup & Restore Your ROM With TWRP
Terminology: odex and deodex
If the camera goes into freeze or saving the picture fails: This was my solution! /// But you better go straight with the steps of my update 06.12.2018, field tested!
THANKS A LOT TO @colaigor for his [BEGINNERS GUIDE]
Ok. So i dont have much time now but i can give some short directions.
1. Get unlock codes from sony for bootloader unlock
2. Instal adb and fastboot at your system(PC)
3. Instal z1c drivers
4. Instal flashtool
5. Unlock bootloader,root,flash recovery(search forum for "real recovery" ),flash root solution
6. Flash wanted rom,gaps
P.P. On second thought u dont need flashtool. All can be done with adb and fastboot commands from terminal
There is one thing I don't understand:
what is the difference between FLASHING REAL RECOVERY and FLASHING FAKE RECOVERY?
What I read is, that in both cases I get TWRP but on different partitions (real = Recovery Partition, fake = Boot partition) but do I need both or do I choose just on of them?
derjango said:
There is one thing I don't understand:
what is the difference between FLASHING REAL RECOVERY and FLASHING FAKE RECOVERY?
What I read is, that in both cases I get TWRP but on different partitions (real = Recovery Partition, fake = Boot partition) but do I need both or do I choose just on of them?
Click to expand...
Click to collapse
Real recovery have its own partition(after that update to bootloader). Custom recovery dont have that and its stored somewhere else(FOTA,onetime boot image , etc). Choose real recovery. New stuff works good with it.
Ok thank you :good:
flashtool log of openbootloader.ftf failed:
01/015/2018 13:15:58 - INFO - Device connected in flash mode
01/017/2018 13:17:19 - INFO - Selected Bundle for Sony Xperia Z1 Compact(D5503). FW release : 1. Customization : openbootloader
01/017/2018 13:17:19 - INFO - Preparing files for flashing
01/017/2018 13:17:19 - INFO - Please connect your device into flashmode.
01/017/2018 13:17:19 - INFO - Using Gordon gate drivers version 3.1.0.0
01/017/2018 13:17:20 - INFO - Opening device for R/W
01/017/2018 13:17:20 - INFO - Device ready for R/W.
01/017/2018 13:17:20 - INFO - Reading device information
Click to expand...
Click to collapse
solved, I skipped step 5.2, flashing the .236.ftf in advance
but how can I start TWRP?
doesnt work with POWER + Vol-, vibrate & release power
I tried to flash the following recovery solution using this command:
smartphone in fastboot mode (blue LED enabled)
fastboot flash recovery recovery.img
TWRP from step 5.1 of the GUIDE
TWRP 3.0.2
My formerly flashed .236.ftf rom works fine, but I cant start TWRP the device goes directly to my rom
zlata said:
Real recovery have its own partition(after that update to bootloader). Custom recovery dont have that and its stored somewhere else(FOTA,onetime boot image , etc). Choose real recovery. New stuff works good with it.
Click to expand...
Click to collapse
Thats where I'm stuck right now, any ideas how to fix?
okay got it, basically i do not know what the problem is but:
after BLU
flash .236 :good:
flash openbootloader
flash twrp :good:
--> failed to install openbootloader and probably thus twrp failed
solution: I skipped to flash .236 as recommended by the author of the GUIDE (step 5.2)
flash open bootloader :good:
flash twrp :good:
--> failed to start twrp, though it was installed successfully
flash .236 :good:
flash openbootloader (failed again, but it's already on the device and I guess I could have skipped this here)
flash twrp :good:
first boot of twrp is successful :good:
And basically the author explained it in his text, FIRST INSTALL OPEN BOOTLOADER BEFORE WRITING STH TO RECOVERY PARTITION
I think you should use Aicp 14 pie instead of 13.1 Oreo
I feel Aicp 14 PIE is very stable and flash port camera stock this link https://forum.xda-developers.com/crossdevice-dev/sony-themes-apps/port-stock-camera-nougat-roms- t3628791
Nice thread, thank you! Wish I had that when I started rooting and flashing
@lm089 Haha it's quite some work to get into it, right? I just saw that we are running on the same device & custom rom, how did you solve the issue with the not working camera? I'm still reading stuff about some mod, but I'm curious and open for tested solutions on z1c
best, dj
derjango said:
how did you solve the issue with the not working camera? I'm still reading stuff about some mod, but I'm curious and open for tested solutions on z1c
best, dj
Click to expand...
Click to collapse
Had this situation twice with 2 different oreo ROMs. Both times I solved it following a rather strange sounding suggestion I found on the AICP 13.1 discussion thread. The basic idea is to go back to a stock Sony ROM. Boot into it and make sure the camera is working which for me was the case both times. Then - if necessary - re-root your phone (on first occasion I flashed a pre-rooted .236 version but that caused some extra trouble so next time I decided to flash an unrooted version). And from then on it's the standard way as you described it in your OP.
Good luck!
Okay, thanks a lot for your hint! Unfortunately the camera mod didn't fix the problem, my android-task for this evening is defined:
AICP 13.1 Oreo 8.1 on z1c, root, ulb, magisk 17.1
1. backup my system (done)
2.0 flash stock rom lollipop 5.1.1 (14.6.A.1.236.ftf) with flashtool via usb (done),booting the os for the first time takes quite long (~10m), check camera in the os (done)
interesting fact: recovery is deleted by flashing the rom via flashtool - I thought I can go the lazy way and skip the step of installing twrp again into recovery
2.1 okay, let's do it: install twrp (done) and boot into twrp, NOT into ROM!! (done) (Vol- & Power, wait for vibration & release Power but keep Vol- until TWRP starts up)
3. flash aicp 13.1 following this (full wipe as an advanced wipe: select all EXCLUDING THE SD STORAGE)
Again here, I recognized the first boot of the rom takes quite longer.
4. check camera (done)
!!!! IT WORKS !!!!
(I did it two times)
alright, lets start flashing my second device - now I know how to do it
Thanks guys!!
derjango said:
!!!! IT WORKS !!!![/SIZE]
Click to expand...
Click to collapse
Weird, isn't it?
lm089 said:
Weird, isn't it?
Click to expand...
Click to collapse
Totally But hey, it's a solution
btw @lm089, boots your ota-updater directly into twrp and start the flashing procedure? In my case I had to boot twrp manually and flash the zip manually, too
derjango said:
btw @lm089, boots your ota-updater directly into twrp and start the flashing procedure? In my case I had to boot twrp manually and flash the zip manually, too
Click to expand...
Click to collapse
No, updater is booting into recovery, doing a nandroid backup and wiping caches (because I told it to), then flashing and finally rebooting into system. All by itself :good:
I remember having trouble with that in the past though. Do you by any chance have an SD card formatted as adoptable storage?
lm089 said:
No, updater is booting into recovery, doing a nandroid backup and wiping caches (because I told it to), then flashing and finally rebooting into system. All by itself :good:
I remember having trouble with that in the past though. Do you by any chance have an SD card formatted as adoptable storage?
Click to expand...
Click to collapse
Yes, its used as an external storage
derjango said:
Yes, its used as an external storage
Click to expand...
Click to collapse
ok, that's something different; adoptable storage means that your SD or part of it is setup to extend internal storage. If you can access all of your SD from TWRP then it is indeed formatted a external storage.
1) How to unlock bootloader:
https://developer.sony.com/develop/...ed/unlock-bootloader/how-to-unlock-bootloader
2) Download Platform-tools (adb & fastboot) r.26.0.2 as latests version does not work (or just for me):
https://xiaomifirmware.com/downloads/download-platform-tools-adb-fastboot-r-26-0-0/
3) Download TWRP 3.2.3-0 https://androidfilehost.com/?fid=11410963190603854057 and place file in Platform Tools folder on PC
4) Restart in fastboot mode and flash revovery:
fastboot flash recovery Z1C_twrp_3.2.3-0.img
fastboot reboot
5.1) Download AICP Oreo 8.1 http://dwnld.aicp-rom.com/device/amami/WEEKLY/aicp_amami_o-13.1-WEEKLY-20181204.zip and place file in Platform Tools folder on PC
5.2) Download Gapps Pico https://opengapps.org/?download=false&arch=arm&api=8.1&variant=pico and place file in Platform Tools folder on PC
5.3) Download stable Magisk 17.1 https://github.com/topjohnwu/Magisk/releases/download/v17.1/Magisk-v17.1.zip place file in Platform Tools folder on PC
6.1) Load TWRP. Advance>ADB Sideload (for Oreo)
adb sideload aicp_amami_o-13.1-WEEKLY-20181204.zip
(do not restart)
6.2) Repeat Advance>ADB Sideload (for Gapps)
adb sideload open_gapps-arm-8.1-pico-2018XXXX.zip
(do not restart)
6.3) Repeat Advance>ADB Sideload (for Magisk)
adb sideload Magisk-v17.1.zip
(restart)

[Guide][H830][LineageOS]All-In-One Install TWRP, Root, & LineageOS Oreo on 3/2019

I did NOT Develop or create any of this! THANK YOU TO EVERYONE THAT DID!! Although it would be easier for me to directly link to the files, instead I linked to the creators page for you to download the files, and give them credit.
What did I do? I inherited a Tmobile LG G5 LG-H830 and couldn't find any good info to quickly get up and running a custom rooted ROM. So I spent a few days researching and testing, and decided to put all of this current info in one place in an easy to follow guide.
Who is this for? Someone like me that wants an all-in-one, easy to follow guide to get a Custom ROM installed, but NOT a lot of time. The other key here is this information is the latest as of March 2019. Once you get this going, customize all you want. And DO share!! This guide should work on ALL software versions out there.
What will you have when you're done? TWRP Recovery & LineageOS 15.1 (Oreo, Android 8). BUT, you can install your own ROM at that point instead if you want.
Quick Notes:
-About G5: https://forum.xda-developers.com/lg-g5/how-to/info-autos-g5-thread-t3350648/
-Tmobile is easily bootloader unlockable, but no fastboot commands available! Dirtycow exploit is how to install the TWRP Recovery. All exploits are based on "20a", which is (Nougat Android 7.0). Guide will walk you through getting to this version.
-Root: Via Dirtycow exploit, Install TWRP & flash SuperSu
-LineageOs is the successor to CyanogenMod. It is directly based on AOSP, bare bones Android. ZERO bloat. You pick what Google apps get installed when you get to the GApps part.
This will wipe all of the data off your phone!! I am NOT responsible for ANYTHING you do!!
Summary:
-Prerequisites: ADB: Download Android SDK
-Unlock Bootloader
-Downgrade Android software to 20a (Nougat)
*Need 20a in order to flash TWRP https://forum.xda-developers.com/tm...ock-h830-20a-rom-flashable-zips-imgs-t3511294
-Install TWRP Recovery via ReCowvery https://forum.xda-developers.com/v20/development/h918-recowvery-unlock-v20-root-shell-t3490594
https://github.com/jcadduono/android_external_dirtycow#running
-Install LineageOS
Unlock Bootloader:
-Enable Developer options
-Enable OEM Unlock
-Connect USB PC<->Phone
-Unlock: adb reboot bootloader
fastboot oem unlock
fastboot getvar unlocked (Should say unlocked)
fastboot reboot (get out of fastboot)
adb reboot bootloader (restart into bootloader)
Downgrade to H83020a: (Nougat Android 7.0) https://forum.xda-developers.com/tm...ock-h830-20a-rom-flashable-zips-imgs-t3511294
-Download & Install LGUP_Store_Frame_Ver_1_14_3.msi https://forum.xda-developers.com/tm...ock-h830-20a-rom-flashable-zips-imgs-t3511294
-Download & unzip UPPERCUT_1.0.0.0.zip https://forum.xda-developers.com/tm...ock-h830-20a-rom-flashable-zips-imgs-t3511294
-Download & Install Latest LG Windows PC drivers http://tool.lime.gdms.lge.com/dn/downloader.dev?fileKey=UW00120120425
-Download H83020a_00_1107.kdz https://forum.xda-developers.com/tm...ock-h830-20a-rom-flashable-zips-imgs-t3511294
-Turn OFF device then place in Download Mode: Hold Volume Up while plugging in USB cable.
-Double-click the UPPERCUT.exe to load LGUP... ( I got errors, then clicked abort - not sure whats going on here, but continue with steps below)
-Open LGUP (desktop shortcut)
-Select device
-Check "Upgrade" box
-Check BIN File box under File Type then select H83020a_00_1107.kdz
-Click START button to flash file to G5 (you may have to close and reopen LGUP before being able to hit Start)
-Phone reboots
-"Encryption Unsuccessful" message: Click Reset phone & allow it to do its thing
Install TWRP Recovery - ReCowvery Method
https://github.com/jcadduono/android_external_dirtycow#running
https://forum.xda-developers.com/v20/development/h918-recowvery-unlock-v20-root-shell-t3490594
https://forum.xda-developers.com/tmobile-lg-g5/development/root-h830-20a-nougat-lg-g5-hard-t3542496
-Download (4) ReCowvery files to ADB.exe directory: https://build.nethunter.com/android-tools/dirtycow/arm64/
-Download latest TWRP to ADB.exe directory & rename to twrp.img: https://dl.twrp.me/h830/
-Command Steps: https://github.com/jcadduono/android_external_dirtycow#running
adb push dirtycow /data/local/tmp
adb push recowvery-applypatch /data/local/tmp
adb push recowvery-app_process64 /data/local/tmp
adb push recowvery-run-as /data/local/tmp
adb push twrp.img
adb shell
$ cd /data/local/tmp
$ chmod 0777 *
$ ./dirtycow /system/bin/applypatch recowvery-applypatch (wait until done, ~2min)
$ ./dirtycow /system/bin/app_process64 recowvery-app_process64 (will see Tmobile screen, continue)
$ exit
adb logcat -s recowvery (still tmobile screen)
"[CTRL+C]" (Keyboard CTRL+C to break from cmd)
adb shell reboot recovery (wait for phone to reboot to Android)
adb shell
$ getenforce (should say Permissive)
$ cd /data/local/tmp
$ ./dirtycow /system/bin/run-as recowvery-run-as
$ run-as exec ./recowvery-applypatch boot (wait for it to flash boot image)
$ run-as su (should say "We have root access")
ls /sdcard/twrp.img (should show file)
dd if=/sdcard/twrp.img of=/dev/block/bootdevice/by-name/recovery (flash TWRP)
reboot recovery
-Should be in TWRP!
TWRP Recovery Startup & Disable Encryption:
-Swipe to allow modifications
-Disable encryption & Root:
-Download latest no-verity zip to adb.exe folder: https://build.nethunter.com/android-tools/no-verity-opt-encrypt/
-Copy to no-verity phone:
adb push no-verity-opt-encrypt-6.0.zip /sdcard
-Flash latest no-verity zip via TWRP
-Download latest SuperSu to adb.exe folder: (SuperSu/Root is only needed here if you will stick with Nougat rooted, won't hurt regardless) https://download.chainfire.eu/1220/SuperSU/SR5-SuperSU-v2.82-SR5-20171001224502.zip
-Copy SuperSu to phone:
adb push SR5-SuperSU-v2.82-SR5-20171001224502.zip /sdcard
-Flash SuperSu zip via TWRP
-Format Data (REQUIRED!):
-TWRP->Reboot->Recovery
-TWRP->Wipe->[Format Data]
-Reboot
-Flash SuperSu again (? I didnt do this and didnt end up with SuperSu, hoping this fixes that)
-Wait for Android to boot, will show "Android is starting" message. Go through phone setup
-Should have SuperSu installed & root
*If you don't have SuperSu:
-Reboot to recovery (Enable Developer option, enable adb debugging, adb reboot recovery)
adb push SR5-SuperSU-v2.82-SR5-20171001224502.zip /sdcard
-Flash SuperSu zip. Wipe Cache/dalvik. Reboot System.
-Ignore Warning message on boot. This is because we unlocked the bootloader.
-Should have SuperSu now!
Install UNOFFICIAL LineageOS-15.1 (Oreo, Android 8) https://forum.xda-developers.com/lg-g5/development/rom-unofficial-lineageos-15-1-g5-t3806842
-Download GApps: (Pick you own style, I chose mini) https://opengapps.org/?arch=arm64&api=8.1&variant=nano
-Download LineageOS for G5: https://forum.xda-developers.com/lg-g5/development/rom-unofficial-lineageos-15-1-g5-t3806842
-Download to-x86cpu.zip: https://forum.xda-developers.com/lg-g5/development/rom-unofficial-lineageos-15-1-g5-t3806842
-Copy files to phone
-Restart phone into TWRP Recovery: adb reboot recovery
-TWRP:
-Flash to-x86cpu.zip
-Back, Back, Reboot->Recovery
-Flash LineageOS
-Wipe cache, and dalvik cache
*Optional: Flash Magisk (root, customization, etc) https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
-Flash GApps
-Wipe->Factory Reset (swipe)
-Reboot . Will reboot a couple times. Then see arch with circle moving. Wait ~5 minutes. Enjoy.
-Install MagiskManager-v7.0.0.apk (Required for Magisk) https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Reserved1
Reserved2
Please share any customizations you think others would want. Like how to increase the volume (mine is low, unless the speaker is broken!), status bar tweaks, ...
Thank You for this....worked for me...
You're awesome, I just picked up an H830 for $45 on ebay, last flagship with swappable batteries. The camera with gcam port is superb, so everything I need in a phone still.
Hello sir. i have missed disable encryption steps.
and now my phones getting encrypted.. what should i do.. please help. :crying:
Encryption Unsuccessful
I've done everything correctly using this guide and the dirtycow github link, but no matter what I still get the "Encryption Unsuccessful" message.
It tells me that the password I entered was correct, but the data is corrupted and that I need to factory reset my phone. Pressing the reset phone button brings me to TWRP.
Really hope I didn't kill my phone...how do I fix this?
---------- Post added at 05:57 AM ---------- Previous post was at 05:39 AM ----------
I give up. How do I bring this back to stock
One correction, on the step "adb push twrp.img" , need to add " /sdcard/".
Worked great. Now running stock 30c with mk2000 kernel, rooted with magisk. Thanks for the writeup!
You need to follow the twrp recovery startup instructions now, flash no-verity etc...
Asdfguy86 said:
I've done everything correctly using this guide and the dirtycow github link, but no matter what I still get the "Encryption Unsuccessful" message.
It tells me that the password I entered was correct, but the data is corrupted and that I need to factory reset my phone. Pressing the reset phone button brings me to TWRP.
Really hope I didn't kill my phone...how do I fix this?
---------- Post added at 05:57 AM ---------- Previous post was at 05:39 AM ----------
I give up. How do I bring this back to stock
Click to expand...
Click to collapse
You need to follow the twrp recovery startup instructions now, flash no-verity, format data....
Then grab the oreo 30c zip from the tmobile g5 xda forum and flash it from twrp
boxes said:
You need to follow the twrp recovery startup instructions now, flash no-verity, format data....
Then grab the oreo 30c zip from the tmobile g5 xda forum and flash it from twrp
Click to expand...
Click to collapse
I did do all of that stuff as well, but it still would give me the Encryption Unsuccessful message. I guess I installed TWRP correctly at least because pressing "Reset Phone" would take me to TWRP. From there I would try formatting data and flashing no-verity/supersu.
If I feel like making another backup of my phone one day I'll give this custom rom thing another try, but thanks for the help!
No SuperSu
I can't get SuperSu to install so my phone is not rooted.
I see in your instructions that you had to install it twice but that didn't help.
I originally installed LinageOS 16.0 but when I saw you used 15.1 I went back and installed that.
Neither worked.
When I try to install SuperSu with TWRP, I see the lines:
- patching sepolicy
--- Failure, aborting
I'm assuming that is the problem.
When I invoke getenforce under TWRP, it shows 'Permissive' but when I try under LinageOS, it shows 'Enforcing'.
Under Settings/System/Developer options/Root Access I can only choose between 'Disabled' and 'ADB only'.
Any idea where to go from here? How would I go about starting over?
TIA, Jim
jimmcghee said:
I can't get SuperSu to install so my phone is not rooted.
Click to expand...
Click to collapse
Well...
Never mind.
After looking at it all for about the 50th time, I noticed the optional install of Magisk.
It ain't so optional. At least, for me.
I flashed it and installed the apk and
I NOW HAVE ROOT!!!
I don't claim to understand it but SuperSu didn't flash/work and Magisk does.
Hope this helps some other poor soul.
While I'm at it, I saw a post about how the line
adb push twrp.img
in 'Install TWRP Recovery - ReCowvery Method' should have been
adb push twrp.img /sdcard/
Any chance that could be corrected in the walk through?
And,
the gapps for LinageOS 15.1 is 8.1 but the one for LinageOS 16.0 (the newest) is 9.
I probably should have known this but would you consider mentioning this in the walk through?
I know, users are neeever happy. What can I say.
Except, of course, thanks for putting all this toheather. I'm sooo tickled I've finally gotten this working.
Asdfguy86 said:
I did do all of that stuff as well, but it still would give me the Encryption Unsuccessful message. I guess I installed TWRP correctly at least because pressing "Reset Phone" would take me to TWRP. From there I would try formatting data and flashing no-verity/supersu.
If I feel like making another backup of my phone one day I'll give this custom rom thing another try, but thanks for the help!
Click to expand...
Click to collapse
I saw that someone else had this same issue, the solution was to use an older version of TWRP, they no longer encountered the encryption unsuccessful message. I actually used an older version when I did this, I believe it was twrp-3.2.3-0-h830.img
I didn't have any issues. I should have mentioned this earlier on.
Once you get the phone all setup though, you'll want to flash the latest TWRP from within TWRP or flashify. I found that the older version of TWRP had issues making backups of certain partitions.
boxes said:
I saw that someone else had this same issue, the solution was to use an older version of TWRP, they no longer encountered the encryption unsuccessful message. I actually used an older version when I did this, I believe it was twrp-3.2.3-0-h830.img
I didn't have any issues. I should have mentioned this earlier on.
Once you get the phone all setup though, you'll want to flash the latest TWRP from within TWRP or flashify. I found that the older version of TWRP had issues making backups of certain partitions.
Click to expand...
Click to collapse
Thanks a bunch! This did actually work for me, and now I have TWRP + rooted stock kernel with SuperSU.
I did have to flash SuperSU twice for it to work, but since then it's been flawless.
boxes said:
You're awesome, I just picked up an H830 for $45 on ebay, last flagship with swappable batteries. The camera with gcam port is superb, so everything I need in a phone still.
Click to expand...
Click to collapse
hey boxes - which GCam port are you using (and on which ROM)? I have a few stock 20a H830 phones (haven't flashed with LOS or other custom yet) as well as a LOS 17.1 I just flashed yesterday and having issues getting GCam to run without FC'ing on any of them... thnx man
mgreig said:
hey boxes - which GCam port are you using (and on which ROM)? I have a few stock 20a H830 phones (haven't flashed with LOS or other custom yet) as well as a LOS 17.1 I just flashed yesterday and having issues getting GCam to run without FC'ing on any of them... thnx man
Click to expand...
Click to collapse
Not sure which one I was using anymore tbh (got a new phone), try some of Arnova's and CStark27 builds-
https://www.celsoazevedo.com/files/android/google-camera/dev-cstark27/
https://www.celsoazevedo.com/files/android/google-camera/dev-arnova8G2/
boxes said:
Not sure which one I was using anymore tbh (got a new phone), try some of Arnova's and CStark27 builds-
https://www.celsoazevedo.com/files/android/google-camera/dev-cstark27/
https://www.celsoazevedo.com/files/android/google-camera/dev-arnova8G2/
Click to expand...
Click to collapse
I'll give it a go - thanks much
how do I revert back to stock? device shows up as "LGE Mobile for VZW USB Serial Port" on my pc, & LGUP/Uppercut says "Unknown Model" - tried flashing a stock zip on 1 phone thru TWRP but ended up bricking it (usb is not even detected)
edit: never mind, I got it restored using flash tool
edit2: hmm, re-tracing my steps I think it's possible I tried to flash an h850 rom thru twrp, causing the brick (careless mistake after long, tiring day - still looking for h830 firehose to recover that phone) - so I probably didn't need to use flash tool

Question Latest Twrp pros and cons

Today the unlock time for bootloader to unlock will complete and I Intend to install TWRP. I have found the latest officially supported twrp-3.6.1_11-0-alioth.img at https://eu.dl.twrp.me/alioth/. How does it compare to TWRP-3.5.1 https://forum.xda-developers.com/t/recovery-unofficial-twrp-3-5-1-20210702.4300189/.
Can anyone guide me what are the pros and cons of using twrp-3.6.1_11-0-alioth.img and its limitations as compared to TWRP-3.5.1 as I can not find any documentation on twrp-3.6.1_11-0-alioth.img. Any help will be appreciated.
Also does the following limitations of TWRP-3.5.1 also apply to twrp-3.6.1_11-0-alioth.img ?
KNOWN LIMITATIONS:
The following are some known limitations due to either the design nature of Virtual A/B or a problem with ROM themselves. Please read carefully :-
You cannot format data after flashing a ROM zip (Limitation of Virtual A/B). If you want to format, then reboot recovery after flashing ROM. Additionally, if you are encrypted, the newly flashed ROM must be able to decrypt your device. If not, then you have to format data before flashing the ROM It appears, you can actually format data after reboot even if the new ROM cannot decrypt.
You can flash only one ROM in one boot. If you wanna flash another ROM, you must boot to system once. This is again a limitation of Virtual A/B.
Once you have rebooted after flashing a ROM, you cannot write to the data partition until you boot successfully to the new ROM. Android seals the data partition after a ROM flash to prevent any accidental brick since the newly flashed ROM is actually stored in /data. Only data format is allowed in this case. Once you successfully boot to the new ROM, your storage becomes ready for writing again.
Ideally, after flashing a new ROM, you should only need to wipe your data rather than format. But, due to a problem in the device trees current ROMs are using, you will have to format data if you are currently on miui and want to switch to a custom ROM. Specifically, the roms need this commit and to set vendor security patch level to fix this issue. Switching between custom ROMs should not need format, except for hentai OS.
If you are currently on hentai OS, then before using TWRP, you must flash vendor_boot from the link provided in every hentai OS release. Otherwise, you will get black screen. This is only needed when you boot to TWRP for the first time. Do not repeat this step again. Also, do not try this with beta version of the ROM. Use it only with stable.
If you reboot to older slot after flashing new ROM, the new ROM will be cancelled and you will have to reflash again. This is because of how Virtual A/B works.
If you must flash magisk via recovery (it's not recommended now), please uncheck "Inject TWRP after install" else TWRP will remove magisk.
Do not flash magisk after flashing a ROM before reboot. Magisk's zip detects slot in a different way that will cause issues.
Backuptool (used to persist magisk and gapps across ROM updates) will also not work in recovery due to A/B. You will have to flash gapps (or any other zips) everytime after flashing a ROM.
you dont search enough...
this is latest A12 TWRP....
https://dl.akr-developers.com/?dir=skkk/TWRP
Installation:
activateUSB DEBUGGIN and OEM unlocked on Poco
(copy all files in Adb folder) rename the long TWRP file to twrp.img
Disable all security settings like PIN, pattern, fingerprint
start Poco in fastboot
fastboot boot twrp.img"
copy twrp.img to Poco or "adb push twrp.img /sdcard/"
TWRP Menü -> Advanced -> Flash Current TWRP or Install Recovery Ramdisk -> you must test it... both should work
TWRP Menü -> Reboot -> recovery
Magisk and safety net working great...
see also....
Xiaomi devices on Android 12 via Fastboot only:
- Download our ROM zip file
- Unpack downloaded zip file in the PC using WinRAR
- Reboot your device to fastboot mode (press volume down + power)
- Connect to PC via USB cable
- Run fastboot installation script from unpacked zip according your PC operating system:
--- For Windows OS - windows_fastboot_update_rom.bat
--- For Linux - linux_fastboot_update_rom.sh
--- For MacOS - macos_fastboot_update_rom.sh
greeting
hofi01 said:
you dont search enough...
this is latest A12 TWRP....
https://dl.akr-developers.com/?dir=skkk/TWRP
Installation:
activateUSB DEBUGGIN and OEM unlocked on Poco
(copy all files in Adb folder) rename the long TWRP file to twrp.img
Disable all security settings like PIN, pattern, fingerprint
start Poco in fastboot
fastboot boot twrp.img"
copy twrp.img to Poco or "adb push twrp.img /sdcard/"
TWRP Menü -> Advanced -> Flash Current TWRP or Install Recovery Ramdisk -> you must test it... both should work
TWRP Menü -> Reboot -> recovery
Magisk and safety net working great...
see also....
Xiaomi devices on Android 12 via Fastboot only:
- Download our ROM zip file
- Unpack downloaded zip file in the PC using WinRAR
- Reboot your device to fastboot mode (press volume down + power)
- Connect to PC via USB cable
- Run fastboot installation script from unpacked zip according your PC operating system:
--- For Windows OS - windows_fastboot_update_rom.bat
--- For Linux - linux_fastboot_update_rom.sh
--- For MacOS - macos_fastboot_update_rom.sh
greeting
Click to expand...
Click to collapse
I know where the lastest TWRP for Poco F3 is and how to install it as I have already installed it. That was not the question. The question was that "does limitations of TWRP-3.5.1 also apply to twrp-3.6.1_11-0'? Limitattions like being forced to reboot TWRP after flashing a every single zip file and other limitations like it as mentioned above. Thanks for your reply anyways.
so for me, TWRP does not start again, after installing a file.
I install TWRP, boot into TWRP again and install Magisk. after that I boot into the ROM.
TWRP does not restart itself
So, still no decryption on A12?
I wanted to test new custom roms but i dont want to have to reinstall everything from scratch if i go back to my current rom (.EU).
Can twrp make a full backup and restore it despite not having decryption?
If it cant, can I make a full back up of my phone from cmd in fastboot mode? (so i can just flash it from fastboot to restore everything as it is now)

Categories

Resources