[Q] How to create boot.img - Xperia Z Q&A, Help & Troubleshooting

Hi @all,
does anyone know how to create the boot.img to flash it over fastboot?
When I extract the kernel.sin from a FTF and try to flash it over fastboot it doesn´t work.
Thanks.
Greetings
UserX10

Why do you want to do that? Just flash kernel.sin via flashtool.

pandaball said:
Why do you want to do that? Just flash kernel.sin via flashtool.
Click to expand...
Click to collapse
For sure this is possible, but on this way I haven't learned anything
But I found after some search that I have to extract the system.sin to system.ext4 and just rename the system.ext4 to system.img
I assume that this is working the same way with kernel.sin
Will try it tomorrow...

That will only work if you're unlocked. You can just take the ftf, open it in flashtool and exclude everything except the kernel. That will flash just the kernel.

How to create boot.img Android
If you really want to learn then you should be reading reading reading.

http://forum.xda-developers.com/showthread.php?t=2139498
Sent from my C6603 using xda premium

gm007 said:
http://forum.xda-developers.com/showthread.php?t=2139498
Sent from my C6603 using xda premium
Click to expand...
Click to collapse
The thread you linked is about compiling a kernel from source, rather than converting a .ftf file to a .img file.
Easiest method to do this is to use flashtool, and dd the boot partition to /sdcard/boot.img
I don't know what the boot partition is though, but the command is either:
dd if=/path/to/boot of=/sdcard/boot.img bs=2048
or
dd if=/path/to/boot of=/sdcard/boot.img bs=4096
The boot.img you get on your sdcard is now flashable through fastboot and a direct copy of your currently installed kernel.

Thanks,
have done as described ftf -> sin -> ext4 and rename to img
flashed over fastboot worked
When I try to flash the same way the system I get the following error:
error: cannot load 'system.img'
anyone an idea?

Related

Flashing boot.img with terminal emulator

Hi
I'm on pacman 0726 and I'm trying to flash the boot.img from the 0716 build.
I did flash_image recovery /sdcard/boot.img
But it says Failed with error: - 1
I compared the md5's so the file is not corrupted. I can't use fastboot because I don't have access to a computer for a couple of days. Thanks for any input!
What if you create a new flashable zip with the 0716 img inside the 0726 zip, overwriting previous img file? And then flashing the modded zip on recovery.
DrKrFfXx said:
What if you create a new flashable zip with the 0716 img inside the 0726 zip, overwriting previous img file? And then flashing the modded zip on recovery.
Click to expand...
Click to collapse
I can't because 0726 has no recovery :/
Did you typed:
su
mount/sdcard
flash_image boot /sdcard/boot.img
Sent from my C6603 using xda premium

[Q] How to extract system_signed of the RAZR i firmware?

Hy everybody,
I need a small help. I'd like to extract stock system apks placed in /system/app but I don't succed.
On the normal RAZR XT910 I use RSD or a zip extractor (winrar, winzip, etc.) to divide a stock firmware in system_signed, mbr_signed, motoboot, cdrom_signed, boot_signed and other files, then i can extract system_signed using Ext2explore to have a copy of the stock system folders,
On the RAZRi XT890 firmwares 4.1.2 this procedure doesn't work, when i try to extract system_signed,Ext2explore sometimes doesn't read the archive without any response or other times it stops working.
Thanks for helping.
bobby3 said:
Hy everybody,
I need a small help. I'd like to extract stock system apks placed in /system/app but I don't succed.
On the normal RAZR XT910 I use RSD or a zip extractor (winrar, winzip, etc.) to divide a stock firmware in system_signed, mbr_signed, motoboot, cdrom_signed, boot_signed and other files, then i can extract system_signed using Ext2explore to have a copy of the stock system folders,
On the RAZRi XT890 firmwares 4.1.2 this procedure doesn't work, when i try to extract system_signed,Ext2explore sometimes doesn't read the archive without any response or other times it stops working.
Thanks for helping.
Click to expand...
Click to collapse
Hey,
try unyaffs tool
First, wrong section. This belongs in the q&a.
Back to topic. The system.IMG has an ext4 file system. Mount it in Ubuntu with a mount loop methode. Don't know the exact words for it, sry.
Sent from my XT890 using xda app-developers app
Doesn't work
Thanks (and thanks to moderator) but these methods doesn't work.
Using system_signed of RAZRi unyaffs tool gives me an error response, "mount" on linux does nothing.
Using system_signed of RAZR XT910 instead works fine with ext2explore, with unyaffs tool and mounting in ubuntu but i need to extract RAZRi system_signed.
bobby3 said:
Thanks (and thanks to moderator) but these methods doesn't work.
Using system_signed of RAZRi unyaffs tool gives me an error response, "mount" on linux does nothing.
Using system_signed of RAZR XT910 instead works fine with ext2explore, with unyaffs tool and mounting in ubuntu but i need to extract RAZRi system_signed.
Click to expand...
Click to collapse
Than u still didnt look good enough. But ok, i have done it now for you
Download the script in the attachment. The simg2img.py.zip and extract it.
Uncompress the system.img file into a normal ext4 disk image:
‘python simg2img.py system_signed tmp.img’
This will create an uncompressed ext4 volume ‘tmp.img’ in the same directory
Mount this disk image:
‘sudo mount -t ext4 -o loop tmp.img somedir/’
profit. The mounted file/partition (then) is in read only mode, for the record
Hazou
Thanks a lot!
Hazou said:
Than u still didnt look good enough. But ok, i have done it now for you
Download the script in the attachment. The simg2img.py.zip and extract it.
Uncompress the system.img file into a normal ext4 disk image:
‘python simg2img.py system_signed tmp.img’
This will create an uncompressed ext4 volume ‘tmp.img’ in the same directory
Mount this disk image:
‘sudo mount -t ext4 -o loop tmp.img somedir/’
profit. The mounted file/partition (then) is in read only mode, for the record
Hazou
Click to expand...
Click to collapse
Fantastic! It works!
You are great! :highfive:
Thank you! Thank you! Thank you!

