diff options
author | alan_averNOsa@lavaSPAMbit.com <alan_averNOsa@lavaSPAMbit.com> | 2025-04-22 08:25:21 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2025-04-22 12:45:15 +0700 |
commit | 6ae56dbdefc85b76f72bb39c64c873991a4fee4a (patch) | |
tree | 94a367ea7fa922a059caeb1b63cc0014537037fc | |
parent | 44854b04c3ae3380a47d211c560516f9499ed998 (diff) |
system/waydroid: Added (Android Container).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | system/waydroid/README | 75 | ||||
-rw-r--r-- | system/waydroid/doinst.sh | 10 | ||||
-rw-r--r-- | system/waydroid/slack-desc | 19 | ||||
-rw-r--r-- | system/waydroid/waydroid.SlackBuild | 102 | ||||
-rw-r--r-- | system/waydroid/waydroid.info | 10 |
5 files changed, 216 insertions, 0 deletions
diff --git a/system/waydroid/README b/system/waydroid/README new file mode 100644 index 0000000000..09d6e28095 --- /dev/null +++ b/system/waydroid/README @@ -0,0 +1,75 @@ +Waydroid works ONLY in a Wayland and you need to run a kernel which +comes with the binder modules. Slackware stock kernels dont come with +that. There are several ways to fix this. What I preffer is the hard +way, to build a Slackware zen kernel. Using stock slackware kernel +config plus: CONFIG_ANDROID=y CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ANDROID_BINDERFS=n +CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder" + +One of the reasons is that I found it the most stable and secure way... +NOTE zen kernels its BETTER to build them in $USER/HOME not to root and +better not to /usr/src so make as user $HOME/ZEN and build there. +============ + +Next step install python3-gbinder from SBo/ponce + +I use slpkg for that. # slpkg -i python3-gbinder (this command will +build and install python3-gbinder deps too) ============ + +Then run ./waydroid.Slackbuild to build and install package. +============ + +After installation finish run + +# waydroid init or init with GApps support # waydroid init -s GAPPS + +^^ this will automatically download the latest Android image. +============ + +To start waydroid session: # /usr/bin/waydroid -w container start & +(give it some time...) =========== + +Launch GUI: + +$ waydroid show-full-ui + +Launch shell: + +# waydroid shell (bug) + +Install an application: + +$ waydroid app install $path_to_apk + +Run an application: + +$ waydroid app launch $package_name # Can be retrieved with `waydroid +app list` =========== + +Tip: if python3-gbinder fail to build and you are in slackware-current +Download the python3.11 version from here +https://repo.waydro.id/dists/mantic/python3-gbinder_1.1.2_amd64.deb +extract files...and place "gbinder.cpython-311-x86_64-linux-gnu.so" and +"gbinder_python-1.1.2.egg-info/" to user +~/.local/lib/python3.11/site-packages/ and to +/usr/lib/python3.11/site-packages/ + + Then command: python3.11 import gbinder + +TIP: If you affected by: "ContainerManager: +dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoReply: +Message recipient disconnected from message bus without replying" + + Try: # pkill -HUP dbus-daemon + +and command again... ============ + +TIP: If you get error `Failed to get service waydroidplatform, trying +again...` + +Try: `waydroid upgrade -o` + +============ + +good luck, you gonna need it! :D + diff --git a/system/waydroid/doinst.sh b/system/waydroid/doinst.sh new file mode 100644 index 0000000000..4a25de5e6f --- /dev/null +++ b/system/waydroid/doinst.sh @@ -0,0 +1,10 @@ +if [ -x /usr/bin/update-desktop-database ]; then + /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 +fi + +if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then + if [ -x /usr/bin/gtk-update-icon-cache ]; then + /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi + diff --git a/system/waydroid/slack-desc b/system/waydroid/slack-desc new file mode 100644 index 0000000000..fe9c5227b4 --- /dev/null +++ b/system/waydroid/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +waydroid: waydroid (a container-based approach to boot a full Android system) +waydroid: +waydroid: Waydroid uses Linux namespaces (user, pid, uts, net, mount, ipc) +waydroid: to run a full Android system in a container +waydroid: and provide Android applications on any GNU/Linux-based platform. +waydroid: The Android system inside the container has direct access to +waydroid: any needed hardware.The Android runtime environment +waydroid: ships with a minimal customized Android system image based on +waydroid: LineageOS. The image is currently based on Android 11. +waydroid: https://docs.waydro.id/debugging/troubleshooting +waydroid: https://github.com/waydroid/waydroid diff --git a/system/waydroid/waydroid.SlackBuild b/system/waydroid/waydroid.SlackBuild new file mode 100644 index 0000000000..e09b1777e3 --- /dev/null +++ b/system/waydroid/waydroid.SlackBuild @@ -0,0 +1,102 @@ +#!/bin/bash + +# Slackware build script for waydroid + +# rizitis (cf. https://www.linuxquestions.org/questions/slackware-14/waydroid-slackbuild-4175736319/ ) +# Updated by Caterino Tommaso, T.O.P. (2025) +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=waydroid +VERSION=${VERSION:-1.5.1} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} +JOBS=-j$(getconf _NPROCESSORS_ONLN) + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +make "$JOBS" +make install DESTDIR=$PKG + +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a LICENSE* README* \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l n -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/system/waydroid/waydroid.info b/system/waydroid/waydroid.info new file mode 100644 index 0000000000..7be0fedf13 --- /dev/null +++ b/system/waydroid/waydroid.info @@ -0,0 +1,10 @@ +PRGNAM="waydroid" +VERSION="1.5.1" +HOMEPAGE="https://waydro.id/" +DOWNLOAD="https://github.com/waydroid/waydroid/archive/1.5.1/waydroid-1.5.1.tar.gz" +MD5SUM="6c1776e34c72403a4a5c124840e638f6" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="python3-gbinder" +MAINTAINER="Caterino Tommaso, T.O.P." +EMAIL="alan_averNOsa@lavaSPAMbit.com (remove NO and SPAM)" |