Commit Graph
75 Commits
Author SHA1 Message Date
osm0sis 092a3b3880 AK2: add more compression types and Image.fit (ChromeOS) to zImage checks 2017-02-27 16:39:13 -04:00
osm0sis c709fd50f5 AK2: add ChromeOS support
- add built-in support for futility for ChromeOS devices (see https://github.com/osm0sis/futility)
- small path cleanup since we generally need to be in /tmp/anykernel for post-repack anyway
2017-02-27 16:35:32 -04:00
osm0sis 36109b8e30 README+Example: remove do.init.d references 2017-02-27 16:12:53 -04:00
osm0sis b663e79a19 Backend: remove init.d directory creation
- fairly pointless and seemed to confuse new adopters, who thought it alone added init.d support to a ROM
2017-02-27 16:11:35 -04:00
axxx007xxxz f7992be0a3 Introduce cleanuponabort
This option allow to remove the working directory in case of abort; disabled by default.
2017-02-27 16:06:04 -04:00
axxx007xxxz 2129ee98e2 META-INF: update-binary: Clean up before starting the flashing process
In this way if there were files left from previous installations they get deleted.
2017-02-27 16:06:03 -04:00
axxx007xxxz 7aebdb2efd META-INF: update-binary: Make cleanup a function 2017-02-27 16:06:01 -04:00
axxx007xxxz bcf3dc5055 Switch to a null zImage
This makes the repo 3,2MB smaller. :p
2017-02-27 16:05:59 -04:00
osm0sis d924f79ac6 Example: clean out tuna ramdisk files
- these seem to confuse new adopters, so end up left in the ramdisks of various devices where they are not applicable

DO NOT MERGE if you have already updated your ramdisk properly for your device
2017-02-27 16:01:15 -04:00
osm0sis 7d9d56d453 AK2: make backup only backup when needing backup 2017-02-02 18:26:39 -04:00
osm0sis b6d48eed5e AK2: add MTD device support and dd wiping
- add built-in support for mtd-utils (nanddump, flash_erase, nandwrite) for MTD-based Android devices that do not work with dd
- wipe boot block with dd before write to be clean/safe (SuperSU zip also does this)

Known working mtd-utils ARM binaries can be found in my FlashIt v2.5 package:
https://forum.xda-developers.com/showthread.php?t=2239421
2017-02-02 15:52:09 -04:00
osm0sis a531fff38b AK2: add ELF support (repacks as boot.img for unlocked bootloaders)
- add built-in support for unpackelf for Sony ELF devices (see: https://github.com/osm0sis/unpackelf)
- kernel section is not gzipped on ELF devices with non-QCDT/non-ELF dtb, which needs compression and the dtb appended before it can be repacked (thanks @tobiaswaldvogel)
2017-02-02 15:01:59 -04:00
osm0sis 6fa951efa1 AK2: simplify zImage checks and expand to cover Image.gz, etc. 2017-02-02 14:03:12 -04:00
osm0sis 846f9d5f25 tools: update to latest builds, including busybox (1.26.2)
Compiled from my own updated forks:
https://github.com/osm0sis/mkbootimg
https://github.com/osm0sis/android-busybox-ndk

ARM binaries; see AIK-mobile v2.5 for other architectures and optional binaries:
https://forum.xda-developers.com/showthread.php?t=2073775
2017-02-02 13:37:47 -04:00
osm0sis a16879e4ca Backend: support /system/system (Pixel layout) for do.initd+do.modules 2017-01-16 15:18:21 -04:00
osm0sis c13647eb2e AK2: add MTK support, insert_line fix
- add built-in support for mkmtkhdr for mtk devices (see: https://github.com/osm0sis/mkmtkhdr)
- fix insert_line when inserting after the last line
2017-01-04 02:08:43 -04:00
osm0sis 8f5c3287a7 Backend: actually fix Nougat toybox mount a la 0ab42ee3ec
- sigh.. option order also matters
2016-12-12 15:58:19 -04:00
osm0sis 5bde2c094a AK2: split functions into ak2-core to make syncing easier for devs going forward 2016-11-30 23:45:28 -04:00
osm0sis 0ab42ee3ec Backend: Fixes for mount on certain Nougat+ toybox implementations 2016-11-30 21:24:07 -04:00
Chris Renshaw c9d8dd2d52 README update 2016-11-27 03:12:06 -04:00
osm0sis eeddea9c3b AK2: add support for slot-based systems (ie. Pixel support!)
- new shell variable "is_slot_device" to enable slot suffix detection
("block" shell variable remains the partition filepath minus the suffix)

Notes: on slot-based systems now the boot.img contains only the recovery ramdisk, not rootfs, by default, but when rooted contains both, with rootfs in /boot. Since modifications to both recovery and (when rooted) boot ramdisks are now possible through AK2 no other behavior is changed so that the dev may modify what they wish, e.g. to add files to rooted boot ramdisk put them in AK2's ramdisk/ folder in a boot/ subfolder, and to make modifications to rooted boot files add "boot/" to the filenames used with the commands.
2016-11-26 10:25:15 -04:00
osm0sis 8534510bf8 AK2: add os_version/os_patch_level support
(unpack/mk support already in latest binaries)
2016-11-24 09:53:56 -04:00
osm0sis edf85e5599 tools: update to latest builds, including patched busybox (1.25.1)
Compiled from my own updated forks:
https://github.com/osm0sis/mkbootimg
https://github.com/osm0sis/android-busybox-ndk

Added upstream patches:
https://git.busybox.net/busybox/patch/?id=85100a7067a51c5e6720c0a738317cc2144ab219
https://git.busybox.net/busybox/patch/?id=69312e87b008363575a6d6603f54f94d8150e1cc
2016-11-24 09:24:28 -04:00
osm0sis b15f5b53ef README: a couple more markdown fixups 2016-11-14 04:27:34 -04:00
Chris Renshaw 963d7d9d36 Merge pull request #7 from DroidThug/patch-1
Make it pretty, I say
2016-11-04 14:01:19 -03:00
Sai Vishal 26d385cfaa README: Make it pretty! 2016-11-04 13:34:26 +00:00
osm0sis 641a1b5a09 AK2: make section functions less potentially destructive
- still unable to do an actual tweak check due to grep being limited to single lines, but..
- have them check to at least ensure there's a match for end string that comes after begin string so the sed should function without any chance of removing more than intended
2016-10-12 14:06:14 -03:00
Chris Renshaw 59c1c5d596 Merge pull request #5 from attack11/master
Add Support to ZImage-dtb (dtb its already appended)
2016-10-04 11:16:44 +00:00
attack11 6dac3cae51 Add Support to ZImage-dtb (dtb its already appended) 2016-09-29 16:27:02 -03:00
osm0sis 6d74e18cee AK2: add support for configurations that require mkbootfs in tools 2016-09-21 20:09:12 -03:00
osm0sis 3557b290f2 AK2: explicitly only take the first match in functions using line matching 2016-08-16 02:22:34 -03:00
osm0sis d0a43839fe AK2: automatically escape forward slashes (/) for section functions
- use simple replacement to automatically escape forward slashes (/) to make remove_section and replace_section perform like the other functions, since they are needed as part of a sed /pattern/,/pattern/d delete operation
- update documentation
2016-07-01 12:35:42 -03:00
osm0sis fc41148d62 tools: update busybox to latest version and official patches (1.24.2) 2016-03-30 23:35:30 -03:00
osm0sis ea57ded2c2 AK2: simplify new contains(), adjust placement, and update documentation 2016-03-16 14:08:50 -03:00
osm0sis a5bb583af5 tools: update busybox to latest patched build to fix df, etc.
Compiled from my own updated fork:
https://github.com/osm0sis/android-busybox-ndk
2016-03-16 13:55:26 -03:00
Chris Renshaw 9837f61836 Merge pull request #4 from airend/AnyKernel2
anykernel.sh: Add a simple substring matching function
2016-03-16 13:54:07 -03:00
D. Andrei Măceș 756479498b anykernel.sh: Add a simple substring matching function
Based on the discussion here: http://stackoverflow.com/a/8811800.
2016-03-09 12:01:03 -05:00
osm0sis f0bc44a8db Backend: use included busybox to create install environment symlinks
- fixes flashing slowdown in TWRP 3.0.0: TWRP3 (currently) appears to have a bugged busybox/ln command which takes an excessive amount of time, no reason not to use our own instead
2016-02-23 17:00:19 -04:00
osm0sis cbcbc49e13 Backend: Add check for whether busybox symlink setup succeeded, fixes
- fail on recoveries where symlinking our busybox environment doesn't work (CM Recovery on some devices)
- use the included busybox for awk since toybox is lacking (CM Recovery)
2016-02-16 16:42:18 -04:00
osm0sis d05847d1ec tools: update to latest builds, including latest busybox patches
Compiled from my own updated forks:
https://github.com/osm0sis/mkbootimg
https://github.com/osm0sis/android-busybox-ndk
2016-02-05 17:13:46 -04:00
osm0sis 408d06aff0 Backend+AK2: misc fixes
- fix fallback broken unzip detection now that we create a subdirectory prior
- probably best to execute the bump/loki/whatever script using our included ash shell instead of the recovery sh.
2016-01-24 13:32:13 -04:00
osm0sis a3cacd662e AK2: fix patch_fstab for block, mount & flags
- shell replacement was too weak and caused mangled output
2016-01-24 13:32:11 -04:00
osm0sis c79016cd39 Backend: workaround toybox inclusion in Cyanogen Recovery
- add busybox to the zip to provide a uniform expected environment
- set up busybox symlinks in /tmp and execute anykernel.sh from a shell created with these at the front of the path, overriding the recovery applets
2016-01-24 13:31:55 -04:00
osm0sis 65520217ef AK2: add remove_section, update documentation with note regarding escapes 2016-01-14 15:51:59 -04:00
osm0sis 8c64041208 AnyKernel2: fix patch_fstab, add replace_section
- correct typo that was breaking patch_fstab
- add function to replace entire sections of files by selecting the first and last lines of the section using search strings and replacing it entirely with a new string
2016-01-10 04:15:24 -04:00
osm0sis bd4ba60cc5 AnyKernel2: custom user script support, fixes
- fix copy of any subdirectories under modules/
- adjust display of modules installation text to match the others
- add support for custom user scripts (at /data/custom_boot_image_patch.sh - same as latest SuperSU zips) to automatically execute before reflashing the rebuilt boot image for bump, loki etc. modifications
2015-12-23 13:19:32 -04:00
osm0sis af7a85316b Backend fixes: unzip error catching, only mount system rw if necessary
- initial unzip verification to catch it early on broken recoveries/zips
- display the matching name during the devicecheck while installing
- mount /system ro for the off-chance getprop relies on build.prop (older recoveries), and only remount rw if init.d or modules need to be setup/installed to fix/workaround TWRP's "mount only as ro" feature being finicky and allow /system to remain untouched on devices supporting systemless root.
- add signing documentation to README
2015-12-04 10:16:13 -04:00
osm0sis 5112f2e4ae AnyKernel2: various fixes, new features
- fix insert_line to perform more as expected by adding a newline automatically
- add updated arm mkbootimg+unpackbootimg binaries from my AIK Build Farm, see my repos for changes
- rewrite backend to use proper exit codes from anykernel.sh now that it is shell
- fix ui_print and specific error messages by passing the outfd to anykernel.sh from the backend
- add error messages for unpacking and repacking ramdisk, and make resulting image size check into its own error message
- fix for cpio overwriting AK2 ramdisk files on some recoveries by using a tmp directory
- add further ramdisk unpack verification by checking that there are actually files in the ramdisk directory prior to moving the tmp files back
- add insert_file function to make multi-line additions easier
- add patch_fstab function to greatly simplify mount option/flag changes (thanks @Khaon for the idea)
2015-11-17 11:05:58 -04:00
osm0sis e16e544f62 example: correct formatting 2015-11-17 11:04:44 -04:00
Chris Renshaw 5d78db5bbb Merge pull request #2 from Myself5/master
Fix flashing of zips inside directories with spaces in their names
2015-07-29 09:33:35 -03:00