[Q] Unpacking 14.4.A.0.108 boot.img - Xperia Z1 Compact Q&A, Help & Troubleshooting

Hey I tried to unpack the stock boot.img from the 14.4.A.0.108 firmware for a while now and I couldn't succeed.
Everytime I try to unpack it using an unpackbootimg binary freshly compiled from aosp-tree, I get this error:
Code:
Android boot magic not found.
I googled a bit about this problem, but I coudn't find the solution. Is there something sony is doing to prevent us from unpacking their bootimages and if yes, is there any way to bypass?
Thanks
EDIT:
I could solve the problem using FlashTool

Related

[Q] editing boot.img

i extracted the boot.img from my desire and run this script on it.
but it returns:
Code:
./unpack-bootimg.pl boot.img
Found a secondary file after the ramdisk image. According to the spec (mkbootimg.h) this file can exist, but this script is not designed to deal with this scenario.
i've been searching the internet for two days now and i cant find any other script that does that, only a tutorial for manually doing it with a hex editor, but that still doesn't cover that last file the script is complaining about.
any ideas?
p.s.: i need to modify boot.img because i'm trying to set up dual boot - android + android - for testing purposes, will post if successful
update:
i managed to extract kernel and ramdisk
first i tried booting kernel from fastboot, worked like a charm
then i tried booting kernel+ramdisk from fastboot - hangs on htc logo
i also tried compiling kernel+ramdisk into boot.img instuctions - again hangs on htc bootscreen
adb says no devices, fastboot detects it, but shows no ID, just ??????????
so apparently the last file in boot.img is important
any ideas?
i'm using cyangenmod7 btw

[DEV] Stock Blob Unpack Files for Developing

Just Starting the thread to share my work
Sharing is fun!!!!
Basically i used rayman and bumble bee
from the tf201 101 forums tools
and unpacked the stock jellybean ota blob file
So heres what else is being flashed
maybe we can discover things about this bootloader and partitions
and recovery its installing
it goes as follows
blob.LNX - boot.img
blob.SOS - recovery.img
blob.EBT - bootloader.bin
blob.pt-Partition info
you can actually rename boot.lnx to boot.img and unpack with unpackboot
Download
http://d-h.st/AvL
Thanks for your work!looking forward to it!

[TOOL][2013-12-20][SS/DS] Combine CWM with ANY kernel and ramdisk

