xiaolu / mkbootimg_tools Goto Github PK
View Code? Open in Web Editor NEWUnpack and repack boot.img,support dtb(dt.img).
Unpack and repack boot.img,support dtb(dt.img).
折腾了一天 不断的google+尝试自己搞定了……差点就想放弃了……(⊙﹏⊙)b
Hi
I can extract my boot to tmp
./mkboot boot.img tmp
but when I try to re-pack it said:
./mkboot boot.img ./tmp/ramdisk.gz newboot.img
./mkboot: line 144: ./mkbootimg_dtb: No such file or directory
stat: cannot stat ‘newboot.img’: No such file or directory
my os: ubuntu x64
Linux ubuntu 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
is there any lib is missing in my system?
Whatever i do ,
Add path
Change permission
Execute as root
I Am getting permission denied on ./mktool
hello sir when i use your tool it give me empty files with 0 data please help me out thanks
I did build a kernel and i end up with two files
~/.../arm64/boot $ ls
Image Image.gz
~/.../arm64/boot $ file Image
Image: Linux kernel ARM64 boot executable Image, little-endian
Image.gz is just a archive contain the Image. File
My question is where is ramdisk.gz that required to make boot image ??
I get this error when I try to unpack the working folder -> OUT
mkbootimg_tools$ ./mkboot OUT new-boot.img
mkbootimg from OUT/img_info.
./mkboot: line 145: /home/pintu/PINTU/Y2017/tools/PACK_TOOL/mkbootimg_tools/mkbootfs: No such file or directory
kernel : kernel
ramdisk : new_ramdisk
page size : 2048
kernel size : 14512164
ramdisk size : 20
second_size : 37528
base : 0x10000000
kernel offset : 0x00008000
ramdisk offset : 0x01000000
second_offset :
tags offset : 0x00000100
cmd line :
ramdisk is gzip format.
./mkboot: line 101: /home/pintu/PINTU/Y2017/tools/PACK_TOOL/mkbootimg_tools/mkbootimg: No such file or directory
Make boot.img Error! pls check img_info file.
This is my boot.img image for Amazon fire TV having MTK-8173 chipset
Please help and reply me on email: [email protected]
Hi there
I can use your tools to unpack stock boot.img to zImage and ramdisk... then I can make change to ramdisk and then re-pack ok .... very good!!
unfortunately I have download kernel source and re-build (customize) my kernel and build new zImage
but I cannot pack my own (new) zImage and the ramdisk, I belive dt.img need to re-build....
can you tell me how to use your script to do that? it seems no paramter for me to pass dt.img path
大大, 簡單的是怎樣把我自己compile的kernel (zImage), 合拼ramdisk + dt.img 為boot.img ?
貌似dt.img 要compile過, 同時你的script不能指特定zImage 戓 dt.img
謝謝幫忙
Today, after 2 days, I finally come up to understand why your tool unpack the boot.img but leave the 'ramdisk' folder empty.
It is due to my os missing cpio.
But your tool hides all errors and so I made me crazy.
Please, update the read.me will all the dependecies, or check for them before trying to use them
./mkboot: 行 101: mkbootimg: 没有那个文件或目录
Make boot.img Error! pls check img_info file
这个不知道是什么意思,检查了info没看出来是哪个文件不存在啊。
Repacking this 5.1.1 kernel (without changing anything) works properly but it doesn't boot (just hangs at bootloader screen on Galaxy S4 LTE).
Any idea what's wrong?
With bc6b1b0
there does not seem to be dtb support to repack the a boot.img
mkbootimg: error: unrecognized arguments: --dt dt.img
Hi.
When running the mkboot under ubuntu linux, trying to build the color os oppo boot.img file,
mkboot boot.img directory
then
mkbootfs directory newboot.img
I get the following error:
./mkboot: line 117: mkbootfs: command not found
Specifically
./mkboot: line 117: mkbootfs: command not found
kernel : zImage
ramdisk : new_ramdisk.gz
page size : 2048
kernel size : 6686408
ramdisk size : 20
dtb size : 5339136
base : 0x00000000
kernel offset : 0x00008000
ramdisk offset : 0x02000000
tags offset : 0x01e00000
dtb img : dt.img
cmd line : console=ttyHSL0,115200,n8 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x37 ehci-hcd.park=3
Kernel size: 6686408, new ramdisk size: 20, newboot.img: 12029952.
newboot.img has been created.
Resulting newboot.img does not work.
Thanks for the tool.
Dennis
解包成功,打包失败,报错:
mkbootimg from output//img_info.
./tools/mkboot: line 145: /mnt/e/TEMP/2020年11月15日-REC/tools/mkbootfs: cannot execute binary file: Exec format error
kernel : kernel
ramdisk : new_ramdisk
page size : 4096
kernel size : 41820172
ramdisk size : 20
dtb size : 2
base : 0x00000000
kernel offset : 0x00008000
ramdisk offset : 0x01000000
tags offset : 0x00000100
dtb img : dt.img
cmd line : androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 androidboot.usbcontroller=a600000.dwc3 swiotlb=2048 loop.max_part=7 cgroup.memory=nokmem,nosocket reboot=panic_warm buildvariant=user
ramdisk is gzip format.
./tools/mkboot: line 101: /mnt/e/TEMP/2020年11月15日-REC/tools/mkbootimg: cannot execute binary file: Exec format error
Make boot.img Error! pls check img_info file.
...
It gives out 4 error statements:
Unpack & decompress boot.img to ./extract_img
./mkboot: line 220: (kernel_size+page_size-1)/page_size: division by 0 (error token is "page_size")
./mkboot: line 221: (ramdisk_size+page_size-1)/page_size: division by 0 (error token is "page_size")
./mkboot: line 222: (second_size+page_size-1)/page_size: division by 0 (error token is "page_size")
./mkboot: line 223: (dtb_size+page_size-1)/page_size: division by 0 (error token is "page_size")
Please help.
Hi,
I would like to use your version of mkbootimg_tools in an opensource project however I'm confused about why you distribute mkbootimg and mkbootfs as pre-compiled binaries. Couldn't you give the source code?
Have a nice day
Hello.
After rebuilding kernel (without modification) and building back I have a huge loss of resulting boot.img:
boot.img - 128M
new_boot.img - 17M
Is it normal behavior? Because I can't load resulting image.
Hello,I have unpacked the files stored inside this boot.img file :
https://github.com/raspiduino/a6lte-kvm/releases/download/0.01/boot.tar
and I've used a tool called "unpackbootimg" that I've got from this link :
https://github.com/osm0sis/mkbootimg
this is how I have extracted the files from the boot.img file :
/mnt/zroot2/zroot2/OS/Android-KVM/Galaxy-A6/osm0sis-mkbootimg# mkdir boot
/mnt/zroot2/zroot2/OS/Android-KVM/Galaxy-A6/osm0sis-mkbootimg# ./unpackbootimg -i /mnt/zroot2/zroot2/OS/Android-KVM/Galaxy-A6/Boot-Files/boot-orig.img -o boot
this is what happened :
ANDROID! magic found at: 0
BOARD_KERNEL_CMDLINE androidboot.selinux=permissive androidboot.selinux=permissive
BOARD_KERNEL_BASE 0x10000000
BOARD_NAME SRPRA31B008KU
BOARD_PAGE_SIZE 2048
BOARD_HASH_TYPE sha1
BOARD_KERNEL_OFFSET 0x00008000
BOARD_RAMDISK_OFFSET 0x01000000
BOARD_SECOND_OFFSET 0x00f00000
BOARD_TAGS_OFFSET 0x00000100
BOARD_OS_VERSION 10.0.0
BOARD_OS_PATCH_LEVEL 2021-03
BOARD_DT_SIZE 509952
then I have removed the old kernel and I have replaced it with a new kernel re-compiled by me,where I have enabled KVM. At this point,I want to repack the files previously extracted and this is how I tried to do that :
/mnt/zroot2/zroot2/OS/Android-KVM/Galaxy-A6/xiaolu-mkbootimg_tools# ./mkboot /mnt/zroot2/zroot2/OS/Android-KVM/Galaxy-A6/Boot-Files/boot boot.img
but it didn't work :
mkbootimg from /mnt/zroot2/zroot2/OS/Android-KVM/Galaxy-A6/Boot-Files/boot/img_info.
not found img_info file! can't rebuild img.
the command and result is here:
ThinkPad-T420:~/rom/mkbootimg_tools$ sh mkboot boot.img output
output exists, delete?(N/y)y
Unpack & decompress boot.img to output
mkboot: 214: mkboot: Bad substitution
root@hermes:/data/local/tmp/mkbootimg_tools/ARM # ./mkboot boot.img bootfolder
./mkboot[6]: head: not found
./mkboot[16]: /data/local/tmp/mkbootimg_tools/ARM/: can't execute: Is a directory
root@hermes:/data/local/tmp/mkbootimg_tools/ARM #
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.