I am developing a piece of software that is eventually going to run on ChromeOS and will come in the form of an Android app (apk package). We have been asked to come up with a distrubution system that is both offline and simple for this app. I've been thinking about distributing the apk on USB drives and I would like to find a way to get the apk copied automatically to the system when the usb drive is inserted. Updates for the apk could also come later on and they would be on their own USB stick with the same system in order to update the software. Right now, I have no idea about ChromeOS and/or how to do this, I'm in a research phase.

| improve this question | | | | |
  • 1
    @KAE One issue with this is that to sideload third-party applications the Chromebook will need to be switched over to developer mode. Being able to automatically do so by plugging in a flash drive would be malware by definition. This documentation shows how to install Android apps on ChromeOS. Is this related to what you are trying to do? – kemotep Apr 8 '19 at 20:55
  • 1
    Thanks @kemotep. Indeed, this looks familiar and close to my experience with Android mobile devices. The chromebooks that will run the app will be solely dedicated to this purpose and will be offline - therefore, turning them once to developer mode and putting it as a prerequisite in our documentation is not an issue at all. Once this is done, is there a way to install the apk automatically ? Perhaps by running adb through some sort of shell script from the flash drive itself ? – KAE Apr 8 '19 at 21:03
  • I do not know enough about the specifics of Android or ChromeOS app development to know what is the best method of updating, however the act of plugging in a flash drive and having a script automatically run is behavior identical to malware. You should be able to place your apk file and a shell script on a flash drive that when initiated by the end user will trigger the update however I suggest you look into other more traditional methods of updating your app that are inline with best practices outlined by Google. – kemotep Apr 8 '19 at 21:58

Brute force solution: emulate a USB keyboard to send the necessary commands. (You should require the user to enable developer mode and get to a specific starting condition so you know which keystrokes are required.)

You wouldn't be the first to use a fake keyboard to help with Chromebook deployment. See for example the Centipede. You could combine the keyboard and storage in a single usb stick, also acting as a USB hub to allow it to have multiple device IDs.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.