0

I have two "test" native executables and I'm trying to execute/start them as from native callback method. This is how "test" applications look:

int main(int argc, char** argv){
__android_log_write(ANDROID_LOG_ERROR, "OHM", "INDEPENDENT PROCESS STARTED");
    while(1){
        usleep(1000000);
        __android_log_write(ANDROID_LOG_ERROR, "OHM", "INDEPENDENT PROCESS LOG");
    }
    return 1;
}

I've checked the appName.apk file and they are indeed part of the application (placed in the assets/bin folder when unpacked). This is how I'm currently fetching assets related to the executable files:

void OSM::startSystem(AAssetManager* assetMngr){
     m_OhmTest = AAssetManager_open(assetMngr, "bin/ohm", AASSET_MODE_UNKNOWN);
     m_OmbTest = AAssetManager_open(assetMngr, "bin/omb", AASSET_MODE_UNKNOWN);
     __android_log_write(ANDROID_LOG_ERROR, "ASSETS", "LOADED");
     if(m_AppFinished){
         m_RunApp = true;
         m_AppFinished = false;
         pthread_create(&m_Thread, NULL, thread_adapter_OSM, (void*)this);
     }
}

Is it possible to somehow use the fetched assets (m_OhmTest and m_OmbTest) to run the executable?

4

0 回答 0