LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-22-2024, 12:55 PM   #1
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 505

Rep: Reputation: 47
Question Waydroid SlackBuild?


Is there a SlackBuild to package Waydroid Android emulator for Slackware?
If not, are there build instructions to build Waydroid on Slackware?
 
Old 04-22-2024, 01:49 PM   #2
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 646

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
I had in the past build it and it was running with this command: /usr/bin/waydroid -w container start
I search and found my old slackbuilds for this packages, i build and install ok but it not running because it need a dependency python3-gbinder

But i tried to build from ponce repo as i m in current and I have errors. Give me some time ...

edit: take the Slackbuild maybe you have better luck before me
Code:
cd $(dirname $0) ; CWD=$(pwd)

PRGNAM=waydroid			
VERSION=${VERSION:-1.4.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_rtz}		
PKGTYPE=${PKGTYPE:-txz}
LINK=https://github.com/waydroid/waydroid/archive/refs/tags/
GVERS=$VERSION.tar.gz	

wget -c "$LINK""$GVERS"

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i586 ;;
    arm*) ARCH=arm ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
       *) ARCH=$( uname -m ) ;;
  esac
fi


if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
  echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
  exit 0
fi

TMP=${TMP:-/tmp/rtz}	
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 CODE_OF_CONDUCT.md 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


cd $PKG
/sbin/makepkg -l n -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE

Last edited by rizitis; 04-22-2024 at 01:52 PM.
 
1 members found this post helpful.
Old 04-22-2024, 02:11 PM   #3
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,375

Rep: Reputation: 4088Reputation: 4088Reputation: 4088Reputation: 4088Reputation: 4088Reputation: 4088Reputation: 4088Reputation: 4088Reputation: 4088Reputation: 4088Reputation: 4088
Doesn't it need the kernel's binder module?
That's not enabled in Slackware, so you will have to compile your own
 
Old 04-22-2024, 02:44 PM   #4
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 505

Original Poster
Rep: Reputation: 47
Quote:
Originally Posted by marav View Post
Doesn't it need the kernel's binder module?
That's not enabled in Slackware, so you will have to compile your own
SlackBulids for that already exist.

Update: Actually, those aren't the binder_linux module. Is there a binder_linux SlackBuild somewhere?
Update 2: Here it is: https://github.com/choff/anbox-modul.../master/binder
But I get an error:
Code:
Your kernel does not support KProbes, but this is required to compile binder as a kernel module
If I bypass that error and "insmod binder_linux.ko binder_linux.ko", I get this when running "./waydroid init":
Code:
No such file or directory: '/dev/binderfs/binder-control'

Last edited by Geremia; 04-22-2024 at 04:49 PM.
 
Old 04-22-2024, 06:36 PM   #5
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 646

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
I builded 3 times kernel 6.7.8
Code:
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=m
CONFIG_ANDROID_BINDERFS=n
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
BUT
Code:
[02:25:19] Failed to load binder driver
[02:25:19] modprobe: FATAL: Module binder_linux not found in directory /lib/modules/6.8.7
[02:25:19] ERROR: Binder node "binder" for waydroid not found
[02:25:19] See also: <https://github.com/waydroid>
enough for today...
 
Old 04-22-2024, 07:20 PM   #6
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 505

Original Poster
Rep: Reputation: 47
Quote:
Originally Posted by rizitis View Post
Code:
[02:25:19] Failed to load binder driver
[02:25:19] modprobe: FATAL: Module binder_linux not found in directory /lib/modules/6.8.7
[02:25:19] ERROR: Binder node "binder" for waydroid not found
[02:25:19] See also: <https://github.com/waydroid>
You need the binder kernel module.
 
Old 04-22-2024, 07:41 PM   #7
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 646

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
I builded a zen kernel and it works
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2024-04-23 03-48-20.png
Views:	50
Size:	123.1 KB
ID:	42729   Click image for larger version

Name:	Screenshot from 2024-04-23 03-47-28.jpg
Views:	46
Size:	88.6 KB
ID:	42730  

Last edited by rizitis; 04-22-2024 at 07:48 PM.
 
Old 04-22-2024, 09:54 PM   #8
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 505

Original Poster
Rep: Reputation: 47
Quote:
Originally Posted by rizitis View Post
I builded a zen kernel and it works
You rebuild the entire kernel?
Can't you just build the binder kernel module?
 
