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.
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.
Run AVD Manager.
Click Create Virtual Device.
Select Nexus 6P.
Click >Nougat Download.
Click >Finish when the download is complete.
Select Nougat and click Next
Click Finish.
Click the Arrow icon
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:
Enter : adb shell
Enter : su
Enter : setenforce 0
Enter : settings put global enable_freeform_support 1
Enter : cd /data/local/tmp
Enter : mkdir permissions
Enter : cd permissions
Enter : cp -a /system/etc/permissions/* ./
Enter : sed -e "s/live_wallpaper/freeform_window_management/" android.software.live_wallpaper.xml > freeform.xml
Enter : mount --bind . /system/etc/permissions
Wait few seconds
Enter : stop
Wait few seconds
Enter : start
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.
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.
Select the following icon on Emulator control panel.
Test if the app runs well in the same density and resolution as Samsung DeX Desktop mode.
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.
SAMSUNG and Cookies
Our site uses cookies, including optional cookies to provide you with the best experience on our website and relevant advertising based on your use of our site, You can manage your preferences or accept all cookies.
You can also read our Privacy Policy and Cookie Policy.
Manage Your Cookies
We use cookies to improve your experience on our website and to show you relevant
advertising. Manage you settings for our cookies below.
Essential Cookies
These cookies are essential as they enable you to move around the website. This
category cannot be disabled.
Company
Domain
Samsung Electronics
.samsungdeveloperconference.com
Analytical/Performance Cookies
These cookies collect information about how you use our website. for example which
pages you visit most often. All information these cookies collect is used to improve
how the website works.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Functionality Cookies
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and
tailor the website to provide enhanced features and content for you.
Company
Domain
LinkedIn
.ads.linkedin.com, .linkedin.com
Advertising Cookies
These cookies gather information about your browser habits. They remember that
you've visited our website and share this information with other organizations such
as advertisers.
Company
Domain
LinkedIn
.linkedin.com
Meta (formerly Facebook)
.samsungdeveloperconference.com
Google Inc.
.samsungdeveloperconference.com
Preferences Submitted
You have successfully updated your cookie preferences.