Bootimg.exe IoError - Galaxy Grand Prime Q&A, Help & Troubleshooting

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

Related

[SOLVED] boot.img will boot on test boot, but loops when flashed

I have compiled a kernel (zImage) for the Nexus 4, using the msm tree and mako checkout. I have also compiled android using lunch full_mako-userdebug. I grabbed the boot.img from the android build output and used mkbootimg and unpackbootimg to rebuild it using the zImage from the msm mako kernel build I mentioned earlier. When I use
Code:
fastboot boot boot.img
the phone boots using the newly created boot.img just fine. The kernel version checks out being the one that I built and there is no problems. However, when i reboot the phone into the bootloader and use
Code:
fastboot flash boot boot.img
the phone boot loops. Why does the phone boot fine using fastboot boot boot.img but loops when I go ahead and flash it? I have unpacked the original boot.img (from the android build) and repacked it using the original zImage extracted from it to see if the mkbootimg process is the problem. The same thing happens, boots using fastboot boot boot.img but fastboot flash boot boot.img causes boot loop. Any help?
arynhard said:
I have compiled a kernel (zImage) for the Nexus 4, using the msm tree and mako checkout. I have also compiled android using lunch full_mako-userdebug. I grabbed the boot.img from the android build output and used mkbootimg and unpackbootimg to rebuild it using the zImage from the msm mako kernel build I mentioned earlier. When I use
Code:
fastboot boot boot.img
the phone boots using the newly created boot.img just fine. The kernel version checks out being the one that I built and there is no problems. However, when i reboot the phone into the bootloader and use
Code:
fastboot flash boot boot.img
the phone boot loops. Why does the phone boot fine using fastboot boot boot.img but loops when I go ahead and flash it? I have unpacked the original boot.img (from the android build) and repacked it using the original zImage extracted from it to see if the mkbootimg process is the problem. The same thing happens, boots using fastboot boot boot.img but fastboot flash boot boot.img causes boot loop. Any help?
Click to expand...
Click to collapse
Come to find that fastboot will not work because the Nexus 4 has a secure boot option. In the bootloader you can see that it is enabled. Although I managed to flash another developers kernel via recovery update.zip method. This worked, but now I am having trouble getting my own update.zip to flash.
Looks like I was wrong in both of my posts above. The problem seems to have been related to entering the wrong pagesize when using "mkbootimg". I found that the "abootimg" is much better, and I have attached it below. simply use:
EDIT: I have updated the code and the attachment. I have created a modified program that blends a fastboot function with abootimg. ENJOY!
Code:
./zhack -x boot.img
to extract all the contents of boot.img
then replace the zImage that is extracted with the new zImage you have compiled.
now execute:
Code:
./zhack -z boot.img -f bootimg.cfg -k <new zImage> -r initrd.img
fastboot boot zImage
I have also the nexus4 and i use msm / mako
Is it possible that i boot like this?
fastboot boot arch/arm/boot/zImage
everytime my phone stops after the "google" logo?
i used:
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/marcel/Android/rom/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/"
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=arm-eabi-
make mako_defconfig
make
But when i compile my "rom" the boot.img is flashing correct to my device.
So i can't update my kernel into the boot.img because the kernel is not working?
very strange?
any tips?
arynhard said:
Looks like I was wrong in both of my posts above. The problem seems to have been related to entering the wrong pagesize when using "mkbootimg". I found that the "abootimg" is much better, and I have attached it below. simply use:
EDIT: I have updated the code and the attachment. I have created a modified program that blends a fastboot function with abootimg. ENJOY!
Code:
./zhack -x boot.img
to extract all the contents of boot.img
then replace the zImage that is extracted with the new zImage you have compiled.
now execute:
Code:
./zhack -z boot.img -f bootimg.cfg -k <new zImage> -r initrd.img
Click to expand...
Click to collapse

[REQUEST] Can someone upload a WORKING system.img and boot.img

Can someone upload a WORKING system.img and boot.img for me please?
I have android 6,0 working but I can't flash an update.app because of the balong bug.

Unpacking and repacking boot.img - recommended tool?

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.

repack boot.img

Hello.
I would like to use custom kernels with enabled modprobe supporting. But I am afraid to flash third party modules with magisk because of potential data lost or boot loops or something like that.
So I want to loading kernel without flashing with fastboot like a:
Code:
fastboot boot boot.img
However, I don't know why, all custom kernels ditribute with 'zImage' file. Therefore I need to repack boot.img manualy:
Code:
abootimg -x boot.img
(abootimg deb package)
or
Code:
unpack boot.img
(whiteboard[at]ping[at]se/Android/Unmkbootimg)
or
Code:
mkboot boot.img out/
(github[at]com/xiaolu/mkbootimg_tools)
In all cases I have the same result (files have identical md5sum).
But when I try to build boot.img I've obtain not bootable image.
Also I noticed that after rebuilds boot.img lose 100MB:
original boot.img - 128M
new_boot.img - 17M
Also notice, I didn't make anything changes!
Please tell me, what I do wrong?
Thank you.

Bluetooth.img way to extract or make flashable?

Trying to extract bluetooth.img from newest oos. Or possibly make flashable but as is won't flash in fastboot due to not being able to flash on critical partition. Any help appreciated.

Categories

Resources