[Q] Unpack and Pack boot image - HTC One V

Hi All
I built a Windows application that packs/unpacks the boot.img. I extracted the boot.img using clockworkmode. Over the internet I found that boot.img start with an header that the first 8 chars are: ANDROID!. How ever analyzing the file I found that the ANDORID! is in offest of 256 bytes ( 0x100 ) from file start . Does any one know what is this extra bytes ? Anyway using my unpack I break down the boot.img to its components and extructing the ramdisk shows the expected files that compose the ramdisk. I packed the components back and tried to flash the boot.img using flashboot but than I got the message "bootmagic check fail". Any help of how to solve this and what is the extra 256 bytes at start of the boot.img is appriciated
Thanks

Hi
Take a look at the dsixda kitchen sources
Guess you can find more info about the boot images there
max

Please ask all questions in the Q&A section. Thread moved there.

Related

unpacked and repacked boot.img (boot.img-kernel and rooted.img?)

Hey!
So I unpacked and repacked the boot.img 8 MB on Linux and it made two .img files boot.img-kernel 3,9 MB and rooted.img 4,3 MB So Do I have to use both of them? can I just repack them to one file boot.img?
I followed this guide to make insecure boot.img:
http://www.mydroidworld.com/topic/9778-how-to-create-an-insecure-boot-image/
what to do? how to flash both of them? (via CWM)
Please help!

adb question

im in adb in cmd prompt im at the stage where my htc one m8 as the grey htc logo ive renamed the stock file to firmware.zip as per instructions when i type fastboot flash zip firmware .zip i get this message target reported max download size of 1830711296 bytes what am i missing with this im on windows 8.1. any help would be great ive been looking and reading for hours

unable to flash factory image

I am unable to flash the factory image for 5.1 for my lte tablet, I tried redownloading the factory image several times:
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
failed to allocate 846100724 bytes
error: update package missing system.img
Press any key to exit...
You can try to unpack the factory image, up to the point where you find eg. boot.img, system.img.
I guess that you know how to use ADB and FASTBOOT and already have everything you need inside your eg. Android folder.
1) copy the bootloader, boot.img , system.img inside your "Android folder" ( the folder which contains ADB, FASTBOOT )
2) flash the bootloader ( make sure to type in the right name )
3) flash boot.img , system.img
Restart the device and have fun :good:
So.... I manually flashed the 5.1 for my wifi Nexus 7 2013 and it the first boot is going on 15 minutes with the swirling color dots. I know the first boot I was told will be long... But 15 minutes or more? When should I start to think something is wrong?
Sent from my VS985 4G using XDA Free mobile app

HTC One M9 - can't flash

Hi all,
so just to say first that
my phone is s-off
the cid is SPCS_001
the radio is [email protected]
the OS is 3.33.90651.2 (Although there is no OS..?)
So I tried flashing the marshmallow update, and I had some other problems I fixed, but I can't figure this out
So in download mode, my sd card won't mount, i formatted it ext4 in twrp, don't know if that makes a difference..
And so I tried flashing the firmware through fastboot and got this:
fastboot update update.zip
target reported max download size of 800000000 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.img'
archive does not contain 'system.img'
I have the system.img seperate but I can't transfer it to my phone or SD card due to the file size of 4.37GB.
EDIT: I tried flashing system.img and boot.img, system.img gave me this error:
fastboot flash system system.img
target reported max download size of 800000000 bytes
Invalid sparse file format at header magi
Any help would greatly be appreciated.. thank you.
any resolution to this?
Same question...any resolution?
TheMonDon said:
Hi all,
so just to say first that
my phone is s-off
the cid is SPCS_001
the radio is [email protected]
the OS is 3.33.90651.2 (Although there is no OS..?)
So I tried flashing the marshmallow update, and I had some other problems I fixed, but I can't figure this out
So in download mode, my sd card won't mount, i formatted it ext4 in twrp, don't know if that makes a difference..
And so I tried flashing the firmware through fastboot and got this:
fastboot update update.zip
target reported max download size of 800000000 bytes
archive does not contain 'boot.sig'
archive does not contain 'recovery.img'
archive does not contain 'system.img'
I have the system.img seperate but I can't transfer it to my phone or SD card due to the file size of 4.37GB.
EDIT: I tried flashing system.img and boot.img, system.img gave me this error:
fastboot flash system system.img
target reported max download size of 800000000 bytes
Invalid sparse file format at header magi
Any help would greatly be appreciated.. thank you.
Click to expand...
Click to collapse
schergr said:
Same question...any resolution?
Click to expand...
Click to collapse
This is kinda old, but I believe, its because the latest twrp doesn't work.

Really Bricked m9... Please Pro help required.

My M9 suddenly hang und went off... so ok i rebooted. but after boot animation off again.
i can boot into recovery and bootloader and download, but nothing else. ruu fails on pc and on sd. twrp shows system partition as 0Mb. i think something fckd up partition tables or so. i think i need a real pro to get this baby running again or at least to make it look like stock for return. if i try to flash stock recovery in download mode it says finished but still twrp on it. please please help me.
I was running Leedroid rom plus kernel.
device ist supercid and soff
nobody?? :'(
Sashtheflash said:
My M9 suddenly hang und went off... so ok i rebooted. but after boot animation off again.
i can boot into recovery and bootloader and download, but nothing else. ruu fails on pc and on sd. twrp shows system partition as 0Mb. i think something fckd up partition tables or so. i think i need a real pro to get this baby running again or at least to make it look like stock for return. if i try to flash stock recovery in download mode it says finished but still twrp on it. please please help me.
I was running Leedroid rom plus kernel.
device ist supercid and soff
Click to expand...
Click to collapse
Weird. Since you have TWRP, flashing a new ROM sounds like the best option. Maybe a full wipe beforehand? As long as you use a ROM that matches your firmware, it should work.... in theory, at least.
computerslayer said:
Weird. Since you have TWRP, flashing a new ROM sounds like the best option. Maybe a full wipe beforehand? As long as you use a ROM that matches your firmware, it should work.... in theory, at least.
Click to expand...
Click to collapse
since my phone cant find an internal memory i cant flash anything... i think partition tables are ****ed up or so. fastboot flash recovery ends in old state locking bootloader via fastboot results in bootloader still open.
Never had a problem like that and im here since the g1
Yikes. I'm afraid I don't have any further advice. Are there any threads around the M9 forums that talk about corrupted partitions?
Hello, please see my answer on pm regarding help.
Until then, please boot into TWRP and connect to adb and run cat /proc/emmc to get a listing of partitions and their sizes.
Then head over to my firmware thread, find the link to my partition table document and compare with yours. Output should be 100% identical, if not, you're right about your suspicion.
I rather assume you've got a permission / security issue which renders some partitions inaccessible. I doubt they're actually broken.
Please also make sure you always leave precise and concise info on what steps you tried and what the outcome was. This will help keep this short and helpful for others too.
Sneakyghost said:
Hello, please see my answer on pm regarding help.
Until then, please boot into TWRP and connect to adb and run cat /proc/emmc to get a listing of partitions and their sizes.
Then head over to my firmware thread, find the link to my partition table document and compare with yours. Output should be 100% identical, if not, you're right about your suspicion.
I rather assume you've got a permission / security issue which renders some partitions inaccessible. I doubt they're actually broken.
Please also make sure you always leave precise and concise info on what steps you tried and what the outcome was. This will help keep this short and helpful for others too.
Click to expand...
Click to collapse
unfortunately my device wont let me boot in recovery again... now it states: Failed to boot to recovery mode Press Volume up to back to menu.
seems my tries to flash single parts of firmware messed this up
Ok please keep it safe now. Don't do anything else to it for the time being. I can try to connect to it via team viewer tomorrow if you allow me into your machine.
What is your time zone? Will you be having time tomorrow afternoon/evening my time? I'm located in GMT +1 (Germany).
Sneakyghost said:
Ok please keep it safe now. Don't do anything else to it for the time being. I can try to connect to it via team viewer tomorrow if you allow me into your machine.
What is your time zone? Will you be having time tomorrow afternoon/evening my time? I'm located in GMT +1 (Germany).
Click to expand...
Click to collapse
Im from Germany, too ( Heilbronn) Ok i leave my fingers from it until tomorrow. Thank you a lot for trying !!!
im have also m9 dead after flash now my phone read on pc qload any one have idea to rework my phone again ?
logy122 said:
im have also m9 dead after flash now my phone read on pc qload any one have idea to rework my phone again ?
Click to expand...
Click to collapse
Yeah yours is a real brick while the OP's phone is more likely damaged NAND. Two very different things.
QHUSB on your PC when you connect it means you've managed to actually brick it.
For this, you'll need to open the phone and connect it to some special tool like the riff jtag box and rewrite the corrupted bootloader.
@Tecardo can do this for you in Germany. I'm not sure where you are but Tec has all the equipment and skills needed to fix that.
Sneakyghost said:
Yeah yours is a real brick while the OP's phone is more likely damaged NAND. Two very different things.
QHUSB on your PC when you connect it means you've managed to actually brick it.
For this, you'll need to open the phone and connect it to some special tool like the riff jtag box and rewrite the corrupted bootloader.
@Tecardo can do this for you in Germany. I'm not sure where you are but Tec has all the equipment and skills needed to fix that.
Click to expand...
Click to collapse
im also can open phone and replace emmc |> im only need boot file to write to phone and back to work
Yes you need to rewrite aboot. That's only possible with a jtag box and maybe, maybe, under Linux because the qhusb connection has no stable functioning driver on Windows. It's almost impossible to flash anything via qhusb on Windows. It could work in Linux though. I remember having had a half-stable connection to my HTC One S this way, back in 2012. I managed to rewrite the hboot back then. But afaik that never worked on the M7,8,9...
Gesendet von meinem HTC 10 mit Tapatalk
I don't want to start a new thread. I have a similar problem. I have an HTC one M9 S-OFF Unlocked. I returned my phone to stock after doing a nandrod backup. I realised I had a sms backup in the nandroid that I need so I thought I would install twrp and do a restore the nandroid. I installed twrp and afterward it bootlooped when I went to recovery mode. It goes from white HTC screen to black screen an back. I tried to go to download mode to do a fresh install but it bootloops there as well. It also bootloops if I try to turn it off with it connected to power. I have tried installing different version of twrp but I get the same problem. If I install a stock recovery it says failed to boot to recovery mode and stays on the white HTC screen. Does anyone know of a solution
Best way is to flash a RUU.
after, for your nandroid backup, flash twrp (same version you have made the backup) and don't accept supersu at the end if proposed...
bzhmobile said:
Best way is to flash a RUU.
after, for your nandroid backup, flash twrp (same version you have made the backup) and don't accept supersu at the end if proposed...
Click to expand...
Click to collapse
I get the following when I fastboot flash rom "fastboot flash rom /Users/.../Android/OPJAIMG.zip
target reported max download size of 536870912 bytes
Invalid sparse file format at header magi
error: write_sparse_skip_chunk: don't care size 1546750189 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 1013258477 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 474585325 is not a multiple of the block size 4096
sending sparse 'rom' (521267 KB)...
error: write_sparse_skip_chunk: don't care size 1546750189 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 1546750189 is not a multiple of the block size 4096
OKAY [ 15.122s]
writing 'rom'...
FAILED (remote: partition table doesn't exist)
finished. total time: 15.140s"
Sneakyghost said:
Yes you need to rewrite aboot. That's only possible with a jtag box and maybe, maybe, under Linux because the qhusb connection has no stable functioning driver on Windows. It's almost impossible to flash anything via qhusb on Windows. It could work in Linux though. I remember having had a half-stable connection to my HTC One S this way, back in 2012. I managed to rewrite the hboot back then. But afaik that never worked on the M7,8,9...
Click to expand...
Click to collapse
It was also possible w/Linux on the One XL. I too have never heard of it working on the M7 and later phones, though I've seen the odd post here claiming it is possible. No examples of anyone having done it, however.
copy the OPJAIMG.zip on the root of your Sdcard and reboot in the booloader and follow the instructions (vol +)...
or
with htc_fastboot
download Htc_fastboot.exe et copy it in your fastboot folder with the OPJAIMG.zip
fastboot oem lock , not needed if you're S-OFF
fastboot oem rebootRUU , to reboot
htc_fastboot flash zip OPJAIMG.zip
fastboot reboot
don't forget to unlock again youre device
djkfree said:
I get the following when I fastboot flash rom "fastboot flash rom /Users/.../Android/OPJAIMG.zip
target reported max download size of 536870912 bytes
Invalid sparse file format at header magi
error: write_sparse_skip_chunk: don't care size 1546750189 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 1013258477 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 474585325 is not a multiple of the block size 4096
sending sparse 'rom' (521267 KB)...
error: write_sparse_skip_chunk: don't care size 1546750189 is not a multiple of the block size 4096
error: write_sparse_skip_chunk: don't care size 1546750189 is not a multiple of the block size 4096
OKAY [ 15.122s]
writing 'rom'...
FAILED (remote: partition table doesn't exist)
finished. total time: 15.140s"
Click to expand...
Click to collapse
bzhmobile said:
copy the OPJAIMG.zip on the root of your Sdcard and reboot in the booloader and follow the instructions (vol +)...
or
with htc_fastboot
download Htc_fastboot.exe et copy it in your fastboot folder with the OPJAIMG.zip
fastboot oem lock , not needed if you're S-OFF
fastboot oem rebootRUU , to reboot
htc_fastboot flash zip OPJAIMG.zip
fastboot reboot
don't forget to unlock again youre device
Click to expand...
Click to collapse
I get bootloop when I fastboot oem rebootRUU
So,
go to download mod (option in the bootloader ) and apply the fastboot command
htc_fastboot flash zip OPJAIMG.zip

Categories

Resources