summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXnopyt2020-10-22 19:55:32 +0100
committerXnopyt2020-11-01 21:37:17 +0000
commitb47f81db756c35f7f5fd1f1308a44afc41717bda (patch)
tree08d2161331b9bbaffa54cd84e19fc089fcf95411
parent2dbb314718e1109ca05a40e904a7490e42866d8b (diff)
downloadaur-b47f81db756c35f7f5fd1f1308a44afc41717bda.tar.gz
Add Magisk support
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD26
-rw-r--r--init-magisk.sh7
-rw-r--r--magisk-init-rc.patch16
5 files changed, 57 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4a6ae8d139e9..cb22964e7805 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
-pkgbase = anbox-image-gapps
- pkgdesc = Android image for running in Anbox, with OpenGApps and Houdini
+pkgbase = anbox-image-gapps-magisk
+ pkgdesc = Android image for running in Anbox, with OpenGApps, Houdini and Magisk (Bootless)
pkgver = 2018.07.19
pkgrel = 15
url = https://anbox.io
@@ -14,19 +14,25 @@ pkgbase = anbox-image-gapps
source = https://build.anbox.io/android-images/2018/07/19/android_amd64.img
source = https://github.com/redchenjs/aur-packages/raw/master/anbox-image/houdini_y.sfs
source = https://github.com/redchenjs/aur-packages/raw/master/anbox-image/houdini_z.sfs
+ source = https://github.com/topjohnwu/Magisk/releases/download/v20.4/Magisk-v20.4.zip
+ source = magisk-init-rc.patch
+ source = init-magisk.sh
source = media_codecs.xml
source = media_codecs_google_video.xml
source = media_codecs_google_audio.xml
source = media_codecs_google_telephony.xml
- source = https://downloads.sourceforge.net/project/opengapps/x86_64/20200502/open_gapps-x86_64-7.1-pico-20200502.zip
+ source = https://downloads.sourceforge.net/project/opengapps/x86_64/20201031/open_gapps-x86_64-7.1-pico-20201031.zip
md5sums = 26874452a6521ec2e37400670d438e33
md5sums = 7ebf618b1af94a02322d9f2d2610090b
md5sums = 5ca37e1629edb7d13b18751b72dc98ad
+ md5sums = 9503fc692e03d60cb8897ff2753c193f
+ md5sums = 52959db8bc730ee3b7ab2cff7d41b299
+ md5sums = ec1cc3310ea277c66fa6f44ab7b45a13
md5sums = a638728bc2413d908f5eb44a9f09e947
md5sums = 599598e70060eb74c119cf7dac0ce466
md5sums = 43193761081a04ca18a28d4a6e039950
md5sums = 91f5f3e5c31f8e221ae8f318527dcb83
- md5sums = 7d04cbfb71724ea98f7025220ce66cf9
+ md5sums = 70dd3f86493c94e8aabd0827d20d63b3
-pkgname = anbox-image-gapps
+pkgname = anbox-image-gapps-magisk
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 62514e8a2fb9..000000000000
--- a/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-.*
diff --git a/PKGBUILD b/PKGBUILD
index 7f08778aecf5..bfdc3b111748 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,11 +1,12 @@
-# Maintainer: Jack Chen <redchenjs at live dot com>
+# Maintainer: Xnopyt <billy@xnopyt.info>
+# Contributor: Jack Chen <redchenjs at live dot com>
# Contributor: Mark Wagie <mark dot wagie at tutanota dot com>
# Contributor: Robosky <fangyuhao0612 at gmail dot com>
-pkgname=anbox-image-gapps
+pkgname=anbox-image-gapps-magisk
pkgver=2018.07.19
pkgrel=15
-pkgdesc="Android image for running in Anbox, with OpenGApps and Houdini"
+pkgdesc="Android image for running in Anbox, with OpenGApps, Houdini and Magisk (Bootless)"
arch=('x86_64')
url="https://anbox.io"
license=('custom')
@@ -26,6 +27,9 @@ source=(
"https://build.anbox.io/android-images/${pkgver//./\/}/android_amd64.img"
"https://github.com/redchenjs/aur-packages/raw/master/anbox-image/houdini_y.sfs"
"https://github.com/redchenjs/aur-packages/raw/master/anbox-image/houdini_z.sfs"
+ "https://github.com/topjohnwu/Magisk/releases/download/v20.4/Magisk-v20.4.zip"
+ "magisk-init-rc.patch"
+ "init-magisk.sh"
"media_codecs.xml"
"media_codecs_google_video.xml"
"media_codecs_google_audio.xml"
@@ -36,6 +40,9 @@ md5sums=(
'26874452a6521ec2e37400670d438e33'
'7ebf618b1af94a02322d9f2d2610090b'
'5ca37e1629edb7d13b18751b72dc98ad'
+ '9503fc692e03d60cb8897ff2753c193f'
+ '52959db8bc730ee3b7ab2cff7d41b299'
+ 'ec1cc3310ea277c66fa6f44ab7b45a13'
'a638728bc2413d908f5eb44a9f09e947'
'599598e70060eb74c119cf7dac0ce466'
'43193761081a04ca18a28d4a6e039950'
@@ -117,6 +124,19 @@ build () {
tar --lzip -xvf ./Core/$i.tar.lz
cp -r ./$i/nodpi/priv-app/* ./squashfs-root/system/priv-app/
done
+
+ # install magisk
+ rm -f ./squashfs-root/system/bin/su
+ rm -f ./squashfs-root/system/xbin/su
+ rm -f ./squashfs-root/system/sbin/su
+
+ install -Dm 700 ./init-magisk.sh ./squashfs-root/system/bin/init-magisk.sh
+ install -Dm 700 ./x86/magiskinit ./squashfs-root/sbin/magiskinit
+ cd "$srcdir"/squashfs-root/sbin
+ ln -s magiskinit magisk
+ ln -s magiskinit magiskpolicy
+ cd "$srcdir"
+ patch --forward --strip=1 --input="${srcdir}/magisk-init-rc.patch"
}
package() {
diff --git a/init-magisk.sh b/init-magisk.sh
new file mode 100644
index 000000000000..a92675c465db
--- /dev/null
+++ b/init-magisk.sh
@@ -0,0 +1,7 @@
+#!/system/bin/sh
+
+sleep 2
+magisk --post-fs-data
+sleep 1
+magisk --service
+magisk --boot-complete \ No newline at end of file
diff --git a/magisk-init-rc.patch b/magisk-init-rc.patch
new file mode 100644
index 000000000000..d812afb1c8ec
--- /dev/null
+++ b/magisk-init-rc.patch
@@ -0,0 +1,16 @@
+--- a/squashfs-root/init.rc
++++ b/squashfs-root/init.rc
+@@ -668,3 +668,12 @@
+ service flash_recovery /system/bin/install-recovery.sh
+ class main
+ oneshot
++
++on property:dev.bootcomplete=1
++ start magisk
++
++service magisk /system/bin/init-magisk.sh
++ class main
++ user root
++ group root
++ oneshot
+\ No newline at end of file