Audience: Genymotion Desktop users who want to create a custom skin.
Genymotion Desktop supports skins. Genymotion Desktop ships with four default skins. Two of these skins are phones. Two of these skins are tablets. A custom skin can be created. A custom skin requires two elements. The two elements are a background image and a JSON skin definition. The skin files must be placed inside a new folder within the skins directory.
Paths
- On Linux and macOS, place skins in ~/.Genymobile/Genymotion/skins
- On Windows, place skins in %LOCALAPPDATA%\Genymobile\Genymotion\skins
- Example path: ~/.Genymobile/Genymotion/skins/my-phone-skin/
Background image
- The background image must be a PNG file.
- The background image must be named background.png.
- Example filename: background.png
JSON File
- The JSON file must be named skin.json.
- The JSON file contains the following information.
Name
- Name is a string.
- The Name attribute gives a name for your skin.
- After creation, you should find your skin in the Virtual device installation window if you want to create a new device with this skin.
Display
- Display is an object.
- Display contains an offset and a size.
- The offset object contains x and y integers.
- The size object contains width and height integers.
- The display attribute sets the size and offset of your skin.
- The offset attribute sets the offset between your skin and the device display.
- The size attribute sets the width and height of the virtual device resolution.
- Important: The height and width of the background image must not be lower than height + offset x and width + offset y, or you will get a BACKGROUND_FORMAT_ERROR.
resizeMargins
- ResizeMargins is an object.
- The resizeMargins attribute defines the resizable margins of the window.
- The window will only be resizable from bottom and left sides.
- You still need to define the other sides in case the virtual device is rotated.
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.
Display The display attribute sets the size and offset of your skin.
offset This parameter sets the offset between your skin and the device display.
size This parameter sets the width and height of the virtual device resolution.
Important The height and width of the background image must not be lower than height + offset x and width + offset y, or your skin will not be valid and you will get a BACKGROUND_FORMAT_ERROR.
Resize Margins The resizeMargins attribute defines the resizable margins of the window. The window will only be resizable from bottom and left sides, but you still need to define the other sides in case the virtual device is rotated.
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 } }
A diagram explains parameters from skin.json is provided.
Was this article helpful? Yes No 21 out of 27 found this helpful
Need more help? Request Technical Support
Related articles
- I get the error "msvcr100.dll is missing"
- How to install Xposed/EdXposed/LSPosed with Genymotion Desktop?
- I can't find Google Play Store. Where is it?
- Which devices (templates) are available with Genymotion Desktop?
- Is there a trial for Genymotion Desktop Pro edition?