Skip to content

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

Open
@rtibbles

Description

@rtibbles

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: learningequality/kolibri#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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions