Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Mobile
User Name
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Sailfish OS, Replicant, Ubuntu Touch, webOS, and other similar projects and products.


  Search this Thread
Old 03-17-2023, 05:50 PM   #1
Registered: Dec 2012
Distribution: Trisquel-Mini 7.0, Lubuntu 14.04, Debian lxde 8.0
Posts: 311
Blog Entries: 2

Rep: Reputation: 16
Question Can kdz phone firmware files be extracted on linux?

I have a phone that gives message:
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:
$ git clone
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
which when you run it gives nothing but error messages:
a@a-MS-7D05:~/Kdzextractor$ ./
-------KDZ EXTRACTOR LAZY SCRIPY BY @Innfinite4evr---------
######   Requires python 
Enter your Kdz file name followed by [ENTER]
[!] Warning: Data between headers and payload! (offsets 826 to 83768)
[+] Extracting all partitions from v2 file!

[+] Extracting to kdzextracted/
[+] 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 "", line 212, in <module>
  File "", line 196, in main
  File "", line 161, in openFile
    self.infile = open(dzfile, "rb")
IOError: [Errno 2] No such file or directory: ''
./ line 12: cd: dzextracted: No such file or directory
######   Merging system_***.bin
cp: cannot stat '../../': No such file or directory
cp: cannot stat '../../': No such file or directory
python: can't open file 'merger*': [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*': [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:
$ 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?

Last edited by andrew.comly; 03-17-2023 at 08:30 PM.
Old 03-18-2023, 11:01 AM   #2
LQ 5k Club
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.2, 15.0, current, slackware-arm-currnet
Posts: 6,041

Rep: Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799
Have a look here -->

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



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Tomcat: How can change root context and extracted files? Felipe Linux - Software 1 02-19-2012 05:14 PM > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 03:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration