LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-17-2023, 05:50 PM   #1
andrew.comly
Member
 
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:
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?

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

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

I have never used it, however, this looks like a good place to start.
 
Old 03-01-2024, 11:09 AM   #3
Dinlay
LQ Newbie
 
Registered: Mar 2024
Posts: 1

Rep: Reputation: 0
Extract DZ file with windows

Maybe this link could help:

https://wirepicker.com/how-to-extrac...r-dz-firmware/
 
Old 03-01-2024, 11:38 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Dinlay View Post
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.
 
  


Reply

Tags
android



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile

All times are GMT -5. The time now is 05:43 AM.

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