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?
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..
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?
My attempt to root my H930 went very wrong... So I started by unlocking the bootloader and flashing TWRP. After that I didn't manage to get in to TWRP. Instead it started to boot, but froze eventually. Now I can't get it to boot (It gets stuck on initial LG V30 screen), and I can't power it off. I can get into stock recovery (apparently it got far enough to replace TWRP) and download mode with hardware button combinations. But the download mode seems to be different from fastboot mode (looks different on phone, and fastboot can't find it) so I can't try to flash TWRP again. I also managed to get it into a check IMEI + S/N mode by holding all buttons at once...
I've tried flashing H93010f_00_OPEN_EU_OP_0925.kdz with LG UP/Uppercut (since I can get to download mode). It went fine but the situation is the same - no boot, no way to power off.
A factory reset from stock recovery doesn't help either.
Please advice..
Alright, I acually got in to fastboot mode even though I'm not quite sure how.. I basically first went in to download mode, and then pressed vol down + power to reboot, and ended up in fastboot mode. From there I flashed twrp again. And this time I managed to get in to TWRP. Since I didn't have a working ROM I went ahead and wiped all but external sdcard and tried flashing Boombox. It resulted in an "Error: 1"..
So I tried flashing H93010f_00_OPEN_EU_OP_0925.kdz from LGUP again, and now I'm back to a device that doesn't boot again.
Which root are you trying to flash? TWRP also is in alpha at the very best at this point. Can you extract the KDZ and use fastboot to flash the .img files inside, assuming they have .img files inside of the KDZ?
jcsww said:
Which root are you trying to flash? TWRP also is in alpha at the very best at this point. Can you extract the KDZ and use fastboot to flash the .img files inside, assuming they have .img files inside of the KDZ?
Click to expand...
Click to collapse
I'm not trying to flash any root. I was planning on flashing Magisk but never got that far. At this point I'm just trying to get a working phone. I read about extracing img files from kdz but the tool didn't work in my virtual WinXP machine so I'm trying to fire up a Win10 machine now (I'm on mac).
Meanwhile I tried flashing boot and system from "LGH930GAT-00-V10c-222-01-OCT-12-2017+0.zip" but that resulted in the phone automatically booting into TWRP... That can't be good.
egendomligt said:
I'm not trying to flash any root. I was planning on flashing Magisk but never got that far. At this point I'm just trying to get a working phone. I read about extracing img files from kdz but the tool didn't work in my virtual WinXP machine so I'm trying to fire up a Win10 machine now (I'm on mac).
Meanwhile I tried flashing boot and system from "LGH930GAT-00-V10c-222-01-OCT-12-2017+0.zip" but that resulted in the phone automatically booting into TWRP... That can't be good.
Click to expand...
Click to collapse
With some other phones, like Nexus devices. Flashing older boot images can cause bootloops. I don't know if this is the case with your device but it might be something to consider. Have you tried flashing the complete latest factory image to see if that solves the bootloop?
jcsww said:
With some other phones, like Nexus devices. Flashing older boot images can cause bootloops. I don't know if this is the case with your device but it might be something to consider. Have you tried flashing the complete latest factory image to see if that solves the bootloop?
Click to expand...
Click to collapse
Unfortunately I haven't been able to get able to get a hold of a KDZ other than for 10f. I'd like to try 10v.
I got the extraction tool working in a Win10 box now, and I'm trying to extract boot and system images from the 10f KDZ...
egendomligt said:
Unfortunately I haven't been able to get able to get a hold of a KDZ other than for 10f. I'd like to try 10v.
I got the extraction tool working in a Win10 box now, and I'm trying to extract boot and system images from the 10f KDZ...
Click to expand...
Click to collapse
Best of luck!
Nope, that didn't work either. fastboot threw an error telling me the system image was too big for the partition.. At least the system image from the 10c dump fit properly..
So I guess my best bets right now are to either get a hold of a 10v KDZ, or wait for something flashable through TWRP.. :/
Is there like a lastlog for system boot that would be reachable from TWRP/adb..? It would sure be nice to see whats going wrong...
egendomligt said:
Nope, that didn't work either. fastboot threw an error telling me the system image was too big for the partition.. At least the system image from the 10c dump fit properly..
So I guess my best bets right now are to either get a hold of a 10v KDZ, or wait for something flashable through TWRP.. :/
Is there like a lastlog for system boot that would be reachable from TWRP/adb..? It would sure be nice to see whats going wrong...
Click to expand...
Click to collapse
No clue!
Ok, I got it to boot again!
* I formatted data (not wiped) inTWRP - Not sure if this step was relevant
* Flashed stock recovery/boot/system from a KDZ dump called "LGH930GAT-00-V10c-222-01-OCT-12-2017+0" - found the link in some other thread here
* Rebooted and watched it boot - went in to "Android is upgrading..."-screen - rebooted - then booted normally.
Thanks for the help and a special thanks to @Perkash who helped me out through PM.