Run Waydroid in fullscreen on Linux Mint with Gnome

Waydroid looked like excellent option to run Android apps on my Lenovo X240 running Linux Mint.

Because Waydroid is reliant on Wayland you need to use either KDE, Gnome or Sway Desktop Environment.

I am running Gnome and Waydroid works perfectly, but I wanted it to run in fullscreen. Unfortunately Waydroid key mapping is conflicting with Gnome F11 key to go fullscreen, so first thing you need to do is to re-map Gnome fullscreen key to something like Shift+F11 which can easily be done with gnome tweaks.

But once you get your Android app to run “fullscreen” you will notice that actual size of the drawn surface is still the one window started with:

erol@x240mint:~$ sudo waydroid shell wm size 
Physical size: 1366x697

I wanted it shown in 1368×768 which is my native display resolution. To do this open terminal while Waydroid is running and do the following:

erol@x240mint:~$ waydroid prop set persist.waydroid.width 1366
erol@x240mint:~$ waydroid prop set persist.waydroid.height 768
erol@x240mint:~$ waydroid session stop

Now next time you run your Android app it is going to be rendered in native resolution.

erol@x240mint:~$ sudo waydroid shell wm size 
Physical size: 1366x768

Mapping Sony Bravia remote RM-ED060 CEC for Android Kodi player

I recently bought an Android box to replace my Raspberry Pi 3 player running Xbian.

One of the features I love the most on Raspberry Pi is support for CEC, since I prefer to have only one remote in use. I have controlled Kodi by using my RM-ED060 remote from my Sony Bravia KDL-50W815B that looks like this:

I did some small customization to remote configuration in Kodi on Raspberry pi by hand and I wanted to keep as much of that with my new Android box.

In order to re-map keys I used Kodi add-on called keymap editor which allows you to map almost every key you want.

This is my current gen.xml file that can be found in Android/data/org.xbmc.kodi/files/.kodi/userdata/keymaps/

<keymap>
<global>
<keyboard>
<key id="61670">activatewindow(videos,tvshowtitles)</key>
<key id="61669">activatewindow(pictures)</key>
<key id="61668">activatewindow(music)</key>
<key id="61664">activatewindow(weather)</key>
<key id="61666">info</key>
<key id="61665">contextmenu</key>
<key id="61667">activatewindow(videos,files)</key>
</keyboard>
</global>
<fullscreenvideo>
<keyboard>
<key id="61453">osd</key>
<key id="61667">subtitledelayminus</key>
<key id="61668">subtitledelayplus</key>
<key id="61669">showsubtitles</key>
<key id="61670">activatewindow(subtitlesearch)</key>
<key id="61638">aspectratio</key>
<key id="61453">osd</key>
<key id="61665">info</key>
<key id="61666">codecinfo</key>
</keyboard>
</fullscreenvideo>
</keymap>

If you would like to have the same configuration without doing the re-configuration of the keys yourself, you should copy this file to the same directory.

If you are wondering what are those key id definitions, here are all the codes that I was able to identify with keymap editor for this TV:

61448 - Return/Back
61453 - Select/OK
61488 - 0
61489 - 1
61490 - 2
61491 - 3
61492 - 4
61493 - 5
61494 - 6
61495 - 7
61496 - 8
61497 - 9
61568 - Up
61569 - Down
61628 - Stop
61636 - Rew
61637 - Fwd
61638 - Rec
61664 - Guide
61665 - Options
61666 - Info
61667 - Red
61668 - Green
61669 - Yellow
61670 - Blue
61750 - Left
61751 - Right