"android magic not found in boot.img" - HTC One S

When im trying to add init.d support to a kernel, and i make a ramdisk out of my boot.img i get this error:
"android magic not found in boot.img. giving up"
I took the boot.img from the latest firmware.zip from the OTA.
Can somebody help me?

The first 7 letters of your boot.img file should read ANDROID

Related

[Q] How To Modify default.prop?

Hello Everyone,
Thank you in advance for any help on this item.
I have an HTC Sensation phone which is already S-off and has CWM in it.
It also has "su" previleges in it and I was able to modify CID too.
The ROM inside it is stock ROM.
I have been reading and following several guides on how to modify default.prop for other devices. And from what I gather I have to do the following :
1. Unpack boot.img.
2. Modify default.prop.
3. And repack boot.img.
The problem here is that I tried all sorts of things only to end up failing in the "repacking" stage.
I want to modify default.prop to be able to set adb daemon (adbd) to have root previleges and eventually be able to "inject" into HTC sensation my own custom-made versions of framework.jar and other files.
Is modifying default.prop possible?
Is the method I am using correct?
Is it possible to have my own customized framework.jar inside the HTC Sensation?
I hope you guys can point me to some sites and links which can help me in what I intend to do.
Thank you all very much.
Use dsixda kitchen.
Hello Sebastian,
Thanks for your response.
I also tried to use the dsixda kitchen.
What I did was :
1. Downloaded a backup of my phone using ClockworkMod Recovery.
2. I took the boot.img file from the backup generated.
3. Unpacked boot.img using the kitchen.
4. And then repacked it using the kitchen again.
5. I then flashed the generated boot.img into the phone.
6. The phone went into a forever loop in the start up screen.
Did I do it right?
I am rechecking the notes on the kitchen again though. I might have missed something.
Thanks again.
Upload your boot.img, I'll check it. Do you use fastboot.exe to flash boot?
Hello Again,
Thanks once again for the support Sebastian.
"Upload your boot.img, I'll check it. Do you use fastboot.exe to flash boot?"
I use fastboot.exe first and then try to use the ClockworkMod Recovery Advanced option to update the "boot" only part.
I am attaching here my dsixda-kitchen generated boot.img.
This boot .img was generated with the following steps :
1. Unpack htc stock rom boot.img generated by CWM nandroid backup.
2. No changes were made in the ramdisk nor in the kernel part.
3. Repack the ramdisk and kernel using dsixda kitchen.
4. Used fastboot.exe to flash the boot part. "fastboot flash boot boot.img"
5. Wiped the cache partition of the phone.
6. Wiped the /data/dalvik-cache directory.
7. Restarted phone in normal mode.
8. Phone hanged up in startup image.
Many thanks again and more power.

Boot boot.img and recovery.img from U-boot?

I don't know if I can get an answer here, but is there any source files for U-boot to let me able to boot boot.img and recovery.img directly? Currently I can only manually pack uImages for kernel and ramdisk and boot them using bootm command.
P.S. I am the project leader of ipaq214android

[Resolved] [Q] AOSP ICS Porting to Samsung Galaxy Tab2 10.1(GT-5100) Please Help!

Hello everyone,
I am newbie Android ROM development. Nowadays I try to port a specific custom ROM(a special ROM for my company) for Galaxy Tab2 10.1 (GT-P5100). But there is a point that I cannot figure out.
First of all I downloaded android ICS source code and apply my company's module patch to this source. Then I found device and vendor tree for my GT-5100 device and put it my source tree. Finally I built Samsung GT-P5100 kernel and put output file to correct place. At the end of these operations, I compiled all device tree successfully, now I have out/target/product/p5100 file which contains boot.img, system.img, userdata.img etc.(I attached an image file). Everything is fine untill this point. Normally in fastboot mode, I use "fastboot flashall -w" command and img files are automatically flashed to device. But GT-P5100 does not support fastboot mode.Question is this: How can I flash these img files(out/target/product/p5100 file) to the device? I searched lots of threads but cannot find a solution. I also tried to create a ROM which includes system file, boot.img and META-INF file. However it is not worked. Because create a META-INF file is very complicated and I have to find a quick flash option.
I need your helps.
Thanks,
------------------------------------------------------
Edit:
Finally I found solution. Just nedded to use command : make -j4 otapackage and then I get the ROM package to flash this AOSP.

