How to install Android Studio on Chrome OS


[ad_1]

Android development was only possible on Mac, Windows and Linux computers for a long time. That changed with the release of Chrome OS 69 and support for Linux apps. Here’s how you can start developing Android apps from Android Studio on Chrome OS.


Update: As of May 2019, Google offers a simple one-click installation process for Android Studio on Chrome OS. The instructions below on enabling ADB debugging and WiFi debugging are still valid and relevant.


How to install Android Studio on Chrome OS

  1. Switch to developer mode (optional)
  2. Enable ADB debugging on Chrome OS (optional)
  3. Activate Linux applications
  4. Download Android Studio
  5. Install Android Studio
  6. Add launcher icon
  7. Enable Wi-Fi debugging (optional)
  8. Connect to a device
  9. Start coding!

There are a few important steps you should take before proceeding.

First of all, in order to debug apps directly on your Chromebook, you need to put your Chromebook in developer mode. If your Chromebook isn’t already in developer mode, you’ll need to wipe your device. Please make sure you have backed up your important files before proceeding.

Second, it is currently not possible to debug your app on an Android device connected via USB in Android Studio for Chrome OS. According to Google, this capability is expected to arrive later this year. Until then, to debug on an Android device, you will need to configure ADB debugging over WiFi, which is considered insecure.

Third, not all Chromebooks support Linux apps. Make sure your device is compatible before continuing.

Finally, you will need at least 6.4 GB of storage space just to install the Linux and Android Studio apps on Chrome OS. You will also need additional space for your Android projects.

1. Switch to developer mode (optional)

Developer mode is only required by Android Studio on Chrome OS to debug your apps directly on your Chromebook. If you don’t plan to test your apps this way, you can skip to step 3.

First, turn off your Chromebook. Then, hold down the Esc and Refresh keys and turn your device back on. This will put your device into recovery mode. From there, press Ctrl-D to enter developer mode.

You will be prompted to confirm, as this, again, wipe your device. Now Everytime it starts up, you will be reminded for a number of seconds that your device is in developer mode. You can press Ctrl-D to ignore this message.

Since your device has now been wiped, you will need to set up your account again.

2. Enable ADB debugging on Chrome OS (optional)

As in the previous step, this is only required for debugging Android apps on your Chromebook. If you don’t plan to do this, skip this step.

Open the Settings application, click on “Google play store“, so “Manage Android preferences“to open the Android Settings app. Then follow the usual procedure to enable Developer Options.

Once in the Developer options menu, activate ADB debugging.

3. Activate Linux applications

Open your Chrome operating system Settings application, search for “Linux applications“and click”Light up“. Your Chromebook will download the files required to use Linux apps. When complete, a new Terminal the application will open.

4. Download Android Studio

Visit the Android Studio downloads page and download the Android Studio package for Linux. The name of the file will look something like ‘android-studio-ide-173.4907809-linux.zip’. Once the download is complete, you will need to open the Files app and copy the zip of your Chrome OS Downloads To Linux files.

5. Install Android Studio

Open the Terminal app and enter the following command (make sure you enter the correct filename) to unzip the Android Studio files:

unzip android-studio-ide-173.4907809-linux.zip

It will take a few minutes. Once done, run another command to start Android Studio:

./android-studio/bin/studio.sh

You will now be greeted with the standard Android Studio setup wizard. Perform the setup as usual to download the required Android files.

6. Add launcher icon

When the installation is complete, the Android Studio welcome window will appear. Android Studio is completely installed and ready to use, but as is, you will need to open Android Studio from Terminal the same way we installed it. To make things easier, we can add a Launcher icon.

In the Android Studio welcome window, in the lower right corner, you will see Configure. Click on it to open the menu, then choose Create an office entry. Click OK on the menu that appears. Now Android Studio will appear in your launcher.

7. Enable Wi-Fi debugging (optional)

Enabling Wi-Fi debugging is only required if you want to debug apps on your Android device. If you don’t plan on doing this or are willing to wait for Google to allow debugging Android apps over USB from Android Studio on Chrome OS, you can skip this step. Wireless debugging is a security risk, and should be used with caution.

You will need a second computer (Windows, macOS, or Linux) with Android Studio installed to enable WiFi debugging on your Android device. Connect your device (with USB debugging enabled) to your second computer and run the following command:

adb tcpip 5555

If this is your first time running adb from your computer to this phone, you might be asked to enable debugging. If so, you might need to run the command again after enabling it.

That’s it! You can disconnect your Android from the computer. Wireless debugging should now be enabled.

8. Connect to a device

Whenever you want to connect Android Studio to Chrome OS for debugging, you need to follow this step. For this step, we need an IP address to connect to.

If you’re debugging directly on your Chromebook, make sure you’ve turned on Developer Mode above. The IP you need is always 100.115.92.2

If you are debugging your Android device, make sure you have enabled wireless debugging above. Make sure your Android and Chromebook are on the same Wi-Fi network. Next, you need your Android’s current IP address. This is usually found in the Settings application. Find About the phone then press Status. What you need is listed under IP adress.

Now go back to your Chromebook and open Terminal. From there, run the following command, using the previous Chromebook IP address or the Android IP address we just got:

./Android/Sdk/platform-tools/adb connect 10.211.6.113

The first time you run this command, it may say “authentication failed”. Just accept the debug prompt on your device and ignore the message. Your device will now appear in Android Studio as a debugging device.

You can verify that everything worked correctly with the following command:

./Android/Sdk/platform-tools/adb devices

 Chrome OS Terminal adb

9. Start coding!

You are ready ! You can now develop Android apps directly from your Chromebook and debug them on Android and / or directly on your Chromebook. The ability to run Android Studio on Chrome OS makes it arguably the most versatile operating system on the market today.


Check out 9to5Google on YouTube for more information:

FTC: We use automatic affiliate links which generate income. Following.


Check out 9to5Google on YouTube for more information:

[ad_2]

Comments are closed.