Reputation: 59
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
Upvotes: 1
Views: 3062
Reputation: 11
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
Upvotes: 0
Reputation: 1
This works with android 4.4.2
adb shell su -c 'sqlite3 /data/data/com.android.launcher/databases/launcher.db "DELETE from favorites"'
Upvotes: -1
Reputation: 117
Try this command to unpin the foreground app:
am task lock stop `dumpsys activity | grep -A2 "(dumpsys activity recents)"| grep '#'| cut -d ' ' -f 7| cut -c 2-`
Upvotes: 1