Old 04-23-2024, 11:41 AM   #9
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 646

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
Quote:
Originally Posted by Geremia View Post
You rebuild the entire kernel?
Can't you just build the binder kernel module?
there are multiple options for this, since "Building a kernel" failed 3 times, I decided to build the zen kernel and not only use zen headers... sometimes we want a stable good result even if more time needed than a forth failure at 4:00 AM
 
Old 04-23-2024, 12:35 PM   #10
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 505

Original Poster
Rep: Reputation: 47
Quote:
Originally Posted by rizitis View Post
I decided to build the zen kernel and not only use zen headers
I'm not familiar with zen kernel. Why'd you chose that one?
 
Old 04-23-2024, 02:11 PM   #11
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 646

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
Quote:
Originally Posted by Geremia View Post
I'm not familiar with zen kernel. Why'd you chose that one?
It was a spur of the moment decision. First because I knew waydroid will finally run for sure, and then I test it on the specific laptop (cpu)...
Builded using my oldconfig just edit and add
Code:
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=n
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
No initrd used, with grub everything ok...
 
Old 04-25-2024, 01:41 PM   #12
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 505

Original Poster
Rep: Reputation: 47
Quote:
Originally Posted by rizitis View Post
It was a spur of the moment decision. First because I knew waydroid will finally run for sure, and then I test it on the specific laptop (cpu)...
Builded using my oldconfig just edit and add
Code:
CONFIG_ANDROID=y
CONFIG_ANDROID_BINDER_IPC=y
CONFIG_ANDROID_BINDERFS=n
CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"
No initrd used, with grub everything ok...
I have two differences. I enabled binderfs and I used an initrd. And I can't get it working.

Running
Code:
./waydroid.py show-full-ui
as non-root user in Weston, I get:
Code:
WayDroid container is not listening.
Code:
./waydroid.py container start
still hangs.
What do you think I should change?


Update: I noticed that I didn't have a "CONFIG_ANDROID=y" line in my .config. I'm rebuilding now and will let you know if that helps. It probably will.

Last edited by Geremia; 04-25-2024 at 01:48 PM.
 
Old 04-25-2024, 03:22 PM   #13
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 646

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
@Geremia https://github.com/rizitis/waydroid-...ADME.Slackware

But its not working properly imo...
And its not slackware problem... there are Waydroid bugs which effects lot of distros.
In other words I m not happy with it... there are better solutions out there...
 
1 members found this post helpful.
Old 04-26-2024, 03:52 PM   #14
Geremia
Member
 
Registered: Apr 2011
Distribution: slackware64-current
Posts: 505

Original Poster
Rep: Reputation: 47
Quote:
Originally Posted by rizitis View Post
Thank you!
I built the kernel with
Code:
CONFIG_ANDROID_BINDERFS=y
And am running under Weston.
I get this issue when trying to install an APK:
Code:
Failed to get service waydroidplatform, trying again...
Thanks to the tg://resolve?domain=WayDroid channel, I got the help I needed. I needed to run
Code:
waydroid upgrade -o
to get rid of the ashmem references that were lying around from before. It works now, in Weston!

Last edited by Geremia; 04-26-2024 at 05:03 PM.
 
1 members found this post helpful.
Old 04-26-2024, 05:13 PM   #15
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 646

Rep: Reputation: 491Reputation: 491Reputation: 491Reputation: 491Reputation: 491
nice, I have a simple app in google-play store just for fun, but you can download apk from here https://github.com/rizitis/SofoRevma/releases/tag/10.0

of course it will be Greeks for u but if you want tell me if its running ok for you in waydroid..
 
  


Reply

Tags
android, emulator, slackbuild, slackware, waydroid



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: How to Run Android Applications on Ubuntu with Waydroid LXer Syndicated Linux News 0 03-05-2024 03:00 AM
LXer: Nitrux 2.8 Launched with Updated Kernel, KDE Plasma and WayDroid support LXer Syndicated Linux News 0 05-01-2023 07:51 PM
/e/ on Waydroid - how do I check it out? kernelhead Linux - Newbie 1 06-19-2022 12:29 AM
LXer: Ubuntu Web Remix 20.04.3 Released with /e/ on WayDroid and Linux Kernel 5.11 LXer Syndicated Linux News 0 10-17-2021 01:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration