Commit Graph

  • dfcfb87e6e Backend: support for upcoming recovery addon.d-v2 - for FlashAfterUpdate addon.d-v2 support while in recovery - recovery addon.d-v2 requires /system and /system_root stay mounted osm0sis 2020-02-04 16:08:25 -04:00
  • 6bc4d96d3d Backend: add additional BOOTCLASSPATH entry for /apex mounts osm0sis 2020-02-03 19:59:01 -04:00
  • 3e5c6ba739 Backend: fix /system/bin/* execution on recoveries using LD_CONFIG_FILE osm0sis 2020-02-03 17:07:08 -04:00
  • ccb19a8337 tools: update magisk utils to v20.4-ed58cf95(20304) canary - fix lzop detection use-case of magiskboot decompress which was broken in the generic stream refactor osm0sis 2020-02-03 13:30:13 -04:00
  • e666adc66f AK3+Backend: mount and output fixes - fix case where TWRP has /system_root mountpoint but ROM is non-SAR - fix regression in ui_print when final character is \ osm0sis 2020-01-31 20:08:29 -04:00
  • ebd2b04b2c Backend: work around some Lineage 17 (AOSP Q) Recovery issues - Lineage 17 Recovery has some problems currently: /system mountpoint in ramdisk, neither /system nor /system_root in fstab (it has / instead, which is useless), ANDROID_ROOT=/system, and no /system_root symlink - /etc is linked to /system/etc so once /system is mounted /etc/fstab is gone and no further simple mount commands will work so move other mounts before /system - /system/bin are the only utilities available on PATH with none at all in /sbin so we need /apex files mounted immediately or no non-busybox commands will work after mounting /system over the recovery's skeleton /system - not all devices have /dev/block/bootdevice symlinks, but at some point "broken recovery is broken" has to apply, so I don't intend to build out full system partition discovery for the SAR mount fallback osm0sis 2020-01-29 14:24:41 -04:00
  • c35c7ce358 AK3+Backend: /postinstall and opposite slot awareness for FlashAfterUpdate addon.d-v2 support - for A/B OTAs my FlashAfterUpdate addon.d script requires the zip to know about addon.d-v2 and act accordingly - signify support with #FLASHAFTERUPDATEV2 tag in updater-script to pass whitelist check since the majority of zips will not work correctly osm0sis 2020-01-27 16:25:21 -04:00
  • 03af96a541 Backend: fixes for mounting system on Lineage Recovery - Lineage has a mindboggling: /system_root as mountpoint in ramdisk, neither /system nor /system_root in fstab (it has / instead, which is useless), ANDROID_ROOT=/system, and a possible symlink from /system to /system_root/system - this failure to have a sensible, working fstab triggers the fallback to mounting directly from /dev/block/bootdevice which should exist on all modern devices which would need this SAR fallback - add basic slot support for the fallback mount, since Lineage Recovery also doesn't make symlinks to the active slot partitions osm0sis 2020-01-27 15:28:11 -04:00
  • b772cca3ac Backend: put debugging down where it belongs too osm0sis 2020-01-26 10:32:11 -04:00
  • 062b44c75a Backend: work around ongoing TWRP SAR support fragmentation TWRP now has 3(!) different competing implementations of SAR currently in use by maintainers: 1) /system as mountpoint in ramdisk/fstab and ANDROID_ROOT=/system, and possible symlink from /system_root to /system 2) /system_root as mountpoint in ramdisk/fstab, ANDROID_ROOT=/system_root, and possible symlink from /system to /system_root/system 3) /system_root as mountpoint in ramdisk/fstab, ANDROID_ROOT=/system, and possible symlink from /system to /system_root/system osm0sis 2020-01-24 14:54:39 -04:00
  • be5c08b520 Backend: overdue clean up and refactor - move checks to functions to isolate single-use variables as local - signify globally available variables with capitalization - move setup and mount to functions to mirror umount_all and restore_env - cluster functions by use order (no call should preceed its function) - use short circuit return tests to reduce indentation now that we use functions osm0sis 2020-01-24 09:39:29 -04:00
  • 7fb9efdb63 Backend: fix link restoration post-install osm0sis 2020-01-21 06:16:45 -04:00
  • 29210bc492 README: document do.systemless, update and sync with XDA thread osm0sis 2020-01-18 07:22:22 -04:00
  • 13dd1067a3 anykernel: add do.systemless osm0sis 2020-01-18 07:22:09 -04:00
  • b37d7e225f AK3+Backend: introduce systemless kernel modules support - with do.systemless prop enabled in anykernel.sh, will push the contents of modules/ to create a simple "ak3-helper" Magisk module, where testing on devices thus far shows it loads early enough that even replacement kernel object .ko modules will get loaded - the ak3-helper module info is populated from the kernel.string and parsed kernel version from the kernel being flashed, and if at boot time a different kernel is detected the module automatically removes itself before being loaded to avoid conflicts - since logical partitions and ext4-dedup on Android 10 now prevent mounting /system or /vendor rw under any circumstances, this feature gives kernel developers back the freedom they had before all this to improve kernel .ko modules, .conf files, etc. with the added bonus of it cleaning up after itself osm0sis 2020-01-18 07:21:46 -04:00
  • 0a712cce0d AK3: add stderr hints for signing debugging osm0sis 2020-01-16 01:20:48 -04:00
  • 21ee68f5a8 AK3: clean up and simplify Magisk patch logic - only repatch when there is an Image* (i.e. don't attempt on ramdisk-only mods) - make sure new ramdisk is already copied before trying to detect Magisk patch state in case it changed - clean up Magisk patch state and exported variables immediately osm0sis 2020-01-16 00:40:04 -04:00
  • bd279e6cba Backend: fix dalvikvm execution in recovery on Android 10 osm0sis 2020-01-15 12:38:24 -04:00
  • d225890532 Backend: don't attempt to unmount /system_root when booted - work around booted flashing apps like FKM/EXKM which make /system busy to keep it from being unmounted but can't do the same with /system_root which can lead to sketchy behavior osm0sis 2020-01-15 11:49:40 -04:00
  • 3f60a5e1e2 AK3: fix false positive Magisk detection after reset_ak osm0sis 2020-01-15 11:04:36 -04:00
  • d3d853ac82 AK3: only attempt to dump .magisk config if patch found osm0sis 2020-01-13 01:17:19 -04:00
  • 23dd83d8e4 AK3: auto kernel patch improvements - also check patch status as part of repack_ramdisk() to avoid any issues if developer is forcing a compression format change - get full Magisk patch status value and extract Magisk config to export correct environment variables for dtb patching osm0sis 2020-01-13 01:03:22 -04:00
  • bf9e9fd487 AK3: only attempt fallback kernel decompression if format was identified osm0sis 2020-01-12 23:32:16 -04:00
  • 4bae117013 AK3: fix AVBv1 signing on Android 10 osm0sis 2020-01-12 16:14:39 -04:00
  • ef24a09b51 AK3: auto split Image.*-dtb to kernel/kernel_dtb + re-patch for Magisk osm0sis 2020-01-12 05:14:20 -04:00
  • 810de5296f Backend: APEX mounts support improvements osm0sis 2020-01-12 02:22:30 -04:00
  • d2e55da124 tools: update magisk utils to v20.3(20300) stable osm0sis 2020-01-09 21:59:36 -04:00
  • 648f23fdaa Should only run in recovery Zackptg5 2020-01-04 16:35:19 -05:00
  • bb144e1a51 Add apex mount/umount (#48) Zackptg5 2020-01-03 13:16:14 -05:00
  • dd041bafe9 tools: update magisk utils to v20.2(20200) stable osm0sis 2020-01-02 12:17:25 -04:00
  • 9ece27131a tools: update magisk utils to v20.1(20100) stable osm0sis 2019-11-03 03:22:30 -04:00
  • 02f4d2d35e tools: update to latest busybox (1.31.1) Compiled from my own updated fork: https://github.com/osm0sis/android-busybox-ndk osm0sis 2019-11-03 03:20:42 -04:00
  • beec6a6114 Backend: further fixes for GSIs - 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 osm0sis 2019-10-29 17:22:08 -03:00
  • 07def96480 Backend: break early on getprop failure fallback when value found osm0sis 2019-10-16 17:15:28 -03:00
  • 6515f57493 Backend: fix getprop and devicecheck for GSIs - 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 osm0sis 2019-10-16 17:05:52 -03:00
  • 98b1ac602f Backend: fix restore_env $bb commands Chris Renshaw 2019-08-29 01:27:02 -03:00
  • c6ccb4fa4e Backend: add /dev/random workaround for recovery Chris Renshaw 2019-08-27 13:37:49 -03:00
  • abc56fc3f4 README: add note about including new LICENSE file in zips Chris Renshaw 2019-08-21 22:56:27 -03:00
  • 9763d0d757 LICENSE: slight clarifications and touch-ups osm0sis 2019-08-20 13:04:19 -03:00
  • 6332a27ca6 add LICENSE and compliance notices for binary redistribution osm0sis 2019-08-19 16:18:21 -03:00
  • a88936cd00 Backend: rewrite mount logic to properly cover all cases - 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 osm0sis 2019-08-17 22:48:51 -03:00
  • e2987e3947 Backend: mask error on TWRP devices without /system_root in fstab Chris Renshaw 2019-08-13 20:36:00 -03:00
  • ff4f310e3a Backend: support TWRP devices with /system_root in fstab Chris Renshaw 2019-08-13 09:16:34 -03:00
  • 01db339f65 Backend: mounting fixes, simplify ui_printing from files - 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 osm0sis 2019-08-12 23:40:53 -03:00
  • 4f722f3d67 Backend: fix derp Chris Renshaw 2019-08-07 00:31:31 -03:00
  • 97889f80ba README: cosmetic changes to match xda thread osm0sis 2019-08-06 20:11:19 -03:00
  • 146c834d0f Backend: ensure /system_root umount even if /system is a symlink osm0sis 2019-08-06 20:10:53 -03:00
  • 950b68a1d7 Backend: attempt to fix system_root setup on oddball device recoveries - 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 osm0sis 2019-08-06 19:12:00 -03:00
  • 0e3b7304e6 AK3: fix partition detection taking first match on older devices - test -e could fail due to unexpanded *'s in $target osm0sis 2019-08-06 18:46:47 -03:00
  • f3f80014cc AK3+Backend: fix multi-line abort outputs osm0sis 2019-08-04 01:16:54 -03:00
  • 958b2c873a AK3: reset_ak: don't remove $ramdisk unless has already been unpacked - 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 osm0sis 2019-07-20 23:12:51 -03:00
  • f1494f366d README: update for set_perm and set_perm_recursive osm0sis 2019-07-20 21:12:49 -03:00
  • 96f961b239 Example: update to use set_perm_recursive DO NOT MERGE if you have already updated your ramdisk properly for your device osm0sis 2019-07-20 21:10:37 -03:00
  • 84d9032606 AK3: add file/directory attributes functions - 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 osm0sis 2019-07-20 20:50:50 -03:00
  • 559a6082e8 Backend: remember we needs them busybox awks osm0sis 2019-07-20 18:43:02 -03:00
  • 0bd7ab9deb README: document supported.patchlevels osm0sis 2019-07-20 18:36:13 -03:00
  • 3b554e8bc5 anykernel: add supported.patchlevels osm0sis 2019-07-20 18:23:48 -03:00
  • e4a907b745 Backend: introduce Android security patch level check, cleanups - 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 osm0sis 2019-07-20 18:11:33 -03:00
  • bb013da815 README: add caveat about slots + modules Chris Renshaw 2019-07-15 14:00:31 -03:00
  • c2d3d2513b Backend: speed up and simplify is_mounted use osm0sis 2019-07-12 21:07:16 -03:00
  • 823e8a6cfa README: update for optional arch detect osm0sis 2019-07-12 20:18:52 -03:00
  • 6872cf5977 AK3: add simple arch detect to optionally support arm + x86 in same zip - 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 osm0sis 2019-07-01 17:42:34 -03:00
  • d3363b7dcb tools: update magisk utils to v19.4-05658caf(19305) canary osm0sis 2019-06-30 23:56:41 -03:00
  • db390aaafe Backend: use recovery umount for /vendor wloot 2019-06-23 20:28:24 +08:00
  • a7af28e25b Backend: fix getting parent directory on some devices wloot 2019-06-25 16:04:21 +08:00
  • 46614b2f84 tools: update magisk utils to v19.4-1058aeb0(19302) canary osm0sis 2019-06-24 12:28:12 -03:00
  • 4e403f12e5 AK3: better living through sed - clean up magiskboot compression type output parsing osm0sis 2019-06-17 23:01:04 -03:00
  • 3685456911 AK3: fix support for forced uncompressed cpio ramdisk repacks - resolves https://github.com/osm0sis/AnyKernel3/commit/698682123053cab9e3277c9c9df783a97b3e8958 "IMPORTANT NOTE" 1 osm0sis 2019-06-15 21:27:44 -03:00
  • 6b8b178c12 tools: update magiskboot to v19.4-ee407472(19301) - resolves https://github.com/osm0sis/AnyKernel3/commit/698682123053cab9e3277c9c9df783a97b3e8958 "IMPORTANT NOTE" 2, and allows 1 to be supported (via script change in subsequent commit) osm0sis 2019-06-15 21:27:10 -03:00
  • a82b99ce24 README: update to emphasize final kernel build product shouldn't be renamed osm0sis 2019-06-12 22:35:05 -03:00
  • 9f9182ecda Example: remove more things confusing to new adopters - 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 osm0sis 2019-06-12 22:34:23 -03:00
  • 7ccf4d62ce AK3: fix signing derp Chris Renshaw 2019-06-12 16:52:29 -03:00
  • 6d25afd03a AK3: allow ChromeOS auto-detect, clean up signing, fixes - 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.) osm0sis 2019-06-10 22:59:49 -03:00
  • a48ce68a7c Backend: avoid tar complaining when there is no recovery.log - clean up needless $parent stuff - recovery.log will only be in /tmp regardless of $home Chris Renshaw 2019-06-10 00:01:13 -03:00
  • 16b147e939 Backend: only take relevant files for debug .tgz Chris Renshaw 2019-06-09 23:41:07 -03:00
  • e4497f231e AK3: clean up "OG AK" mode stderr on images with no kernel/ramdisk present osm0sis 2019-06-07 23:27:55 -03:00
  • bf38d208c8 AK3: be clear when unpack_ramdisk fails because there is no ramdisk - 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 osm0sis 2019-06-07 21:35:10 -03:00
  • da324c430f Backend: fix debugging .tgz creation for booted installs - 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 osm0sis 2019-06-07 17:03:38 -03:00
  • 76d59d67e6 AK3: also make mtd partition detection variables local osm0sis 2019-06-06 16:04:43 -03:00
  • ad665cc95f AK3: cleanups and fixes to config/setup functions - 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 osm0sis 2019-06-06 15:42:40 -03:00
  • 725e3a0006 tools: update magisk tools to v19.3(19300) stable osm0sis 2019-06-05 20:33:59 -03:00
  • 192ccc94d3 AK3: support MTK /dev/bootimg and /dev/recovery partition matching (note these probably require nanddump and nandwrite to access correctly) osm0sis 2019-06-04 23:45:47 -03:00
  • 97de781a55 AK3: resolve non-zero return code introduced by cat <img> /dev/zero > <block> - the expected "cat: write error: No space left on device" gives a non-zero return code so always return true - devices that flash dtbo abort since the return code would get passed back to the Backend and silently fail as the final command in anykernel.sh (via write_boot), so catch seperately with a proper error message for other image write methods osm0sis 2019-06-02 19:15:47 -03:00
  • 5fdf659d01 README: updates and touchups for AK3 - bring in line with XDA thread osm0sis 2019-06-02 16:21:43 -03:00
  • 24032c0732 AK3: allow workaround for dtbo devices with cat /dev/zero issues - some device recoveries (e.g. TWRP for wahoo) seem to have issues with the new cat <image> /dev/zero > <block> method of flashing, so allow setting customdd="bs=1048576" shell variable in anykernel.sh to work around this by reverting back to dd wipe+flash for dtbo as it does with boot osm0sis 2019-06-02 15:44:49 -03:00
  • c8d087bbad AK3: fix elftool repack cmdline handling Chris Renshaw 2019-06-01 01:30:56 -03:00
  • a10312941a README: Update for AK3 osm0sis 2019-06-01 00:00:40 -03:00
  • 8724d88159 anykernel: Update for AK3 osm0sis 2019-06-01 00:00:17 -03:00
  • cba94d3103 tools: rename ak2-core.sh to ak3-core.sh osm0sis 2019-05-31 23:59:39 -03:00
  • 6986821230 Welcome to AK3: AnyKernel2 + Magisk = AnyKernel3! - abstract out execution directory as $home to fascilitate testing individual scripts (defaults to /tmp/anykernel) - general script clean ups for uniformity, readability, speed and simplicity - simplify consecutive ui_print commands where possible osm0sis 2019-05-31 23:49:18 -03:00
  • 6672e75f54 README: cosmetic changes to match XDA thread osm0sis 2019-05-10 11:51:19 -03:00
  • 1bd118035f AK2: underp opposite slot case osm0sis 2019-05-10 02:35:10 -03:00
  • ef2edf7e47 README: update for multi-slot zip instructions osm0sis 2019-05-09 16:22:19 -03:00
  • 1a143d7306 AK2: add support for multi-slot zips - extend reset_ak with reset_ak keep which will keep files to be available to patch the other slot - add optional slot_select=inactive shell variable to force inactive slot during slot detection osm0sis 2019-05-09 16:13:47 -03:00
  • c3e298ecc6 AK2: add U-Boot RAMDisk uImage support osm0sis 2019-05-01 11:04:13 -03:00
  • a24e07f0d2 README: update for Intel OSIP mboot, customdd, touchups osm0sis 2019-04-18 22:09:41 -03:00
  • a38790caed AK2: add $OS$ header Android image format support - add built-in support for mboot for Intel OSIP devices (see: https://github.com/osm0sis/mboot) osm0sis 2019-04-18 21:56:30 -03:00
  • d3792a4856 AK2: fix dump failures for unpackelf and dumpimage (with ramdisk) osm0sis 2019-04-18 21:53:23 -03:00
  • 525a1bd826 AK2: add AOSP boot_img_hdr_v2 support (READ NOTES) - AOSP has added --dtb, so to avoid conflicts *unpackbootimg and unpackelf have had what was previously dumped as *-dtb renamed to *-dt - the same corresponds to any replacement version of these included in the zip root, i.e. they are now dt or dt.img for the old style from before hdr_v1, and dtb or dtb.img for the new style for hdr_v2 osm0sis 2019-04-18 10:09:43 -03:00
  • e11482bdec AK2: fix unpack for latest U-Boot tools (v2019.04) update - v2019.04 changed the order and arguments for the U-Boot dumpimage tool osm0sis 2019-04-18 09:43:01 -03:00