Benjamin-Loison / waydroid

Waydroid uses a container-based approach to boot a full Android system on a regular GNU/Linux system like Ubuntu.
https://waydro.id
GNU General Public License v3.0
0 stars 0 forks source link

[Feature] Share clipboard #1

Open Benjamin-Loison opened 10 months ago

Benjamin-Loison commented 10 months ago

See https://github.com/waydroid/waydroid/issues/1113.

No matter wl-clipboard, pyclip and xclip installed and restart Waydroid, still cannot copy-paste in any way.

Should make clear how to proceed with Linux Mint Framework host machine using weston. Cf this comment.

Related to Benjamin_Loison/VirtualBox_keyboard_writer/issues/8.

On Linux Mint Framework:

WAYLAND_DISPLAY=waydroid_socket waydroid show-full-ui
Output: ``` [16:52:18] Starting waydroid session [gbinder] Service manager /dev/anbox-binder has appeared [16:52:28] Android with user 0 is ready [16:52:28] Established ADB connection to Waydroid device at 192.168.240.112. ```

In my Linux Mint (trust):

env WAYLAND_DISPLAY=waydroid_socket waydroid show-full-ui
Output: ``` [16:51:26] Starting waydroid session [16:51:27] Skipping clipboard manager service because of missing pyclip package [16:51:55] Android with user 0 is ready [16:51:58] Established ADB connection to Waydroid device at 192.168.240.112. ```

Note the line:

Skipping clipboard manager service because of missing pyclip package

Already trying to copy-paste in weston Linux Mint on host Framework and Linux Mint (trust) VirtualBox virtual machine would be nice.

Could first try in an environment not requiring weston.

My OC3K Debian Xfce is not such an environment.

Wikipedia pages seem to tell that:

https://www.debian.org/distrib/

On Debian GNOME (in Linux Mint Framework VirtualBox virtual machine):

loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type | awk -F= '{print $2}'
wayland

Source: the Unix Stack Exchange answer 325972

image

There is no weston needs.

waydroid show-full-ui
Output: ``` [00:39:41] Starting waydroid session [00:39:41] Skipping clipboard manager service because of missing pyclip package [gbinder] Service manager /dev/anbox-binder has appeared [00:40:04] Android with user 0 is ready ```
sudo apt install python3-pip && pip install --break-system-packages pyclip

does not seem to be enough, as none of both way is working, even if now have:

waydroid show-full-ui
Output: ``` [00:46:50] Starting waydroid session [gbinder] Service manager /dev/anbox-binder has appeared [00:47:09] Android with user 0 is ready ```

With wl-clipboard, pyclip and xclip installed and restart Waydroid it works but is this minimal?

sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y && sudo apt install -y curl && curl https://repo.waydro.id | sudo bash && sudo apt install -y waydroid && export PATH=$PATH:/sbin && sudo waydroid init -s VANILLA && echo 'ro.hardware.gralloc=default
ro.hardware.egl=swiftshader' >> /var/lib/waydroid/waydroid.cfg && sudo waydroid upgrade -o && waydroid show-full-ui
# How to manage permission for `echo`?

With wl-clipboard and pyclip the clipboard works fine!

Is your feature request related to a problem? Please describe.

Not read.

Describe the solution you'd like.

Not read.

Describe alternatives you've considered.

Not read.

Additional context

No response

Benjamin-Loison commented 4 months ago

My current workaround consists in using Element X on Waydroid. However, this does not seem very correct even with an account per virtual machine for my not trust virtual machines, as it could let the attacker the ability to read the history and possibly some trust messages thanks to a temporary snapshot usage.

For getting data from Waydroid I finally used qrencode and QRCodeReader.py: ```python import os from pyzbar.pyzbar import decode from PIL import Image path = '/home/benjamin_loison/Desktop/' os.chdir(path) decoded = decode(Image.open('a.png')) print(decoded) print(decoded[0].data.decode('utf-8')) ```

Maybe can have a better workaround with adb.

Related to Benjamin_Loison/element-x-android/issues/2

Benjamin-Loison commented 4 months ago

Related to Benjamin-Loison/cinnamon/issues/74.

Benjamin-Loison commented 4 months ago

For Termux related operations can just use:

ssh -p 8022 192.168.XXX.XXX
Benjamin-Loison commented 4 months ago

https://docs.waydro.id/debugging/troubleshooting may help.