Euphoria-OS / Bug-tracker

4 stars 2 forks source link

GApps dont get removed from data (downloaded) when updated gapps package is flashed #19

Open eurochild-dps opened 9 years ago

eurochild-dps commented 9 years ago

My post on xda in the TK GApps thread http://forum.xda-developers.com/android/help/qa-tk-gapps-help-discussion-thread-t3116316/page15

tested on clean installations both on cm and euphoria roms on nexus4 gapps that were updated dont get removed from data as they should after flashing the last gapps package tried with both stock and nano modular packages

the devs answer: "The post install app cleanup is handled by Android itself, during boot, when it's dexopting ("Android is upgrading... Optimizing app xx of xx"), always has been. Don't see how we could have any effect on it, nothing has changed."

Details: here is the case.. Install the rom and gapps, after that a system app ex. playstore or play services gets updated, then when u flash a new gapps package, the copies of the updated apps must be removed from data partition and keep the fresh one only in system partition.

screenshot_2015-06-09-20-07-18

eurochild-dps commented 9 years ago

and another reply from TKruzze http://forum.xda-developers.com/showpost.php?p=61427497&postcount=241

"As @osm0sis and a few others have pointed out before, it's a function of the Android OS to remove the app versions that you have updated from the Play Store (or sideloaded on your device) once an updated version has been installed in the system partition (ie GApps). If this is no longer working as it has in the past, there's nothing that can be done within the GApps installer to fix or change this. It would have to be ROM issue, or perhaps even a change in Google's AOSP code, that caused this change in behavior. Just make certain you're wiping the Dalvik and the cache, after you flash an updated GApps package, and the OS is supposed to do the rest automatically."

eurochild-dps commented 9 years ago

@Altaf-Mahdi source: http://forum.xda-developers.com/showpost.php?p=61938664&postcount=396

Regarding Lollipop no longer revert back to 'System App' and cleanup 'User App' when an app (with same versionCode) is present on both /system and /data partition. What this mean on Lollipop is installed newer gapps via Play Store, flashing tk-gapps (or equivalent) later. You will ended-up having two copies of the same app, while the 'User App' version is the one in used.

I went through a quick look against PackageManager source at AOSP, found the line likely to be the cause. A < has been changed to <= directing code flow to skip under the same versionCode situation. Not sure it was intentionally introduced. I would say, unlikely so...

Code:

lollipop-mr1-release lines 4302: if (pkg.mVersionCode <= ps.versionCode) {

kitkat-mr2.2-release line 3605: if (pkg.mVersionCode < ps.versionCode) {