]> gitweb.fluxo.info Git - trashman.git/commitdiff
Updates anbox recipe
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 5 Aug 2019 22:33:47 +0000 (19:33 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 5 Aug 2019 22:33:47 +0000 (19:33 -0300)
share/trashman/anbox/unix/linux/debian/install

index e03e1a9e66e9dc2e31dce5e783e07a6017119467..207c49469a09d8635a2af2753bfc5ace6f64b0f4 100755 (executable)
@@ -6,6 +6,7 @@
 
 # Parameters
 SHARE="$1"
+IMAGE="https://build.anbox.io/android-images/2018/07/19/android_amd64.img"
 
 # Include basic functions
 . $SHARE/trashman/functions || exit 1
@@ -13,25 +14,39 @@ SHARE="$1"
 
 # Install requirements
 #apt-get update && trashman_apt_install snapd android-tools-adb apksigner
-apt-get update && trashman_apt_install android-tools-adb apksigner
+apt-get update && trashman_apt_install android-tools-adb apksigner wget
 
 # Enable modules
 modprobe ashmem_linux
 modprobe binder_linux
 
 # Include modules into config
-echo ashmem_linux >> /etc/modules
-echo binder_linux >> /etc/modules
+if ! grep -q "ashmem_linux" /etc/modules; then
+  echo ashmem_linux >> /etc/modules
+fi
+if ! grep -q "binder_linux" /etc/modules; then
+  echo binder_linux >> /etc/modules
+fi
 
 # Install anbox
 #snap install --devmode --beta anbox
 apt install anbox
 
-# Run: one of these commands might work
+# Get a recent android image
+wget $IMAGE.sha256sum -O /var/lib/anbox/android.img.sha256sum
+wget $IMAGE           -O /var/lib/anbox/android.img
+cd /var/lib/anbox && sha256sum -c android.img.sha256sum || exit 11
+
+# Start service
+service anbox-container-manager start
+
+# Run: one of these commands might work as a regular user
 #snap run anbox.appmgr
-#LC_ALL=C anbox session-manager
 #anbox.appmgr
 #anbox session-manager
+#LC_ALL=C anbox session-manager
+#env ANBOX_LOG_LEVEL=debug anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
+#anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
 
 # Example applications
 # https://signal.org/android/apk/