yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] hshen:
Yes, I have twisted thecubed's code a bit. I don't have any experience on Python script before.

Here is the modification I did:

# G2 header info and structure

#kdz_header = "\x28\x05\x00\x00\x34\x31\x25\x80"

#kdz_sub_len = 264

#kdz_sub_dict = OrderedDict([

# ('name' , ('32s', True)),

# ('pad' , ('224s', True)),

# ('length' , ('I', False)),

# ('unknow1', ('I', False)),

# ('offset' , ('I', False)),

# ('unknow2', ('I', False))

# ])

# kdz header for F240

kdz_header = "\x18\x05\x00\x00\x32\x79\x44\x50"

#head end at 0x1FF

kdz_sub_len = 264

# Format string dict

# itemName is the new dict key for the data to be stored under

# formatString is the Python formatstring for struct.unpack()

# collapse is boolean that controls whether extra \x00 's should be stripped

# Example:

# ('itemName', ('formatString', collapse))

kdz_sub_dict = OrderedDict([

('name' , ('32s', True)),

('pad' , ('224s', True)),

('length' , ('I', False)),

('offset', ('I', False))

])
[Miscellaneous Android Development] juniecho:
thank you very very much!
[Miscellaneous Android Development] bullghost:
hi hshen? what compression are the G Pro use ?
[Miscellaneous Android Development] thinh182009:
howto cread files bin to TOT or All bin in files

Extracting dbi_165888.bin to dzextracted\dbi_165888.bin

Extracting aboot_229376.bin to dzextracted\aboot_229376.bin

Extracting rpm_231424.bin to dzextracted\rpm_231424.bin

Extracting boot_262144.bin to dzextracted\boot_262144.bin

Extracting tz_294912.bin to dzextracted\tz_294912.bin

Extracting persist_393216.bin to dzextracted\persist_393216.bin

Extracting recovery_458752.bin to dzextracted\recovery_458752.bi

Extracting laf_589824.bin to dzextracted\laf_589824.bin

...................................
[Miscellaneous Android Development] goldenfish:
i got thi error Unsupported KDZ file format. ?

LG E988 Optimus Gpro
[Miscellaneous Android Development] yyardimci:
the tool works very well. I extract F320L-00-21P.kdz .

I kown it is not the right thread but I have a little question . is it possible to flash just extracted revovery.bin?

I have problem with my stock recovery and I can not start in recovery on my F320L kitkat 4.4.2 stock rom

thank you

Solved I used lg flash tool flashed the v11c tot than install root and change the recovery to Cwm. And install vdt v11 right now everything is ok
[Miscellaneous Android Development] asialove2013:
Thanks

Hi, Thanks, I want to know how to display or get this "# G2 header info and structure

#kdz_header = "\x28\x05\x00\x00\x34\x31\x25\x80"" information from a kdz file,?
[Miscellaneous Android Development] vn_mobile:
No free tool for now :D
[Miscellaneous Android Development] thecubed:
I actually have been keeping track of all the differing headers, and might have found a pattern to them and a way to predict what they'll be, I just haven't had time to work on this tool any. However, with the G3 coming soon, expect a lot more LGE tools from me and the team.
[Miscellaneous Android Development] R0i_:
Thank you!!!
[Miscellaneous Android Development] gu5t3r:
131596288 system_1168408.bin
133169152 system_1429520.bin
131596288 system_1692696.bin
133169152 system_1953808.bin
131596288 system_2216984.bin
133169152 system_2478096.bin
131596288 system_2741272.bin
132120576 system_3002384.bin
131596288 system_3264528.bin
524288 system_3522560.bin
134742016 system_376832.bin
524288 system_3784704.bin
524288 system_4046848.bin
524288 system_4308992.bin
524288 system_640008.bin
131596288 system_644120.bin
133169152 system_905232.bin

I merged system.img (2206203904B) with SystemMerger.py but it's larger than my original system dump which is 2147483648B size...

The difference is 58720256B which is exactly 56MB.

