diff --git a/docs/html/images/topic/arc/sideload_figure_1.jpg b/docs/html/images/topic/arc/sideload_figure_1.jpg new file mode 100644 index 0000000000000..8eb5085041854 Binary files /dev/null and b/docs/html/images/topic/arc/sideload_figure_1.jpg differ diff --git a/docs/html/topic/arc/device-support.jd b/docs/html/topic/arc/device-support.jd new file mode 100644 index 0000000000000..89cb02fefed95 --- /dev/null +++ b/docs/html/topic/arc/device-support.jd @@ -0,0 +1,153 @@ +page.title=Chrome OS Device Support for Apps +@jd:body + +
+
+

On this page

+ +
    +
  1. Overview
  2. +
  3. Supported Platforms
  4. +
+
+
+ +

+You can use the Google Play Store to install Android apps on several Google +Chromebooks. This document describes the Chromebooks, Chromeboxes, and +Chromebases that can install Android apps, both currently and in upcoming +releases of Chrome OS. +

+ +

Overview

+ +

+The same Android apps that run on phones and tablets can run on Chromebooks +without compromising their speed, simplicity, or security. To develop the best +experience for Android apps across Chromebooks, you should test your app on a +suite of devices that consists of the following categories: +

+ + + +

To learn more about Google Play Store support on Chromebooks, see the +following +Google Chrome blog post. +

+ +

Note: You may elect to exclude your app from +being available to Chromebooks. For more information, visit +View & restrict your app's compatible devices. +

+ +

+The following section lists the Chromebooks that work with Android apps and the +categories that each device satisfies. +

+ +

Supported Platforms

+ +

+Android apps are not available on every Chromebook, but Google continues to +evaluate more devices based on a range of factors, such as processor type, GPU, +and drivers. The following table shows the platforms that currently support +Android apps: +

+ +

+ Table 1. Chromebooks that currently support Android apps.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ManufacturerModelArchitectureTouchscreen supportConvertible
AcerChromebook R11 / C738TIntel x86YesYes
AsusChromebook FlipARMYesYes
GoogleChromebook Pixel (2015)Intel x86YesNo
+ +

+The following list shows the platforms that will support Android apps in an +upcoming release of Chrome OS: +

+ + diff --git a/docs/html/topic/arc/index.jd b/docs/html/topic/arc/index.jd new file mode 100644 index 0000000000000..d46fbc89ac595 --- /dev/null +++ b/docs/html/topic/arc/index.jd @@ -0,0 +1,398 @@ +page.title=Optimizing Apps for Chromebooks +@jd:body + +
+
+

On this page

+ +
    +
  1. Update Your App's Manifest File
  2. +
  3. Leverage Support for Multi-Window Mode
  4. +
  5. Support the Keyboard, Trackpad, and Mouse
  6. +
  7. Use Backup and Restore Effectively
  8. +
  9. Update the NDK Libraries
  10. +
  11. Plan Support for New Android Features
  12. +
  13. Test Your App
  14. +
  15. Set Up ADB
  16. +
  17. Additional Learning Materials
  18. +
+
+
+ +

+Google Chromebooks now support the Google Play Store and Android apps. This +document describes some ways that you can optimize your Android apps for +Chromebooks. +

+ +

Update Your App's Manifest File

+ +

+To begin optimizing your Android app for Chromebooks, update your manifest file +(AndroidManifest.xml) to account for some key hardware and software +differences between Chromebooks and other devices running Android. +

+ +

+As of Chrome OS version M53, all Android apps that don't explicitly require the +android.hardware.touchscreen +feature will also work on Chrome OS devices that support the +android.hardware.faketouch feature. However, if you want your app +to work on all Chromebooks in the best possible way, go to your manifest file +and adjust the settings so that the android.hardware.touchscreen +feature is not required, as shown in the following example. You should also +review your mouse and keyboard interactions. +

+ +
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          ... >
+    <!-- Some Chromebooks don't support touch. Although not essential,
+         it's a good idea to explicitly include this declaration. -->
+    <uses-feature android:name="android.hardware.touchscreen"
+                  required="false" />
+</manifest>
+
+ +

+Different devices often have different sensors available in them. See the Sensors +Overview document for an overview of all sensors that the Android platform +supports. Although Android handheld devices may have GPS and accelerometers, +sensors are not guaranteed to be available in every Chromebook. However, there +are cases where the functionality of a sensor is provided in another way. For +example, Chromebooks may not have GPS sensors, but they still provide location +data based on Wi-Fi connections. If you want your app to run on Chromebooks, +regardless of sensor support, you should update your manifest file so that none +of the sensors are required. +

+ +

Note: If you don't require a particular sensor +for your app but still use measurements from the sensor when it's available, +make sure you dynamically check for the sensor's availability before trying to +gather information from it in your app. +

+ +

+Some software features are unsupported on Chromebooks. For example, apps that +provide custom IMEs, app widgets, live wallpapers, and app launchers aren't +supported and won't be available for installation on Chromebooks. For a complete +list of software features that aren't currently supported on Chromebooks, see incompatible +software features. +