Note: This tool requires a Linux environment to run. Tested only on Ubuntu 12.04
Please report any bugs that you found here!
This is a tool to pack CWM recovery with any kernel and ramdisk on Linux, for the Xperia M (and very likely the Xperia M Dual also, but you are advised to replace the kernel and ramdisk with the one for Xperia M Dual)
How to use:
Extract the files to any location
Place the kernel zimage as `workdir/kernel`
Write the kernel command line to `workdir/cmdline`
Place the ramdisk (must be in gzip format) as `workdir/boot/boot.gz`
Run the script `cwm-packer`
The boot image is created as `combined-boot.img`. Flash it with `fastboot flash boot combined-boot.img`
(For older versions before 2013-12-20 only) The kernel and ramdisk included is the stock C1905 kernel and ramdisk. CWM recovery is version 6.0.4.4 (same as this: http://forum.xda-developers.com/showthread.php?t=2480556)
Download:
View attachment cwm-packer-xperia-m-2013-12-20.tar.gz
(For older versions before 2013-12-20 only) https://docs.google.com/file/d/0B1i7Q5Isuy2JUWM1ZHhKcWQwR3M/edit?usp=sharing
Source code:
The tool itself is a shell script, it is the source code itself.
The CWM recovery is built using the source code on this thread: http://forum.xda-developers.com/showthread.php?t=2480556
(For older versions before 2013-12-20 only) The kernel and boot ramdisk is extracted from stock ROM.
Kernel source: https://github.com/alvinhochun/sony-xperia-m-kernel
Changelog:
2013-12-20
Updated to CWM 6.0.4.5
For whatever reason, mounting sdcard as USB storage now works.
Busybox mount now works like typical CWM
The kernel and boot ramdisk is not included
2013-10-19
Compiled with cm-10.2 sources, CWM 6.0.4.4
Major changes in partition table format to allow CWM 6.0.4.4
Allow mounting external USB storage (using OTG cable) so backup can be stored on USB flash drives
2013-10-15b
Fixed screen shift issue!
2013-10-15
Include the zimage of the stock kernel instead of the uncompressed kernel
2013-10-14
Updates init script
Recompiled recovery to use device-specific key mapping (camera focus key = back)
Click to expand...
Click to collapse
Notes: if anyone needs the older CWM 6.0.3.7 (2013-10-15b) for any reasons, you can find it in the "File" -> "Manage revisions" on Google Drive.
thank you so much bro :highfive:
it will be great you will build cwm for locked boot loader ..
we are waiting for that
jereMarfil24 said:
it will be great you will build cwm for locked boot loader ..
we are waiting for that
Click to expand...
Click to collapse
I just thought of a possible way to boot to recovery without modifying ramdisk, so it should not be long till I have a working CWM for you all.
Update: I decided not to work on CWM for locked bootloader, sorry.
Sent from my Sony Xperia M (C1905)
The recovery is updated. Please check the first post.
is this working for Locked Bootloader???
alvinhochun said:
I just thought of a possible way to boot to recovery without modifying ramdisk, so it should not be long till I have a working CWM for you all.
Sent from my Sony Xperia M (C1905)
Click to expand...
Click to collapse
sorry for my idiot question
is the tool support for installed cwm on Locked Bootloader???
Sorry, no, this tool is only useful for unlocked bootloader. Most likely useful to kernel developers to integrate CWM to their kernel (technically the boot image).
I said I thought of a way to put CWM to locked bootloader, well it would be a hacky way, may be unstable, and I will need quite some time to get it working. I also need testers who are not afraid of reflashing to factory state.
Sent from my Sony Xperia M (C1905)
Screen shift issue fixed. Please update the tool (replace recovery.gz)
I have updated this tool with CWM 6.0.4.4.
@alvinhochun please, could you make it for our Xperia ion? i'm not on linux so i cannot
here is stock kernel (sin file):
http://www.mediafire.com/download/gf6dmmgz38985f1/LT28h_6.2.B.0.211_kernel(2).sin
which offset should i use if i want to modify your tool to work with ICS/Miro..
Updated recovery to CWM 6.0.4.5
@alvinhochun
i m having error
[email protected]:~/cwm-packer$ '/home/ansebovi/cwm-packer/workdir/cmdline'
/home/ansebovi/cwm-packer/workdir/cmdline: line 1: androidboot.hardware=qcom: command not found
i m ending up on this error on ubuntu 13.10 x64
i did all kernel renaming.,boot.gz placing..but still having this..
so i tried ur old version which already having the kernel and boot.gz in it...still same error
please help me
ansebovi said:
@alvinhochun
i m having error
[email protected]:~/cwm-packer$ '/home/ansebovi/cwm-packer/workdir/cmdline'
/home/ansebovi/cwm-packer/workdir/cmdline: line 1: androidboot.hardware=qcom: command not found
i m ending up on this error on ubuntu 13.10 x64
i did all kernel renaming.,boot.gz placing..but still having this..
so i tried ur old version which already having the kernel and boot.gz in it...still same error
please help me
Click to expand...
Click to collapse
Nobody tells you to execute the `cmdline` file. You are supposed to run `cwm-packer`.
Sent from my Sony Xperia M (C1905)
alvinhochun said:
Nobody tells you to execute the `cmdline` file. You are supposed to run `cwm-packer`.
Sent from my Sony Xperia M (C1905)
Click to expand...
Click to collapse
got confused
aww really sorry...
my bad..
ty
now working
Hello,
I want to use the script to make the CWM recovery image but Im not sure how to get the kernel and ramdisk to use on script. Can anyone confirm if this process is right:
I copied kernel.sin from the ftf file, opened the file on flashtool under "tools->Sin editor->Extract data" this produced the file kernel.elf. Then using flashtool under "tools->extractors->elf" selected the kernel.elf file then pressed "unpack". After this process I ended with 2 files: "kernel.elf.Image" and "kernel.elf.ramdisk.gz".
These are the two files I can use with the script to produce the CWM recovery image? I guess the "kernel.elf.Image" contains the 2k header? Anyway, I can just use these files straight on the script and Im good to go?
Also Im not sure about the step n.3 on the instructions:
"3. Write the kernel command line to `workdir/cmdline`"
What you mean by "write the kernel command line" ?
Apreciate any clue on this!
[EDITED]
By the contents of 'wordir/cmdline' it seems it contains instructions for boot, so, no need to write anything but just use the provided 'cmdline' as it is? P.S. Im on Xperia M dual (C2004), but crossflashed a C1904 firmware on it.
Alright,
Everything went well using the files as I described.
I didn't found any CWM combined bootloader for the ROM I'm using (15.1.A.1.9) so I put it here attached in case it can be useful for someone in the future.
Thanks again for this script and CWM build !
[EDITED]
No, not much luck trying to upload the image, maybe cause Im a new user or something
building kernel from stock source
help me somebody please
i'm trying to build custom kernel for my xperia M dual
got sources from sony's website, doing build by guide
here is an error:
Code:
In file included from drivers/usb/gadget/android.c:51:0:
drivers/usb/gadget/f_qdss.c: In function 'qdss_bind_config':
drivers/usb/gadget/f_qdss.c:586:38: warning: argument to 'sizeof' in 'strncmp' call is the same expression as the second source; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
error, forbidden warning: f_qdss.c:586
make[3]: *** [drivers/usb/gadget/android.o] Error 1
make[2]: *** [drivers/usb/gadget] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2
is it an NDK version issue?
I'm running:
Code:
make -j8 ARCH=arm CROSS_COMPILE=/home/dev/MentorGraphics/Sourcery_CodeBench_Lite_for_ARM_GNU_Linux/bin/arm-none-linux-gnueabi-
thanks

[Q] Problems on Building CM-12 (GT-I8160)

Hi there! I'm trying to build CM-12 for GT-I8160 based on TeamCanjica's CM-11. Actually, it has been compiled successfully with some hacks (I skipped imgdiff). But it bricked my phone after I flashed it via CWM. :crying:
I've unbricked my phone by flashing my backup of stock boot partition (mmcblk0p15) to "Kernel" partition via Heimdall. Then, my phone showed CM boot animation for a long time. (bootloop I think, maybe because of stock boot partition isn't compatible with it). And I use stock firmware for now.
I found that type of the boot partition (mmcblk0p15) of the stock differ with boot.img I've built.
Code:
$ file mmcblk0p15-boot (my backup of stock boot partition)
mmcblk0p15-boot: Linux kernel ARM boot executable zImage (little-endian)
$ file boot.img (boot.img I've extracted from cm-12-20141217-UNOFFICIAL-codina.zip)
boot.img: Android bootimg, kernel (0x40008000), ramdisk (0x41000000), page size: 4096
So, what are "Linux kernel ARM boot executable zImage" and "Android bootimg"? Where is the root partition (ramdisk) stored?
Is it okay to skip imgdiff? I think imgdiff is just for creation of OTA package. Am I correct?
I also found boot.img in out/target/product/codina (not in the zip file) which type is Linux kernel ARM boot executable zImage.
Is it the correct boot.img? I found that the content of that file is same with kernel file I found in the same folder. I'm afraid that the ramdisk is not included in it.
Sorry for my English n thank you very much.
Oh. All people wants to have cm12, but still 0 replies here.
I'm sorry, I can't help in this too... /
S.AMU said:
Oh. All people wants to have cm12, but still 0 replies here.
I'm sorry, I can't help in this too... /
Click to expand...
Click to collapse
Hi! It's okay, I've flashed out/target/product/codina/boot.img + gapps. It booted to CM-12 , freezed at the welcome screen n refused to boot again after I force-rebooted it :crying:. Unfortunately, ADB & recovery didn't work, so I didn't know much why it got freezed. Maybe I have to figure out how to compile a nice kernel with working ADB & recovery. Hahaha...

Question How do I unpack the images from super.img?

I downloaded a samsung galaxy s22 Odin firmware and unpacked the zip and the AP tar file and then I un lz4'd the super.img, unsparsed it and then I ran lpunpack on the unsparsed image to get unreadable images
Have you used one of the following?
Extract system.img,vendor.img and product.img from super.img
After lots of search i found a way to extract those img file from super.img What is need? 1.Computer with linux os. extract zip file from this post and place your super.img in same location where you extract.. then run below cmd... simg2img...
forum.xda-developers.com
super_img_lpmake_lpunpack.zip | by MrWaehere for Utilities
Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.
androidfilehost.com
ze7zez said:
Have you used one of the following?
Extract system.img,vendor.img and product.img from super.img
After lots of search i found a way to extract those img file from super.img What is need? 1.Computer with linux os. extract zip file from this post and place your super.img in same location where you extract.. then run below cmd... simg2img...
forum.xda-developers.com
super_img_lpmake_lpunpack.zip | by MrWaehere for Utilities
Download GApps, Roms, Kernels, Themes, Firmware, and more. Free file hosting for all Android developers.
androidfilehost.com
Click to expand...
Click to collapse
I have. I can get system.img out but I can't open it. I think it's a f2fs partition but I haven't found any tools that can extract files from it
It seems on newer firmware this method of unpacking and extracting system.img out of super.img no longer works. It seems now that when you extract system.img from super.img.raw it gives you a file that reads just as data and does not have the ext4 filesystem magic header bytes.
Have uploaded two screenshots to show how super.img.raw looks and how system.img looks after extraction from super.img. Any thoughts on this?
This firmware is being pulled from latest tar files for SM-S901U
Update, am working on a way and almost got it now. Will probably create a post on this once done and link from here. If you dont hear back from me, i failed. :'(
UPDATE: had some luck following this guys tutorial although a little different was able to extract files. Still cant mount but much closer. Device is f2fs file system. The reason it's not working is most methods on xda are for ext4
How to Extract F2FS Image from Android Device Flash - Baremetallics
How to Extract F2FS Image from Android Device Flash
baremetallics.com
kalexander7 said:
Update, am working on a way and almost got it now. Will probably create a post on this once done and link from here. If you dont hear back from me, i failed. :'(
UPDATE: had some luck following this guys tutorial although a little different was able to extract files. Still cant mount but much closer. Device is f2fs file system. The reason it's not working is most methods on xda are for ext4
How to Extract F2FS Image from Android Device Flash - Baremetallics
How to Extract F2FS Image from Android Device Flash
baremetallics.com
Click to expand...
Click to collapse
Is this also work for other's like erofs?
Mr Hassan said:
Is this also work for other's like erofs?
Click to expand...
Click to collapse
I doubt it although it may be alike using same linux tools like fsck. Erm I'm still stuck on trying to get this f2fs image too mount. It seems corrupt and although I was able to extract libs and apks they're coming out corrupted. Anyone in the community have any knowledge in this area?
kalexander7 said:
I doubt it although it may be alike using same linux tools like fsck. Erm I'm still stuck on trying to get this f2fs image too mount. It seems corrupt and although I was able to extract libs and apks they're coming out corrupted. Anyone in the community have any knowledge in this area?
Click to expand...
Click to collapse
Bro samsung have many dev's to mount fsf2 and already many dude done
The erofs not possible
Mr Hassan said:
Bro samsung have many dev's to mount fsf2 and already many dude done
The **** is erofs
Click to expand...
Click to collapse
what?

Categories

Resources