Commit Graph
211 Commits
Author SHA1 Message Date
osm0sis 020ca6fddb AK3: add support for simple init_boot + vendor_kernel_boot setup
- starting with Pixel 7 series, boot_img_hdr_v4 is now even more complicated, adding 2 more new partitions (init_boot and vendor_kernel_boot) so let's attempt to keep it as simple as we can
- if init_boot partition is detected split up flash files for boot (kernel), init_boot (ramdisk), and vendor_kernel_boot (dtb)
- continue to support current practice of Image* and dtb in zip root by automatically creating a multi-partition AK3 zip setup from these files (ramdisk directory is for the init_boot partition since that's where Magisk and overlay.d will be)

NOTE 1: anykernel.sh must still be setup for multi-parition patching - see the updated Example file for parts to uncomment
NOTE 2: currently magiskboot still does not support unpack/repack of VNDRBOOT v4 multi-ramdisk format (i.e. vendor_boot v4 and vendor_kernel_boot) so if modifications are necessary in these ramdisks they will need to be prebuilt and flashed whole by including vendor_boot.img and/or vendor_kernel_boot.img in the zip root
2022-11-11 22:20:59 -04:00
Chris Renshaw cf1a93136c AK3: separate init_boot and boot partition detections
- both boot for kernel and init_boot for first stage ramdisk access to overlay.d will be needed
- remove ramdisk and recovery_ramdisk from detection since devices which use them also use kernel partition and would need to be multi-partition setups either way
2022-10-19 23:19:09 -03:00
Matthew Alex 042d0ccf6d AK3: add support for vendor_kernel_boot (#75) 2022-10-19 23:07:26 -03:00
Captain Trips 70fb859ec1 lptools: use a different overload of MetadataBuilder::New (#74) 2022-08-27 16:12:55 -03:00
Captain Trips 97794de0a2 AK3: use lptools resize for vendor_dlkm (#73)
- default to replace and fallback to resize when not enough space in super
2022-08-02 17:31:51 -03:00
engstk 330de65c77 tools: update magisk utils to v25.2(25200) stable
Signed-off-by: engstk <eng.stk@sapo.pt>
2022-07-27 12:19:30 -03:00
Chris Renshaw 6e1b5c9cd9 tools: update magisk utils to v25.1(25100) stable 2022-06-20 00:24:11 -03:00
Captain Trips bc736e9ce1 AK3: add support for avb patching (#70)
- this supports custom kernel users to continue not having to fastboot reflash vbmeta with --disable-verity and --disable-verification, now that Magisk 24303+ no longer patches avb out of the fstab on-the-fly at boot time
- checks for an avb option in the fstab entry for the current partition
- if found, it checks if verity or verification is disabled on the top-level vbmeta, and if so, appends a hashtree and FEC data to the partition and updates the hashtree descriptor in the vbmeta partition referenced in the avb option
2022-06-08 13:33:19 -03:00
engstk f81b0b2db6 tools: update magisk utils to v25.0(25000) beta
Signed-off-by: engstk <eng.stk@sapo.pt>
2022-06-07 20:21:32 -03:00
Chris Renshaw c8961dedb8 AK3: silence placeholder cleanup rmdir noise 2022-06-07 20:19:45 -03:00
Captain TripsandChris Renshaw 79cb6945ff AK3: add support for resizing logical partitions (#69)
- add flash_generic support for flashing to dynamic/logical partitions larger than stock using phhusson's lptools binary
- enable full automated support for flashing custom vendor_dlkm.img (note: must NOT be sparse format; factory images are sparse, but images generated from source are not)

Co-authored-by: Chris Renshaw <osm0sis@outlook.com>
2022-04-30 20:01:03 -03:00
osm0sis adb09dcc81 AK3: ensure no template files from beginner devs get to the ramdisk 2022-04-23 18:47:35 -03:00
osm0sis 97d2d7ffd5 AK3: also ensure $comp fallback is a working command for ramdisks 2022-04-10 22:30:19 -03:00
osm0sis c19c5be18c AK3: fix unpack/repack with magiskboot zimage kernel support
- exclude "zimage" as a compression type since magiskboot unpack, split and repack handle it automatically and there is no fallback
- ensure $comp is a working command for all busybox compression fallbacks
2022-04-03 09:19:15 -03:00
osm0sis 991bb673a7 tools: update magisk utils to v24.3(24300) stable 2022-03-10 19:17:40 -04:00
Chris Renshaw 743bb44ed1 AK3: add support for new upstream AOSP init_boot partition
https://android-review.googlesource.com/c/platform/build/+/1882268
2022-03-04 13:45:59 -04:00
Alexander Winkowski 076e748dc3 AK3: Fix patch_fstab function (#66)
Patching system partition entry won't work if system_ext partition is present. Fix this by adding [[:space:]] to the end of the pattern.
Note that grep -w can't be used in this case because there is still a possibility of erroneous matches from grep using / as a whole word delimiter, e.g., logical vendor partition (that is just "vendor") and "/vendor/dsp".
2022-03-04 03:59:38 -04:00
osm0sis 446ad5d85d tools: update magisk utils to v24.2(24200) beta 2022-03-02 09:00:45 -04:00
Alexander Winkowski 3e99a63e92 AK3: fix no_block_display behaviour with flash_generic (#65) 2022-02-01 13:14:43 -04:00
osm0sis af9b68cd4c tools: update magisk utils to v24.1(24100) stable 2022-01-28 22:50:58 -04:00
engstk 52f96e80d2 tools: update magisk utils to v24.0(24000) beta
Signed-off-by: engstk <eng.stk@sapo.pt>
2022-01-26 13:10:40 -04:00
engstk 6aec94e549 tools: update magisk utils to 5f4cd50c (23017) canary
Signed-off-by: engstk <eng.stk@sapo.pt>
2022-01-20 18:06:52 -04:00
engstk 11cb678fb3 tools: update magisk utils to 92546e8a(23016) canary
Signed-off-by: engstk <eng.stk@sapo.pt>
2021-12-15 20:33:34 -04:00
osm0sis fb5fbb1516 AK3: update KEEPVBMETAFLAG -> PATCHVBMETAFLAG for Canary 23016+ 2021-12-15 20:20:27 -04:00
osm0sis 12baa2739a AK3: better backwards compatibility for keep_vbmeta_flag (unset=auto) 2021-12-11 00:12:14 -04:00
osm0sis 6e7fcd6d28 AK3: add magiskboot KEEPVBMETAFLAG support
- some devices fail to boot when magiskboot changes the vbmeta flag is set in the AVBv2 signature from 00 to 03, this allows disabling that behavior
- set keep_vbmeta_flag=1 in anykernel.sh to force it to keep whatever's there, =auto will take it from the existing image if Magisk-patched (Canary 23016 or later), and =0 will allow the default magiskboot behavior
2021-12-10 23:30:24 -04:00
osm0sis 66f42c1951 AK3+Backend: grep cleanups
- fix duplicate kernel version (vertmp) entries from some kernels
- don't use head when grep -m1 will suffice
- fix some (bad) OEM prop files including entries twice, use last entry like live system
2021-12-10 17:34:54 -04:00
Chris Renshaw 08a76000ad AK3: unbreak anykernel scripts using flash_dtbo directly 2021-12-06 13:45:16 -04:00
osm0sis 297d6c3b99 AK3: add flash_generic to reduce code duplication 2021-12-06 10:04:54 -04:00
osm0sis a312a2bdc9 tools: update magisk utils to e097c097(23015+) CI
- adds partial hdr v4 support (cannot currently unpack vendor_boot v4 multi-ramdisk or bootconfig)
- use upstream CI build since it includes an AVBv2 signature padding fix, resolving all known regressions

Closes #61
2021-12-06 08:07:42 -04:00
engstkandosm0sis 2b7f6e8889 AK3: add full vendor_dlkm.img flash support
- Use similar dtbo.img logic
- Support new hdr v4 images without repacking
- Process before boot to safe bail
- No resize available, checks output size and bounces if larger
- Handle block state correctly to fix boot check warning

Co-authored-by: osm0sis <osm0sis@outlook.com>

Signed-off-by: engstk <eng.stk@sapo.pt>
2021-12-04 18:11:38 -04:00
engstk 146f9b27c5 AK3: add full vendor_boot.img flash support
- Use similar dtbo.img logic
- Support new hdr v4 images without repacking
- Process before boot to safe bail

Signed-off-by: engstk <eng.stk@sapo.pt>
2021-12-04 18:11:38 -04:00
osm0sis 446d3caeef tools: update to latest busybox (1.34.1)
Compiled from my own updated fork:
https://github.com/osm0sis/android-busybox-ndk
2021-10-03 14:48:15 -03:00
osm0sis 216eefce20 AK3: fix new .img backup in debugging tgz, multipartition output tweak 2021-07-21 01:49:27 -03:00
osm0sis 3cfdc71d10 AK3: fix systemless modules on single-partition setups 2021-06-09 00:21:21 -03:00
osm0sis 5035d6b7cb AK3+Backend: fix systemless modules on multi-partition setups 2021-06-08 17:00:03 -03:00
osm0sis 484ea072a8 AK3: hide expected potential simple vendor_boot support stderr 2021-06-08 16:54:47 -03:00
osm0sis beff4d4596 AK3: ensure dtbo does not get flashed twice in multi-partition setups 2021-06-08 16:24:20 -03:00
osm0sis 92f9828619 AK3: add vendor_ramdisk support to simple vendor_boot support
- use vendor_ramdisk and vendor_patch directories in zip root to specify changes for vendor_boot flash
2021-06-08 16:16:16 -03:00
osm0sis 83ff0c07a7 AK3: add support for simple vendor_boot dtb replacement
- boot_img_hdr_v3 now has dtb stored in a new partition called vendor_boot
- allow block=vendor_boot partition detection
- support current practice of Image* and dtb in zip root by automatically creating a multi-partition AK3 zip setup from these files (ramdisk directory is assumed to be for the boot partition)
- fix reset_ak current files cleanup
2021-06-08 01:14:03 -03:00
osm0sis 37782872f6 tools: update magisk utils to v23.0(23000) stable 2021-05-12 23:03:10 -03:00
osm0sis b55338ac61 tools: update magisk utils to v22.1(22100) stable 2021-05-09 14:52:11 -03:00
osm0sis 9bd0ed8b73 tools: update to latest busybox (1.33.1)
Compiled from my own updated fork:
https://github.com/osm0sis/android-busybox-ndk
2021-05-09 01:40:53 -03:00
osm0sis 4904913295 AK3: fix unpackbootimg/unpackelf suffixes, fix elf to bootimg repack
- unpackbootimg/unpackelf kernel+ramdisk suffixes were corrected to match their corresponding mkbootimg argument in my latest forked tools (AIK-mobile v3.8)
- fix repack from unpackelf to mkbootimg broken base value introduced with AK3 rewrite
2021-05-03 00:20:08 -03:00
osm0sis 31a3fff8fb tools: update to latest busybox (1.32.1)
Compiled from my own updated fork:
https://github.com/osm0sis/android-busybox-ndk
2021-03-31 19:25:03 -03:00
osm0sis a6b80592a6 tools: update magisk utils to v22.0(22000) stable 2021-02-23 22:16:03 -04:00
osm0sis 8df26b0389 AK3+Backend: cleanups, update *_line functions
- touch up a couple pesky minor things
- add global scope to replace_line and remove_line so they match replace_string, and can now work on all matches found in a file
2021-01-28 17:31:33 -04:00
osm0sis 630f926617 AK3: clean up old style tic 2021-01-20 15:02:52 -04:00
osm0sis 2098b0f030 tools: update magisk utils to v21.4(21400) stable 2021-01-18 15:25:41 -04:00
osm0sis 3d3e21af86 tools: update magisk utils to v21.2(21200) stable 2021-01-14 00:22:50 -04:00