I recently got a Huawei P30 and used adb to remove some preinstalled apps I didn't want to use. I went a bit too far and removed the system gallery app (com.android.gallery3d
) which turns out to be problematic for multiple things, such as opening taken pictures directly from the camera app.
I've tried reinstalling it but I'm facing multiple issues:
- When trying to install the APK that's still on the phone in
/system/priv-app/Gallery2
, I get aINSTALL_PARSE_FAILED_NO_CERTIFICATES
error. The full error:
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES: Failed to collect certificates from /data/app/vmdl30820468.tmp/base.apk: /data/app/vmdl30820468.tmp/base.apk: File res/drawable-xxxhdpi-v4/img_patten_7.jpg in manifest does not exist]
- When trying to install a version I found online, I get a
INSTALL_FAILED_VERSION_DOWNGRADE
, which is odd as the app is supposed to be uninstalled. It doesn't appear inpm list packages
, however runningdumpsys package com.android.gallery3d
does give a result, and the version is indeed more recent than the one I'm trying to install (9.1.1.309 vs 9.0.15.355). Using the-d
flag when installing doesn't help as it's not a debug app. I couldn't find a more recent version online.
Is there a way to reinstall this app that doesn't involve a factory reset? Alternatively, is there a way to install a different version of it? It seems like com.android.gallery3d
is a generic package name, I wouldn't be against having the "stock" Android one.
/system/priv-app/*
, the app isn't uninstalled. Are you sure you didn't just disable it? What command did you use to uninstall via ADB?adb uninstall -k --user 0 com.android.gallery3d
. Trying to run it again results in anot installed for 0
error (with or without the-k
flag). Not specifying the user also gives an error,DELETE_FAILED_INTERNAL_ERROR
adb shell "pm install -r <package.apk>" (replacing
<package.apk>` by the path to the installed APK file) or, if you have it on your PC,adb install -r <APKfile>
? The important thing is the-r
(re-install even if its there).-r
flag doesn't help, same issues with both methods (apk left on the device and the one I downloaded)--user 0
here as well? Then it can neither claim a wrong version nor that it's already there. If that doesn't work either, please trypm default-state app.name
(taken from this XDA post). I've never had that situation.