[TWRP]LG V40 / Judypn

Search This thread

2566SB

Member
Jan 30, 2021
6
0
ok thank you very much for your patience and your advice. whether I succeed or not I will write a howto about lg and todays flashing. (please watch lgv40 guides and lg v40 roms recovery ect ... I have already written a quick little howto to easily go into bootloader mode)

but I think I understood something. if we wanted to flash let's say "android 15" and lg does not make official lgv40 roms for android 15 there can never be custom firmware for android 15 on lgv40?
oh I think TWRP will solve the problem.We know lots of old devices have android Q ROM now.Like Samsung s7,Xiaomi4.Maybe It's not difficult to flash TWRP at that time,just because we can now right?
Just like now we can replace “abl” to flash TWRP ,maybe directly install the NEWest Android ROM is OK.
 

AsItLies

Senior Member
Nov 4, 2009
1,713
635
tucson
Samsung Galaxy S10
ok thank you very much for your patience and your advice. whether I succeed or not I will write a howto about lg and todays flashing. (please watch lgv40 guides and lg v40 roms recovery ect ... I have already written a quick little howto to easily go into bootloader mode)

but I think I understood something. if we wanted to flash let's say "android 15" and lg does not make official lgv40 roms for android 15 there can never be custom firmware for android 15 on lgv40?

Not necessarily. The Lineage OS Rom developer (of let's say android 15) *could* make it work with an earlier base rom of say android 10.

I believe there's already an custom android 11 rom and it of course works with lg base rom of android 10. I can't say for sure how long LOS developers will put in the time to make roms that work with older LG versions. Most times they buy a new phone and move on.

But recently, it seems many are finding that new phones and new OS versions aren't different enough to justify the expense.

cheers
 

iannisb

Senior Member
Oct 13, 2017
69
2
When ever i '' flashboot boot TWRP-judypn-boot.img'' TWRP does not load. Instead it loads the OS (A10,30d)

When i '' flashboot boot judypn_TWRP_bootable-metadata.img'' the TWRP loads but there is no option in Advanced -> Install Recovery Ramdisk
 

AsItLies

Senior Member
Nov 4, 2009
1,713
635
tucson
Samsung Galaxy S10
When ever i '' flashboot boot TWRP-judypn-boot.img'' TWRP does not load. Instead it loads the OS (A10,30d)

When i '' flashboot boot judypn_TWRP_bootable-metadata.img'' the TWRP loads but there is no option in Advanced -> Install Recovery Ramdisk

Which 30d do u have? is that Korean open? Are other variants also 30d? I don't know. Can't help if don't know.
 

AsItLies

Senior Member
Nov 4, 2009
1,713
635
tucson
Samsung Galaxy S10
I am using the UK 30d for European 405ebw from lg firmwares.
I ve flashed using partition DL from lgup dev
unlocked officially

Well a couple of things, 1) with newer firmware, you can no longer 'fastboot boot twrp'. The way to create a boot loader with twrp in it, you have to do 'ramdisk inject'.

I explain that because, near as I can tell, no one has created your needed boot partition with twrp injected into it. It exists for many other versions, but 30d is very new.

2) The 'overview' of how u do it goes like this; Use qfil to flash to boot_a an older version of yoour type of firmware like this one for 30b, that way u can exit qfil and go directly to twrp. Once in twrp, you'll want to use advanced option and do a dd copy of the boot_b image over to the boot_a image (replacing the twrp u just put there). Then, u use the twrp file in the 'inject' option to ramdisk inject the twrp file into the original boot partition you just copied from b_slot.

it's confusing, maybe wait a bit and someone with more experience will get it done. Or u can send me your boot_a partition and I'll do it.

cheers
 

iannisb

Senior Member
Oct 13, 2017
69
2
Well a couple of things, 1) with newer firmware, you can no longer 'fastboot boot twrp'. The way to create a boot loader with twrp in it, you have to do 'ramdisk inject'.

I explain that because, near as I can tell, no one has created your needed boot partition with twrp injected into it. It exists for many other versions, but 30d is very new.

2) The 'overview' of how u do it goes like this; Use qfil to flash to boot_a an older version of yoour type of firmware like this one for 30b, that way u can exit qfil and go directly to twrp. Once in twrp, you'll want to use advanced option and do a dd copy of the boot_b image over to the boot_a image (replacing the twrp u just put there). Then, u use the twrp file in the 'inject' option to ramdisk inject the twrp file into the original boot partition you just copied from b_slot.

it's confusing, maybe wait a bit and someone with more experience will get it done. Or u can send me your boot_a partition and I'll do it.

