You can install GMS in this way.

  1. Install GMS via adb
  2. Restart the device and open GooglePlay and try to log in to your Google account.This is the step to generate the Android Id needed for the steps below
  3. Get your Android Id
  4. Register your device on "https://www.google.com/android/uncertified/"

Specific steps are as follows:

#--------------------------install-----------------------------
#make the device can root;
adb shell setprop persist.sys.root_access 3;
adb root
adb remount
#push the folder into /system/priv-app
#For the specific push content, please refer to the decompressed content
adb push ~/GMS/Phonesky /system/priv-app/
adb push ~/GMS/GoogleServicesFramework /system/priv-app/
adb push ~/GMS/PrebuiltGmsCoreRvc /system/priv-app/
#-----------------------------end------------------------------

#------------------------uninstall----------------------------- 
#If you want to uninstall GMS, just delete the folder pushed into system/priv-app.
adb shell setprop persist.sys.root_access 3
adb root
adb remount
adb shell
cd /system/priv-app/
rm -r Phonesky/
rm -r GoogleServicesFramework/
rm -r PrebuiltGmsCoreRvc/
#-----------------------------end------------------------------
adb shell
ls /system/priv-app|grep Phonesky
ls /system/priv-app|grep GoogleServicesFramework
ls /system/priv-app|grep PrebuiltGmsCoreRvc

If the ls command outputs the content after grep, it means that your push is successful. If no information is displayed, your operation may have failed.

adb reboot

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/8970b2e1-da08-4371-938f-95a8768ac117/device-2021-07-22-115705.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/e3514768-e1d5-446e-95ab-2ae650de3e27/device-2021-07-22-115638.png

adb root
adb shell 'sqlite3 /data/data/com.google.android.gsf/databases/gservices.db \\
    "select * from main where name = \\"android_id\\";"'

//Command execution result like this.Your Andoird ID is 40XXXXXXXXXXXXXXX7
android_id|40XXXXXXXXXXXXXXX7

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/668207be-5287-4d79-8db4-df5ff5de8692/Untitled.png