android-emulatorthin-client

tns run android displays colours instead of actual application


android emulator

I'm following the tutorial on how to setup the android emulator through https://docs.nativescript.org/angular/tooling/android-virtual-devices.

I ran these commands

Change into the tools bin dir
: cd /usr/local/android/sdk/tools/bin
: sudo chmod +x

Install system images (must be done as root)
: sudo ./sdkmanager "system-images;android-25;google_apis;x86"
: sudo ./sdkmanager --licenses
Say 'y' to all
: sudo touch ~/.android/repositories.cfg

List available Android Virtual Devices to install (done as user)
: ./avdmanager list
: ./avdmanager create avd -n test -k "system-images;android-25;google_apis;x86"

Now I get the following when I list through avdmanager
: ./avdmanager list avd
: Available Android Virtual Devices:
:     Name: test
:     Path: /root/.android/avd/test.avd
:   Target: Google APIs (Google Inc.)
:           Based on: Android 7.1.1 (Nougat) Tag/ABI: google_apis/x86

Now try and run the android emulator
: cd ~/code/MyApp
: tns run android

Once this is started the Android emulator does start up on my Debian 8 thin client but it shows up like the attached image.

Update: Running through Android Studio android emaultor running through studio

It's the same result. I've got this type of result also running the the command line. Funny enough you can actually click buttons when it looks like this and still use it, although it's pretty useless.

Update: Can run through X2go

I ran a test remotely today using the same server and I can run the emulator through the X2go remote login software, but not natively on the thin client. I'm starting to think this is a specific problem of running android emulators under LTSP (thin client).


Solution

  • As I'm running the emulator on a thin client it doesn't look like I can use the 3d hardware acceleration so I've managed to turn it off with the following and the emulator now works pretty good.

    $ANDROID_HOME/emulator/emulator -avd test -gpu guest
    

    I'm also using the i3 tiled windows manager and had to force floating on this window;

    # Set floating windows
    for_window [title="Android Emulator - test:5554"] floating enable