As on the end of merged system.img are ony zeroes I truncated merged file to size of original system dump as that is the size of my system partition. Bigger than that won't fit...

Merged system.img is still readable after truncation...
[Miscellaneous Android Development] plageran:
KDZFileTools.py unsupported KDZ file fix

after screwing around with the file I found this:

Source:

http://xdaforums.com/showthread.php?t=2483250

C:\KDZUtils>python KDZFileTools.py -l -f D62010b_00.KDZ

[!] Error: Unsupported KDZ file format.

[ ] Expected: 0x28 0x5 0x0 0x0 0x34 0x31 0x25 0x80 ,

but received 0x28 0x5 0x0 0x0 0x24 0x38 0x22 0x25 .

open the file and change:

kdz_header = "\x28\x05\x00\x00\x34\x31\x25\x80"

to

0x28 0x5 0x0 0x0 0x24 0x38 0x22 0x25

kdz_header = "\x28\x05\x00\x00\x24\x38\x22\x25"

This works for me using the LG G2 mini D620 firmware:svetius:
[Miscellaneous Android Development] thinh182009:
hehe Free đê
[Miscellaneous Android Development] limdnas:
i get this error in win8 with python 2.7, and the D85510L_00.kdz

[IMG="error"]http://xdaforums.com/attachment.php?attachmentid=2968525&d=1413110924[/IMG]

how can i solve it?

thanks
[Miscellaneous Android Development] THE Ghost2:
Error

I am trying to open KDZ file from lg l50 phone(link to download http://lg-phone-firmware.com/index.php?id_mod=48

it is TCL/TELCEL(MEXICO) )

The error that occurs is in attachment. Any solutions?
[Miscellaneous Android Development] purpleraintoxicity:
Excuse me for the noob question..

If I want to make a flashable zip from it, on Linux, which will be the best way?
[Miscellaneous Android Development] 6ril1:
I used it for making my d80220h on ubuntu http://xdaforums.com/lg-g2/development-d802/rom-original-eur-80220h-kdz-to-recovery-t2941528

I used [MENTION=1157052]thecubed[/MENTION] py tool for extracting dz and kdz (watch in op) and [MENTION=4584140]cybojenix[/MENTION] system merger tool for merging system http://xdaforums.com/showpost.php?p=47762882&postcount=18

it was the good old days when a good cooperation offered us a great tool.

[MENTION=1157052]thecubed[/MENTION] you're really missed, thank's for all your share....
[Miscellaneous Android Development] purpleraintoxicity:
Awesome
[Miscellaneous Android Development] bhojo1:
Problem with system merge scripton windows

I was able to download the kdz file for my India LG G3 D855 and used the two python scruipts to extract. You must be on python 2.7 as 2.6 does not have argparse module. you need to chnage the KDZ header for the G# similar to that given above... the KDZ header for the g3 I found was

kdz_header = "\x28\x05\x00\x00\x24\x38\x22\x25"

the system merge script does not seem to work on windows. I checked the test script and the file created is one byte extra in length instead of 256000 it is 256001. I then needed to use bullghosts executable to merge the extracted system files and ould open that with ext2explore.

the build.prop of the system image show version LRX21R.A1417618145.

can I directly use the modem.bin as a modem.img ?

What about the boot.bin ?
[Miscellaneous Android Development] sabret00the:
Gonna play with this later. Cheers.
[Miscellaneous Android Development] ponnex:
I got this error what should I do?
[Miscellaneous Android Development] ADOLFOHERNANDEZ:
I'm getting this error, which is more like yours but with some derivations, anyhow, I'm being trying with all the rooms that I have found and shamely not one of them allows me to complete the procedure, any thougths?

C:\Users\ADOLFO\Downloads\Actualización LG-E615f\Compressed_KDZUtils>python KDZF

ileTools.py -f v10c_00.kdz -x

Traceback (most recent call last):

File "KDZFileTools.py", line 195, in <module>

kdztools.main()

File "KDZFileTools.py", line 182, in main

self.partList = self.getPartitions()

File "KDZFileTools.py", line 82, in getPartitions

