Useful adb and server cmds

From SoftwareGuy
Revision as of 19:25, 19 March 2023 by Mark (talk | contribs) (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"...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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"      : "testing1234"}'

force logout

curl —location —request POST ‘http://192.168.1.9/forceLogOut/‘ \
—header ‘Content-Type: text/plain’ \
—data-raw ‘{
  “username”: “user1.1”
}’

clear django sessions

sudo python3 /home/vikenadmin/server/webapi/viken_django/manage.py clearsessions

Available server commands as of 6/10/2021

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