Skip to content
This repository has been archived by the owner on Oct 17, 2020. It is now read-only.

AnyKernel3

Zackptg5 edited this page Dec 30, 2019 · 3 revisions

What is AK3?

AK3 is a template for kernels and ramdisk modifications by osm0sis. Check out the repo here for more information on it.

How can I add this to unity?

There's a number of ways you can do this but one way is to:

  1. Include zip binaries in external tools addon (you'll need to compile them from here: https://github.com/Zackptg5/ndkzip or grab them from somewhere else)
  2. Download AnyKernel3 from osm0sis' github and place it in common folder
  3. Add this function wherever you want ak3 to be run (such as in unity_install): run_ak3() { cp -rf $UF/tools/* $MODPATH/common/AnyKernel3/tools cp_ch -i $MODPATH/common/AnyKernel3/META-INF/com/google/android/update-binary $TMPDIR/ak3/META-INF/com/google/android/update-binary 0755 cd $MODPATH/common/AnyKernel3 zip -qr0 $TMPDIR/ak3 . cd / $TMPDIR/ak3/META-INF/com/google/android/update-binary 1 $OUTFD $TMPDIR/ak3.zip }
  4. Comment out all mounting/unmounting stuff in AK3 update-binary if you do this depending on when you run the installer since Unity handles all mounting stuff for regular partitions

The idea is simple. The function copies all tools from unity installer to ak3 (this includes your zip binary and anything else you may be using such as busybox). Then it copies the ak3 update-binary to what will be the working directory for AK3. Finally it creates the zip file for it and runs the zip. I like this way because you can modify the ak3 install files from the main unity mod on the fly in the event there's device specific stuff that needs done

Clone this wiki locally