kdz_sub = self.readKDZHeader()

File "KDZFileTools.py", line 64, in readKDZHeader

unpack(self.kdz_formatstring,buf)

struct.error: unpack requires a string argument of length 272
[Miscellaneous Android Development] slavomes:
Lg g2 802 v30d

With new D80230d_00.kdz file don't work:

C:\Python27>python KDZFileTools.py -f D80230D_00.kdz -x

[!] Error: Unsupported KDZ file format.

[ ] Expected: 0x28 0x5 0x0 0x0 0x34 0x31 0x25 0x80 ,

but received 0x28 0x5 0x0 0x0 0x24 0x38 0x22 0x25 .

C:\Python27>python KDZFileTools.py -f D80230d_00.kdz -x

[!] Error: Unsupported KDZ file format.

[ ] Expected: 0x28 0x5 0x0 0x0 0x34 0x31 0x25 0x80 ,

but received 0x28 0x5 0x0 0x0 0x24 0x38 0x22 0x25 .

No problem with KK versions. All LP versions - error.

What can i do to extract KDZ file with LP system?

Ok. I just found solution: after modifying script all works fine.
[Miscellaneous Android Development] AntonGut:
Would you mind sharing the solution you're talking about? That's exactly the error I'm getting, but I have no idea how to bypass it.

Thanks!

Edit: now I know why you striked it through. The answer is on the previous page. Sorry.
[Miscellaneous Android Development] radrj:
hey guys its asking for a password. also i actually have the flash tool, driver, and support tool but nothing happens when i flash. the little bubble saying that found new hardware keeps switching from mte android and lg android found. sorry its probably not mte exactly but something like that ill edit it asap
[Miscellaneous Android Development] rk2612:
Is this script to be run in Linux at # root prompt or at $ prompt of ordinary user?
[Miscellaneous Android Development] emdroidle:
Well I'd like to be able to play with these files, so this tool is kind of handy. Since "thecubed" has been missing for some time, I tried other means to get in contact and was advised it was okay to make my own version and distribute under GPL. As such one now exists.

NEWS: My version now handles both types of DZ header, and appears to work under Python 3.

NEWS: I have also replaced the "-s" command and there is a new "-i" command flag. "-s" extracts the DZ file as diskslices^Wpartitions, you'll end up with system.img and several other files. "-i" will extract everything as a disk image. The first two can also be fed numbers which will indicate which chunks/slices should be extracted. I've also added notes to _dz_chunk_dict describing what I think the fields in the chunk headers mean. "trimCount" is somewhat worrisome since wiping sectors of the "cust" slice is a hazardous way to erase a few files. I've also found SystemMerger.py was adding on a few too many zero sectors.

NEWS: After some major work, my tool appears to able to unpack and repack KDZ and DZ files. As such, it should now be possible to upload modified firmwares to LG devices now. The wiki area has some detail about what I believe the actual format to be like. I'm worried about the unknowns in the DZ header, but they look okay to copy unmodified.

NEWS: Did some updates to image2chunks.py. Previously it was taking advantage of sparse files and SEEK_DATA/SEEK_HOLE to identify areas to exclude from copying. Now there is support for using `ext2simg` (part of "android-tools-fsutils" for some Linux distributions) to identify the portions of ext4 filesystems needing to be preserved. I suspect the results from this may vary depending upon version of `ext2simg`. Since this strategy is very sensitive to the type of data it is turning into chunks, I'm uncomfortable leaving this as a default and "-e" or "--ext4" must be passed to use this strategy.

Also discovered there was the potential for overflow with the SEEK_DATA/SEEK_HOLE strategy if the underlying filesystem didn't have proper support. This caused an error from Python, so a fix is in place. I think --ext4 gives better results for this situation though.

Progress may be slow, but my major goal at this time are to implement repacking of the broken apart files.

How much is known about the KDZ and DZ file formats? Somehow I suspect LG doesn't really want the format to become known, but how much information has been gathered so far?

If it is a tool for any flavor of Unix, always assume it is okay to be run at a user shell unless explicitly specified it needs to be run in a root shell. If it is specified that it needs to be run at a root shell, there better be a good justification. This tool is merely working with files that are meant to be uploaded to phones, it can be run as a user just fine. If being run on Windows, this should be run as a non-privileged user. (should run just fine as root/admin, but it doesn't need it)
[Miscellaneous Android Development] jerdog:
I suggest you start a new thread for this
[Miscellaneous Android Development] jerdog:
[MENTION=1157052]thecubed[/MENTION] - I know this is rehashing something from 3 years ago, but do you happen to have moved anywhere to a place where creating a KDZ file is possible/doable?
[Miscellaneous Android Development] emdroidle:
Apparently thecubed/IOMonster is on GitHub. Alas, I discovered this well after I'd already started development on my own tree.

Several unknowns remain in the header of the embedded DZ file, but the most crucial fields have been identified. As such my version is capable of unpacking KDZ files, and then repacking modified KDZ files. This hasn't been tested yet, but I'm confident enough to announce reaching the goal to the world (now it is time for everything to explode in my face).

A fair bit of documentation of the format is on the GitHub wiki.
[Miscellaneous Android Development] 6ril1:
Hi, great, thank's !

My 2 cents, the good url for thethecubed GitHub seems to be https://github.com/thecubed/kdzutils (kdzutils instead of kdztool, as in the link you posted and that returns 404)).
[Miscellaneous Android Development] s_bairouty:
Hi,,

I flashed a wrong kdz stock firmware to LG G5 RS988 via LG Flash Tool,

and after finish the phone didn't turn on :(

it gives me a black screen, even no lights,,

any solution?

Thank you,,
[Miscellaneous Android Development] cancunia:
Is there a later version that will support the G5 kdz?

Thanks

Update:

I saw in another post that you can change the header format that the Python code expects, so I've done that and all is now working for the extraction. But, the Python code published here to merge the system files did not work for some reason. I finally managed to get the Windows version working by using W7, still no idea why it won't work on WinXP & still can't get to the /cust files.
[Miscellaneous Android Development] vikramanananda:
I was trying to extract LG G8 KDZ by using your method

I am getting stuck in python code.please find the attachment

Please could you guide me the extract LG G8 KDZ

Reason behind this extraction my lg g8 got stuck in qualcomm hs-usb qdloader 9008 mode please find the attachment
[Miscellaneous Android Development] steadfasterX:
you can try SALT which is ready-to-use included in FWUL / mAid (run linux from an USB stick) or try the kdztools which are used by SALT as the kdz-extract backend.

.-
[Miscellaneous Android Development] vikramanananda:
C:\Python27>python.exe undz.py -f kdzextracted/G820QM20b_00_NAO_US_OP_1224.dz -x

Traceback (most recent call last):

File "undz.py", line 26, in <module>

import zstandard as zstd

ImportError: No module named zstandard

New error

KDZ ok

but dz got some error

(i am trying for LG G8 KDZ)
[Miscellaneous Android Development] steadfasterX:
download FWUL nightly. flash on USB. start SALT

.-
[Miscellaneous Android Development] vkoniv:
sorry i need help

hello sorry for my ignorance in the sector, I installed python but I can't understand what command to give, or what should I write?
[Miscellaneous Android Development] Jackspsychosis:
unkdz.py worked great!

$ sudo python3 unkdz.py -f X210MA10c_00_MPCS_US_OP_1207.kdz -x -d/home/jacks/aristo

but when tried the same with undz.py

$ python3 unkdz.py -f X210MA10c_00_MPCS_US_OP_1207.kdz -x -d/home/jacks/aristo

i got ...

File "/home/jacks/Kdzextractor-linux/undz.py", line 96
print "[!] Bad DZ sub header!"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("[!] Bad DZ sub header!")?
[Miscellaneous Android Development] Oswald Boelcke:
Hello and good morning, @noordik56

Welcome to XDA! I hope you'll always get the support you require.

Edit or change of IMEI is illegal in quite a few of countries. For this reason, I've deleted your above post! XDA doesn't allow and doesn't accept discussions about or support for such an edit or change.

XDA Forum Rules (excerpt):

In future, please refrain from starting such a discussion or requests for support on XDA.

Thanks for your cooperation!

Regards

Oswald Boelcke

Senior Moderator
[Galaxy Note 10.1 Q&A, Help & Troubleshooting] justauser:
I am curious if anyone has tried installing the S Note 3 app from the Gnote 3 on our Note 10.1. Did it work?
[Galaxy Note 10.1 Q&A, Help & Troubleshooting] mapsurfer:
There was a thread saying SNote 3 apk would not install, with no further details but I suspect related to android version. I'd like to know why the current Note 10.1 wont run the same software and the 2014 model.
[Galaxy Note 10.1 Q&A, Help & Troubleshooting] smegg:
Different hardware I reckon.
[Galaxy Note 3 Q&A, Help & Troubleshooting] freebeerz:
Are all the Wanam Xposed settings supposed to work on the Note 3?

"circle battery" and "all rotation angles" work for me but these don't do anything:

- enable keyboard symbols

- remove camera sound

- 4 way reboot

If that makes any difference, I'm rooted with the "de la Vega" method (preserves knox)
[Galaxy Note 3 Q&A, Help & Troubleshooting] vinokirk:
I had similar problems and it turned out wanam wasn't ticked in xposed
[Galaxy Note 3 Q&A, Help & Troubleshooting] freebeerz:
Mine is ticked, and some settings of wanam actually work for me (circle battery for example)

I don't think everything in wanam works for the N3, did you turn on symbol keys and turn off camera sounds with it?
[Galaxy Note 3 Q&A, Help & Troubleshooting] vinokirk:
I have turned off camera shutter sound, and it's worked. One problem I had was the sound was still on the startup logo even though I disabled it. Then I found out Wanam wasn't ticked in xposed.
[Galaxy Note 3 Q&A, Help & Troubleshooting] freebeerz:
That's odd... Do you use a custom rom? I rooted with "de la vega" which doesn't trigger the knox flag, I wonder if that has something to do with it. I don't think these mods required a deodexed rom, do they?
[Galaxy Note 3 Q&A, Help & Troubleshooting] vinokirk:
I used the Vega method to. No custom ROM. 4 way boot works for me too
[Galaxy Note 3 Q&A, Help & Troubleshooting] freebeerz:
Actually 4 way reboot works for me too (I didn't realize the menu only comes up after pressing "restart")

So the only 2 things that don't work for me are No Camera Sounds and Symbols on Keyboard. I can actually mute the camera sound if I turn down the volume to 0 before starting the camera app, but that's not a great solution.
[Galaxy Note 3 Q&A, Help & Troubleshooting] freebeerz:
I still don't understand why it didn't work from Wanam (the logcat wasn't helpful) so in the end I manually modified /system/csc/others.xml to add the symbol and shutter sound option.

More info here if someone else has the same problem:

http://xdaforums.com/showthread.php?p=46496735

PS: I think the "Note 2 Hidden Settings" app would work too:

https://play.google.com/store/apps/details?id=com.steinapps.note2hiddensettings
[Galaxy Note 3 Q&A, Help & Troubleshooting] white-note:
4 way reboot works for me also, but... Wanam worked for 1 day, and thats it.

After the first day Wanam couldn't get root anymore, while other programs don't have any problem with root.

I gave permission once more, but couldn't get it to work.

Finally I deinstalled it.
[Galaxy Note 3 Q&A, Help & Troubleshooting] shizumie:
For me a lot of the things I have tried work on reboot, (camera no sound, no carrier label, 4 way, ect.). Only problem is they only work for a bit. They almost always revert back on next reboot?

Vzw note 3
[Verizon Samsung Galaxy S III] crackedvenom2:
First off, in on us cellular. But here goes nothing.

I'm not exactly sure what happened but after the massive battery drain I've been having, I decided to try a new Rom. I chose Carbon. So I'm installing it and it wouldn't let me install the 4.3 gapps package I had, so I used an older 4.2.

Normally at work, after about four hours, I'd be close to dead. Today it's at 60. While you may not think that's great battery life, to me, it is. I think most of my drain is the Crappy signal. Either way, my battery seems to be lasting longer. It's been on Wi-Fi, 4g, 3g, and no signal with a lot of screen time.

Was it Carbon? Or is the new gapps screwed up and the 4.2 ones work correctly? I know the new ones come with Location services which I've been reading is a massive drain. I don't know. All I know is that it's been four hours and my battery is nowhere near dead.

After posting that nry battery lasted 8 hours when on the other Rom with 4.3 gapps, I barely made it four.

Take it for what it's worth
[Verizon Samsung Galaxy S III] SlimSnoopOS:
This definitely belongs in Q/A. I'll get a mod to move it for you. I couldn't really say why but if 4.2 gapps worked for you with no perceivable drawbacks then cool. Were you trying 4.3 gapps with a new download or were you using just the same zip? Also, you didn't clarify what exactly was draining your battery in the first place. Have you tried using BetterBatteryStats or Wakelock Detector to pinpoint the issue? Lastly, what are "McCain services"? I did try an online search but understandably nothing but results for "John McCain" shows up.
[Verizon Samsung Galaxy S III] crackedvenom2:
IWell I used the zip I always used on the 4.3 roms. Maybe because carbon has a build number of 4.3.1 it didn't recognize it? I don't know. I was running pac man for clarification and there was a lot of wake Locks even with location serVices turned off. I should have made a screenshot I guess.

Though there was some for Google stuff, some rilj ones. It was basically phone crap and not actually apps like say Facebook, because we know apps like that drain it too. But no, the wake locks were under android stuff and there was hundreds. I think the rilj had 300+. I wish I could remember the rest but I can't. I've seen no drawbacks using 4.2 gapps on 4.3. Even on the carbon website, there wasn't any links. They just said to use 4.2. I don't know.

I figured I would post this. Maybe using 4.2 gapps I 4.3 is the solution. Maybe it's not. Maybe I got lucky. I can't give a definite answer. Just sharing what happened to me. And thanks for getting it moved

Also, day two, 3 hours into work and I'm at 70 percent. Like I said, some of you may not think that's great, but I use my phone a lot so 8 hours compared to 4 is great.
[Verizon Samsung Galaxy S III] SlimSnoopOS:
I hate when it happens like that. When its unspecific stuff and Google related, I'm not too sure what actually resolves the issue for me. But hey, maybe this will resolve someone else's issues in the future. Per your battery life, usually folks get about 4 hours screen on time, if those stats you posted are improvements for you then you're definitely doing something right.
[Verizon Samsung Galaxy S III] crackedvenom2:
Yeah, I know others say they can get up to 12 and 24, but I have never seen those Stats before but like I said, I'm on my phone a lot and when it starts running for 8 hours, I'm happy. I just couldn't take it dying on me after 3-4 hours. That's ridiculous. I have two batteries but even before the day was over I had to switch them both out. I'm happy. Maybe I'll have my girl reinstall her pac man and install 4.2 gapps then we could figure out if it's the gapps or pac man. All I know is my phone is running better this way and I wanted to throw it out there.
[G2 General] thecubed:
Howdy all!

Just as a heads up, I've posted my new Compressed KDZ extractor in XDA's Android Development section:

http://xdaforums.com/showthread.php?p=46458839#post46458839

This utility will allow you to extract the new format KDZ files that LG uses for some of the G2's and many other phones on the market.

Let me know if you run into any issues!
[AT&T Galaxy Note 3 Q&A, Help & Troubleshooting] Twistedchild420:
Just a heads up to you guys. I bought a Note 3 AT&T variant on Craigslist. Pulled my year old ST micro sim out of my Note 2 and popped it in my Note 3 and BAM! It worked right off batt! No unlocking necessary! AND it still gets 4G! Used the same old APN settings as well.......just thought I would share that with you guys that are curious about making the switch! :D