[Q] [QUESTION] How to create a KDZ file? - Android Q&A, Help & Troubleshooting

Good night!
This thread is a "2 questions", really.
I have a D685, know as LG G Pro Lite Dual. I want to try make a custom ROM, but, for now, this model don't have a recovery to flash ROMs, or CWM. It don't have bootloader (wich is locked) or fastboot mode. All it have is a stock recovery, which is nothing but and android opened (the keys do nothing), and a "download mode".
The only ways to flash a ROM into this phone is using LG Mobile Tools (the offline method) in download mode, or official LG Program. With the offline method, we flash a file with a KDZ extension.
I can extract it, it give me a CAB file. When extracted, I have 2 files: a DLL and a BIN file, instead a .DZ or .WDB file. I can't find a program/way/thread to extract the BIN file... anyway to do this?
The intention is get the system.img (or whatever) inside the BIN, cook it, and reflash it. Then, you ask: "How to reflash, if this device don't have a recovery?"
Well, this is my second question! If I can create the KDZ file, maybe I can "integrate" the system.img into the KDZ, and flash using the offline method!
By this way, maybe we can have a recovery and boot images, too... If the BIN file have them, maybe we can cook boot and recovery, too... maybe... All depends what is inside the BIN file, and of course, if we can create or recreate the KDZ and flash it.
Any tips for these questions?
Thanks!
EDIT: we have root, at least. Tried to get boot and recovery with MTK Droid Tools, but the phone don't boot. It gives a security error just after turns on..

Related

Can i use LGMDP (with LG-Utils & DZDecryptor) instead of kdz updater

I m afraid of using kdz updater as i bricked my phone once with it.
Now my question is can i use lgmdp instead of kdz updater.
Like i will use "LG-Utils-0.4.2" to extract dz file from stock kdz file,
and use "DZDecryptor" to extract all files from dz file.
Now using Lgmdp and selecting the folder of extracted files from dz file.
Then pressing download.
Will it do the trick, i mean will it erase custom recovery, install stock rom and bring my phone back to warranty.
please help..
is there anyone who can answer my query
Yes you can, its the same, in fact i think its better because you can choose to uncheck recovery and that way you can keep your custom recovery
And i think even there will not be any risk of corrupt kdz files bcoz corrupt kdz files will not be extracted

[Q] Flash Recovery On Dual Sim Chinese Phone