cheers


I ve decompressed the dz from 30D and i found two boot partitions :
boot.img_65286 and boot.img_163830
How do i tell which is a and b?
 

Attachments

  • boot.img_163830.zip
    24 MB · Views: 74
  • boot.img_65286.zip
    24 MB · Views: 3

iannisb

Senior Member
Oct 13, 2017
69
2
Yes they appear to be identical.
Can you do it for me please? I dont have the experience that you obviously have...
 

AsItLies

Senior Member
Nov 4, 2009
1,713
635
tucson
Samsung Galaxy S10
Yes they appear to be identical.
Can you do it for me please? I dont have the experience that you obviously have...

give me a bit, I'll get to it. But first, you realize you'll have to use qfil to load this? Can't be done with fastboot. I mention that because you went to all the trouble to decompose a kdz to dz to images to get the boot_a. but wiht qfil you could have just read the partition data and saved it?

I'll do it nonetheless, but it has to be flashed with qfil, then follow the additional instructions.

here's a gdrive link to your ebw 30d with twrp ramdisk injected. Remember, use qfil to first back up existing boot_a (u already that that though), then flash this file. Once flashed, back out of qfil and hold vol minus and power button to exit edl mode on the device. Keep holding until lg logo, then quickly release only pwr and then reapply it. That brings to twrp. Sel cancel if it asks for pw, swipe to allow mods, format data, then reboot recovery. Once back in twrp flash magisk and dm-verity.

should be all set then. Cheers
 
Last edited:

iannisb

Senior Member
Oct 13, 2017
69
2
i understand. i had the kdz downloaded and extraction wasnt that difficult with windowsLGfirmwareextract tool.
Thanks you!
i am reading about qfil as we speak
 

iannisb

Senior Member
Oct 13, 2017
69
2
give me a bit, I'll get to it. But first, you realize you'll have to use qfil to load this? Can't be done with fastboot. I mention that because you went to all the trouble to decompose a kdz to dz to images to get the boot_a. but wiht qfil you could have just read the partition data and saved it?

I'll do it nonetheless, but it has to be flashed with qfil, then follow the additional instructions.

here's a gdrive link to your ebw 30d with twrp ramdisk injected. Remember, use qfil to first back up existing boot_a (u already that that though), then flash this file. Once flashed, back out of qfil and hold vol minus and power button to exit edl mode on the device. Keep holding until lg logo, then quickly release only pwr and then reapply it. That brings to twrp. Sel cancel if it asks for pw, swipe to allow mods, format data, then reboot recovery. Once back in twrp flash magisk and dm-verity.

should be all set then. Cheers

Do i have to format data and remove the dm-verity?
Ideally i would like to keep the encryption while i have root through magisk

is there a link for the dm-verity?
Thanks again!
 
Last edited:

AsItLies

Senior Member
Nov 4, 2009
1,713
635
tucson
Samsung Galaxy S10
Do i have to format data and remove the dm-verity?
Ideally i would like to keep the encryption while i have root through magisk

is there a link for the dm-verity?
Thanks again!
common question, the thing is that if you go that way, you can't back up data with twrp, obviously it will be encrypted and unable to do that. There could be more that I"m not aware of, problems doing it that way I mean. I've never myself so not sure.

this is link to dm-verity. I'd say use it and not worry about data not being encrypted, basically, if u loose the device, a hacker could delete finger print and screen lock and get into device even if encrypt. So... don't lose the device ;)
 

iannisb

Senior Member
Oct 13, 2017
69
2
common question, the thing is that if you go that way, you can't back up data with twrp, obviously it will be encrypted and unable to do that. There could be more that I"m not aware of, problems doing it that way I mean. I've never myself so not sure.

this is link to dm-verity. I'd say use it and not worry about data not being encrypted, basically, if u loose the device, a hacker could delete finger print and screen lock and get into device even if encrypt. So... don't lose the device ;)
 

martinmh24

New member
Mar 1, 2021
1
0
[QUOTE = "AsItLies, publicación: 84565331, miembro: 2129545"]
dame un poco, lo haré. Pero primero, ¿te das cuenta de que tendrás que usar qfil para cargar esto? No se puede hacer con fastboot. Menciono eso porque te tomaste la molestia de descomponer un kdz a dz en imágenes para obtener el archivo boot_a. pero, ¿con qfil podría haber leído los datos de la partición y guardarlos?

Lo haré de todos modos, pero debe actualizarse con qfil, luego seguir las instrucciones adicionales.

