Android 安装 GMS 方法

office365打不开 📅 2025-07-09 00:32:14 👤 admin 👁️ 7480 👑 863
Android 安装 GMS 方法

Android 安装 GMS 方法

下载GMS安装包:将installer.sh 和下载解压后的包放在同一目录执行installer.sh

下载GMS安装包:

https://opengapps.org 根据自己的平台架构,Android版本进行选择;第三个选项只是包含的google应用不同,可以根据自己的需要下载(比如aroma包含所有GMS服务和APpp,Pico只包含核心服务) 此方法需要root权限,只用于测试学习目的

将installer.sh 和下载解压后的包放在同一目录

执行installer.sh

$ ./installer.sh open_gapps-arm64-10.0-nano-20210619/

installer.sh :

#!/bin/bash

# sudo apt-get install lzip

c_path=$(dirname "$0")

my_path=$1

core_path=${my_path}Core

gms_path=$c_path/gms

if [ ! -d $gms_path ] ; then

mkdir $gms_path

fi

for file in ` ls $core_path `

do

# echo $file

# 1. unzip *.lz

if [ -f $core_path/$file ] && [ "${file##*.}"x = "lz"x ] ; then

# echo $file

lzip -d $core_path/$file

fi

# 2. unzip *.tar

if [ -f $core_path/$file ] && [ "${file##*.}"x = "tar"x ] ; then

# echo $file

tar -xvf $core_path/$file -C $core_path

fi

# # 3. move files

if [ -d $core_path/$file ] ; then

find $core_path/$file -name "app" -type d -exec cp -rf {} $gms_path \;

find $core_path/$file -name "priv-app" -type d -exec cp -rf {} $gms_path \;

find $core_path/$file -name "defaultetc-common" -type d -exec cp -rf {} $gms_path \;

find $core_path/$file -name "defaultframework-common" -type d -exec cp -rf {} $gms_path \;

rm -rf $core_path/$file

fi

done

adb wait-for-device

adb root

adb disable-verity

adb reboot

adb wait-for-device

adb root

adb remount

adb wait-for-device

# adb push $gms_path/priv-app /system/

# adb push $gms_path/app /system/

# adb push $gms_path/etc /system/

# adb push $gms_path/framework /system/

adb push $gms_path/priv-app/GoogleServicesFramework /system/priv-app/

adb push $gms_path/priv-app/Phonesky /system/priv-app/

adb push $gms_path/priv-app/PrebuiltGmsCore /system/priv-app/

adb push $gms_path/defaultetc-common/common/etc/default-permissions /system/etc/

adb push $gms_path/defaultetc-common/common/etc/permissions/. /system/etc/permissions/

adb push $gms_path/defaultetc-common/common/etc/preferred-apps/ /system/etc/

adb push $gms_path/defaultetc-common/common/etc/sysconfig/. /system/etc/sysconfig/

adb push $gms_path/defaultframework-common/common/etc/permissions/. /system/etc/permissions/

adb push $gms_path/defaultframework-common/common/framework/. /system/framework/

echo "push done ,waiting for reboot"

adb reboot

adb wait-for-device

adb root

adb remount

皇家推荐

gta5怎么用手机拨号码
银行卡锁住了多久解锁(银行卡密码锁了怎么解决)
银行卡锁住了多久解锁(银行卡密码锁了怎么解决)
科普:蚂蚁都是怎么样打群架的?
国际电话区号列表
java中Date日期类型的大小比较