[TWRP]LG V40 / Judypn

Search This thread

AsItLies

Senior Member
Nov 4, 2009
1,714
634
tucson
Samsung Galaxy S10
Yes i reinstall android the phone works but i dont have root..
i use viper4android for better musik and runtastik app for running.
i believe it has something to do with magisk and viper4android.
I tried to re do everything.
Flash TWRP in slot A and then android but everytime i flasj Magisk the phone bootloops the LGV40 screen and the only way for the phone to work is to fix bootloop recovery through TWRP.
I dont understand how is it possible that the root was lost in the first place???

Afraid I've no idea. First though, when the phone bootloops, that's obvious, it's a problem. But u say you 'lost root'... how did u check that? How do u know it was 'lost'?

If you're 'starting over', with new flash kdz and flash boot+twrp to correct slot, then we know it will work to flash magisk and dm_verity, it's worked for many many people. Of course it works.

if you're trying to keep things installed, and not formatting, then it's not starting over, it's trying to make something work that hasn't worked. I don't think yer gonna narrow down what the problem is unless go all the way back to beginning.

cheers
 

ctl999999

Member
Mar 22, 2007
41
0
I am using V405EBW with bootloader unlocked, just upgraded to 30d firmware. Are the below steps able to flash the twrp without erase the phone apps/data ? I dun care if I can see the data in twrp or not, just wanna keep the old data.

1. Reboot to bootloader
2. fastboot boot judypn_TWRP_bootable-metadata.img
3. install twrp-installer-3.4.0-0-judypn.zip in twrp
4. reboot to recovery once
5. install magisk
6. reboot to system

Thanks a lot.
 

AsItLies

Senior Member
Nov 4, 2009
1,714
634
tucson
Samsung Galaxy S10
I am using V405EBW with bootloader unlocked, just upgraded to 30d firmware. Are the below steps able to flash the twrp without erase the phone apps/data ? I dun care if I can see the data in twrp or not, just wanna keep the old data.

1. Reboot to bootloader
2. fastboot boot judypn_TWRP_bootable-metadata.img
3. install twrp-installer-3.4.0-0-judypn.zip in twrp
4. reboot to recovery once
5. install magisk
6. reboot to system

Thanks a lot.
Good question, don't know. May have to try to find out, be sure to save your original boot partition first, in case u have to revert. (pretty sure the installer zip installs to both a & b boot).

The 'reboot to recovery' prob won't be needed, as that's for recognizing your formatted 'data', which u don't want to do.

So you'd have magisk but couldn't back up data. Worth trying I guess, if it suits yer needs.

cheers
 

sumDewd

Member
Jan 31, 2012
20
2
Yer welcome no probs.

I went ahead and deleted the boot_a one as that's not for 30e. Don't need any confusion. In case others don't know, the b and a are interchangeable. so the one above labeled b could be used on a or b. The important thing is that it's the right one for att 30e.

cheers

Hi there,

I've been lurking on this thread a while, waiting news on a 10-friendly twrp boot image. I got up to 30c, (ATT model) then that must have been when I unlocked the bootloader and rooted, as I can no longer get OTA updates beyond that.

I was hoping the 30e-twrp boot image provided by @AsItLies would work, but unfortunately the phone hangs at the LG boot logo. I don't suppose anyone would be kind enough to patch a 30c boot image from an ATT device? I couldn't find a tutorial that wasn't a bit over my head :(
 

Attachments

  • boot_a_ATT30c.bin
    64 MB · Views: 26

AsItLies

Senior Member
Nov 4, 2009
1,714
634
tucson
Samsung Galaxy S10
Hi there,

I've been lurking on this thread a while, waiting news on a 10-friendly twrp boot image. I got up to 30c, (ATT model) then that must have been when I unlocked the bootloader and rooted, as I can no longer get OTA updates beyond that.

I was hoping the 30e-twrp boot image provided by @AsItLies would work, but unfortunately the phone hangs at the LG boot logo. I don't suppose anyone would be kind enough to patch a 30c boot image from an ATT device? I couldn't find a tutorial that wasn't a bit over my head :(

Hi, first try this one, it's for 30c but can't remember if that was at&t or not.

It won't hurt anything so long as you remember to backup your current boot image, if it doesn't work after flashing it with qfil, just replace it with original.

This one is at&t 30b and the usual procedure, when a new rom comes out, is to use the previous one (that would be this one), flash it with qfil, then boot straight to recovery. Once in recovery go to advanced and use 'dd' commands to copy the backup you made of 30c boot and copy it back to the boot partition. You can then use the twrp you just booted to 'ramdisk install' twrp to the 30c partition you just dd'd over.

I'll patch yer 30c image tomorrow if the above doesn't get u going.

cheers
 

AsItLies

Senior Member
Nov 4, 2009
1,714
634
tucson
Samsung Galaxy S10
Hi there,

I've been lurking on this thread a while, waiting news on a 10-friendly twrp boot image. I got up to 30c, (ATT model) then that must have been when I unlocked the bootloader and rooted, as I can no longer get OTA updates beyond that.

I was hoping the 30e-twrp boot image provided by @AsItLies would work, but unfortunately the phone hangs at the LG boot logo. I don't suppose anyone would be kind enough to patch a 30c boot image from an ATT device? I couldn't find a tutorial that wasn't a bit over my head :(

Okay, here is your patched boot loader for att 30c.

Remember, flash this with qfil or fastboot, but be sure to then go directly to recovery, don't boot the device. Once in recovery;

1) format (don't wipe) data
2) reboot to recovery
3) flash magisk
4) flash dm-verity

then u should be all set

cheers
 

sumDewd

Member
Jan 31, 2012
20
2
Okay, here is your patched boot loader for att 30c.

Remember, flash this with qfil or fastboot, but be sure to then go directly to recovery, don't boot the device. Once in recovery;

1) format (don't wipe) data
2) reboot to recovery
3) flash magisk
4) flash dm-verity

then u should be all set

cheers

Yes! You are the man - thank you!

I was unable to boot using either the 30b or 30c you initially provided. Flashed to both slots, tried alternating active slots but no dice - couldn't boot or get into recovery. The 3rd one (patched from the .img I provided) did the trick.

Like the other guy you helped, I was unable to boot into recovery after flashing that 3rd patched boot, trying both via button method and 'fastboot reboot recovery'. However, I was able to boot the system (after having to adjust active slot) and then 'adb reboot recovery' which got me in.

I will have to say, the V40 is one of the fussier of the handful of devices I've unlocked/rooted/installed custom roms on. This is my second V40...the first one I effectively bricked by doing some stupid stuff after Lineage started acting up. Back on Lineage now and don't think I'll be touching anything for a while!
 

AsItLies

Senior Member
Nov 4, 2009
1,714
634
tucson
Samsung Galaxy S10
Yes! You are the man - thank you!

I was unable to boot using either the 30b or 30c you initially provided. Flashed to both slots, tried alternating active slots but no dice - couldn't boot or get into recovery. The 3rd one (patched from the .img I provided) did the trick.

Like the other guy you helped, I was unable to boot into recovery after flashing that 3rd patched boot, trying both via button method and 'fastboot reboot recovery'. However, I was able to boot the system (after having to adjust active slot) and then 'adb reboot recovery' which got me in.

I will have to say, the V40 is one of the fussier of the handful of devices I've unlocked/rooted/installed custom roms on. This is my second V40...the first one I effectively bricked by doing some stupid stuff after Lineage started acting up. Back on Lineage now and don't think I'll be touching anything for a while!

You're welcome, no probs.

But, a couple of things; It's really easy to go directly to recovery from qfil (after flashing boot image). To get out of qfil you have to press vol dn + pwr, and hold. Continue to hold them until the phone shows the LG screen, then release both buttons and immediately reapply them. Boom, you now have selections to get to recovery, which will be twrp.

The reason you don't want it to boot is that booting could fail, and it could immediately switch slots, and you wouldn't even know it, and it would mark the other slot unbootable.

So, your bricked v40... it's probably not bricked. You almost have to **try** to brick it, to actually brick it. There are specific files you can flash (unbrick files they are called), that will give you download (lg up) mode, and you can flash a kdz and start over.

Yes, treble enabled devices are more complicated. But we have to get used to them, we're not going backwards ;)

cheers
 

AsItLies

Senior Member
Nov 4, 2009
1,714
634
tucson
Samsung Galaxy S10
Yes! You are the man - thank you!

I was unable to boot using either the 30b or 30c you initially provided. Flashed to both slots, tried alternating active slots but no dice - couldn't boot or get into recovery. The 3rd one (patched from the .img I provided) did the trick.

Like the other guy you helped, I was unable to boot into recovery after flashing that 3rd patched boot, trying both via button method and 'fastboot reboot recovery'. However, I was able to boot the system (after having to adjust active slot) and then 'adb reboot recovery' which got me in.

I will have to say, the V40 is one of the fussier of the handful of devices I've unlocked/rooted/installed custom roms on. This is my second V40...the first one I effectively bricked by doing some stupid stuff after Lineage started acting up. Back on Lineage now and don't think I'll be touching anything for a while!

also, this is the procedure to 'unbrick' a v40 - not that hard really.

Use this link to download the needed files, then follow this procedure (directly copied from the v40 tele group - thnks Lucky, SGMarkus, XSavi, etc).


v40unbrick:

