You might did something strange to your Android if you encounter this problem. It's not normal if you face this:) But probably you know that already and counted the cost:)
When you have a downloaded apk, you are getting this:
|Parse error: "There was a problem parsing the package."|
Or you might try to install it via pm (android's package manager):
shell@bacon:/sdcard/ $ pm install -r Opera.apk pkg: Opera.apkFailure [INSTALL_FAILED_INVALID_URI]
adb still works
You can use android's debug bridge to install an apk fine, but that doesn't help if you need to install an apk from your phone.
realpath is the issue
It turns out, that the problem can be resolved by giving the absolute path of the apk to pm.
shell@bacon:/sdcard/ $ pm install -r /sdcard/Opera.apk pkg: /sdcard/Opera.apk
Or if you are scripting it for some reason ;)Success
shell@bacon:/sdcard/ $ pm install -r $(realpath Opera.apk)