KDZ to TWRP flashable ZIP? - LG V20 Questions & Answers

I more or less understand what a KDZ is, and how to flash it with LGUP. I also sorta understand that a TWRP flashable .zip file is basically just an archive of a bunch of .img files that TWRP (magically) knows where to flash to on the device. So I can get a KDZ for the stock ROM from LG, or I can get a .zip of a custom ROM such as LineageOS. However I've also seen .zips of stock ROMs such as in this thread by dudeawsome.
What I want to know is, is there a way to convert an official KDZ to a .zip file that TWRP can flash? I'm assuming that is what's done to make a stock ROM available in a convenient .zip format for use in TWRP, but I'd like to know the details of the process. The closest I've found is something called KDZZ by weakNPCdotCom, but it appears that it no longer works and is discontinued.
I want to be able to take any official KDZ and convert it to a TWRP-friendly zip. I also want to remove the laf and recovery images as well since I don't want TWRP overwritten. Can anyone give me the lowdown on this?

Related

How to return to stock without usb?

I'm trying to return to stock without usb, but the links from this post don't work http://forum.xda-developers.com/showpost.php?p=34749844&postcount=2
I need a flashable .zip of the stock rom & recovery so that I can turn my phone in for RMA
studjuice said:
I need a flashable .zip of the stock rom & recovery so that I can turn my phone in for RMA
Click to expand...
Click to collapse
Right now there is no flashable image of the stock OS. Google pulled it from their site. But if you can't use USB, you can still use a computer to unzip the image into partitions, then use terminal and `flash_image` to flash each partition. (When I tried using flash_image, it didn't work, so be cautious. If you're rooted you can also use `dd` to flash images, but a typo could brick your phone so don't.)
I bet the easiest thing for you to do is to create individual flashable images for each partition, then boot into CWM and flash each (recovery last, obviously). But I don't know how. In any case, you'll need to wait until Google puts a new mako image on their site: https://developers.google.com/android/nexus/images
---------- Post added at 07:30 AM ---------- Previous post was at 06:56 AM ----------
Actually, depending on how desperate you are, I (or anybody else) could help you. I have a stock recovery installed right now (JOP40D) and I could pull the image with "dd". That won't be a flashable .zip, but you should be able to flash it from within the ROM. I could also get you a copy of my /system partition--there's nothing personal or private in there
If you have a .img, you could pack it into a flashable .zip and download it via dropbox.
Unless you have no access at all to a computer. In that case, you'll just need to wait for Google to release the next version of the image.
fenstre said:
Right now there is no flashable image of the stock OS. Google pulled it from their site. But if you can't use USB, you can still use a computer to unzip the image into partitions, then use terminal and `flash_image` to flash each partition. (When I tried using flash_image, it didn't work, so be cautious. If you're rooted you can also use `dd` to flash images, but a typo could brick your phone so don't.)
I bet the easiest thing for you to do is to create individual flashable images for each partition, then boot into CWM and flash each (recovery last, obviously). But I don't know how. In any case, you'll need to wait until Google puts a new mako image on their site: https://developers.google.com/android/nexus/images
---------- Post added at 07:30 AM ---------- Previous post was at 06:56 AM ----------
Actually, depending on how desperate you are, I (or anybody else) could help you. I have a stock recovery installed right now (JOP40D) and I could pull the image with "dd". That won't be a flashable .zip, but you should be able to flash it from within the ROM. I could also get you a copy of my /system partition--there's nothing personal or private in there
If you have a .img, you could pack it into a flashable .zip and download it via dropbox.
Unless you have no access at all to a computer. In that case, you'll just need to wait for Google to release the next version of the image.
Click to expand...
Click to collapse
I would love some help on packing into a flashable .zip. I found the images here, http://www.randomphantasmagoria.com/firmware/nexus-4/occam/ but I can't do anything with them without fastboot.
I found one guide for creating the flashable zip here: http://forum.xda-developers.com/showthread.php?t=1721680
And a better one here: http://forum.xda-developers.com/showthread.php?t=1949367
In principle, I think you could use your phone to do these, but it would be hard. The hardest step would be extracting individual files from .img files, and I don't know whether you can do that with your phone--it depends on the kernel and the "mount" utility--you would need to mount the .img files as a filesystem and extract from them. Obviously you should avoid flashing /data to ensure that you can keep /sdcard and your CWM backup. And flashing stock recovery should be your last step. In fact, don't flash your stock recovery. Flash the Nexus image version C, then reboot and let the image automatically reflash the recovery. This is safest. But if this step messes up, you will absolutely need to use a computer to fix it.
Actually, there's a far easier way. Somebody could create a CWM backup for you--a backup of version JOP40C. You download it to /data/media/clockworkmod/backups, then use CWM to recover it (use advanced options to recovery ONLY the /system partition (maybe others?), then clear the cache and dalvik cache). Then you OTA upgrade to JOP40D. This will involve downloading a flashable .zip (here). The key is that this will remove root and CWM when you next reboot! If it doesn't remove root, I think you can probably do that yourself.
The thing you can't do without a computer: lock your bootloader. Is using somebody else's computer really out of the question? I think "adb" and "fastboot" work without the rest of the Android SDK, so you could just download them and get to a computer just for the very final step of re-locking the bootloader.
I documented the process I went through to get it back to stock here for future reference:
http://forum.xda-developers.com/showpost.php?p=37064957&postcount=10
You can lock your bootloader without a computer using the BootUnlocker app

