Skip to main content
Samsung Developer Program

Samsung DeX App Testing Guide

Use this guide to test your DeX-compatible app.

The easiest way to test if your app works properly in Samsung DeX is to use an Android Virtual emulator that has settings that match the Samsung DeX environment.

Set Up the Emulator

  1. Run AVD Manager.

  2. Click Create Virtual Device.

  3. Select Nexus 6P.


     

  4. Click Nougat Download.

  5. Click Finish when the download is complete.

  6. Select Nougat, and click Next.

  7. Click Finish.

  8. Click the Arrow icon. The emulator loads.

Run an App in the Emulator

Run the app to see if the layout looks good in phone mode. At the command prompt:

  1. Enter : adb shell
  2. Enter : su
  3. Enter : setenforce 0
  4. Enter : settings put global enable_freeform_support 1
  5. Enter : cd /data/local/tmp
  6. Enter : mkdir permissions
  7. Enter : cd permissions
  8. Enter : cp -a /system/etc/permissions/* ./
  9. Enter : sed -e "s/live_wallpaper/freeform_window_management/" android.software.live_wallpaper.xml > freeform.xml
  10. Enter : mount --bind . /system/etc/permissions
  11. Wait for several seconds.
  12. Enter : stop
  13. Wait for several seconds.
  14. Enter : start
  15. Reboot, then check if the icon below appears when in viewed in the Recent screen menu. The app switches into Freeform Multi-Window mode when you click the icon shown in the red box, below:

  16. To test the app in the same density and resolution as Samsung DeX desktop mode, enter the following commands at the command prompt: adb shell, wm density 160, wm size 1080x1920.
  17. Select the icon shown on the emulator control panel (see red box in the following illustration).

  18. Run the test to ensure the app runs well in the same density and resolution as Samsung DeX desktop mode.
  19. To return to phone mode, enter the following commands in command prompt: adb sell, wm density reset, wm size reset.
  20. Click on the rotate to portrait icon on the emulator control panel.
  • Was this article helpful?