How to create your own skin in Genymotion Desktop?
Genymotion Desktop supports skins. It comes with a set of four default skins: two phones and two tablets.
Prerequisites
- To create a custom skin, you need a background image named background.png.
- You also need a JSON file named skin.json.
- All these elements must be placed in a new folder in the skins directory.
- On Linux and macOS, the skins directory is ~/.Genymobile/Genymotion/skins.
- On Windows, the skins directory is %LOCALAPPDATA%\Genymobile\Genymotion\skins.
- Examples of skin folder locations include:
- ~/.Genymobile/Genymotion/skins/my-phone-skin/
- %LOCALAPPDATA%\Genymobile\Genymotion\skins\my-phone-skin/
Background image
- The background image must be in PNG format.
- The background image must be named background.png.
- An example file is background.png.
JSON File
- The skin.json file is named skin.json.
- Skin.json contains the following information.
- Name is a string that assigns the skin name.
- Display is an object with an offset and a size.
- offset is the offset between the skin and the device display.
- size is the width and height of the virtual device resolution.
- The display attribute sets the size and offset of the skin.
- resizeMargins is an object that defines the resizable margins.
- The resizeMargins attribute defines the resizable margins of the window.
- Note that the window is resizable from the bottom and left sides; other sides must be defined in case the virtual device is rotated.
Important
- The height and width of the background image must not be lower than height + offset_x and width + offset_y, or a BACKGROUND_FORMAT_ERROR will be produced.
Example
Content of the skins folder:
~/.Genymobile/Genymotion/skins/skin-test/
├── background.png
└── skin.json
Content of skin.json:
{
"name": "skin-test",
"display": {
"offset": {
"x": 150,
"y": 150
},
"size": {
"width": 720,
"height": 1280
}
},
"resizeMargins": {
"left": 75,
"top": 75,
"right": 75,
"bottom": 75
}
}
Here is a diagram explaining precisely each parameter from skin.json: