Installing Google apps on BeagleBone

Once you have ported AOSP to your platform, an obvious next step is to install some apps: maybe Gmail or Angry Birds. Ideally, you would want Google Play Store so that you can select apps from the 100,000's available. But, there is a problem. Play Store, like most of the apps on Play Store, requires Google Mobile Services (GMS) to work. GMS extends the Android framework by adding the libraries, configuration files and applications required to support the extended Google APIs that most developers know simply as Google Services. Most of these components are in the system partition so either they have to be included as part of the base AOSP build or installed as root afterwards. There is also a licensing issue: the components that make up GMS and applications like Gmail, Google Maps and Google Now are proprietary to Google and require a license.

Nevertheless, you can try out GMS and get access to the Google experience. You could extract the necessary components from a running (licensed) Android handset, or from the Nexus factory images. Or you can install one of the community-maintained gapps packages. Below, I am using gapps from http://goo.im/gapps.

To install gapps on a normal handset you would install a recovery manager, such as ClockWorkMod ROM manager, boot into recovery and use it to load the zip file. There isn't a version of CWM for BeagleBone (yet) but the following method achieves the same effect by using an adb root shell to issue the commands by hand.

Installing gapps

This only works if you have my current BeagleBone Black Android 4.4 KitKat release installed in internal flash or microSD card.

Get gapps for KitKat/4.4 from http://goo.im/gapps. Then

$ adb push gapps-kk-20140105-signed.zip /sdcard/Download
$ adb remount

In an adb shell, issue these commands on the BeagleBone:

# mkdir /system/addon.d
# mount -o remount,rw /
# mkdir /tmp
# updater 1 1 /sdcard/Download/gapps-kk-20140105-signed.zip

The script takes a couple of minutes to run. You can ignore messages like

about to run program [/sbin/busybox] with 3 args
run_program: execv failed: No such file or directory
run_program: child exited with status 1

Then reboot, and you will see Google Play and Gmail apps are installed. You can use Play to install any others you need.

BeagleBone with Gapps

What is updater?

The Android updater command reads from a zip file which contains a script and the files to install. It takes three arguments

  • The updater binary API to use, 1, 2, or 3. Usually you want 1
  • A file descriptor to write commands to. Use '1' for standard output
  • The path name of the zip file

The zip file must contain the install script in

META-INF/com/google/android/updater-script

The script is written in "edify", the basic syntax of which is described in the AOSP directory bootable/recovery/edify/README

The updater command also understands install scripts written in an older format called "amend". In this case the script file must be named "update-script" (drop the 'r' from updater):

META-INF/com/google/android/update-script

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

...not compatible with your device...

Hello,

Thank you for your informative blog posts!

I have successfully followed your tutorial to the end however I can not install any apps from the app store.
I always get the message "This item is not compatible with your device."
Can you provide assistance on how to correctly spoof the device id via build.prop or do you know of another method of bypassing this?

TIA,

Kev

Hello, I have successfully

Hello,

I have successfully followed your tutorial to the end however I can not install any apps from the app store.
I always get the message "This item is not compatible with your device."
Can you provide assistance on how to correctly spoof the device id via build.prop or do you know of another method of bypassing this I wanaa create an app related to New Year?

Thanks

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Youtube and Vimeo video links are automatically converted into embedded videos.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.