How to reinstall an accidentally uninstalled app through ADB? Yesterday when removing bloatware from my phone, I accidentally uninstalled an app using the adb command:

pm uninstall -k --user 0 


I suspect the culprit to be com.sec.factory.camera, as since that unfortunate event, the camera app crashes every time I try to launch it.

I tried reinstalling it using either of these two commands

pm install com.sec.factory.camera
pm install --user 0 com.sec.factory.camera


but they returned me a "can't open non-file" error message. 

I tried as well downloading the APK on my phone and installing it from Android, but at the end of the installation process, I got a "not installed application" message.

Your help would be really appreciated to get my camera back.

My phone is an unrooted Samsung s7 Edge running Oreo 8.0.
Technically the command adb shell pm unistall -k --user 0  does not uninstall an app from the device. Instead it just removes it from a user.

There are a couple of ways to get the removed app back to the user. One way is. Through an adb shell with the command:

adb shell cmd package install-existing &lt;package_name&gt;


Or an extreme way would be through a factory reset of the device.