How to autorun apk on android by plugging usb? I have an APK file and i have a 4GB usb stick that could be plugged into an Android phone via USB-OTG  and a PC.  I've been wondering how could i plug the usb into the android phone and have the apk be auto installed without doing it manually. I'm asking for something like the autorun script we use on PC but I need one for android. I'm interested in having it work on Lollipop in particular, if that makes a difference.
It's not possible to install packages automatically, and there's no feature like AutoRun. AutoRun was a huge security problem on Windows systems, so it seems unlikely that a similar feature will be added to Android. You just have to put the APK file on the USB stick and install it by opening it with the package installer.

It would be possible to make an app that listens for USB connection events, scans for APK files, and asks the package installer to install any APK files it finds, but the app would have to be already installed on the phone, and the user would still have to click to accept the installation of the new apps.