summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-11-03tools: update to latest busybox (1.31.1)osm0sis
Compiled from my own updated fork: https://github.com/osm0sis/android-busybox-ndk
2019-10-29Backend: further fixes for GSIsosm0sis
- ro.vendor.build.product (from #44) doesn't appear to actually exist in nature, so replace it with ro.product.vendor.device for API 28+ devices, per https://github.com/phhusson/vendor_hardware_overlay/issues/25 - no need to check so many props for getprop parsing fallback check, simply look for ro.build.type which all devices should have in antiquity
2019-10-16Backend: break early on getprop failure fallback when value foundosm0sis
2019-10-16Backend: fix getprop and devicecheck for GSIsosm0sis
- add additional prop locations to getprop failure fallback - add vendor props to devicecheck and getprop parsing fallback check to avoid false negatives on GSIs - mask errors from devicecheck getprops as not all of them may exist on GSIs or non-GSIs Thanks @lazerl0rd for the information and start on the changes Closes #44
2019-08-29Backend: fix restore_env $bb commandsChris Renshaw
- this needs to be before cleanup so busybox will still be there
2019-08-27Backend: add /dev/random workaround for recoveryChris Renshaw
- per Chainfire, "fix slow RNG on some devices, which may cause installation to take weeks" - it seems like this issue may have been triggered now in recovery on some devices by some of the changes from the new mounting rewrite
2019-08-21README: add note about including new LICENSE file in zipsChris Renshaw
2019-08-20LICENSE: slight clarifications and touch-upsosm0sis
2019-08-19add LICENSE and compliance notices for binary redistributionosm0sis
2019-08-17Backend: rewrite mount logic to properly cover all casesosm0sis
- use $ANDROID_ROOT variable which in TWRP is set to /system_root on properly set up SAR devices and default set it to /system - continue to correct any issues with /system and /system_root mountpoints but backup and restore any symlinks encountered - only mount and umount /data when it is not mounted to begin with to fix MTP issues in TWRP on some devices (thanks @Zackptg5) - refactor tear down into restore_env() function to allow restoring original recovery environment even after abort - add lazy umounts because let's be thorough - remove hacky workaround to avoid /system_root umount when booted since that should be handled by flashing app now
2019-08-13Backend: mask error on TWRP devices without /system_root in fstabChris Renshaw
2019-08-13Backend: support TWRP devices with /system_root in fstabChris Renshaw
2019-08-12Backend: mounting fixes, simplify ui_printing from filesosm0sis
- rename unmount_all to umount_all since it's been bugging me for a while ;) - refactor mountpoint setup into its own function - try mount --move first since /system should already be mounted (thanks @Zackptg5) - refactor reused script to ui_print from files into its own function
2019-08-07Backend: fix derpChris Renshaw
2019-08-06README: cosmetic changes to match xda threadosm0sis
2019-08-06Backend: ensure /system_root umount even if /system is a symlinkosm0sis
2019-08-06Backend: attempt to fix system_root setup on oddball device recoveriesosm0sis
- TWRP for some devices has /system as a symlink, some do not; apparently some weird devices have /system_root as a symlink (somehow); attempt to fix them all
2019-08-06AK3: fix partition detection taking first match on older devicesosm0sis
- `test -e` could fail due to unexpanded *'s in $target
2019-08-04AK3+Backend: fix multi-line abort outputsosm0sis
2019-07-20AK3: reset_ak: don't remove $ramdisk unless has already been unpackedosm0sis
- running reset_ak before an unpack would remove any included ramdisk files from zip, so only remove if $split_img is detected suggesting an unpack has already occurred
2019-07-20README: update for set_perm and set_perm_recursiveosm0sis
2019-07-20Example: update to use set_perm_recursiveosm0sis
DO NOT MERGE if you have already updated your ramdisk properly for your device
2019-07-20AK3: add file/directory attributes functionsosm0sis
- from my "Complete Shell Script Flashable Zip Replacement" reference thread: https://forum.xda-developers.com/android/software-hacking/dev-complete-shell-script-flashable-zip-t2934449
2019-07-20Backend: remember we needs them busybox awksosm0sis
2019-07-20README: document supported.patchlevelsosm0sis
2019-07-20anykernel: add supported.patchlevelsosm0sis
2019-07-20Backend: introduce Android security patch level check, cleanupsosm0sis
- checks the supported.patchlevels prop in anykernel.sh and matches against it to prevent users flashing incorrect kernels for patch levels - this is possibly more important than supported.versions now since modern Android doesn't really do point releases anymore, so a patch level is more likely to signify breakage than a version change - supported.patchlevels can be a closed or open-ended range of dates in the format YYYY-MM, e.g. "2019-04 - 2019-06", "2019-04 -" or "- 2019-06" where the last two examples show setting a minimum and maximum, respectively - clean up device and version checks a bit while we're at it
2019-07-15README: add caveat about slots + modulesChris Renshaw
- this is a limitation which will need a serious restructuring of the back end and how modules are handled to be resolved properly
2019-07-12Backend: speed up and simplify is_mounted useosm0sis
2019-07-12README: update for optional arch detectosm0sis
2019-07-01AK3: add simple arch detect to optionally support arm + x86 in same ziposm0sis
- for use with broad zips targetting many devices including different architectures - enable support by putting current tools binary contents in tools/arm and adding tools/x86 (thanks @Zackptg5 for the nudge)
2019-06-30tools: update magisk utils to v19.4-05658caf(19305) canaryosm0sis
2019-06-26Backend: use recovery umount for /vendorwloot
* It is a *HACK* * Avoid "Mount /cust (Device or resource busy) failed" error on orangefox which mounting /cust as /vendor and also runing a non-treble ROM. * It is a Orangefox feature that mount both /vendor and /cust while runing a non-treble ROM (Obviously, there is a BUG that it shouldnt mount both but /cust only), so both of them have a same block. In this case, normal busybox unmount will only un-mount what we inputted. I guess that orangefox hacked umount command to make /cust is binding with /vendor. (See comments in #41) Signed-off-by: wloot <wlootlxt123@gmail.com>
2019-06-26Backend: fix getting parent directory on some deviceswloot
/tmp/updater: line 33: cd: /tmp/anykernel/..: No such file or directory Closes #41
2019-06-24tools: update magisk utils to v19.4-1058aeb0(19302) canaryosm0sis
2019-06-17AK3: better living through sedosm0sis
- clean up magiskboot compression type output parsing
2019-06-15AK3: fix support for forced uncompressed cpio ramdisk repacksosm0sis
- resolves https://github.com/osm0sis/AnyKernel3/commit/698682123053cab9e3277c9c9df783a97b3e8958 "IMPORTANT NOTE" 1
2019-06-15tools: update magiskboot to v19.4-ee407472(19301)osm0sis
- resolves https://github.com/osm0sis/AnyKernel3/commit/698682123053cab9e3277c9c9df783a97b3e8958 "IMPORTANT NOTE" 2, and allows 1 to be supported (via script change in subsequent commit)
2019-06-12README: update to emphasize final kernel build product shouldn't be renamedosm0sis
2019-06-12Example: remove more things confusing to new adoptersosm0sis
- remove zImage since people were still thinking they needed to rename their kernel build product to zImage to have it work, while actually all filenames are detected and supported automatically, whether it's called zImage, zImage-dtb, Image.gz, Image.gz-dtb, Image.lz4-dtb, whatever (https://github.com/osm0sis/AnyKernel3/blob/7ccf4d62cede0527b7d895a8255f18b9b56046cc/tools/ak3-core.sh#L228); in fact it's extra important it be named correctly now with AK3 using magiskboot so that any appended *-dtb is supported correctly and doesn't get appended multiple times in subsequent flashes - remove pointless patch file examples - add unified tuna variant name just because I feel like it since it's otherwise not a working example anymore DO NOT MERGE if you have already updated your ramdisk/anykernel.sh properly for your device
2019-06-12AK3: fix signing derpChris Renshaw
Thanks @Zackptg5 Closes #40
2019-06-10AK3: allow ChromeOS auto-detect, clean up signing, fixesosm0sis
- since magiskboot has built-in detection for the ChromeOS image pre-header signature, allow it to be auto-detected and if futility and signing files are present re-sign automatically (thanks @Zackptg5 for the nudge) - simplify signing and error catching - fix typo breaking ramdisk_recovery partition detection - hide expected stderr for formats where some files may not exist (cmdline for ELF, etc.)
2019-06-10Backend: avoid tar complaining when there is no recovery.logChris Renshaw
- clean up needless $parent stuff - recovery.log will only be in /tmp regardless of $home
2019-06-09Backend: only take relevant files for debug .tgzChris Renshaw
- per suggestion from eng.stk avoid archiving all of $home since /tmp in recovery might hold sensitive crypto data - restrict tar to $home (i.e. /tmp/anykernel by default) and $parent/recovery.log (i.e. /tmp/recovery.log) - probably no need to be verbose when making the archive, it kinda clutters up the end of the captured log
2019-06-07AK3: clean up "OG AK" mode stderr on images with no kernel/ramdisk presentosm0sis
2019-06-07AK3: be clear when unpack_ramdisk fails because there is no ramdiskosm0sis
- previously this was failing a bit too spectacularly for my liking since $comp would erroneously get set to "fopen: ramdisk.cpio failed with 2: No such file or directory" - on devices where there is no ramdisk.cpio unless rooted with Magisk this will indicate better to developers working on the device that they should be using "OG AK" mode to avoid trying to unpack a ramdisk which may or may not exist
2019-06-07Backend: fix debugging .tgz creation for booted installsosm0sis
- some apps copy the zip to be flashed to the app cache, which would result in the .tgz going either somewhere unknown/inaccessbile to the user or get deleted when the app cleans up after flash, so instead send to /sdcard if the device is booted to Android
2019-06-06AK3: also make mtd partition detection variables localosm0sis
2019-06-06AK3: cleanups and fixes to config/setup functionsosm0sis
- simplify rdtmp and $ramdisk creation and keep only in `unpack_ramdisk` - fix `reset_ak` and `setup_ak` behavior if run before $block is set - only save boot.img and boot-new.img in *-files subdirectories on multi-partition setups since otherwise the tmpfs (in recovery) and ext4 .img (when booted) size usage gets quickly out of hand - fix slot_select=inactive when used with block=auto or block=boot partition detection
2019-06-05tools: update magisk tools to v19.3(19300) stableosm0sis