We have moved to a new Sailfish OS Forum. Please start new discussions there.
0

How to downgrade an android app / apk? [answered]

asked 2020-04-18 01:05:39 +0200

Leon gravatar image

updated 2020-04-18 01:09:56 +0200

I have two apk files here and want to install the older one again. Example: 1.17 is actually installed and I want to go back to 1.16. I get a warning message (package conflict) after trying to install the older version via filemanager. How to downgrade an android app?

image description

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by molan
close date 2020-04-28 10:19:14.510753

Comments

First i would uninstall the older applikation.

s_mario ( 2020-04-18 02:03:12 +0200 )edit

I normally did all updates without any uninstallations. In this case I need the user data of the application. Uninstalling it would also delete the corresponding data ...

Leon ( 2020-04-18 02:45:50 +0200 )edit

I have downgraded some newspaper apps in Aptoide due to non compability. There is option while starting the installation in the shop page that 'Other versions etc'. This downgrading has succeeded in my cases, but I do not know in common. Thus come back to the androud shop pages where you have downloaded your app.

N9Sailfish ( 2020-04-18 07:43:15 +0200 )edit

@Leon, it's usually possible to save the app's local data. For instance, I play Fallout Shelter game and I have to install it everytime from scratch and I don't want to risk losing the data anyway so I copy the corresponding com.falloutshelter folder and re-install. After re-installation just paste that old back. If you already know which folder contains the data that you need, well then you can just copy paste that folder back etc. At least in my case every Android game app that stores local data, have worked just fine after this method.

Sakke ( 2020-04-18 10:19:01 +0200 )edit

Are you looking for "apkd-install YOUR_APK_FILE"? It worked for me on XA2*, SFOS 3 something.

A.Maretzek ( 2020-04-18 15:36:49 +0200 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2020-04-18 19:08:59 +0200

0xe4524ffe gravatar image

You can't do this with android package manager(apkd also uses android package manager under the hood). So you'd have to backup android app data(it's somewhere in /home/.android/data/data/ and/or /home/.android/data/user_de/0/), uninstall the app, install older version, and restore the data(except cache and code_cache).

Also, pm has keep app data and cache flag, so you can try to uninstall android app package, but keep data and cache, and then install the older version.

Do lxc-attach -n aliendalvik /system/bin/sh to get into aliendalvik shell. And pm uninstall -k <name of the package> to uninstall android app package but keep the data and cache.

Btw, never tried to do this, so I'm not sure if this will work perfectly.

edit flag offensive delete publish link more

Question tools

Follow
2 followers

Stats

Asked: 2020-04-18 01:05:39 +0200

Seen: 1,294 times

Last updated: Apr 18 '20