aquí hay un enlace de gdrive a su ebw 30d con twrp ramdisk inyectado. Recuerde, use qfil para hacer una copia de seguridad de boot_a existente (aunque ya está eso), luego actualice este archivo. Una vez que haya parpadeado, salga de qfil y mantenga presionado el botón de encendido y apagado para salir del modo edl en el dispositivo. Mantenga presionado hasta el logotipo de lg, luego suelte rápidamente solo pwr y luego vuelva a aplicarlo. Eso trae a twrp. Seleccione cancelar si solicita pw, deslice para permitir modificaciones, formatee los datos y luego reinicie la recuperación. Una vez de vuelta en twrp flash magisk y dm-verity.

debería estar todo listo entonces. Salud
[/CITA]
amigo, se ve que sabes del tema, pase twrp por fastboot a mi v40 pero no abre twrp, tengo la rom koreana android 10 30f, podrias ayudarme a arrancar twrp para rootear e instalar una custom rom?
 

iannisb

Senior Member
Oct 13, 2017
69
2
common question, the thing is that if you go that way, you can't back up data with twrp, obviously it will be encrypted and unable to do that. There could be more that I"m not aware of, problems doing it that way I mean. I've never myself so not sure.

this is link to dm-verity. I'd say use it and not worry about data not being encrypted, basically, if u loose the device, a hacker could delete finger print and screen lock and get into device even if encrypt. So... don't lose the device ;)

Ever since i rooted my v40 with magisk and your help i ve been wanting to get rid of this annoying message.
I read that i have to modify cust_path_mapping.cfg in root/oem/op but the privileges/rights can not be changed even though i am rooted.
Is there anything you can advise me to do?
Thank you!
 

Attachments

  • Screenshot_20210302-224526.png
    Screenshot_20210302-224526.png
    189.5 KB · Views: 39

AsItLies

Senior Member
Nov 4, 2009
1,713
635
tucson
Samsung Galaxy S10
Ever since i rooted my v40 with magisk and your help i ve been wanting to get rid of this annoying message.
I read that i have to modify cust_path_mapping.cfg in root/oem/op but the privileges/rights can not be changed even though i am rooted.
Is there anything you can advise me to do?
Thank you!

Yes, there are 2 things to consider; 1) to be able to edit that file (or any others) you need to disable vbmeta. It's a basic thing you have to do with fastboot, pretty easy really, follow this to download and read the txt file.

I've not had much luck doing it that way though, some have, so worth a try I guess. But the way that has always worked for me, is to (unfortunately you will be starting over to do this), remove all accounts / fingerprints, use LGUP to do part d/l again of the rom u want to use, then boot to start up (which is normal procedure for part d/l), then shut device off and go back to LGUP.

now, with same exact rom you just used, do a refurbish.

It seems what happens is that the s/n and imei and that nt code info gets propagated throughout the system (especially the ftm partition) during these procedures, and for it to work correctly (with cross flashing) it needs to do both part d/l and refurbish.

cheers
 

iannisb

Senior Member
Oct 13, 2017
69
2
Yes, there are 2 things to consider; 1) to be able to edit that file (or any others) you need to disable vbmeta. It's a basic thing you have to do with fastboot, pretty easy really, follow this to download and read the txt file.

I've not had much luck doing it that way though, some have, so worth a try I guess. But the way that has always worked for me, is to (unfortunately you will be starting over to do this), remove all accounts / fingerprints, use LGUP to do part d/l again of the rom u want to use, then boot to start up (which is normal procedure for part d/l), then shut device off and go back to LGUP.

now, with same exact rom you just used, do a refurbish.

It seems what happens is that the s/n and imei and that nt code info gets propagated throughout the system (especially the ftm partition) during these procedures, and for it to work correctly (with cross flashing) it needs to do both part d/l and refurbish.

cheers
I copied both vbmeta_a.img and vbmeta_b.img from dev/block
i run the command but i got this error
fastboot: unrecognised option `--disable-verity'
 

AsItLies

Senior Member
Nov 4, 2009
1,713
635
tucson
Samsung Galaxy S10
I copied both vbmeta_a.img and vbmeta_b.img from dev/block
i run the command but i got this error
fastboot: unrecognised option `--disable-verity'

okay so the command, I think I made clear in the notes, is all on one line. It's not separated out.

additionally, you can't use the 'nuked laf' version of fastboot (that's a crippled version), you have to use the v35_engineering_abl version to flash that.

without seeing exactly what yer doing, that's all I can think of to help.

cheers
 

Top Liked Posts

  • There are no posts matching your filters.
  • 22
    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://xdaforums.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
    Trying to upload the one I used here. Hopefully it will work for you.
    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