kolibri-installer-android icon indicating copy to clipboard operation
kolibri-installer-android copied to clipboard

Migrate remaining jnius usage in Kolibri into kolibri-android-installer as a monkey patch

Open rtibbles opened this issue 1 year ago • 0 comments

Currently Kolibri imports jnius in one place in order to get an accurate count of available disk space.

https://github.com/learningequality/kolibri/blob/8c7510342b2478c31ef26bb4d55514193f50f4b1/kolibri/utils/system.py#L149

This was necessary, due to permission restrictions introduced in Android 8 (see here: https://issuetracker.google.com/issues/37140047) and where it was introduced here: https://github.com/learningequality/kolibri/pull/4158.

It seems that we probably still need to handle this properly, but doing so in a way that doesn't include a dependency on jnius in Kolibri will allow us to migrate to chaquopy more easily.

Therefore, we should remove this code from Kolibri, then do a monkey patch of shutil.disk_usage within the Android installer, that will do the appropriate call.

Once we have upgraded to chaquopy, we can then further test to see if the monkey patch is still needed.

rtibbles avatar Mar 21 '24 20:03 rtibbles