[HELP]Corrupt boot img - Android Q&A, Help & Troubleshooting

Hello guys I have Alcatel One Touch 918n. I was trying to make a custom rom for the device. It is an armv6 device running on Android 2.3.6 . But for complete building and tweaks I need full stock rom which is not available on internet. So I decided to use cwm backup. I have a cwm v5.0.2.8 port for my device but I think it does not properly image the boot.img. as far as I know boot.img has zimage and ramdisk folder. Ramdisk has many tweaks associated with it. But my boot img contains zimage but no ramdisk. Also if I restore the boot.img it causes bootloop. So everytime I have to use advanced restore and restore all other img separately. Any solution so that I can fix the boot img

Related

The boot image

Hi.
I my self are using and building for the HTC Desire and similar devices. However I have a friend who has the Galaxy s2 and wanted an ICS ROM on he's device. I found a ROM from in here, but I needed to change something in ramdisk to get UMS working.
I found that unlike my own phone, this one had 3 parts in the boot.img. The kernel, ramdisk and something else.
Does anyone have any idea what this something else is? How to split the boot.img and of cause how to put it assemble it again?
I search google and found someone saying that I should ignore this 3 part. I tried that and broke not only the ROM, but also the recovery.
This takes me to the second question. Where does the S2 store the recovery? When flashing a new ROM on any Samsung device, I end up with a different recovery to? Last time I made a nandroid backup, flashed a ROM that did not work, could not recover because the backup was made with a newer recovery version than the one flashed along with the ROM.
dk_zero-cool said:
Hi.
I my self are using and building for the HTC Desire and similar devices. However I have a friend who has the Galaxy s2 and wanted an ICS ROM on he's device. I found a ROM from in here, but I needed to change something in ramdisk to get UMS working.
I found that unlike my own phone, this one had 3 parts in the boot.img. The kernel, ramdisk and something else.
Does anyone have any idea what this something else is? How to split the boot.img and of cause how to put it assemble it again?
I search google and found someone saying that I should ignore this 3 part. I tried that and broke not only the ROM, but also the recovery.
This takes me to the second question. Where does the S2 store the recovery? When flashing a new ROM on any Samsung device, I end up with a different recovery to? Last time I made a nandroid backup, flashed a ROM that did not work, could not recover because the backup was made with a newer recovery version than the one flashed along with the ROM.
Click to expand...
Click to collapse
The recovery (mode) is part of the kernel.
If you have issues with a broken recovery, just flash another kernel containing a (CWM) recovery, such as CF-Root, Siyah, SpeedMod, N.E.A.K., etc.
P.S.: You can use Mobile Odin app from Chainfire to flash new (stock) ROMs, kernels, modems, CSCs, etc.
Good luck !
dk_zero-cool said:
Hi.
I my self are using and building for the HTC Desire and similar devices. However I have a friend who has the Galaxy s2 and wanted an ICS ROM on he's device. I found a ROM from in here, but I needed to change something in ramdisk to get UMS working.
I found that unlike my own phone, this one had 3 parts in the boot.img. The kernel, ramdisk and something else.
Does anyone have any idea what this something else is? How to split the boot.img and of cause how to put it assemble it again?
I search google and found someone saying that I should ignore this 3 part. I tried that and broke not only the ROM, but also the recovery.
This takes me to the second question. Where does the S2 store the recovery? When flashing a new ROM on any Samsung device, I end up with a different recovery to? Last time I made a nandroid backup, flashed a ROM that did not work, could not recover because the backup was made with a newer recovery version than the one flashed along with the ROM.
Click to expand...
Click to collapse
recovery is in sdcard/clockworkmod/backup or sdcard/external_sd/clockworkmod/backup .. if you did a backup with CWM
UMS is already supported in ICS, and with LP4 and Siyah kernel (newest) usb mass storage is supported in recovery mode also
Eudemony said:
recovery is in sdcard/clockworkmod/backup or sdcard/external_sd/clockworkmod/backup .. if you did a backup with CWM
UMS is already supported in ICS, and with LP4 and Siyah kernel (newest) usb mass storage is supported in recovery mode also
Click to expand...
Click to collapse
UMS is supported yes, but not always enabled. The ROM's I tried had MTP set instead. The newest CM9 has UMS as default now, but right now I'm just interested in how the boot.img works on these devices.
I use recoveries as backup system when the other fails. Having recovery depend o the regular boot.img is not very useful. Having the recovery console change on regular ROM flash is not helpful either.
The recovery and regular ROM should not have anything to do with one another.
But about the boot.img
How do I split an re-essamble it?
dk_zero-cool said:
UMS is supported yes, but not always enabled. The ROM's I tried had MTP set instead. The newest CM9 has UMS as default now, but right now I'm just interested in how the boot.img works on these devices.
I use recoveries as backup system when the other fails. Having recovery depend o the regular boot.img is not very useful. Having the recovery console change on regular ROM flash is not helpful either.
The recovery and regular ROM should not have anything to do with one another.
But about the boot.img
How do I split an re-essamble it?
Click to expand...
Click to collapse
ok think i am starting to understand .. here are the facts
1. to activate UMS instead of MTP go to settings > more... >USB utilites >connect mass storage to PC
2. Use clockwork recovery not stock recovery for backup purposes .. even if you cant restore because of a different recovery (which I havent found yet! but heard of) you can always flash the original insecure kernel and recover as that will have the version of clockwork recovery you used .. even if the phone doesnt boot up (boot loops) as you can still get into recovery mode using the 3 button method
3 ok this is what you want to know about .. but problem is i dont think you are using the right terminology maybe?
are you talking about a stock rom tar?
this comes with these files
boot.bin
cache.img
factoryfs.img
hidden.img
modem.bin
param.lfs
sbl.bin
zimage
or a clockwork recovery image zip
which comes with these files
modem.bin
zimage
edit: ok i found the boot.img in the clockwork recovery backup i have
this has the files
boot.img
nandroid.md5
cache.ext4.tar
data.ext4.tar
system.ext4.tar
if you chanage the boot.img then i assume the md5 will fail therefore not restore
you will need to generate a new md5 for the boot.img then insert that line into nandroid.md5 with notepad++ then it "should" work
dk_zero-cool said:
UMS is supported yes, but not always enabled. The ROM's I tried had MTP set instead. The newest CM9 has UMS as default now, but right now I'm just interested in how the boot.img works on these devices.
I use recoveries as backup system when the other fails. Having recovery depend o the regular boot.img is not very useful. Having the recovery console change on regular ROM flash is not helpful either.
The recovery and regular ROM should not have anything to do with one another.
But about the boot.img
How do I split an re-essamble it?
Click to expand...
Click to collapse
Ok. I do not know everything about boot.img but i will share what i know maybe somebody else will help us
All. kernel ramdisk and recovery mode is in the same partition mmcblk0p5 witch is not good at all but it is how it is then we have mmcblk0p6
what is called recovery partition and i9100 seems to not use this partition never ever. So when you flash new kernel you have new recovery as well and when you mess up with this kernel you do not have recovery mode as well lol
The first boot i tried to figure out was Siyah kernel i found in my phone very interesting script /sbin/ext/install.sh
[email protected]: # read_boot_headers /dev/mmcblk0p5
boot_offset=9397;boot_len=2480;recovery_offset=11877;recovery_len=2114;
we have something whats called 'boot offset' and its lenght. And then install.sh gets it out and save its as a payload
in /res/misc folder. Thats how it looks like
[email protected]: # dd skip=9397 count=2480 if=/dev/mmcblk0p5 of=boot.img.tar <--why tar? i know that from install.sh
then unpack the file and we have some apps and su file
res/misc/payload/CWMManager.apk.xz
res/misc/payload/Superuser.apk.xz
res/misc/payload/su.xz
res/misc/payload/ntfs-3g.xz
zcat'ed files but it is not a boot ramdisk and kernel what i was looking for
then i did the same with recovery offset
[email protected]: # dd skip=11877 count=2114 if=/dev/mmcblk0p5 of=recovery.img.xz <--why .zx? again from install.sh
xzcat recovery.img.xz > recovery.tar
and what inside? This
res/images/icon_installing_overlay01.png
res/images/icon_installing_overlay05.png
....
res/images/progress_fill.png
res/images/icon_installing_overlay06.png
sbin/e2fsck
sbin/killrecovery.sh
sbin/sdparted
sbin/recovery-samsung
sbin/fota.png
sbin/tune2fs
sbin/redbend_ua
sbin/parted
sbin/fix_permissions
sbin/mke2fs
not recovery. just some images and files. Then i started think what is before that boot offset its almost 5MB of data?
So there is a kernel and ramdisk all packed by LZMA offset 8400 up to this phrase:
BOOT_IMAGE_OFFSETSboot_offset=9397;boot_len=2480;recovery_offset=11877;recovery_len=2114
witch is end offset = 4810754 This is not a real end its mor than but im sure for now it is all length of file. Nothing is missing. Enough to unpack, Then we are able to extract it using my favourite dd
[email protected]: # dd if=/dev/mmcblk0p5 of=ramdisk.cpio.lzma skip=8400 count=4810754 bs=1
[email protected]: # unlzma ramdisk.cpio.lzma and this is not ramdisk yet lol
file what we have now is call ramdisk.cpio and thats what is there:
on a very begining ofsett 00000 D3 F0 21 E3 <---that i a kernel i think up to begining of CPIO
CPIO offset 30554 <-- 07070
TRAILER!!! + 00 00 00 00 offset 5,691,619
[email protected]: # dd if=ramdisk.cpio of=real-rd.cpio skip=30554 count=5691619 bs=1
And now we have ramdisk
There is one more gziped file offset 11339924 it is the same what is in /proc somewhere
Then i gave up cos im not able to repack this ramdisk by LZMA original is starting of 5D 00 00 00 04
but my its always ends with different digit but never 4

