Skip to content

Instantly share code, notes, and snippets.

@Manamama
Created December 9, 2023 10:44
Show Gist options
  • Save Manamama/b275c30fc0201b70de3af354e00cbc70 to your computer and use it in GitHub Desktop.
Save Manamama/b275c30fc0201b70de3af354e00cbc70 to your computer and use it in GitHub Desktop.
Alias MTP that connects the Droid via MTP and opens the Downloads via nemo
alias mtp='adb -d shell svc usb setFunctions mtp && echo "Connecting to: $(adb -d shell getprop ro.product.brand | tr -d '\''\\n'\'')" && nemo "mtp://$(adb -d shell getprop ro.product.brand | tr -d '\''\\n'\'')_$(adb -d shell getprop ro.product.model | tr -d '\''\\n'\'')_$(adb devices | awk '\''NR==2 {print $1}'\'' | tr -d '\''\\n'\'')/Internal%20shared%20storage/Download"'
#Results:
#~$ mtp
# Connecting to: realme
# nemo shows Downloads of Droid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment