Useful links:
Android.mk File syntax specification
AOSPforNexus5

—————————–
1.) The purpose of this article is to have basic play services embedded into AOSP.
b.) Simply put, minimum shell to get it going. None of that factory images bloat.
2.) During your play services account setup, play may crash once or twice.
b.) It’s a hint to restart the phone for possibly updates to take place.
—————————–

According to the link above, three files are necessary to get Play Store going, to add an account then you can install whatever you wish.
GmsCore.apk
Phonesky.apk
GoogleServicesFramework.apk

The files above can be found on any of the latest 5.1 Gapps available on the internet.
GmsCore.apk was originally ‘PrebuiltGmsCore.apk‘. Just rename it.

Let’s go to ‘~/workingDir‘ folder: Based from the AOSP build.
$ cd ~/workingDir

Go to ‘device/lge/hammerhead‘ and let’s gedit ‘full_hammerhead.mk‘ – don’t forget to make a copy of it first.
$ gedit full_hammerhead.mk
-Let’s add ‘$(call inherit-product-if-exists, vendor/gapp/hammerhead/device-vendor.mk)‘ right after ‘$(call inherit-product-if-exists, vendor/lge/hammerhead/device-vendor.mk)
-Save, exit the file.

Go back to ‘~/workingDir. Browse to ‘vendor/‘. Make a folder ‘gapp/‘ then ‘hammerhead/‘ then create a file ‘device-vendor.mk
$ mkdir gapp
$ cd gapp
$ mkdir hammerhead
$ cd hammerhead
$ touch device-vendor.mk

Edit ‘device-vendor.mk‘ add the following inside the file:$ gedit device-vendor.mk
PRODUCT_PACKAGES += \
Phonesky GoogleServicesFramework GmsCore

You should still be inside ‘hammerhead‘ folder. Create a ‘proprietary‘ folder then browse it. Create a file ‘Android.mk
$ mkdir proprietary
$ cd proprietary
$ touch Android.mk
$ gedit Android.mk

——————-INSERT THE FOLLOWING INSIDE—————————
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_MODULE := Phonesky
LOCAL_MODULE_TAGS := optional
LOCAL_BUILT_MODULE_STEM := package.apk
LOCAL_MODULE_OWNER := google
LOCAL_MODULE_CLASS := APPS
LOCAL_PRIVILEGED_MODULE := true
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)

include $(CLEAR_VARS)
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_MODULE := GmsCore
LOCAL_MODULE_TAGS := optional
LOCAL_BUILT_MODULE_STEM := package.apk
LOCAL_MODULE_OWNER := google
LOCAL_MODULE_CLASS := APPS
LOCAL_PRIVILEGED_MODULE := true
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)

include $(CLEAR_VARS)
LOCAL_MODULE_SUFFIX := $(COMMON_ANDROID_PACKAGE_SUFFIX)
LOCAL_MODULE := GoogleServicesFramework
LOCAL_MODULE_TAGS := optional
LOCAL_BUILT_MODULE_STEM := package.apk
LOCAL_MODULE_OWNER := google
LOCAL_MODULE_CLASS := APPS
LOCAL_PRIVILEGED_MODULE := true
LOCAL_SRC_FILES := $(LOCAL_MODULE).apk
LOCAL_CERTIFICATE := PRESIGNED
include $(BUILD_PREBUILT)
——————-END INSERT —————————
Save, exit the file.

This is where you want to make sure the three files are in the same ‘proprietary‘ folder.
$ cp GoogleServicesFramework.apk ~/workingDir/vendor/gapp/hammerhead/proprietary
$ cp Phonesky.apk ~/workingDir/vendor/gapp/hammerhead/proprietary
$ cp GmsCore.apk ~/workingDir/vendor/gapp/hammerhead/proprietary

Back out to ‘~/workingDir
$ cd ~/workingDir
$ make clean
 <<– You can ignore this step, the build will be done quicker.
$ . build/envsetup.sh
$ lunch aosp_hammerhead-user or $ lunch aosp_hammerhead-userdebug
$ make -jN <<– N==# of cpus chosen for vm.

-Flash the new files in bootloader and test play services on your new build/rebuild.

原文地址: https://dcrin3.com/unscrambled/?p=931

Google Apps – Framework, Phonesky, GmsCore w/ AOSP Build.相关推荐

  1. Android Google Services Framework Google Play

    今天早上看到手机提示系统更新完成,需要重启,然后点击了reboot, 没想到重启后google play 打不开了,并且老是提 has topped. 重新安装以前存储的 google service ...

  2. 如何使用Google Apps脚本构建YouTube Uploader Bot

    Whenever you hear the word 'Bot' you probably imagine a robot like they show in the movies. They are ...

  3. 如何使用脚本编辑器为您的Google Apps增压

    If you use Google Apps, then chances are you're not using them to their full extent. With Google App ...

  4. Google Apps becomes Chromebook sales channel

    Google Apps becomes Chromebook sales channel The Acer Chromebook (Credit: James Martin/CNET) Google ...

  5. How to install Google Apps (GApps) on your Android Device / Phone

    http://senk9.wordpress.com/2010/12/03/how-to-install-google-apps-gapps-on-your-android-device-phone/ ...

  6. Google Apps申请注册

    Google Apps申请填表注意事项域名:目前没有限制,.org和.com的似乎有优先考虑. IP地址:Google Apps现在已经对中国开放.不需要使用代理服务器了职务填CTO,How are ...

  7. 使用 Google Apps 账号申请 GAE 的问题

    用 Google Apps 邮箱申请的 GAE 会无限的出现 "Create an Application",这时需要通过一个特殊的 URL 访问 GAE:https://appe ...

  8. 将家人从Gmail,Thunderbird,Outlook等迁移到Google Apps:权威指南

    enjoyed this post, or this blog, please 喜欢这篇文章或博客,请make a secure tax-deductable donation to the Amer ...

  9. Google Apps Script 的使用

    Google Apps Script 是为谷歌工作表 Sheets.文档, Docs.幻灯片Slides或表单 Forms创建附加组件,自动化您的工作流,与外部api集成,等等. 他的使用也很简单,除 ...

最新文章

  1. 使用PsPing测试Azure虚拟机的连通性
  2. PS如何批量生成缩略图(方法可以通用其他重复劳动)
  3. rest-framework:认证组件
  4. python获取文件编码格式除了chardet还有别的方式吗_使用python的chardet库获得文件编码并修改编码...
  5. boost::mp11::mp_any相关用法的测试程序
  6. 骆驼和春天的Drools决策表
  7. Qt工作笔记-关于各种QGraphics中item的坐标分析(如QGraphicsLineItem)【天坑】
  8. 打开网页出现运行脚本错误的解决技巧
  9. Java基础(彩票小程序)
  10. PDF文件的书签批量自动导入和导出 PDFBookmark-Exchanger
  11. ADAS/AD控制器模块开发03 - 系统架构设计及通用需求定义
  12. 微信小程序视频学习教程
  13. 5.15java例题:水仙花 奇偶数 三个和尚 求和 偶数求和 两只老虎 逢七过 减肥案例
  14. c语言题 设圆的半径,C语言初学者:编程序:设圆半径r圆柱高h,求圆周长面积圆柱体积圆球表面积...
  15. js第六、七天 Array、string
  16. 湖南启动CCTV《星光达人秀》 《宾导会客厅》全球直播发布
  17. java引用类型内存_Java的引用类型的内存分析
  18. Python——爬取单章小说内容
  19. Go:Gnome sort 侏儒排序(附完整源码)
  20. 【杂谈】360极速浏览器本地收藏夹的文件在哪里?

热门文章

  1. DLL中传递STL参数(如Vector或者list等)会遇到的问题[转载]
  2. C语言中的位域 bit field [转]
  3. 高性能计算的线程模型:Pthreads 还是 OpenMP
  4. 【Leetcode】岛屿问题(数量,周长,面积)
  5. 利用matlab对xml文件进行批量处理
  6. 云炬60s看世界20211205
  7. 天池 O2O 优惠券使用预测思路解析与代码实战
  8. oracle 如何形成死锁,ORACLE死锁
  9. 禁用浏览器滚动条的解决方案
  10. c++中创建渐变背景