to add path for platform-tool edit .bashrc (for Debian), append at the end. log out and sign in again to get affect or run $ source ~/.bashrc
export PATH=$PATH:$HOME/AndroidStudio/Sdk/platform-tools/
to show devices attached
$ adb devices
* daemon not running; starting now at tcp:5037
adb * daemon started successfully
List of devices attached
A6501D9863TH039779 unauthorized -> Not allow, please allow on your device
$ adb devices
List of devices attached
A6501D9863TH039779 device -> your device allow to debug
to install application (don't support aab, compile to apk)
$ adb install example.apk
Performing Streamed Install
Success
to uninstall package
$ adb uninstall com.dedetok.radiowalkman
Success
to uninstall package (bloatware) for user 0 (default user). Use adb shell pm instead directly adb uninstall. Note: it just remove for current default user, it does not remove from firmware, you need to root your device for fully removal. After reset your device, the bloatware will come again.
$ adb uninstall --user 0 com.example.app vs
$ adb shell uninstall --user 0 com.example.app
$ adb shell pm uninstall --user 0 net.bat.store
Success
com.transsion.aivoiceassistant
to list packages
$ adb shell pm list packages | grep dedetok
package:com.dedetok.turuntirta
package:com.dedetok.pitrapuja
to list directory Download
$ adb shell ls /sdcard/Download/com.dedetok.wredacontactbackup
test.txt
to get error Logcat
$ adb logcat | grep com.dedetok.wredacontactbackup
- WorkManager
$ adb logcat -s dedetok WorkManager WM-WorkerWrapper
--------- beginning of system
--------- beginning of crash
--------- beginning of main
01-20 14:51:59.303 25534 25561 E WM-WorkerWrapper: Didn't find WorkSpec for id 6548d3d5-2c2e-47a0-a795-ff4f9365b2be
01-20 14:51:59.311 25534 25561 E WM-WorkerWrapper: Didn't find WorkSpec for id e42ac4be-f95e-41e8-9694-e4eb6bc40671
01-20 14:51:59.319 25534 25561 E WM-WorkerWrapper: Didn't find WorkSpec for id e42ac4be-f95e-41e8-9694-e4eb6bc40671
to get error
$ adb shell dumpsys dropbox | grep com.dedetok.wredacontactbackup
to clear data include cache for package com.dedetok.wredacontactbackup
$ adb shell pm clear com.dedetok.wredacontactbackup
Check JobScheduler (where WorkManager stores jobs)
$ adb shell dumpsys jobscheduler | grep -A 30 "com.dedetok.wredacontactbackup"
JOB #u0a124/1: 7b2babf com.dedetok.wredacontactbackup/androidx.work.impl.background.systemjob.SystemJobService
u0a124 tag=*job*/com.dedetok.wredacontactbackup/androidx.work.impl.background.systemjob.SystemJobService
#u0a124/1 last digit /1 is job id
Force scheduler to run, use job id
$ adb shell cmd jobscheduler run -f com.dedetok.wredacontactbackup 1
Running job [FORCED]