Merge "Add code cache tests to libnativebridge."
diff --git a/debuggerd/crasher.c b/debuggerd/crasher.c
index d315ee5..d0c3912 100644
--- a/debuggerd/crasher.c
+++ b/debuggerd/crasher.c
@@ -59,7 +59,7 @@
     for(;;) {
         usleep(250*1000);
         write(2, &c, 1);
-        if(c == 'C') *((unsigned*) 0) = 42;
+        if(c == 'C') *((volatile unsigned*) 0) = 42;
     }
     return NULL;
 }
diff --git a/libnativebridge/native_bridge.cc b/libnativebridge/native_bridge.cc
index f8e1b33..eab2de0 100644
--- a/libnativebridge/native_bridge.cc
+++ b/libnativebridge/native_bridge.cc
@@ -320,46 +320,6 @@
   }
 }
 
-static void SetSupportedAbis(JNIEnv* env, jclass build_class, const char* field,
-                             const char* *values, int32_t value_count) {
-  if (value_count < 0) {
-    return;
-  }
-  if (values == nullptr && value_count > 0) {
-    ALOGW("More than zero values expected: %d.", value_count);
-    return;
-  }
-
-  jfieldID field_id = env->GetStaticFieldID(build_class, field, "[Ljava/lang/String;");
-  if (field_id != nullptr) {
-    // Create the array.
-    jobjectArray array = env->NewObjectArray(value_count, env->FindClass("java/lang/String"),
-                                             nullptr);
-    if (array == nullptr) {
-      env->ExceptionClear();
-      ALOGW("Could not create array.");
-      return;
-    }
-
-    // Fill the array.
-    for (int32_t i = 0; i < value_count; i++) {
-      jstring str = env->NewStringUTF(values[i]);
-      if (str == nullptr) {
-        env->ExceptionClear();
-        ALOGW("Could not create string %s.", values[i]);
-        return;
-      }
-
-      env->SetObjectArrayElement(array, i, str);
-    }
-
-    env->SetStaticObjectField(build_class, field_id, array);
-  } else {
-    env->ExceptionClear();
-    ALOGW("Could not find %s field.", field);
-  }
-}
-
 // Set up the environment for the bridged app.
 static void SetupEnvironment(NativeBridgeCallbacks* callbacks, JNIEnv* env, const char* isa) {
   // Need a JNIEnv* to do anything.
@@ -390,9 +350,6 @@
     if (bclass_id != nullptr) {
       SetCpuAbi(env, bclass_id, "CPU_ABI", env_values->cpu_abi);
       SetCpuAbi(env, bclass_id, "CPU_ABI2", env_values->cpu_abi2);
-
-      SetSupportedAbis(env, bclass_id, "SUPPORTED_ABIS", env_values->supported_abis,
-                       env_values->abi_count);
     } else {
       // For example in a host test environment.
       env->ExceptionClear();
diff --git a/libpixelflinger/tests/arch-arm64/assembler/arm64_assembler_test.cpp b/libpixelflinger/tests/arch-arm64/assembler/arm64_assembler_test.cpp
index 456be58..fd96f7e 100644
--- a/libpixelflinger/tests/arch-arm64/assembler/arm64_assembler_test.cpp
+++ b/libpixelflinger/tests/arch-arm64/assembler/arm64_assembler_test.cpp
@@ -409,7 +409,7 @@
 {
     const long base = long(instrMem);
     const long curr = base + long(instrMemSize);
-    __builtin___clear_cache((void*)base, (void*)curr);
+    __builtin___clear_cache((char*)base, (char*)curr);
 }
 void dataOpTest(dataOpTest_t test, ARMAssemblerInterface *a64asm, uint32_t Rd = 0,
                 uint32_t Rn = 1, uint32_t Rm = 2, uint32_t Rs = 3)
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 11c34f8..503f9ba 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -304,6 +304,8 @@
     # the following directory.
     mkdir /data/mediadrm 0770 mediadrm mediadrm
 
+    mkdir /data/adb 0700 root root
+
     # symlink to bugreport storage location
     symlink /data/data/com.android.shell/files/bugreports /data/bugreports