Skip to content

Google Play services

Google 账号管理 — 登录 / 登出 / 账号查询;所有 Google 系应用共享

Overview

Name
IDgoogleservices
NameGoogle Play services
Platformandroid
Categorysystem
Packagecom.google.android.gms
Commands4
SourceView on GitHub

Install

bash
pb skills install googleservices

Commands

pb googleservices accounts

列出设备上所有 com.google 类型的账号(解析 dumpsys account)

pb googleservices login

触发系统 ADD_ACCOUNT_SETTINGS 流程添加 Google 账号;可选 best-effort 凭证填充

Arguments

NameTypeRequiredDefaultDescription
--emailstring要登录的邮箱(不传则只打开页面让人工完成)
--passwordstring密码(与 --email 配合)
--waitint120登录页打开后多少秒内轮询 dumpsys account 直到检测到新账号

Example

bash
pb googleservices login

pb googleservices logout

移除指定 Google 账号;不带 --email 时只打开账号设置页

Arguments

NameTypeRequiredDefaultDescription
--emailstring要移除的 Google 账号邮箱(不传只打开设置页)
--waitint15点 Remove account 后多少秒内轮询 dumpsys account 确认账号被移除

Example

bash
pb googleservices logout

pb googleservices status

查询 Google 账号高层登录态:是否已登录 / 账号数 / 默认账号 / 账号列表