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 a
INSTALL_PARSE_FAILED_NO_CERTIFICATESerror. 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 in
pm list packages, however running
dumpsys package com.android.gallery3ddoes give a result, and the version is indeed more recent than the one I'm trying to install (22.214.171.1249 vs 126.96.36.1995). Using the
-dflag 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.