LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Mobile (https://www.linuxquestions.org/questions/linux-mobile-81/)
-   -   Can kdz phone firmware files be extracted on linux? (https://www.linuxquestions.org/questions/linux-mobile-81/can-kdz-phone-firmware-files-be-extracted-on-linux-4175723150/)

andrew.comly 03-17-2023 05:50 PM

Can kdz phone firmware files be extracted on linux?
 
I have a phone that gives message:
Code:

Your device is corrupt.
It cannot be trusted and will not boot.
Your device will power off automatically after a while.

and can't boot. And this is immediately after I have completed the factory reset as instructed at LG

When I try a basic online search, the only help forum that I can find for kdz file firmware flash states that this mysterious format "kdz" must be extracted, and they only give a way for windows users to extract it.

The only exception is kdzextractor:
Code:

$ git clone https://github.com/innfinite4evr/Kdzextractor
Cloning into 'Kdzextractor'...
remote: Enumerating objects: 405, done.
remote: Counting objects: 100% (405/405), done.
remote: Compressing objects: 100% (148/148), done.
remote: Total 405 (delta 249), reused 405 (delta 249), pack-reused 0
Receiving objects: 100% (405/405), 142.15 KiB | 4.74 MiB/s, done.
Resolving deltas: 100% (249/249), done.
a@a-MS-7D05:~$  ls
Desktop    Downloads  home                  Music    Public    usr
dim_value  etc        Kdzextractor          opt      Templates  Videos
Documents  ffmpeg    mapbox-studio-classic  Pictures  top.man

which when you run it gives nothing but error messages:
Code:

a@a-MS-7D05:~/Kdzextractor$ ./run.sh
-------KDZ EXTRACTOR LAZY SCRIPY BY @Innfinite4evr---------
######  Requires python
Enter your Kdz file name followed by [ENTER]
Example:H63110i_00
MS21011c_00_1205   
[!] Warning: Data between headers and payload! (offsets 826 to 83768)
[+] Extracting all partitions from v2 file!

[+] Extracting MS21011c_00.dz to kdzextracted/MS21011c_00.dz
[+] Extracting LGUP_c.dll to kdzextracted/LGUP_c.dll
[+] Extracting LGUP_c.dylib to kdzextracted/LGUP_c.dylib
[+] Extracting extra data to kdzextracted/kdz_extras.bin
Traceback (most recent call last):
  File "undz.py", line 212, in <module>
    dztools.main()
  File "undz.py", line 196, in main
    self.openFile(args.dzfile)
  File "undz.py", line 161, in openFile
    self.infile = open(dzfile, "rb")
IOError: [Errno 2] No such file or directory: 'MS21011c_00_1205.dz'
./run.sh: line 12: cd: dzextracted: No such file or directory
######  Merging system_***.bin
cp: cannot stat '../../mergersystem.py': No such file or directory
cp: cannot stat '../../mergerboot.py': No such file or directory
python: can't open file 'merger*system.py': [Errno 2] No such file or directory
[sudo] password for a:
mount: /mnt/lgimg: failed to setup loop device for system.img.
cp: cannot stat '/mnt/lgimg/*': No such file or directory
umount: /mnt/lgimg/: not mounted.
######  System.img extracted in system folder
######  Deleting unused system_**bin
######  Merging boot_***.bin
python: can't open file 'merger*boot.py': [Errno 2] No such file or directory
######  Deleting unused boot_**bin
mv: cannot stat 'boot.img': No such file or directory
######  boot_****bin merged into boot.img
######  Success!
-------KDZ EXTRACTOR LAZY SCRIPY BY @Innfinite4evr---------

When I run command under sudo I get the same result. Reading in the code above it promises " System.img extracted in system folder", but the system.img file exists nowhere.

My system:
Code:

$ uname -a
Linux a-MS-7D05 5.4.0-139-generic #156+10.0trisquel11 SMP Thu Feb 9 03:04:44 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Phone: LG Aristo 1 LGMS21034378a4f

Is this something that only windows can pull off?

camorri 03-18-2023 11:01 AM

Have a look here -->https://github.com/ehem/kdztools

I have never used it, however, this looks like a good place to start.

Dinlay 03-01-2024 11:09 AM

Extract DZ file with windows
 
Maybe this link could help:

https://wirepicker.com/how-to-extrac...r-dz-firmware/

TB0ne 03-01-2024 11:38 AM

Quote:

Originally Posted by Dinlay (Post 6486888)
Maybe this link could help:

<SPAM LINK REMOVED>

This thread had been closed for a year, and the questionable link posted advises to use the same Github tool already mentioned above. And those instructions are for Windows.


All times are GMT -5. The time now is 11:21 AM.