Age | Commit message (Collapse) | Author |
|
- this needs to be before cleanup so busybox will still be there
|
|
- 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
|
|
|
|
|
|
|
|
- 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
|
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
- 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
|
|
- `test -e` could fail due to unexpanded *'s in $target
|
|
|
|
- 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
|
|
|
|
DO NOT MERGE if you have already updated your ramdisk properly for your device
|
|
- 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
|
|
|
|
|
|
|
|
- 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
|
|
- this is a limitation which will need a serious restructuring of the back end and how modules are handled to be resolved properly
|
|
|
|
|
|
- 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)
|
|
|
|
* 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>
|
|
/tmp/updater: line 33: cd: /tmp/anykernel/..: No such file or directory
Closes #41
|
|
|
|
- clean up magiskboot compression type output parsing
|
|
- resolves https://github.com/osm0sis/AnyKernel3/commit/698682123053cab9e3277c9c9df783a97b3e8958 "IMPORTANT NOTE" 1
|
|
- resolves https://github.com/osm0sis/AnyKernel3/commit/698682123053cab9e3277c9c9df783a97b3e8958 "IMPORTANT NOTE" 2, and allows 1 to be supported (via script change in subsequent commit)
|
|
|
|
- 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
|
|
Thanks @Zackptg5
Closes #40
|
|
- 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.)
|
|
- clean up needless $parent stuff
- recovery.log will only be in /tmp regardless of $home
|
|
- 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
|
|
|
|
- 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
|
|
- 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
|
|
|
|
- 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
|
|
|
|
(note these probably require nanddump and nandwrite to access correctly)
|
|
- 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
|
|
- bring in line with XDA thread
|
|
- 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
|