[Q] How to Flash custom Kernel on Allwinner A10 tablet ?

I made zImage, uImage and modules without getting any errors but how to flash them to the device?Using adb? making boot.img making cwm zip how to pack them?
HTML:
http://www.slatedroid.com/topic/34172-kernel-compile-a10/
arunmcops said:
I made zImage, uImage and modules without getting any errors but how to flash them to the device?Using adb? making boot.img making cwm zip how to pack them?
HTML:
http://www.slatedroid.com/topic/34172-kernel-compile-a10/
Click to expand...
Click to collapse
I wanted to do the same, but apparently you have to create a whole firmware image (as in here--> https://www.miniand.com/wiki/Allwinner/Unpacking+and+building+LiveSuit+images)
I've been trying to create an image for a $rand A10 tablet, but as soon as I flash it the tablet will not boot anymore. Dunno wth is happening.

Need help with porting a rom

i have tried many different instructions on how to port a rom. i have the stock rom of my device and i have the rom i want to port. my stock rom uses spflash tools to gain root. and flash custom recovery. but the port files in the zip file has far less items . in my stock rom it has everything in img files its got
MY STOCK ROM for BLU_S0130UU
boot.img
boot verifired.img
recovery.img
recovery verified.img
ramdisk-recovery.img
ramdisk.img
secro-verified.img
secro.img
system.img
chache.img
lk-verified.bin
lk.bin
and the port rom
touchwiz s6 mtk6753
boot.img
system folder
meta-inf folder.
thats it
anyways i have tried to follow the word for word of the how to port a custom rom .
but cant seem to make it work.
when i install the zip with twrp i get error 6 i think its got to do something with the metadata file and the build prop. but im lost at this point.
both phones are identical chipset mt6753 both kernel are 3.10.65 and pretty much all idectical specs.
if i give the 2 roms to someone do you think you could try to make this work for me.

Convert temporary CWM zip into permanent (modifying boot.img)

Hi all! I need help replacing stock recovery from boot.img with the one contained in the CWM.zip file.
A little introduction:
I just want to install CWM onto miy device (Samsung Galaxy Young TV, S5367, Broadcom BCM21553 chipset) which has no CWM/TWRP recovery made.
This device have the kernel and recovery into one partition (boot) which I can modify by unpacking&repacking the boot.img and flashing through Odin.
The problem is, that only one CWM was made for this device, and it's usable as a temporary session (flashing CWM.zip through stock recovery).
I want to replace the stock recovery contained into the boot's ramdisk with the one in cwm.zip, but how can I do that? I've tried just replacing the files but obviously it didn't work (CWM recovery boots, but shows a lot of mounting-related errors).
Any help is appreciated!

Making custom boot.img for MTK 6577 device.

Hello all,
I have a question about flashing Lenovo IdeaTab A1000LF (MTK6577 device). I would like to add busybox into initramfs and slightly change init strategy. boot.img from official ROM A1000LF_A412_01_05_130705_USER_DCC was unpacked with abootimg from Fedora repo. I added busybox for armv7l into initramfs/sbin and packed it again with the same tool. New boot.img was flashed into device with Flash Tools 3 (works on virtual machine with Win7) in Firmware Update mode with DA DL All With check sum option. Download mode did not work (there was errors in scatter file, __NODL_FAT partition exactly). Tablet was starting after flashing fow a few seconds. First boot logo was shown and then reboot again. Everything seems to work fine in case of flashing original boot.img. There might be some problems with Checksums or packing/unpacking initramfs (even if I create new boot.img without changes, tablet will not boot correctly). Do you have any ideas?
P.S. I didn't find suitable general thread for such kind of devices and tasks. Maybe you can suggest something.

Categories

Resources