How to Set Up a Mobile Development Environment

    Shaumik Daityari
    Shaumik Daityari

    The use of mobile devices has increased considerably in the past decade. It has been over two years since mobile browsing took over desktop. The usability of mobile devices has exploded, too. Mobile devices now come with huge processing power.

    We often dismiss mobile platforms as serious workhorses for developers, but today, it’s possible to take advantage of mobile portability with a level of flexibility that gets closer to the desktop every year.

    This post explains the process of running a Linux development environment from your mobile device using Samsung Dex.

    A Brief History of Samsung Dex

    Samsung Dex is a platform that allows you to use the computing power of your mobile device to run a desktop-like environment. It was introduced in 2017 and has been actively developed since. The number of devices that can run Dex has increased steadily. In this post, we explore how to set up a Linux development environment through Samsung Dex.

    Since its launch, Samsung Dex has been available on all of Samsung’s flagship devices. They are:

    • Galaxy S8/S8+
    • Note 8
    • Galaxy S9/S9+
    • Note 9
    • Galaxy Tab S4
    • And most recently, the S10 family

    Samsung Dex launched with a docking accessory called the Dex Station. You had to connect your mobile device to the Dex Station, which had outlets for output devices through the HDMI port, and input devices (like a mouse and keyboard) through USB and USB-C ports.

    Samsung Dex Station (Source)

    While using the Dex Station was mandatory at first, this criteria has since been relaxed in more recent devices. If you are using a Galaxy Note 9 or newer device, a USB-C to HDMI converter can help you get hooked up to a display, and Bluetooth can be used for peripherals.

    Samsung has recently launched the Dex Pad, a portable version of the Dex Station, which has built in wireless charging and a cooling fan in addition to the HDMI and USB ports.

    Samsung Dex Pad (Source)

    Assuming you fulfil the hardware requirements, you need two apps in order to create a Linux development environment. First, you need to install the Samsung Dex app to enable the Samsung Dex experience. Next, you need the Linux on Dex app, which is currently in Beta mode. You can apply for access through the Google Play Store.

    Now that we have tackled the requirements for the process, let us get started!

    Configure a Linux Environment on Samsung Dex

    The Linux on Dex app shows you the list of virtual containers that you have created on your device. Let’s try and create our first one by clicking on the “+” button on the bottom right of the screen.

    When creating the container, you need to use a Linux image. Currently, only Ubuntu 16.04 LTS is supported. The image can be downloaded from the Samsung Dex servers. A modified version of Ubuntu needs to be used to adhere to Android’s security policy.

    Download Linux Image
    Downloading custom Linux image provided by Samsung

    Once the download is complete, you need to extract the image.

    Unzip downloaded Linux image

    To create a new container, browse to the location of the unzipped image on your file system and provide a name and description for the image. You also need to specify the storage space to be allocated to this image. This can be changed at a later time when the container has been successfully created. A minimum of 10 GB is required.

    Options to create a container

    Creating the container does not take long — the custom image of the Linux operating system provided by Samsung is already compatible with Dex. The default user is dextop and the password is secret.

    Once you’ve created the container, you can view a list of containers on the app. Select a container to view its details.

    Container Details
    Container details

    Testing Linux Environment on Mobile and Samsung Dex

    Before connecting to an external display, you can still access the container from the Linux on Dex app by starting a terminal. Select the “Terminal mode” option in the details page shown above to start the terminal.

    Terminal on mobileRunning the container’s terminal on mobile

    You can run a Python interpreter from within this terminal and test out some basic statements.

    Running Python interpreter on mobileRunning Python interpreter of the container on mobile

    To use the Linux environment in a desktop setting, connect your mobile device to an external display. At this point, you may not be running the Linux on Dex app. You will see the Samsung Dex logo on the display as the desktop version loads into the display.

    Samsung Dex Home Page on starting up
    Desktop of Samsung Dex on starting up

    Once the Samsung Dex has loaded, you can use your connected mobile device as a trackpad or use a connected mouse and keyboard. Navigate to the installed apps in your mobile device and select the Linux on Dex app. You will be able to see a list of all the available containers in the app. Select the container that you wish to run.

    Container Details on Linux on Dex app on the screen

    Click on the run button to get into the Linux environment.

    Ubuntu Environment on Samsung Dex

    You’ll be taken into the Linux environment within Samsung Dex. You can still access the bottom menu of the Dex environment, which I have used to take a screenshot.

    Linux on Dex is still in its nascent stage, where you can run various applications, but the performance isn’t at par with desktop computers. Linux on Dex has targeted developers primarily and perhaps this is a group of users who may be able to use it in its current form.

    Final Thoughts

    A Linux development machine with Samsung Dex can emulate a desktop computer in terms of functionality. And crucially, the increasing popularity of cloud-based services reduces dependency on traditional storage needs.

    The computing power isn’t great Compared to running Linux natively on a desktop machine, this isn’t the snappiest experience. Further, support for a variety of devices is limited and Linux on Dex is still in beta. But given the the rate at which our mobile devices become more capable, it would not be a surprise to see end users replace traditional personal computers with containers on mobile devices in coming years.

    Did you give Linux on Dex a try? Do you think it will complement (or even replace!) your current development setup? Let us know in the comments below!

    Frequently Asked Questions (FAQs) about Mobile Development Environment

    What is Samsung DeX and how does it work?

    Samsung DeX is a feature included on some high-end Samsung handheld devices that allows you to ‘extend’ your device into a desktop-like experience. With the help of a monitor, keyboard, and mouse, you can use your phone or tablet as a computer, running Android apps in a desktop-like interface. This feature is particularly useful for developers who want to code on the go, as it allows them to use their Samsung device as a portable development environment.

    Can I use Docker containers on Samsung DeX?

    Yes, you can run Docker containers on Samsung DeX. Docker is a platform that allows you to automate the deployment, scaling, and management of applications. By running Docker containers on Samsung DeX, you can create a portable development environment that allows you to work on your projects from anywhere.

    How can I set up my Samsung DeX for coding?

    Setting up Samsung DeX for coding involves a few steps. First, you need to connect your Samsung device to a monitor, keyboard, and mouse. Then, you need to install a code editor on your device, such as Termux or CodeAnywhere. Once you have a code editor installed, you can start coding directly on your Samsung device.

    What are the limitations of coding on Samsung DeX?

    While Samsung DeX provides a convenient way to code on the go, it does have some limitations. For instance, not all programming languages and frameworks are supported. Additionally, the performance of your Samsung device may not be as powerful as a traditional desktop or laptop, which could affect the speed and efficiency of your coding.

    Can I use Samsung DeX without a dock?

    Yes, you can use Samsung DeX without a dock. Samsung DeX can be activated using a USB-C to HDMI adapter or cable. However, using a dock can provide additional benefits, such as extra USB ports for connecting peripherals like a keyboard and mouse.

    Is Samsung DeX compatible with all Samsung devices?

    Samsung DeX is not compatible with all Samsung devices. It is only available on certain high-end models, including the Galaxy S8 and later, the Galaxy Note8 and later, and the Galaxy Tab S4 and later.

    Can I use Samsung DeX with non-Samsung monitors and peripherals?

    Yes, you can use Samsung DeX with non-Samsung monitors and peripherals. Samsung DeX is compatible with most HDMI monitors, as well as USB and Bluetooth peripherals.

    Can I run multiple apps simultaneously on Samsung DeX?

    Yes, you can run multiple apps simultaneously on Samsung DeX. This allows you to multitask effectively, just like on a traditional desktop or laptop.

    Can I access the internet on Samsung DeX?

    Yes, you can access the internet on Samsung DeX. You can either use the internet connection of your Samsung device, or connect to a Wi-Fi network.

    Can I save and transfer files on Samsung DeX?

    Yes, you can save and transfer files on Samsung DeX. Files saved on your Samsung device can be accessed on Samsung DeX, and vice versa. You can also transfer files between your Samsung device and a connected USB or Bluetooth device.