[TWRP]LG V40 / Judypn

Search This thread

newonsh

New member
Mar 5, 2016
3
0
Hi all. Hope someone is still listening. I've read most of this thread but haven't found an answer to my problem and hoping I'll find it. I have a V405UA with the bootloader unlocked. My next step is to get twrp installed and then a custom ROM. I followed this guide and get as far as the ramdisk step. I've copied the twrp boot img to both internal storage and my micro SD but when I press Install ramdisk it brings up a different file system and no matter what folder I search in, I cannot find the file. I also cannot access the micro.sd. What am I missing? I'd greatly appreciate some guidance. Thanks.
 

kuapao

Senior Member
Jun 21, 2006
61
3
Hi, I was hoping someone can help me. I feel so silly asking but, what is the difference between the metadata and non-metadata images in the OP? Should I be using one vs the other?

I am trying to install TWRP recovery on my LG LMV405QA. I believe it is correctly bootloader unlocked, and I had restored the abl_a and abl_b backups I took after I flashed v35eng to both and issued the fastboot oem unlock command. When I view the Developer Options, it indicates that bootloader is already unlocked, which is why the Allow OEM Unlock option is grayed out. Additionally, my software info is as follows: Android 9, software version V405QA20e, sec patch level Jan 1, 2020.

The issue I am encountering is, I tried fastboot boot with the metadata image first, but it just boots right back to the OS. Secondly, I tried the non-metadata image, and I finally booted into TWRP but now, when trying to install recovery ramdisk, I am unable to view ANY files on my SD card, and even my internal storage shows 0MB. I have not set any encryption on the SD card, nor have I set up any screen lock fingerprint, pattern, faceid nor PIN.

I am certain it is something I am overlooking. Please excuse my ignorance.
 

kuapao

Senior Member
Jun 21, 2006
61
3
Hi, I was hoping someone can help me. I feel so silly asking but, what is the difference between the metadata and non-metadata images in the OP? Should I be using one vs the other?

I am trying to install TWRP recovery on my LG LMV405QA. I believe it is correctly bootloader unlocked, and I had restored the abl_a and abl_b backups I took after I flashed v35eng to both and issued the fastboot oem unlock command. When I view the Developer Options, it indicates that bootloader is already unlocked, which is why the Allow OEM Unlock option is grayed out. Additionally, my software info is as follows: Android 9, software version V405QA20e, sec patch level Jan 1, 2020.

The issue I am encountering is, I tried fastboot boot with the metadata image first, but it just boots right back to the OS. Secondly, I tried the non-metadata image, and I finally booted into TWRP but now, when trying to install recovery ramdisk, I am unable to view ANY files on my SD card, and even my internal storage shows 0MB. I have not set any encryption on the SD card, nor have I set up any screen lock fingerprint, pattern, faceid nor PIN.

I am certain it is something I am overlooking. Please excuse my ignorance.
I joined V40 Telegram group and was able to get is resolved with /notes from there. It helped to get a different judypn image file. It helped that in TWRP, I reflashed to boot the pre-saved boot image, then attempted to mount Vendor and System and Format Data, before installing any TWRP nor Magisk.
 

Roizoulou

Member
May 16, 2019
29
4
Google Pixel 3
I joined V40 Telegram group and was able to get is resolved with /notes from there. It helped to get a different judypn image file. It helped that in TWRP, I reflashed to boot the pre-saved boot image, then attempted to mount Vendor and System and Format Data, before installing any TWRP nor Magisk.
can you please share the img? I am stuck in fastboot without recovery
 

kuapao

Senior Member
Jun 21, 2006
61
3
can you please share the img? I am stuck in fastboot without recovery
Try this video. He has links for obtaining files.
"How to Install Custom Recovery, Custom Rom and Root on LG V40 ThinQ [All Files Provided"
Good luck! It is easy to miss steps and even if you did things in the correct order and completely, who knows if it will work out.
 
  • Like
Reactions: shannester

saiankun

Member
Jun 15, 2022
8
0
links off I have my v405ua with unlocked bootloader, I would like to install rom with android 12 but for that I need custom recovery my current rom and android 10 verizon variant
 

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    Code:
    #include "std_disclaimer.h"
    /*
     * Your warranty is now void.
     *
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this Recovery
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you.
     */


    Requirements
    1. Unlocked bootloader
    2. working ADB/fastboot on a PC
    3. the TWRP image downloaded
    4. Pie firmware on the active slot

    Installation guide (pre metadata encryption):
    1. Copy the twrp image to your phones storage and/or micro sdcard
    2. Start cmd/powershell/terminal with working adb/fastboot
    3. Reboot to bootloader
      1. adb reboot bootloader OR
      2. turn off the phone (or reboot), as soon as it turns on, hold volume down while USB cable is connected
        • If youre unofficially bootloader unlocked, and you nuked laf, its volume up and USB for you
    4. fastboot boot TWRP-judypn-boot.img
    5. Confirm allow system modifications if asked
    6. Press cancel if asked for a password (aka when youre encrypted, could also be that it doesnt show you /data at all and no password screen)
    7. Go to Advanced -> Install Recovery Ramdisk
    8. Select the TWRP image which you copied to your phone/sdcard earlier
    9. TWRP will now be installed to both slots (boot_a and boot_b)
    10. Go to Reboot -> Recovery to make sure TWRP is successfully installed

    Features:
    1. Install recovery ramdisk:
      Selecting this, and then an image (e.g. of TWRP) allows you to install the ramdisk (where TWRP resides for example) into both currently installed kernels/boot images
    2. Inject TWRP after install:
      Automatically injects current installed TWRP into the boot image of the ROM/zip youre installing when ticked

    Broken:
    1. LGs encryption on Stock
    2. encryption on other ROMs(?)

    How to flash ROMs (PRE metadata encryption):
    1. Reboot to TWRP
    2. Make a backup
    3. Install -> select the ROM zip -> tick Inject TWRP -> Swipe for install
    4. wait... ROM will be installed into the NON ACTIVE slot (if youre on a, it will be installed to b, and vice versa)
    5. Reboot system
    for gapps, magisk or other mods:
    1. DO NOT REBOOT TO SYSTEM from last step
    2. Go back -> Reboot -> select the non active slot (to where the rom got installed to) -> select recovery
    3. Install gapps, magisk, and whatever else you want
    4. Reboot system

    How to initially flash ROMs (metadata encryption):
    1. Reboot to existing TWRP
    2. Make a backup of everything you want to keep
    3. Copy backup to PC (or another external medium)
    4. Flash the ROM
    5. Do NOT inject TWRP (this will break recovery otherwise)
    6. Go to reboot -> Select opposite slot
    7. Reboot to recovery
    8. Perform factory reset (this is to setup encryption)
      1. Apply update (from ADB) with adb sideload for gapps/magisk
        • reboot to bootloader
        • fastboot boot judypn_TWRP_bootable-metadata.img
        • Use as usual
    9. Reboot system

    How to update ROMs (metadata encryption):
    • Reboot to bootloader
    • fastboot boot judypn_TWRP_bootable-metadata.img
    • Install -> Select ROM zip
    • do NOT inject TWRP
    • Reboot -> select opposite slot (it will tell you even which it installed the ROM to)
    • Reboot bootloader
    • fastboot boot judypn_TWRP_bootable-metadata.img
    • Install gapps/magisk
    Or
    • reboot recovery
    • apply update -> from adb (in e.g. Lineage recovery)
    • On PC: adb sideload <new version zip>
    • (Advanced -> ) Reboot recovery
    • adb sideload gapps/magisk
    • reboot system

    Warnings:
    1. Updating a ROM means reflashing the mods you flashed too (e.g. Gapps), addon.d doesnt work properly
    2. Be aware of the slot you are currently on
    3. If youre flashing a ROM to a slot, make sure you also have the required firmware (abl, modem, and so on) in that slot

    Infos:
    1. System image/Vendor image and system/vendor are redundant, the image variants are direct copies of the partition (and also their size) while the others are "simply" files copied and repacked
    2. How to use decrypted stock by @Xsavi : https://forum.xda-developers.com/lg-v40/how-to/guide-twrp-data-access-stock-t3970149
    3. Metadata encryption TWRP requires 10 firmware to use properly, no guarantee for it to work on Pie firmware!

    Download:
    Metadata bootable: https://drive.google.com/file/d/1hdzeH3AIQVf3siQNsI27IS_vmghPESEG/view?usp=sharing + Install zip: https://drive.google.com/file/d/1CQUfg54zD838detcIJqdRiKXdVNtd6Iy/view?usp=sharing
    Bootable: https://drive.google.com/open?id=1UnIFbJlXHl6x4azq6H6yS-PRfk-omdTP
    Old: https://drive.google.com/open?id=1p3IrbeOxM4ay01JccyifWDuxqqrE0_Dl


    Sources:
    device tree: https://github.com/SGCMarkus/android_device_lge_judypn-twrp/tree/android-9.0
    kernel: https://github.com/SGCMarkus/android_kernel_lge_sdm845/tree/lge-pie-v409-20a

    XDA:DevDB Information
    TWRP for Judypn, ROM for the LG V40

    Contributors
    SGCMarkus
    ROM OS Version: 9.x Pie

    Version Information
    Status: Alpha

    Created 2019-09-20
    Last Updated 2019-09-20
    5
    A little update here :)

    Its not as complete as i wanted it to be (encryption still doesnt work... :/ ), but this TWRP should be "good to go" nonetheless.
    It now has the ability to be booted, no need to flash anymore (aka you can then proceed to patch your existing boot slots with TWRP), and it properly formats /data now, without stock complaining about "not properly encrypted" when youre doing the decrypt process.
    OP will be updated soon.
    4
    Hi,
    My phone wouldn't boot after flashing twrp.img. Yesterday it would get stuck at lg boot logo. Today however it goes straight to fastboot mode when i turn it on.
    When i boot to recovery I will first have to go through the old recovery before I get to the new twrp.

    I did try to follow the instruction, but a/b partitioning might have messed it up for me.
    Before I flashed twrp I checked the current slot which was A. Then I flashed the recovery file to slot A. It was pretty unclear if I was supposed to flash it on the current active slot or the inactive one. Instructions says: "4. fastboot flash boot_a TWRP.img (or boot_b, depends on the slot youre on)".
    I'm not able to backup in twrp (in case I mess it up some more) because it says fail to decrypt data.

    How should I proceed? Im still active on slot A, havent tried B. My end goal is to get lineageos 17 on it.

    -Karl

    keymaster probably crashing because of security patch missmatch (boot.img and system need to have the same security patch)

    Currently working on a new TWRP, where you wont have any of these issues...

    For now:
    Flash twrp
    directly boot to it with button combo
    in twrp: flash back stock boot image from your system version (e.g. from a kdz extracted), dont reboot yet
    go to advanced -> install recovery ramdisk -> select twrp.img on your phones memory (internal, or ext. sdcard)
    3
    Well, having a big issue. I installed TWRP, Install custom rom w/ twrp inject, reboot menu, selected the slot where the rom, restarted, no TWRP, No root, but custom rom and now it comes up as unknown in LG UP so I can try to fix it. I think its mostly a brick since I can't do anything. No Fastboot either because im in slot b and cant switch because no root or fastboot.

    did you have pie firmware also in the slot where you installed LOS to?
    otherwise.... nothing is ever really a brick, you still have 9008 mode as last option
    2
    Success!

    That definition doesn't apply in the IT world, lol. I used 20.3, so maybe its worth trying.

    At this point you can easily start from (almost) scratch as far as getting data. Since you have all the hard stuff done and every mode you need available. Now that you are where I was yesterday, try what I did even though it may seem a little redundant: Switch to slot b, go into download mode, flash a kdz with partition dl (uncheck laf_a, boot_a, and boot_b). You will still have fastboot in a, dl mode in b, and TWRP in both. It automatically rebooted to TWRP, I switched to slot a and installed recovery ramdisk again (just because). Rebooted to recovery, went to mount and verified I could mount vendor and system. Then proceeded with Xsavis guide with Magisk 20.3. I never let it boot to Android at any point before I was done with Xsavi's guide and at that point I did a full Android setup and then a TWRP backup. I just went to recovery and confirmed I can still mount vendor and system.
    Thanks again. I tried following your exact steps:

    1. Using TWRP, I switch to slot b then powered off. This started some odd bootloop but holding Volume Up and inserting USB brought me to download mode eventually.

    2. In download mode, flashed V405QA720e_01_NAO_US_OP_1230.kdz using partition dl, first selecting ALL and then unchecking laf_a, boot_a, and boot_b. This completed successfully but did NOT reboot by itself into TWRP. Instead it booted Android. LGUP did not wait for me to do anything after completing the flash and booting into Android. Grrr.

    3. I booted into TWRP as quickly as I could, did nothing at all in Android setup except shut down. Shows I am now in slot A, cannot mount Vendor, backup shows data as zero bytes. So I am guessing I am on my way to encryption hell once again :) At this point there seems no purpose in following the remainder of your protocol since it appears the "damage" has been done by the reboot to Android on slot A.

    4. So I got into fastboot and confirmed it thinks the current slot is A using fastboot getvar all. I then used fastboot --set-active=b and this started an immediate reboot into the odd bootloop from which I was again able to enter download mode. I once again flashed the .kdz and was waiting at the time of the reboot to use the hardware buttons to get into TWRP ass soon as the reboot started. That worked! It left LGUP feeling a bit out of sorts but I just shut it down.

    In TWRP I then:

    1. Accepted system modifications.

    2. Check my current slot and it was A. But I'll be darned - I am able to select Vendor for the 1st time ever! At this point and went back to following your protocol.

    3. Re-do the RAM disk.

    4. Rebooted to Recovery successfully. Went to mount and verified I could still tap vendor and get a checkbox and did so with system as well since you mentioned it. Using the File Manager I can actually see things like an /etc folder in /vendor. Looking good!

    5. Did the push of the fstab to /vendor/etc, did format data, did the push of .magisk, and finally tried to install magisk (used 20.4). This died quickly with Error 1 right after displaying "mounting /system, cannot mount /system, unmounting partitions". Hmm. I did see that you had tested mounting both system and vendor and I did the same. Perhaps since system was already mounted, the magisk installed could not mount it again? So I went back and managed to uncheck system. Same result on another magisk install attempt. So went back and unchecked both system AND vendor - this leaves only my external_sd checked - and tried again. No luck.

    6. Decided to try rebooting to recovery again and looked around. In mount, only data and my external_sd are checked. Using file Manager, I see the .magisk is still in /data. Tired to install magisk once again and it seemed to work. Hurrah!

    7. So now the acid-test: reboot to system and it goes to the Android setup. As soon as I see the Android setup, I shut down and went back into TWRP to see what I can see in /data. I'll be dipped! In backup, data shows 1218MB! File Manager actually shows files! I have never seen this before on this device! It seems that encryption has indeed been defeated!

    8. On to the Android setup... Magisk Manager in there and runs. I think that finally - with all of your help and a bit of luck/trial and error - I have things where I need them to be. So to prove the point, on to doing a first real TWRP backup. At this point I am selecting anything with a non-zero MB and excepting the system_image and vendor_image which I am told are redundant to system and vendor. The backup completed successfully and is beautiful to see!

    I just cannot believe that I am released from hell thanks to your efforts and those of all who have responded to my many, many newbie posts. I have documented all this in this lengthy post as a record for myself and possibly as a semi-guide to others who may find it useful.

    I can finally see the beginning of the end in this transition from my old Samsung Note 3 with Android 4.4.2. Thanks once more!