Unpacking and repacking boot.img - recommended tool? - Realme 2 pro Questions & Answers

Can anyone recommend a tool that can successfully unpack and repack the boot.img contained in a custom ROM for the Realme 2 Pro?
I tried a few, but they all got stuck at the custom ROM logo after unpacking and repacking.

Nevermind. This worked:
https://forum.xda-developers.com/showthread.php?t=2073775
AIK-Linux-v3.5-ALL.tar.gz
I think I had to rename the output file back to boot.img before flashing with TWRP
Other methods would get stuck at the ROM logo.

Related

[Q] Trying to flash images (zImage) onto Nexus 7

Hi everyone,
I pulled down images made from AOSP for the Nexus 7 device successfully. I am trying to flash the zImage onto the Nexus 7 device via fastboot. But in the terminal I get a "Invalid partition" error after doing "fastboot flash zimage zImage". I can flash the boot.img, userdata.img, and system.img just fine. But I get an error for zImage.
I also tried a different method. I did a "make otapackage" and flashed the zip through CWM to I get a "no file_context warning". Afterwards when rebooting, the device shows the google logo but is a blank black screen after a few seconds.
That is when I fastboot flash all the stock images back on and try again... but no success.
Has anyone encountered something similar? Or has some idea of what I steps I can take to remedy this?
Thanks!
mdrdroid said:
Hi everyone,
I pulled down images made from AOSP for the Nexus 7 device successfully. I am trying to flash the zImage onto the Nexus 7 device via fastboot. But in the terminal I get a "Invalid partition" error after doing "fastboot flash zimage zImage". I can flash the boot.img, userdata.img, and system.img just fine. But I get an error for zImage.
I also tried a different method. I did a "make otapackage" and flashed the zip through CWM to I get a "no file_context warning". Afterwards when rebooting, the device shows the google logo but is a blank black screen after a few seconds.
That is when I fastboot flash all the stock images back on and try again... but no success.
Has anyone encountered something similar? Or has some idea of what I steps I can take to remedy this?
Thanks!
Click to expand...
Click to collapse
Not sure if your question was answered in another post as I found this thread searching on google for my own issue.
You can't fastboot flash zImage at all. You may be able to fastboot boot zImage but trying to flash the zimage is an incomplete image. You'd have to add the zimage to a boot.img to flash it with fastboot. Then you'd fastboot flash boot boot.img.
You should be able to fastboot boot zImage to boot the kernel from your pc with the existing boot.img. Hope this helps. I may not even see a response to this thread but I check Nexus 7 Q&A so I hope I hear it helps.
tiny4579 said:
Not sure if your question was answered in another post as I found this thread searching on google for my own issue.
You can't fastboot flash zImage at all. You may be able to fastboot boot zImage but trying to flash the zimage is an incomplete image. You'd have to add the zimage to a boot.img to flash it with fastboot. Then you'd fastboot flash boot boot.img.
You should be able to fastboot boot zImage to boot the kernel from your pc with the existing boot.img. Hope this helps. I may not even see a response to this thread but I check Nexus 7 Q&A so I hope I hear it helps.
Click to expand...
Click to collapse
Thank you for the reply!!! I really appreciate it as I didn't really know what to do about this issue. I don't know how to add the zimage to the boot.img, but I will look into it... do you have any more advice on this?
Before, when after building, I did flash boot.img, zImage (which failed), system.img, and userdata... and I did get it to boot, and everything seems to be working okay in general but I have an inkling that the zImage generated will be needed for what I aim to accomplish.
Anyhow, thanks again for the information I'm new to android development and am glad for any help!
Google decompiling a boot.Img
You can't flash a zimage (ramdisk) because it is not a partition
The boot partition or boot.Img contains both the kernel and the ramdisk
So what you need to do is decompile the boot.Img of your rom
Then put your new ramdisk into the decompiled one
Then recompile the boot and flash that
Sent from my Nexus 7

Bootimg.exe IoError

I Was Trying to extract boot.img via bootimg.exe after running bootimg.exe --unpack-bootimg boot.img i got Ioerror Invalid Ramdisk Can Anyone help me solving this problem?
Anyway, How can i extract Boot.img and modify kernel then repack it and flash it through twrp SM-G531F, trying to extract i get Invalid Ramdisk at end

Flashing kernel boot.img

Hi all,
I have OEM Unlock option checked and already flashed TWRP recovery.
After building a kernel image file called boot.img, I want to flash it, but dont know how
With other devices it is simply fastboot flash boot boot.img, but it seems there is no way to enter fastboot mode with this one
How can I flash the boot.img file? Preferably with Ubuntu, as I am building kernels with it
No one? Really?

Extract Boot.img from .kdz?

Is it doable?
I've tried some tutorials but the boot.img always comes out corrupted, almost bricked my device.

BAH-W09 boot loop after Magisk patched boot.img

My friend give me a Huawei Mediapad with lastest stock rom EMUI 5.1.3 and Android 7.0 installed. I want to root it with Magisk. After successful unlock bootloader, flash twrp, than I tried to flash Magisk 25.2 under twrp. The flash process output some permission denied error with /data/... path, but return success result. After reboot, it enter the boot loop. Then, I boot to recovery and try to uninstall Magisk, but not success. I need to recover it by flash the original boot.img from fastboot to make it boot again. Next, I tried to patch the boot.img under Magisk Manager. This time, I got the patched boot.img and flash it again in fastboot mode. It's the same result. All the patched boot.img by using differnt patch options are not boot successfully. Any procedures to make root successul on this rom?

Categories

Resources