Samsung DeX app testing guide

Samsung DeX station and app debugging

You can't use USB debugging while the device is in the Samsung DeX station because plugging/unplugging the device will remove it from Samsung DeX mode. Instead, you can debug your app using Ethernet or Wi-Fi.

To debug your Samsung DeX app over Ethernet or Wi-Fi, follow Androids guide for configuring ADB bridge.

Figure 11: ADB debugging

Android Virtual Emulator

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.

  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

  9. The emulator will load.

Running an app in the emulator

Now the app can run and check whether the layout runs well in phone mode.

To do this, run the Command Prompt and enter the following commands:

  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/" > freeform.xml

  10. Enter : mount --bind . /system/etc/permissions

  11. Wait few seconds

  12. Enter : stop

  13. Wait few seconds

  14. Enter : start

  15. After rebooting, check if the icon below appears when in viewed in the "Recent screen" menu. The app will switch into Freeform Multi-Window when you click the icon below.

  16. Enter the following commands in Command Prompt to test the app in the same density and resolution as Samsung DeX Desktop Mode:adb shell, wm density 160, wm size 1080x1920.

  17. Select the following icon on Emulator control panel.

  18. Test if the app runs well in the same density and resolution as Samsung DeX Desktop mode.

  19. If you want to return to phone mode, enter the following commands in Command Prompt: adb shell, wm density reset, wm size reset. Click on the "rotate to portrait" icon on the Emulator Control Panel.