[Android Q&A, Help & Troubleshooting] bitart.zone:
Hello

I have an Xperia Ray and was running a 4.4.4 ROM based on CyanogenMod till a few weeks ago when I started to realize that many of the newer versions of different apps caused strange troubles. Some of them crashed most file explorers I tried just on loading the icon from the downloaded APK. Some I managed to install nonetheless only to have the same problem with the launcher/drawer itself. Every time it tries to display the icon of the app it dies. Looking for a solution I discovered that CM13 got ported for my phone and was happy to be able to change to Android 6.0.1.

Sadly the troubles did not go away. The apps that showed the above mentioned symptoms on 4.4.4 have similar effects on 6.0.1. Only that now these apps are crashing the whole phone forcing a reboot and that the launcher app does not load at all anymore. Only solution is to uninstall the app manually in recovery mode via adb shell.

After a lot of tinkering, experimenting, talking to other app devs, and rebuilding open source apps I found that the problems appeared with the update to Android Studio 3. It seems that without changing anything code wise for these apps only the update from gradle wrapper 3.5 to 4.1 seems to cause these troubles. On the other hand I can build my own apps with the newest Android Studio with everything up to date without these problems showing up. So I guess it is some library, API, or whatever in combination with the newer gradle versions that causes these troubles.

Well, it seems that there is a bug in the CyanogenMod ROMs, as far as I know by now. It's not a Xperia Ray specific problem as people with other hardware running CyanogenMod have the same problems. For example this thread here. And I got confirmation from an app developer team that they were able to reproduce the problems on a Galaxy S2 running CM13.

It's also not Android version related as updating to 6.0.1 did not help at all.

Have you experienced what I'm talking about and maybe found the solution for that problem? I think there is a bug in the CyanogenMod system somewhere but I'm not skilled enough to find it.

I fear that these problems will render my phone incompatible with more and more upcoming app versions and would really hate to have to switch to a bulky modern phone.

Here are some log files showing the errors. Maybe you can read something useful from them.

Thanks in advance!

EDIT:

Here some additional info that came as answer from a dev team I contacted regarding this issue:

The issue you have reported tends to only occur in devices with the older memory layout used by manufacturers for devices that run Android 2.x onwards, such as the Galaxy S2 - this layout still sticks around even when upgrading to custom ROMs with newer android versions. A unified internal layout for Android devices only started to appear in 2013 and it became the de-facto layout in 2014 or so.

In the old layout, you have both an Internal System Partition (1-2GB) and then an Internal System Memory (the rest of the device's advertised internal memory - its seen as emulated "External memory" - an external SD card then becomes "SD2" in these devices when running a custom ROM). This causes problems for apps that are created and compiled with the unified memory layout in mind, even if the old SDK is the target, because the system will not direct them to an accessible storage area to store user data.

The apps that do not have problems were the ones that have been around since android 2.x; they will instead have their own set of problems for newer devices and versions of Android.

Right now I'm not sure what to think of this...