Archives For November 30, 1999

Scrcpy, the popular free open-source Android screen mirroring and controlling app, released version 3.0 then 3.0.1 and 3.0.2 with quick fixes few days ago.

Besides mirroring Android screen on your computer desktop, the new release can now start a virtual Android display on your desktop.

Continue Reading…

Scrcpy, Android screen mirroring and controlling app, released version 2.7 few days ago.

Scrcpy is a popular free and open-source application for Windows, Linux, and macOS. It can mirror the Android screen on PC, and allows to control the device with keyboard and mouse.

With the new 2.7 release, user can now use game controllers (e.g., PS4/PS5, or XBox gamepad), which are connected into the computer, to play Android games.

Scrcpy on Ubuntu

Continue Reading…

Scrcpy, the free open-source Android screen mirroring app, released version 2.6 (then 2.6.1 with quick fix) a few days ago.

Scrcpy is an app works on Linux, Windows, and macOS, allowing users to remote access and control their Android screen from PC/laptop, either wirelessly through TCP/IP in same network or wired with USB cable.

It uses Android Debug Bridge (adb) to communicate with Android device. Nothing needs to be installed on Android side, but it needs to enable developer mode for USB debugging option which is required by adb.


Continue Reading…

 

This is beginner’s guide shows how to install and setup Waydroid to run full Android system as well as Android applications in Ubuntu.

I’ve written about this by using Anbox, which is however no longer in active development.

This is a re-write with free and open-source ‘Waydroid’, which is a container-based approach to run a minimal customized Android system image based on LineageOS.

Android OS in my Ubuntu 22.04 desktop

This tutorial is tested and works on Ubuntu 22.04 and Ubuntu 24.04 LTS with default Wayland session (Xorg is NOT supported)! Hardware specs include:

  • CPU: Intel i5-10400.
  • GPU: Intel HD 630.

Step 1: Install Waydroid

Waydroid is easy to install in Ubuntu/Debian based systems, through its official apt repository.

1. First, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to install required packages:

sudo apt install curl ca-certificates

sudo command needs password authentication, but with no asterisk feedback. Just type in mind and hit Enter.

2. Then, run command to download the official script, and run it to add Waydroid repository into your system.

curl https://repo.waydro.id | sudo bash

In case the script does not work properly, find out your OS code manually via either lsb_release -sc or cat /etc/os-release command. Then, run command below instead:

curl https://repo.waydro.id | sudo bash -s jammy

Replace jammy depends on your system code-name. So far, it supports focal, jammy, noble, bookworm, bullseye, sid

3. Finally, run command to install Waydroid:

sudo apt install waydroid

Try sudo apt update first to refresh cache if the command output package not found

Once successfully installed the app, you should be able to launch it from start menu, applications menu, or any other app launcher depends on your desktop environment.

Step 2: Initialize

The first launch of the app, will launch the “Initialize Waydroid” dialog.

The default options are usually OK. But, you may have to choose Android type before getting start:

  • VANILLA – as name indicates, it’s vanilla ROM, without Google Services/Apps.
  • GAPPS – come with Google Services/Gapps.

Next, click Download button will automatically download & install ROM and required packages. In my case, it downloaded & installed Android 11.

When done successfully, it will show you something like the screenshot shows you.

Step 3: Start Android system, resize & move window

After clicking “Done” button in last step, start Waydroid again will launch an Android screen on your desktop.

However, it by default starts in full-screen (or may-be called maximized) mode.

To change the Android screen size, open terminal (Ctrl+Alt+T) in the Ubuntu host, and run commands:

waydroid prop set persist.waydroid.width 506
waydroid prop set persist.waydroid.height 1000

The 2 commands will set the screen width and height to 506 x 1000. Change the numbers accordingly, and apply by running command to stop current Android session (then re-launch).

waydroid session stop

The Android window is borderless in my case. To move the window, you may either press & hold Super (Windows logo) key then dragging, or press Alt+F7 and then move mouse cursor without mouse clicking.

Step 4: Install & Remove Android Apps

If you selected ‘VANILLA’ while initializing Waydroid, then there’s no app store in the Android to install applications.

In the case, you may download any APK file from the web, or download & install the free open-source F-Droid in the host (Ubuntu in the case) then use it in Android screen to install apps.

To install APK file from host user’s ‘Downloads’ folder, just run command in terminal (Ctrl+Alt+T):

waydroid app install ~/Downloads/file_name_here.apk

And, verify by listing all installed Android apps:

waydroid app list

Waydroid will create app shortcuts for all installed Android apps, through .desktop files under “.local/share/applications”. Meaning, you can search & launch Android apps directly from host machine (Ubuntu).

Launch ‘F-Droid’ Android app in Ubuntu

And, it supports launching multiple instance of Android apps at the same time out-of-the-box.

To remove an app, either do it in the Android screen, or run command in Ubuntu host:

waydroid app remove packageName

Replace packageName according to waydroid app list output, e.g., org.fdroid.fdroid.

