Last edit: 24 August 2022

#Foreword

Since Google announced the addition of the Android operating environment to Chrome OS in 2016, the Android ecosystem has a new entry - the desktop Android apps suitable for large screens and keyboard and mouse operations. In the latest years, Google has made many improvements to the Android environment on Chrome OS to encourage more manufacturers and developers to participate. In May this year, , an open source project led by Google, added Chrome OS, an experience closer to native Linux, Making it possible to complete daily development and debugging work on Chrome OS.

At this year’s annual Google Developers Conference (Google IO), we saw Chrome installed in a speech on "" The Google Pixelbook for OS implements support for large Linux apps like Android Studio and can directly debug and compile Android apps through ADB and the onboard Android environment. This has a milestone effect on the promotion of the Android desktop ecosystem.

is a desktop operating system product based on the secondary development of Chromium OS, decoupling the originally strongly bound Google services in the system and adding self-developed modules and optimisation, adapting to more hardware categories that more users can use it in mainland China without barriers.

The content after this article focuses on how to enable the Linux subsystem in FydeOS, install and run the Linux apps and cooperate with the onboard Android environment to achieve the high efficiency displayed on Chrome OS + Pixelbook on Google io (without using any emulator or virtual Machine) to debug Android apps.

#0. Hardware requirements

  • Minimum configuration

    Because large IDE such as Android Studio has high system performance requirements, we recommend installing FydeOS on devices that are better than entry-level hardware.

  • Incompatibility

    • Currently, the Android environment of FydeOS (public beta version) is only compatible with Intel series graphics cards.
    • Since the architecture design of Project Crostini adopts the structure of virtual machine + container, it is required that the CPU has support for hardware virtualisation (VT-x). In addition to the BayTrail family, most mid- to high-end Intel CPUs carry this feature.

#1. Preparation

Download, flash and load FydeOS and install it on the hard drive. The FydeOS official website and knowledge base have more detailed instructions, so that I won't repeat them here.

  • The official download address of FydeOS is , and you can also get the mirror of the domestic network disk in .
  • Instructions for flashing FydeOS to a portable storage device and booting up .
  • If conditions permit, you can install FydeOS as the only system on the PC so that it can monopolise a whole hard disk. According to this tutorial,) Coexist with FydeOS as a second system with other systems.

#2. Enable Android ADB debugging settings

  • Run "Android" in the application launcher.
  • Select "System" - "Developer options" - turn on the "ADB debugging" Option.

alt text

Currently, FydeOS does not carry Google's service framework and Play Store. If you want to install Android apps, you can download third-party Android Market or install them directly from the .apk file. Installed Android apps will automatically appear in the "application launcher".

#3. Enable Linux subsystem

  • Click "Settings", and find the relevant setting items about "Linux", as shown below:

alt text

  • Click "Turn On" and click "Next" on the prompt box that pops up:

alt text

  • Depending on your hardware configuration, it takes a few minutes to install and enable the Linux subsystem for the first time. After the installation is complete, FydeOS will add a new app called "Terminal" in the application launcher (click the lower left corner of the screen ⭕️ to enter), and click the icon to start: alt text

  • It can be seen that this is a fully functional Debian. Compared with the Crosh Shell with FydeOS, th has a complete and independent file system, where we can perform daily familiar Linux operations. You can update the Debian and install some commonly used tools with the following commands:

    sudo apt-get update && sudo apt-get upgrade
    sudo apt-get dist-upgrade
    
  • FydeOS has mapped the user folder in the Linux subsystem to the system's file manager. Through the "File" app in the apps launcher, we can see that FydeOS has added the new option of "Linux file", And is the same as the home folder in Terminal:

alt text

#4. Download, run Android Studio and install additional tools

  • We need to go to the official website to download Android Studio for ChromeOS:

alt text

  • After download, double click to install the Andoriod Studio.

  • After install, It can be seen that the Android Studio graphical interface starts immediately, and there is no obvious difference in experience from other Linux distributions. At this time, you need to initialise Android Studio according to the on-screen prompts and download the required SDK and accessory tool set.

#5. Connect to ADB target in Linux environment

We need to allow the Android subsystem of FydeOS to establish an ADB connection with Android Studio.

The specific method is that when Android Studio is running, right-click the "Terminal" icon in the taskbar and select "Open New Window". Run the following command in a new Terminal session:

sudo apt-get install adb
adb connect 100.115.92.2:5555

At this point, the Android subsystem will receive the corresponding ADB connection request, and a confirmation window will pop up; you need to click "OK" to agree to the connection request: alt text

#6. Deploy from FydeOS

After Connected to ADB target in Linux environment, you can load an Android app directly onto your FydeOS device using Android Studio or if you have an APK you can load it using the Terminal.

  • Deploy with Android Studio

    After you have set up Android Studio⁠ and ADB as described above, you can push your apps to the FydeOS' Android container directly from Android Studio. The FydeOS device will appear as an option in the device drop down:

    alt text

    Now you can push your app like any other Android device! The ADB authorization dialog appears the first time you try to push to a new device. After you authorize it, your application will launch in a new window.

  • You can also install your app from the terminal:

    adb install [path to your APK]
    

#7. Connect to ADB over a network

  • Make sure you enabled ADB debugging.
  • Get the IP address of your FydeOS Device:
    • Click the clock in the bottom-right area of the screen.
    • Expand the Network List

- Click network info to show the IP Address - Take note of the IP Address.

  • Connect to your FydeOS:
Return to your development machine and use ADB to connect to your FydeOS Device using its IP address:
adb connect <ip_address> 

On your FydeOS Device, click Allow when prompted whether you want to allow the debugger. Your ADB session is established.

#8. Frequently asked questions and where to go for help

Q: What if my "Connected devices" is empty?

A: You can stop ADB and reconnect in a new Terminal session:

adb kill-server
adb connect 100.115.92.2:5555

Q: What should I do if my Android Studio crashes?

A: You can pay attention to the java_error_in_STUDIO_xxxx.log log file generated under "Linux File", which is mainly caused by insufficient memory.

For more tips on using FydeOS and Linux subsystem, please refer to .

If you have more specific technical questions, you can post them to for help.

#8. References