refactor into JAR-lib from APKLIB