Step 5: Share files between Ubuntu Host and Android

To share files between host and the Android system, simply run single command in Ubuntu host:

sudo mount --bind ~/Documents/vboxshare/ ~/.local/share/waydroid/data/media/0/Documents/share

In the command, you need to replace:

  • ~/Documents/vboxshare/ – ‘vboxshare’ sub-folder in Ubuntu host.
  • ~/.local/share/waydroid/data/media/0/Documents/share – ‘share’ sub-folder of Documents in Android.

You need to first create the share folder if not exist, or it will show mount point does not exist as the screenshot below shows you.

Uninstall Waydroid:

First, stop the session and container, which maybe useful for reloading settings, run commands:

waydroid session stop
sudo waydroid container stop

To remove Waydroid, use command:

sudo apt remove --autoremove waydroid

Then, remove leftovers by running command:

sudo rm -rf /var/lib/waydroid ~/waydroid ~/.share/waydroid ~/.local/share/applications/*aydroid* ~/.local/share/waydroid

If you don’t want to install it back any more, then, also remove the source repository by deleting the sources & key files:

sudo rm /etc/apt/sources.list.d/waydroid.list /usr/share/keyrings/waydroid.gpg

For more about Waydroid, see the official document.

This is a step by step guide shows how to install and use Scrcpy, the Android screen mirroring and remote control application, in Ubuntu desktop.

Scrcpy, pronounced “screen copy“, is a popular free open-source application works on Linux, Windows, and macOS. With it, user can mirror Android screen on computer desktop and control it with mouse, keyboard, and/or gamepad.

The Android device is connected either wired with USB cable or wirelessly through TCP/IP network protocol. Nothing needs to be installed on Android, as it uses >b<Android Debug Bridge (ADB) to implement the core features.

Besides mirroring Android screen on your desktop, it also features:

  • Audio mirroring or forwarding (Android 11+).
  • Screen recording.
  • Copy and paste in both directions.
  • Mirroring with Android screen off.
  • Camera mirroring.
  • OTG mode, that only run physical keyboard, mouse and gamepad simulation, as if the computer keyboard, mouse and gamepads were plugged directly to the Android device.


Continue Reading…

 

 
ANBOX IS NO LONGER IN ACTIVE DEVELOPMENT! Try the popular Waydroid instead!

Want to run Android apps in Linux? Here’s how to do it using the Anbox container in Ubuntu 20.04 and Ubuntu 21.10.

Anbox, Anbox in a box, is a free and open-source software that runs the full Android system in a container, abstracts hardware access and integrates core system services into a GNU/Linux system.

There’s another solution “Waydroid” to do the similar things in Linux. It’s said to have better performance, though it requires Wayland session. For those stick to Xorg, here’s how to install and use Anbox.

Load Kernel modules:

Anbox requires ashmem_linux and binder_linux kernel modules.

1.) If you have the SecureBoot enabled (check via sudo mokutil --sb-state command), open terminal by pressing Ctrl+Alt+T on keyboard, and run command to sign the kernel module:

sudo kmodsign sha512 /var/lib/shim-signed/mok/MOK.priv /var/lib/shim-signed/mok/MOK.der /lib/modules/`uname -r`/kernel/drivers/staging/android/ashmem_linux.ko

2.) Next load the modules one by one via command:

sudo modprobe ashmem_linux
sudo modprobe binder_linux

3.) Finally verify the kernel modules via command:

lsmod | grep -e ashmem_linux -e binder_linux

Install Anbox:

The software is available to install via official Snap and classic DEB packages, though I recommend the snap package this time. Because, the DEB is not well supported. User needs to manually mount binder, download and load Android image, and troubleshoot other issues. And it ultimately failed to run in my case.

To install Anbox snap, press Ctrl+Alt+T to open terminal, and run command:

snap install anbox --beta --devmode

After installation, you may try to launch Anbox by searching it from activities overview screen. However, it does not launch in my case until installed the Google Play Store. If so, try running the command below in terminal to start it:

anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity

Install Google Play Store:

Anbox has a few built-in applications except Google Play Store, because Google will only permit certified devices to ship with their applications. Thankfully, there’s an installer script to automatically install it for you.

1.) Firstly, open terminal and run command to install some required libraries:

sudo apt install wget curl lzip tar unzip squashfs-tools

2.) Next, download the script via wget command:

wget https://raw.githubusercontent.com/geeks-r-us/anbox-playstore-installer/master/install-playstore.sh

3.) Add executable permission:

chmod u+x install-playstore.sh

4.) And run the script will download the package and install Play Store:

./install-playstore.sh

Now, search for and open Anbox from activities overview screen. When it opens, go to settings and grant all permissions to Google Play Store, and finally open the Play Store to install Android apps.

How to Remove Anbox:

To remove the software, simply run command in terminal:

snap remove --purge anbox

You may also remove the “anbox” and “anbox-work” folders in user’s home directory.