1

I would like to debug the Android/Java API calls from the highest call (from a FileInputStream) to the system call on kernel level.

StringBuffer datax = new StringBuffer("");
FileInputStream fIn = openFileInput(filename);
InputStreamReader isr = new InputStreamReader(fIn);
BufferedReader buffreader = new BufferedReader(isr);

String readString = buffreader.readLine();
while (readString != null) {
   datax.append(readString);
   readString = buffreader.readLine();
}

isr.close();

I know that Android uses bionic instead of GNU C as standard library, which transfers (amongst other) the data from bottom to top and vica versa.

For further information - I would like to put a user specific "file-filter" in front of that call. I thought of to use the UserManager in combination with that (But the call should be not blocked by the Android UserManager, I like to use it only to get user informations - if possible). But at first I need to know where I can place it and if it´s in general possible.

From here I can read that I have to set the log level and use dmesg.

Thanks!

Android Architecture

Fabman22
  • 183
  • 12
  • What bug do you want to remove? Or what do you mean with "debug"? – CL. Jan 18 '17 at 12:23
  • I want to know the file read() calls of each "layer" step to step till down to the kernel. Then I like to look for the right position for my "filter". I like to say for example: "The current read() (triggered by Java´s FileInputStream call) comes from user A with privileges (which are stored in a table or something like that) who likes to get an image, so the function is allowed to return the image. If the read request comes from User B with no privileges, the function will return null. -> No bug – I like to add a "feature", but don´t know where. Let´s say I like to manipulate the read() call. – Fabman22 Jan 18 '17 at 14:54

0 Answers0