new boot.img tools ( for boot.img with dtb ) - Android Software/Hacking General [Developers Only]

hello
this thread for new boot.img (for boot.img with dtb)
you cant normally pack kernel with ramdisk only on newer devices with secure boot on
so you will need mkbootimg with dtb support
i found a source on git hub and compiled it
here it is btw
Direct link newbootimgtools.zip
usage:
Code:
unpackimg image.img
it will output folder named imagename-out
repack-editme
edit this file with your device config and copy edited file into the folder and runit
source:
https://github.com/osm0sis/mkbootimg

Related

[SCRIPTS] Unpack / repack MT65xx/MT83xx boot.img, recovery.img or logo.bin

If you are looking for a way to easily unpack / repack boot.img, recovery.img or logo.bin from your MediaTek device (all except Android One devices), don't look any further. Here you can find my own Perl scripts.
Scripts were first based on the ones available on Android-DLS WiKi, but are now highly modified in order to work with specific MTK boot and recovery images. The scripts fully work with every image from all known MediaTek SoC:
MT6516
MT65x3 (MT6513 and MT6573)
MT65x5 (MT6515 and MT6575)
MT6577
MT65x2 (MT6572, MT6582 and MT6592)
MT6589
MT83xx (MT8377 and MT8389)
MT6595
The most up to date version of the scripts is always available at my public github repository: bgcngm/mtk-tools. Scripts require Perl v5.14+ to be installed and were fully tested under Ubuntu 12.04 as well as Windows 7 x64 (using Cygwin).
Please don't just leech the files and go away. You can easily say thanks just by pressing "Thanks" button.
Unpack script usage:
Code:
Usage: unpack-MTK.pl <infile> [COMMAND ...]
Unpacks MediaTek boot, recovery or logo images
Optional COMMANDs for boot or recovery images are:
-info_only
Display file information only
(useful to check image information without unpacking)
-kernel_only [--debug]
Extract kernel only
-ramdisk_only [--debug]
Extract ramdisk only
(optional argument '--debug' can additionally be used to provide useful
information for debugging purposes, even while unpacking both kernel
and ramdisk)
Optional COMMANDs for logo images are:
-force_logo_res <width> <height>
Forces file to be unpacked by specifying image resolution (in pixels)
(only useful when no zlib compressed images are found)
-invert_logo_res
Invert image resolution (width <-> height)
(may be useful when extracted images appear to be broken)
Repack script usage:
Code:
Usage: repack-MTK.pl <COMMAND ...> <outfile>
Repacks MediaTek boot, recovery or logo images
COMMANDs for boot or recovery images are:
-boot [--debug] <kernel> <ramdisk-directory>
Repacks boot image
-recovery [--debug] <kernel> <ramdisk-directory>
Repacks recovery image
(optional argument '--debug' can additionally be used to provide useful
information for debugging purposes, while repacking)
COMMANDs for logo images are:
-logo [--no_compression] <logo-directory>
Repacks logo image
(optional argument '--no_compression' can be used to repack logo images
without compression)
Version history:
modified to work with MT6516 boot and recovery images (17-03-2011)
included support for MT65x3 and eliminated the need of header files (16-10-2011)
added cygwin mkbootimg binary and propper fix (17-05-2012)
included support for MT65xx logo images (31-07-2012)
fixed problem unpacking logo images containing more than nine packed rgb565 raw files (29-11-2012)
re-written logo images file verification (29-12-2012)
image resolution is now calculated and shown when unpacking logo images (02-01-2013)
added colored screen output (04-01-2013)
included support for logo images containing uncompressed raw files (06-01-2013)
more verbose output when unpacking boot and recovery images (13-01-2013)
kernel or ramdisk extraction only is now supported (13-01-2013)
re-written check of needed binaries (13-01-2013)
ramdisk.cpio.gz deleted after successful extraction (15-01-2013)
added rgb565 <=> png images conversion (27-01-2013)
code cleanup and revised verbose output (16-10-2014)
boot or recovery is now extracted to the working directory (16-10-2014)
unpack result is stored on the working directory, despite of the input file path (17-10-2014)
added support for new platforms - MT6595 (thanks @carliv) (29-12-2014)
minor code cleanup and revised information output for boot and recovery images (29-12-2014)
make scripts more future-proof by supporting even more args (30-12-2014)
continue repacking even if there's no extra args file (01-01-2015)
more verbose output when repacking boot and recovery images (02-01-2015)
added new cmdline option for debugging purposes when unpacking / repacking boot and recovery images (06-01-2015)
Credits:
Android-DLS for the initial scripts
starix (from forum.china-iphone.ru) for the decryption of logo.bin files structure
carliv (from forum.xda-developers.com) for new platform support and new binaries
XDA:DevDB Information
MTK-Tools, Tool/Utility for the Android General
Contributors
bgcngm
Version Information
Status: Stable
Created 2014-10-15
Last Updated 2014-10-17
Editing .rgb565 raw files
There may be other ways for doing this, but here's a short info that will help you to edit .rgb656 raw files found inside MTK logo images.
Download and install Paint.NET
Download the attached plugin and copy the RGB565.dll file to the folder: "C:\Program Files\Paint.Net\FileTypes"
Open the .rgb565 file and enter image height and width
Information:
The plugin will allow read and write support to the RGB565 or RAW565 format. This format is used by the Android platform for the initial boot screen of the device. It will also allow you to open a BMP, PNG, JPG or other image and save it as a RGB565 file.
RGB565 is simply the raw pixel data of a bitmap file. It does not contain any header information and does not contain the dimensions of the image. The only thing that is known is the total number of pixels. When opening a .rgb565 file, the user must specify the height and width of the image, which is the resolution of your device's screen.
Just as an example, for a device with a 540 x 960 screen, the .rgb565 file for that device will have 518400 pixels. The size of the file in bytes will be twice the number of pixels, i.e. 1036800 bytes.
hello,
i tried ur script and works with MT6573 but i need some help.
How to repack?
The syntax u posted looks little jumbled and i need a example on unpack and repacking from u
Burned from my laser torch using pencil cells
Simple... let's say you unpack a boot.img:
Code:
unpack-MT65xx.pl boot.img
This extracts the kernel (it will be named boot.img-kernel.img) and the ramdisk folder (it will be named boot.img-ramdisk).
In order to repack, you should run:
Code:
repack-MT65xx.pl boot.img-kernel.img boot.img-ramdisk new-boot.img
If you are repacking a recovery.img, then it should be:
Code:
repack-MT65xx.pl -recovery recovery.img-kernel.img recovery.img-ramdisk new-recovery.img
I m getting "can't exec "mkbootimg" : No such file or directory at ./repack-Mt65xx.pl line 66" error
Now?
Edit: Solved the error
Burned from my laser torch using pencil cells
How did u solve?
Sent from my Android using Tapatalk 2
Probably it was just a matter of setting the proper permissions.
Hello, sorry for my bad english
help me please
i'm getting this error:
C:\Perl\MT65xx_scripts>unpack-MT65xx.pl recovery.img
Subroutine Cwd::fastcwd redefined at C:/Perl/lib/Cwd.pm line 819.
Subroutine Cwd::getcwd redefined at C:/Perl/lib/Cwd.pm line 819.
Subroutine Cwd::abs_path redefined at C:/Perl/lib/Cwd.pm line 819.
kernel written to boot/recovery.img-kernel.img
the boot image does not appear to contain a valid gzip file at C:\Perl\MT65xx_sc
ripts\unpack-MT65xx.pl line 48.
My telephone have a MT6573 processor
I have only used the scripts under Ubuntu, so never tested it on a Windows environment.
Are you sure that you have Perl correctly installed?
tried with ubuntu works.
Thanks!!!
Works in windows with cygwin too with some minor tweaking...
change the repack script line 66, mkbootimg to ./mkbootimg.exe & replace mkbootimg with this windows version... i think it should work with any mkbootimg.exe windows version too...
ignore the unpack scripts error though, it works fine actually in cygwin...
bgcngm said:
If you are looking for a way to easily unpack / repack boot.img (or recovery.img) from your MediaTek device, don't look any further. Here you can find my own Perl scripts.
These scripts are based on the ones available on Android-DLS WiKi, but highly modified in order to work with specific MTK boot and recovery images. Currently, these scripts fully work with any MT6516, MT6513 or MT6573 boot image. I believe it will still work for the new MT6575 images.
Unpack script usage:
Code:
unpack-MT65xx.pl <image>
Repack script usage:
Code:
repack-MT65xx.pl [-recovery] <kernel> <ramdisk-directory> <outfile>
Click to expand...
Click to collapse
when i type
unpack-MT65xx.pl boot.img
in terminal it says
unpack-MT65xx.pl cammand not found
im on ubuntu 11
Solution to the error!!
Edit: Solved the error - can't exec "mkbootimg"
If someone gets the error:
can't exec "mkbootimg" : No such file or directory at ./repack-Mt65xx.pl line 66
Follow this:
In Ubuntu:
copy the 'mkbootimg' file and paste it in your /bin folder.
A command like this in the terminal will do the work:
Code:
sudo cp /path/to/unpack-repack-scripts/mkbootimg /bin
(enter your password, when it asks)
In windows(using cygwin):
Edit:
Use the OP to download latest script.
bindassdost said:
when i type
unpack-MT65xx.pl boot.img
in terminal it says
unpack-MT65xx.pl cammand not found
im on ubuntu 11
Click to expand...
Click to collapse
type like this bro:
Code:
./unpack-MT65xx.pl boot.img
hope it helps !
marsavo said:
Hello, sorry for my bad english
help me please
i'm getting this error:
C:\Perl\MT65xx_scripts>unpack-MT65xx.pl recovery.img
Subroutine Cwd::fastcwd redefined at C:/Perl/lib/Cwd.pm line 819.
Subroutine Cwd::getcwd redefined at C:/Perl/lib/Cwd.pm line 819.
Subroutine Cwd::abs_path redefined at C:/Perl/lib/Cwd.pm line 819.
kernel written to boot/recovery.img-kernel.img
the boot image does not appear to contain a valid gzip file at C:\Perl\MT65xx_sc
ripts\unpack-MT65xx.pl line 48.
Click to expand...
Click to collapse
I am getting the same error. I am running this script on windows 7. My phone is based on MT6516.
ajparag said:
I am getting the same error. I am running this script on windows 7. My phone is based on MT6516.
Click to expand...
Click to collapse
Dude Check whether you have installed perl packages for cygwin properly
bgcngm said:
Simple... let's say you unpack a boot.img:
Code:
unpack-MT65xx.pl boot.img
This extracts the kernel (it will be named boot.img-kernel.img) and the ramdisk folder (it will be named boot.img-ramdisk).
In order to repack, you should run:
Code:
repack-MT65xx.pl boot.img-kernel.img boot.img-ramdisk new-boot.img
If you are repacking a recovery.img, then it should be:
Code:
repack-MT65xx.pl -recovery recovery.img-kernel.img recovery.img-ramdisk new-recovery.img
Click to expand...
Click to collapse
Thanks for sharing. Very useful.
varun.chitre15 said:
I m getting "can't exec "mkbootimg" : No such file or directory at ./repack-Mt65xx.pl line 66" error
Now?
Edit: Solved the error
Burned from my laser torch using pencil cells
Click to expand...
Click to collapse
give the binary execute permission, and move it to somewhere in the path:
sudo chmod a+x mkbootimg
sudo mv mkbootimg /bin
@OP
Real Gr8 job
For those people facing problems regarding the mkbootimg ,
Just that you need that binary compiled for your system
Here is for OS X (tested on 10.7.4) attached !
I just compiled form the Source
got from Internet ( lazy to boot that thing in Parallels )
for compiling !!
Source for Windows :
http://www.freeyourandroid.com/guide/extract-edit-repack-boot-img-windows
mkbootimg for OS X, Linux and Windows
Does any one need for Linux ?
ninadpchaudhari said:
Does any one need for Linux ?
Click to expand...
Click to collapse
The binary for Linux is already included in the 7zip file, along with the scripts.

Help extracting initramfs from Kernel [SOLVED]

Hi,
My Question is
How do i extract initramfs from a Kernel.bin file ?
the Galaxy S Advance uses Kernel.bin instead of a boot.img
I tried dsixda's kitchen, but it couldn't recognize the file format
I just want to replace a certain binary in the /sbin folder and repack the kernel.
Edit:this phone is kinda different,
it seems that the recovery and kernel partitions are the same
Figured it out
The zImage created after compilation process is actually the same, a kernel binary aka kernel.bin
I just had to rename the zImage to kernel.bin and add md5sum to the kernel.bin and pack it into a tarball to make it flashable via odin.
that can be done like this
Code:
md5sum -t kernel.bin >> kernel.bin
mv kernel.bin kernel.bin.md5
tar -cvf mykernel.tar kernel.bin.md5
As for packing the ramdisk into the kernel.bin
that can be done before compiling by editing the .config file or any config you gonna use
just have to add the path to the ramdisk at CONFIG_INITRAMFS_SOURCE="path to your ramdisk"
There's also a script to unpack the ramdisk from the kernel.bin, i'll attach it here
usage:
place the script at the same location of the kernel.bin
Code:
chmod +x unpack-initramfs.sh
bash unpack-initramfs.sh kernel.bin.md5
OR
/bin/sh unpack-initramfs.sh kernel.bin.md5
Hope this helped Others who were facing the same problem
how to repack it?

[Development] MKBOOTIMG TOOLS

MKBOOTIMG-TOOLS
MY GITHUB SOURCE:
https://github.com/ModdingMyMind/mkbootimg_tools​
Original Author: xiaolu (GITHUB SOURCE: https://github.com/xiaolu/mkbootimg_tools)
Heavily Modified By: Modding.MyMind
This project is originally based from xiaolu. To make this compatible for ARM I modified the script, compiled some binaries such as file, bash, grep, gzip, lzma, xz, mkbootimg, etc.
-- This project uses busybox but due to how stripped and limited busybox is it ultimately led to me having to compile a few binaries from source. These binaries must be part of the project in order for the project to be successful. For example, busybox grep will not always give accurate offsets for the android header. One of MANY bugs found with busybox.
This project supports device tree binaries found inside the Boot.img and Recovery.img.
This project supports multiple Ramdisk compressions.
-- This project will check the ramdisk compression and if it determines that the tool does not support that particular compression then it will display a hazard warning letting the user know that the compression is not supported and that the ramdisk currently cannot be decompressed or compressed until support has been officially added.
-- If the compression is supported it will display what type of compression the Ramdisk is and how many blocks it has when unpacked.
This project will determine your kernel size, ramdisk size, and TRUE OFFSETS (not just the standard mkbootimg.c offsets).
-- With respect to the offsets; You will learn that many available tools found available specifically handle images where the ANDROID! header is located at 0x0. Not all images are built like this from stock. This project will find the header, base, kernel offset, ramdisk offset, second offset, and tags offset. It will rebuild the image using DD to insure the android header is located at 0x0. The found offsets inside the image will be cross referenced to see if the OEM of that image built it using the standard mkbootimg.c. If it detects any offsets which are built using NON-standard offsets then it will display a warning as well as show you what the image TRUE offsets actually are. Those same offsets are then applied to properly rebuild your image to insure that it boots like it was intended to do.
-- The warning will let you know that you may modify mkbootimg.c with the NON-standard values if you wish to have a binary specific to your device. The offsets displayed are not the address. Because the offsets are determined and not the address this makes it possible for this project to not have to rebuild mkbootimg.c. When the project is used to rebuild your image using the mkbootimg args such as --ramdisk_offset, --kernel_offsets, etc, etc, this then tells mkbootimg.c to ignore the hardcoded offsets and only use the ones it has been instructed to use. This is even more successful by insuring the BASE is accurate and applying the base as one of the mkbootimg args (--base 0 <-- this is lazy and stupid).
The mkboot script requires two args whether unpacking the image or repacking the image.
-- mkboot boot.img bootfolder (This will unpack the image)
1. mkboot is the script.
2. boot.img is the actual image.
3. bootfolder will be created and become the project folder.
-- mkboot bootfolder newboot.img (This will repack the image)
1. mkboot is the script.
2. bootfolder is the project folder which has the needed files and information to repack.
3. This will be the name of the finished build.
UNPACK STANDARD IMAGE​
This image uses standard mkbootimg.c:
[email protected]:/data/local/tmp/mkbootimg_tools-master # ./mkboot boot.img work
Unpack & decompress boot.img to work
kernel : zImage
ramdisk : ramdisk
page size : 2048
kernel size : 2529072
ramdisk size : 230255
base : 0x12200000
kernel offset : 0x00008000
ramdisk offset : 0x01000000
second_offset : 0x00f00000
tags offset : 0x00000100
cmd line : mem=471M console=ttyMSM2,115200n8 androidboot.hardware=thunderc lge.rev=10
Ramdisk is lzma format.
1436 blocks
Unpack completed.
[email protected]:/data/local/tmp/mkbootimg_tools-master #
Click to expand...
Click to collapse
REPACK STANDARD IMAGE​
Image repacked with standard mkbootimg.c:
[email protected]:/data/local/tmp/mkbootimg_tools-master # ./mkboot work boot.img
mkbootimg from work/img_info.
kernel : zImage
ramdisk : new_ramdisk.lzma
page size : 2048
kernel size : 2529072
ramdisk size : 230029
base : 0x12200000
kernel offset : 0x00008000
ramdisk offset : 0x01000000
tags offset : 0x00000100
cmd line : mem=471M console=ttyMSM2,115200n8 androidboot.hardware=thunderc lge.rev=10
Kernel size: 2529072, new ramdisk size: 230029, boot.img: 2762752.
boot.img has been created.
[email protected]:/data/local/tmp/mkbootimg_tools-master #
Click to expand...
Click to collapse
UNPACK NON-STANDARD IMAGE​
This image uses non-standard mkbootimg.c:
[email protected]:/data/local/tmp/mkbootimg_tools-master # ./mkboot recovery.img work
Unpack & decompress recovery.img to work
****** WARNING ******* WARNING ******* WARNING ******
This image is built using NON-standard mkbootimg!
RAMDISK_OFFSET is 0x01608000
You can modify mkbootimg.c with the above value(s)
****** WARNING ******* WARNING ******* WARNING ******
kernel : zImage
ramdisk : ramdisk
page size : 2048
kernel size : 5834192
ramdisk size : 4351685
base : 0x80600000
kernel offset : 0x00008000
ramdisk offset : 0x01608000
second_offset : 0x00f00000
tags offset : 0x00000100
cmd line : console=ttyHSL0,115200,n8 user_debug=31
Ramdisk is gzip format.
14837 blocks
Unpack completed.
[email protected]:/data/local/tmp/mkbootimg_tools-master #
Click to expand...
Click to collapse
REPACK NON-STANDARD IMAGE​
Image repacked with non-standard mkbootimg.c:
[email protected]:/data/local/tmp/mkbootimg_tools-master # ./mkboot work recovery.img
mkbootimg from work/img_info.
kernel : zImage
ramdisk : new_ramdisk.gzip
page size : 2048
kernel size : 5834192
ramdisk size : 4358038
base : 0x80600000
kernel offset : 0x00008000
ramdisk offset : 0x01608000
tags offset : 0x00000100
cmd line : console=ttyHSL0,115200,n8 user_debug=31
Kernel size: 5834192, new ramdisk size: 4358038, recovery.img: 10194944.
recovery.img has been created.
[email protected]:/data/local/tmp/mkbootimg_tools-master #
Click to expand...
Click to collapse
UNPACK IMAGE WITH INCOMPATIBLE RAMDISK​
[email protected]:/data/local/tmp/mkbootimg_tools-master # ./mkboot boot-1.img work
Unpack & decompress boot-1.img to work
kernel : zImage
ramdisk : ramdisk
page size : 2048
kernel size : 3580032
ramdisk size : 594701
base : 0x10000000
kernel offset : 0x00008000
ramdisk offset : 0x01000000
second_offset : 0x00f00000
tags offset : 0x00000100
cmd line :
****** HAZARD ******* HAZARD ******* HAZARD ******
Ramdisk is data format. Can't unpack ramdisk.
This tool currently does not support data.
****** HAZARD ******* HAZARD ******* HAZARD ******
[email protected]:/data/local/tmp/mkbootimg_tools-master #
Click to expand...
Click to collapse
REPACK IMAGE WITH INCOMPATIBLE RAMDISK​
[email protected]d:/data/local/tmp/mkbootimg_tools-master # ./mkboot work boot-1.img
mkbootimg from work/img_info.
****** HAZARD ******* HAZARD ******* HAZARD ******
Ramdisk is data format. Can't repack ramdisk.
This tool currently does not support data.
****** HAZARD ******* HAZARD ******* HAZARD ******
[email protected]:/data/local/tmp/mkbootimg_tools-master #
Click to expand...
Click to collapse
*Reserved*
If your boot.img and/or recovery.img is found to not be supported using this tool then please send me your boot.img and recovery.img so I may review it and determine if official support can be added. Thanks.
Add support for MediaTek Images:
-- Unpack and repack boot/recovery images.
-- Append proper headers to ramdisk when repacking.
-- Compiled mkimage to assist with the headers.
-- This support currently does not include the logo images at this time.
-- MT6516
-- MT65x3 (MT6513 and MT6573)
-- MT65x5 (MT6515 and MT6575)
-- MT6577
-- MT65x2 (MT6572 and MT6582)
-- MT6589
-- MT83xx (MT8377 and MT8389)
Modding.MyMind said:
If your boot.img and/or recovery.img is found to not be supported using this tool then please send me your boot.img and recovery.img so I may review it and determine if official support can be added. Thanks.
Click to expand...
Click to collapse
getting error
Code:
[email protected]:/ $ su
/mkbootimg_tool/ARM <
/mkboot boot.img h3ll <
<Unpack and repack boot.img tool>
----------------------------------------------------------------------
Not enough parameters or parameter error!
unpack boot.img & decompress ramdisk
mkboot [img] [output dir]
mkboot boot.img boot20130905
^[[?1;2cUse the unpacked directory repack boot.img(img_info)
mkboot [unpacked dir] [newbootfile]
mkboot boot20130905 newboot.img
^[[?1;[email protected]:/data/local/tmp/mkbootimg_tool/A;2c1;2c <
sh: 1: not found
sh: 2c1: not found
sh: 2c: not found
127|[email protected]:/data/local/tmp/mkbootimg_tool/ARM #
H3LL said:
getting error
Code:
[email protected]:/ $ su
/mkbootimg_tool/ARM <
/mkboot boot.img h3ll <
----------------------------------------------------------------------
Not enough parameters or parameter error!
unpack boot.img & decompress ramdisk
mkboot [img] [output dir]
mkboot boot.img boot20130905
^[[?1;2cUse the unpacked directory repack boot.img(img_info)
mkboot [unpacked dir] [newbootfile]
mkboot boot20130905 newboot.img
^[[?1;[email protected]:/data/local/tmp/mkbootimg_tool/A;2c1;2c <
sh: 1: not found
sh: 2c1: not found
sh: 2c: not found
127|[email protected]:/data/local/tmp/mkbootimg_tool/ARM #
Click to expand...
Click to collapse
Check the permissions, check that bash is placed at /system/xbin, and insure the image you are trying to unpack is in the same directory where the mkboot script is located or else, insure you specify the image path properly.
If it still errors out insure your device is ARM and compatible for the project. If yes, then at the top of the script will be; #set -x. Uncomment it and run the script again, then copy and paste it's output here.
Also, send me your image to download and verify on my end. Thanks.
Modding.MyMind said:
Check the permissions, check that bash is placed at /system/xbin, and insure the image you are trying to unpack is in the same directory where the mkboot script is located or else, insure you specify the image path properly.
If it still errors out insure your device is ARM and compatible for the project. If yes, then at the top of the script will be; #set -x. Uncomment it and run the script again, then copy and paste it's output here.
Also, send me your image to download and verify on my end. Thanks.
Click to expand...
Click to collapse
tried same output as above here's boot.IMG
H3LL said:
tried same output as above here's boot.IMG
Click to expand...
Click to collapse
Your image doesn't have an android header. It's elf. This tool currently doesn't support it but now that I have your boot.img I can see about adding support. Can you send me your recovery image as well so I may verify that the process is the same for both when unpacking and repacking. Some images such as MediaTek have different headers for the ramdisk depending on whether it's the boot or recovery and so I would like to confirm the same with yours as well. Thanks.
Edit: Also, this tool won't work on your device unless the binaries are compiled from source for your machine. It's currently for ARM, but your device won't play nice with it.
Modding.MyMind said:
Your image doesn't have an android header. It's elf. This tool currently doesn't support it but now that I have your boot.img I can see about adding support. Can you send me your recovery image as well so I may verify that the process is the same for both when unpacking and repacking. Some images such as MediaTek have different headers for the ramdisk depending on whether it's the boot or recovery and so I would like to confirm the same with yours as well. Thanks.
Edit: Also, this tool won't work on your device unless the binaries are compiled from source for your machine. It's currently for ARM, but your device won't play nice with it.
Click to expand...
Click to collapse
there is no recovery. img for this device (its not mediatek) its in ramdisk of the boot.img....yeah my device is ARM
H3LL said:
there is no recovery. img for this device (its not mediatek) its in ramdisk of the boot.img....yeah my device is ARM
Click to expand...
Click to collapse
Reviewed the binaries and somehow overlooked a few after compiling them. Some aren't even true static when I originally thought I did compile them as such. There are also some which are true static but focus on either hard floats or soft floats. So, I need to go back and recompile the ones which stood out and push them to my repo. This may very well be why it isn't playing fair on your Sony device.
With that said, adding support for your image is gonna be a bit complicated to write out in bash since it is very involved lol. However, I am gonna make an attempt by taking on the challenge and seeing if I can get it done .
The github account doesn't exist anymore and there's no download link?
[null]
how to compile this for windows
I can't use one over the other because I need gamepass cuz Iwant to save money on hardware not buy games on steam but also i need linux because bash is miles better than some IDE which takes up 30 gb at minimum

[Q] "FAILED (remote: dtb not found)" error when flashing image on Xperia Z3

Hello,
I am facing error when flashing image on Xperia Z3. I rooted the device using the link posted on "theunlockr.com"
Now, I am trying to flash a new image on the device. I am extracting the exisiting image from the device, modifying the init.rc file and repacking the image (myboot.img) and then flashing it using fastboot method. This is when it gives me this error.
When I flash the original image that I extracted, it works fine.
I tried following methods: -
1. Changing init.rc file and repacking the .img file and flashing it
When I extract initrd.img (using abootimg), it shows me only these files ( I usually find init.rc file when I extract initrd.img but not in this device, is this expected?): -
- XZ3-AdvStkKernel_DooMLoRD_ramdisk.gz
- logo.rle
- init (linking to sbin/init.sh)
- sbin/bootrec-device
- sbin/ramdisk-recovery-cwm.cpio
- sbin/busybox
- sbin/ramdisk.cpio
- sbin/init.sh
I extracted sbin/ramdisk.cpio file to get the init.rc file using the command: -
cpio -idmv < ramdisk.cpio
After modifying the init.rc file, I repacked the cpio file using the command: -
ls | cpio -ov > ramdisk.cpio
I made sure that none of the extra stuff was not there in the folder before repacking the cpio file.
Now that my ramdisk.cpio file is updated, I created new image using the command: -
find . | cpio -o -H newc | gzip -9 > ../newramdisk.cpio.gz
and created myboot.img using abootimg
When I flashed this image file, I get the "dtb not found" error
2. Second method that I tried was I simply unpacked the boot.img (original image) and repacked it using abootimg in to myboot.img without changing anything.
This also gives the same error.
It looks like there is some issue with the unpacking and repacking of the boot image.
Is there any other way to resolve this issue?
asurion.acc said:
Is there any other way to resolve this issue?
Click to expand...
Click to collapse
use this instruction and tools, but when you will build your boot.img, use this cmd line
Code:
./mkbootimg --base 0x00000000 --kernel zImage --ramdisk_offset 0x02000000 --tags_offset 0x01E00000 --pagesize 2048 --cmdline "androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0xb7 ehci-hcd.park=3 dwc3.maximum_speed=high dwc3_msm.prop_chg_detect=Y" --ramdisk ramdisk.cpio.gz --dt dt.img -o boot.img
with that instruction all work fine. I've tested many times
Thanks for replying to me.
I just want to modify init.rc file to add few lines. The only file that I see is ramdisk.cpio which contains init.rc. I unpacked it , modified it and repacked ramdisk.cpio. Instead of creating new dt.img, I directly flashed the new img file onto the device and that soft bricked the device. :crying: The steps that you suggested mentions creating a new kernel and creating a new dt.img. Do I need to do that even though I just need to modify just init.rc file?
At this point, I am just trying to unbrick the device using flash tool. I tried cwmrecovery but it did not work so trying flashing tool now. once its done, if it is necessary to create a new dt.img and new zImage using toolchains, I will use that method. Please let me know if you think that is the step that I am missing which caused the device to brick.
Thanks a lot.
UPDATE:
Device is unbricked.!
I just need to root it again and follow the steps that you mentioned. Please confirm if I need new ZImage and dt.img even if I just need to edit init.rc.
Thanks a lot.

No ramdisk folder found / unpack boot.img

Hello,
i'm trying to unpark boot.img
But then i got this error here. how can that be fixed? (Android-Kitchen-0.224)
Copy boot.ing into -> bootimg_040621_161723
Code:
Creating folder /home/fredy/Desktop/Android-Kitchen-0.224/bootimg_040621_161723 ...
---> Place boot.img/recovery.img into the folder mentioned above <--
Press Enter to continue
Kernel found at offset 2048 in boot.img
Extracting kernel ...
Extracting ramdisk ...
Error: No ramdisk folder found!
Contents of bootimg_040621_161723:
total 9476
-rw-rw-r-- 1 fredy fredy 9701434 Apr 6 16:17 zImage
Press Enter to continue
Thanks for your time
007fred62 said:
Hello,
i'm trying to unpark boot.img
But then i got this error here. how can that be fixed? (Android-Kitchen-0.224)
Copy boot.ing into -> bootimg_040621_161723
Code:
Creating folder /home/fredy/Desktop/Android-Kitchen-0.224/bootimg_040621_161723 ...
---> Place boot.img/recovery.img into the folder mentioned above <--
Press Enter to continue
Kernel found at offset 2048 in boot.img
Extracting kernel ...
Extracting ramdisk ...
Error: No ramdisk folder found!
Contents of bootimg_040621_161723:
total 9476
-rw-rw-r-- 1 fredy fredy 9701434 Apr 6 16:17 zImage
Press Enter to continue
Thanks for your time
Click to expand...
Click to collapse
The ramdisk is likely in the recovery.img
sd_shadow said:
The ramdisk is likely in the recovery.img
Click to expand...
Click to collapse
ok
sd_shadow said:
The ramdisk is likely in the recovery.img
Click to expand...
Click to collapse
Hello,
can you help me with this? recreate boot.img
Code:
Boot image tools
----------------
Enter a choice:
a = Extract kernel+ramdisk from boot.img/recovery.img in any folder
x = Exit
NOTE: Other options may not be shown in this menu *until* a specific
action above is selected or a specific working folder is created.
(A working folder is created with Option 1 of the kitchen main menu!)
e.g. You won't see the option to re-pack a boot.img unless you unpack
the boot.img first! For re-packing you also need a working folder
with the original boot.img so that the kitchen can use its header
information to construct the new boot.img.
But there can i copy files too.. only a = extract no working folder

Categories

Resources