Using the Ubuntu emulator in the SDK

Source: Internet
Author: User

Ubuntu emulator is very useful in the development process, especially when there is no Ubuntu device. After attaching the emulator to the SDK, you can run the program on it, install the click Packets, and so on, similar to the operations on the physical device.

Here you can learn how to use the Ubuntu emulator from the Ubuntu SDK, including:

    • Creating an Emulator
    • Start the emulator
    • Attaching the emulator to the SDK
    • Open the root shell connected to the emulator

Note : The Ubuntu emulator is being developed quickly, including its support in the SDK. So stay agile, keep up to date with new information, and always be aware of the latest changes!

tip : For a first-class Ubuntu emulator and SDK experience, you can update your system from the SDK PPA by referencing the Install SDK Tutorial.

What is an Ubuntu emulator?

It is an emulator that can run on a computer desktop, rather than on a physical device, to simulate Ubuntu phones and tablets. It looks and works the same way as an Ubuntu phone or tablet, and can interact with the GUI with the mouse instead of physical touch and swipe gestures.

tip : The emulator is slower than the physical device, so be patient.

Creating an Emulator instance
    1. In the Ubuntu SDK, open the Devices tab. At the bottom, select the Emulators tab.
    2. Near the upper-left section, enter the name of the new emulator in the name field.
    3. Click the Create new Emulator button.

Note : It takes a little bit of time to create the emulator.

After success, the new emulator is listed on the right side of the Emulators tab and lists its name and other descriptive information, including "Version=number", which is the build number for Ubuntu phones and tablet images.

Starting the emulator instance
    1. In the Ubuntu SDK, open the Devices tab. At the bottom, select the Emulators tab.
    2. Select an emulator from the emulator listed on the right side of the screen.
    3. Click Start selected Emulator

tip : It takes some time for the emulator to start.

When the boot is complete, the emulator appears in a separate window. Interact with the GUI using the mouse and the onscreen keyboard that is displayed when needed.

Attaching the running emulator as a device to the SDK

Once the emulator instance is running, it can be attached as a device to the SDK. This allows you to use the SDK to run the application on that instance and to install the click Packet onto it.

tip : From the SDK point of view, actually the physical device and emulator device are the same.

    1. Verify that your emulator instance is running in the window of your desktop and that its GUI is responsive.
    2. In the Ubuntu SDK, open the Devices tab and its Device Actions Sub-tab (at the bottom).
    3. Click the redetect devices button.

Upon success, the SDK Devices tab displays a message that begins with "Your device have been enabled for developer use", and the top device Serial number field displays the serial number of the emulator instance:

Now that your emulator is attached, the SDK features you can use on your physical Ubuntu device can be used on that emulator. For example, you can run the application directly from the SDK on your device.

Accessing the shell of a running emulator

Now you can use the adb command to open the shell that is connected to the emulator, as follows:

    1. Use CTRL + ALT + T to open a terminal shell
    2. Ensure that the ADB can see the emulator in the following ways:
 $ adb devices  List of devices attached  emulator-5514         

"emulator-5514" is the serial number of the emulator explained above.

    1. Create a root shell in the following ways:
 $ adb shell  

Use CTRL + D to exit the shell.

More information
    • Https://wiki.ubuntu.com/Touch/Emulator

    • http://davidplanella.org/ubuntu-emulator-quickstart-guide/

Next steps

Now that you have an emulator running as an add-on, you can view the tutorial running the application from the SDK.

Using the Ubuntu emulator in the SDK

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.