VIM3L Android API function calls


I am looking at this API document for VIM/VIM3L here.

With my VIM3L running Android, I am trying out some of these API calls.

I downloaded this project:
And copied the library and necessary code to my own project.
My project builds and runs.

I am getting some mixed results.

These API function calls work:


I do not see any behaviour change when any of these API functions are called:


Calling either of these API functions returns “socket: Permission denied”:


Calling this API function always results in -1 (fail), whether I set GPIO A6 to input or output:



Q1: These API function calls are defined for the VIM. Should they also work for the VIM3L?

Q2: Why would the calls to reboot(), shutdown() and sleep() have no effect?

Q3: I have come across two GPIO header descriptions on your website - this one and this one.
Which GPIO pin does GPIOA0_6 refer to / How do I know which i/o configuration I have?

Hi - can anyone give me some info please?

Hi @gar1234, Developers are on vacation for this week, you will get a follow up by next week.


They work with VIM3L

Can you use the reboot, shutdown and sleep functions with the vim3_demo.apk we generated? The apk is in the root directory of the code after you git clone
Post the ineffective logcat


LCD backlight controlled by GPIOAO_6
The above two links are introductions describing 40pin. This needs to be combined with the sch of vim3l to see the corresponding pins.

For Q2:

I cannot build the original project.

I get this error:

Unable to make field private final java.lang.String accessible: module java.base does not “opens” to unnamed module @b934bf5

This is my setup:

Android Gradle Plugin Version = 3.6.1
Gradle Version = 7.2
JDK = kbr-17 (JetBrains Runtime version 17.0.6)

Hello, after the project is downloaded, the generated apk can be used directly. You don’t need to compile a new apk.

The error you reported may be due to incorrect studio configuration. Let me take a look here.

If I load the demo apk, the API functions work. I have tried to integrate the API library in to my project but I can’t get it to work successfully yet.
Here are the steps I took so far:
I copied file ‘khadas_api.jar’ to the project’s lib folder
I included the library file in the project
In my main .java file, I defined KhadasApi:

private static KhadasApi mKhadasApi;
public static KhadasApi getKhadasApi() {
    return mKhadasApi;

In the OnCreate(), in the same file:

    mKhadasApi = new KhadasApi(this);

And later in that same file, on a butotn click:


The only other related I file that I could find, was ‘khadas_api.jks’, which is in the app directory. I copied that file to my app directory.

When I run the project now, I get the following error:

Process: com.example.MyApp, PID: 26831
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/app/KhadasApiManager;
at com.wesion.KhadasApi.(
at com.example.MyApp.ApplicationClass.onCreate(

Have you copied arm64-v8a/ and armeabi-v7a/ under khadas_api_demo/app/src/main/jniLibs to your project?