Problem:
My phone stopped working, due to a software issue (i'm 99% sure about this). I tried flashing it with a new rom, that almost bricked it (well, i can flash other roms to it, the led lights up, keypad lights up, etc).
I used SP Flash Tool (the only tool i know how to use), i load the scatter file and then click download, connect the phone, etc... the rom loads ok, just that i didn't had the proper rom.
I have recently found a RECOVERY ROM for this (don't know if ROM is the proper word for this, i've found the files that are used with SP Flash) - but it's missing the system.img, secro, cache and userdata .img files
I tried to load these files from other roms, all went ok, phone started but it hangs when it starts at the boot screen.
A few hrs ago i've found the proper software for my phone, but instead of the .img files i need, i have only the system folder that contains the build.prop file and the other folders, app, bin, etc, fonts...
How can use the SP Flash Tool to load this on to my phone? How can i convert this into the .img files i need?

[TWRP][RECOVERY] Asus ZenPad 8.0 Z380M (locked bootloader ok)

This is for real, folks. The first working custom recovery for Asus ZenPad 8.0 Z380M and a method to flash it under a locked bootloader. This took quite a bit of work to make, partly due to having to find a way to bypass the locked bootloader. And because of a kernel configuration issue that limited the size of the initial ramdisk, which took some serious effort to weed out. @lss1977 helped to port it to this device. And of course, credits to TeamWin for TWRP.
In addition to this thread, the current Z300M/Z301M TWRP thread and the the old Z300M recovery/rooting thread may be helpful. These models share the same hardware and software base, so most things that apply to one tablet also apply to the other.
DISCLAIMER
As usual, you do anything described in this post at your own risk. No one but you is responsible for any data loss, bricking or damage of your device.
REQUIREMENTS
Windows PC
SP Flash Tool version 5.1532 (only this version will bypass security checks)*
MediaTek VCOM drivers (available through Windows Update)
Z380M scatter file, attached
Recovery image, attached
Z380M preloader file (optional), available inside the stock firmware download
ZenPad Z380M tablet upgraded to Android N
* If you prefer to use a more recent SP Flash Tool, check out the special image file below.
This won't be a guide on how to use SP Flash Tool. There are plenty of good guides out there like this one on how to set up drivers, load scatter files, flash and make backups with SP Flash Tool. If you're not familiar with this software or how to flash MediaTek devices in general, please do your research before attempting this. I will just get straight to the specifics about the ZenPad 8.
FIRST TIME INSTALLATION
For a locked bootloader:
At this point you should have your tablet powered off, the drivers installed, all of your data backed up, and SP Flash Tool v5.1532's Download tab open and loaded with the tablet's scatter file. Open the download agent file DA_PL.bin, replacing the default MTK_AllInOne_DA.bin. (You can use the AllInOne DA if you want, but the procedure involves extra steps as described below.) Load the extracted TWRP recovery image (twrp-3.2.1-0-z380m.img) under the recovery partition line in the partition table. Click the Download button inside SPFT. Now just connect the USB cable to your tablet and your computer's USB port. It should start the download process automatically and disconnect when finished.
Alternative Method:
If you're using MTK_AllInOne_DA.bin, you have to hold the Volume Up key as you insert the cable, which puts the device into an emergency download mode. In addition, you will need to have the stock preloader*.bin file loaded inside SPFT for it to be able to communicate with your tablet. The preloader is available inside the official zip file download. Do not flash the preloader (untick the box) or any partitions other than recovery. You just need to have a valid bin file selected under the Preloader line.
For an unlocked bootloader:
If you have used the Asus unlock tool to unlock your device, you will still not be able to use fastboot flash to install a custom recovery. However, you can do a "hot boot" or a tethered boot of TWRP. This method doesn't require SP Flash Tool. Download the TWRP image, put your tablet in fastboot mode and connect to PC. Then run this command to boot TWRP dynamically:
fastboot boot twrp-3.2.1-0-z380m.img
Once inside TWRP, flash twrp-3.2.1-0-z380m.img to Recovery using Install -> Install Image. Then reboot to recovery. You may be able to use TWRP in the tethered boot mode, but that could result in glitches due to different parameters passed by the bootloader to the kernel. That's why flashing is recommended.
To update from your installed TWRP version to a new one, just transfer the image to your tablet, then boot to TWRP and install it by going to Install -> Install Image and flashing to Recovery.
START RECOVERY
With the tablet powered off, hold the Volume Up and Power keys together until you get to a menu where you can select "recovery". Use Vol. Up to scroll and Vol. Dn to select. If you have a locked bootloader, it will show a Yellow State message because the recovery is not signed by the OEM. Just press volume up to boot it. On the welcome screen of TWRP it will ask you about modifying the system partition, I suggest you go with Keep System Read-only. Doing otherwise will complicate your OTA updates.
WARNING: Never start the stock recovery from the bootloader menu on this device. It is programmed by the bootloader to instantly wipe your data without any warning. Also, be aware that Android installs the stock recovery at every normal boot cycle. So you either have to flash the TWRP every time you want to run it, or disable the automatic recovery installation in the stock firmware. Any kind of mod to the boot image will prevent the automatic recovery installation. If you're not sure which recovery you have installed, you can always do a 'adb reboot recovery' from Android without risk of data loss.
What works: Basically everything... access to major partitions, decrypted userdata partition, decrypted adoptable storage, external SD card, ADB, USB-OTG, touch interface, splash screen, installing stock Asus OTA/web FW updates
What doesn't work: (no known problems yet, but please report any)
Not guaranteed to work: factory reset
DOWNLOAD
(Updated February 3, 2018: updated kernel to firmware 5.3.18; up-to-date TWRP 3.2.1 sources)
SP Flash Tool v5.1532
Z380M Scatter file for all storage sizes (right click, Save link as...)
Recovery image
Signed image for Flash Tool only -- may be flashed with recent SP Flash Tool versions -- DO NOT INSTALL USING ANY OTHER METHOD -- tested with SPFT 5.1736.
Development and experimental files
Source code
P.S. The thanks button doesn't bite.
Nice one now lets get some custom roms done.
Has anyone installed this yet? I see the file has been downloaded a few times. Any feedback is welcome.
If you want the recovery to stick after reboot either rename or remove system/bin/install_recovery.sh.
lss1977 said:
If you want the recovery to stick after reboot either rename or remove system/bin/install_recovery.sh.
Click to expand...
Click to collapse
The way I did it was to edit the init.rc file inside the boot ramdisk and comment out the service block that calls install_recovery.sh. I used the MTK boot image unpack/repack tools. I don't know, it seems like changing anything on the system partition will break OTA updates because of dm-verity. Because that depends on verifying each block of the file system. I have never even mounted the system as R/W in recovery.
how to create scater file from text posted? I copied all text to MT8163_Android_scatter.txt file but when open with splash tools give error "scatter file is invalid"
please atach your working scatter file to other atachments
PxYra said:
how to create scater file from text posted? I copied all text to MT8163_Android_scatter.txt file but when open with splash tools give error "scatter file is invalid"
please atach your working scatter file to other atachments
Click to expand...
Click to collapse
OK, I added the scatter file as a download. It was a pain in the ass to copy & paste. (But it did work.)
Problem fixed downloaded new version of flashtool 5.16 and scatter working
Ok I installed TWRP on Z380M P00A, and wanna say to other
1. Use VCOM drivers only from splash tool official site
2. To install VCOM drivers first need enter chinese recovery tablet, then in windows device manager you see USB device, install manualy drivers (don forget in windows disable driver signature)
3. Use only SP-Flash-Tool-v5.1532.00, newer or older version not properly working with this phone
Ok, thanks for the update, PxYra. Just to let you know, there are signed versions of VCOM drivers floating around so you don't need to mess with signature enforcement. Here's one: https://www.androidfilehost.com/?fid=24591000424943663. They are also updated by Windows so you can just let Windows Update install them.
Thanks for your work.
Flashing procedure works only with "MTK_AllInOne_DA.bin" method for me. But this is OK!
(Updated May 6, 2017: added kernel from firmware 5.3.7, source code cleanup)
Click to expand...
Click to collapse
is it possible to get the older versions? I need Android 6.x, because of xposed-Framework for my Zenpad 8.0 Z380M.
Greets Freisei
Hey freisei...
I never posted a version for Android 6. There was just one based on the 5.3.6 kernel, practically the same as the current one. That's why I didn't keep it. I could try to build one for you if you want, but I can't test it of course. Does this recovery not boot at all on the old firmware?
It's strange that the DA_PL.bin method didn't work for you. What happened when you tried it? I suppose the old preloader doesn't allow it(?).
hello guys, you think lineage os official version for asus z380kl (p024) will work on our z380m ?
---------- Post added at 08:19 PM ---------- Previous post was at 08:05 PM ----------
Can anyone help me? after selecting recovery img, pressing download and inserting usb cable, nothing happens. Thanks in advance
lss1977 said:
If you want the recovery to stick after reboot either rename or remove system/bin/install_recovery.sh.
Click to expand...
Click to collapse
hello friend, can you please upload that file? I deleted it, but now I need it to revert to official recovery, as my zenpad is bricked! It would be of great help! thanks!
Pires_7 said:
hello friend, can you please upload that file? I deleted it, but now I need it to revert to official recovery, as my zenpad is bricked! It would be of great help! thanks!
Click to expand...
Click to collapse
Your ZenPad didn't brick because you deleted install_recovery.sh. It's because you modified the system partition. Making any mods to system is bad advice unless you know exactly what you're doing. Even mounting it in r/w mode can break it. That's because dm-verity has tripped and is blocking access to changed blocks of the file system. So you have 3 options: mod your boot image fstab file to disable dm-verity, restore the original system image block-for-block (either from backup or official firmware converted to an img file), or wipe userdata (lss reported that to work).
Pires_7 said:
hello guys, you think lineage os official version for asus z380kl (p024) will work on our z380m ?
Click to expand...
Click to collapse
Nope, no chance.
diplomatic said:
Your ZenPad didn't brick because you deleted install_recovery.sh. It's because you modified the system partition. Making any mods to system is bad advice unless you know exactly what you're doing. Even mounting it in r/w mode can break it. That's because dm-verity has tripped and is blocking access to changed blocks of the file system. So you have 3 options: mod your boot image fstab file to disable dm-verity, restore the original system image block-for-block (either from backup or official firmware converted to an img file), or wipe userdata (lss reported that to work).
Nope, no chance.
Click to expand...
Click to collapse
Ok. I made some real s*it, I think I deleted every partition except recovery. Can you provide me a twrp backup or some way around my problem?
What do you mean you deleted every partition except recovery? There's like 28 partitions. You would have to work hard to accomplish that.
My first suggestion is to extract a system.img from the Asus stock firmware zip using this. Then flash it with SP Flash Tool. You might also try to install a full firmware zip from TWRP. Although I have no idea if that will work or if it's even safe to try.
diplomatic said:
What do you mean you deleted every partition except recovery? There's like 28 partitions. You would have to work hard to accomplish that.
My first suggestion is to extract a system.img from the Asus stock firmware zip using this. Then flash it with SP Flash Tool. You might also try to install a full firmware zip from TWRP. Although I have no idea if that will work or if it's even safe to try.
Click to expand...
Click to collapse
i was able to extract system.new.dat from stock firmware zip, but it extracts to a system folder. How do I flash this through sp flash tool?
OK, the system folder you don't need. It should have produced a system.img file also. That's the file you need to flash. Just select it for the system partition row in the partition list and then Download. Hopefully that will be enough.
EDIT: I just looked at the script, and realized the system.img.img file gets deleted in the process. So what you need to do is start the extraction, then after it makes system.img.img, when it starts extracting individual files, hit Ctrl+C. Then you'll end up with the img file.
Thank you very much! it works! YOU are the BEST!
please tell me, in your scatter file, address partition_name: frp (0x80a5000) is correct? if i format this partition (frp), google account remove?

Need help recovering from soft brick

Hi everyone,
I have an 10.8 inch wifi only tablet imported from China, non-pro, model CMR-W09C00 which was running firmware B123.
I was playing around trying to convert it to a global firmware and tried to flash it with the same firmware 123 but for CMR-W09C432 using Huawei Firmware Finder.
Turns out this was a pretty bad idea
Now the tablet is not booting and I can't figure out how to recover. Here's what I tried:
1. eRecovery is not working, it downloads the firmware completely and tries to install but fails. It did work fully once before I tried to flash the wrong firmware.
2. Wiping cache and data partition does nothing
3. I have access to fastboot and can unlock/lock the bootloader at will.
4. I have the full-OTA zip file for the original firmware CMR-W09C00B123 and have extracted all the img files contained in update.app
5. I'm trying / hoping to flash images to recover (with bootloader unlocked) but I'm a bit confused at this step.
All the instructions I found in my research mention mostly flashing just boot.img, system.img and recovery.img but I'm missing some of those files from the update.app or I guess they could be named differently. I don't have a boot.img, just a fastboot.img which I'm sure is not the same. I also don't have a recovery.img, just recovery_ramdis, recovery_vbmeta, recovery_vendor, erecovery_ramdis, erecovery_vendo, erecovery_vbmet and erecovery_kerne.
I was able to flash system.img successfully but that didn't help.
Also tried to use the unbrick feature from Huawei Multi-Tool but here again I seem to be missing image files. Multi-Tool says it needs system.img, ramdisk.img, cust.img, ramdisk_recovery.img and userdata.img.
Of those, I think I'm missing cust.img for sure, ramdisk_recovery I might have but it's named differently (recovery_ramdis) and userdata.img I don't think I really need.
I'm attaching a txt file with a list of all the img files I do have in case it can be useful or rings a bell for someone.
Oh yeah, I also tried flashboot update update.zip but it's only giving me this warning:
archive does not contain 'android-info.txt'
error: update package 'update.zip' has no android-info.txt
So...does anyone have any advice or suggestions? Is there a better method to recover that I missed?
Any help is appreciated!
Flash the ramdisk.img to ramdisk and report back please. I have an M3 that is in the same condition as yours, but I am on an extended deployment and won't be able to test this for at least another month :/
fargonaz said:
Flash the ramdisk.img to ramdisk and report back please. I have an M3 that is in the same condition as yours, but I am on an extended deployment and won't be able to test this for at least another month :/
Click to expand...
Click to collapse
Thanks for taking the time to the reply mate, sorry to hear about your M3.
I tried fastboot flash ramdisk ramdisk.img and it said flashed successfully but the device is still not booting. Nothing else seems to have changed either.
Let me know if I misunderstood what you wanted to try or if you have any other ideas.
Cheers
etheberge said:
Hi everyone,
I have an 10.8 inch wifi only tablet imported from China, non-pro, model CMR-W09C00 which was running firmware B123.
I was playing around trying to convert it to a global firmware and tried to flash it with the same firmware 123 but for CMR-W09C432 using Huawei Firmware Finder.
Turns out this was a pretty bad idea
Now the tablet is not booting and I can't figure out how to recover. Here's what I tried:
1. eRecovery is not working, it downloads the firmware completely and tries to install but fails. It did work fully once before I tried to flash the wrong firmware.
2. Wiping cache and data partition does nothing
3. I have access to fastboot and can unlock/lock the bootloader at will.
4. I have the full-OTA zip file for the original firmware CMR-W09C00B123 and have extracted all the img files contained in update.app
5. I'm trying / hoping to flash images to recover (with bootloader unlocked) but I'm a bit confused at this step.
All the instructions I found in my research mention mostly flashing just boot.img, system.img and recovery.img but I'm missing some of those files from the update.app or I guess they could be named differently. I don't have a boot.img, just a fastboot.img which I'm sure is not the same. I also don't have a recovery.img, just recovery_ramdis, recovery_vbmeta, recovery_vendor, erecovery_ramdis, erecovery_vendo, erecovery_vbmet and erecovery_kerne.
I was able to flash system.img successfully but that didn't help.
Also tried to use the unbrick feature from Huawei Multi-Tool but here again I seem to be missing image files. Multi-Tool says it needs system.img, ramdisk.img, cust.img, ramdisk_recovery.img and userdata.img.
Of those, I think I'm missing cust.img for sure, ramdisk_recovery I might have but it's named differently (recovery_ramdis) and userdata.img I don't think I really need.
I'm attaching a txt file with a list of all the img files I do have in case it can be useful or rings a bell for someone.
Oh yeah, I also tried flashboot update update.zip but it's only giving me this warning:
archive does not contain 'android-info.txt'
error: update package 'update.zip' has no android-info.txt
So...does anyone have any advice or suggestions? Is there a better method to recover that I missed?
Any help is appreciated!
Click to expand...
Click to collapse
I think I am in a similar spot. I went from a custom ROM back to stock, but now all attempts at installing full OTAs fail. Did you ever figure this out how to fix it?
Thanks

Comvert Qualcomm mbn files to image?

Hi,
Is there a way to convert a bunch of mbn files to img files? I need to take a stock rom (VF-895) which is designed to use SUGAR QCT_SP Tool to files I can load with TWRP.
I can't get the phone to stay recognised to run QCT_SP. It won't stay in EDL (emergency download) mode and it is tricky enough to time it so QCT_SP will even load. Then when I try to do anything, like flashing, it just says not connected. Phone will happily boot to twrp and stay there all day, hence my looking at converting the mbn files to img to load via twrp.
Or can anyone suggest another way?

Categories

Resources