Skip to content

Commit

Permalink
v3.8 - add hdr_v3 boot/vendor_boot support, improve lz4 support, fixes
Browse files Browse the repository at this point in the history
- fix magic detection false positives of OSIP bootimg headerless
- add test to ensure Windows sudo is executable
- fix multiple Windows sudo prompts by putting ramdisk packing commands into a single find2cpio.bat to execute
- fix for corrected unpackbootimg/unpackelf kernel+ramdisk suffixes
- update AOSP support for boot_img_hdr_v3
- add AOSP vendor_boot VNDRBOOT magic detection and support
- fix false no files error on ramdisks with only directories in root
- fix lz4 and lz4-l ramdisk default repack compression level to match what Google seems to be using
- update slimmed magic file (from file 5.40) with my own fixes
- update boot_signer*.jar to more clearly catch failure with hdr_v3
- fix exiting scripts with an error code on failures
  • Loading branch information
osm0sis committed May 3, 2021
1 parent d790652 commit a306806
Show file tree
Hide file tree
Showing 5 changed files with 288 additions and 89 deletions.
8 changes: 8 additions & 0 deletions android_win_tools/androidbootimg.magic
Expand Up @@ -40,11 +40,19 @@
>>2048 search \x88\x16\x88\x58 \b, MTK headers
!:strength * 3

# Google Pixel/AOSP Vendor Standard
# [test "x" as workaround to odd file/magic behavior not allowing search here]
0 string x
>0 search VNDRBOOT AOSP_VNDR bootimg
>>2048 search \x88\x16\x88\x58 \b, MTK headers
!:strength * 3

# DENX U-Boot
0 string \x27\x05\x19\x56 U-Boot bootimg

# Intel OSIP
1000 search \xFC\xFA\xBC\x00 OSIP bootimg (headerless)
!:strength / 15
0 string $OS$\x00\x00\x01 OSIP bootimg
>52 string \x00\x00\x00\x00 \b, boot (signed)
>52 string \x01\x00\x00\x00 \b, boot (unsigned)
Expand Down
1 change: 1 addition & 0 deletions android_win_tools/find2cpio.bat
@@ -0,0 +1 @@
"%bin%"\find . | "%bin%"\cpio -H newc -R 0:0 -o -F ..\ramdisk-new.cpio 2>nul

0 comments on commit a306806

Please sign in to comment.