打开原生launcher页面

1
adb shell am start -n com.android.launcher3/.Launcher

打开一般电视的原生设置

1
adb shell am start com.android.tv.settings/.MainSettings

查看可见的activity,最上层的activity

1
adb shell dumpsys activity activities | grep "mResumedActivity"

查看Settings Provider的系统变量数据库

Settings共有三种分类,分别如下:

  • global:所有的偏好设置对系统的所有用户公开,第三方APP有读没有写的权限;
  • system:包含各种各样的用户偏好系统设置;
  • secure:安全性的用户偏好系统设置,第三方APP有读没有写的权限。

查看设置项的值

1
adb shell settings get system ${setting_key}

其中的get system可以根据设置的具体情况改成get global或者get secure

如果返回null说明没有这个选项

可以设置某项的值

1
adb shell settings put system sound_effects_enabled 1

打印某个域的所有值

1
adb shell settings list secure

打印接收到的系统广播

1
adb shell dumpsys |grep BroadcastRecord

获取系统中当前的语言选项

1
getprop persist.sys.locale

设置修改系统中的语言选项

1
adb shell "setprop persist.sys.locale fr-CA; setprop ctl.restart zygote"