Android 4.4 想打开设置-应用,在AndroidManifest.xml 找了好久做一下笔记
adb shell "dumpsys activity | grep -i run" 就可以获取前台运行的APP包名和类名
adb shell am start -n com.android.settings/com.android.settings.Settings 【设置】
adb shell am start -n com.android.settings/.applications.StorageUse 【Android 4.4 打开存储】
adb shell am start -n com.android.settings/.RunningServices 【Android4.4 打开应用正在运行】
adb shell am start -n com.android.settings/.ManageApplications 【Android4.4 打开应用全部运行】
adb shell am start -n com.android.settings/.DisplaySettings 【Android4.4 打开显示】
adb shell am start -n com.android.settings/.SoundSettings 【声音】
adb shell am start -n com.android.settings/.LanguageSettings 【输入法】
adb shell am start -n com.android.settings/.bluetooth.BluetoothSettings 【蓝牙】
adb shell am start -n com.android.settings/.wifi.WifiSettings 【wifi】
adb shell ime list 【-s 列出安装并选中的,-a 列出全部,】
adb shell settings get secure default_input_method 【获取正在使用的输入法】
adb shell settings put secure default_input_method com.baidu.input_baidu/.ImeService 【切换输入法】
adb shell ime enable com.baidu.input_baidu/.ImeService 【设置输入法可以】
adb shell ime set com.baidu.input_baidu/.ImeService 【设置默认输入法】
【记录AndroidManifest.xml 中打开页面 的判断方式】
不能打开的类似这种:
比如 android:name="Settings$WifiSettingsActivity"
这个带有特殊符号,使用adb shell am start -n com.android.settings/.WifiSettingsActivity 是无法打开的,会显示不存在。
能够打开的类似这两种:
android:name=".wifi.WifiSetupActivity"
android:name="Settings"
adb shell am start -n
可以多去试一试,这种AndroidManifest.xml 有宝藏。
另外,记录一下遇到的intent 跳转问题,
【android.permission.START_ANY_ACTIVITY of 10050 id denid】
解决方法:
添加【android:exported="true"】