Hi all,
I want to log the build info of the android OS from the init
service native C file. Is there any direct way to get the build info
from the shell like using the package android.os.Build. My c file
looks like
#define LOG_TAG "Example Service"
#include < utils/log.h >
#include < unistd.h >
int main(int argc, char **argv)
{
LOGI("Build Info is" + ???); // I want the build info to be
logged from here directly
}
Using the application we can get Build info easily like
import android.app.Activity;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
public class Logger extends Activity {
private static final String TAG = "MyLogger";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Log.i(TAG,Build.VERSION.SDK);
}
}
Or i have to use any java function to get the build info as above from
c file. reverse of ndk??? how to do that???
Please help me ...
Thank you....