没有合适的资源?快使用搜索试试~ 我知道了~
首页Android Go版本导入GMS服务指南
Android Go版本导入GMS服务指南
需积分: 50 9 下载量 113 浏览量
更新于2023-05-24
1
收藏 220KB PDF 举报
该文档详细说明了AndroidGO版本对GMS服务导入的配置指南以及要求。
资源详情
资源推荐
Google Confidential and Proprietary
Android Go Edition Device Configuration Guide
2018-02-24
Table of contents
Android Go Edition Device Configuration
Initial Boot
Fix profile based compilation
Product device makefile configuration
Device overlay configuration
Device package configuration
Generating ART Profiles for APKs
Other configuration changes
Additional options
Important patches
Android Go Edition Kernel Configuration
Kernel config
Kernel patches
About Google Mobile Services Go Edition
Downloading GMS Go Edition
Integrating GMS Go Edition
Integrating Files Go Edition
References
Abstract
This document is intended to describe how to get started with the initial configuration of an Android Go Edition
device build target and how to integrate GMS Go Edition application package.
© 2017 Google, Inc. All Rights Reserved. No express or implied warranties are provided for herein. All specifications are subject to change
and any expected future products, features or functionality will be provided on an if and when available basis.
1
Google Confidential and Proprietary
Android Go Edition Device Configuration
The below sections describe mandatory and recommended device build target configuration
Initial Boot
The first boot of devices can take a significant amount of time. Dex2oat during first boot may take several
minutes, so it may be wise to allow devices to complete first boot in the factory.
Fix profile based compilation
This fixes the profile compilation for system apps which ship with a profile on the system partition. The standard
profile compilation that happens as a part of the background job is not affected.
https://android-review.googlesource.com/#/c/platform/frameworks/base/+/533579/
https://android-review.git.corp.google.com/#/c/platform/frameworks/base/+/540362/
https://android-review.googlesource.com/#/c/platform/frameworks/base/+/553322/
https://android-review.googlesource.com/#/c/platform/frameworks/base/+/553321/
https://android-review.googlesource.com/#/c/platform/system/core/+/533578/
Product device makefile configuration
The product device makefile must include the go_defaults.mk for 1GB or go_defaults_512.mk for 512MB, to
include and setup all the default Android Go Edition build configuration flags.
# Inherit Go default properties, sets is-low-ram-device flag etc.
$(call inherit-product, build/target/product/go_defaults.mk)
List of more important default configuration flags
The following are some of the more important configuration flags in go_defaults.mk & go_defaults_512.mk, this
list does not include all the flags, please refer to go_defaults.mk, go_defaults_512.mk and
go_defaults_common.mk in build/target/product/ in the source code tree for the complete list.
go_defaults_common.mk
# Set lowram options
PRODUCT_PROPERTY_OVERRIDES += \
ro.config.low_ram=true \
ro.lmk.critical_upgrade=true \
ro.lmk.upgrade_pressure=40
go_defaults_512.mk additions
# lmkd can kill more now.
PRODUCT_PROPERTY_OVERRIDES += \
ro.lmk.medium=700
go_defaults_common.mk
2
Google Confidential and Proprietary
# Always preopt extracted APKs to prevent extracting out of the APK for gms
# modules.
PRODUCT_ALWAYS_PREOPT_EXTRACTED_APK := true
# Set threshold to filter unused apps
PRODUCT_PROPERTY_OVERRIDES += \
pm.dexopt.downgrade_after_inactive_days=10
# Set the compiler filter for shared apks to quicken.
PRODUCT_PROPERTY_OVERRIDES += \
pm.dexopt.shared=quicken
# Speed profile services and wifi-service to reduce RAM and storage.
PRODUCT_SYSTEM_SERVER_COMPILER_FILTER := speed-profile
# Use a profile based boot image for this device. Note that this is currently a
# generic profile and not Android Go optimized.
PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE := true
PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION :=
frameworks/base/config/boot-image-profile.txt
go_defaults_common.mk
# Default heap sizes. Allow up to 256m for large heaps to make sure a single app
# doesn't take all of the RAM.
PRODUCT_PROPERTY_OVERRIDES += dalvik.vm.heapgrowthlimit=128m
PRODUCT_PROPERTY_OVERRIDES += dalvik.vm.heapsize=256m
# Do not generate libartd.
PRODUCT_ART_TARGET_INCLUDE_DEBUG_BUILD := false
# Strip the local variable table and the local variable type table to reduce
# the size of the system image. This has no bearing on stack traces, but will
# leave less information available via JDWP.
PRODUCT_MINIMIZE_JAVA_DEBUG_INFO := true
go_defaults_512.mk additions
# madvise random in ART to reduce page cache thrashing.
PRODUCT_PROPERTY_OVERRIDES += \
dalvik.vm.madvise-random=true
Enable “Swap to zRAM”
● Follow the instructions at source.android.com to enable swap to zRAM, kernel config, SE Linux policy
changes etc.
3
Google Confidential and Proprietary
● Configure the zRAM size to 75% in the fstab file.
● Enable LZ4 compression for zRAM, also see kernel config section.
Example /device/<company>/<device>/fstab.enableswap
/dev/block/zram0 none swap defaults zramsize=75%
Example <product-device>.mk file
PRODUCT_COPY_FILES +=
device/<company>/<device>/fstab.enableswap:root/fstab.enableswap
Example init.rc
on init
# Set zRAM compression to lz4
write /sys/block/zram0/comp_algorithm lz4
Enable SVELTE malloc
Configure jemalloc for low memory, default to a single arena to minimize PSS consumed by jemalloc.
Example BoardConfig.mk
MALLOC_SVELTE := true
Include Android Go Audio Package
To minimize the size of the system image it is strongly recommended to include Android Go Audio Package
instead of the generic Audio Package (AllAudio.mk).
Example <product-device>.mk
$(call inherit-product-if-exists, frameworks/base/data/sounds/AudioPackageGo.mk)
Configure user data filesystem to F2FS
For increased performance it is required to enable F2FS on Android Go Edition devices. A few Android Platform
features, such as SQLite (WAL for example), have been tuned for better performance on F2FS compared to
EXT4. All supporting patches are in 3.18 and 4.4 common kernels.
● Enable F2FS in kernel config, see kernel config section below.
● Configure build system to generate the user data image as F2FS type.
● Update fstab to mount the /data partition using F2FS type.
Example BoardConfig.mk
TARGET_USERIMAGES_USE_F2FS := true
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
4
剩余16页未读,继续阅读
努力123~
- 粉丝: 13
- 资源: 11
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- zigbee-cluster-library-specification
- JSBSim Reference Manual
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功