[Wear OS General] bernarbernuli:
Useful ABS commands

​

ADB is a tool that allows us to interact with our watch in a more advanced way. It should be clarified that this interaction is done via command line. Usually, these commands are executed from a Windows or Linux computer; or a Mac with MacOS. ADB commands can be used for many tasks. These include resetting the watch, manually installing applications, extracting files, etc. To be able to execute ADB commands, if you have not done it yet, follow the steps in the section "Prepare clock for advanced functions" from the first post of this thread. Below I list the most significant ones to apply and useful to apply to a Wear OS.

I recommend this page and this where much more information about the parameters of each adb command is provided.

adb reboot --> Reboot
adb reboot recovery --> Reboot and boot to recovery mode
adb reboot-boot-bootloader --> Reboot and boot in bootloader mode

adb connect <Watch_ip> --> Connects the device via Wi-Fi
adb disconnect --> Disconnect device
adb devices --> Show connected devices
adb shell --> Execute adb commands in a terminal

adb shell getprop ro.build.version.release --> Displays Android Version
adb shell getprop ro.serialno --> Displays Serial Number
adb shell dumpsys battery --> Displays battery status

adb push file.png /sdcard/file.png --> Copy files from the computer to the watch
adb pull /sdcard/file.png --> Copy files from watch to computer

adb shell ls -a /mnt/sdcard --> Show list of folders and files, including hidden files
adb shell ls -d /mnt/sdcard --> Displays only list of folders

adb install <app_name.apk> --> Install applications
adb install -r <app_name.apk> --> Reinstall (update) applications
adb uninstall <app_name.apk> --> Uninstall apps

adb shell pm list packages mobvoi | sort --> List installed applications in alphabetical order and only with the word "mobvoi".
adb shell pm list packages -d --> list disabled applications
adb shell pm list packages -e --> list enabled applications
adb shell pm list packages -3 --> list of installed third-party applications
adb shell pm list packages -s --> list system applications list
adb shell pm list packages -i --> list with source of installation of each package
adb shell pm list packages -f --> List of applications with path

adb shell pm enable <package_name> --> Enable app
adb shell pm disable-user --user 0 <package_name> --> Disable app
adb shell pm clear <package_name> --> Clear all data associated with a package
adb shell pm reset-permissions -p <package_name> --> Reset all permissions of an app
adb shell pm grant <package_name> <permission_name> --> Grant a permission to an app.
adb shell pm revoke <package_name> <permission_name> --> Revoke a permission of an app.

adb shell am start -a android.intent.action.CALL -d tel:+34666123456 --> Make a call.

adb shell am start -a android.intent.action.SENDTO -d sms:+34666123456 --en sms_body "Test message" --ez exit_on_sent true --> Send an SMS message.

.

adb shell wm density 288 --> Adjust screen density.
adb shell wm density reset --> Restores default density

adb shell screencap -p /sdcard/my_screenshot.png --> Take screenshot
adb shell screenrecord --time-limit 20 --output-format raw-frames --verbose /sdcard/my_video.raw[ --> Records the activity on screen for 20" in RAW format

adb logcat -d > bugerror.txt --> Saves a logcat to a file on the local device

.