Google Apps – Framework, Phonesky, GmsCore w/ AOSP Build.

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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值