8

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.

1
  • The app must still be there somewhere inside /system, so try finding its absolute location and installing from there. – Firelord Jul 31 '19 at 12:03
12

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 <package_name>

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

2
  • 3
    You have saved me from factory resetting my phone. I had uninstalled OneUI home screen app after installed Nova launcher for home screen. Later I realised that I would no longer be able to open the recent apps list. – Puspam Jul 9 '20 at 11:16
  • Thanks so much for this! In my case I also had to reinstall com.android.providers.calendar with the same process. – Luke Aug 20 '20 at 14:36
1

my way

  • install solid explorer
  • open settings
  • enable root storage
  • back to main
  • open hamburger menu
  • select root
  • go to system
  • go to app
  • search your app
  • install it

comment below if this works :)

thank you :-)

1

I uninstalled the package "com.google.android.partnersetup" when I was going to uninstall other app. I couldn't recover it with Bo Lawson's method. Instead i found this way:

pm dump com.google.android.partnersetup | grep Path    

This give us some paths. One of them is the one I'm going to use:
"codePath=/system/priv-app/GooglePartnerSetup"

Finally, I install the app which is in that direction. The app has the same name of the app folder, with ".apk" at the end:

pm install -r --user 0 /system/priv-app/GooglePartnerSetup/GooglePartnerSetup.apk

I hope this helps, but I don't know what exactly does this do. My source: comment from Mac23

0

I had the same problem with my Android 6 Phone. On Android 6the "adb shell cmd ..." commands are not availble.

I fixed it the following way (needs root or custom recovery with full file system access): - locate the apk file of the deleted package in the /system/app-priv folder - move the .apk file to a different location (e.g. /data/app) - reboot phone - move the apk file back to its original location - reboot phone

I hope this can help others who also don't have Android 7 or newer.

Best regards, Tobi

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.