Godot Version 
4.5
 Question 
I am trying to access the vm/jni handles from a gdextension. 
One solution is to create an android plugin and load the so file by yourself:
  
  
    
  
  
    
    
      
        opened 05:10AM - 22 Apr 23 UTC 
      
        
          closed 03:07PM - 04 May 23 UTC 
        
      
     
    
        
          topic:gdextension
         
        
          topic:plugin
         
        
          platform:android
         
    
   
 
  
    ### Describe the project you are working on
A Godot GDExtension/GDNative plug… in that access device camera on Android via JNI.
### Describe the problem or limitation you are having in your project
On Godot 3.x, JNIEnv can be accessed on GDNative with no problem, but on Godot 4 such option is no longer available on GDExtension.
### Describe the feature / enhancement and how it helps to overcome the problem or limitation
The goal is to use java classes and JNI-related functionalities on GDExtension C++.
Bring back a way to get Godot JNIEnv, similar to `android_api->godot_android_get_env()` on GDNative, should be enough to overcome the problem.
### Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Same as above.
### If this enhancement will not be used often, can it be worked around with a few lines of script?
Since this involves JVM belonging to Godot itself, I don't think it can be workaround with a few lines script or in a form of add-on.
### Is there a reason why this should be core and not an add-on in the asset library?
Same as above.
EDIT: rephrasing 
   
   
  
    
    
  
  
 
Is this still the only way to go?
I don’t really mind creating a plugin but it sounds like a bit of unnecessary overhead comparing to just loading an so file to access a variable that is already stored within the engine.