-1

I recently purchased a Moto Z Play Droid Edition which is incapable of being rooted or the bootloader being unlocked. In an attempt to remove bloatware, I have removed several apps. I managed to "uninstall" apps following this XDA tutorial, however without root, that merely disables them from the user.

I have used an old version of Google Calendar for several years, and I wanted to be able to install the same .apk that I have used, however Google Calendar was installed as a system app on Stock Android, so I would need to downgrade it. When I try the simple commands of adb install -r -d -f calendar.apk I get

[INSTALL_FAILED_VERSION_DOWNGRADE]

Because I was unable to fully uninstall the Google Calendar app that came with the stock ROM, there must be some remnant that prevents me from installing an older version.

Is there any way to progress and install this apk? Do I need to change something in the AndroidManifest.xml in order to proceed? Is that even possible with a Google app, which is most likely encrypted?

Any other suggestions?

Jefferson
  • 794
  • 10
  • 24

1 Answers1

0

You would need the source to be able to modify the manifest and rebuild. You would need to change the package name, that's the only way to do it.

Ackerbar
  • 109
  • 4
  • That's regarding the method where I would edit the AndroidManifest.xml? Or overall, that is the only way I would be able to install a downgraded version of an apk? – Jeff Abrahams Aug 12 '17 at 23:28
  • Both, the only way you can install another app is by having a unique package name, which you change in the AndroidManifest.xml then recompile, and the only way to do that is if you have the source. I don't believe you would just be able to unzip, edit, recompress, and reinstall the apk; I think the binary files actually need the updated package name as well, which requires a new build. – Ackerbar Aug 13 '17 at 00:24
  • Check out this repo, may be what you are looking for: https://github.com/android/platform_packages_apps_calendar – Ackerbar Aug 13 '17 at 00:28
  • Sorry to be a total doof about this, but I'm not quite sure what I'm looking at in the repo you linked me to. I see this contains a AndroidMainfest.xml. Was this suggested as a means of me getting an AndroidManifest.xml to edit and repackage into the .apk I have in order to produce a high level version that might trick my phone? I was able to use apktool to decompile the Calendar apk and I was able to edit its AndroidManifest.xml but when I took the apk, made it a zip, repackaged it with my edited AndroidManifest.xml and turned it into an apk again, I got an error when trying to install it. – Jeff Abrahams Aug 13 '17 at 02:10
  • Oh sorry, I should have clarified that. That's the source code, so you'd have to actually download it and compile it with Android studio. It might be more work than it's worth for you though if you're not set up for coding. – Ackerbar Aug 13 '17 at 02:14
  • Is it the source code for the Calendar app as a whole or for a specific version? Or is it more of the foundation of the app than that? I definitely don't have much of a coding background to do some heavy lifting, but if I'm able to compile parts of this with pieces of the apk version I have, then I would be willing to give it a try if you can tell me what direction I should Google in. Would I also need to sign this in a way that Google accepts? – Jeff Abrahams Aug 13 '17 at 02:29
  • This is a specific older version (not sure which actually but it's the only one I saw) but you would have to compile the whole thing, you can't really dissect pieces like that unfortunately. I would Google setting up Android Studio, then importing an existing project. You shouldn't actually need to do any coding but it can be a bit of a pain to get an old project to build the first time. And you don't need to worry about signing if you build and run in debug mode, which is the default. Sorry the answer isn't simpler, I hope you're able to get it working. – Ackerbar Aug 13 '17 at 03:54