Search code examples
androidandroid-source

How can I pass data to libcore on Android?


I was modifying the libcore on Andorid for debugging purpose.
It took a lot of time to build even for a variable change.

Is it possible to pass the data to libcore of android? (so I can change the data in the running time).

I tried System.getProperty() but the data could not cross process.
I also tried SystemProperties.get() but it seems it can not be used in libcore (it could not find the package and symbol).

Does anyone know how to pass data to the libcore on Android?


Solution

  • Thanks Nativ.
    JNI is doable but a little complicated for me.

    Finally, I used a simple, easy but stupid way to do that.
    I created a file and saved my parameter in this file, and get the data from libcore.

    It is a stupid way but worked for me for debugging.
    Now I don't need to rebuild libcore and It saved much for me.