[Q] Read the Sticky, still can't flash stock or lollipop kernels

I wonder whether there is help for someone who thought he knew how to flash a kernel but apparently is deluded. I have the original nexus seven Wi-Fi tablet android version 4.3 build number JWR66V. The system still wants to update me to 4.3 because I ripped some files out of the cache directory to prevent OTA updates. I have both fastboot and adb. I have read the stickies about flashing.
The phone is rooted and the bootloader is unlocked. I use TWRP custom recovery, and it's a good thing, because I solidly bricked myself up just trying to get my lollipop. I know there are tools to root a nexus seven even with stock lollipop, so I thought I'd upgrade my phone to stock lollipop and then use one of those methods. I tried both the stock lollipop kernel and the one provided by chain fire, which I understand is rooted already. (I'm assuming upgrading to lollipop will lose me my root, unless I want to recover back to 4.3.)
I tried to do these things a couple of different ways. When I tried fast boot, I got the message "error: neither -p product specified nor ANDROID_PRODUCT_OUT set". There was a YouTube video suggesting how to deal with this error message. I'm pretty sure I followed the instructions but no go. (I was using the "flash all" command.) This was after I had put the file containing lollipop in the directory, both zipped and unzipped (so that I had an .img file instead of a zip file). I tried using both the zip file with all of the lollipop partitions and the system image file individually. No go. I also had a message that android-info.txt could not be found, even though it was in the same, working directory.
I could be wrong but I don't think you can install a complete updated kernel from a file on the device. I think that works only with update.zip.
I'm still thinking fastboot is my best bet, but there are dependencies apparently and I don't know what files to include in its directory. Then, am I wise to go to stock and then root, or should I simply flash the stock kernel already rooted? I assume that's what chainfire is providing, correct?
I notice the lollipop official ROM nor Chainfire’s supposedly-rooted image have any file named nakasi. I have only .img files, no .zip files.
I found a dozen sets of instructions on how to flash a kernel but something I need is missing from all of them. Does anyone know what it is or can anyone offer some helpful advice?
Thank you,
Leon M.

Guide to flashing MIUI-based roms through TWRP without hardbrick

THIS GUIDE IS FOR ALL MIUI BASED ROMS WHETHER IT IS OFFICIAL, UNOFFICIAL(Xiaomi.eu,sphinx) OR MODDED(smiui).This is for the people who unlocked bootloader through the unofficial way.
http://forum.xda-developers.com/redmi-note-3/how-to/unlock-bootloader-waiting-permission-t3349886
People with officially unlocked bootloader can also try just to be on safer side...nothing to lose right?
Many people after unlocking their bootloaders flashed miui recovery/fastboot roms through twrp/miflash and got their device hardbricked with locked bootloader, which is a pretty messed up situtation, (follow this guide if you are a victim
http://en.miui.com/thread-245347-1-1.html
) and the only way to unbrick from that state is test-point method which voids warranty of course. Others who flashed fastboot roms with default recovery using miflash ends up with locked bootloader too, so I'm gonna share steps by which you can flash full recovery/fastboot roms and not get harbricked/locked bootloader:-
1) First let me tell you why it happens, every recovery rom zip file has a firmware-update folder containing a emmc_appsboot.mbn file, that file relocks bootloader everytime a full rom recovery rom is flashed, fastboot roms also have the same emmc_appsboot.mbn file.
2) To flash recovery roms through twrp, delete the emmc_appsboot.mbn file from the firmware_update folder inside the rom zip file, and then flash rom. Winrar works best, open the recovery zip file with winrar and open firmware-update folder and right click on the emmc_appsboot file and select delete, wait for it to complete(takes some time). For fastboot roms extract the download fastboot file and delete the file emmc_appsboot.mbn file from the images folder. Also in order to keep your desired recovery like TWRP intact, delete the recovery.img file. Edit :- Tested it on my Redmi note 3 pro, deleting only the emmc_appsboot.mbn file works, no need of deleting entire firmware-update folder.
3) To update roms, first download OTA through updater app (or download it from pc) and then open the OTA zip file (located inside downloaded roms folder) and delete emmc_appsboot.mbn file inside the firmware-update folder and then flash through twrp. OTA's can relock bootloader and hardbrick(as it happened in Mi4c).Can't flash OTA due to build fingerprint error? Follow this guide
http://en.miui.com/thread-262947-1-1.html
4) After flashing rom through twrp, flash modified boot.img specific for that miui version, or else you will get bootloop. Guide to make modified boot.img http://forum.xda-developers.com/redmi-note-3/how-to/creating-modified-boot-img-enabling-adb-t3359916
Original Boot.img is located inside recovery rom zip.For those who dont want to do it manually, link for downloading modified boot.img
http://miuidroid.com/rn3/boot_images/
(credits to magdag)
It is required to flash modified boot.img even if you updated through OTA.
P.S:- I've tested all this using my Redmi note 3 pro, should work on other devices too. Any suggestions for improving the guide is welcome.
If I helped pressing thanks won't cost you a thing.:good:
Can you update or post the modded boot image for latest SD 7.2.3.0 Stable global rom?
I have 7.1.8. global rom with officially unloced botloader and TWRP. If I want to install the update I just download the OTA from the updater app in my phone, then remove the emmc_appsboot.mbn and flash. Do I need to flash a modified boot image after that?
anshude1 said:
Can you update or post the modded boot image for latest SD 7.2.3.0 Stable global rom?
Click to expand...
Click to collapse
okay give me sometime, I'll upload on gdrive
Rajdip said:
okay give me sometime, I'll upload on gdrive
Click to expand...
Click to collapse
here you go
https://drive.google.com/open?id=0B5bSNUUrjm6JSk1lZWx5VlRqbkU
Can you please make a modified boot.img for China Stable?
sanuj.bhatia said:
Can you please make a modified boot.img for China Stable?
Click to expand...
Click to collapse
will do
Edit:- https://drive.google.com/open?id=0B5bSNUUrjm6JQTZscE5YZUhuNlE this for china stable 7.2.2.0
Rajdip, you wrote to first flashing rom through twrp and after that flash modified boot.img. How can I flash file boot.img through twrp?
Maby can I copy midified boot.img into rom zip file and after flashing rom?
KrzysiekGP said:
Rajdip, you wrote to first flashing rom through twrp and after that flash modified boot.img. How can I flash file boot.img through twrp?
Maby can I copy midified boot.img into rom zip file and after flashing rom?
Click to expand...
Click to collapse
img file can flashed via TWRP, when you select install option on TWRP , look for "install image" option on right bottom part of screen, now select the modified img and then select boot and then flash.
Rajdip said:
will do
Edit:- https://drive.google.com/open?id=0B5bSNUUrjm6JQTZscE5YZUhuNlE this for china stable 7.2.2.0
Click to expand...
Click to collapse
Can you make one for the latest 7.2.3?
sanuj.bhatia said:
Can you make one for the latest 7.2.3?
Click to expand...
Click to collapse
Look at post # 5... The link is already there for 7.2.3
i've succes flash official rom v stable cn 7.2.3.0...but i 've problem cannot turn on wifi....any idea how to fix it?
Rajdip said:
THIS GUIDE IS FOR ALL MIUI BASED ROMS WHETHER IT IS OFFICIAL, UNOFFICIAL(Xiaomi.eu,sphinx) OR MODDED(smiui).This is for the people who unlocked bootloader through the unofficial way.
http://forum.xda-developers.com/redmi-note-3/how-to/unlock-bootloader-waiting-permission-t3349886
People with officially unlocked bootloader can also try just to be on safer side...nothing to lose right?
Many people after unlocking their bootloaders flashed miui recovery/fastboot roms through twrp/miflash and got their device hardbricked with locked bootloader, which is a pretty messed up situtation, (follow this guide if you are a victim
http://en.miui.com/thread-245347-1-1.html
) and the only way to unbrick from that state is test-point method which voids warranty of course. Others who flashed fastboot roms with default recovery using miflash ends up with locked bootloader too, so I'm gonna share steps by which you can flash full recovery/fastboot roms and not get harbricked/locked bootloader:-
1) First let me tell you why it happens, every recovery rom zip file has a firmware-update folder containing a emmc_appsboot.mbn file, that file relocks bootloader everytime a full rom recovery rom is flashed, fastboot roms also have the same emmc_appsboot.mbn file.
2) To flash recovery roms through twrp, delete the emmc_appsboot.mbn file from the firmware_update folder inside the rom zip file, and then flash rom. Winrar works best, open the recovery zip file with winrar and open firmware-update folder and right click on the emmc_appsboot file and select delete, wait for it to complete(takes some time). For fastboot roms extract the download fastboot file and delete the file emmc_appsboot.mbn file from the images folder. Also in order to keep your desired recovery like TWRP intact, delete the recovery.img file. Edit :- Tested it on my Redmi note 3 pro, deleting only the emmc_appsboot.mbn file works, no need of deleting entire firmware-update folder.
3) To update roms, first download OTA through updater app (or download it from pc) and then open the OTA zip file (located inside downloaded roms folder) and delete emmc_appsboot.mbn file inside the firmware-update folder and then flash through twrp. OTA's can relock bootloader and hardbrick(as it happened in Mi4c).Can't flash OTA due to build fingerprint error? Follow this guide
http://en.miui.com/thread-262947-1-1.html
4) After flashing rom through twrp, flash modified boot.img specific for that miui version, or else you will get bootloop. Guide to make modified boot.img http://forum.xda-developers.com/redmi-note-3/how-to/creating-modified-boot-img-enabling-adb-t3359916
Original Boot.img is located inside recovery rom zip.For those who dont want to do it manually, link for downloading modified boot.img
http://miuidroid.com/rn3/boot_images/
(credits to magdag)
It is required to flash modified boot.img even if you updated through OTA.
P.S:- I've tested all this using my Redmi note 3 pro, should work on other devices too. Any suggestions for improving the guide is welcome.
If I helped pressing thanks won't cost you a thing.:good:
Click to expand...
Click to collapse
Currently I'm on 6.4.14 (CHINA LATEST DEV ROM) ,Can i use 6.4.14 Fastboot ROM in place of 7.1.8 Global stable rom to unlock using unofficial method . After unlocking bootloader , i want to directly upgrade to latest global stable rom 7.2.3.0 with TWRP and root. I have recovry ROM (OTA) of 7.2.3.0 .
What would be the appropriate steps to do that without any problems ?
Please tell me step by step as i will follow exactly that steps and don't want to risk even a bit by using my half knowledge . I know i have to read the guide but i get lost in between , would appreciate if you could tell me exact steps .
akhil17kr said:
Currently I'm on 6.4.14 (CHINA LATEST DEV ROM) ,Can i use 6.4.14 Fastboot ROM in place of 7.1.8 Global stable rom to unlock using unofficial method . After unlocking bootloader , i want to directly upgrade to latest global stable rom 7.2.3.0 with TWRP and root. I have recovry ROM (OTA) of 7.2.3.0 .
What would be the appropriate steps to do that without any problems ?
Please tell me step by step as i will follow exactly that steps and don't want to risk even a bit by using my half knowledge . I know i have to read the guide but i get lost in between , would appreciate if you could tell me exact steps .
Click to expand...
Click to collapse
Yeah you can use china dev rom for unlocking bootloader, and after that to upgrade to global 7.2.3.0 you need a full recovery rom, OTA wont work, also WHENEVER YOU DOWNLOAD A OTA/ROM OPEN IT WITH WINRAR, OPEN THE FIRMWARE-UPDATE FOLDER AND DELETE THE emmc_appsboot.mbn file or else you will hardbrick your device and the only wasy from recovering from it is by opening your phone
Mayoz said:
i've succes flash official rom v stable cn 7.2.3.0...but i 've problem cannot turn on wifi....any idea how to fix it?
Click to expand...
Click to collapse
Did you flash the modified boot.img of 7.2.3.0?
Rajdip said:
Yeah you can use china dev rom for unlocking bootloader, and after that to upgrade to global 7.2.3.0 you need a full recovery rom, OTA wont work, also WHENEVER YOU DOWNLOAD A OTA/ROM OPEN IT WITH WINRAR, OPEN THE FIRMWARE-UPDATE FOLDER AND DELETE THE emmc_appsboot.mbn file or else you will hardbrick your device and the only wasy from recovering from it is by opening your phone
Click to expand...
Click to collapse
Hi , can you make sure again that China dev ROM will work in place of stable 7.1.8.0 without any problem ?
Also 7.2.3.0 which I've is full ROM i think it's "miui_HMNote3ProGlobal_V7.2.3.0.LHOMIDA_74136dde89_5.1.zip" and it is 0.99 GB in size.
So after unlocking bootloader , i can normally boot into current china dev ROM and directly upgrade to 7.2.3.0 through updater app with just emmc_appsboot.mbn deleted from it ?
I guess there is no need to delete boot.img as i still haven't flashed the twrp and root yet and will flash both of files after upgrading to 7.2.3.0 .
Plz tell if my steps are correct or not ?
akhil17kr said:
Hi , can you make sure again that China dev ROM will work in place of stable 7.1.8.0 without any problem ?
Also 7.2.3.0 which I've is full ROM i think it's "miui_HMNote3ProGlobal_V7.2.3.0.LHOMIDA_74136dde89_5.1.zip" and it is 0.99 GB in size.
So after unlocking bootloader , i can normally boot into current china dev ROM and directly upgrade to 7.2.3.0 through updater app with just emmc_appsboot.mbn deleted from it ?
I guess there is no need to delete boot.img as i still haven't flashed the twrp and root yet and will flash both of files after upgrading to 7.2.3.0 .
Plz tell if my steps are correct or not ?
Click to expand...
Click to collapse
What about you use the miui global 7.2.3.0 directly for unlocking bootloader the unofficial way? after that you can flash TWRP if you want, and you cant update using updater app, you have to update directly from TWRP.
anshude1 said:
Look at post # 5... The link is already there for 7.2.3
Click to expand...
Click to collapse
I guess that boot.img is for Global Stable 7.2.3!?
Rajdip said:
What about you use the miui global 7.2.3.0 directly for unlocking bootloader the unofficial way? after that you can flash TWRP if you want, and you cant update using updater app, you have to update directly from TWRP.
Click to expand...
Click to collapse
Well to do that i have to download again the GB of flashboot rom of miui global 7.2.3.0 and i really have painful slow internet so thought of first unlocking bootloader and then later upgrade through Recovery zip file.
What do you suggest for best way as i just don't want to f**k up my device..
So if updater app can't flash the Official MIUI roms even with unlocked bootloader then what's the point of recovery ROM of different types such as global stable,beta china stable beta if you want to switch ROM's ?
Why in redmi note 3 there are so hurdles to switch /downgrade/upgrade ROM after unlocking bootloader ? I have done all flashing stuff on some other android phones too but there was never a risk for relock of bootloader and overwrite of custom recovery while flashing ROMS ..so why all this hurdles in Redmi Note 3 as it doesn't make sense to unlock bootloader after each and every upgrade /downgrade of ROM's or it is only due to the fact that it has been unlocked through unofficial way ?
akhil17kr said:
Well to do that i have to download again the GB of flashboot rom of miui global 7.2.3.0 and i really have painful slow internet so thought of first unlocking bootloader and then later upgrade through Recovery zip file.
What do you suggest for best way as i just don't want to f**k up my device..
So if updater app can't flash the Official MIUI roms even with unlocked bootloader then what's the point of recovery ROM of different types such as global stable,beta china stable beta if you want to switch ROM's ?
Why in redmi note 3 there are so hurdles to switch /downgrade/upgrade ROM after unlocking bootloader ? I have done all flashing stuff on some other android phones too but there was never a risk for relock of bootloader and overwrite of custom recovery while flashing ROMS ..so why all this hurdles in Redmi Note 3 as it doesn't make sense to unlock bootloader after each and every upgrade /downgrade of ROM's or it is only due to the fact that it has been unlocked through unofficial way ?
Click to expand...
Click to collapse
This is what xiaomi made of themselves, every move is f*****g hassle right now. I understand the problem of slow internet. You have unlocked bootloader right? why dont you just leave MIUI and install the AOSP rom. no more hassle no bricks.

Creating my own rom

How would I go about if I want to create my own rom based on the latest samfirm/updato rom?
I have this far downloaded one for s7edge. Unpacked the first zip so I get AP/BL and so forth. I've then unpacked the BL and managed to unpack the boot loader stuff so I have kernel an ramdisk by them self. I then unpacked the ramdisk.. But how do I go on to make this a flashable rom? Preferred is to replace or remove the recovery so I can preserve TWRP. I've done all this so far to get a flashable stock rom that doesn't enforce encryption.. If I get all working I might do more stuff with it
Any help or pointers appreciated!

Modify update images to install with TWRP

Hello devs,
please can somebody discribe how to modify the original update image, that we can install the image with TWRP without overwriting the TWRP recovery , fastboot a.s.o.
That would be great.
You can use a Archive Software like (7zip) to replace files in your update.zip . I didn't try it so no idea if it works.
I know, with 7zip we can open the files, but the point is, how to modify the update script that the recovery will not be overwritten a.s.o.
Frank Bearson said:
I know, with 7zip we can open the files, but the point is, how to modify the update script that the recovery will not be overwritten a.s.o.
Click to expand...
Click to collapse
If all you are worried about is overwriting TWRP then just flash TWRP in TWRP before you reboot

Categories

Resources