Android uninstall app before boot completion A strange one this. I have got myself into a situation where I think that a single apk is causing boot to fail. I have the same situation on a Nexus 4 and Nexus 7 running 4.4. 

Running adb install &lt;com.myapp.package&gt; would hang - then the device would reboot - then would get stuck on Android is upgrading...Optimising app 1 of 1. 

I can list packages through adb shell at this point - but uninstalling with 

pm uninstall &lt;com.myapp.package&gt;

will just hang - presumably as the current process is doing something with that apk already.

If i try to boot into recovery at this point i get a dead android with a "no command" message. 

Fastboot is locked on the device and its not rooted.

My only option at this point i think is to unlock fastboot but was wondering if im missing something.

EDIT: I just wiped via fastboot on one device and it works again - dont really want to do this on other device if poss

Thanks!
The application apk will be stored in /data/app/ or system/app/ you can navigate there and rm .apk, then reboot