Download (https://drive.google.com/drive/folders/1WQaaM35SWiF_UbXAM8hiRB95D2CDkIEq) the backup. Unzip it to find 7 luns (0-6).

1. Open QFIL
2. Select Flat Build
3. Click load xml and select the rawprogram(#) XML that is in the lun(0-6) folder.
4. If it asks you for a patch xml, click cancel. It's not needed to flash this backup.
5. Click download
6. Repeat steps for each lun folder.
 

sumDewd

Member
Jan 31, 2012
20
2
also, this is the procedure to 'unbrick' a v40 - not that hard really.

Use this link to download the needed files, then follow this procedure (directly copied from the v40 tele group - thnks Lucky, SGMarkus, XSavi, etc).


v40unbrick:

Download (https://drive.google.com/drive/folders/1WQaaM35SWiF_UbXAM8hiRB95D2CDkIEq) the backup. Unzip it to find 7 luns (0-6).

1. Open QFIL
2. Select Flat Build
3. Click load xml and select the rawprogram(#) XML that is in the lun(0-6) folder.
4. If it asks you for a patch xml, click cancel. It's not needed to flash this backup.
5. Click download
6. Repeat steps for each lun folder.

Thanks again for the tips - this is my first 'slotted' device and I'm still getting used to it.

BTW, the ATT version does not have .kdz files available like other models. When I attempted to unbrick the first V40 I instead got ahold of the complete set of partion binaries for my build. Flashed all those back via Qfil, save a few partitions that are IMEI or otherwise unit-specific that you need to keep original. I still could not get that to boot. To be fair, I was a doofus and did not back up my own stock partitions, so some of those phone-unique partitions might have been blown away....it's been a while

BUT - I may have missed this 6-step process with the LUNs. I'll check this out down the road for sure. Seems like this method may be a more automated method of flashing the partitions en masse, rather than manually/individually via partition manager...
 

AsItLies

Senior Member
Nov 4, 2009
1,714
634
tucson
Samsung Galaxy S10
Thanks again for the tips - this is my first 'slotted' device and I'm still getting used to it.

BTW, the ATT version does not have .kdz files available like other models. When I attempted to unbrick the first V40 I instead got ahold of the complete set of partion binaries for my build. Flashed all those back via Qfil, save a few partitions that are IMEI or otherwise unit-specific that you need to keep original. I still could not get that to boot. To be fair, I was a doofus and did not back up my own stock partitions, so some of those phone-unique partitions might have been blown away....it's been a while

BUT - I may have missed this 6-step process with the LUNs. I'll check this out down the road for sure. Seems like this method may be a more automated method of flashing the partitions en masse, rather than manually/individually via partition manager...

You're welcome, any time.

Yes, att and sprint, the 2 that don't provide kdz. I can find both Pie and Q for att if you want them. Yes, having the rawprogram xml is a big help. Another tool 'bkerler edl' is a python based tool (it was used to make the backup with the xml), it can be used to flash it back also. I like it much better as it runs under linux.

mainly, don't despair, you basically can't brick a v40, not when you have the firehose.

cheers
 
  • Like
Reactions: sumDewd

nikothebarber

Senior Member
Jan 6, 2019
121
3
LG V40
So last my I did something stupid I thought I was working in the same set up as a v 30 and I had formatted the system partition now I have RI Flash the ATT 30 e boot image and now I need to find someone who has the system partition to flash I guess thays what i need so I can have my operating system back to boot
 

nikothebarber

Senior Member
Jan 6, 2019
121
3
LG V40
So I messed up last night and had formatted system partition I need someone who has system. Image partition for ATT 30c to please send it to me so I can have operating system to boot back
 

Hienthecat

New member
May 1, 2019
4
0
Okay here are your 2 images. Just as an fyi, these 2 images were not identical, I think it's safe to assume whichever one is the inactive slot (b or a) is the older att version, and the active slot will be the 30e.

cheers

also, in case yer not sure, use 'fastboot getvar all' and at the end of the output it will tell you which slot is active.

Additionally, these images should be flashed using qfil, then upon exiting edl, use the key combo to go directly to recovery (now twrp). First, format data (not wipe), then, reboot recovery. Then flash magisk and dm_verity, and u should be all set.

So, just to make sure it's clear, even though I labeled these both as 30e, one of them is not. One of them is the older att version. We can't know which is which until we know which slot is active, that will be the 30e.
Can you make me a patched boot image for 30f or instruct me on how to patch the boot image with twrp as I have the extracted boot image here
 

Attachments

  • ReadData_ufs_Lun4_0xff06_Len16384_DT_27_04_2021_14_28_51.bin
    64 MB · Views: 13
Last edited:

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
    Trying to upload the one I used here. Hopefully it will work for you.