[Android Q&A, Help & Troubleshooting] greerdd:
Hi,

Was playing with ROMs and got my phone system destroyed in the process. Can still put the phone into the download and recovery modes. In the recovery mode twrp is working fine and I can still flash files in the download with fastboot. So I have a stock KDZ file and am looking to restore the phone into a working condition.

Since I'm on Linux, flashing KDZ files with standard LG tools is a problem as they don't work on Linux. So my plan was to flash relevant parts of the KDZ file on Linux using the following approach:

1. Extract KDZ file. See [*] below.

2. Combine all system_*******.bin fragments into a single system.bin file

3. fastboot flash system /path/to/system.bin

4. No point flashing recovery and boot since the phone still boots into recovery and twrp is working fine, right?

5. ...?​

Any problems with the above plan? Suggestions? Thanks

[*]

luser@lsrv:~/extracted$ ls -l
total 6335492
-rw-r--r-- 1 luser luser 1048576 Jul 19 19:16 aboot_300032.bin
-rw-r--r-- 1 luser luser 1048576 Jul 19 19:16 abootbak_304128.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 apdp_1064960.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:17 BackupGPT_30784512.bin
-rw-r--r-- 1 luser luser 15728640 Jul 19 19:16 boot_442368.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 cmnlib_1084416.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 cmnlib64_1086464.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 cmnlib64bak_1087488.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 cmnlibbak_1085440.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 devcfg_1068032.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 devcfgbak_1069056.bin
-rw-r--r-- 1 luser luser 16777216 Jul 19 19:16 dsp_212992.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 factory_704512.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 keymaster_1088512.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 keymasterbak_1089536.bin
-rw-r--r-- 1 luser luser 18874368 Jul 19 19:16 laf_507904.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 lksecapp_1082368.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 lksecappbak_1083392.bin
-rw-r--r-- 1 luser luser 88080384 Jul 19 19:16 modem_16384.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 msadp_1065984.bin
-rw-r--r-- 1 luser luser 5242880 Jul 19 19:16 persist_786432.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 PrimaryGPT_0.bin
-rw-r--r-- 1 luser luser 1572864 Jul 19 19:16 raw_resources_770048.bin
-rw-r--r-- 1 luser luser 1572864 Jul 19 19:16 raw_resourcesbak_778240.bin
-rw-r--r-- 1 luser luser 17825792 Jul 19 19:16 recovery_573440.bin
-rw-r--r-- 1 luser luser 17825792 Jul 19 19:16 recoverybak_638976.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 rpm_202752.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 rpmbak_203776.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 sbl1_198656.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 sbl1bak_200704.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 sec_299008.bin
-rw-r--r-- 1 luser luser 134217728 Jul 19 19:16 system_1130496.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 system_1392640.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:16 system_1394312.bin
-rw-r--r-- 1 luser luser 131596288 Jul 19 19:16 system_1398416.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_1658888.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:17 system_1918600.bin
-rw-r--r-- 1 luser luser 131596288 Jul 19 19:17 system_1922704.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_2183176.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:17 system_2442888.bin
-rw-r--r-- 1 luser luser 131596288 Jul 19 19:17 system_2446992.bin
-rw-r--r-- 1 luser luser 5767168 Jul 19 19:17 system_2707464.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:17 system_2965504.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:17 system_2967176.bin
-rw-r--r-- 1 luser luser 131596288 Jul 19 19:17 system_2971280.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_3231752.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:17 system_3491464.bin
-rw-r--r-- 1 luser luser 131596288 Jul 19 19:17 system_3495568.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_3756040.bin
-rw-r--r-- 1 luser luser 1048576 Jul 19 19:17 system_4018184.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:17 system_4276224.bin
-rw-r--r-- 1 luser luser 39845888 Jul 19 19:17 system_4280328.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:17 system_4538368.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_4542472.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_4804616.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_5066760.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_5328904.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_5591048.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_5853192.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_6115336.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_6377480.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_6639624.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_6901768.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_7163912.bin
-rw-r--r-- 1 luser luser 132644864 Jul 19 19:17 system_7426056.bin
-rw-r--r-- 1 luser luser 524288 Jul 19 19:17 system_7685768.bin
-rw-r--r-- 1 luser luser 177733632 Jul 19 19:17 system_7689216.bin
-rw-r--r-- 1 luser luser 3144155136 Jul 19 20:13 system.img
-rw-r--r-- 1 luser luser 1572864 Jul 19 19:16 tz_204800.bin
-rw-r--r-- 1 luser luser 1572864 Jul 19 19:16 tzbak_208896.bin