I'm currently rooted and flashing new updates/custom ROMs by extracting the payload of the new ROM and flashing the .img files using the manual flash instructions found here.
However, I'd like to understand more about this process. The instructions sometimes flashes less .img files than were extracted, e.g. in the recent OOS 10.0.11 update, the following .img files https://imgur.com/UyenBAc extracted (31) is less than what was flashed (19). Furthermore, the instructions passed the arguments "--disblae-verity" when flashing two of the .imgs, but not the others.
Therefore my questions are:
1. What do each .img file do?
2. Which files must be flashed and in what order?
3. Why are certain files flashed with certain arguments?
Related
Hi, sorry this is a really basic question but I can't find a proper answer.
How do I flash the modules for a kernel? I found the modules folder inside the zip but there are lots of files in it, how do I flash them to my phone?
Also the flashing tools provided with some roms never work for me, fastboot always says something like "....fastboot-windows isn't a recognised internal command..." but I have no problem flashing the boot.img manually through fastboot. Is the flasher tool needed to flash the kernel modules?
Any advice will be much appreciated, I'm trying to get CM9 Domination working but it just boot loops, I assume because I'm not flashing the kernel modules.
Thanks.
How to flash kernels.
first off, there should be two parts to the kernel that you have, first the module, that should be in a .zip format, and also a .img file that should be "kernel-11".img or boot.img or something or other. First you need to open fastboot, and in Command prompt with the ".img" file inside your adb.exe/fastboot.exe/adbwinapi.dll folder that contains these, forward CMD to this folder, , type "fastboot erase cache", then "fastboot flash boot "kernel-11.img" or whatever your .img filename is, then after this is complete you need to reboot recovery, then go to install zip from SD, of which you needed to place the module on your sd card, then simply flash the file and you should have installed your kernel!
^Remember to Hit thanks! ^^
Also, in regards to the error, i dont think your using the folder that you need to be in, What you should do is create a folder somewhere that is convenient for you that you can easily access and remember the address, then add the files fastboot.exe, adbwinapi.dll and adb.exe to, which are all located in your android-sdk/platform-tools/!
Thanks smithr179, I thought I'd have to flash through fastboot or adb, no wonder I couldn't figure it out! Recovery sounds much easier, thanks
The modules in the file I have for the stock kernel are in a normal folder (not a .zip) but they are inside a larger zip folder containing the boot.img, meta inf and system folders. Do I just flash the whole .zip file or should the modules be in a zip of their own?
I'm trying hard to get to grips with all this lol Many thanks for your help
NB. I just tried flashing the whole zip file with everything in it and it worked! Modules were flashed as well as the boot.img. Thanks for all your assistance, much appreciated
Although I have been rooting and flashing for quite some time now, I am new to the kernel-module-repack part.
I am willing to use the xm kernel with the newest insertcoin 18.0.2.
I noticed the boot.img is located in the downloadable zip file. Am I correct in saying:
-the boot.img inside the zip file must be extracted and repacked. And flashed in bootloader
-the zip file as a whole is the 'module' and must be installed in recovery
Does the zip file not make conflict because the original non-repacked boot.img is present in the zip?
No, it won't conflict because our phone is S-ON > boot images in flashable zips do not get flashed at all.
Sent from my IceCold One X
I've noticed that many in this forum for the Honor 7x / Mate SE want to try a few ROMS, and then eventually go back to stock - Some just want to go back to stock. I had my own issues and thankfully there were others to help along the way. This method does not use fastboot to flash partitions, it uses TWRP, so the assumption is you have a working TWRP. Also I am not responsible for any bricks, I am just explaining what I did to get back to stock (And based on all the issues people are having, I'm staying there)
If you've tried a Treble ROM or others, the route I took to get back to stock was as follows:
1.) Download your firmware from Firmware finder or the Pro-TeamMT website:
http://pro-teammt.ru/firmware-database/?firmware_model=bnd-l34&firmware_page=0
In this example, mine is the Mate SE..
You should have downloaded 3 files. The important one we want right now is the Update.zip - Extract this file. You should see UPDATE.APP within this folder.
2.) Download the Huawei extractor software by worstenbrood:
https://forum.xda-developers.com/showthread.php?t=2433454
3.) Use this software to extract the files from the Update.App - You may need to disable the Checksum checks under "Settings". When you select the UPDATE.APP file, you should get a list of the files that are compiled or compressed into the app. The main 4 files you want are Ramdisk, Vendor, System, and if you'd like the Stock recovery (Recovey_Ramdisk). Copy these files to your SD card.
4.) Assuming you still have the functioning TWRP, reboot into TWRP and wipe everything but the SD card.
5.) Flash the images to the appropriate partition, Ramdisk = Ramdisk, Vendor = Vendor Image, and System = System Image - Ensure you're flashing the image partitions. Ramdisk is necessary if you've ever rooted or used Magisk.
At this point you should be able to reboot and get back into stock...But you'll notice Themes do not work properly..That's because you've wiped / formatted data at some point in TWRP, and now the Data/hw_int has been wiped. You can fix this by flashing the update on top of itself by the instructions in this thread (Thanks to mrmazak):
https://forum.xda-developers.com/honor-7x/how-to/guide-honor-7x-flash-oreo-update-t3781649
See the "Flash update while on Oreo"...This has worked twice now to get me back my themes after wiping /data.
I counted on my TWRP backup to get me back to stock after trying a Treble ROM, and I ended up bricked. So hopefully this helps someone!
PS, if anyone has more to add this this, the more help the better.
Wait, wouldn't the recovery be the file "RECOVERY_RAMDIS.img"
???
crayonicle said:
Wait, wouldn't the recovery be the file "RECOVERY_RAMDIS.img"
???
Click to expand...
Click to collapse
You are correct...That is the name of the actual image in the UPDATE.APP, but I was basing the name off of the actual partition.
Corrections, please add to original post
smokinjoe2122 said:
You are correct...That is the name of the actual image in the UPDATE.APP, but I was basing the name off of the actual partition.
Click to expand...
Click to collapse
Just learned today that you can't flash Vendor through Fastboot, so you have to copy all the necessary files onto a SD card or USD OTG.
The files needed are: "SYSTEM.img" "RECOVERY_RAMDIS.img" and "VENDOR.img"
Flash them through twrp in the required partitions, the partition names are literally the file names.
TWRP: https://forum.xda-developers.com/devdb/project/dl/?id=28883
crayonicle said:
Just learned today that you can't flash Vendor through Fastboot, so you have to copy all the necessary files onto a SD card or USD OTG.
The files needed are: "SYSTEM.img" "RECOVERY_RAMDIS.img" and "VENDOR.img"
Flash them through twrp in the required partitions, the partition names are literally the file names.
TWRP: https://forum.xda-developers.com/devdb/project/dl/?id=28883
Click to expand...
Click to collapse
System image can fail too...that's why I said to flash everything in TWRP...Plus, flashing the update on-top of itself will not only give you theming back, but stock recovery.
crayonicle said:
Just learned today that you can't flash Vendor through Fastboot, so you have to copy all the necessary files onto a SD card or USD OTG.
The files needed are: "SYSTEM.img" "RECOVERY_RAMDIS.img" and "VENDOR.img"
Flash them through twrp in the required partitions, the partition names are literally the file names.
TWRP: https://forum.xda-developers.com/devdb/project/dl/?id=28883
Click to expand...
Click to collapse
Is this working ? Did you try ? I'm on RR ROM and couldn't get adb recognize my device. This is my only hope to return to stock as of now.
Adithya Krishnakumar said:
Is this working ? Did you try ? I'm on RR ROM and couldn't get adb recognize my device. This is my only hope to return to stock as of now.
Click to expand...
Click to collapse
Yes, I tried it. It works flawlessly.
How can I get themes to work? I don't understand the original post, it makes no sense when explaining how to get themes to work properly. I do not know what to do with the link provided in the original post.
crayonicle said:
How can I get themes to work? I don't understand the original post, it makes no sense when explaining how to get themes to work properly. I do not know what to do with the link provided in the original post.
Click to expand...
Click to collapse
What part are you stuck on?
Essentially mrmazak created a flashable file that will take the 3 firmware files you download and flash them on top of your current firmware. This is helpful for doing an update or just reloading the firmware completely (Which is what you're trying to do)...
I'd follow the exact instructions that he's put out on that thread, but the 10,000 ft overview:
https://forum.xda-developers.com/honor-7x/how-to/guide-honor-7x-flash-oreo-update-t3781649
1.) Download files from link for your device
2.) Create a correctly named folder on your SD card, along with those files properly named in that folder (Ensure these files are named properly also.)
3.) Ensure you have the stock recovery on the SD card also.
4.) Copy the "xxx_Update.zip" he created onto your SD
5.) Flash the "xxx_Update.zip"...It will will flash the stock recovery, then boot into update mode and update with the 3 files you downloaded and put into that folder. This will basically "reflash" the firmware and give you back themes.
I would go step by step on his action list and follow them to a "T". I've verified it works perfectly. He also has a "Basic-Instructions" write up in the zip also.
My device build number was BND-L21C185, I bricked my device once but I managed to get it back. Since then I have strange build number which is system 8.0.0.046(063f). Does this method fix it?
This info helped me bring my phone back to life,thank you sir for the step by step instructions.
Found a way to get back to stock without all this hassle lol
So I thought this was the only way to get back to stock... turns out there is a much easier way
This method also enables themes, I checked myself.
https://forum.xda-developers.com/honor-7x/how-to/getting-to-stock-emui-super-easily-t3804722
Is it possible to flash all of the partitions from fastboot?
I have the BND-L34 and I am unsure as to what happened.
I have been running the RROS surdu_petru posted for about 3 weeks now and it was running fine.
2 days ago I grab my phone and it was booted into error mode. Now when I try to boot into twrp I get an error code for my recovery. When I try to boot into the system it throws a different error code for boot image.
I have a twrp backup stored on an sd card, and all 3 OTA's I saved back during the June update. I have the Pro-TeamMT app on my pc and have found/extracted every file for the brick method only get the same errors, 1 right after the other.
I am no noob, (although I am not a Senior Member with a giant banner either ) but I have been rooting android devices going on 8 years now, and have never completely bricked any of them.
My last 2 phones were Oneplus 1 and Oneplus 3, so I am familiar with flashing all the partitions using fastboot. But with those phones there were about 9 different individual flashes that needed to be done in a particular order.
Any help or advice would be greatly appreciated.
I need a boot.img necessarily from 12.5.6.0.RKHEUXM GLOBAL.
Nowhere is this version of ROM in FastBoot format to download.
I need extract boot.img to magisk root.
I have an installed version of 12.5.6.0.
But I mistake I flash boot.img from version 12.5.3.0. , and now I have a broken system, it's not sound,wi-fi, etc.
Thanks very much
Hi. I used the boot.img from the 12.5.6 "Stable Beta" released a few weeks ago. I read somehere, here, that it is the same built as the one released over OTA a couple of days ago. And so far it's working fine. I have wifi and sound.
It is a recovery file, but you can unzip it and then use a payload dumper tool to extract the boot.img.
The recovery: https://xiaomifirmwareupdater.com/miui/alioth/stable beta/V12.5.6.0.RKHEUXM/
And this tool on my Mac: https://github.com/ssut/payload-dumper-go/releases/tag/1.0.0
kurtschmeichel said:
Hi. I used the boot.img from the 12.5.6 "Stable Beta" released a few weeks ago. I read somehere, here, that it is the same built as the one released over OTA a couple of days ago. And so far it's working fine. I have wifi and sound.
It is a recovery file, but you can unzip it and then use a payload dumper tool to extract the boot.img.
The recovery: https://xiaomifirmwareupdater.com/miui/alioth/stable beta/V12.5.6.0.RKHEUXM/
And this tool on my Mac: https://github.com/ssut/payload-dumper-go/releases/tag/1.0.0
Click to expand...
Click to collapse
If I may go off-topic for a question, recovery files are to be flashed in recovery? fastboot files in fastboot mode? hope you can help enlighten me.
I dont need recovery type rom , there is not after unzip the boot. img.
I need fastboot type rom, there is boot. img after unzip.
Thanks
I must flash boot.img over magisk, not twrp!
Please read my previous post again.
You can get a boot.img from the recovery file!
kurtschmeichel said:
Please read my previous post again.
You can get a boot.img from the recovery file!
Click to expand...
Click to collapse
Thanks very much I'll try it.
So far I have tried to extract boot.img from China V12.5.6.0.RKHCNXM Fastboot TYPE, I flashed it via magisk and everything works fine.
If everything works OK, then it's fine
When the official 12.5.6.0.RKHEUXM is published, you can still patch and flash its boot.img again, in order to be sure you have the right one. I will do it.
Or just wait for the Android 12 update.
kurtschmeichel said:
If everything works OK, then it's fine
When the official 12.5.6.0.RKHEUXM is published, you can still patch and flash its boot.img again, in order to be sure you have the right one. I will do it.
Or just wait for the Android 12 update.
Click to expand...
Click to collapse
;-)
To complete this thread, here is how I extracted the boot.img from the recovery file:
- Download the recovery file from here: https://xiaomifirmwareupdater.com/miui/alioth/stable beta/V12.5.6.0.RKHEUXM/
- Unzip it, you will find a payload.bin file inside.
- Download this command line tool for your platform, I used it on my Mac: https://github.com/ssut/payload-dumper-go/releases
- Unpack it and put the binary inside the folder of the unpacked recovery, next to the payload.bin file
- Run the command : ./payload-dumper-go payload.bin
- Let it do its thing and you will find a series of .img files, one will be boot.img
Credits: https://forum.xda-developers.com/t/tool-a-quick-android-ota-payload-dumper.4173271/
hello all, i have an moto g8 xt2045-1 rav, with android 11 Is there no guide to root? magisk I have read that they lose touch ability. thanks
Not sure where you got that info, but I am writing this on a rooted XT2045-2 (i think the only difference to yours is color).
TL;DR: get the boot.img, patch it on the phone using the magisk app, and flash it on the device.
If you have unlocked the bootloader you can skip the following:
- Before you start reconsider if you really want to unlock the bootloader.
- Please note that unlocking the bootloader can and will cause you to lose the warranty on the device.
Here is a website that explains how to unlock the bootloader.
Once you have done that, you need the magisk zip file which you can find online.
From here I will assume that you know how to get into the bootloader.
I personally was unable to get TWRP on android 11, but in case you have it or any other custom recovery, and it works, you can try installing the zip.
If you cannot get a custom recovery, you will have to get the boot.img file for your device.
There are a few ways you could do that, those being finding the stock rom on lolinet and the official LMSA pc app.
I personally like the LMSA method more, as it automatically detects and downloads the correct stock rom.
What you are looking for is the boot.img file.
In case you get the zip from lolinet just extract it and skip the following steps.
In case you are using LMSA, get into the rescue and just download the file, you don't want to rescue the device.
Once you have gotten the zip, extract it and get the boot.img file.
On the device, boot into the system normally and install the magisk app like any other apk.
Transfer the boot.img file to the device, then open magisk and click on install magisk.
Select "choose and patch an image" and select the boot.im that you transfered earlier.
Once that is done you will see the path to the modified magisk-boot.img file (it will have a different name) which you have to get onto the pc.
Once you have the modified boot image and the bootloader is unlocked, go into the bootloader and flash the modified boot image on the device. (fastboot flash boot boot.img*)
*change boot.img to the actual file name
Feel free to ask questions, I tried to make it as detailed as possible.