4

Reading through the documentation over developer.android.com regarding the emulator command line tool (now released separately since Android SDK 26.0.0), you can see the deprecated list of flags. One of them is -skin, but I cannot find any alternative to it.

I want to assign skins to my emulators created on a remote CI server with no display, but I want to ensure that the orientation and the display resolution is properly set, and from my testing I could only get that right when settings -skin flag to a given configuration.

Any tips of how to replace -skin flag or to achieve the same results without it?

Here's the version of the emulator I am running:

Android emulator version 26.1.0.0 (build_id 4010741)

Here's the command I use to create the avd:

avdmanager --verbose create avd --force \
                                --name "Nexus72012" \
                                --package "system-images;android-19;google_apis;x86" \
                                --sdcard 1000M \
                                --device 13

And this is how I start up the avd:

emulator @Nexus72012 -wipe-data -verbose -logcat '*:e *:w' -netfast -no-boot-anim -no-audio -no-window

Please note, I am limited to command line solutions, therefore please keep your answers targeted at that

anthonymonori
  • 1,754
  • 14
  • 36

1 Answers1

1

I am on the same issue. But I got to set a galaxy skin not using the GUI. Here is the logic:

For the first time
  1. Choose a directory to create an 'skins' folder in.
  2. Now download the skin and unzip it into 'skins' folder.
  3. Run emulator @Tester -skindir <dir> -skin <name>

That will run the created AVD named 'Tester' in the skin named <name> that will be search for inside <dir>.

use '-skin ' to specify an emulator skin, each skin corresponds to the visual appearance of a given device, including buttons and keyboards, and is stored as subdirectory of the skin root directory (see '-help-skindir')

note that can also be 'x' (e.g. '320x480') to specify an exact framebuffer size, without any visual ornaments.

use '-skindir ' to specify a directory that will be used to search for emulator skins. each skin must be a subdirectory of . by default the emulator will look in the 'skins' sub-directory of the system directory

If not the first time
  1. Just download the skin (if not already) and unzip it into 'skins' folder.
  2. Run emulator @Tester -skindir <dir> -skin <name>

You can use other options in additional to this. BTW, I got a galaxy skin from here.

also see.

saad zahem
  • 13
  • 5