简体   繁体   中英

Unpin application with adb shell commands in android lollipop

Summary

Is there a way to unpin apps in lollipop using shell commands

with adb iv tried:

adb shell input keyevent --longpress 4 187

but this never worked

Why i want to do this

1) i'm making a root application that replaces the on screen navigation buttons and need a way to unpin other apps

2) when using a virtual device and i pin a app there is no way for me to press back and recents at the same time with my mouse

尝试使用此命令取消固定前台应用程序:

am task lock stop `dumpsys activity | grep -A2 "(dumpsys activity recents)"| grep '#'| cut -d ' ' -f 7| cut -c 2-`
adb shell am task lock stop `dumpsys activity | grep -A2 '(dumpsys
activity recents)'| grep '#'| cut -d ' ' " \
                "-f 7| cut -c 2-

This works with Android 9+ devices

这适用于 android 4.4.2

adb shell su -c 'sqlite3 /data/data/com.android.launcher/databases/launcher.db "DELETE from favorites"'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM