Useful adb and server cmds: Difference between revisions
Created page with "=== App active admin, needed to replace app on Osprey workstation === adb shell dpm remove-active-admin com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver dpm set-device-owner com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver === remove a registered device === curl --location --request POST 'http://192.168.1.9/removeRegisteredDevice/' \ --header 'Content-Type: text/plain' \ --data-raw '{"deviceId"..." |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
== adb commands == | |||
=== App active admin, needed to replace app on Osprey workstation === | === App active admin, needed to replace app on Osprey workstation === | ||
Line 4: | Line 6: | ||
dpm remove-active-admin com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver | dpm remove-active-admin com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver | ||
dpm set-device-owner com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver | dpm set-device-owner com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver | ||
Alternate method | |||
adb shell dpm remove-active-admin com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver | |||
adb shell dpm set-device-owner com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver | |||
adb shell appops set android TOAST_WINDOW deny | |||
Additional directions from Scott: | |||
'''Osprey Workstation Installation Procedure''' | |||
'''Analyst Station:''' | |||
1. Log into existing Analyst app as “service” | |||
2. Close the Analyst app | |||
3. In the Android Studio > Terminal window, type: | |||
adb shell dpm remove-active-admin com.viken.vx.workstation.debugAnalyst/com.viken.vx.workstation.AdminReceiver | |||
4. From Android Studio, install new version of the app | |||
5. In the Android Studio > Terminal window, type: | |||
adb shell dpm set-device-owner com.viken.vx.workstation.debugAnalyst/com.viken.vx.workstation.AdminReceiver [ENTER] | |||
adb shell appops set android TOAST_WINDOW deny | |||
6. Reboot the workstation box | |||
'''Operator Station:''' | |||
1. Log into existing Operator app as “service” | |||
2. Close the Operator app | |||
3. In the Android Studio > Terminal window, type: | |||
adb shell dpm remove-active-admin com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver | |||
4. From Android Studio, install new version of the app | |||
5. In the Android Studio > Terminal window, type: | |||
adb shell dpm set-device-owner com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver [ENTER] | |||
adb shell appops set android TOAST_WINDOW deny | |||
6. Reboot the workstation box | |||
== Server commands == | |||
=== remove a registered device === | === remove a registered device === |
Latest revision as of 08:05, 31 March 2023
adb commands[edit | edit source]
App active admin, needed to replace app on Osprey workstation[edit | edit source]
adb shell dpm remove-active-admin com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver dpm set-device-owner com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver
Alternate method
adb shell dpm remove-active-admin com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver
adb shell dpm set-device-owner com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver adb shell appops set android TOAST_WINDOW deny
Additional directions from Scott:
Osprey Workstation Installation Procedure
Analyst Station:
1. Log into existing Analyst app as “service”
2. Close the Analyst app
3. In the Android Studio > Terminal window, type:
adb shell dpm remove-active-admin com.viken.vx.workstation.debugAnalyst/com.viken.vx.workstation.AdminReceiver
4. From Android Studio, install new version of the app
5. In the Android Studio > Terminal window, type:
adb shell dpm set-device-owner com.viken.vx.workstation.debugAnalyst/com.viken.vx.workstation.AdminReceiver [ENTER]
adb shell appops set android TOAST_WINDOW deny
6. Reboot the workstation box
Operator Station:
1. Log into existing Operator app as “service”
2. Close the Operator app
3. In the Android Studio > Terminal window, type:
adb shell dpm remove-active-admin com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver
4. From Android Studio, install new version of the app
5. In the Android Studio > Terminal window, type:
adb shell dpm set-device-owner com.viken.vx.workstation.debugOperator/com.viken.vx.workstation.AdminReceiver [ENTER]
adb shell appops set android TOAST_WINDOW deny
6. Reboot the workstation box
Server commands[edit | edit source]
remove a registered device[edit | edit source]
curl --location --request POST 'http://192.168.1.9/removeRegisteredDevice/' \ --header 'Content-Type: text/plain' \ --data-raw '{"deviceId" : "testing1234"}'
force logout[edit | edit source]
curl —location —request POST ‘http://192.168.1.9/forceLogOut/‘ \ —header ‘Content-Type: text/plain’ \ —data-raw ‘{ “username”: “user1.1” }’
clear django sessions[edit | edit source]
sudo python3 /home/vikenadmin/server/webapi/viken_django/manage.py clearsessions
Available server commands as of 6/10/2021[edit | edit source]
admin heartbeat updateScan requestImage requestPhoto setAlert updateAlert deleteAlert deleteAllAlerts sendPixels getPixels updateMetadata getMetadata sendDeviceCommand getDeviceCommand sendDeviceStatus getDeviceStatus setDeviceActive setStatsLog getStatsLog clearStatsLog setDevData getDevData registerDevice getRegisteredDevice removeRegisteredDevice deleteAllRegisteredDevices getAllRegisteredDevices updateLastRunTime getLastRunTime sendLPRData getLPRData modifyLPRData lprAlignment configureDefaultSettings setSetting getSettings testing forceLogOut login logout getUser getUsers setModeRequest setLight setMode getModeRequest getTrafficManagementReady auditLogsJson auditLogs getArchivedVehicleRecords setVehicleRecordSelected updateVehicleRecord removeOldRecords deleteVehicleRecords removeOldAuditLogs reportVersion versions snapshotVersions hashes snapshotHashes exportVehicleRecord getAllVehicleRecords clearAttachmentDirectory updateAttachments