pbatard / bootimg-tools Goto Github PK
View Code? Open in Web Editor NEWAndroid boot.img creation and extraction tools [NOTE: This project is NO LONGER maintained]
License: Apache License 2.0
Android boot.img creation and extraction tools [NOTE: This project is NO LONGER maintained]
License: Apache License 2.0
MAX is actually MIN, we can measure TP1 voltage to make sure output current is MAX when TP1 = +5V or +3.3V
Now when we turn the switch to "MAX", TP1 voltage is 1.2V, which causes stepper output torque is only 1/5 of 0.2Nm.
$ # Unpack boot.img (retrieved from boot partition of Android device)
$ unmkbootimg -i boot.img
kernel written to 'kernel' (6718296 bytes)
ramdisk written to 'ramdisk.cpio.gz' (708213 bytes)
To rebuild this boot image, you can use the command:
mkbootimg --base 0 --pagesize 2048 --kernel_offset 0x80208000 --ramdisk_offset 0x82200000 --second_offset 0x81100000 --tags_offset 0x80200100 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=flo user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=340M' --kernel kernel --ramdisk ramdisk.cpio.gz -o boot.img
$ # Repack without modifications
$ mkbootimg --base 0 --pagesize 2048 --kernel_offset 0x80208000 --ramdisk_offset 0x82200000 --second_offset 0x81100000 --tags_offset 0x80200100 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=flo user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 vmalloc=340M' --kernel kernel --ramdisk ramdisk.cpio.gz -o boot.img
$ # boot using new boot.img (whose size actually differ from original boot.img)
$ fastboot boot boot.img
This works well only when used on unmodified ramdisk.
However, same process end up with a broken boot.img if, say something is changed in default.prop, something as trivial as ro.debuggable=1
.
Is this a known issue or am I just being stupid with my approach?
PS: My usual commands to unpack, pack cpio.gz are:
$ # unpack
$ gunzip ramdisk.cpio.gz
$ cpio -i < ../ramdisk.cpio
$ # pack
$ find . | cpio -o -H newc | gzip > ../myramdisk.cpio.gz
gcc mkbootfs.c -o mkbootfs -I../include
/tmp/ccHBJe3S.o: In function `fix_stat':
mkbootfs.c:(.text+0x247): undefined reference to `fs_config'
collect2: error: ld returned 1 exit status
It does not support latest Android boot.img created from "system/core/mkbootimg/mkbootimg", it's a python script.
I am using unmkbootimg program to extract the boot.img image that I got from factory image from Google. but it says "error: not an Android boot image". Could you please help me with this?
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.