Running Command Line from Android App on Chromebook

  • Thread starter Android Central Question
  • Start date
A

Android Central Question

I have an Android App that runs on a Chromebook as Device Administrator (BIND_DEVICE_ADMIN, DeviceAdminReceiver etc.). The purpose in gaining that level of access was to be able to run commands like ...

cat /dump_vpd_log --full -stdout
dmidecode --type 17
battery_test 10
memory test
storage_test_1
storage_test_2
This is all to collect system and diagnostic data on the chromebook, power wash it and report the data back via WiFi to a server that collects the information and records the erasure and device specs for re-use or re-sale. I have the app asking for the Device Administrator Privileges and that part works as does the data transfer at the end. Getting the data I need from the other commands doesn't work, it always crashes with "permission denied" errors. I tried "sudo" in front of the commands and that crashes with "permission denied" as well. I assumed having Device Administrator Privileges was the issue and now that I have them, nothing changed, same errors.

Has anyone ever tried this and gotten it working? Any guidance would be much appreciated!

Thank you!
 

Trending Posts

Forum statistics

Threads
943,214
Messages
6,917,873
Members
3,158,890
Latest member
Sáenz