[Q] Boot custom image without flashing it

This may seem an already (10 times) solved question, but I'm unable to boot my Mogo G with a custom boot.img instead of the one flashed on the device.
The phone is an XT1032, currently running KitKat 4.4.4, and I use the latest SDK tools.
I download the stock firmware from sbf.droid-developers.org/phone.php, where I choose RETAIL-FR_FALCON_KLB20.9-1.10-1.24-1.1_cid7_CFC_1FF_SVC.xml.zip
I extract the boot.img file using standard unzip tools, and the zImage and initrd.img files using abootimg
Code:
adb reboot-bootloader
The phone reboots and gets to the fastboot menu
Code:
fastboot boot zImage initrd.img
The console output seems right:
Code:
creating boot image...
creating boot image - 6975488 bytes
downloading 'boot.img'...
OKAY [ 0.336s]
booting...
OKAY [ 0.244s]
finished. total time: 0.580s
The device tries to reboot, but stops at the first "M Powered by Android" splash screen
I wait one minute
I hard reboot the device by holding the power button
The device reboots, but has to pass an unusual step, "Updating Android/Optimization application ..."
I'm quite sure the same method was successful a few months ago, so what has since changed:
The device's firmware was upgraded from 4.4.3 to 4.4.4
The SDK tools were upgraded from ? to 23.0.2
I don't remember whether the firmware was available as a tar.gz or a xml.zip file, but I think it was a tar.gz, and I'm near certain I then used the SDK provided fastboot tool. Today, the firmware is available as an xml.zip file, and I think I have to use the Motorola specific fastboot tool (anyway I've tried both, for identical results)
Could anyone point me toward what I'm missing or doing wrong ?
Thanks.
Why did u extract the boot.img?
Maybe wrong kernel?
And whats about the kernel modules of your custom kernel?
sub77 said:
Why did u extract the boot.img?
Click to expand...
Click to collapse
I simply want a basic way to boot a custom initial ramdisk, without flashing it to the device. So I download the stock firmware archive, unzip it, extract the initial ramdisk (initrd.img) from the boot image, modify it, and repack it using abootimg.
And then:
Code:
fastboot boot zImage initrd.img
For me, this command conform to both the SDK provided fastboot and the Motorola specific one shows in it's help message:
Code:
boot <kernel> [ <ramdisk> ]
I'm not sure anymore of the above command's correctness:
Some information may be missing, as when you expand the boot image (boot.img) you get three files : a kernel (zImage), an initial ramdisk (initrd.img), but also some metadata (in bootimg.cfg); and this metadata is lost when I use "fastboot boot zImage initrd.img". I may try to give this information using additional fastboot options
I even suspect that a few months ago, I used fastboot with a full boot.img image as parameter, though this does not seem to fit the help message above
sub77 said:
Maybe wrong kernel?
And whats about the kernel modules of your custom kernel?
Click to expand...
Click to collapse
As I told you, I'm not currently working on the kernel, and I'm testing with _unmodified_ kernel image (zImage) and initial ramdisk (initird.img), as extracted by "abootimg -x".
Again, any idea is welcome.

CrashDump mode after flashing blue_spark kernel r112

Hey folks,
I have rooted (magisk) OnePlus 8 phone with Android 11, w/o TWRP recovery. I'm trying to replace kernel with one of blue_spark, here's what I'm doing
1. Download zip file from https://github.com/engstk/op8/releases/tag/r112
2. Extract and unpack Image.gz
3. Unpack Magisk patched boot.img to /tmp (magiskboot unpack boot.img)
4. Replace kernel with unpacked Image (cp Image /tmp/kernel)
5. Repack boot.img (magiskboot repack boot.img boot-new.img)
6. Boot with boot-new.img (fastboot boot boot-new.img)
And here is when I'm getting into "QUALCOMM CrashDump Mode"
The same result if I build kernel from sources. Repacking boot.img with original kernel works, so problem is unlikely in magiskboot.
I'm trying to figure out the problem, but without kernel logs it's troublesome. Any ideas?
Thanks.
Hm... It looks like, I also have to update DTB. After that device boots successfully. Seems a bit strange to me. What's the difference in supported devices between blu_spark and stock kernel?
Ok, turned out AVB was enabled in the original device tree:
fsmgr_flags = "wait,slotselect,avb";
Switching it off fixes boot process.

Categories

Resources