+ +

Leverage Support for Multi-Window Mode

+ +

+The implementation of Android apps on Chrome OS includes basic multi-window +support. Instead of automatically drawing over the full screen, Android renders +apps on Chrome OS into layouts that are appropriate for this form factor. Google +provides support for the most common window layouts: + +

+ +

+In addition, end users are presented with window controls to toggle among all +available layouts. By choosing the correct orientation option, you can ensure +that the user has the correct layout upon launching the app. If an app is +available in portrait and landscape, it defaults to landscape if possible. After +this option is set, it is remembered on a per-app basis. Google recommends that +you test your app to ensure that it handles changes in window size +appropriately. +

+ +

Support the Keyboard, Trackpad, and Mouse

+ +

+All Chromebooks have a physical keyboard and a trackpad, and some Chromebooks +have a touchscreen as well. Some devices can even convert from a laptop to a +tablet. +

+ +

+Many existing apps already support mouse and trackpad interactions with no extra +work required. However, it's always best to adjust your app's behavior +appropriately when users interact with it using a trackpad instead of a +touchscreen, and you should support and distinguish between both interfaces +properly. Given the support for physical keyboards, you can now provide hotkeys +to enable your app's users to be more productive. For example, if your app +supports printing, you can use Ctrl+P to open a print dialog. +

+ +

Use Backup and Restore Effectively

+ +

+One of the strongest features of Chromebooks is that users can easily migrate +from one device to another. That is, if someone stops using one Chromebook and +starts using another, they simply have to sign in, and all of their apps appear. +

+ +

Tip: Although it's not mandatory, backing up +your app's data to the cloud is a good idea. +

+ +

+Chromebooks can also be shared among a large number of people, such as in +schools. Since local storage is not infinite, entire accounts—together +with their storage—can be removed from the device at any point. For +educational settings, it's a good idea to keep this scenario in mind. +

+ +

Update the NDK Libraries

+ +

+If your app uses the Android NDK libraries, and its target SDK version is 23 or +higher, ensure that text relocations are removed from both the ARM and x86 +versions of your NDK libraries, as they're not compatible in Android 6.0 (API +level 23) and higher. By leaving text relocations in your NDK libraries, you may +also cause incompatibility errors with Chromebooks, especially when running on +a device that uses an x86 architecture. +

+ +

Note: To view more details on updating NDK +libraries properly, see the +Runtime section of the Android 6.0 Changes document. +

+ +

Plan Support for New Android Features

+ +

+Android apps on Chromebooks initially ship with APIs for Android 6.0 (API level +23). By following the best practices outlined above, your app is likely to be +compatible with the multi-window improvements introduced in Android 7.0 (API +level 24). It's good to plan support for the APIs and behaviors available as of +Android 7.0, which feature several improvements. For example, multi-window +support is better integrated, and you're able to resize activities arbitrarily, +making them feel more natural. You can also access APIs for drag-and-drop +operations across apps and mouse cursor control. +

+ +

Test Your App

+ +

+To load your app onto your +Chromebook for testing, you must enter Developer mode on your Chrome OS +device and enable unknown sources. See the +Putting your Chrome OS Device into Developer Mode document for detailed +instructions about moving your device into Developer mode. After your device is +in Developer mode, you can go to your Chrome settings and select Enable +Unknown Sources under the security in app settings. +

+ +

+After enabling Developer mode, you can load an Android app onto your Chrome OS +device using one of several methods. For more details, see the Load Your App section of +the Loading Apps on Chromebooks page. +

+ +

Note: To ensure that your Android app works +well on a variety of Chromebook devices and available form factors, Google +recommends that you test your app on an ARM-based Chromebook, an x86-based +Chromebook, a device with a touchscreen and one without one, and on a +convertible device (one that can change between a laptop and a tablet). To view +the full list of supported devices, see the Chrome OS Device Support for +Apps page.

+ +

Set Up ADB

+ +

+Before attempting to set up an ADB connection, you must start your Chrome OS in + +Developer Mode so that you have the ability to install Android apps on the +Chromebook. +

+ +

Caution: After switching your Chrome OS +device to Developer mode, it restarts and clears all existing data on the +device. +

+ +

+To set up ADB, complete the following steps: +

+ +
    +
  1. + Press Ctrl+D to start your device. +
  2. +
  3. + Finish the setup process. +
  4. +
  5. + Log into your test account. +
  6. +
  7. + Accept the Google Play Store terms and service conditions. +
  8. +
+ +

Configure the firewall

+ +

+To configure the Chrome OS firewall to allow incoming ADB connections, complete +the following steps: +

+ +
    +
  1. + Press Ctrl+Alt+T to start the Chrome OS terminal. +
  2. +
  3. + Type shell to get to the bash command shell: +
    +crosh> shell
    +chronos@localhost / $
    +
    +
  4. +
  5. + Type the following commands to set up developer features and enable + disk-write access for the firewall settings changes: +
    +chronos@localhost / $ sudo /usr/libexec/debugd/helpers/dev_features_rootfs_verification
    +chronos@localhost / $ sudo reboot
    +
    + The sudo reboot command restarts your Chromebook. +

    Note: You can press the Tab +key to enable autocompletion of file names.

    +
  6. +
  7. + After your device restarts, log in to your test account and type the + following command to enable the secure shell and configure the + firewall properly: +
    +chronos@localhost / $ sudo /usr/libexec/debugd/helpers/dev_features_ssh
    +
    + You can now exit out of the shell. +
  8. +
+ +

Note: You must complete this procedure only +once on your Chromebook.

+ +

Check the IP address of your Chromebook

+ +

+To verify the IP address of your Chromebook, complete the following steps: +

+ +
    +
  1. + Click the clock icon in the bottom-right area of the screen. +
  2. +
  3. + Click Settings. +
  4. +
  5. + The Internet Connection section in the Settings area lists all of + the available networks. Select the one that you want to use for ADB. +
  6. +
  7. + Take note of the IP address that appears. +
  8. +
+ +

Enable ADB debugging

+ +

+To enable ADB debugging, complete the following steps: +

+ +
    +
  1. + Click the clock icon in the bottom-right area of the screen. +
  2. +
  3. + Click Settings. +
  4. +
  5. + In the Android Apps section, click the Settings + link in the line that reads Manage your Android apps in Settings. + This brings up the Android apps settings. +
  6. +
  7. + Click About device. +
  8. +
  9. + Click Build number seven times to move into Developer mode. +
  10. +
  11. + Click the arrow in the top-left area of the window to go back to the main + Settings screen. +
  12. +
  13. + Click the new Developer options item, activate ADB + debugging, and then click OK to allow ADB + debugging. +
  14. +
  15. + Return to your development machine and use ADB to connect to your + Chromebook's using its IP address and port 22. +
  16. +
  17. + On your Chromebook, click Allow when prompted whether you + want to allow the debugger. Your ADB session is established. +
  18. +
+ +

Troubleshooting ADB debugging

+ +

+Sometimes the ADB device shows that it's offline when everything is connected +properly. In this case, complete the following steps to troubleshoot the issue: +

+ +
    +
  1. + Deactivate ADB debugging in Developer options. +
  2. +
  3. + In a terminal window, run adb kill-server. +
  4. +
  5. + Re-activate the ADB debugging option. +
  6. +
  7. + In a terminal window, attempt to run adb connect. +
  8. +
  9. + Click Allow when prompted whether you want to allow + debugging. Your ADB session is established. +
  10. +
+ +

Additional Learning Materials

+ +

+To learn more about optimizing your Android apps for Chromebooks, consult the +following resources: +

+ + diff --git a/docs/html/topic/arc/sideload.jd b/docs/html/topic/arc/sideload.jd new file mode 100644 index 0000000000000..dca84ffc65ca4 --- /dev/null +++ b/docs/html/topic/arc/sideload.jd @@ -0,0 +1,125 @@ +page.title=Loading Apps on Chromebooks +@jd:body + +
+
+

On this page

+ +
    +
  1. Enter Developer Mode
  2. +
  3. Enable Unknown Sources
  4. +
  5. Load Your App
  6. +
+
+
+ +

+This document describes how to enter Developer mode and enable +unknown resources so that you can load Android apps on your Google +Chromebook. +

+ +

Enter Developer Mode

+ +

+To load Android apps, you must enable unknown sources. Enabling unknown sources +is available only when your device is in Developer mode. +

+ +

Caution: Modifications that you make to the +system are not supported by Google and may void your warranty. Additionally, +modifications may cause hardware, software, or security issues. +

+ +

Note: On most devices, both the +recovery button and the dev-switch button are virtualized. If +these instructions don't work for you, see the +specific instructions for your device. +

+ +

+To enter Developer mode, complete these steps: +

+ +
    +
  1. + Invoke Recovery mode by pressing and holding the + Esc and Refresh (F3) keys, then pressing + the Power button. +
  2. +
  3. + When the Recovery screen appears, press Ctrl+D. + There's no prompt for this action, so you must simply complete it. + Afterwards, you are prompted to confirm and reboot into Developer mode. +
  4. +
+ +

+If you see one of the following screens when you turn on your device, you've +successfully entered Developer mode: +

+ + + +

Figure 1. Developer mode confirmation +screens.

+ +

Note: To skip the OS loading screen, either +wait 30 seconds or press Ctrl+D, and your Chromebook continues +starting. +

+ +

Enable Unknown Sources

+ +

+To enable unknown sources, navigate to Chrome Settings > App Settings > +Security, then enable Unknown sources by moving the +slider to the right. +

+ +

Note:You can enable unknown sources only when +your device is in Developer mode. +

+ +

Load Your App

+ +

+After enabling unknown sources, you can load apps by copying an app's APK file +to the Downloads folder and opening it with Android's File Manager app. + +

+ +

+You can copy the APK file to your Chromebook using one of the following methods: +

+ +