can't find it anywhere how to install recovery

guys... i've searched everywhere... how to install recovery ?
i have root and bootloader unlocked.
everywhere i go i see it's a flashable zip... but how do i install a flashable zip when i don't have a recovery installed ?
i've tried flashing the recovery.img from those zip through fastboot. but no luck... i'm on .283 kernel.
You can use adb commands or Flash Tool!
1)Download any dogo ROM or any flashable kernel zip!
2)Open that zip and find boot.img file.
3)Extract that to a folder.
4)Use adb or flashtool method
adb method:
Install adb drivers and adb cmd
Go to the folder where you extracted the boot.img
Press CTRL + Right Click and click on open with adb
Once adb is opened in that directory,
Type this : fastboot flash boot boot.IMG
Flashtool:
Open flashtool
Click on thunder sign and select fastboot
Select kernel to flash
Navigate to folder where u extracted boot.img
By default *.sin are shown. Change it *.img by selecting it in the menu
Select boot.img and in 10 sec u r recovery will be flashed
found my way....
- download any stock .283 kernel ftf.
- extract the kernel.sin using winrar
- send it over to nut's recovery website
- it generates a flashable recovery.
- extract the boot.img
- flash it using flashtool's fast boot method.
- done
check out nut's recovery... pretty handy script there that generates most of the recovery flashable.
alchemis said:
guys... i've searched everywhere... how to install recovery ?
i have root and bootloader unlocked.
everywhere i go i see it's a flashable zip... but how do i install a flashable zip when i don't have a recovery installed ?
i've tried flashing the recovery.img from those zip through fastboot. but no luck... i'm on .283 kernel.
Click to expand...
Click to collapse
Use this thread http://forum.xda-developers.com/showthread.php?t=2261606

[TOOL] Zenfone 2 boot repack

I see here and there requests about re-packing boot.img for ZF2.
Here are tools i'm using to re-pack my images for ZF2. This is for Linux. Just unpack attached archive to some directory. Put boot.img (or recovery.img renamed to boot.img) to the same directory and run extract_boot. Everything will be unpacked to boot sub-directory. Then you can modify boot/ramdisk directory as much as you want. When you finish, run make_boot and you will get boot.img ready to flash to ZF2.
Note1:
Generated boot.img set SELinux mode to permissive. This is better mode for modified boot/ROM. It will solve most problems you may encounter on custom ROMs.
Note2:
You HAVE to have unlocked bootloder in order to be able to boot the boot.img.
Note3:
Do not flash modified droidboot.img to ZF2! If somehow your bootloader will re-lock, you won't be able to boot anywhere if all three bootable partitions (boot.img, recovery.img, droidboot.img) will be modified. So, you will get bricked ZF2.
sorg said:
I see here and there requests about re-packing boot.img for ZF2.
Here are tools i'm using to re-pack my images for ZF2. This is for Linux. Just unpack attached archive to some directory. Put boot.img (or recovery.img renamed to boot.img) to the same directory and run extract_boot. Everything will be unpacked to boot sub-directory. Then you can modify boot/ramdisk directory as much as you want. When you finish, run make_boot and you will get boot.img ready to flash to ZF2.
Note1:
Generated boot.img set SELinux mode to permissive. This is better mode for modified boot/ROM. It will solve most problems you may encounter on custom ROMs.
Note2:
You HAVE to have unlocked bootloder in order to be able to boot the boot.img.
Note3:
Do not flash modified droidboot.img to ZF2! If somehow your bootloader will re-lock, you won't be able to boot anywhere if all three bootable partitions (boot.img, recovery.img, droidboot.img) will be modified. So, you will get bricked ZF2.
Click to expand...
Click to collapse
nice..thank you @sorg.. eventho I dont know on how to develop custom kernel..
can only wait for developers to release their custom kernel tester..
<deleted>
Great tool.
+1
Btw can you create same program for Windows?
can i use this to my asus ze500cl?
themonyo666 said:
can i use this to my asus ze500cl?
Click to expand...
Click to collapse
Maybe yes.
Try it.
Any love for windows?
S#@DY said:
Any love for windows?
Click to expand...
Click to collapse
mr_gourav2000 said:
Click to expand...
Click to collapse
Irrelevant reply, but I've got it. Thanks to @cieffe54
S#@DY said:
Irrelevant reply, but I've got it. Thanks to @cieffe54
Click to expand...
Click to collapse
Please share with us.
mr_gourav2000 said:
Please share with us.
Click to expand...
Click to collapse
Check your pm
S#@DY said:
Check your pm
Click to expand...
Click to collapse
Wow

fastboot flash custom rom?

hi guys, all custom roms are flashable. how can i fastboot flash the system partition of any custom rom, lile aicp or others? is that possible someway? tia!
I believe unpacking the system.new.dat from a ROM zip gives you a system.img, which I can only assume is fastboot flashable with fastboot command
can't open the .dat file as archive here with 7zip how could I unpack it?
EDIT: I see now you said "unpack" not uncompress... googling for that now!
FcukBloat said:
can't open the .dat file as archive here with 7zip how could I unpack it?
EDIT: I see now you said "unpack" not uncompress... googling for that now!
Click to expand...
Click to collapse
you can extract your system.new.dat by following this guide
thanks both! I suceeded in installing aicp's system image via fastboot after unpacking system.new.dat with a tool found on xda similar to the one you linked
thanks again!

Categories

Resources