Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)  DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Also fix an occurrence of LOGW missed in an earlier change.

Bug: 5449033
Change-Id: I2e3b23839e6dcd09015d6402280e9300c75e3406
diff --git a/dexopt/OptMain.cpp b/dexopt/OptMain.cpp
index bdbeff6..3cdf5be 100644
--- a/dexopt/OptMain.cpp
+++ b/dexopt/OptMain.cpp
@@ -73,7 +73,7 @@
 
     /* make sure we're still at the start of an empty file */
     if (lseek(cacheFd, 0, SEEK_END) != 0) {
-        LOGE("DexOptZ: new cache file '%s' is not empty", debugFileName);
+        ALOGE("DexOptZ: new cache file '%s' is not empty", debugFileName);
         goto bail;
     }
 
@@ -176,7 +176,7 @@
     if (dvmPrepForDexOpt(bootClassPath, dexOptMode, verifyMode,
             dexoptFlags) != 0)
     {
-        LOGE("DexOptZ: VM init failed");
+        ALOGE("DexOptZ: VM init failed");
         goto bail;
     }
 
@@ -186,7 +186,7 @@
     if (!dvmContinueOptimization(cacheFd, dexOffset, uncompLen, debugFileName,
             modWhen, crc32, isBootstrap))
     {
-        LOGE("Optimization failed");
+        ALOGE("Optimization failed");
         goto bail;
     }
 
@@ -214,7 +214,7 @@
      */
     const char* bcp = getenv("BOOTCLASSPATH");
     if (bcp == NULL) {
-        LOGE("DexOptZ: BOOTCLASSPATH not set");
+        ALOGE("DexOptZ: BOOTCLASSPATH not set");
         return -1;
     }
 
@@ -258,7 +258,7 @@
         char* endp;                                                         \
         (_var) = _func(*++argv, &endp, 0);                                  \
         if (*endp != '\0') {                                                \
-            LOGE("%s '%s'", _msg, *argv);                                   \
+            ALOGE("%s '%s'", _msg, *argv);                                   \
             goto bail;                                                      \
         }                                                                   \
         --argc;                                                             \
@@ -292,7 +292,7 @@
     const char* dexoptFlags;
 
     if (argc != 6) {
-        LOGE("Wrong number of args for --zip (found %d)", argc);
+        ALOGE("Wrong number of args for --zip (found %d)", argc);
         goto bail;
     }
 
@@ -429,7 +429,7 @@
 
     if (argc < 10) {
         /* don't have all mandatory args */
-        LOGE("Not enough arguments for --dex (found %d)", argc);
+        ALOGE("Not enough arguments for --dex (found %d)", argc);
         goto bail;
     }
 
@@ -442,7 +442,7 @@
      */
     GET_ARG(vmBuildVersion, strtol, "bad vm build");
     if (vmBuildVersion != DALVIK_VM_BUILD) {
-        LOGE("DexOpt: build rev does not match VM: %d vs %d",
+        ALOGE("DexOpt: build rev does not match VM: %d vs %d",
             vmBuildVersion, DALVIK_VM_BUILD);
         goto bail;
     }
@@ -511,7 +511,7 @@
     }
 
     if (dvmPrepForDexOpt(bootClassPath, dexOptMode, verifyMode, flags) != 0) {
-        LOGE("VM init failed");
+        ALOGE("VM init failed");
         goto bail;
     }
 
@@ -521,7 +521,7 @@
     if (!dvmContinueOptimization(fd, offset, length, debugFileName,
             modWhen, crc, (flags & DEXOPT_IS_BOOTSTRAP) != 0))
     {
-        LOGE("Optimization failed");
+        ALOGE("Optimization failed");
         goto bail;
     }
 
diff --git a/libdex/DexDataMap.cpp b/libdex/DexDataMap.cpp
index 3553c36..8405e8c 100644
--- a/libdex/DexDataMap.cpp
+++ b/libdex/DexDataMap.cpp
@@ -77,7 +77,7 @@
 
     if ((map->count != 0) &&
             (map->offsets[map->count - 1] >= offset)) {
-        LOGE("Out-of-order data map offset: %#x then %#x",
+        ALOGE("Out-of-order data map offset: %#x then %#x",
                 map->offsets[map->count - 1], offset);
         return;
     }
@@ -130,10 +130,10 @@
     }
 
     if (found < 0) {
-        LOGE("No data map entry found @ %#x; expected %x",
+        ALOGE("No data map entry found @ %#x; expected %x",
                 offset, type);
     } else {
-        LOGE("Unexpected data map entry @ %#x: expected %x, found %x",
+        ALOGE("Unexpected data map entry @ %#x: expected %x, found %x",
                 offset, type, found);
     }
 
diff --git a/libdex/DexDebugInfo.cpp b/libdex/DexDebugInfo.cpp
index cbb58d4..6a7b6bb 100644
--- a/libdex/DexDebugInfo.cpp
+++ b/libdex/DexDebugInfo.cpp
@@ -130,9 +130,9 @@
 }
 
 static void invalidStream(const char* classDescriptor, const DexProto* proto) {
-    IF_LOGE() {
+    IF_ALOGE() {
         char* methodDescriptor = dexProtoCopyMethodDescriptor(proto);
-        LOGE("Invalid debug info stream. class %s; proto %s",
+        ALOGE("Invalid debug info stream. class %s; proto %s",
                 classDescriptor, methodDescriptor);
         free(methodDescriptor);
     }
diff --git a/libdex/DexFile.cpp b/libdex/DexFile.cpp
index 2f6fd40..54070a2 100644
--- a/libdex/DexFile.cpp
+++ b/libdex/DexFile.cpp
@@ -294,7 +294,7 @@
     int result = -1;
 
     if (length < sizeof(DexHeader)) {
-        LOGE("too short to be a valid .dex");
+        ALOGE("too short to be a valid .dex");
         goto bail;      /* bad file format */
     }
 
@@ -309,7 +309,7 @@
     if (memcmp(data, DEX_OPT_MAGIC, 4) == 0) {
         magic = data;
         if (memcmp(magic+4, DEX_OPT_MAGIC_VERS, 4) != 0) {
-            LOGE("bad opt version (0x%02x %02x %02x %02x)",
+            ALOGE("bad opt version (0x%02x %02x %02x %02x)",
                  magic[4], magic[5], magic[6], magic[7]);
             goto bail;
         }
@@ -326,7 +326,7 @@
         data += pDexFile->pOptHeader->dexOffset;
         length -= pDexFile->pOptHeader->dexOffset;
         if (pDexFile->pOptHeader->dexLength > length) {
-            LOGE("File truncated? stored len=%d, rem len=%d",
+            ALOGE("File truncated? stored len=%d, rem len=%d",
                 pDexFile->pOptHeader->dexLength, (int) length);
             goto bail;
         }
@@ -348,7 +348,7 @@
     if (flags & kDexParseVerifyChecksum) {
         u4 adler = dexComputeChecksum(pHeader);
         if (adler != pHeader->checksum) {
-            LOGE("ERROR: bad checksum (%08x vs %08x)",
+            ALOGE("ERROR: bad checksum (%08x vs %08x)",
                 adler, pHeader->checksum);
             if (!(flags & kDexParseContinueOnError))
                 goto bail;
@@ -360,7 +360,7 @@
         if (pOptHeader != NULL) {
             adler = dexComputeOptChecksum(pOptHeader);
             if (adler != pOptHeader->checksum) {
-                LOGE("ERROR: bad opt checksum (%08x vs %08x)",
+                ALOGE("ERROR: bad opt checksum (%08x vs %08x)",
                     adler, pOptHeader->checksum);
                 if (!(flags & kDexParseContinueOnError))
                     goto bail;
@@ -385,7 +385,7 @@
         if (memcmp(sha1Digest, pHeader->signature, kSHA1DigestLen) != 0) {
             char tmpBuf1[kSHA1DigestOutputLen];
             char tmpBuf2[kSHA1DigestOutputLen];
-            LOGE("ERROR: bad SHA1 digest (%s vs %s)",
+            ALOGE("ERROR: bad SHA1 digest (%s vs %s)",
                 dexSHA1DigestToStr(sha1Digest, tmpBuf1),
                 dexSHA1DigestToStr(pHeader->signature, tmpBuf2));
             if (!(flags & kDexParseContinueOnError))
@@ -396,14 +396,14 @@
     }
 
     if (pHeader->fileSize != length) {
-        LOGE("ERROR: stored file size (%d) != expected (%d)",
+        ALOGE("ERROR: stored file size (%d) != expected (%d)",
             (int) pHeader->fileSize, (int) length);
         if (!(flags & kDexParseContinueOnError))
             goto bail;
     }
 
     if (pHeader->classDefsSize == 0) {
-        LOGE("ERROR: DEX file has no classes in it, failing");
+        ALOGE("ERROR: DEX file has no classes in it, failing");
         goto bail;
     }
 
diff --git a/libdex/DexOptData.cpp b/libdex/DexOptData.cpp
index a0d996d..b859d63 100644
--- a/libdex/DexOptData.cpp
+++ b/libdex/DexOptData.cpp
@@ -61,13 +61,13 @@
      * properly aligned. This test will catch both of these cases.
      */
     if (!isValidPointer(pOpt, pOptStart, pOptEnd)) {
-        LOGE("Bogus opt data start pointer");
+        ALOGE("Bogus opt data start pointer");
         return false;
     }
 
     /* Make sure that the opt data length is a whole number of words. */
     if ((optLength & 3) != 0) {
-        LOGE("Unaligned opt data area end");
+        ALOGE("Unaligned opt data area end");
         return false;
     }
 
@@ -76,14 +76,14 @@
      * one chunk header.
      */
     if (optLength < 8) {
-        LOGE("Undersized opt data area (%u)", optLength);
+        ALOGE("Undersized opt data area (%u)", optLength);
         return false;
     }
 
     /* Process chunks until we see the end marker. */
     while (*pOpt != kDexChunkEnd) {
         if (!isValidPointer(pOpt + 2, pOptStart, pOptEnd)) {
-            LOGE("Bogus opt data content pointer at offset %u",
+            ALOGE("Bogus opt data content pointer at offset %u",
                     ((const u1*) pOpt) - data);
             return false;
         }
@@ -99,7 +99,7 @@
         const u4* pNextOpt = pOpt + (roundedSize / sizeof(u4));
 
         if (!isValidPointer(pNextOpt, pOptStart, pOptEnd)) {
-            LOGE("Opt data area problem for chunk of size %u at offset %u",
+            ALOGE("Opt data area problem for chunk of size %u at offset %u",
                     size, ((const u1*) pOpt) - data);
             return false;
         }
diff --git a/libdex/DexSwapVerify.cpp b/libdex/DexSwapVerify.cpp
index 18445b2..1835e9b 100644
--- a/libdex/DexSwapVerify.cpp
+++ b/libdex/DexSwapVerify.cpp
@@ -299,7 +299,7 @@
     SWAP_OFFSET4(pHeader->dataOff);
 
     if (pHeader->endianTag != kDexEndianConstant) {
-        LOGE("Unexpected endian_tag: %#x", pHeader->endianTag);
+        ALOGE("Unexpected endian_tag: %#x", pHeader->endianTag);
         return false;
     }
 
@@ -323,12 +323,12 @@
 static bool checkHeaderSection(const CheckState* state, u4 sectionOffset,
         u4 sectionCount, u4* endOffset) {
     if (sectionCount != 1) {
-        LOGE("Multiple header items");
+        ALOGE("Multiple header items");
         return false;
     }
 
     if (sectionOffset != 0) {
-        LOGE("Header at %#x; not at start of file", sectionOffset);
+        ALOGE("Header at %#x; not at start of file", sectionOffset);
         return false;
     }
 
@@ -362,7 +362,7 @@
         case kDexTypeEncodedArrayItem:         return 1 << 16;
         case kDexTypeAnnotationsDirectoryItem: return 1 << 17;
         default: {
-            LOGE("Unknown map item type %04x", mapType);
+            ALOGE("Unknown map item type %04x", mapType);
             return 0;
         }
     }
@@ -416,13 +416,13 @@
         if (first) {
             first = false;
         } else if (lastOffset >= item->offset) {
-            LOGE("Out-of-order map item: %#x then %#x",
+            ALOGE("Out-of-order map item: %#x then %#x",
                     lastOffset, item->offset);
             return false;
         }
 
         if (item->offset >= state->pHeader->fileSize) {
-            LOGE("Map item after end of file: %x, size %#x",
+            ALOGE("Map item after end of file: %x, size %#x",
                     item->offset, state->pHeader->fileSize);
             return false;
         }
@@ -436,7 +436,7 @@
              * the data section.
              */
             if (icount > dataItemsLeft) {
-                LOGE("Unrealistically many items in the data section: "
+                ALOGE("Unrealistically many items in the data section: "
                         "at least %d", dataItemCount + icount);
                 return false;
             }
@@ -452,7 +452,7 @@
         }
 
         if ((usedBits & bit) != 0) {
-            LOGE("Duplicate map section of type %#x", item->type);
+            ALOGE("Duplicate map section of type %#x", item->type);
             return false;
         }
 
@@ -462,60 +462,60 @@
     }
 
     if ((usedBits & mapTypeToBitMask(kDexTypeHeaderItem)) == 0) {
-        LOGE("Map is missing header entry");
+        ALOGE("Map is missing header entry");
         return false;
     }
 
     if ((usedBits & mapTypeToBitMask(kDexTypeMapList)) == 0) {
-        LOGE("Map is missing map_list entry");
+        ALOGE("Map is missing map_list entry");
         return false;
     }
 
     if (((usedBits & mapTypeToBitMask(kDexTypeStringIdItem)) == 0)
             && ((state->pHeader->stringIdsOff != 0)
                     || (state->pHeader->stringIdsSize != 0))) {
-        LOGE("Map is missing string_ids entry");
+        ALOGE("Map is missing string_ids entry");
         return false;
     }
 
     if (((usedBits & mapTypeToBitMask(kDexTypeTypeIdItem)) == 0)
             && ((state->pHeader->typeIdsOff != 0)
                     || (state->pHeader->typeIdsSize != 0))) {
-        LOGE("Map is missing type_ids entry");
+        ALOGE("Map is missing type_ids entry");
         return false;
     }
 
     if (((usedBits & mapTypeToBitMask(kDexTypeProtoIdItem)) == 0)
             && ((state->pHeader->protoIdsOff != 0)
                     || (state->pHeader->protoIdsSize != 0))) {
-        LOGE("Map is missing proto_ids entry");
+        ALOGE("Map is missing proto_ids entry");
         return false;
     }
 
     if (((usedBits & mapTypeToBitMask(kDexTypeFieldIdItem)) == 0)
             && ((state->pHeader->fieldIdsOff != 0)
                     || (state->pHeader->fieldIdsSize != 0))) {
-        LOGE("Map is missing field_ids entry");
+        ALOGE("Map is missing field_ids entry");
         return false;
     }
 
     if (((usedBits & mapTypeToBitMask(kDexTypeMethodIdItem)) == 0)
             && ((state->pHeader->methodIdsOff != 0)
                     || (state->pHeader->methodIdsSize != 0))) {
-        LOGE("Map is missing method_ids entry");
+        ALOGE("Map is missing method_ids entry");
         return false;
     }
 
     if (((usedBits & mapTypeToBitMask(kDexTypeClassDefItem)) == 0)
             && ((state->pHeader->classDefsOff != 0)
                     || (state->pHeader->classDefsSize != 0))) {
-        LOGE("Map is missing class_defs entry");
+        ALOGE("Map is missing class_defs entry");
         return false;
     }
 
     state->pDataMap = dexDataMapAlloc(dataItemCount);
     if (state->pDataMap == NULL) {
-        LOGE("Unable to allocate data map (size %#x)", dataItemCount);
+        ALOGE("Unable to allocate data map (size %#x)", dataItemCount);
         return false;
     }
 
@@ -526,12 +526,12 @@
 static bool checkMapSection(const CheckState* state, u4 sectionOffset,
         u4 sectionCount, u4* endOffset) {
     if (sectionCount != 1) {
-        LOGE("Multiple map list items");
+        ALOGE("Multiple map list items");
         return false;
     }
 
     if (sectionOffset != state->pHeader->mapOff) {
-        LOGE("Map not at header-defined offset: %#x, expected %#x",
+        ALOGE("Map not at header-defined offset: %#x, expected %#x",
                 sectionOffset, state->pHeader->mapOff);
         return false;
     }
@@ -568,7 +568,7 @@
         const char* s0 = dexGetStringData(state->pDexFile, item0);
         const char* s1 = dexGetStringData(state->pDexFile, item);
         if (dexUtf8Cmp(s0, s1) >= 0) {
-            LOGE("Out-of-order string_ids: '%s' then '%s'", s0, s1);
+            ALOGE("Out-of-order string_ids: '%s' then '%s'", s0, s1);
             return NULL;
         }
     }
@@ -593,7 +593,7 @@
         dexStringById(state->pDexFile, item->descriptorIdx);
 
     if (!dexIsValidTypeDescriptor(descriptor)) {
-        LOGE("Invalid type descriptor: '%s'", descriptor);
+        ALOGE("Invalid type descriptor: '%s'", descriptor);
         return NULL;
     }
 
@@ -601,7 +601,7 @@
     if (item0 != NULL) {
         // Check ordering. This relies on string_ids being in order.
         if (item0->descriptorIdx >= item->descriptorIdx) {
-            LOGE("Out-of-order type_ids: %#x then %#x",
+            ALOGE("Out-of-order type_ids: %#x then %#x",
                     item0->descriptorIdx, item->descriptorIdx);
             return NULL;
         }
@@ -630,7 +630,7 @@
     switch (shorty) {
         case 'V': {
             if (!isReturnType) {
-                LOGE("Invalid use of void");
+                ALOGE("Invalid use of void");
                 return false;
             }
             // Fall through.
@@ -644,7 +644,7 @@
         case 'S':
         case 'Z': {
             if ((descriptor[0] != shorty) || (descriptor[1] != '\0')) {
-                LOGE("Shorty vs. primitive type mismatch: '%c', '%s'",
+                ALOGE("Shorty vs. primitive type mismatch: '%c', '%s'",
                         shorty, descriptor);
                 return false;
             }
@@ -652,14 +652,14 @@
         }
         case 'L': {
             if ((descriptor[0] != 'L') && (descriptor[0] != '[')) {
-                LOGE("Shorty vs. type mismatch: '%c', '%s'",
+                ALOGE("Shorty vs. type mismatch: '%c', '%s'",
                         shorty, descriptor);
                 return false;
             }
             break;
         }
         default: {
-            LOGE("Bogus shorty: '%c'", shorty);
+            ALOGE("Bogus shorty: '%c'", shorty);
             return false;
         }
     }
@@ -699,7 +699,7 @@
         }
 
         if (*shorty == '\0') {
-            LOGE("Shorty is too short");
+            ALOGE("Shorty is too short");
             return NULL;
         }
 
@@ -711,7 +711,7 @@
     }
 
     if (*shorty != '\0') {
-        LOGE("Shorty is too long");
+        ALOGE("Shorty is too long");
         return NULL;
     }
 
@@ -719,7 +719,7 @@
     if (item0 != NULL) {
         // Check ordering. This relies on type_ids being in order.
         if (item0->returnTypeIdx > item->returnTypeIdx) {
-            LOGE("Out-of-order proto_id return types");
+            ALOGE("Out-of-order proto_id return types");
             return NULL;
         } else if (item0->returnTypeIdx == item->returnTypeIdx) {
             bool badOrder = false;
@@ -751,7 +751,7 @@
             }
 
             if (badOrder) {
-                LOGE("Out-of-order proto_id arguments");
+                ALOGE("Out-of-order proto_id arguments");
                 return NULL;
             }
         }
@@ -779,19 +779,19 @@
 
     s = dexStringByTypeIdx(state->pDexFile, item->classIdx);
     if (!dexIsClassDescriptor(s)) {
-        LOGE("Invalid descriptor for class_idx: '%s'", s);
+        ALOGE("Invalid descriptor for class_idx: '%s'", s);
         return NULL;
     }
 
     s = dexStringByTypeIdx(state->pDexFile, item->typeIdx);
     if (!dexIsFieldDescriptor(s)) {
-        LOGE("Invalid descriptor for type_idx: '%s'", s);
+        ALOGE("Invalid descriptor for type_idx: '%s'", s);
         return NULL;
     }
 
     s = dexStringById(state->pDexFile, item->nameIdx);
     if (!dexIsValidMemberName(s)) {
-        LOGE("Invalid name: '%s'", s);
+        ALOGE("Invalid name: '%s'", s);
         return NULL;
     }
 
@@ -824,7 +824,7 @@
         }
 
         if (bogus) {
-            LOGE("Out-of-order field_ids");
+            ALOGE("Out-of-order field_ids");
             return NULL;
         }
     }
@@ -851,13 +851,13 @@
 
     s = dexStringByTypeIdx(state->pDexFile, item->classIdx);
     if (!dexIsReferenceDescriptor(s)) {
-        LOGE("Invalid descriptor for class_idx: '%s'", s);
+        ALOGE("Invalid descriptor for class_idx: '%s'", s);
         return NULL;
     }
 
     s = dexStringById(state->pDexFile, item->nameIdx);
     if (!dexIsValidMemberName(s)) {
-        LOGE("Invalid name: '%s'", s);
+        ALOGE("Invalid name: '%s'", s);
         return NULL;
     }
 
@@ -890,7 +890,7 @@
         }
 
         if (bogus) {
-            LOGE("Out-of-order method_ids");
+            ALOGE("Out-of-order method_ids");
             return NULL;
         }
     }
@@ -971,12 +971,12 @@
     const char* descriptor = dexStringByTypeIdx(state->pDexFile, classIdx);
 
     if (!dexIsClassDescriptor(descriptor)) {
-        LOGE("Invalid class: '%s'", descriptor);
+        ALOGE("Invalid class: '%s'", descriptor);
         return NULL;
     }
 
     if (setDefinedClassBit(state, classIdx)) {
-        LOGE("Duplicate class definition: '%s'", descriptor);
+        ALOGE("Duplicate class definition: '%s'", descriptor);
         return NULL;
     }
 
@@ -997,7 +997,7 @@
     if (item->superclassIdx != kDexNoIndex) {
         descriptor = dexStringByTypeIdx(state->pDexFile, item->superclassIdx);
         if (!dexIsClassDescriptor(descriptor)) {
-            LOGE("Invalid superclass: '%s'", descriptor);
+            ALOGE("Invalid superclass: '%s'", descriptor);
             return NULL;
         }
     }
@@ -1016,7 +1016,7 @@
             descriptor = dexStringByTypeIdx(state->pDexFile,
                     dexTypeListGetIdx(interfaces, i));
             if (!dexIsClassDescriptor(descriptor)) {
-                LOGE("Invalid interface: '%s'", descriptor);
+                ALOGE("Invalid interface: '%s'", descriptor);
                 return NULL;
             }
         }
@@ -1034,7 +1034,7 @@
             for (j = 0; j < i; j++) {
                 u4 idx2 = dexTypeListGetIdx(interfaces, j);
                 if (idx1 == idx2) {
-                    LOGE("Duplicate interface: '%s'",
+                    ALOGE("Duplicate interface: '%s'",
                             dexStringByTypeIdx(state->pDexFile, idx1));
                     return NULL;
                 }
@@ -1043,13 +1043,13 @@
     }
 
     if (!verifyClassDataIsForDef(state, item->classDataOff, item->classIdx)) {
-        LOGE("Invalid class_data_item");
+        ALOGE("Invalid class_data_item");
         return NULL;
     }
 
     if (!verifyAnnotationsDirectoryIsForDef(state, item->annotationsOff,
                     item->classIdx)) {
-        LOGE("Invalid annotations_directory_item");
+        ALOGE("Invalid annotations_directory_item");
         return NULL;
     }
 
@@ -1073,7 +1073,7 @@
         if (first) {
             first = false;
         } else if (lastIdx >= item->fieldIdx) {
-            LOGE("Out-of-order field_idx: %#x then %#x", lastIdx,
+            ALOGE("Out-of-order field_idx: %#x then %#x", lastIdx,
                  item->fieldIdx);
             return NULL;
         }
@@ -1102,7 +1102,7 @@
         if (first) {
             first = false;
         } else if (lastIdx >= item->methodIdx) {
-            LOGE("Out-of-order method_idx: %#x then %#x", lastIdx,
+            ALOGE("Out-of-order method_idx: %#x then %#x", lastIdx,
                  item->methodIdx);
             return NULL;
         }
@@ -1132,7 +1132,7 @@
         if (first) {
             first = false;
         } else if (lastIdx >= item->methodIdx) {
-            LOGE("Out-of-order method_idx: %#x then %#x", lastIdx,
+            ALOGE("Out-of-order method_idx: %#x then %#x", lastIdx,
                  item->methodIdx);
             return NULL;
         }
@@ -1423,7 +1423,7 @@
         if (first) {
             first = false;
         } else if (lastIdx >= idx) {
-            LOGE("Out-of-order entry types: %#x then %#x",
+            ALOGE("Out-of-order entry types: %#x then %#x",
                     lastIdx, idx);
             return NULL;
         }
@@ -1447,12 +1447,12 @@
         CHECK_INDEX(field->fieldIdx, state->pHeader->fieldIdsSize);
 
         if (isStatic != expectStatic) {
-            LOGE("Field in wrong list @ %d", i);
+            ALOGE("Field in wrong list @ %d", i);
             return false;
         }
 
         if ((accessFlags & ~ACC_FIELD_MASK) != 0) {
-            LOGE("Bogus field access flags %x @ %d", accessFlags, i);
+            ALOGE("Bogus field access flags %x @ %d", accessFlags, i);
             return false;
         }
     }
@@ -1478,24 +1478,24 @@
         bool allowSynchronized = (accessFlags & ACC_NATIVE) != 0;
 
         if (isDirect != expectDirect) {
-            LOGE("Method in wrong list @ %d", i);
+            ALOGE("Method in wrong list @ %d", i);
             return false;
         }
 
         if (((accessFlags & ~ACC_METHOD_MASK) != 0)
                 || (isSynchronized && !allowSynchronized)) {
-            LOGE("Bogus method access flags %x @ %d", accessFlags, i);
+            ALOGE("Bogus method access flags %x @ %d", accessFlags, i);
             return false;
         }
 
         if (expectCode) {
             if (method->codeOff == 0) {
-                LOGE("Unexpected zero code_off for access_flags %x",
+                ALOGE("Unexpected zero code_off for access_flags %x",
                         accessFlags);
                 return false;
             }
         } else if (method->codeOff != 0) {
-            LOGE("Unexpected non-zero code_off %#x for access_flags %x",
+            ALOGE("Unexpected non-zero code_off %#x for access_flags %x",
                     method->codeOff, accessFlags);
             return false;
         }
@@ -1513,7 +1513,7 @@
             classData->staticFields, true);
 
     if (!okay) {
-        LOGE("Trouble with static fields");
+        ALOGE("Trouble with static fields");
         return false;
     }
 
@@ -1521,7 +1521,7 @@
             classData->instanceFields, false);
 
     if (!okay) {
-        LOGE("Trouble with instance fields");
+        ALOGE("Trouble with instance fields");
         return false;
     }
 
@@ -1529,7 +1529,7 @@
             classData->directMethods, true);
 
     if (!okay) {
-        LOGE("Trouble with direct methods");
+        ALOGE("Trouble with direct methods");
         return false;
     }
 
@@ -1537,7 +1537,7 @@
             classData->virtualMethods, false);
 
     if (!okay) {
-        LOGE("Trouble with virtual methods");
+        ALOGE("Trouble with virtual methods");
         return false;
     }
 
@@ -1550,7 +1550,7 @@
     DexClassData* classData = dexReadAndVerifyClassData(&data, state->fileEnd);
 
     if (classData == NULL) {
-        LOGE("Unable to parse class_data_item");
+        ALOGE("Unable to parse class_data_item");
         return NULL;
     }
 
@@ -1659,12 +1659,12 @@
         bool catchAll;
 
         if (!okay) {
-            LOGE("Bogus size");
+            ALOGE("Bogus size");
             return 0;
         }
 
         if ((size < -65536) || (size > 65536)) {
-            LOGE("Invalid size: %d", size);
+            ALOGE("Invalid size: %d", size);
             return 0;
         }
 
@@ -1682,7 +1682,7 @@
                 readAndVerifyUnsignedLeb128(&ptr, fileEnd, &okay);
 
             if (!okay) {
-                LOGE("Bogus type_idx");
+                ALOGE("Bogus type_idx");
                 return 0;
             }
 
@@ -1691,12 +1691,12 @@
             u4 addr = readAndVerifyUnsignedLeb128(&ptr, fileEnd, &okay);
 
             if (!okay) {
-                LOGE("Bogus addr");
+                ALOGE("Bogus addr");
                 return 0;
             }
 
             if (addr >= code->insnsSize) {
-                LOGE("Invalid addr: %#x", addr);
+                ALOGE("Invalid addr: %#x", addr);
                 return 0;
             }
         }
@@ -1705,12 +1705,12 @@
             u4 addr = readAndVerifyUnsignedLeb128(&ptr, fileEnd, &okay);
 
             if (!okay) {
-                LOGE("Bogus catch_all_addr");
+                ALOGE("Bogus catch_all_addr");
                 return 0;
             }
 
             if (addr >= code->insnsSize) {
-                LOGE("Invalid catch_all_addr: %#x", addr);
+                ALOGE("Invalid catch_all_addr: %#x", addr);
                 return 0;
             }
         }
@@ -1731,12 +1731,12 @@
         readAndVerifyUnsignedLeb128(&encodedPtr, state->fileEnd, &okay);
 
     if (!okay) {
-        LOGE("Bogus handlers_size");
+        ALOGE("Bogus handlers_size");
         return NULL;
     }
 
     if ((handlersSize == 0) || (handlersSize >= 65536)) {
-        LOGE("Invalid handlers_size: %d", handlersSize);
+        ALOGE("Invalid handlers_size: %d", handlersSize);
         return NULL;
     }
 
@@ -1763,12 +1763,12 @@
         SWAP_FIELD2(tries->handlerOff);
 
         if (tries->startAddr < lastEnd) {
-            LOGE("Out-of-order try");
+            ALOGE("Out-of-order try");
             return NULL;
         }
 
         if (tries->startAddr >= code->insnsSize) {
-            LOGE("Invalid start_addr: %#x", tries->startAddr);
+            ALOGE("Invalid start_addr: %#x", tries->startAddr);
             return NULL;
         }
 
@@ -1779,14 +1779,14 @@
         }
 
         if (i == handlersSize) {
-            LOGE("Bogus handler offset: %#x", tries->handlerOff);
+            ALOGE("Bogus handler offset: %#x", tries->handlerOff);
             return NULL;
         }
 
         lastEnd = tries->startAddr + tries->insnCount;
 
         if (lastEnd > code->insnsSize) {
-            LOGE("Invalid insn_count: %#x (end addr %#x)",
+            ALOGE("Invalid insn_count: %#x (end addr %#x)",
                     tries->insnCount, lastEnd);
             return NULL;
         }
@@ -1812,7 +1812,7 @@
     SWAP_FIELD4(item->insnsSize);
 
     if (item->insSize > item->registersSize) {
-        LOGE("insSize (%u) > registersSize (%u)", item->insSize,
+        ALOGE("insSize (%u) > registersSize (%u)", item->insSize,
                 item->registersSize);
         return NULL;
     }
@@ -1825,7 +1825,7 @@
          * list. Longer parameter lists, though, need to be represented
          * in-order in the register file.
          */
-        LOGE("outsSize (%u) > registersSize (%u)", item->outsSize,
+        ALOGE("outsSize (%u) > registersSize (%u)", item->outsSize,
                 item->registersSize);
         return NULL;
     }
@@ -1845,7 +1845,7 @@
         if ((((u4) insns) & 3) != 0) {
             // Four-byte alignment for the tries. Verify the spacer is a 0.
             if (*insns != 0) {
-                LOGE("Non-zero padding: %#x", (u4) *insns);
+                ALOGE("Non-zero padding: %#x", (u4) *insns);
                 return NULL;
             }
         }
@@ -1865,13 +1865,13 @@
     u4 i;
 
     if (!okay) {
-        LOGE("Bogus utf16_size");
+        ALOGE("Bogus utf16_size");
         return NULL;
     }
 
     for (i = 0; i < utf16Size; i++) {
         if (data >= fileEnd) {
-            LOGE("String data would go beyond end-of-file");
+            ALOGE("String data would go beyond end-of-file");
             return NULL;
         }
 
@@ -1882,7 +1882,7 @@
             case 0x00: {
                 // Special case of bit pattern 0xxx.
                 if (byte1 == 0) {
-                    LOGE("String shorter than indicated utf16_size %#x",
+                    ALOGE("String shorter than indicated utf16_size %#x",
                             utf16Size);
                     return NULL;
                 }
@@ -1908,25 +1908,25 @@
                  * Note: 1111 is valid for normal UTF-8, but not the
                  * modified UTF-8 used here.
                  */
-                LOGE("Illegal start byte %#x", byte1);
+                ALOGE("Illegal start byte %#x", byte1);
                 return NULL;
             }
             case 0x0e: {
                 // Bit pattern 1110, so there are two additional bytes.
                 u1 byte2 = *(data++);
                 if ((byte2 & 0xc0) != 0x80) {
-                    LOGE("Illegal continuation byte %#x", byte2);
+                    ALOGE("Illegal continuation byte %#x", byte2);
                     return NULL;
                 }
                 u1 byte3 = *(data++);
                 if ((byte3 & 0xc0) != 0x80) {
-                    LOGE("Illegal continuation byte %#x", byte3);
+                    ALOGE("Illegal continuation byte %#x", byte3);
                     return NULL;
                 }
                 u2 value = ((byte1 & 0x0f) << 12) | ((byte2 & 0x3f) << 6)
                     | (byte3 & 0x3f);
                 if (value < 0x800) {
-                    LOGE("Illegal representation for value %x", value);
+                    ALOGE("Illegal representation for value %x", value);
                     return NULL;
                 }
                 break;
@@ -1936,12 +1936,12 @@
                 // Bit pattern 110x, so there is one additional byte.
                 u1 byte2 = *(data++);
                 if ((byte2 & 0xc0) != 0x80) {
-                    LOGE("Illegal continuation byte %#x", byte2);
+                    ALOGE("Illegal continuation byte %#x", byte2);
                     return NULL;
                 }
                 u2 value = ((byte1 & 0x1f) << 6) | (byte2 & 0x3f);
                 if ((value != 0) && (value < 0x80)) {
-                    LOGE("Illegal representation for value %x", value);
+                    ALOGE("Illegal representation for value %x", value);
                     return NULL;
                 }
                 break;
@@ -1950,7 +1950,7 @@
     }
 
     if (*(data++) != '\0') {
-        LOGE("String longer than indicated utf16_size %#x", utf16Size);
+        ALOGE("String longer than indicated utf16_size %#x", utf16Size);
         return NULL;
     }
 
@@ -1967,7 +1967,7 @@
     readAndVerifyUnsignedLeb128(&data, fileEnd, &okay);
 
     if (!okay) {
-        LOGE("Bogus line_start");
+        ALOGE("Bogus line_start");
         return NULL;
     }
 
@@ -1975,12 +1975,12 @@
         readAndVerifyUnsignedLeb128(&data, fileEnd, &okay);
 
     if (!okay) {
-        LOGE("Bogus parameters_size");
+        ALOGE("Bogus parameters_size");
         return NULL;
     }
 
     if (parametersSize > 65536) {
-        LOGE("Invalid parameters_size: %#x", parametersSize);
+        ALOGE("Invalid parameters_size: %#x", parametersSize);
         return NULL;
     }
 
@@ -1989,7 +1989,7 @@
             readAndVerifyUnsignedLeb128(&data, fileEnd, &okay);
 
         if (!okay) {
-            LOGE("Bogus parameter_name");
+            ALOGE("Bogus parameter_name");
             return NULL;
         }
 
@@ -2091,7 +2091,7 @@
         }
 
         if (!okay) {
-            LOGE("Bogus syntax for opcode %02x", opcode);
+            ALOGE("Bogus syntax for opcode %02x", opcode);
             return NULL;
         }
     }
@@ -2131,14 +2131,14 @@
     u4 size = readAndVerifyUnsignedLeb128(&data, state->fileEnd, &okay);
 
     if (!okay) {
-        LOGE("Bogus encoded_array size");
+        ALOGE("Bogus encoded_array size");
         return NULL;
     }
 
     while (size--) {
         data = verifyEncodedValue(state, data, crossVerify);
         if (data == NULL) {
-            LOGE("Bogus encoded_array value");
+            ALOGE("Bogus encoded_array value");
             return NULL;
         }
     }
@@ -2159,7 +2159,7 @@
     switch (valueType) {
         case kDexAnnotationByte: {
             if (valueArg != 0) {
-                LOGE("Bogus byte size %#x", valueArg);
+                ALOGE("Bogus byte size %#x", valueArg);
                 return NULL;
             }
             data++;
@@ -2168,7 +2168,7 @@
         case kDexAnnotationShort:
         case kDexAnnotationChar: {
             if (valueArg > 1) {
-                LOGE("Bogus char/short size %#x", valueArg);
+                ALOGE("Bogus char/short size %#x", valueArg);
                 return NULL;
             }
             data += valueArg + 1;
@@ -2177,7 +2177,7 @@
         case kDexAnnotationInt:
         case kDexAnnotationFloat: {
             if (valueArg > 3) {
-                LOGE("Bogus int/float size %#x", valueArg);
+                ALOGE("Bogus int/float size %#x", valueArg);
                 return NULL;
             }
             data += valueArg + 1;
@@ -2190,7 +2190,7 @@
         }
         case kDexAnnotationString: {
             if (valueArg > 3) {
-                LOGE("Bogus string size %#x", valueArg);
+                ALOGE("Bogus string size %#x", valueArg);
                 return NULL;
             }
             u4 idx = readUnsignedLittleEndian(state, &data, valueArg + 1);
@@ -2199,7 +2199,7 @@
         }
         case kDexAnnotationType: {
             if (valueArg > 3) {
-                LOGE("Bogus type size %#x", valueArg);
+                ALOGE("Bogus type size %#x", valueArg);
                 return NULL;
             }
             u4 idx = readUnsignedLittleEndian(state, &data, valueArg + 1);
@@ -2209,7 +2209,7 @@
         case kDexAnnotationField:
         case kDexAnnotationEnum: {
             if (valueArg > 3) {
-                LOGE("Bogus field/enum size %#x", valueArg);
+                ALOGE("Bogus field/enum size %#x", valueArg);
                 return NULL;
             }
             u4 idx = readUnsignedLittleEndian(state, &data, valueArg + 1);
@@ -2218,7 +2218,7 @@
         }
         case kDexAnnotationMethod: {
             if (valueArg > 3) {
-                LOGE("Bogus method size %#x", valueArg);
+                ALOGE("Bogus method size %#x", valueArg);
                 return NULL;
             }
             u4 idx = readUnsignedLittleEndian(state, &data, valueArg + 1);
@@ -2227,7 +2227,7 @@
         }
         case kDexAnnotationArray: {
             if (valueArg != 0) {
-                LOGE("Bogus array value_arg %#x", valueArg);
+                ALOGE("Bogus array value_arg %#x", valueArg);
                 return NULL;
             }
             data = verifyEncodedArray(state, data, crossVerify);
@@ -2235,7 +2235,7 @@
         }
         case kDexAnnotationAnnotation: {
             if (valueArg != 0) {
-                LOGE("Bogus annotation value_arg %#x", valueArg);
+                ALOGE("Bogus annotation value_arg %#x", valueArg);
                 return NULL;
             }
             data = verifyEncodedAnnotation(state, data, crossVerify);
@@ -2243,7 +2243,7 @@
         }
         case kDexAnnotationNull: {
             if (valueArg != 0) {
-                LOGE("Bogus null value_arg %#x", valueArg);
+                ALOGE("Bogus null value_arg %#x", valueArg);
                 return NULL;
             }
             // Nothing else to do for this type.
@@ -2251,14 +2251,14 @@
         }
         case kDexAnnotationBoolean: {
             if (valueArg > 1) {
-                LOGE("Bogus boolean value_arg %#x", valueArg);
+                ALOGE("Bogus boolean value_arg %#x", valueArg);
                 return NULL;
             }
             // Nothing else to do for this type.
             break;
         }
         default: {
-            LOGE("Bogus value_type %#x", valueType);
+            ALOGE("Bogus value_type %#x", valueType);
             return NULL;
         }
     }
@@ -2275,7 +2275,7 @@
     u4 idx = readAndVerifyUnsignedLeb128(&data, fileEnd, &okay);
 
     if (!okay) {
-        LOGE("Bogus encoded_annotation type_idx");
+        ALOGE("Bogus encoded_annotation type_idx");
         return NULL;
     }
 
@@ -2284,7 +2284,7 @@
     if (crossVerify) {
         const char* descriptor = dexStringByTypeIdx(state->pDexFile, idx);
         if (!dexIsClassDescriptor(descriptor)) {
-            LOGE("Bogus annotation type: '%s'", descriptor);
+            ALOGE("Bogus annotation type: '%s'", descriptor);
             return NULL;
         }
     }
@@ -2294,7 +2294,7 @@
     bool first = true;
 
     if (!okay) {
-        LOGE("Bogus encoded_annotation size");
+        ALOGE("Bogus encoded_annotation size");
         return NULL;
     }
 
@@ -2302,7 +2302,7 @@
         idx = readAndVerifyUnsignedLeb128(&data, fileEnd, &okay);
 
         if (!okay) {
-            LOGE("Bogus encoded_annotation name_idx");
+            ALOGE("Bogus encoded_annotation name_idx");
             return NULL;
         }
 
@@ -2311,7 +2311,7 @@
         if (crossVerify) {
             const char* name = dexStringById(state->pDexFile, idx);
             if (!dexIsValidMemberName(name)) {
-                LOGE("Bogus annotation member name: '%s'", name);
+                ALOGE("Bogus annotation member name: '%s'", name);
                 return NULL;
             }
         }
@@ -2319,7 +2319,7 @@
         if (first) {
             first = false;
         } else if (lastIdx >= idx) {
-            LOGE("Out-of-order encoded_annotation name_idx: %#x then %#x",
+            ALOGE("Out-of-order encoded_annotation name_idx: %#x then %#x",
                     lastIdx, idx);
             return NULL;
         }
@@ -2353,7 +2353,7 @@
             break;
         }
         default: {
-            LOGE("Bogus annotation visibility: %#x", *data);
+            ALOGE("Bogus annotation visibility: %#x", *data);
             return NULL;
         }
     }
@@ -2402,7 +2402,7 @@
                 CHECK_OFFSET_RANGE(offset, newOffset);
                 while (offset < newOffset) {
                     if (*ptr != '\0') {
-                        LOGE("Non-zero padding 0x%02x @ %x", *ptr, offset);
+                        ALOGE("Non-zero padding 0x%02x @ %x", *ptr, offset);
                         return false;
                     }
                     ptr++;
@@ -2415,12 +2415,12 @@
         newOffset = fileOffset(state, newPtr);
 
         if (newPtr == NULL) {
-            LOGE("Trouble with item %d @ offset %#x", i, offset);
+            ALOGE("Trouble with item %d @ offset %#x", i, offset);
             return false;
         }
 
         if (newOffset > state->fileLen) {
-            LOGE("Item %d @ offset %#x ends out of bounds", i, offset);
+            ALOGE("Item %d @ offset %#x ends out of bounds", i, offset);
             return false;
         }
 
@@ -2458,13 +2458,13 @@
         u4 offset, u4 count, u4 expectedOffset, u4 expectedCount,
         ItemVisitorFunction* func, u4 alignment, u4* nextOffset) {
     if (offset != expectedOffset) {
-        LOGE("Bogus offset for section: got %#x; expected %#x",
+        ALOGE("Bogus offset for section: got %#x; expected %#x",
                 offset, expectedOffset);
         return false;
     }
 
     if (count != expectedCount) {
-        LOGE("Bogus size for section: got %#x; expected %#x",
+        ALOGE("Bogus size for section: got %#x; expected %#x",
                 count, expectedCount);
         return false;
     }
@@ -2484,7 +2484,7 @@
     assert(nextOffset != NULL);
 
     if ((offset < dataStart) || (offset >= dataEnd)) {
-        LOGE("Bogus offset for data subsection: %#x", offset);
+        ALOGE("Bogus offset for data subsection: %#x", offset);
         return false;
     }
 
@@ -2494,7 +2494,7 @@
     }
 
     if (*nextOffset > dataEnd) {
-        LOGE("Out-of-bounds end of data subsection: %#x", *nextOffset);
+        ALOGE("Out-of-bounds end of data subsection: %#x", *nextOffset);
         return false;
     }
 
@@ -2527,7 +2527,7 @@
             const u1* ptr = (const u1*) filePointer(state, lastOffset);
             while (lastOffset < sectionOffset) {
                 if (*ptr != '\0') {
-                    LOGE("Non-zero padding 0x%02x before section start @ %x",
+                    ALOGE("Non-zero padding 0x%02x before section start @ %x",
                             *ptr, lastOffset);
                     okay = false;
                     break;
@@ -2536,7 +2536,7 @@
                 lastOffset++;
             }
         } else if (lastOffset > sectionOffset) {
-            LOGE("Section overlap or out-of-order map: %x, %x",
+            ALOGE("Section overlap or out-of-order map: %x, %x",
                     lastOffset, sectionOffset);
             okay = false;
         }
@@ -2664,13 +2664,13 @@
                 break;
             }
             default: {
-                LOGE("Unknown map item type %04x", type);
+                ALOGE("Unknown map item type %04x", type);
                 return false;
             }
         }
 
         if (!okay) {
-            LOGE("Swap of section type %04x failed", type);
+            ALOGE("Swap of section type %04x failed", type);
         }
 
         item++;
@@ -2765,13 +2765,13 @@
                 break;
             }
             default: {
-                LOGE("Unknown map item type %04x", item->type);
+                ALOGE("Unknown map item type %04x", item->type);
                 return false;
             }
         }
 
         if (!okay) {
-            LOGE("Cross-item verify of section type %04x failed",
+            ALOGE("Cross-item verify of section type %04x failed",
                     item->type);
         }
 
@@ -2788,7 +2788,7 @@
     const u1* version = &magic[4];
 
     if (memcmp(magic, DEX_MAGIC, 4) != 0) {
-        LOGE("ERROR: unrecognized magic number (%02x %02x %02x %02x)",
+        ALOGE("ERROR: unrecognized magic number (%02x %02x %02x %02x)",
             magic[0], magic[1], magic[2], magic[3]);
         return false;
     }
@@ -2799,7 +2799,7 @@
          * Magic was correct, but this is an unsupported older or
          * newer format variant.
          */
-        LOGE("ERROR: unsupported dex version (%02x %02x %02x %02x)",
+        ALOGE("ERROR: unsupported dex version (%02x %02x %02x %02x)",
             version[0], version[1], version[2], version[3]);
         return false;
     }
@@ -2836,7 +2836,7 @@
     if (okay) {
         int expectedLen = (int) SWAP4(pHeader->fileSize);
         if (len < expectedLen) {
-            LOGE("ERROR: Bad length: expected %d, got %d", expectedLen, len);
+            ALOGE("ERROR: Bad length: expected %d, got %d", expectedLen, len);
             okay = false;
         } else if (len != expectedLen) {
             ALOGW("WARNING: Odd length: expected %d, got %d", expectedLen,
@@ -2864,7 +2864,7 @@
                     storedFileSize - nonSum);
 
         if (adler != expectedChecksum) {
-            LOGE("ERROR: bad checksum (%08lx, expected %08x)",
+            ALOGE("ERROR: bad checksum (%08lx, expected %08x)",
                 adler, expectedChecksum);
             okay = false;
         }
@@ -2889,7 +2889,7 @@
         state.pHeader = pHeader;
 
         if (pHeader->headerSize < sizeof(DexHeader)) {
-            LOGE("ERROR: Small header size %d, struct %d",
+            ALOGE("ERROR: Small header size %d, struct %d",
                     pHeader->headerSize, (int) sizeof(DexHeader));
             okay = false;
         } else if (pHeader->headerSize > sizeof(DexHeader)) {
@@ -2916,13 +2916,13 @@
 
             okay = okay && crossVerifyEverything(&state, pDexMap);
         } else {
-            LOGE("ERROR: No map found; impossible to byte-swap and verify");
+            ALOGE("ERROR: No map found; impossible to byte-swap and verify");
             okay = false;
         }
     }
 
     if (!okay) {
-        LOGE("ERROR: Byte swap + verify failed");
+        ALOGE("ERROR: Byte swap + verify failed");
     }
 
     if (state.pDataMap != NULL) {
@@ -2952,7 +2952,7 @@
         return dexSwapAndVerify(addr, len);
     }
 
-    LOGE("ERROR: Bad magic number (0x%02x %02x %02x %02x)",
+    ALOGE("ERROR: Bad magic number (0x%02x %02x %02x %02x)",
              addr[0], addr[1], addr[2], addr[3]);
 
     return 1;
diff --git a/libdex/OptInvocation.cpp b/libdex/OptInvocation.cpp
index 636420a..bac2f24 100644
--- a/libdex/OptInvocation.cpp
+++ b/libdex/OptInvocation.cpp
@@ -63,7 +63,7 @@
          * the leading "./" out, but it'll do.
          */
         if (getcwd(absoluteFile, kBufLen) == NULL) {
-            LOGE("Can't get CWD while opening jar file");
+            ALOGE("Can't get CWD while opening jar file");
             return NULL;
         }
         strncat(absoluteFile, "/", kBufLen);
@@ -135,7 +135,7 @@
     actual = write(fd, &optHdr, sizeof(optHdr));
     if (actual != sizeof(optHdr)) {
         int err = errno ? errno : -1;
-        LOGE("opt header write failed: %s", strerror(errno));
+        ALOGE("opt header write failed: %s", strerror(errno));
         return errno;
     }
 
diff --git a/libdex/SysUtil.cpp b/libdex/SysUtil.cpp
index d3fac5b..a412a12 100644
--- a/libdex/SysUtil.cpp
+++ b/libdex/SysUtil.cpp
@@ -53,7 +53,7 @@
 
     return ptr;
 #else
-    LOGE("sysCreateAnonShmem not implemented.");
+    ALOGE("sysCreateAnonShmem not implemented.");
     return NULL;
 #endif
 }
@@ -90,13 +90,13 @@
     (void) lseek(fd, start, SEEK_SET);
 
     if (start == (off_t) -1 || end == (off_t) -1) {
-        LOGE("could not determine length of file");
+        ALOGE("could not determine length of file");
         return -1;
     }
 
     length = end - start;
     if (length == 0) {
-        LOGE("file is empty");
+        ALOGE("file is empty");
         return -1;
     }
 
@@ -131,7 +131,7 @@
 
     actual = read(fd, memPtr, length);
     if (actual != length) {
-        LOGE("only read %d of %d bytes", (int) actual, (int) length);
+        ALOGE("only read %d of %d bytes", (int) actual, (int) length);
         sysReleaseShmem(pMap);
         return -1;
     }
@@ -141,7 +141,7 @@
 
     return 0;
 #else
-    LOGE("sysLoadFileInShmem not implemented.");
+    ALOGE("sysLoadFileInShmem not implemented.");
     return -1;
 #endif
 }
@@ -301,7 +301,7 @@
 
     return 0;
 #else
-    LOGE("sysMapFileSegmentInShmem not implemented.");
+    ALOGE("sysMapFileSegmentInShmem not implemented.");
     return -1;
 #endif
 }
@@ -321,7 +321,7 @@
     if (addr < pMap->baseAddr ||
         (u1*)addr >= (u1*)pMap->baseAddr + pMap->baseLength)
     {
-        LOGE("Attempted to change %p; map is %p - %p",
+        ALOGE("Attempted to change %p; map is %p - %p",
             addr, pMap->baseAddr, (u1*)pMap->baseAddr + pMap->baseLength);
         return -1;
     }
@@ -394,7 +394,7 @@
         ssize_t actual = TEMP_FAILURE_RETRY(write(fd, buf, count));
         if (actual < 0) {
             int err = errno;
-            LOGE("%s: write failed: %s", logMsg, strerror(err));
+            ALOGE("%s: write failed: %s", logMsg, strerror(err));
             return err;
         } else if (actual != (ssize_t) count) {
             ALOGD("%s: partial write (will retry): (%d of %zd)",
diff --git a/libdex/ZipArchive.cpp b/libdex/ZipArchive.cpp
index f242f64..1cccc3f 100644
--- a/libdex/ZipArchive.cpp
+++ b/libdex/ZipArchive.cpp
@@ -616,7 +616,7 @@
     zerr = inflateInit2(&zstream, -MAX_WBITS);
     if (zerr != Z_OK) {
         if (zerr == Z_VERSION_ERROR) {
-            LOGE("Installed zlib is not compatible with linked version (%s)",
+            ALOGE("Installed zlib is not compatible with linked version (%s)",
                 ZLIB_VERSION);
         } else {
             ALOGW("Call to inflateInit2 failed (zerr=%d)", zerr);
diff --git a/libnativehelper/JNIHelp.cpp b/libnativehelper/JNIHelp.cpp
index d4e4ff3..7c0b146 100644
--- a/libnativehelper/JNIHelp.cpp
+++ b/libnativehelper/JNIHelp.cpp
@@ -72,12 +72,12 @@
 
     scoped_local_ref<jclass> c(env, findClass(env, className));
     if (c.get() == NULL) {
-        LOGE("Native registration unable to find class '%s', aborting", className);
+        ALOGE("Native registration unable to find class '%s', aborting", className);
         abort();
     }
 
     if ((*env)->RegisterNatives(e, c.get(), gMethods, numMethods) < 0) {
-        LOGE("RegisterNatives failed for '%s', aborting", className);
+        ALOGE("RegisterNatives failed for '%s', aborting", className);
         abort();
     }
 
@@ -220,13 +220,13 @@
 
     scoped_local_ref<jclass> exceptionClass(env, findClass(env, className));
     if (exceptionClass.get() == NULL) {
-        LOGE("Unable to find exception class %s", className);
+        ALOGE("Unable to find exception class %s", className);
         /* ClassNotFoundException now pending */
         return -1;
     }
 
     if ((*env)->ThrowNew(e, exceptionClass.get(), msg) != JNI_OK) {
-        LOGE("Failed throwing '%s' '%s'", className, msg);
+        ALOGE("Failed throwing '%s' '%s'", className, msg);
         /* an exception, most likely OOM, will now be pending */
         return -1;
     }
diff --git a/vm/AllocTracker.cpp b/vm/AllocTracker.cpp
index a3e39e7..94984ec 100644
--- a/vm/AllocTracker.cpp
+++ b/vm/AllocTracker.cpp
@@ -527,7 +527,7 @@
     methodNames = dvmPointerSetAlloc(128);
     fileNames = dvmPointerSetAlloc(128);
     if (classNames == NULL || methodNames == NULL || fileNames == NULL) {
-        LOGE("Failed allocating pointer sets");
+        ALOGE("Failed allocating pointer sets");
         goto bail;
     }
 
@@ -569,7 +569,7 @@
     strPtr += outputStringTable(methodNames, strPtr);
     strPtr += outputStringTable(fileNames, strPtr);
     if (strPtr - buffer != (int)totalSize) {
-        LOGE("size mismatch (%d vs %zd)", strPtr - buffer, totalSize);
+        ALOGE("size mismatch (%d vs %zd)", strPtr - buffer, totalSize);
         dvmAbort();
     }
     //dvmPrintHexDump(buffer, totalSize);
diff --git a/vm/AtomicCache.cpp b/vm/AtomicCache.cpp
index 28fcbfe..a8c82e6 100644
--- a/vm/AtomicCache.cpp
+++ b/vm/AtomicCache.cpp
@@ -156,7 +156,7 @@
             newVersion, newVersion & ~ATOMIC_LOCK_FLAG,
             (volatile s4*) &pEntry->version) != 0)
     {
-        //LOGE("unable to reset the instanceof cache ownership");
+        //ALOGE("unable to reset the instanceof cache ownership");
         dvmAbort();
     }
 }
diff --git a/vm/BitVector.cpp b/vm/BitVector.cpp
index 0ef6f60..5302789 100644
--- a/vm/BitVector.cpp
+++ b/vm/BitVector.cpp
@@ -104,7 +104,7 @@
 {
     if (num >= pBits->storageSize * sizeof(u4) * 8) {
         if (!pBits->expandable) {
-            LOGE("Attempt to set bit outside valid range (%d, limit is %d)",
+            ALOGE("Attempt to set bit outside valid range (%d, limit is %d)",
                 num, pBits->storageSize * sizeof(u4) * 8);
             dvmAbort();
         }
@@ -114,7 +114,7 @@
         assert(newSize > pBits->storageSize);
         pBits->storage = (u4*)realloc(pBits->storage, newSize * sizeof(u4));
         if (pBits->storage == NULL) {
-            LOGE("BitVector expansion to %d failed", newSize * sizeof(u4));
+            ALOGE("BitVector expansion to %d failed", newSize * sizeof(u4));
             dvmAbort();
         }
         memset(&pBits->storage[pBits->storageSize], 0x00,
@@ -206,7 +206,7 @@
 static void checkSizes(const BitVector* bv1, const BitVector* bv2)
 {
     if (bv1->storageSize != bv2->storageSize) {
-        LOGE("Mismatched vector sizes (%d, %d)",
+        ALOGE("Mismatched vector sizes (%d, %d)",
             bv1->storageSize, bv2->storageSize);
         dvmAbort();
     }
diff --git a/vm/CheckJni.cpp b/vm/CheckJni.cpp
index 6ca7061..ccb5836 100644
--- a/vm/CheckJni.cpp
+++ b/vm/CheckJni.cpp
@@ -639,7 +639,7 @@
                 } else if (ch == '.') {
                     msg += "...";
                 } else {
-                    LOGE("unknown trace format specifier %c", ch);
+                    ALOGE("unknown trace format specifier %c", ch);
                     dvmAbort();
                 }
                 if (*fmt) {
@@ -694,7 +694,7 @@
                     va_arg(ap, long); // Skip this argument.
                 } else if (ch == '.') {
                 } else {
-                    LOGE("unknown check format specifier %c", ch);
+                    ALOGE("unknown check format specifier %c", ch);
                     dvmAbort();
                 }
             }
@@ -832,12 +832,12 @@
          */
         bool printWarn = false;
         if (threadEnv == NULL) {
-            LOGE("JNI ERROR: non-VM thread making JNI calls");
+            ALOGE("JNI ERROR: non-VM thread making JNI calls");
             // don't set printWarn -- it'll try to call showLocation()
             dvmAbort();
         } else if ((JNIEnvExt*) mEnv != threadEnv) {
             if (dvmThreadSelf()->threadId != threadEnv->envThreadId) {
-                LOGE("JNI: threadEnv != thread->env?");
+                ALOGE("JNI: threadEnv != thread->env?");
                 dvmAbort();
             }
 
@@ -854,7 +854,7 @@
             //dvmThrowRuntimeException("invalid use of JNI env ptr");
         } else if (((JNIEnvExt*) mEnv)->self != dvmThreadSelf()) {
             /* correct JNIEnv*; make sure the "self" pointer is correct */
-            LOGE("JNI ERROR: env->self != thread-self (%p vs. %p)",
+            ALOGE("JNI ERROR: env->self != thread-self (%p vs. %p)",
                     ((JNIEnvExt*) mEnv)->self, dvmThreadSelf());
             dvmAbort();
         }
@@ -1139,7 +1139,7 @@
         if (memcmp(&pExtra->magic, &kMagicCmp, 4) != 0) {
             u1 buf[4];
             memcpy(buf, &pExtra->magic, 4);
-            LOGE("JNI: guard magic does not match (found 0x%02x%02x%02x%02x) -- incorrect data pointer %p?",
+            ALOGE("JNI: guard magic does not match (found 0x%02x%02x%02x%02x) -- incorrect data pointer %p?",
                     buf[3], buf[2], buf[1], buf[0], dataBuf); /* assume little endian */
             return false;
         }
@@ -1150,7 +1150,7 @@
         const u2* pat = (u2*) fullBuf;
         for (size_t i = sizeof(GuardedCopy) / 2; i < (kGuardLen / 2 - sizeof(GuardedCopy)) / 2; i++) {
             if (pat[i] != kGuardPattern) {
-                LOGE("JNI: guard pattern(1) disturbed at %p + %d", fullBuf, i*2);
+                ALOGE("JNI: guard pattern(1) disturbed at %p + %d", fullBuf, i*2);
                 return false;
             }
         }
@@ -1160,7 +1160,7 @@
             /* odd byte; expected value depends on endian-ness of host */
             const u2 patSample = kGuardPattern;
             if (fullBuf[offset] != ((const u1*) &patSample)[1]) {
-                LOGE("JNI: guard pattern disturbed in odd byte after %p (+%d) 0x%02x 0x%02x",
+                ALOGE("JNI: guard pattern disturbed in odd byte after %p (+%d) 0x%02x 0x%02x",
                         fullBuf, offset, fullBuf[offset], ((const u1*) &patSample)[1]);
                 return false;
             }
@@ -1171,7 +1171,7 @@
         pat = (u2*) (fullBuf + offset);
         for (size_t i = 0; i < kGuardLen / 4; i++) {
             if (pat[i] != kGuardPattern) {
-                LOGE("JNI: guard pattern(2) disturbed at %p + %d", fullBuf, offset + i*2);
+                ALOGE("JNI: guard pattern(2) disturbed at %p + %d", fullBuf, offset + i*2);
                 return false;
             }
         }
@@ -1185,7 +1185,7 @@
             uLong adler = adler32(0L, Z_NULL, 0);
             adler = adler32(adler, (const Bytef*)dataBuf, len);
             if (pExtra->adler != adler) {
-                LOGE("JNI: buffer modified (0x%08lx vs 0x%08lx) at addr %p",
+                ALOGE("JNI: buffer modified (0x%08lx vs 0x%08lx) at addr %p",
                         pExtra->adler, adler, dataBuf);
                 return false;
             }
@@ -1198,7 +1198,7 @@
     static u1* debugAlloc(size_t len) {
         void* result = mmap(NULL, len, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, -1, 0);
         if (result == MAP_FAILED) {
-            LOGE("GuardedCopy::create mmap(%d) failed: %s", len, strerror(errno));
+            ALOGE("GuardedCopy::create mmap(%d) failed: %s", len, strerror(errno));
             dvmAbort();
         }
         return reinterpret_cast<u1*>(result);
@@ -1279,7 +1279,7 @@
     ArrayObject* arrObj = (ArrayObject*) dvmDecodeIndirectRef(dvmThreadSelf(), jarr);
 
     if (!GuardedCopy::check(dataBuf, true)) {
-        LOGE("JNI: failed guarded copy check in releaseGuardedPACopy");
+        ALOGE("JNI: failed guarded copy check in releaseGuardedPACopy");
         abortMaybe();
         return NULL;
     }
@@ -1708,7 +1708,7 @@
     sc.checkNonNull(chars);
     if (gDvmJni.forceCopy) {
         if (!GuardedCopy::check(chars, false)) {
-            LOGE("JNI: failed guarded copy check in ReleaseStringChars");
+            ALOGE("JNI: failed guarded copy check in ReleaseStringChars");
             abortMaybe();
             return;
         }
@@ -1744,7 +1744,7 @@
     CHECK_JNI_ENTRY(kFlag_ExcepOkay | kFlag_Release, "Esu", env, string, utf); // TODO: show pointer and truncate string.
     if (gDvmJni.forceCopy) {
         if (!GuardedCopy::check(utf, false)) {
-            LOGE("JNI: failed guarded copy check in ReleaseStringUTFChars");
+            ALOGE("JNI: failed guarded copy check in ReleaseStringUTFChars");
             abortMaybe();
             return;
         }
@@ -1951,7 +1951,7 @@
     sc.checkNonNull(carray);
     if (gDvmJni.forceCopy) {
         if (!GuardedCopy::check(carray, false)) {
-            LOGE("JNI: failed guarded copy check in ReleaseStringCritical");
+            ALOGE("JNI: failed guarded copy check in ReleaseStringCritical");
             abortMaybe();
             return;
         }
diff --git a/vm/Common.h b/vm/Common.h
index 55ae79b..abab423 100644
--- a/vm/Common.h
+++ b/vm/Common.h
@@ -45,7 +45,7 @@
 #if !defined(NDEBUG) && defined(WITH_DALVIK_ASSERT)
 # undef assert
 # define assert(x) \
-    ((x) ? ((void)0) : (LOGE("ASSERT FAILED (%s:%d): %s", \
+    ((x) ? ((void)0) : (ALOGE("ASSERT FAILED (%s:%d): %s", \
         __FILE__, __LINE__, #x), *(int*)39=39, (void)0) )
 #endif
 
diff --git a/vm/Ddm.cpp b/vm/Ddm.cpp
index dad7484..d441ec4 100644
--- a/vm/Ddm.cpp
+++ b/vm/Ddm.cpp
@@ -164,7 +164,7 @@
     Thread* self = dvmThreadSelf();
 
     if (self->status != THREAD_RUNNING) {
-        LOGE("ERROR: DDM broadcast with thread status=%d", self->status);
+        ALOGE("ERROR: DDM broadcast with thread status=%d", self->status);
         /* try anyway? */
     }
 
diff --git a/vm/Debugger.cpp b/vm/Debugger.cpp
index faf39ca..cbf4305 100644
--- a/vm/Debugger.cpp
+++ b/vm/Debugger.cpp
@@ -794,7 +794,7 @@
     case JT_CLASS_LOADER:
         return false;
     default:
-        LOGE("ERROR: unhandled tag '%c'", tag);
+        ALOGE("ERROR: unhandled tag '%c'", tag);
         assert(false);
         return false;
     }
@@ -889,7 +889,7 @@
     case JT_LONG:
         return 8;
     default:
-        LOGE("ERROR: unhandled tag '%c'", tag);
+        ALOGE("ERROR: unhandled tag '%c'", tag);
         assert(false);
         return -1;
     }
@@ -1504,7 +1504,7 @@
             expandBufAdd8BE(pReply, dvmGetFieldLong(obj, ifield->byteOffset));
             break;
         default:
-            LOGE("ERROR: unhandled field type '%s'", ifield->signature);
+            ALOGE("ERROR: unhandled field type '%s'", ifield->signature);
             assert(false);
             break;
         }
@@ -1551,7 +1551,7 @@
         dvmSetFieldLong(obj, field->byteOffset, value);
         break;
     default:
-        LOGE("ERROR: unhandled class type '%s'", field->signature);
+        ALOGE("ERROR: unhandled class type '%s'", field->signature);
         assert(false);
         break;
     }
@@ -1608,7 +1608,7 @@
             expandBufAdd8BE(pReply, value.j);
             break;
         default:
-            LOGE("ERROR: unhandled field type '%s'", sfield->signature);
+            ALOGE("ERROR: unhandled field type '%s'", sfield->signature);
             assert(false);
             break;
         }
@@ -1667,7 +1667,7 @@
         dvmSetStaticFieldDouble(sfield, value.d);
         break;
     default:
-        LOGE("ERROR: unhandled class type '%s'", sfield->signature);
+        ALOGE("ERROR: unhandled class type '%s'", sfield->signature);
         assert(false);
         break;
     }
@@ -2331,7 +2331,7 @@
         set8BE(buf+1, longVal);
         break;
     default:
-        LOGE("ERROR: unhandled tag '%c'", tag);
+        ALOGE("ERROR: unhandled tag '%c'", tag);
         assert(false);
         break;
     }
@@ -2392,7 +2392,7 @@
     case JT_CLASS_LOADER:
         /* not expecting these from debugger; fall through to failure */
     default:
-        LOGE("ERROR: unhandled tag '%c'", tag);
+        ALOGE("ERROR: unhandled tag '%c'", tag);
         assert(false);
         break;
     }
@@ -2581,11 +2581,11 @@
     thread = threadObjToThread(threadObj);
 
     if (thread == NULL) {
-        LOGE("Thread for single-step not found");
+        ALOGE("Thread for single-step not found");
         goto bail;
     }
     if (!dvmIsSuspended(thread)) {
-        LOGE("Thread for single-step not suspended");
+        ALOGE("Thread for single-step not suspended");
         assert(!"non-susp step");      // I want to know if this can happen
         goto bail;
     }
diff --git a/vm/DvmDex.cpp b/vm/DvmDex.cpp
index 84f3407..4bad999 100644
--- a/vm/DvmDex.cpp
+++ b/vm/DvmDex.cpp
@@ -81,7 +81,7 @@
         pDvmDex->pResFields == NULL ||
         pDvmDex->pInterfaceCache == NULL)
     {
-        LOGE("Alloc failure in allocateAuxStructures");
+        ALOGE("Alloc failure in allocateAuxStructures");
         free(pDvmDex->pResStrings);
         free(pDvmDex->pResClasses);
         free(pDvmDex->pResMethods);
@@ -112,18 +112,18 @@
         parseFlags |= kDexParseVerifyChecksum;
 
     if (lseek(fd, 0, SEEK_SET) < 0) {
-        LOGE("lseek rewind failed");
+        ALOGE("lseek rewind failed");
         goto bail;
     }
 
     if (sysMapFileInShmemWritableReadOnly(fd, &memMap) != 0) {
-        LOGE("Unable to map file");
+        ALOGE("Unable to map file");
         goto bail;
     }
 
     pDexFile = dexFileParse((u1*)memMap.addr, memMap.length, parseFlags);
     if (pDexFile == NULL) {
-        LOGE("DEX parse failed");
+        ALOGE("DEX parse failed");
         sysReleaseShmem(&memMap);
         goto bail;
     }
@@ -167,7 +167,7 @@
 
     pDexFile = dexFileParse((u1*)addr, len, parseFlags);
     if (pDexFile == NULL) {
-        LOGE("DEX parse failed");
+        ALOGE("DEX parse failed");
         goto bail;
     }
     pDvmDex = allocateAuxStructures(pDexFile);
diff --git a/vm/Exception.cpp b/vm/Exception.cpp
index 081709a..8dbec39 100644
--- a/vm/Exception.cpp
+++ b/vm/Exception.cpp
@@ -120,13 +120,13 @@
          * early on in VM initialization. There's nothing better to do
          * than just log the message as an error and abort.
          */
-        LOGE("Fatal error: %s", msg);
+        ALOGE("Fatal error: %s", msg);
         dvmAbort();
     }
 
     /* make sure the exception is initialized */
     if (!dvmIsClassInitialized(excepClass) && !dvmInitClass(excepClass)) {
-        LOGE("ERROR: unable to initialize exception class '%s'",
+        ALOGE("ERROR: unable to initialize exception class '%s'",
             excepClass->descriptor);
         if (strcmp(excepClass->descriptor, "Ljava/lang/InternalError;") == 0)
             dvmAbort();
@@ -147,7 +147,7 @@
          */
         if (dvmCheckException(self))
             goto bail;
-        LOGE("FATAL: unable to allocate exception '%s' '%s'",
+        ALOGE("FATAL: unable to allocate exception '%s' '%s'",
             excepClass->descriptor, msg != NULL ? msg : "(no msg)");
         dvmAbort();
     }
@@ -278,7 +278,7 @@
 
     if (cause != NULL) {
         if (!dvmInstanceof(cause->clazz, gDvm.exThrowable)) {
-            LOGE("Tried to init exception with cause '%s'",
+            ALOGE("Tried to init exception with cause '%s'",
                 cause->clazz->descriptor);
             dvmAbort();
         }
@@ -539,7 +539,7 @@
 Object* dvmGetExceptionCause(const Object* exception)
 {
     if (!dvmInstanceof(exception->clazz, gDvm.exThrowable)) {
-        LOGE("Tried to get cause from object of type '%s'",
+        ALOGE("Tried to get cause from object of type '%s'",
             exception->clazz->descriptor);
         dvmAbort();
     }
@@ -1286,7 +1286,7 @@
          * anything fancier, we just abort here with a blatant
          * message.
          */
-        LOGE("Fatal error during early class initialization:");
+        ALOGE("Fatal error during early class initialization:");
         dvmLogExceptionStackTrace();
         dvmAbort();
     }
diff --git a/vm/Hash.cpp b/vm/Hash.cpp
index ebfc7df..9bacce0 100644
--- a/vm/Hash.cpp
+++ b/vm/Hash.cpp
@@ -220,7 +220,7 @@
             {
                 if (!resizeHash(pHashTable, pHashTable->tableSize * 2)) {
                     /* don't really have a way to indicate failure */
-                    LOGE("Dalvik hash resize failure");
+                    ALOGE("Dalvik hash resize failure");
                     dvmAbort();
                 }
                 /* note "pEntry" is now invalid */
diff --git a/vm/IndirectRefTable.cpp b/vm/IndirectRefTable.cpp
index 01a5684..69afccd 100644
--- a/vm/IndirectRefTable.cpp
+++ b/vm/IndirectRefTable.cpp
@@ -93,7 +93,7 @@
         if (topIndex == alloc_entries_) {
             /* reached end of allocated space; did we hit buffer max? */
             if (topIndex == max_entries_) {
-                LOGE("JNI ERROR (app bug): %s reference table overflow (max=%d)",
+                ALOGE("JNI ERROR (app bug): %s reference table overflow (max=%d)",
                         indirectRefKindToString(kind_), max_entries_);
                 return NULL;
             }
@@ -107,7 +107,7 @@
             IndirectRefSlot* newTable =
                     (IndirectRefSlot*) realloc(table_, newSize * sizeof(IndirectRefSlot));
             if (table_ == NULL) {
-                LOGE("JNI ERROR (app bug): unable to expand %s reference table "
+                ALOGE("JNI ERROR (app bug): unable to expand %s reference table "
                         "(from %d to %d, max=%d)",
                         indirectRefKindToString(kind_),
                         alloc_entries_, newSize, max_entries_);
@@ -145,7 +145,7 @@
             return kInvalidIndirectRefObject;
         }
         if (kind == kIndirectKindInvalid) {
-            LOGE("JNI ERROR (app bug): invalid %s reference %p",
+            ALOGE("JNI ERROR (app bug): invalid %s reference %p",
                     indirectRefKindToString(kind_), iref);
             abortMaybe();
             return kInvalidIndirectRefObject;
@@ -158,7 +158,7 @@
     u4 index = extractIndex(iref);
     if (index >= topIndex) {
         /* bad -- stale reference? */
-        LOGE("JNI ERROR (app bug): accessed stale %s reference %p (index %d in a table of size %d)",
+        ALOGE("JNI ERROR (app bug): accessed stale %s reference %p (index %d in a table of size %d)",
                 indirectRefKindToString(kind_), iref, index, topIndex);
         abortMaybe();
         return kInvalidIndirectRefObject;
@@ -174,7 +174,7 @@
 
     u4 serial = extractSerial(iref);
     if (serial != table_[index].serial) {
-        LOGE("JNI ERROR (app bug): attempt to use stale %s reference %p",
+        ALOGE("JNI ERROR (app bug): attempt to use stale %s reference %p",
                 indirectRefKindToString(kind_), iref);
         abortMaybe();
         return kInvalidIndirectRefObject;
diff --git a/vm/Init.cpp b/vm/Init.cpp
index 64cf3b4..80cf9f6 100644
--- a/vm/Init.cpp
+++ b/vm/Init.cpp
@@ -323,7 +323,7 @@
         } else if (strcmp(value, "dt_android_adb") == 0) {
             gDvm.jdwpTransport = kJdwpTransportAndroidAdb;
         } else {
-            LOGE("JDWP transport '%s' not supported", value);
+            ALOGE("JDWP transport '%s' not supported", value);
             return false;
         }
     } else if (strcmp(name, "server") == 0) {
@@ -332,7 +332,7 @@
         else if (*value == 'y')
             gDvm.jdwpServer = true;
         else {
-            LOGE("JDWP option 'server' must be 'y' or 'n'");
+            ALOGE("JDWP option 'server' must be 'y' or 'n'");
             return false;
         }
     } else if (strcmp(name, "suspend") == 0) {
@@ -341,7 +341,7 @@
         else if (*value == 'y')
             gDvm.jdwpSuspend = true;
         else {
-            LOGE("JDWP option 'suspend' must be 'y' or 'n'");
+            ALOGE("JDWP option 'suspend' must be 'y' or 'n'");
             return false;
         }
     } else if (strcmp(name, "address") == 0) {
@@ -358,12 +358,12 @@
             value = colon + 1;
         }
         if (*value == '\0') {
-            LOGE("JDWP address missing port");
+            ALOGE("JDWP address missing port");
             return false;
         }
         port = strtol(value, &end, 10);
         if (*end != '\0') {
-            LOGE("JDWP address has junk in port field '%s'", value);
+            ALOGE("JDWP address has junk in port field '%s'", value);
             return false;
         }
         gDvm.jdwpPort = port;
@@ -400,14 +400,14 @@
 
         value = strchr(name, '=');
         if (value == NULL) {
-            LOGE("JDWP opts: garbage at '%s'", name);
+            ALOGE("JDWP opts: garbage at '%s'", name);
             goto bail;
         }
 
         comma = strchr(name, ',');      // use name, not value, for safety
         if (comma != NULL) {
             if (comma < value) {
-                LOGE("JDWP opts: found comma before '=' in '%s'", mangle);
+                ALOGE("JDWP opts: found comma before '=' in '%s'", mangle);
                 goto bail;
             }
             *comma = '\0';
@@ -429,11 +429,11 @@
      * Make sure the combination of arguments makes sense.
      */
     if (gDvm.jdwpTransport == kJdwpTransportUnknown) {
-        LOGE("JDWP opts: must specify transport");
+        ALOGE("JDWP opts: must specify transport");
         goto bail;
     }
     if (!gDvm.jdwpServer && (gDvm.jdwpHost == NULL || gDvm.jdwpPort == 0)) {
-        LOGE("JDWP opts: when server=n, must specify host and port");
+        ALOGE("JDWP opts: when server=n, must specify host and port");
         goto bail;
     }
     // transport mandatory
@@ -1105,7 +1105,7 @@
 {
     void* addr = info->si_addr;
 
-    LOGE("Caught a SIGBUS (%d), addr=%p", signum, addr);
+    ALOGE("Caught a SIGBUS (%d), addr=%p", signum, addr);
 
     /*
      * If we return at this point the SIGBUS just keeps happening, so we
@@ -1374,9 +1374,9 @@
 
 #ifndef NDEBUG
     if (!dvmTestHash())
-        LOGE("dvmTestHash FAILED");
+        ALOGE("dvmTestHash FAILED");
     if (false /*noisy!*/ && !dvmTestIndirectRefTable())
-        LOGE("dvmTestIndirectRefTable FAILED");
+        ALOGE("dvmTestIndirectRefTable FAILED");
 #endif
 
     if (dvmCheckException(dvmThreadSelf())) {
@@ -1411,7 +1411,7 @@
     self->status = THREAD_NATIVE;
 
     if (jniRegisterSystemMethods(pEnv) < 0) {
-        LOGE("jniRegisterSystemMethods failed");
+        ALOGE("jniRegisterSystemMethods failed");
         return false;
     }
 
@@ -1527,7 +1527,7 @@
 
         if (gDvm.jdwpHost != NULL) {
             if (strlen(gDvm.jdwpHost) >= sizeof(params.host)-1) {
-                LOGE("ERROR: hostname too long: '%s'", gDvm.jdwpHost);
+                ALOGE("ERROR: hostname too long: '%s'", gDvm.jdwpHost);
                 return false;
             }
             strcpy(params.host, gDvm.jdwpHost);
@@ -1769,7 +1769,7 @@
      */
     char** strings = backtrace_symbols(stackFrames, frameCount);
     if (strings == NULL) {
-        LOGE("backtrace_symbols failed: %s", strerror(errno));
+        ALOGE("backtrace_symbols failed: %s", strerror(errno));
         return;
     }
 
@@ -1828,7 +1828,7 @@
         result += messageBuffer[i];
     }
 
-    LOGE("VM aborting");
+    ALOGE("VM aborting");
 
     fflush(NULL);       // flush all open file buffers
 
diff --git a/vm/InitRefs.cpp b/vm/InitRefs.cpp
index 6fddf9a..c483604 100644
--- a/vm/InitRefs.cpp
+++ b/vm/InitRefs.cpp
@@ -33,7 +33,7 @@
     }
 
     if (result == NULL) {
-        LOGE("Could not find essential class %s", name);
+        ALOGE("Could not find essential class %s", name);
         return false;
     }
 
@@ -156,7 +156,7 @@
         const char* name, const char* type) {
     int offset = dvmFindFieldOffset(clazz, name, type);
     if (offset < 0) {
-        LOGE("Could not find essential field %s.%s of type %s", clazz->descriptor, name, type);
+        ALOGE("Could not find essential field %s.%s of type %s", clazz->descriptor, name, type);
         return false;
     }
 
@@ -279,7 +279,7 @@
         const struct FieldInfo* fields = classes[i].fields;
 
         if (clazz == NULL) {
-            LOGE("Could not find essential class %s for field lookup", className);
+            ALOGE("Could not find essential class %s for field lookup", className);
             return false;
         }
 
@@ -299,7 +299,7 @@
     Method* method = dvmFindDirectMethodByDescriptor(clazz, name, descriptor);
 
     if (method == NULL) {
-        LOGE("Could not find essential direct method %s.%s with descriptor %s",
+        ALOGE("Could not find essential direct method %s.%s with descriptor %s",
                 clazz->descriptor, name, descriptor);
         return false;
     }
@@ -313,7 +313,7 @@
     ClassObject* clazz = dvmFindSystemClassNoInit(className);
 
     if (clazz == NULL) {
-        LOGE("Could not find essential class %s for direct method lookup", className);
+        ALOGE("Could not find essential class %s for direct method lookup", className);
         return false;
     }
 
@@ -396,14 +396,14 @@
     ClassObject* clazz = dvmFindSystemClassNoInit(className);
 
     if (clazz == NULL) {
-        LOGE("Could not find essential class %s for virtual method lookup", className);
+        ALOGE("Could not find essential class %s for virtual method lookup", className);
         return false;
     }
 
     Method* method = dvmFindVirtualMethodByDescriptor(clazz, name, descriptor);
 
     if (method == NULL) {
-        LOGE("Could not find essential virtual method %s.%s with descriptor %s",
+        ALOGE("Could not find essential virtual method %s.%s with descriptor %s",
                 clazz->descriptor, name, descriptor);
         return false;
     }
@@ -452,7 +452,7 @@
 
 static bool verifyStringOffset(const char* name, int actual, int expected) {
     if (actual != expected) {
-        LOGE("InitRefs: String.%s offset = %d; expected %d", name, actual, expected);
+        ALOGE("InitRefs: String.%s offset = %d; expected %d", name, actual, expected);
         return false;
     }
 
@@ -497,7 +497,7 @@
 /* (documented in header) */
 bool dvmFindReferenceMembers(ClassObject* classReference) {
     if (strcmp(classReference->descriptor, "Ljava/lang/ref/Reference;") != 0) {
-        LOGE("Attempt to set up the wrong class as Reference");
+        ALOGE("Attempt to set up the wrong class as Reference");
         return false;
     }
     return initFieldOffset(classReference, &gDvm.offJavaLangRefReference_pendingNext,
diff --git a/vm/InlineNative.cpp b/vm/InlineNative.cpp
index 6e3f373..7900548 100644
--- a/vm/InlineNative.cpp
+++ b/vm/InlineNative.cpp
@@ -180,9 +180,9 @@
     thisStr = dvmCreateCstrFromString(thisStrObj);
     compStr = dvmCreateCstrFromString(compStrObj);
 
-    LOGE("%s expected %d got %d", compareType, expectResult, newResult);
-    LOGE(" this (o=%d l=%d) '%s'", thisOffset, thisCount, thisStr);
-    LOGE(" comp (o=%d l=%d) '%s'", compOffset, compCount, compStr);
+    ALOGE("%s expected %d got %d", compareType, expectResult, newResult);
+    ALOGE(" this (o=%d l=%d) '%s'", thisOffset, thisCount, thisStr);
+    ALOGE(" comp (o=%d l=%d) '%s'", compOffset, compCount, compStr);
     dvmPrintHexDumpEx(ANDROID_LOG_INFO, LOG_TAG,
         ((const u2*) thisArray->contents) + thisOffset, thisCount*2,
         kHexDumpLocal);
@@ -823,7 +823,7 @@
      */
     ClassObject* clazz = dvmFindClassNoInit(classDescriptor, NULL);
     if (clazz == NULL) {
-        LOGE("dvmFindInlinableMethod: can't find class '%s'",
+        ALOGE("dvmFindInlinableMethod: can't find class '%s'",
             classDescriptor);
         dvmClearException(dvmThreadSelf());
         return NULL;
@@ -840,7 +840,7 @@
             methodSignature);
     }
     if (method == NULL) {
-        LOGE("dvmFindInlinableMethod: can't find method %s.%s %s",
+        ALOGE("dvmFindInlinableMethod: can't find method %s.%s %s",
             clazz->descriptor, methodName, methodSignature);
         return NULL;
     }
@@ -849,13 +849,13 @@
      * Check that the method is appropriate for inlining.
      */
     if (!dvmIsFinalClass(clazz) && !dvmIsFinalMethod(method)) {
-        LOGE("dvmFindInlinableMethod: can't inline non-final method %s.%s",
+        ALOGE("dvmFindInlinableMethod: can't inline non-final method %s.%s",
             clazz->descriptor, method->name);
         return NULL;
     }
     if (dvmIsSynchronizedMethod(method) ||
             dvmIsDeclaredSynchronizedMethod(method)) {
-        LOGE("dvmFindInlinableMethod: can't inline synchronized method %s.%s",
+        ALOGE("dvmFindInlinableMethod: can't inline synchronized method %s.%s",
             clazz->descriptor, method->name);
         return NULL;
     }
diff --git a/vm/JarFile.cpp b/vm/JarFile.cpp
index a398996..3a037a0 100644
--- a/vm/JarFile.cpp
+++ b/vm/JarFile.cpp
@@ -136,7 +136,7 @@
          */
         if (!dvmUnlockCachedDexFile(fd)) {
             /* uh oh -- this process needs to exit or we'll wedge the system */
-            LOGE("Unable to unlock DEX file");
+            ALOGE("Unable to unlock DEX file");
             goto bail;
         }
 
@@ -158,8 +158,8 @@
 
         ALOGV("Using alternate file (odex) for %s ...", fileName);
         if (!dvmCheckOptHeaderAndDependencies(fd, false, 0, 0, true, true)) {
-            LOGE("%s odex has stale dependencies", fileName);
-            LOGE("odex source not available -- failing");
+            ALOGE("%s odex has stale dependencies", fileName);
+            ALOGE("odex source not available -- failing");
             result = DEX_CACHE_STALE_ODEX;
             goto bail;
         } else {
@@ -219,7 +219,7 @@
     if (fd >= 0) {
         ALOGV("Using alternate file (odex) for %s ...", fileName);
         if (!dvmCheckOptHeaderAndDependencies(fd, false, 0, 0, true, true)) {
-            LOGE("%s odex has stale dependencies", fileName);
+            ALOGE("%s odex has stale dependencies", fileName);
             free(cachedName);
             cachedName = NULL;
             close(fd);
@@ -304,7 +304,7 @@
                 }
 
                 if (!result) {
-                    LOGE("Unable to extract+optimize DEX from '%s'",
+                    ALOGE("Unable to extract+optimize DEX from '%s'",
                         fileName);
                     goto bail;
                 }
@@ -335,7 +335,7 @@
         /* unlock the fd */
         if (!dvmUnlockCachedDexFile(fd)) {
             /* uh oh -- this process needs to exit or we'll wedge the system */
-            LOGE("Unable to unlock DEX file");
+            ALOGE("Unable to unlock DEX file");
             goto bail;
         }
         locked = false;
diff --git a/vm/Jni.cpp b/vm/Jni.cpp
index 39b3356..952084e 100644
--- a/vm/Jni.cpp
+++ b/vm/Jni.cpp
@@ -214,7 +214,7 @@
             // that we use the correct per-thread indirect reference table.
             Thread* self = gDvmJni.workAroundAppJniBugs ? dvmThreadSelf() : mSelf;
             if (self != mSelf) {
-                LOGE("JNI ERROR: env->self != thread-self (%p vs. %p); auto-correcting", mSelf, self);
+                ALOGE("JNI ERROR: env->self != thread-self (%p vs. %p); auto-correcting", mSelf, self);
                 mSelf = self;
             }
         }
@@ -317,7 +317,7 @@
         {
             Object* result = self->jniLocalRefTable.get(jobj);
             if (UNLIKELY(result == NULL)) {
-                LOGE("JNI ERROR (app bug): use of deleted local reference (%p)", jobj);
+                ALOGE("JNI ERROR (app bug): use of deleted local reference (%p)", jobj);
                 dvmAbort();
             }
             return result;
@@ -329,7 +329,7 @@
             ScopedPthreadMutexLock lock(&gDvm.jniGlobalRefLock);
             Object* result = pRefTable->get(jobj);
             if (UNLIKELY(result == NULL)) {
-                LOGE("JNI ERROR (app bug): use of deleted global reference (%p)", jobj);
+                ALOGE("JNI ERROR (app bug): use of deleted global reference (%p)", jobj);
                 dvmAbort();
             }
             return result;
@@ -343,7 +343,7 @@
             if (result == kClearedJniWeakGlobal) {
                 result = NULL;
             } else if (UNLIKELY(result == NULL)) {
-                LOGE("JNI ERROR (app bug): use of deleted weak global reference (%p)", jobj);
+                ALOGE("JNI ERROR (app bug): use of deleted weak global reference (%p)", jobj);
                 dvmAbort();
             }
             return result;
@@ -362,7 +362,7 @@
 
 static void AddLocalReferenceFailure(IndirectRefTable* pRefTable) {
     pRefTable->dump("JNI local");
-    LOGE("Failed adding to JNI local ref table (has %zd entries)", pRefTable->capacity());
+    ALOGE("Failed adding to JNI local ref table (has %zd entries)", pRefTable->capacity());
     dvmDumpThread(dvmThreadSelf(), false);
     dvmAbort();     // spec says call FatalError; this is equivalent
 }
@@ -484,7 +484,7 @@
     jobject jobj = (jobject) gDvm.jniGlobalRefTable.add(IRT_FIRST_SEGMENT, obj);
     if (jobj == NULL) {
         gDvm.jniGlobalRefTable.dump("JNI global");
-        LOGE("Failed adding to JNI global ref table (%zd entries)",
+        ALOGE("Failed adding to JNI global ref table (%zd entries)",
                 gDvm.jniGlobalRefTable.capacity());
         dvmAbort();
     }
@@ -508,7 +508,7 @@
                     ALOGW("Excessive JNI global references (%d)", count);
                 } else {
                     gDvm.jniGlobalRefTable.dump("JNI global");
-                    LOGE("Excessive JNI global references (%d)", count);
+                    ALOGE("Excessive JNI global references (%d)", count);
                     dvmAbort();
                 }
             }
@@ -527,7 +527,7 @@
     jobject jobj = (jobject) table->add(IRT_FIRST_SEGMENT, obj);
     if (jobj == NULL) {
         gDvm.jniWeakGlobalRefTable.dump("JNI weak global");
-        LOGE("Failed adding to JNI weak global ref table (%zd entries)", table->capacity());
+        ALOGE("Failed adding to JNI weak global ref table (%zd entries)", table->capacity());
         dvmAbort();
     }
     return jobj;
@@ -589,7 +589,7 @@
 
     if (!dvmAddToReferenceTable(&gDvm.jniPinRefTable, (Object*)arrayObj)) {
         dvmDumpReferenceTable(&gDvm.jniPinRefTable, "JNI pinned array");
-        LOGE("Failed adding to JNI pinned array ref table (%d entries)",
+        ALOGE("Failed adding to JNI pinned array ref table (%d entries)",
            (int) dvmReferenceTableEntries(&gDvm.jniPinRefTable));
         dvmDumpThread(dvmThreadSelf(), false);
         dvmAbort();
@@ -688,15 +688,15 @@
         Method* method = &methods[i];
         if (strcmp(name, method->name) == 0) {
             char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
-            LOGE("Candidate: %s.%s:%s", method->clazz->descriptor, name, desc);
+            ALOGE("Candidate: %s.%s:%s", method->clazz->descriptor, name, desc);
             free(desc);
         }
     }
 }
 
 static void dumpCandidateMethods(ClassObject* clazz, const char* methodName, const char* signature) {
-    LOGE("ERROR: couldn't find native method");
-    LOGE("Requested: %s.%s:%s", clazz->descriptor, methodName, signature);
+    ALOGE("ERROR: couldn't find native method");
+    ALOGE("Requested: %s.%s:%s", clazz->descriptor, methodName, signature);
     dumpMethods(clazz->virtualMethods, clazz->virtualMethodCount, methodName);
     dumpMethods(clazz->directMethods, clazz->directMethodCount, methodName);
 }
@@ -739,7 +739,7 @@
         if (dvmIsSynchronizedMethod(method)) {
             // Synchronization is usually provided by the JNI bridge,
             // but we won't have one.
-            LOGE("fast JNI method %s.%s:%s cannot be synchronized",
+            ALOGE("fast JNI method %s.%s:%s cannot be synchronized",
                     clazz->descriptor, methodName, signature);
             return false;
         }
@@ -747,7 +747,7 @@
             // There's no real reason for this constraint, but since we won't
             // be supplying a JNIEnv* or a jobject 'this', you're effectively
             // static anyway, so it seems clearer to say so.
-            LOGE("fast JNI method %s.%s:%s cannot be non-static",
+            ALOGE("fast JNI method %s.%s:%s cannot be non-static",
                     clazz->descriptor, methodName, signature);
             return false;
         }
@@ -957,14 +957,14 @@
         assert(refTable->maxEntries == 0);
 
         if (!dvmInitReferenceTable(refTable, kInitialSize, INT_MAX)) {
-            LOGE("Unable to initialize monitor tracking table");
+            ALOGE("Unable to initialize monitor tracking table");
             dvmAbort();
         }
     }
 
     if (!dvmAddToReferenceTable(refTable, obj)) {
         /* ran out of memory? could throw exception instead */
-        LOGE("Unable to add entry to monitor tracking table");
+        ALOGE("Unable to add entry to monitor tracking table");
         dvmAbort();
     } else {
         LOGVV("--- added monitor %p", obj);
@@ -978,7 +978,7 @@
     ReferenceTable* pRefTable = &self->jniMonitorRefTable;
 
     if (!dvmRemoveFromReferenceTable(pRefTable, pRefTable->table, obj)) {
-        LOGE("JNI monitor %p not found in tracking list", obj);
+        ALOGE("JNI monitor %p not found in tracking list", obj);
         /* keep going? */
     } else {
         LOGVV("--- removed monitor %p", obj);
@@ -1401,7 +1401,7 @@
  */
 static void FatalError(JNIEnv* env, const char* msg) {
     //dvmChangeStatus(NULL, THREAD_RUNNING);
-    LOGE("JNI posting fatal error: %s", msg);
+    ALOGE("JNI posting fatal error: %s", msg);
     dvmAbort();
 }
 
@@ -3349,7 +3349,7 @@
 void dvmLateEnableCheckedJni() {
     JNIEnvExt* extEnv = dvmGetJNIEnvForThread();
     if (extEnv == NULL) {
-        LOGE("dvmLateEnableCheckedJni: thread has no JNIEnv");
+        ALOGE("dvmLateEnableCheckedJni: thread has no JNIEnv");
         return;
     }
     JavaVMExt* extVm = (JavaVMExt*) gDvmJni.jniVm;
diff --git a/vm/LinearAlloc.cpp b/vm/LinearAlloc.cpp
index d5490cd..de49bf3 100644
--- a/vm/LinearAlloc.cpp
+++ b/vm/LinearAlloc.cpp
@@ -134,7 +134,7 @@
 
     fd = ashmem_create_region("dalvik-LinearAlloc", DEFAULT_MAX_LENGTH);
     if (fd < 0) {
-        LOGE("ashmem LinearAlloc failed %s", strerror(errno));
+        ALOGE("ashmem LinearAlloc failed %s", strerror(errno));
         free(pHdr);
         return NULL;
     }
@@ -142,7 +142,7 @@
     pHdr->mapAddr = (char*)mmap(NULL, pHdr->mapLength, PROT_READ | PROT_WRITE,
         MAP_PRIVATE, fd, 0);
     if (pHdr->mapAddr == MAP_FAILED) {
-        LOGE("LinearAlloc mmap(%d) failed: %s", pHdr->mapLength,
+        ALOGE("LinearAlloc mmap(%d) failed: %s", pHdr->mapLength,
             strerror(errno));
         free(pHdr);
         close(fd);
@@ -156,7 +156,7 @@
     pHdr->mapAddr = mmap(NULL, pHdr->mapLength, PROT_READ | PROT_WRITE,
         MAP_PRIVATE | MAP_ANON, -1, 0);
     if (pHdr->mapAddr == MAP_FAILED) {
-        LOGE("LinearAlloc mmap(%d) failed: %s", pHdr->mapLength,
+        ALOGE("LinearAlloc mmap(%d) failed: %s", pHdr->mapLength,
             strerror(errno));
         free(pHdr);
         return NULL;
@@ -312,7 +312,7 @@
          * works if the users of these functions actually free everything
          * they allocate.
          */
-        LOGE("LinearAlloc exceeded capacity (%d), last=%d",
+        ALOGE("LinearAlloc exceeded capacity (%d), last=%d",
             pHdr->mapLength, (int) size);
         dvmAbort();
     }
@@ -354,7 +354,7 @@
         LOGVV("---    calling mprotect(start=%d len=%d RW)", start, len);
         cc = mprotect(pHdr->mapAddr + start, len, PROT_READ | PROT_WRITE);
         if (cc != 0) {
-            LOGE("LinearAlloc mprotect (+%d %d) failed: %s",
+            ALOGE("LinearAlloc mprotect (+%d %d) failed: %s",
                 start, len, strerror(errno));
             /* we're going to fail soon, might as do it now */
             dvmAbort();
@@ -487,7 +487,7 @@
             }
 
             if (pHdr->writeRefCount[i] == 0) {
-                LOGE("Can't make page %d any less writable", i);
+                ALOGE("Can't make page %d any less writable", i);
                 dvmAbort();
             }
             pHdr->writeRefCount[i]--;
@@ -502,7 +502,7 @@
              * Trying to mark writable.
              */
             if (pHdr->writeRefCount[i] >= 32767) {
-                LOGE("Can't make page %d any more writable", i);
+                ALOGE("Can't make page %d any more writable", i);
                 dvmAbort();
             }
             if (pHdr->writeRefCount[i] == 0) {
diff --git a/vm/Misc.cpp b/vm/Misc.cpp
index b003250..1299c22 100644
--- a/vm/Misc.cpp
+++ b/vm/Misc.cpp
@@ -184,7 +184,7 @@
         vfprintf(target->data.file.fp, format, args);
         break;
     default:
-        LOGE("unexpected 'which' %d", target->which);
+        ALOGE("unexpected 'which' %d", target->which);
         break;
     }
 
diff --git a/vm/Native.cpp b/vm/Native.cpp
index 0c2d6d3..6ccd1ea 100644
--- a/vm/Native.cpp
+++ b/vm/Native.cpp
@@ -97,8 +97,8 @@
             free(desc);
         }
         if (dvmIsSynchronizedMethod(method)) {
-            LOGE("ERROR: internal-native can't be declared 'synchronized'");
-            LOGE("Failing on %s.%s", method->clazz->descriptor, method->name);
+            ALOGE("ERROR: internal-native can't be declared 'synchronized'");
+            ALOGE("Failing on %s.%s", method->clazz->descriptor, method->name);
             dvmAbort();     // harsh, but this is VM-internal problem
         }
         DalvikBridgeFunc dfunc = (DalvikBridgeFunc) infunc;
@@ -753,7 +753,7 @@
 static void* lookupSharedLibMethod(const Method* method)
 {
     if (gDvm.nativeLibs == NULL) {
-        LOGE("Unexpected init state: nativeLibs not ready");
+        ALOGE("Unexpected init state: nativeLibs not ready");
         dvmAbort();
     }
     return (void*) dvmHashForeach(gDvm.nativeLibs, findMethodInLib,
diff --git a/vm/PointerSet.cpp b/vm/PointerSet.cpp
index d34fcff..21fea15 100644
--- a/vm/PointerSet.cpp
+++ b/vm/PointerSet.cpp
@@ -133,7 +133,7 @@
         LOGVV("expanding %p to %d", pSet, pSet->alloc);
         newList = (const void**)realloc(pSet->list, pSet->alloc * sizeof(void*));
         if (newList == NULL) {
-            LOGE("Failed expanding ptr set (alloc=%d)", pSet->alloc);
+            ALOGE("Failed expanding ptr set (alloc=%d)", pSet->alloc);
             dvmAbort();
         }
         pSet->list = newList;
diff --git a/vm/Profile.cpp b/vm/Profile.cpp
index 3be0694..572abff 100644
--- a/vm/Profile.cpp
+++ b/vm/Profile.cpp
@@ -124,7 +124,7 @@
 
     clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tm);
     if (!(tm.tv_nsec >= 0 && tm.tv_nsec < 1*1000*1000*1000)) {
-        LOGE("bad nsec: %ld", tm.tv_nsec);
+        ALOGE("bad nsec: %ld", tm.tv_nsec);
         dvmAbort();
     }
     return tm.tv_sec * 1000000LL + tm.tv_nsec / 1000;
@@ -209,7 +209,7 @@
                                       MAP_SHARED, fd, 0);
         close(fd);
         if (gDvm.emulatorTracePage == MAP_FAILED) {
-            LOGE("Unable to mmap /dev/qemu_trace");
+            ALOGE("Unable to mmap /dev/qemu_trace");
             gDvm.emulatorTracePage = NULL;
         } else {
             *(u4*) gDvm.emulatorTracePage = 0;
@@ -246,7 +246,7 @@
         oldValue = gDvm.activeProfilers;
         newValue = oldValue + (enable ? 1 : -1);
         if (newValue < 0) {
-            LOGE("Can't have %d active profilers", newValue);
+            ALOGE("Can't have %d active profilers", newValue);
             dvmAbort();
         }
     } while (android_atomic_release_cas(oldValue, newValue,
@@ -394,7 +394,7 @@
         }
         if (state->traceFile == NULL) {
             int err = errno;
-            LOGE("Unable to open trace file '%s': %s",
+            ALOGE("Unable to open trace file '%s': %s",
                 traceFileName, strerror(err));
             dvmThrowExceptionFmt(gDvm.exRuntimeException,
                 "Unable to open trace file '%s': %s",
@@ -652,7 +652,7 @@
         state->traceFile = open_memstream(&memStreamPtr, &memStreamSize);
         if (state->traceFile == NULL) {
             /* not expected */
-            LOGE("Unable to open memstream");
+            ALOGE("Unable to open memstream");
             dvmAbort();
         }
     }
@@ -707,7 +707,7 @@
         /* append the profiling data */
         if (fwrite(state->buf, finalCurOffset, 1, state->traceFile) != 1) {
             int err = errno;
-            LOGE("trace fwrite(%d) failed: %s",
+            ALOGE("trace fwrite(%d) failed: %s",
                 finalCurOffset, strerror(err));
             dvmThrowExceptionFmt(gDvm.exRuntimeException,
                 "Trace data write failed: %s", strerror(err));
@@ -953,7 +953,7 @@
 void dvmEmulatorTraceStop()
 {
     if (gDvm.emulatorTraceEnableCount == 0) {
-        LOGE("ERROR: emulator tracing not enabled");
+        ALOGE("ERROR: emulator tracing not enabled");
         return;
     }
     /* in theory we should make this an atomic inc; in practice not important */
@@ -981,7 +981,7 @@
 void dvmStopInstructionCounting()
 {
     if (gDvm.instructionCountEnableCount == 0) {
-        LOGE("ERROR: instruction counting not enabled");
+        ALOGE("ERROR: instruction counting not enabled");
         dvmAbort();
     }
     gDvm.instructionCountEnableCount--;
diff --git a/vm/RawDexFile.cpp b/vm/RawDexFile.cpp
index d8df655..4598767 100644
--- a/vm/RawDexFile.cpp
+++ b/vm/RawDexFile.cpp
@@ -33,7 +33,7 @@
 static int copyFileToFile(int destFd, int srcFd, size_t size)
 {
     if (lseek(srcFd, 0, SEEK_SET) != 0) {
-        LOGE("lseek failure: %s", strerror(errno));
+        ALOGE("lseek failure: %s", strerror(errno));
         return -1;
     }
 
@@ -49,7 +49,7 @@
     int result = fstat(fd, &buf);
 
     if (result < 0) {
-        LOGE("Unable to determine mod time: %s", strerror(errno));
+        ALOGE("Unable to determine mod time: %s", strerror(errno));
         return -1;
     }
 
@@ -76,12 +76,12 @@
     ssize_t amt = read(fd, headerStart, sizeof(headerStart));
 
     if (amt < 0) {
-        LOGE("Unable to read header: %s", strerror(errno));
+        ALOGE("Unable to read header: %s", strerror(errno));
         return -1;
     }
 
     if (amt != sizeof(headerStart)) {
-        LOGE("Unable to read full header (only got %d bytes)", (int) amt);
+        ALOGE("Unable to read full header (only got %d bytes)", (int) amt);
         return -1;
     }
 
@@ -132,12 +132,12 @@
     dvmSetCloseOnExec(dexFd);
 
     if (verifyMagicAndGetAdler32(dexFd, &adler32) < 0) {
-        LOGE("Error with header for %s", fileName);
+        ALOGE("Error with header for %s", fileName);
         goto bail;
     }
 
     if (getModTimeAndSize(dexFd, &modTime, &fileSize) < 0) {
-        LOGE("Error with stat for %s", fileName);
+        ALOGE("Error with stat for %s", fileName);
         goto bail;
     }
 
@@ -194,7 +194,7 @@
         }
 
         if (!result) {
-            LOGE("Unable to extract+optimize DEX from '%s'", fileName);
+            ALOGE("Unable to extract+optimize DEX from '%s'", fileName);
             goto bail;
         }
 
@@ -218,7 +218,7 @@
         /* unlock the fd */
         if (!dvmUnlockCachedDexFile(optFd)) {
             /* uh oh -- this process needs to exit or we'll wedge the system */
-            LOGE("Unable to unlock DEX file");
+            ALOGE("Unable to unlock DEX file");
             goto bail;
         }
         locked = false;
diff --git a/vm/ReferenceTable.cpp b/vm/ReferenceTable.cpp
index 2e96f80..24180d4 100644
--- a/vm/ReferenceTable.cpp
+++ b/vm/ReferenceTable.cpp
@@ -78,7 +78,7 @@
 
         newTable = (Object**) realloc(pRef->table, newSize * sizeof(Object*));
         if (newTable == NULL) {
-            LOGE("Unable to expand ref table (from %d to %d %d-byte entries)",
+            ALOGE("Unable to expand ref table (from %d to %d %d-byte entries)",
                 pRef->allocEntries, newSize, sizeof(Object*));
             return false;
         }
@@ -310,7 +310,7 @@
     // Make a copy of the table, and sort it.
     Object** tableCopy = (Object**)malloc(sizeof(Object*) * count);
     if (tableCopy == NULL) {
-        LOGE("Unable to copy table with %d elements", count);
+        ALOGE("Unable to copy table with %d elements", count);
         return;
     }
     memcpy(tableCopy, refs, sizeof(Object*) * count);
diff --git a/vm/SignalCatcher.cpp b/vm/SignalCatcher.cpp
index 2d686c9..c29f19a 100644
--- a/vm/SignalCatcher.cpp
+++ b/vm/SignalCatcher.cpp
@@ -156,7 +156,7 @@
         /* write to memory buffer */
         FILE* memfp = open_memstream(&traceBuf, &traceLen);
         if (memfp == NULL) {
-            LOGE("Unable to create memstream for stack traces");
+            ALOGE("Unable to create memstream for stack traces");
             traceBuf = NULL;        /* make sure it didn't touch this */
             /* continue on */
         } else {
@@ -186,12 +186,12 @@
          */
         int fd = open(gDvm.stackTraceFile, O_WRONLY | O_APPEND | O_CREAT, 0666);
         if (fd < 0) {
-            LOGE("Unable to open stack trace file '%s': %s",
+            ALOGE("Unable to open stack trace file '%s': %s",
                 gDvm.stackTraceFile, strerror(errno));
         } else {
             ssize_t actual = write(fd, traceBuf, traceLen);
             if (actual != (ssize_t) traceLen) {
-                LOGE("Failed to write stack traces to %s (%d of %zd): %s",
+                ALOGE("Failed to write stack traces to %s (%d of %zd): %s",
                     gDvm.stackTraceFile, (int) actual, traceLen,
                     strerror(errno));
             } else {
@@ -219,7 +219,7 @@
 void printAllClass(void *ptr)
 {
     ClassObject **classPP = (ClassObject **) ptr;
-    LOGE("class %s", (*classPP)->descriptor);
+    ALOGE("class %s", (*classPP)->descriptor);
 
 }
 
@@ -315,7 +315,7 @@
             break;
 #endif
         default:
-            LOGE("unexpected signal %d", rcvd);
+            ALOGE("unexpected signal %d", rcvd);
             break;
         }
     }
diff --git a/vm/StdioConverter.cpp b/vm/StdioConverter.cpp
index 0153ff2..f420c4d 100644
--- a/vm/StdioConverter.cpp
+++ b/vm/StdioConverter.cpp
@@ -163,7 +163,7 @@
 
         if (fdCount < 0) {
             if (errno != EINTR) {
-                LOGE("select on stdout/stderr failed");
+                ALOGE("select on stdout/stderr failed");
                 break;
             }
             ALOGD("Got EINTR, ignoring");
diff --git a/vm/Sync.cpp b/vm/Sync.cpp
index 4010432..8a3803e 100644
--- a/vm/Sync.cpp
+++ b/vm/Sync.cpp
@@ -98,11 +98,11 @@
 
     mon = (Monitor*) calloc(1, sizeof(Monitor));
     if (mon == NULL) {
-        LOGE("Unable to allocate monitor");
+        ALOGE("Unable to allocate monitor");
         dvmAbort();
     }
     if (((u4)mon & 7) != 0) {
-        LOGE("Misaligned monitor: %p", mon);
+        ALOGE("Misaligned monitor: %p", mon);
         dvmAbort();
     }
     mon->obj = obj;
@@ -1365,7 +1365,7 @@
         dvmUnlockThreadList();
         goto retry;
     }
-    LOGE("object %p has an unknown hash state %#x", obj, hashState);
+    ALOGE("object %p has an unknown hash state %#x", obj, hashState);
     dvmDumpThread(dvmThreadSelf(), false);
     dvmAbort();
     return 0;  /* Quiet the compiler. */
diff --git a/vm/Thread.cpp b/vm/Thread.cpp
index 1ee00a8..f0217b4 100644
--- a/vm/Thread.cpp
+++ b/vm/Thread.cpp
@@ -255,7 +255,7 @@
 
     /* allocate a TLS slot */
     if (pthread_key_create(&gDvm.pthreadKeySelf, threadExitCheck) != 0) {
-        LOGE("ERROR: pthread_key_create failed");
+        ALOGE("ERROR: pthread_key_create failed");
         return false;
     }
 
@@ -488,7 +488,7 @@
             if (sleepIter == 0)
                 startWhen = dvmGetRelativeTimeUsec();
             if (!dvmIterativeSleep(sleepIter++, kSpinSleepTime, startWhen)) {
-                LOGE("threadid=%d: couldn't get thread-suspend lock (%s:%s),"
+                ALOGE("threadid=%d: couldn't get thread-suspend lock (%s:%s),"
                      " bailing",
                     self->threadId, who, getSuspendCauseStr(why));
                 /* threads are not suspended, thread dump could crash */
@@ -699,14 +699,14 @@
      * we create an instance of them.
      */
     if (!dvmInitClass(gDvm.classJavaLangClass)) {
-        LOGE("'Class' class failed to initialize");
+        ALOGE("'Class' class failed to initialize");
         return false;
     }
     if (!dvmInitClass(gDvm.classJavaLangThreadGroup) ||
         !dvmInitClass(gDvm.classJavaLangThread) ||
         !dvmInitClass(gDvm.classJavaLangVMThread))
     {
-        LOGE("thread classes failed to initialize");
+        ALOGE("thread classes failed to initialize");
         return false;
     }
 
@@ -720,7 +720,7 @@
      */
     threadObj = dvmAllocObject(gDvm.classJavaLangThread, ALLOC_DEFAULT);
     if (threadObj == NULL) {
-        LOGE("unable to allocate main thread object");
+        ALOGE("unable to allocate main thread object");
         return false;
     }
     dvmReleaseTrackedAlloc(threadObj, NULL);
@@ -736,7 +736,7 @@
     dvmCallMethod(thread, init, threadObj, &unused, groupObj, threadNameStr,
         THREAD_NORM_PRIORITY, false);
     if (dvmCheckException(thread)) {
-        LOGE("exception thrown while constructing main thread object");
+        ALOGE("exception thrown while constructing main thread object");
         return false;
     }
 
@@ -745,7 +745,7 @@
      */
     vmThreadObj = dvmAllocObject(gDvm.classJavaLangVMThread, ALLOC_DEFAULT);
     if (vmThreadObj == NULL) {
-        LOGE("unable to allocate main vmthread object");
+        ALOGE("unable to allocate main vmthread object");
         return false;
     }
     dvmReleaseTrackedAlloc(vmThreadObj, NULL);
@@ -754,7 +754,7 @@
             "(Ljava/lang/Thread;)V");
     dvmCallMethod(thread, init, vmThreadObj, &unused, threadObj);
     if (dvmCheckException(thread)) {
-        LOGE("exception thrown while constructing main vmthread object");
+        ALOGE("exception thrown while constructing main vmthread object");
         return false;
     }
 
@@ -1024,7 +1024,7 @@
          * here to ensure we clean up after ourselves.
          */
         if (thread != NULL) {
-            LOGE("pthread_setspecific(%p) failed, err=%d", thread, cc);
+            ALOGE("pthread_setspecific(%p) failed, err=%d", thread, cc);
             dvmAbort();     /* the world is fundamentally hosed */
         }
     }
@@ -1075,12 +1075,12 @@
         self->threadExitCheckCount++;
         int cc = pthread_setspecific(gDvm.pthreadKeySelf, self);
         if (cc != 0) {
-            LOGE("threadid=%d: unable to re-add thread to TLS",
+            ALOGE("threadid=%d: unable to re-add thread to TLS",
                 self->threadId);
             dvmAbort();
         }
     } else {
-        LOGE("threadid=%d: native thread exited without detaching",
+        ALOGE("threadid=%d: native thread exited without detaching",
             self->threadId);
         dvmAbort();
     }
@@ -1104,7 +1104,7 @@
      */
     int num = dvmAllocBit(gDvm.threadIdMap);
     if (num < 0) {
-        LOGE("Ran out of thread IDs");
+        ALOGE("Ran out of thread IDs");
         dvmAbort();     // TODO: make this a non-fatal error result
     }
 
@@ -1311,7 +1311,7 @@
          * resource limits.  VirtualMachineError is probably too severe,
          * so use OutOfMemoryError.
          */
-        LOGE("Thread creation failed (err=%s)", strerror(errno));
+        ALOGE("Thread creation failed (err=%s)", strerror(errno));
 
         dvmSetFieldObject(threadObj, gDvm.offJavaLangThread_vmThread, NULL);
 
@@ -1659,7 +1659,7 @@
     if (pthread_create(pHandle, &threadAttr, internalThreadStart,
             pArgs) != 0)
     {
-        LOGE("internal thread creation failed");
+        ALOGE("internal thread creation failed");
         free(pArgs->name);
         free(pArgs);
         return false;
@@ -1894,7 +1894,7 @@
     dvmCallMethod(self, init, threadObj, &unused, (Object*)pArgs->group,
             threadNameStr, os_getThreadPriorityFromSystem(), isDaemon);
     if (dvmCheckException(self)) {
-        LOGE("exception thrown while constructing attached thread object");
+        ALOGE("exception thrown while constructing attached thread object");
         goto fail_unlink;
     }
 
@@ -2020,7 +2020,7 @@
         }
 
         if (!topIsNative) {
-            LOGE("ERROR: detaching thread with interp frames (count=%d)",
+            ALOGE("ERROR: detaching thread with interp frames (count=%d)",
                 curDepth);
             dvmDumpThread(self, false);
             dvmAbort();
@@ -2487,11 +2487,11 @@
             spinSleepTime = MORE_SLEEP;
 
             if (retryCount++ == kMaxRetries) {
-                LOGE("Fatal spin-on-suspend, dumping threads");
+                ALOGE("Fatal spin-on-suspend, dumping threads");
                 dvmDumpAllThreads(false);
 
                 /* log this after -- long traces will scroll off log */
-                LOGE("threadid=%d: stuck on threadid=%d, giving up",
+                ALOGE("threadid=%d: stuck on threadid=%d, giving up",
                     self->threadId, thread->threadId);
 
                 /* try to get a debuggerd dump from the spinning thread */
@@ -2992,13 +2992,13 @@
     groupField = dvmFindStaticField(gDvm.classJavaLangThreadGroup,
         fieldName, "Ljava/lang/ThreadGroup;");
     if (groupField == NULL) {
-        LOGE("java.lang.ThreadGroup does not have an '%s' field", fieldName);
+        ALOGE("java.lang.ThreadGroup does not have an '%s' field", fieldName);
         dvmThrowInternalError("bad definition for ThreadGroup");
         return NULL;
     }
     groupObj = dvmGetStaticFieldObject(groupField);
     if (groupObj == NULL) {
-        LOGE("java.lang.ThreadGroup.%s not initialized", fieldName);
+        ALOGE("java.lang.ThreadGroup.%s not initialized", fieldName);
         dvmThrowInternalError(NULL);
         return NULL;
     }
@@ -3180,7 +3180,7 @@
     return -1;
 
 out_bad_data:
-    LOGE("Bad cgroup data {%s}", lineBuf);
+    ALOGE("Bad cgroup data {%s}", lineBuf);
     snprintf(buf, bufLen, "[data-parse-failed]");
     fclose(fp);
     return -1;
diff --git a/vm/UtfString.cpp b/vm/UtfString.cpp
index 63d116e..2307fb4 100644
--- a/vm/UtfString.cpp
+++ b/vm/UtfString.cpp
@@ -48,7 +48,7 @@
     if (!dvmIsClassInitialized(gDvm.classJavaLangString)) {
         /* Perform first-time use initialization of the class. */
         if (!dvmInitClass(gDvm.classJavaLangString)) {
-            LOGE("FATAL: Could not initialize class String");
+            ALOGE("FATAL: Could not initialize class String");
             dvmAbort();
         }
     }
diff --git a/vm/alloc/Alloc.cpp b/vm/alloc/Alloc.cpp
index 8a9eb4e..cfcb968 100644
--- a/vm/alloc/Alloc.cpp
+++ b/vm/alloc/Alloc.cpp
@@ -99,14 +99,14 @@
     /* find class, initialize if necessary */
     clazz = dvmFindSystemClass(descriptor);
     if (clazz == NULL) {
-        LOGE("Unable to find %s", descriptor);
+        ALOGE("Unable to find %s", descriptor);
         return NULL;
     }
 
     init = dvmFindDirectMethodByDescriptor(clazz, "<init>",
             "(Ljava/lang/String;)V");
     if (init == NULL) {
-        LOGE("Unable to find String-arg constructor for %s", descriptor);
+        ALOGE("Unable to find String-arg constructor for %s", descriptor);
         return NULL;
     }
 
@@ -259,7 +259,7 @@
     assert(obj != NULL);
     assert(self != NULL);
     if (!dvmAddToReferenceTable(&self->internalLocalRefTable, obj)) {
-        LOGE("threadid=%d: unable to add %p to internal ref table",
+        ALOGE("threadid=%d: unable to add %p to internal ref table",
             self->threadId, obj);
         dvmDumpThread(self, false);
         dvmAbort();
@@ -284,7 +284,7 @@
     if (!dvmRemoveFromReferenceTable(&self->internalLocalRefTable,
             self->internalLocalRefTable.table, obj))
     {
-        LOGE("threadid=%d: failed to remove %p from internal ref table",
+        ALOGE("threadid=%d: failed to remove %p from internal ref table",
             self->threadId, obj);
         dvmAbort();
     }
diff --git a/vm/alloc/CardTable.cpp b/vm/alloc/CardTable.cpp
index da395e7..2c81fd1 100644
--- a/vm/alloc/CardTable.cpp
+++ b/vm/alloc/CardTable.cpp
@@ -255,7 +255,7 @@
     if (dvmHeapBitmapIsObjectBitSet(ctx->markBits, obj)) {
         return;
     }
-    LOGE("object %p is white", obj);
+    ALOGE("object %p is white", obj);
 }
 
 /*
@@ -380,7 +380,7 @@
     } else if (isPushedOnMarkStack(obj)) {
         return;
     } else {
-        LOGE("Verify failed, object %p is gray and on an unmarked card", obj);
+        ALOGE("Verify failed, object %p is gray and on an unmarked card", obj);
         dvmDumpObject(obj);
         dvmVisitObject(dumpWhiteReferenceVisitor, obj, &ctx);
         dumpReferences(obj);
diff --git a/vm/alloc/Copying.cpp b/vm/alloc/Copying.cpp
index 0940e9d..49c6760 100644
--- a/vm/alloc/Copying.cpp
+++ b/vm/alloc/Copying.cpp
@@ -338,7 +338,7 @@
         return addr;
     }
     /* Insufficient space, fail. */
-    LOGE("Insufficient space, %zu blocks, %zu blocks allocated and %zu bytes allocated",
+    ALOGE("Insufficient space, %zu blocks, %zu blocks allocated and %zu bytes allocated",
          heapSource->totalBlocks,
          heapSource->allocBlocks,
          heapSource->bytesAllocated);
@@ -1000,7 +1000,7 @@
     assert(dvmGetFieldObject(ref, gDvm.offJavaLangRefReference_queue) != NULL);
     assert(dvmGetFieldObject(ref, gDvm.offJavaLangRefReference_queueNext) == NULL);
     if (!dvmHeapAddRefToLargeTable(&gDvm.gcHeap->referenceOperations, ref)) {
-        LOGE("no room for any more reference operations");
+        ALOGE("no room for any more reference operations");
         dvmAbort();
     }
 }
@@ -1579,9 +1579,9 @@
                         saveArea->xtra.currentPc, thread->currentPc2,
                         method->clazz->descriptor, method->name, method->insns);
                     if (saveArea->xtra.currentPc != NULL)
-                        LOGE("  pc inst = 0x%04x", *saveArea->xtra.currentPc);
+                        ALOGE("  pc inst = 0x%04x", *saveArea->xtra.currentPc);
                     if (thread->currentPc2 != NULL)
-                        LOGE("  pc2 inst = 0x%04x", *thread->currentPc2);
+                        ALOGE("  pc2 inst = 0x%04x", *thread->currentPc2);
                     dvmDumpThread(thread, false);
                 }
             } else {
@@ -1668,7 +1668,7 @@
 #if WITH_EXTRA_GC_CHECKS > 0
                         if ((rval & 0x3) != 0 || !dvmIsValidObject((Object*) rval)) {
                             /* this is very bad */
-                            LOGE("PGC: invalid ref in reg %d: 0x%08x",
+                            ALOGE("PGC: invalid ref in reg %d: 0x%08x",
                                 method->registersSize-1 - i, rval);
                         } else
 #endif
diff --git a/vm/alloc/HeapBitmap.cpp b/vm/alloc/HeapBitmap.cpp
index 8b65287..d6a737b 100644
--- a/vm/alloc/HeapBitmap.cpp
+++ b/vm/alloc/HeapBitmap.cpp
@@ -34,7 +34,7 @@
     bitsLen = HB_OFFSET_TO_INDEX(maxSize) * sizeof(*hb->bits);
     bits = dvmAllocRegion(bitsLen, PROT_READ | PROT_WRITE, name);
     if (bits == NULL) {
-        LOGE("Could not mmap %zd-byte ashmem region '%s'", bitsLen, name);
+        ALOGE("Could not mmap %zd-byte ashmem region '%s'", bitsLen, name);
         return false;
     }
     hb->bits = (unsigned long *)bits;
diff --git a/vm/alloc/HeapSource.cpp b/vm/alloc/HeapSource.cpp
index 949e8ab..c0ad07d 100644
--- a/vm/alloc/HeapSource.cpp
+++ b/vm/alloc/HeapSource.cpp
@@ -347,7 +347,7 @@
 
     assert(hs != NULL);
     if (hs->numHeaps >= HEAP_SOURCE_MAX_HEAP_COUNT) {
-        LOGE("Attempt to create too many heaps (%zd >= %zd)",
+        ALOGE("Attempt to create too many heaps (%zd >= %zd)",
                 hs->numHeaps, HEAP_SOURCE_MAX_HEAP_COUNT);
         dvmAbort();
         return false;
@@ -512,7 +512,7 @@
     assert(gHs == NULL);
 
     if (!(startSize <= growthLimit && growthLimit <= maximumSize)) {
-        LOGE("Bad heap size parameters (start=%zd, max=%zd, limit=%zd)",
+        ALOGE("Bad heap size parameters (start=%zd, max=%zd, limit=%zd)",
              startSize, maximumSize, growthLimit);
         return NULL;
     }
@@ -575,7 +575,7 @@
         goto fail;
     }
     if (!allocMarkStack(&gcHeap->markContext.stack, hs->maximumSize)) {
-        LOGE("Can't create markStack");
+        ALOGE("Can't create markStack");
         dvmHeapBitmapDelete(&hs->markBits);
         dvmHeapBitmapDelete(&hs->liveBits);
         goto fail;
diff --git a/vm/alloc/TEST/HeapBitmapTest/include/Dalvik.h b/vm/alloc/TEST/HeapBitmapTest/include/Dalvik.h
index 4c9f608..89492d5 100644
--- a/vm/alloc/TEST/HeapBitmapTest/include/Dalvik.h
+++ b/vm/alloc/TEST/HeapBitmapTest/include/Dalvik.h
@@ -8,8 +8,8 @@
 #include <unistd.h>
 #include <limits.h>
 
-#define LOGW(...) printf("W/" __VA_ARGS__)
-#define LOGE(...) printf("E/" __VA_ARGS__)
+#define ALOGW(...) printf("W/" __VA_ARGS__)
+#define ALOGE(...) printf("E/" __VA_ARGS__)
 
 inline void dvmAbort(void) {
     exit(1);
diff --git a/vm/alloc/Verify.cpp b/vm/alloc/Verify.cpp
index 31998f8..93a090a 100644
--- a/vm/alloc/Verify.cpp
+++ b/vm/alloc/Verify.cpp
@@ -93,11 +93,11 @@
     if (!isValid) {
         Object **parent = (Object **)arg;
         if (*parent != NULL) {
-            LOGE("Verify of object %p failed", *parent);
+            ALOGE("Verify of object %p failed", *parent);
             dvmDumpObject(*parent);
             *parent = NULL;
         }
-        LOGE("Verify of reference %p @ %p failed", obj, addr);
+        ALOGE("Verify of reference %p @ %p failed", obj, addr);
         dvmDumpObject(obj);
     }
 }
diff --git a/vm/alloc/Visit.cpp b/vm/alloc/Visit.cpp
index 7eaff07..410b66e 100644
--- a/vm/alloc/Visit.cpp
+++ b/vm/alloc/Visit.cpp
@@ -134,9 +134,9 @@
 #if WITH_EXTRA_GC_CHECKS
                         if (fp[i] != 0 && !dvmIsValidObject((Object *)fp[i])) {
                             /* this is very bad */
-                            LOGE("PGC: invalid ref in reg %d: %#x",
+                            ALOGE("PGC: invalid ref in reg %d: %#x",
                                  method->registersSize - 1 - i, fp[i]);
-                            LOGE("PGC: %s.%s addr %#x",
+                            ALOGE("PGC: %s.%s addr %#x",
                                  method->clazz->descriptor, method->name,
                                  saveArea->xtra.currentPc - method->insns);
                             continue;
diff --git a/vm/analysis/CodeVerify.cpp b/vm/analysis/CodeVerify.cpp
index 3d8d2fa..74f3cfc 100644
--- a/vm/analysis/CodeVerify.cpp
+++ b/vm/analysis/CodeVerify.cpp
@@ -250,7 +250,7 @@
     for (i = 0; i < kRegTypeMAX; i++) {
         for (j = i; j < kRegTypeMAX; j++) {
             if (gDvmMergeTab[i][j] != gDvmMergeTab[j][i]) {
-                LOGE("Symmetry violation: %d,%d vs %d,%d", i, j, j, i);
+                ALOGE("Symmetry violation: %d,%d vs %d,%d", i, j, j, i);
                 dvmAbort();
             }
         }
@@ -1534,7 +1534,7 @@
     case kRegTypeLongHi:
     case kRegTypeDoubleHi:
         /* should never set these explicitly */
-        LOGE("BUG: explicit set of high register type");
+        ALOGE("BUG: explicit set of high register type");
         dvmAbort();
         break;
 
@@ -1559,7 +1559,7 @@
         /* bad type - fall through */
 
     case kRegTypeConflict:      // should only be set during a merge
-        LOGE("BUG: set register to unknown type %d", newType);
+        ALOGE("BUG: set register to unknown type %d", newType);
         dvmAbort();
         break;
     }
@@ -1728,7 +1728,7 @@
 
     clazz = getUninitInstance(uninitMap, regTypeToUninitIndex(uninitType));
     if (clazz == NULL) {
-        LOGE("VFY: unable to find type=%#x (idx=%d)",
+        ALOGE("VFY: unable to find type=%#x (idx=%d)",
             uninitType, regTypeToUninitIndex(uninitType));
         *pFailure = VERIFY_ERROR_GENERIC;
         return;
@@ -3327,7 +3327,7 @@
         break;
     default:
         /* whoops */
-        LOGE("ERROR: stomped a %d-unit instruction with a verifier error",
+        ALOGE("ERROR: stomped a %d-unit instruction with a verifier error",
             width);
         dvmAbort();
     }
diff --git a/vm/analysis/DexPrepare.cpp b/vm/analysis/DexPrepare.cpp
index 7985481..54bb16c 100644
--- a/vm/analysis/DexPrepare.cpp
+++ b/vm/analysis/DexPrepare.cpp
@@ -81,22 +81,22 @@
 
     struct stat sb;
     if (stat(dirName.c_str(), &sb) < 0) {
-        LOGE("Could not stat dex cache directory '%s': %s", dirName.c_str(), strerror(errno));
+        ALOGE("Could not stat dex cache directory '%s': %s", dirName.c_str(), strerror(errno));
         return false;
     }
 
     if (!S_ISDIR(sb.st_mode)) {
-        LOGE("Dex cache directory isn't a directory: %s", dirName.c_str());
+        ALOGE("Dex cache directory isn't a directory: %s", dirName.c_str());
         return false;
     }
 
     if (access(dirName.c_str(), W_OK) < 0) {
-        LOGE("Dex cache directory isn't writable: %s", dirName.c_str());
+        ALOGE("Dex cache directory isn't writable: %s", dirName.c_str());
         return false;
     }
 
     if (access(dirName.c_str(), R_OK) < 0) {
-        LOGE("Dex cache directory isn't readable: %s", dirName.c_str());
+        ALOGE("Dex cache directory isn't readable: %s", dirName.c_str());
         return false;
     }
 
@@ -148,7 +148,7 @@
                 // TODO: write an equivalent of strerror_r that returns a std::string.
                 const std::string errnoString(strerror(errno));
                 if (directoryIsValid(cacheFileName)) {
-                    LOGE("Can't open dex cache file '%s': %s", cacheFileName, errnoString.c_str());
+                    ALOGE("Can't open dex cache file '%s': %s", cacheFileName, errnoString.c_str());
                 }
             }
             return fd;
@@ -173,7 +173,7 @@
     }
     dvmChangeStatus(NULL, oldStatus);
     if (cc != 0) {
-        LOGE("Can't lock dex cache '%s': %d", cacheFileName, cc);
+        ALOGE("Can't lock dex cache '%s': %d", cacheFileName, cc);
         close(fd);
         return -1;
     }
@@ -188,7 +188,7 @@
      */
     cc = fstat(fd, &fdStat);
     if (cc != 0) {
-        LOGE("Can't stat open file '%s'", cacheFileName);
+        ALOGE("Can't stat open file '%s'", cacheFileName);
         LOGVV("DexOpt: unlocking cache file %s", cacheFileName);
         goto close_fail;
     }
@@ -472,7 +472,7 @@
         else
             execv(execFile, const_cast<char**>(argv));
 
-        LOGE("execv '%s'%s failed: %s", execFile,
+        ALOGE("execv '%s'%s failed: %s", execFile,
             kUseValgrind ? " [valgrind]" : "", strerror(errno));
         exit(1);
     } else {
@@ -495,7 +495,7 @@
         }
         dvmChangeStatus(NULL, oldStatus);
         if (gotPid != pid) {
-            LOGE("waitpid failed: wanted %d, got %d: %s",
+            ALOGE("waitpid failed: wanted %d, got %d: %s",
                 (int) pid, (int) gotPid, strerror(errno));
             return false;
         }
@@ -538,11 +538,11 @@
 
     /* quick test so we don't blow up on empty file */
     if (dexLength < (int) sizeof(DexHeader)) {
-        LOGE("too small to be DEX");
+        ALOGE("too small to be DEX");
         return false;
     }
     if (dexOffset < (int) sizeof(DexOptHeader)) {
-        LOGE("not enough room for opt header");
+        ALOGE("not enough room for opt header");
         return false;
     }
 
@@ -566,7 +566,7 @@
         mapAddr = mmap(NULL, dexOffset + dexLength, PROT_READ|PROT_WRITE,
                     MAP_SHARED, fd, 0);
         if (mapAddr == MAP_FAILED) {
-            LOGE("unable to mmap DEX cache: %s", strerror(errno));
+            ALOGE("unable to mmap DEX cache: %s", strerror(errno));
             goto bail;
         }
 
@@ -607,7 +607,7 @@
             u1* dexAddr = ((u1*) mapAddr) + dexOffset;
 
             if (dvmDexFileOpenPartial(dexAddr, dexLength, &pDvmDex) != 0) {
-                LOGE("Unable to create DexFile");
+                ALOGE("Unable to create DexFile");
                 success = false;
             } else {
                 /*
@@ -618,7 +618,7 @@
                 if (gDvm.generateRegisterMaps) {
                     pRegMapBuilder = dvmGenerateRegisterMaps(pDvmDex);
                     if (pRegMapBuilder == NULL) {
-                        LOGE("Failed generating register maps");
+                        ALOGE("Failed generating register maps");
                         success = false;
                     }
                 }
@@ -643,7 +643,7 @@
          * Exclude this code when doing clean shutdown for valgrind.
          */
         if (munmap(mapAddr, dexOffset + dexLength) != 0) {
-            LOGE("munmap failed: %s", strerror(errno));
+            ALOGE("munmap failed: %s", strerror(errno));
             goto bail;
         }
 #endif
@@ -659,7 +659,7 @@
 
     depsOffset = lseek(fd, 0, SEEK_END);
     if (depsOffset < 0) {
-        LOGE("lseek to EOF failed: %s", strerror(errno));
+        ALOGE("lseek to EOF failed: %s", strerror(errno));
         goto bail;
     }
     adjOffset = (depsOffset + 7) & ~(0x07);
@@ -809,7 +809,7 @@
      * for it.
      */
     if (dvmDexFileOpenPartial(addr, len, &pDvmDex) != 0) {
-        LOGE("Unable to create DexFile");
+        ALOGE("Unable to create DexFile");
         goto bail;
     }
 
@@ -953,7 +953,7 @@
      * list, but it costs very little to do it in all cases.)
      */
     if (!dvmInitClass(gDvm.classJavaLangClass)) {
-        LOGE("ERROR: failed to initialize the class Class!");
+        ALOGE("ERROR: failed to initialize the class Class!");
         return false;
     }
 
@@ -1107,7 +1107,7 @@
     case kCpeDex:
         return dvmGetRawDexFileCacheFileName((RawDexFile*) cpe->ptr);
     default:
-        LOGE("DexOpt: unexpected cpe kind %d", cpe->kind);
+        ALOGE("DexOpt: unexpected cpe kind %d", cpe->kind);
         dvmAbort();
         return NULL;
     }
@@ -1128,7 +1128,7 @@
         pDvmDex = dvmGetRawDexFileDex((RawDexFile*) cpe->ptr);
         break;
     default:
-        LOGE("unexpected cpe kind %d", cpe->kind);
+        ALOGE("unexpected cpe kind %d", cpe->kind);
         dvmAbort();
         pDvmDex = NULL;         // make gcc happy
     }
@@ -1181,7 +1181,7 @@
      * the first thing in the file.
      */
     if (lseek(fd, 0, SEEK_SET) != 0) {
-        LOGE("DexOpt: failed to seek to start of file: %s", strerror(errno));
+        ALOGE("DexOpt: failed to seek to start of file: %s", strerror(errno));
         goto bail;
     }
 
@@ -1191,10 +1191,10 @@
      */
     actual = read(fd, &optHdr, sizeof(optHdr));
     if (actual < 0) {
-        LOGE("DexOpt: failed reading opt header: %s", strerror(errno));
+        ALOGE("DexOpt: failed reading opt header: %s", strerror(errno));
         goto bail;
     } else if (actual != sizeof(optHdr)) {
-        LOGE("DexOpt: failed reading opt header (got %d of %zd)",
+        ALOGE("DexOpt: failed reading opt header (got %d of %zd)",
             (int) actual, sizeof(optHdr));
         goto bail;
     }
@@ -1404,7 +1404,7 @@
         int len = strlen(cacheFileName) +1;
 
         if (ptr + 4 + len + kSHA1DigestLen > buf + bufLen) {
-            LOGE("DexOpt: overran buffer");
+            ALOGE("DexOpt: overran buffer");
             dvmAbort();
         }
 
@@ -1519,7 +1519,7 @@
     uLong adler;
 
     if (lseek(fd, start, SEEK_SET) != start) {
-        LOGE("Unable to seek to start of checksum area (%ld): %s",
+        ALOGE("Unable to seek to start of checksum area (%ld): %s",
             (long) start, strerror(errno));
         return false;
     }
@@ -1530,7 +1530,7 @@
         size_t wanted = (length < sizeof(readBuf)) ? length : sizeof(readBuf);
         actual = read(fd, readBuf, wanted);
         if (actual <= 0) {
-            LOGE("Read failed (%d) while computing checksum (len=%zu): %s",
+            ALOGE("Read failed (%d) while computing checksum (len=%zu): %s",
                 (int) actual, length, strerror(errno));
             return false;
         }
diff --git a/vm/analysis/DexVerify.cpp b/vm/analysis/DexVerify.cpp
index 82d6847..c47c301 100644
--- a/vm/analysis/DexVerify.cpp
+++ b/vm/analysis/DexVerify.cpp
@@ -1179,7 +1179,7 @@
         case OP_UNUSED_79:
         case OP_UNUSED_7A:
         case OP_UNUSED_FF:
-            LOGE("VFY: unexpected opcode %04x", decInsn.opcode);
+            ALOGE("VFY: unexpected opcode %04x", decInsn.opcode);
             okay = false;
             break;
 
diff --git a/vm/analysis/Optimize.cpp b/vm/analysis/Optimize.cpp
index 9e299f3..953924e 100644
--- a/vm/analysis/Optimize.cpp
+++ b/vm/analysis/Optimize.cpp
@@ -80,7 +80,7 @@
              * Not expected.  We only use this for key methods in core
              * classes, so we should always be able to find them.
              */
-            LOGE("Unable to find method for inlining: %s.%s:%s",
+            ALOGE("Unable to find method for inlining: %s.%s:%s",
                 ops[i].classDescriptor, ops[i].methodName,
                 ops[i].methodSignature);
             return false;
diff --git a/vm/analysis/RegisterMap.cpp b/vm/analysis/RegisterMap.cpp
index 742bb12..c62ec47 100644
--- a/vm/analysis/RegisterMap.cpp
+++ b/vm/analysis/RegisterMap.cpp
@@ -197,7 +197,7 @@
     int bufSize;
 
     if (vdata->method->registersSize >= 2048) {
-        LOGE("ERROR: register map can't handle %d registers",
+        ALOGE("ERROR: register map can't handle %d registers",
             vdata->method->registersSize);
         goto bail;
     }
@@ -231,7 +231,7 @@
     }
     if (gcPointCount >= 65536) {
         /* we could handle this, but in practice we don't get near this */
-        LOGE("ERROR: register map can't handle %d gc points in one method",
+        ALOGE("ERROR: register map can't handle %d gc points in one method",
             gcPointCount);
         goto bail;
     }
@@ -294,7 +294,7 @@
             RegisterMap* pUncompMap;
             pUncompMap = uncompressMapDifferential(pCompMap);
             if (pUncompMap == NULL) {
-                LOGE("Map failed to uncompress - %s.%s",
+                ALOGE("Map failed to uncompress - %s.%s",
                     vdata->method->clazz->descriptor,
                     vdata->method->name);
                 free(pCompMap);
@@ -302,7 +302,7 @@
                 dvmAbort();
             } else {
                 if (compareMaps(pMap, pUncompMap) != 0) {
-                    LOGE("Map comparison failed - %s.%s",
+                    ALOGE("Map comparison failed - %s.%s",
                         vdata->method->clazz->descriptor,
                         vdata->method->name);
                     free(pCompMap);
@@ -413,7 +413,7 @@
         break;
     default:
         /* can't happen */
-        LOGE("Can only dump Compact8 / Compact16 maps (not %d)", format);
+        ALOGE("Can only dump Compact8 / Compact16 maps (not %d)", format);
         return;
     }
 
@@ -488,7 +488,7 @@
     }
 
     if ((vdata->method->registersSize + 7) / 8 != pMap->regWidth) {
-        LOGE("GLITCH: registersSize=%d, regWidth=%d",
+        ALOGE("GLITCH: registersSize=%d, regWidth=%d",
             vdata->method->registersSize, pMap->regWidth);
         return false;
     }
@@ -506,13 +506,13 @@
             break;
         default:
             /* shouldn't happen */
-            LOGE("GLITCH: bad format (%d)", format);
+            ALOGE("GLITCH: bad format (%d)", format);
             dvmAbort();
         }
 
         const RegType* regs = vdata->registerLines[addr].regTypes;
         if (regs == NULL) {
-            LOGE("GLITCH: addr %d has no data", addr);
+            ALOGE("GLITCH: addr %d has no data", addr);
             return false;
         }
 
@@ -534,7 +534,7 @@
             regIsRef = isReferenceType(type);
 
             if (bitIsRef != regIsRef) {
-                LOGE("GLITCH: addr %d reg %d: bit=%d reg=%d(%d)",
+                ALOGE("GLITCH: addr %d reg %d: bit=%d reg=%d(%d)",
                     addr, i, bitIsRef, regIsRef, type);
                 return false;
             }
@@ -590,7 +590,7 @@
             return len + (ptr - (u1*) pMap);
         }
     default:
-        LOGE("Bad register map format %d", format);
+        ALOGE("Bad register map format %d", format);
         dvmAbort();
         return 0;
     }
@@ -644,7 +644,7 @@
 
     /* artificial limit */
     if (clazz->virtualMethodCount + clazz->directMethodCount >= 65536) {
-        LOGE("Too many methods in %s", clazz->descriptor);
+        ALOGE("Too many methods in %s", clazz->descriptor);
         return false;
     }
 
@@ -764,7 +764,7 @@
 
     if (ptr - basePtr >= (int)length) {
         /* a bit late */
-        LOGE("Buffer overrun");
+        ALOGE("Buffer overrun");
         dvmAbort();
     }
 
@@ -849,7 +849,7 @@
         return NULL;
 
     if (classIdx >= pClassPool->numClasses) {
-        LOGE("bad class index (%d vs %d)", classIdx, pClassPool->numClasses);
+        ALOGE("bad class index (%d vs %d)", classIdx, pClassPool->numClasses);
         dvmAbort();
     }
 
@@ -910,7 +910,7 @@
         addrWidth = 2;
         break;
     default:
-        LOGE("Unknown format %d", format);
+        ALOGE("Unknown format %d", format);
         dvmAbort();
         return NULL;
     }
@@ -1012,7 +1012,7 @@
     /* (if we use this at a time other than during GC, fix/remove this test) */
     if (true) {
         if (!gDvm.zygote && dvmTryLockMutex(&gDvm.gcHeapLock) == 0) {
-            LOGE("GLITCH: dvmGetExpandedRegisterMap not called at GC time");
+            ALOGE("GLITCH: dvmGetExpandedRegisterMap not called at GC time");
             dvmAbort();
         }
     }
@@ -1035,13 +1035,13 @@
         newMap = uncompressMapDifferential(curMap);
         break;
     default:
-        LOGE("Unknown format %d in dvmGetExpandedRegisterMap", format);
+        ALOGE("Unknown format %d in dvmGetExpandedRegisterMap", format);
         dvmAbort();
         newMap = NULL;      // make gcc happy
     }
 
     if (newMap == NULL) {
-        LOGE("Map failed to uncompress (fmt=%d) %s.%s",
+        ALOGE("Map failed to uncompress (fmt=%d) %s.%s",
             format, method->clazz->descriptor, method->name);
         return NULL;
     }
@@ -1265,7 +1265,7 @@
             break;
         default:
             /* shouldn't happen */
-            LOGE("GLITCH: bad format (%d)", format);
+            ALOGE("GLITCH: bad format (%d)", format);
             dvmAbort();
         }
 
@@ -1282,7 +1282,7 @@
             int addrDiff = addr - prevAddr;
 
             if (addrDiff < 0) {
-                LOGE("GLITCH: address went backward (0x%04x->0x%04x, %s.%s)",
+                ALOGE("GLITCH: address went backward (0x%04x->0x%04x, %s.%s)",
                     prevAddr, addr, method->clazz->descriptor, method->name);
             } else if (addrDiff > kMaxGcPointGap) {
                 if (REGISTER_MAP_VERBOSE) {
@@ -1331,14 +1331,14 @@
 
                         if (bitNum >= method->registersSize) {
                             /* stuff off the end should be zero in both */
-                            LOGE("WEIRD: bit=%d (%d/%d), prev=%02x cur=%02x",
+                            ALOGE("WEIRD: bit=%d (%d/%d), prev=%02x cur=%02x",
                                 bit, regByte, method->registersSize,
                                 prev, cur);
                             assert(false);
                         }
                         int idx = (int) (bitNum * div);
                         if (!(idx >= 0 && idx < kNumUpdatePosns)) {
-                            LOGE("FAIL: bitNum=%d (of %d) div=%.3f idx=%d",
+                            ALOGE("FAIL: bitNum=%d (of %d) div=%.3f idx=%d",
                                 bitNum, method->registersSize, div, idx);
                             assert(false);
                         }
@@ -1464,7 +1464,7 @@
         addrWidth = 2;
         break;
     default:
-        LOGE("ERROR: can't compress map with format=%d", format);
+        ALOGE("ERROR: can't compress map with format=%d", format);
         return NULL;
     }
 
@@ -1700,7 +1700,7 @@
     int regWidth, numEntries, newAddrWidth, newMapSize;
 
     if (format != kRegMapFormatDifferential) {
-        LOGE("Not differential (%d)", format);
+        ALOGE("Not differential (%d)", format);
         return NULL;
     }
 
@@ -1811,14 +1811,14 @@
     }
 
     if (dstPtr - (u1*) pNewMap != newMapSize) {
-        LOGE("ERROR: output %d bytes, expected %d",
+        ALOGE("ERROR: output %d bytes, expected %d",
             dstPtr - (u1*) pNewMap, newMapSize);
         free(pNewMap);
         return NULL;
     }
 
     if (srcPtr - srcStart != expectedSrcLen) {
-        LOGE("ERROR: consumed %d bytes, expected %d",
+        ALOGE("ERROR: consumed %d bytes, expected %d",
             srcPtr - srcStart, expectedSrcLen);
         free(pNewMap);
         return NULL;
diff --git a/vm/analysis/VerifySubs.cpp b/vm/analysis/VerifySubs.cpp
index 2651c68..7240dd0 100644
--- a/vm/analysis/VerifySubs.cpp
+++ b/vm/analysis/VerifySubs.cpp
@@ -80,7 +80,7 @@
 
     std::string dotMissingClass = dvmHumanReadableDescriptor(missingClassDescr);
     std::string dotFromClass = dvmHumanReadableDescriptor(meth->clazz->descriptor);
-    LOGE("Could not find class '%s', referenced from method %s.%s",
+    ALOGE("Could not find class '%s', referenced from method %s.%s",
             dotMissingClass.c_str(), dotFromClass.c_str(), meth->name);
 }
 
diff --git a/vm/arch/generic/Call.cpp b/vm/arch/generic/Call.cpp
index c23e7c8..ed239d4 100644
--- a/vm/arch/generic/Call.cpp
+++ b/vm/arch/generic/Call.cpp
@@ -41,7 +41,7 @@
     case '[':
     case 'L': return &ffi_type_pointer;
     default:
-        LOGE("bad ffitype 0x%02x", sigType);
+        ALOGE("bad ffitype 0x%02x", sigType);
         dvmAbort();
         return NULL;
     }
@@ -104,7 +104,7 @@
      * Prep the CIF (Call InterFace object).
      */
     if (ffi_prep_cif(&cif, FFI_DEFAULT_ABI, dstArg, retType, types) != FFI_OK) {
-        LOGE("ffi_prep_cif failed");
+        ALOGE("ffi_prep_cif failed");
         dvmAbort();
     }
 
diff --git a/vm/compiler/Compiler.cpp b/vm/compiler/Compiler.cpp
index 4236d53..b9b3105 100644
--- a/vm/compiler/Compiler.cpp
+++ b/vm/compiler/Compiler.cpp
@@ -68,7 +68,7 @@
         if (!success) {
             retries++;
             if (retries > ENQUEUE_MAX_RETRIES) {
-                LOGE("JIT: compiler queue wedged - forcing reset");
+                ALOGE("JIT: compiler queue wedged - forcing reset");
                 gDvmJit.codeCacheFull = true;  // Force reset
                 success = true;  // Because we'll drop the order now anyway
             } else {
@@ -169,7 +169,7 @@
     /* Allocate the code cache */
     fd = ashmem_create_region("dalvik-jit-code-cache", gDvmJit.codeCacheSize);
     if (fd < 0) {
-        LOGE("Could not create %u-byte ashmem region for the JIT code cache",
+        ALOGE("Could not create %u-byte ashmem region for the JIT code cache",
              gDvmJit.codeCacheSize);
         return false;
     }
@@ -178,7 +178,7 @@
                              MAP_PRIVATE , fd, 0);
     close(fd);
     if (gDvmJit.codeCache == MAP_FAILED) {
-        LOGE("Failed to mmap the JIT code cache: %s", strerror(errno));
+        ALOGE("Failed to mmap the JIT code cache: %s", strerror(errno));
         return false;
     }
 
@@ -213,7 +213,7 @@
                           PROTECT_CODE_CACHE_ATTRS);
 
     if (result == -1) {
-        LOGE("Failed to remove the write permission for the code cache");
+        ALOGE("Failed to remove the write permission for the code cache");
         dvmAbort();
     }
 
@@ -418,7 +418,7 @@
     pJitTable = (JitEntry*)
                 calloc(gDvmJit.jitTableSize, sizeof(*pJitTable));
     if (!pJitTable) {
-        LOGE("jit table allocation failed");
+        ALOGE("jit table allocation failed");
         dvmUnlockMutex(&gDvmJit.tableLock);
         goto fail;
     }
@@ -432,7 +432,7 @@
      */
     pJitProfTable = (unsigned char *)malloc(JIT_PROF_SIZE);
     if (!pJitProfTable) {
-        LOGE("jit prof table allocation failed");
+        ALOGE("jit prof table allocation failed");
         free(pJitProfTable);
         dvmUnlockMutex(&gDvmJit.tableLock);
         goto fail;
@@ -448,7 +448,7 @@
     pJitTraceProfCounters = (JitTraceProfCounters*)
                              calloc(1, sizeof(*pJitTraceProfCounters));
     if (!pJitTraceProfCounters) {
-        LOGE("jit trace prof counters allocation failed");
+        ALOGE("jit trace prof counters allocation failed");
         dvmUnlockMutex(&gDvmJit.tableLock);
         goto fail;
     }
diff --git a/vm/compiler/Dataflow.cpp b/vm/compiler/Dataflow.cpp
index e4d0e41..7bed839 100644
--- a/vm/compiler/Dataflow.cpp
+++ b/vm/compiler/Dataflow.cpp
@@ -864,7 +864,7 @@
                 offset = (int) insn->vA;
                 break;
             default:
-                LOGE("Unexpected branch format %d / opcode %#x", dalvikFormat,
+                ALOGE("Unexpected branch format %d / opcode %#x", dalvikFormat,
                      opcode);
                 dvmAbort();
                 break;
@@ -974,7 +974,7 @@
                 delta = (int) insn->vA;
                 break;
             default:
-                LOGE("Unexpected branch format: %d", dalvikFormat);
+                ALOGE("Unexpected branch format: %d", dalvikFormat);
                 dvmAbort();
                 break;
         }
diff --git a/vm/compiler/Frontend.cpp b/vm/compiler/Frontend.cpp
index 176983e..a36eedb 100644
--- a/vm/compiler/Frontend.cpp
+++ b/vm/compiler/Frontend.cpp
@@ -357,22 +357,22 @@
 #if 0
     /* Uncomment the following to explore various callee patterns */
     if (attributes & METHOD_IS_THROW_FREE) {
-        LOGE("%s%s is inlinable%s", method->clazz->descriptor, method->name,
+        ALOGE("%s%s is inlinable%s", method->clazz->descriptor, method->name,
              (attributes & METHOD_IS_EMPTY) ? " empty" : "");
     }
 
     if (attributes & METHOD_IS_LEAF) {
-        LOGE("%s%s is leaf %d%s", method->clazz->descriptor, method->name,
+        ALOGE("%s%s is leaf %d%s", method->clazz->descriptor, method->name,
              insnSize, insnSize < 5 ? " (small)" : "");
     }
 
     if (attributes & (METHOD_IS_GETTER | METHOD_IS_SETTER)) {
-        LOGE("%s%s is %s", method->clazz->descriptor, method->name,
+        ALOGE("%s%s is %s", method->clazz->descriptor, method->name,
              attributes & METHOD_IS_GETTER ? "getter": "setter");
     }
     if (attributes ==
         (METHOD_IS_LEAF | METHOD_IS_THROW_FREE | METHOD_IS_CALLEE)) {
-        LOGE("%s%s is inlinable non setter/getter", method->clazz->descriptor,
+        ALOGE("%s%s is inlinable non setter/getter", method->clazz->descriptor,
              method->name);
     }
 #endif
@@ -519,7 +519,7 @@
         insn = insn->next;
     }
     if (insn == NULL) {
-        LOGE("Break split failed");
+        ALOGE("Break split failed");
         dvmAbort();
     }
     BasicBlock *bottomBlock = dvmCompilerNewBB(kDalvikByteCode,
@@ -814,7 +814,7 @@
             dvmGetBlockName(bb, blockName1);
             dvmGetBlockName(predBB, blockName2);
             dvmDumpCFG(cUnit, "/sdcard/cfg/");
-            LOGE("Successor %s not found from %s",
+            ALOGE("Successor %s not found from %s",
                  blockName1, blockName2);
             dvmAbort();
         }
@@ -909,7 +909,7 @@
             target += (int) insn->dalvikInsn.vB;
             break;
         default:
-            LOGE("Unexpected opcode(%d) with kInstrCanBranch set",
+            ALOGE("Unexpected opcode(%d) with kInstrCanBranch set",
                  insn->dalvikInsn.opcode);
             dvmAbort();
     }
@@ -999,7 +999,7 @@
     }
 
     if (curBlock->successorBlockList.blockListType != kNotUsed) {
-        LOGE("Successor block list already in use: %d",
+        ALOGE("Successor block list already in use: %d",
              curBlock->successorBlockList.blockListType);
         dvmAbort();
     }
@@ -1050,13 +1050,13 @@
         DexCatchIterator iterator;
 
         if (!dexFindCatchHandler(&iterator, dexCode, curOffset)) {
-            LOGE("Catch block not found in dexfile for insn %x in %s",
+            ALOGE("Catch block not found in dexfile for insn %x in %s",
                  curOffset, method->name);
             dvmAbort();
 
         }
         if (curBlock->successorBlockList.blockListType != kNotUsed) {
-            LOGE("Successor block list already in use: %d",
+            ALOGE("Successor block list already in use: %d",
                  curBlock->successorBlockList.blockListType);
             dvmAbort();
         }
diff --git a/vm/compiler/InlineTransformation.cpp b/vm/compiler/InlineTransformation.cpp
index 53278a7..650340c 100644
--- a/vm/compiler/InlineTransformation.cpp
+++ b/vm/compiler/InlineTransformation.cpp
@@ -73,7 +73,7 @@
 
     /* Expecting vA to be the destination register */
     if (dfFlags & (DF_UA | DF_UA_WIDE)) {
-        LOGE("opcode %d has DF_UA set (not expected)", getterInsn.opcode);
+        ALOGE("opcode %d has DF_UA set (not expected)", getterInsn.opcode);
         dvmAbort();
     }
 
diff --git a/vm/compiler/Loop.cpp b/vm/compiler/Loop.cpp
index 90c97d7..50e7c48 100644
--- a/vm/compiler/Loop.cpp
+++ b/vm/compiler/Loop.cpp
@@ -26,11 +26,11 @@
 static void dumpConstants(CompilationUnit *cUnit)
 {
     int i;
-    LOGE("LOOP starting offset: %x", cUnit->entryBlock->startOffset);
+    ALOGE("LOOP starting offset: %x", cUnit->entryBlock->startOffset);
     for (i = 0; i < cUnit->numSSARegs; i++) {
         if (dvmIsBitSet(cUnit->isConstantV, i)) {
             int subNReg = dvmConvertSSARegToDalvik(cUnit, i);
-            LOGE("CONST: s%d(v%d_%d) has %d", i,
+            ALOGE("CONST: s%d(v%d_%d) has %d", i,
                  DECODE_REG(subNReg), DECODE_SUB(subNReg),
                  cUnit->constantValues[i]);
         }
@@ -48,7 +48,7 @@
         int iv = dvmConvertSSARegToDalvik(cUnit, ivInfo->ssaReg);
         /* Basic IV */
         if (ivInfo->ssaReg == ivInfo->basicSSAReg) {
-            LOGE("BIV %d: s%d(v%d_%d) + %d", i,
+            ALOGE("BIV %d: s%d(v%d_%d) + %d", i,
                  ivInfo->ssaReg,
                  DECODE_REG(iv), DECODE_SUB(iv),
                  ivInfo->inc);
@@ -56,7 +56,7 @@
         } else {
             int biv = dvmConvertSSARegToDalvik(cUnit, ivInfo->basicSSAReg);
 
-            LOGE("DIV %d: s%d(v%d_%d) = %d * s%d(v%d_%d) + %d", i,
+            ALOGE("DIV %d: s%d(v%d_%d) = %d * s%d(v%d_%d) + %d", i,
                  ivInfo->ssaReg,
                  DECODE_REG(iv), DECODE_SUB(iv),
                  ivInfo->m,
@@ -80,13 +80,13 @@
             dvmConvertSSARegToDalvik(cUnit, arrayAccessInfo->arrayReg));
         int idxReg = DECODE_REG(
             dvmConvertSSARegToDalvik(cUnit, arrayAccessInfo->ivReg));
-        LOGE("Array access %d", i);
-        LOGE("  arrayReg %d", arrayReg);
-        LOGE("  idxReg %d", idxReg);
-        LOGE("  endReg %d", loopAnalysis->endConditionReg);
-        LOGE("  maxC %d", arrayAccessInfo->maxC);
-        LOGE("  minC %d", arrayAccessInfo->minC);
-        LOGE("  opcode %d", loopAnalysis->loopBranchOpcode);
+        ALOGE("Array access %d", i);
+        ALOGE("  arrayReg %d", arrayReg);
+        ALOGE("  idxReg %d", idxReg);
+        ALOGE("  endReg %d", loopAnalysis->endConditionReg);
+        ALOGE("  maxC %d", arrayAccessInfo->maxC);
+        ALOGE("  minC %d", arrayAccessInfo->minC);
+        ALOGE("  opcode %d", loopAnalysis->loopBranchOpcode);
     }
 }
 
@@ -149,7 +149,7 @@
         case OP_IF_LEZ:
             return OP_IF_GTZ;
         default:
-            LOGE("opcode %d cannot be negated", opcode);
+            ALOGE("opcode %d cannot be negated", opcode);
             dvmAbort();
             break;
     }
@@ -391,7 +391,7 @@
                     break;
                 default:
                     refIdx = 0;
-                    LOGE("Jit: bad case in doLoopBodyCodeMotion");
+                    ALOGE("Jit: bad case in doLoopBodyCodeMotion");
                     dvmCompilerAbort(cUnit);
             }
 
@@ -504,7 +504,7 @@
                     dvmCompilerAppendMIR(entry, boundCheckMIR);
                 }
             } else {
-                LOGE("Jit: bad case in genHoistedChecks");
+                ALOGE("Jit: bad case in genHoistedChecks");
                 dvmCompilerAbort(cUnit);
             }
         }
diff --git a/vm/compiler/SSATransformation.cpp b/vm/compiler/SSATransformation.cpp
index 542fff5..7dde594 100644
--- a/vm/compiler/SSATransformation.cpp
+++ b/vm/compiler/SSATransformation.cpp
@@ -366,7 +366,7 @@
         dest->storageSize != src2->storageSize ||
         dest->expandable != src1->expandable ||
         dest->expandable != src2->expandable) {
-        LOGE("Incompatible set properties");
+        ALOGE("Incompatible set properties");
         dvmAbort();
     }
 
diff --git a/vm/compiler/Utility.cpp b/vm/compiler/Utility.cpp
index b455301..2fe94d2 100644
--- a/vm/compiler/Utility.cpp
+++ b/vm/compiler/Utility.cpp
@@ -27,7 +27,7 @@
     arenaHead =
         (ArenaMemBlock *) malloc(sizeof(ArenaMemBlock) + ARENA_DEFAULT_SIZE);
     if (arenaHead == NULL) {
-        LOGE("No memory left to create compiler heap memory");
+        ALOGE("No memory left to create compiler heap memory");
         return false;
     }
     arenaHead->blockSize = ARENA_DEFAULT_SIZE;
@@ -69,7 +69,7 @@
         ArenaMemBlock *newArena = (ArenaMemBlock *)
             malloc(sizeof(ArenaMemBlock) + blockSize);
         if (newArena == NULL) {
-            LOGE("Arena allocation failure");
+            ALOGE("Arena allocation failure");
             dvmAbort();
         }
         newArena->blockSize = blockSize;
@@ -326,7 +326,7 @@
 bool dvmCompilerClearBit(BitVector *pBits, unsigned int num)
 {
     if (num >= pBits->storageSize * sizeof(u4) * 8) {
-        LOGE("Trying to clear a bit that is not set in the vector yet!");
+        ALOGE("Trying to clear a bit that is not set in the vector yet!");
         dvmAbort();
     }
 
@@ -347,17 +347,17 @@
 {
     int i;
 
-    LOGE("%s", msg);
+    ALOGE("%s", msg);
     for (i = 0; i < length; i++) {
         if (dvmIsBitSet(bv, i)) {
-            LOGE("    Bit %d is set", i);
+            ALOGE("    Bit %d is set", i);
         }
     }
 }
 
 void dvmCompilerAbort(CompilationUnit *cUnit)
 {
-    LOGE("Jit: aborting trace compilation, reverting to interpreter");
+    ALOGE("Jit: aborting trace compilation, reverting to interpreter");
     /* Force a traceback in debug builds */
     assert(0);
     /*
@@ -372,14 +372,14 @@
 {
     int i;
 
-    LOGE("%s", msg);
+    ALOGE("%s", msg);
     for (i = 0; i < length; i++) {
         if (dvmIsBitSet(bv, i)) {
             BasicBlock *bb =
                 (BasicBlock *) dvmGrowableListGetElement(blocks, i);
             char blockName[BLOCK_NAME_LEN];
             dvmGetBlockName(bb, blockName);
-            LOGE("Bit %d / %s is set", i, blockName);
+            ALOGE("Bit %d / %s is set", i, blockName);
         }
     }
 }
diff --git a/vm/compiler/codegen/RallocUtil.cpp b/vm/compiler/codegen/RallocUtil.cpp
index 27d1f05..f4a46f0 100644
--- a/vm/compiler/codegen/RallocUtil.cpp
+++ b/vm/compiler/codegen/RallocUtil.cpp
@@ -71,13 +71,13 @@
 static void dumpRegPool(RegisterInfo *p, int numRegs)
 {
     int i;
-    LOGE("================================================");
+    ALOGE("================================================");
     for (i=0; i < numRegs; i++ ){
-        LOGE("R[%d]: U:%d, P:%d, part:%d, LV:%d, D:%d, SR:%d, ST:%x, EN:%x",
+        ALOGE("R[%d]: U:%d, P:%d, part:%d, LV:%d, D:%d, SR:%d, ST:%x, EN:%x",
            p[i].reg, p[i].inUse, p[i].pair, p[i].partner, p[i].live,
            p[i].dirty, p[i].sReg,(int)p[i].defStart, (int)p[i].defEnd);
     }
-    LOGE("================================================");
+    ALOGE("================================================");
 }
 
 static RegisterInfo *getRegInfo(CompilationUnit *cUnit, int reg)
@@ -97,7 +97,7 @@
             return &p[i];
         }
     }
-    LOGE("Tried to get info on a non-existant temp: r%d",reg);
+    ALOGE("Tried to get info on a non-existant temp: r%d",reg);
     dvmCompilerAbort(cUnit);
     return NULL;
 }
@@ -223,7 +223,7 @@
         next++;
     }
     if (required) {
-        LOGE("No free temp registers");
+        ALOGE("No free temp registers");
         dvmCompilerAbort(cUnit);
     }
     return -1;  // No register available
@@ -272,7 +272,7 @@
         }
         next += 2;
     }
-    LOGE("No free temp registers");
+    ALOGE("No free temp registers");
     dvmCompilerAbort(cUnit);
     return -1;
 }
@@ -333,7 +333,7 @@
                                 cUnit->regPool->numFPTemps, sReg);
             break;
         default:
-            LOGE("Invalid register type");
+            ALOGE("Invalid register type");
             dvmCompilerAbort(cUnit);
     }
     return res;
@@ -360,7 +360,7 @@
             return;
         }
     }
-    LOGE("Tried to free a non-existant temp: r%d",reg);
+    ALOGE("Tried to free a non-existant temp: r%d",reg);
     dvmCompilerAbort(cUnit);
 }
 
@@ -430,7 +430,7 @@
             return;
         }
     }
-    LOGE("Tried to lock a non-existant temp: r%d",reg);
+    ALOGE("Tried to lock a non-existant temp: r%d",reg);
     dvmCompilerAbort(cUnit);
 }
 
diff --git a/vm/compiler/codegen/arm/ArchFactory.cpp b/vm/compiler/codegen/arm/ArchFactory.cpp
index 5a03b17..2daa7bc 100644
--- a/vm/compiler/codegen/arm/ArchFactory.cpp
+++ b/vm/compiler/codegen/arm/ArchFactory.cpp
@@ -40,7 +40,7 @@
             branch->generic.target = (LIR *) exceptionLabel;
             return exceptionLabel;
         } else {
-            LOGE("Catch blocks not handled yet");
+            ALOGE("Catch blocks not handled yet");
             dvmAbort();
             return NULL;
         }
diff --git a/vm/compiler/codegen/arm/Assemble.cpp b/vm/compiler/codegen/arm/Assemble.cpp
index 09d2bc1..9842eaf 100644
--- a/vm/compiler/codegen/arm/Assemble.cpp
+++ b/vm/compiler/codegen/arm/Assemble.cpp
@@ -958,7 +958,7 @@
             intptr_t target = lirTarget->generic.offset;
             int delta = target - pc;
             if (delta & 0x3) {
-                LOGE("PC-rel distance is not multiples of 4: %d", delta);
+                ALOGE("PC-rel distance is not multiples of 4: %d", delta);
                 dvmCompilerAbort(cUnit);
             }
             if ((lir->opcode == kThumb2LdrPcRel12) && (delta > 4091)) {
@@ -1035,7 +1035,7 @@
             intptr_t target = targetLIR->generic.offset;
             int delta = target - pc;
             if (delta > 2046 || delta < -2048) {
-                LOGE("Unconditional branch distance out of range: %d", delta);
+                ALOGE("Unconditional branch distance out of range: %d", delta);
                 dvmCompilerAbort(cUnit);
             }
             lir->operands[0] = delta >> 1;
@@ -1437,7 +1437,7 @@
     /* Allocate enough space for the code block */
     cUnit->codeBuffer = (unsigned char *)dvmCompilerNew(chainCellOffset, true);
     if (cUnit->codeBuffer == NULL) {
-        LOGE("Code buffer allocation failure");
+        ALOGE("Code buffer allocation failure");
         info->discardResult = true;
         return;
     }
@@ -1467,7 +1467,7 @@
         case kRetryHalve:
             return;
         default:
-             LOGE("Unexpected assembler status: %d", cUnit->assemblerStatus);
+             ALOGE("Unexpected assembler status: %d", cUnit->assemblerStatus);
              dvmAbort();
     }
 
@@ -1939,7 +1939,7 @@
                     predChainCell->clazz = PREDICTED_CHAIN_CLAZZ_INIT;
                     break;
                 default:
-                    LOGE("Unexpected chaining type: %d", i);
+                    ALOGE("Unexpected chaining type: %d", i);
                     dvmAbort();  // dvmAbort OK here - can't safely recover
             }
             COMPILER_TRACE_CHAINING(
@@ -2418,7 +2418,7 @@
             data = *((u4*) addr);
             break;
         default:
-            LOGE("*** ERROR: BAD SIZE IN selfVerificationLoad: %d", size);
+            ALOGE("*** ERROR: BAD SIZE IN selfVerificationLoad: %d", size);
             data = 0;
             dvmAbort();
     }
@@ -2498,7 +2498,7 @@
             *((u4*) addr) = data;
             break;
         default:
-            LOGE("*** ERROR: BAD SIZE IN selfVerificationSave: %d", size);
+            ALOGE("*** ERROR: BAD SIZE IN selfVerificationSave: %d", size);
             dvmAbort();
     }
 }
@@ -2712,7 +2712,7 @@
                     if (insn & 0x400000) rt |= 0x10;
                     rt = rt << 1;
                 } else {
-                    LOGE("*** ERROR: UNRECOGNIZED VECTOR MEM OP: %x", opcode4);
+                    ALOGE("*** ERROR: UNRECOGNIZED VECTOR MEM OP: %x", opcode4);
                     dvmAbort();
                 }
                 rt += 14;
@@ -2745,7 +2745,7 @@
                 offset = 0;
                 break;
             default:
-                LOGE("*** ERROR: UNRECOGNIZED THUMB2 MEM OP: %x", opcode12);
+                ALOGE("*** ERROR: UNRECOGNIZED THUMB2 MEM OP: %x", opcode12);
                 offset = 0;
                 dvmAbort();
         }
@@ -2895,7 +2895,7 @@
                 offset = 0;
                 break;
             default:
-                LOGE("*** ERROR: UNRECOGNIZED THUMB MEM OP: %x", opcode5);
+                ALOGE("*** ERROR: UNRECOGNIZED THUMB MEM OP: %x", opcode5);
                 offset = 0;
                 dvmAbort();
         }
diff --git a/vm/compiler/codegen/arm/CodegenCommon.cpp b/vm/compiler/codegen/arm/CodegenCommon.cpp
index ae41fe9..07f3ac7 100644
--- a/vm/compiler/codegen/arm/CodegenCommon.cpp
+++ b/vm/compiler/codegen/arm/CodegenCommon.cpp
@@ -62,7 +62,7 @@
             *maskPtr |= ENCODE_MUST_NOT_ALIAS;
             break;
         default:
-            LOGE("Jit: invalid memref kind - %d", memType);
+            ALOGE("Jit: invalid memref kind - %d", memType);
             assert(0);  // Bail if debug build, set worst-case in the field
             *maskPtr |= ENCODE_ALL;
     }
@@ -302,7 +302,7 @@
 {
     ArmLIR *insn = (ArmLIR *) dvmCompilerNew(sizeof(ArmLIR), true);
     if (!(EncodingMap[opcode].flags & IS_TERTIARY_OP)) {
-        LOGE("Bad LIR3: %s[%d]",EncodingMap[opcode].name,opcode);
+        ALOGE("Bad LIR3: %s[%d]",EncodingMap[opcode].name,opcode);
     }
     assert(isPseudoOpcode(opcode) ||
            (EncodingMap[opcode].flags & IS_TERTIARY_OP));
diff --git a/vm/compiler/codegen/arm/CodegenDriver.cpp b/vm/compiler/codegen/arm/CodegenDriver.cpp
index 57fd388..d7017b0 100644
--- a/vm/compiler/codegen/arm/CodegenDriver.cpp
+++ b/vm/compiler/codegen/arm/CodegenDriver.cpp
@@ -738,7 +738,7 @@
             return false;
         }
         default:
-            LOGE("Invalid long arith op");
+            ALOGE("Invalid long arith op");
             dvmCompilerAbort(cUnit);
     }
     if (!callOut) {
@@ -840,7 +840,7 @@
             op = kOpLsr;
             break;
         default:
-            LOGE("Invalid word arith op: %#x(%d)",
+            ALOGE("Invalid word arith op: %#x(%d)",
                  mir->dalvikInsn.opcode, mir->dalvikInsn.opcode);
             dvmCompilerAbort(cUnit);
     }
@@ -1477,7 +1477,7 @@
 {
     Opcode dalvikOpcode = mir->dalvikInsn.opcode;
     if ((dalvikOpcode >= OP_UNUSED_3E) && (dalvikOpcode <= OP_UNUSED_43)) {
-        LOGE("Codegen: got unused opcode %#x",dalvikOpcode);
+        ALOGE("Codegen: got unused opcode %#x",dalvikOpcode);
         return true;
     }
     switch (dalvikOpcode) {
@@ -1491,7 +1491,7 @@
         case OP_UNUSED_79:
         case OP_UNUSED_7A:
         case OP_UNUSED_FF:
-            LOGE("Codegen: got unused opcode %#x",dalvikOpcode);
+            ALOGE("Codegen: got unused opcode %#x",dalvikOpcode);
             return true;
         case OP_NOP:
             break;
@@ -1586,7 +1586,7 @@
 
             if (strPtr == NULL) {
                 BAIL_LOOP_COMPILATION();
-                LOGE("Unexpected null string");
+                ALOGE("Unexpected null string");
                 dvmAbort();
             }
 
@@ -1602,7 +1602,7 @@
 
             if (classPtr == NULL) {
                 BAIL_LOOP_COMPILATION();
-                LOGE("Unexpected null class");
+                ALOGE("Unexpected null class");
                 dvmAbort();
             }
 
@@ -1630,7 +1630,7 @@
 
             if (fieldPtr == NULL) {
                 BAIL_LOOP_COMPILATION();
-                LOGE("Unexpected null static field");
+                ALOGE("Unexpected null static field");
                 dvmAbort();
             }
 
@@ -1674,7 +1674,7 @@
 
             if (fieldPtr == NULL) {
                 BAIL_LOOP_COMPILATION();
-                LOGE("Unexpected null static field");
+                ALOGE("Unexpected null static field");
                 dvmAbort();
             }
 
@@ -1711,7 +1711,7 @@
 
             if (fieldPtr == NULL) {
                 BAIL_LOOP_COMPILATION();
-                LOGE("Unexpected null static field");
+                ALOGE("Unexpected null static field");
                 dvmAbort();
             }
 
@@ -1761,7 +1761,7 @@
 
             if (fieldPtr == NULL) {
                 BAIL_LOOP_COMPILATION();
-                LOGE("Unexpected null static field");
+                ALOGE("Unexpected null static field");
                 dvmAbort();
             }
 
@@ -1784,7 +1784,7 @@
 
             if (classPtr == NULL) {
                 BAIL_LOOP_COMPILATION();
-                LOGE("Unexpected null class");
+                ALOGE("Unexpected null class");
                 dvmAbort();
             }
 
@@ -2129,7 +2129,7 @@
             break;
         default:
             cond = (ArmConditionCode)0;
-            LOGE("Unexpected opcode (%d) for Fmt21t", dalvikOpcode);
+            ALOGE("Unexpected opcode (%d) for Fmt21t", dalvikOpcode);
             dvmCompilerAbort(cUnit);
     }
     genConditionalBranch(cUnit, cond, &labelList[bb->taken->id]);
@@ -2416,7 +2416,7 @@
 
             if (fieldPtr == NULL) {
                 BAIL_LOOP_COMPILATION();
-                LOGE("Unexpected null instance field");
+                ALOGE("Unexpected null instance field");
                 dvmAbort();
             }
 
@@ -2443,7 +2443,7 @@
 
             if (classPtr == NULL) {
                 BAIL_LOOP_COMPILATION();
-                LOGE("Unexpected null class");
+                ALOGE("Unexpected null class");
                 dvmAbort();
             }
 
@@ -2632,7 +2632,7 @@
             break;
         default:
             cond = (ArmConditionCode)0;
-            LOGE("Unexpected opcode (%d) for Fmt22t", dalvikOpcode);
+            ALOGE("Unexpected opcode (%d) for Fmt22t", dalvikOpcode);
             dvmCompilerAbort(cUnit);
     }
     genConditionalBranch(cUnit, cond, &labelList[bb->taken->id]);
@@ -4465,7 +4465,7 @@
                     }
                 }
                 if (notHandled) {
-                    LOGE("%#06x: Opcode %#x (%s) / Fmt %d not handled",
+                    ALOGE("%#06x: Opcode %#x (%s) / Fmt %d not handled",
                          mir->offset,
                          dalvikOpcode, dexGetOpcodeName(dalvikOpcode),
                          dalvikFormat);
@@ -4549,7 +4549,7 @@
                         chainingBlock->startOffset);
                     break;
                 default:
-                    LOGE("Bad blocktype %d", chainingBlock->blockType);
+                    ALOGE("Bad blocktype %d", chainingBlock->blockType);
                     dvmCompilerAbort(cUnit);
             }
         }
@@ -4620,7 +4620,7 @@
             break;
         default:
             isCompile = false;
-            LOGE("Jit: unknown work order type");
+            ALOGE("Jit: unknown work order type");
             assert(0);  // Bail if debug build, discard otherwise
     }
     if (!success)
@@ -4681,7 +4681,7 @@
 
     for (i = 0; i < kArmLast; i++) {
         if (EncodingMap[i].opcode != i) {
-            LOGE("Encoding order for %s is wrong: expecting %d, seeing %d",
+            ALOGE("Encoding order for %s is wrong: expecting %d, seeing %d",
                  EncodingMap[i].name, i, EncodingMap[i].opcode);
             dvmAbort();  // OK to dvmAbort - build error
         }
diff --git a/vm/compiler/codegen/arm/Thumb/Factory.cpp b/vm/compiler/codegen/arm/Thumb/Factory.cpp
index 9cdd75f..1b65a03 100644
--- a/vm/compiler/codegen/arm/Thumb/Factory.cpp
+++ b/vm/compiler/codegen/arm/Thumb/Factory.cpp
@@ -148,7 +148,7 @@
             opcode = kThumbBUncond;
             break;
         default:
-            LOGE("Jit: bad case in opNone");
+            ALOGE("Jit: bad case in opNone");
             dvmCompilerAbort(cUnit);
     }
     return newLIR0(cUnit, opcode);
@@ -170,7 +170,7 @@
             opcode = kThumbPop;
             break;
         default:
-            LOGE("Jit: bad case in opCondBranch");
+            ALOGE("Jit: bad case in opCondBranch");
             dvmCompilerAbort(cUnit);
     }
     return newLIR1(cUnit, opcode, value);
@@ -184,7 +184,7 @@
             opcode = kThumbBlxR;
             break;
         default:
-            LOGE("Jit: bad case in opReg");
+            ALOGE("Jit: bad case in opReg");
             dvmCompilerAbort(cUnit);
     }
     return newLIR1(cUnit, opcode, rDestSrc);
@@ -230,7 +230,7 @@
             }
             break;
         default:
-            LOGE("Jit: bad case in opRegImm");
+            ALOGE("Jit: bad case in opRegImm");
             dvmCompilerAbort(cUnit);
             break;
     }
@@ -351,7 +351,7 @@
                 }
                 return res;
         default:
-            LOGE("Jit: bad case in opRegRegImm");
+            ALOGE("Jit: bad case in opRegRegImm");
             dvmCompilerAbort(cUnit);
             break;
     }
@@ -449,7 +449,7 @@
              opRegRegImm(cUnit, kOpLsr, rDestSrc1, rDestSrc1, 16);
              return res;
         default:
-            LOGE("Jit: bad case in opRegReg");
+            ALOGE("Jit: bad case in opRegReg");
             dvmCompilerAbort(cUnit);
             break;
     }
@@ -495,7 +495,7 @@
             opcode = kThumbLdrsbRRR;
             break;
         default:
-            LOGE("Jit: bad case in loadBaseIndexed");
+            ALOGE("Jit: bad case in loadBaseIndexed");
             dvmCompilerAbort(cUnit);
     }
     res = newLIR3(cUnit, opcode, rDest, rBase, rNewIndex);
@@ -533,7 +533,7 @@
             opcode = kThumbStrbRRR;
             break;
         default:
-            LOGE("Jit: bad case in storeBaseIndexed");
+            ALOGE("Jit: bad case in storeBaseIndexed");
             dvmCompilerAbort(cUnit);
     }
     res = newLIR3(cUnit, opcode, rSrc, rBase, rNewIndex);
@@ -650,7 +650,7 @@
             opcode = kThumbLdrsbRRR;
             break;
         default:
-            LOGE("Jit: bad case in loadBaseIndexedBody");
+            ALOGE("Jit: bad case in loadBaseIndexedBody");
             dvmCompilerAbort(cUnit);
     }
     if (shortForm) {
@@ -767,7 +767,7 @@
             }
             break;
         default:
-            LOGE("Jit: bad case in storeBaseIndexedBody");
+            ALOGE("Jit: bad case in storeBaseIndexedBody");
             dvmCompilerAbort(cUnit);
     }
     if (shortForm) {
diff --git a/vm/compiler/codegen/arm/Thumb2/Gen.cpp b/vm/compiler/codegen/arm/Thumb2/Gen.cpp
index fcf0fe3..ea64547 100644
--- a/vm/compiler/codegen/arm/Thumb2/Gen.cpp
+++ b/vm/compiler/codegen/arm/Thumb2/Gen.cpp
@@ -186,7 +186,7 @@
         case 0:
             break;
         default:
-            LOGE("Jit: bad case in genIT");
+            ALOGE("Jit: bad case in genIT");
             dvmCompilerAbort(cUnit);
     }
     mask = (mask3 << 3) | (mask2 << 2) | (mask1 << 1) |
diff --git a/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.cpp b/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.cpp
index 5188417..3b5c083 100644
--- a/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.cpp
+++ b/vm/compiler/codegen/arm/armv5te-vfp/ArchVariant.cpp
@@ -77,7 +77,7 @@
      */
     if ((offsetof(Thread, jitToInterpEntries) +
          sizeof(struct JitToInterpEntries)) >= 128) {
-        LOGE("Thread.jitToInterpEntries size overflow");
+        ALOGE("Thread.jitToInterpEntries size overflow");
         dvmAbort();
     }
 
@@ -98,7 +98,7 @@
             res = 2;
             break;
         default:
-            LOGE("Unknown target optimization hint key: %d",key);
+            ALOGE("Unknown target optimization hint key: %d",key);
             res = 0;
     }
     return res;
diff --git a/vm/compiler/codegen/arm/armv5te/ArchVariant.cpp b/vm/compiler/codegen/arm/armv5te/ArchVariant.cpp
index f394aa1..f2d4815 100644
--- a/vm/compiler/codegen/arm/armv5te/ArchVariant.cpp
+++ b/vm/compiler/codegen/arm/armv5te/ArchVariant.cpp
@@ -77,7 +77,7 @@
      */
     if ((offsetof(Thread, jitToInterpEntries) +
          sizeof(struct JitToInterpEntries)) >= 128) {
-        LOGE("Thread.jitToInterpEntries size overflow");
+        ALOGE("Thread.jitToInterpEntries size overflow");
         dvmAbort();
     }
 
@@ -98,7 +98,7 @@
             res = 2;
             break;
         default:
-            LOGE("Unknown target optimization hint key: %d",key);
+            ALOGE("Unknown target optimization hint key: %d",key);
             res = 0;
     }
     return res;
diff --git a/vm/compiler/codegen/arm/armv5te/MethodCodegenDriver.cpp b/vm/compiler/codegen/arm/armv5te/MethodCodegenDriver.cpp
index 20779f3..a0dba0a 100644
--- a/vm/compiler/codegen/arm/armv5te/MethodCodegenDriver.cpp
+++ b/vm/compiler/codegen/arm/armv5te/MethodCodegenDriver.cpp
@@ -16,6 +16,6 @@
 
 void dvmCompilerMethodMIR2LIR(CompilationUnit *cUnit)
 {
-    LOGE("Method-based JIT not supported for the v5te target");
+    ALOGE("Method-based JIT not supported for the v5te target");
     dvmAbort();
 }
diff --git a/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp b/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp
index c3fe518..e3b2724 100644
--- a/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp
+++ b/vm/compiler/codegen/arm/armv7-a-neon/ArchVariant.cpp
@@ -72,7 +72,7 @@
      */
     if ((offsetof(Thread, jitToInterpEntries) +
          sizeof(struct JitToInterpEntries)) >= 128) {
-        LOGE("Thread.jitToInterpEntries size overflow");
+        ALOGE("Thread.jitToInterpEntries size overflow");
         dvmAbort();
     }
 
@@ -93,7 +93,7 @@
             res = 7;
             break;
         default:
-            LOGE("Unknown target optimization hint key: %d",key);
+            ALOGE("Unknown target optimization hint key: %d",key);
             res = 0;
     }
     return res;
diff --git a/vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp b/vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp
index 8df16c6..222b880 100644
--- a/vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp
+++ b/vm/compiler/codegen/arm/armv7-a-neon/MethodCodegenDriver.cpp
@@ -395,7 +395,7 @@
         }
 
         if (notHandled) {
-            LOGE("%#06x: Opcode %#x (%s) / Fmt %d not handled",
+            ALOGE("%#06x: Opcode %#x (%s) / Fmt %d not handled",
                  mir->offset,
                  dalvikOpcode, dexGetOpcodeName(dalvikOpcode),
                  dalvikFormat);
diff --git a/vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp b/vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp
index c3fe518..e3b2724 100644
--- a/vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp
+++ b/vm/compiler/codegen/arm/armv7-a/ArchVariant.cpp
@@ -72,7 +72,7 @@
      */
     if ((offsetof(Thread, jitToInterpEntries) +
          sizeof(struct JitToInterpEntries)) >= 128) {
-        LOGE("Thread.jitToInterpEntries size overflow");
+        ALOGE("Thread.jitToInterpEntries size overflow");
         dvmAbort();
     }
 
@@ -93,7 +93,7 @@
             res = 7;
             break;
         default:
-            LOGE("Unknown target optimization hint key: %d",key);
+            ALOGE("Unknown target optimization hint key: %d",key);
             res = 0;
     }
     return res;
diff --git a/vm/compiler/codegen/x86/CodegenDriver.cpp b/vm/compiler/codegen/x86/CodegenDriver.cpp
index 789d431..9c7bf1e 100644
--- a/vm/compiler/codegen/x86/CodegenDriver.cpp
+++ b/vm/compiler/codegen/x86/CodegenDriver.cpp
@@ -239,7 +239,7 @@
         }
         default:
             res = false;
-            LOGE("Jit: unknown work order type");
+            ALOGE("Jit: unknown work order type");
             assert(0);  // Bail if debug build, discard otherwise
     }
     return res;
diff --git a/vm/compiler/codegen/x86/ia32/ArchVariant.cpp b/vm/compiler/codegen/x86/ia32/ArchVariant.cpp
index 9f17522..ff97d95 100644
--- a/vm/compiler/codegen/x86/ia32/ArchVariant.cpp
+++ b/vm/compiler/codegen/x86/ia32/ArchVariant.cpp
@@ -91,7 +91,7 @@
             res = 2;
             break;
         default:
-            LOGE("Unknown target optimization hint key: %d",key);
+            ALOGE("Unknown target optimization hint key: %d",key);
             res = 0;
     }
     return res;
diff --git a/vm/hprof/Hprof.cpp b/vm/hprof/Hprof.cpp
index c0a6c7f..5a772a0 100644
--- a/vm/hprof/Hprof.cpp
+++ b/vm/hprof/Hprof.cpp
@@ -43,7 +43,7 @@
 
     hprof_context_t *ctx = (hprof_context_t *)malloc(sizeof(*ctx));
     if (ctx == NULL) {
-        LOGE("hprof: can't allocate context.");
+        ALOGE("hprof: can't allocate context.");
         return NULL;
     }
 
@@ -69,7 +69,7 @@
      */
     hprof_context_t *headCtx = (hprof_context_t *)malloc(sizeof(*headCtx));
     if (headCtx == NULL) {
-        LOGE("hprof: can't allocate context.");
+        ALOGE("hprof: can't allocate context.");
         hprofFreeContext(tailCtx);
         return false;
     }
@@ -115,13 +115,13 @@
         if (headCtx->fd >= 0) {
             outFd = dup(headCtx->fd);
             if (outFd < 0) {
-                LOGE("dup(%d) failed: %s", headCtx->fd, strerror(errno));
+                ALOGE("dup(%d) failed: %s", headCtx->fd, strerror(errno));
                 /* continue to fail-handler below */
             }
         } else {
             outFd = open(tailCtx->fileName, O_WRONLY|O_CREAT|O_TRUNC, 0644);
             if (outFd < 0) {
-                LOGE("can't open %s: %s", headCtx->fileName, strerror(errno));
+                ALOGE("can't open %s: %s", headCtx->fileName, strerror(errno));
                 /* continue to fail-handler below */
             }
         }
diff --git a/vm/hprof/HprofOutput.cpp b/vm/hprof/HprofOutput.cpp
index 6393438..95bc4c2 100644
--- a/vm/hprof/HprofOutput.cpp
+++ b/vm/hprof/HprofOutput.cpp
@@ -74,7 +74,7 @@
     FILE* fp = open_memstream(&ctx->fileDataPtr, &ctx->fileDataSize);
     if (fp == NULL) {
         /* not expected */
-        LOGE("hprof: open_memstream failed: %s", strerror(errno));
+        ALOGE("hprof: open_memstream failed: %s", strerror(errno));
         dvmAbort();
     }
 
diff --git a/vm/interp/Interp.cpp b/vm/interp/Interp.cpp
index 83150ee..408255f 100644
--- a/vm/interp/Interp.cpp
+++ b/vm/interp/Interp.cpp
@@ -317,7 +317,7 @@
     if (idx < 0) {
         /* breakpoint not found in set -- unexpected */
         if (*(u1*)addr == OP_BREAKPOINT) {
-            LOGE("Unable to restore breakpoint opcode (%s.%s +%#x)",
+            ALOGE("Unable to restore breakpoint opcode (%s.%s +%#x)",
                 method->clazz->descriptor, method->name, instrOffset);
             dvmAbort();
         } else {
@@ -462,7 +462,7 @@
     if (!dvmBreakpointSetOriginalOpcode(pSet, addr, &orig)) {
         orig = *(u1*)addr;
         if (orig == OP_BREAKPOINT) {
-            LOGE("GLITCH: can't find breakpoint, opcode is still set");
+            ALOGE("GLITCH: can't find breakpoint, opcode is still set");
             dvmAbort();
         }
     }
@@ -865,7 +865,7 @@
              * during single-step.
              */
             char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
-            LOGE("HEY: invalid 'this' ptr %p (%s.%s %s)", thisPtr,
+            ALOGE("HEY: invalid 'this' ptr %p (%s.%s %s)", thisPtr,
                 method->clazz->descriptor, method->name, desc);
             free(desc);
             dvmAbort();
@@ -920,15 +920,15 @@
 
         count = dvmReferenceTableEntries(&self->internalLocalRefTable);
 
-        LOGE("TRACK: unreleased internal reference (prev=%d total=%d)",
+        ALOGE("TRACK: unreleased internal reference (prev=%d total=%d)",
             debugTrackedRefStart, count);
         desc = dexProtoCopyMethodDescriptor(&method->prototype);
-        LOGE("       current method is %s.%s %s", method->clazz->descriptor,
+        ALOGE("       current method is %s.%s %s", method->clazz->descriptor,
             method->name, desc);
         free(desc);
         top = self->internalLocalRefTable.table + debugTrackedRefStart;
         while (top < self->internalLocalRefTable.nextEntry) {
-            LOGE("  %p (%s)",
+            ALOGE("  %p (%s)",
                  *top,
                  ((*top)->clazz != NULL) ? (*top)->clazz->descriptor : "");
             top++;
@@ -1179,7 +1179,7 @@
         }
         break;
     default:
-        LOGE("Unexpected width %d in copySwappedArrayData", width);
+        ALOGE("Unexpected width %d in copySwappedArrayData", width);
         dvmAbort();
         break;
     }
@@ -1616,7 +1616,7 @@
         if ((funct != thread->callback) ||
             (arg != thread->callbackArg)) {
             // Yes - report failure and die
-            LOGE("ArmSafePointCallback failed, thread %d", thread->threadId);
+            ALOGE("ArmSafePointCallback failed, thread %d", thread->threadId);
             dvmUnlockMutex(&thread->callbackMutex);
             dvmAbort();
         }
@@ -1944,7 +1944,7 @@
     if (method->clazz->status < CLASS_INITIALIZING ||
         method->clazz->status == CLASS_ERROR)
     {
-        LOGE("ERROR: tried to execute code in unprepared class '%s' (%d)",
+        ALOGE("ERROR: tried to execute code in unprepared class '%s' (%d)",
             method->clazz->descriptor, method->clazz->status);
         dvmDumpThread(self, false);
         dvmAbort();
diff --git a/vm/interp/Jit.cpp b/vm/interp/Jit.cpp
index 8cae67e..9f87705 100644
--- a/vm/interp/Jit.cpp
+++ b/vm/interp/Jit.cpp
@@ -926,7 +926,7 @@
                      sizeof(JitTraceRun) * (self->currTraceRun+1));
 
                 if (desc == NULL) {
-                    LOGE("Out of memory in trace selection");
+                    ALOGE("Out of memory in trace selection");
                     dvmJitStopTranslationRequests();
                     self->jitState = kJitDone;
                     allDone = true;
@@ -965,7 +965,7 @@
             allDone = true;
             break;
         default:
-            LOGE("Unexpected JIT state: %d", self->jitState);
+            ALOGE("Unexpected JIT state: %d", self->jitState);
             dvmAbort();
             break;
     }
@@ -1284,7 +1284,7 @@
             case kJitDone:
                 break;
             default:
-                LOGE("Unexpected JIT state: %d", self->jitState);
+                ALOGE("Unexpected JIT state: %d", self->jitState);
                 dvmAbort();
         }
     } else {
@@ -1410,7 +1410,7 @@
         JitTraceCounter_t *p =
               (JitTraceCounter_t*) calloc(JIT_PROF_BLOCK_ENTRIES, sizeof(*p));
         if (!p) {
-            LOGE("Failed to allocate block of trace profile counters");
+            ALOGE("Failed to allocate block of trace profile counters");
             dvmAbort();
         }
         gDvmJit.pJitTraceProfCounters->buckets[idx] = p;
diff --git a/vm/interp/Stack.cpp b/vm/interp/Stack.cpp
index aa16439..a1f8d71 100644
--- a/vm/interp/Stack.cpp
+++ b/vm/interp/Stack.cpp
@@ -335,7 +335,7 @@
         saveBlock = SAVEAREA_FROM_FP(saveBlock->prevFrame);
     }
     if (saveBlock->method != NULL) {
-        LOGE("PopFrame missed the break");
+        ALOGE("PopFrame missed the break");
         assert(false);
         dvmAbort();     // stack trashed -- nowhere to go in this thread
     }
@@ -504,7 +504,7 @@
 
 #ifndef NDEBUG
     if (verifyCount != method->insSize) {
-        LOGE("Got vfycount=%d insSize=%d for %s.%s", verifyCount,
+        ALOGE("Got vfycount=%d insSize=%d for %s.%s", verifyCount,
             method->insSize, clazz->descriptor, method->name);
         assert(false);
         goto bail;
@@ -599,7 +599,7 @@
             *ins++ = args->z;           /* 8 bits, zero or non-zero */
             break;
         default:
-            LOGE("Invalid char %c in short signature of %s.%s",
+            ALOGE("Invalid char %c in short signature of %s.%s",
                 *(desc-1), clazz->descriptor, method->name);
             assert(false);
             goto bail;
@@ -611,7 +611,7 @@
 
 #ifndef NDEBUG
     if (verifyCount != method->insSize) {
-        LOGE("Got vfycount=%d insSize=%d for %s.%s", verifyCount,
+        ALOGE("Got vfycount=%d insSize=%d for %s.%s", verifyCount,
             method->insSize, clazz->descriptor, method->name);
         assert(false);
         goto bail;
@@ -717,7 +717,7 @@
 
 #ifndef NDEBUG
     if (verifyCount != method->insSize) {
-        LOGE("Got vfycount=%d insSize=%d for %s.%s", verifyCount,
+        ALOGE("Got vfycount=%d insSize=%d for %s.%s", verifyCount,
             method->insSize, clazz->descriptor, method->name);
         assert(false);
         goto bail;
@@ -1007,7 +1007,7 @@
         /*
          * Already did, nothing to do but bail.
          */
-        LOGE("DalvikVM: double-overflow of stack in threadid=%d; aborting",
+        ALOGE("DalvikVM: double-overflow of stack in threadid=%d; aborting",
             self->threadId);
         dvmDumpThread(self, false);
         dvmAbort();
@@ -1060,7 +1060,7 @@
     newStackEnd = (self->interpStackStart - self->interpStackSize)
         + STACK_OVERFLOW_RESERVE;
     if ((u1*)self->interpSave.curFrame <= newStackEnd) {
-        LOGE("Can't shrink stack: curFrame is in reserved area (%p %p)",
+        ALOGE("Can't shrink stack: curFrame is in reserved area (%p %p)",
             self->interpStackEnd, self->interpSave.curFrame);
         dvmDumpThread(self, false);
         dvmAbort();
diff --git a/vm/jdwp/ExpandBuf.cpp b/vm/jdwp/ExpandBuf.cpp
index b8ff933..cc3557e 100644
--- a/vm/jdwp/ExpandBuf.cpp
+++ b/vm/jdwp/ExpandBuf.cpp
@@ -95,7 +95,7 @@
 
     newPtr = (u1*) realloc(pBuf->storage, pBuf->maxLen);
     if (newPtr == NULL) {
-        LOGE("realloc(%d) failed", pBuf->maxLen);
+        ALOGE("realloc(%d) failed", pBuf->maxLen);
         abort();
     }
 
diff --git a/vm/jdwp/JdwpAdb.cpp b/vm/jdwp/JdwpAdb.cpp
index c21fb4e..87db1d2 100644
--- a/vm/jdwp/JdwpAdb.cpp
+++ b/vm/jdwp/JdwpAdb.cpp
@@ -201,13 +201,13 @@
 
         netState->controlSock = socket(PF_UNIX, SOCK_STREAM, 0);
         if (netState->controlSock < 0) {
-            LOGE("Could not create ADB control socket:%s",
+            ALOGE("Could not create ADB control socket:%s",
                  strerror(errno));
             return false;
         }
 
         if (pipe(netState->wakeFds) < 0) {
-            LOGE("pipe failed");
+            ALOGE("pipe failed");
             return false;
         }
 
@@ -234,7 +234,7 @@
             if (!ret) {
                 if (!socket_peer_is_trusted(netState->controlSock)) {
                     if (shutdown(netState->controlSock, SHUT_RDWR)) {
-                        LOGE("trouble shutting down socket: %s", strerror(errno));
+                        ALOGE("trouble shutting down socket: %s", strerror(errno));
                     }
                     return false;
                 }
@@ -249,7 +249,7 @@
                     break;
                 }
 
-                LOGE("Weird, can't send JDWP process pid to ADB: %s",
+                ALOGE("Weird, can't send JDWP process pid to ADB: %s",
                      strerror(errno));
                 return false;
             }
@@ -275,7 +275,7 @@
 
     if (netState->clientSock < 0) {
         if (++retryCount > 5) {
-            LOGE("adb connection max retries exceeded");
+            ALOGE("adb connection max retries exceeded");
             return false;
         }
         goto retry;
@@ -463,7 +463,7 @@
             ssize_t cc = netState->writePacket(pReply);
 
             if (cc != (ssize_t) expandBufGetLength(pReply)) {
-                LOGE("Failed sending reply to debugger: %s", strerror(errno));
+                ALOGE("Failed sending reply to debugger: %s", strerror(errno));
                 expandBufFree(pReply);
                 return false;
             }
@@ -558,7 +558,7 @@
             if (selCount < 0) {
                 if (errno == EINTR)
                     continue;
-                LOGE("select failed: %s", strerror(errno));
+                ALOGE("select failed: %s", strerror(errno));
                 goto fail;
             }
 
@@ -624,7 +624,7 @@
         if (memcmp(netState->inputBuffer,
                 kMagicHandshake, kMagicHandshakeLen) != 0)
         {
-            LOGE("ERROR: bad handshake '%.14s'", netState->inputBuffer);
+            ALOGE("ERROR: bad handshake '%.14s'", netState->inputBuffer);
             goto fail;
         }
 
@@ -632,7 +632,7 @@
         cc = write(netState->clientSock, netState->inputBuffer,
                 kMagicHandshakeLen);
         if (cc != kMagicHandshakeLen) {
-            LOGE("Failed writing handshake bytes: %s (%d of %d)",
+            ALOGE("Failed writing handshake bytes: %s (%d of %d)",
                 strerror(errno), cc, (int) kMagicHandshakeLen);
             goto fail;
         }
@@ -676,7 +676,7 @@
     ssize_t cc = netState->writePacket(pReq);
 
     if (cc != (ssize_t) expandBufGetLength(pReq)) {
-        LOGE("Failed sending req to debugger: %s (%d of %d)",
+        ALOGE("Failed sending req to debugger: %s (%d of %d)",
             strerror(errno), (int) cc, (int) expandBufGetLength(pReq));
         return false;
     }
@@ -711,7 +711,7 @@
     ssize_t actual = netState->writeBufferedPacket(iov, iovcnt);
 
     if ((size_t)actual != expected) {
-        LOGE("Failed sending b-req to debugger: %s (%d of %zu)",
+        ALOGE("Failed sending b-req to debugger: %s (%d of %zu)",
             strerror(errno), (int) actual, expected);
         return false;
     }
diff --git a/vm/jdwp/JdwpEvent.cpp b/vm/jdwp/JdwpEvent.cpp
index ca31a7d..c9aa589 100644
--- a/vm/jdwp/JdwpEvent.cpp
+++ b/vm/jdwp/JdwpEvent.cpp
@@ -423,7 +423,7 @@
         int targetLen = strlen(target);
         patLen--;
         // TODO: remove printf when we find a test case to verify this
-        LOGE(">>> comparing '%s' to '%s'",
+        ALOGE(">>> comparing '%s' to '%s'",
             pattern+1, target + (targetLen-patLen));
 
         if (targetLen < patLen)
@@ -517,7 +517,7 @@
                 return false;
             break;
         default:
-            LOGE("unhandled mod kind %d", pMod->modKind);
+            ALOGE("unhandled mod kind %d", pMod->modKind);
             assert(false);
             break;
         }
diff --git a/vm/jdwp/JdwpHandler.cpp b/vm/jdwp/JdwpHandler.cpp
index fce8a9a..b41139a 100644
--- a/vm/jdwp/JdwpHandler.cpp
+++ b/vm/jdwp/JdwpHandler.cpp
@@ -1927,7 +1927,7 @@
         }
     }
     if (i == NELEM(gHandlerMap)) {
-        LOGE("REQ: UNSUPPORTED (cmd=%d/%d dataLen=%d id=0x%06x)",
+        ALOGE("REQ: UNSUPPORTED (cmd=%d/%d dataLen=%d id=0x%06x)",
             pHeader->cmdSet, pHeader->cmd, dataLen, pHeader->id);
         if (dataLen > 0)
             dvmPrintHexDumpDbg(buf, dataLen, LOG_TAG);
diff --git a/vm/jdwp/JdwpMain.cpp b/vm/jdwp/JdwpMain.cpp
index 6e90622..d3e2234 100644
--- a/vm/jdwp/JdwpMain.cpp
+++ b/vm/jdwp/JdwpMain.cpp
@@ -105,7 +105,7 @@
         /* TODO */
         break;
     default:
-        LOGE("Unknown transport %d", pParams->transport);
+        ALOGE("Unknown transport %d", pParams->transport);
         assert(false);
         goto fail;
     }
@@ -158,7 +158,7 @@
         dvmChangeStatus(NULL, THREAD_RUNNING);
 
         if (!dvmJdwpIsActive(state)) {
-            LOGE("JDWP connection failed");
+            ALOGE("JDWP connection failed");
             goto fail;
         }
 
@@ -316,7 +316,7 @@
         while (true) {
             // sanity check -- shouldn't happen?
             if (dvmThreadSelf()->status != THREAD_VMWAIT) {
-                LOGE("JDWP thread no longer in VMWAIT (now %d); resetting",
+                ALOGE("JDWP thread no longer in VMWAIT (now %d); resetting",
                     dvmThreadSelf()->status);
                 dvmDbgThreadWaiting();
             }
diff --git a/vm/jdwp/JdwpSocket.cpp b/vm/jdwp/JdwpSocket.cpp
index 50f0b3b..ad0a287 100644
--- a/vm/jdwp/JdwpSocket.cpp
+++ b/vm/jdwp/JdwpSocket.cpp
@@ -100,7 +100,7 @@
             }
         }
         if (state->netState == NULL) {
-            LOGE("JDWP net startup failed (req port=%d)", pParams->port);
+            ALOGE("JDWP net startup failed (req port=%d)", pParams->port);
             return false;
         }
     } else {
@@ -150,7 +150,7 @@
 
     netState->listenSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
     if (netState->listenSock < 0) {
-        LOGE("Socket create failed: %s", strerror(errno));
+        ALOGE("Socket create failed: %s", strerror(errno));
         goto fail;
     }
 
@@ -158,7 +158,7 @@
     if (setsockopt(netState->listenSock, SOL_SOCKET, SO_REUSEADDR, &one,
             sizeof(one)) < 0)
     {
-        LOGE("setsockopt(SO_REUSEADDR) failed: %s", strerror(errno));
+        ALOGE("setsockopt(SO_REUSEADDR) failed: %s", strerror(errno));
         goto fail;
     }
 
@@ -179,7 +179,7 @@
     LOGVV("+++ bound to port %d", netState->listenPort);
 
     if (listen(netState->listenSock, 5) != 0) {
-        LOGE("Listen failed: %s", strerror(errno));
+        ALOGE("Listen failed: %s", strerror(errno));
         goto fail;
     }
 
@@ -293,7 +293,7 @@
     if (FD_ISSET(sock, &readfds))   /* make sure it's our fd */
         return true;
 
-    LOGE("WEIRD: odd behavior in select (count=%d)", count);
+    ALOGE("WEIRD: odd behavior in select (count=%d)", count);
     return false;
 }
 #endif
@@ -361,7 +361,7 @@
             if (errno == EINVAL)
                 LOGVV("accept failed: %s", strerror(errno));
             else
-                LOGE("accept failed: %s", strerror(errno));
+                ALOGE("accept failed: %s", strerror(errno));
             return false;
         }
     } while (sock < 0);
@@ -379,7 +379,7 @@
     setNoDelay(netState->clientSock);
 
     if (pipe(netState->wakePipe) < 0) {
-        LOGE("pipe failed");
+        ALOGE("pipe failed");
         return false;
     }
 
@@ -445,7 +445,7 @@
     netState = state->netState;
     netState->clientSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
     if (netState->clientSock < 0) {
-        LOGE("Unable to create socket: %s", strerror(errno));
+        ALOGE("Unable to create socket: %s", strerror(errno));
         return false;
     }
 
@@ -453,7 +453,7 @@
      * Try to connect.
      */
     if (connect(netState->clientSock, &addr.addrPlain, sizeof(addr)) != 0) {
-        LOGE("Unable to connect to %s:%d: %s",
+        ALOGE("Unable to connect to %s:%d: %s",
             inet_ntoa(addr.addrInet.sin_addr), ntohs(addr.addrInet.sin_port),
             strerror(errno));
         close(netState->clientSock);
@@ -470,7 +470,7 @@
     setNoDelay(netState->clientSock);
 
     if (pipe(netState->wakePipe) < 0) {
-        LOGE("pipe failed");
+        ALOGE("pipe failed");
         return false;
     }
 
@@ -621,7 +621,7 @@
             ssize_t cc = netState->writePacket(pReply);
 
             if (cc != (ssize_t) expandBufGetLength(pReply)) {
-                LOGE("Failed sending reply to debugger: %s", strerror(errno));
+                ALOGE("Failed sending reply to debugger: %s", strerror(errno));
                 expandBufFree(pReply);
                 return false;
             }
@@ -714,7 +714,7 @@
             if (selCount < 0) {
                 if (errno == EINTR)
                     continue;
-                LOGE("select failed: %s", strerror(errno));
+                ALOGE("select failed: %s", strerror(errno));
                 goto fail;
             }
 
@@ -722,7 +722,7 @@
                 FD_ISSET(netState->wakePipe[0], &readfds))
             {
                 if (netState->listenSock >= 0)
-                    LOGE("Exit wake set, but not exiting?");
+                    ALOGE("Exit wake set, but not exiting?");
                 else
                     ALOGD("Got wake-up signal, bailing out of select");
                 goto fail;
@@ -784,7 +784,7 @@
         if (memcmp(netState->inputBuffer,
                 kMagicHandshake, kMagicHandshakeLen) != 0)
         {
-            LOGE("ERROR: bad handshake '%.14s'", netState->inputBuffer);
+            ALOGE("ERROR: bad handshake '%.14s'", netState->inputBuffer);
             goto fail;
         }
 
@@ -792,7 +792,7 @@
         cc = write(netState->clientSock, netState->inputBuffer,
                 kMagicHandshakeLen);
         if (cc != kMagicHandshakeLen) {
-            LOGE("Failed writing handshake bytes: %s (%d of %d)",
+            ALOGE("Failed writing handshake bytes: %s (%d of %d)",
                 strerror(errno), cc, (int) kMagicHandshakeLen);
             goto fail;
         }
@@ -836,7 +836,7 @@
     ssize_t cc = netState->writePacket(pReq);
 
     if (cc != (ssize_t) expandBufGetLength(pReq)) {
-        LOGE("Failed sending req to debugger: %s (%d of %d)",
+        ALOGE("Failed sending req to debugger: %s (%d of %d)",
             strerror(errno), (int) cc, (int) expandBufGetLength(pReq));
         return false;
     }
@@ -871,7 +871,7 @@
     ssize_t actual = netState->writeBufferedPacket(iov, iovcnt);
 
     if ((size_t)actual != expected) {
-        LOGE("Failed sending b-req to debugger: %s (%d of %zu)",
+        ALOGE("Failed sending b-req to debugger: %s (%d of %zu)",
             strerror(errno), (int) actual, expected);
         return false;
     }
diff --git a/vm/mterp/Mterp.cpp b/vm/mterp/Mterp.cpp
index 9f9556f..b5cb9a5 100644
--- a/vm/mterp/Mterp.cpp
+++ b/vm/mterp/Mterp.cpp
@@ -41,7 +41,7 @@
 #include "mterp/common/asm-constants.h"
 
     if (failed) {
-        LOGE("Please correct the values in mterp/common/asm-constants.h");
+        ALOGE("Please correct the values in mterp/common/asm-constants.h");
         dvmAbort();
     }
 
@@ -56,8 +56,8 @@
     int interpSize = (uintptr_t) dvmAsmInstructionEnd -
                      (uintptr_t) dvmAsmInstructionStart;
     if (interpSize != 0 && interpSize != kNumPackedOpcodes*width) {
-        LOGE("ERROR: unexpected asm interp size %d", interpSize);
-        LOGE("(did an instruction handler exceed %d bytes?)", width);
+        ALOGE("ERROR: unexpected asm interp size %d", interpSize);
+        ALOGE("(did an instruction handler exceed %d bytes?)", width);
         dvmAbort();
     }
 #endif
diff --git a/vm/mterp/c/OP_UNUSED_FF.cpp b/vm/mterp/c/OP_UNUSED_FF.cpp
index f4743db..1348aec 100644
--- a/vm/mterp/c/OP_UNUSED_FF.cpp
+++ b/vm/mterp/c/OP_UNUSED_FF.cpp
@@ -2,7 +2,7 @@
     /*
      * In portable interp, most unused opcodes will fall through to here.
      */
-    LOGE("unknown opcode 0x%02x\n", INST_INST(inst));
+    ALOGE("unknown opcode 0x%02x\n", INST_INST(inst));
     dvmAbort();
     FINISH(1);
 OP_END
diff --git a/vm/mterp/c/gotoTargets.cpp b/vm/mterp/c/gotoTargets.cpp
index 6df3b9a..b335273 100644
--- a/vm/mterp/c/gotoTargets.cpp
+++ b/vm/mterp/c/gotoTargets.cpp
@@ -65,7 +65,7 @@
             GOTO_exceptionThrown();
         } else if (typeCh != 'L' && typeCh != '[' && typeCh != 'I') {
             /* TODO: requires multiple "fill in" loops with different widths */
-            LOGE("non-int primitives not implemented");
+            ALOGE("non-int primitives not implemented");
             dvmThrowInternalError(
                 "filled-new-array not implemented for anything but 'int'");
             GOTO_exceptionThrown();
@@ -582,7 +582,7 @@
         {
             FINISH(3);
         } else {
-            //LOGE("Unknown invoke instr %02x at %d",
+            //ALOGE("Unknown invoke instr %02x at %d",
             //    invokeInstr, (int) (pc - curMethod->insns));
             assert(false);
         }
@@ -959,7 +959,7 @@
             {
                 FINISH(3);
             } else {
-                //LOGE("Unknown invoke instr %02x at %d",
+                //ALOGE("Unknown invoke instr %02x at %d",
                 //    invokeInstr, (int) (pc - curMethod->insns));
                 assert(false);
             }
diff --git a/vm/mterp/c/header.cpp b/vm/mterp/c/header.cpp
index 44d7064..d0e55f5 100644
--- a/vm/mterp/c/header.cpp
+++ b/vm/mterp/c/header.cpp
@@ -95,7 +95,7 @@
         {                                                                   \
             char* desc;                                                     \
             desc = dexProtoCopyMethodDescriptor(&curMethod->prototype);     \
-            LOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
+            ALOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
                 myoff, (int) (pc - curMethod->insns),                       \
                 curMethod->clazz->descriptor, curMethod->name, desc);       \
             free(desc);                                                     \
@@ -314,14 +314,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
@@ -346,14 +346,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
diff --git a/vm/mterp/common/asm-constants.h b/vm/mterp/common/asm-constants.h
index b6d82d6..bbc043c 100644
--- a/vm/mterp/common/asm-constants.h
+++ b/vm/mterp/common/asm-constants.h
@@ -12,19 +12,19 @@
    */
 # define MTERP_OFFSET(_name, _type, _field, _offset)                        \
     if (OFFSETOF_MEMBER(_type, _field) != _offset) {                        \
-        LOGE("Bad asm offset %s (%d), should be %d",                        \
+        ALOGE("Bad asm offset %s (%d), should be %d",                        \
             #_name, _offset, OFFSETOF_MEMBER(_type, _field));               \
         failed = true;                                                      \
     }
 # define MTERP_SIZEOF(_name, _type, _size)                                  \
     if (sizeof(_type) != (_size)) {                                         \
-        LOGE("Bad asm sizeof %s (%d), should be %d",                        \
+        ALOGE("Bad asm sizeof %s (%d), should be %d",                        \
             #_name, (_size), sizeof(_type));                                \
         failed = true;                                                      \
     }
 # define MTERP_CONSTANT(_name, _value)                                      \
     if ((_name) != (_value)) {                                              \
-        LOGE("Bad asm constant %s (%d), should be %d",                      \
+        ALOGE("Bad asm constant %s (%d), should be %d",                      \
             #_name, (_value), (_name));                                     \
         failed = true;                                                      \
     }
diff --git a/vm/mterp/out/InterpC-allstubs.cpp b/vm/mterp/out/InterpC-allstubs.cpp
index b266e61..5a78dc4 100644
--- a/vm/mterp/out/InterpC-allstubs.cpp
+++ b/vm/mterp/out/InterpC-allstubs.cpp
@@ -102,7 +102,7 @@
         {                                                                   \
             char* desc;                                                     \
             desc = dexProtoCopyMethodDescriptor(&curMethod->prototype);     \
-            LOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
+            ALOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
                 myoff, (int) (pc - curMethod->insns),                       \
                 curMethod->clazz->descriptor, curMethod->name, desc);       \
             free(desc);                                                     \
@@ -321,14 +321,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
@@ -353,14 +353,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
@@ -3005,7 +3005,7 @@
     /*
      * In portable interp, most unused opcodes will fall through to here.
      */
-    LOGE("unknown opcode 0x%02x\n", INST_INST(inst));
+    ALOGE("unknown opcode 0x%02x\n", INST_INST(inst));
     dvmAbort();
     FINISH(1);
 OP_END
@@ -3141,7 +3141,7 @@
             GOTO_exceptionThrown();
         } else if (typeCh != 'L' && typeCh != '[' && typeCh != 'I') {
             /* TODO: requires multiple "fill in" loops with different widths */
-            LOGE("non-int primitives not implemented");
+            ALOGE("non-int primitives not implemented");
             dvmThrowInternalError(
                 "filled-new-array not implemented for anything but 'int'");
             GOTO_exceptionThrown();
@@ -3658,7 +3658,7 @@
         {
             FINISH(3);
         } else {
-            //LOGE("Unknown invoke instr %02x at %d",
+            //ALOGE("Unknown invoke instr %02x at %d",
             //    invokeInstr, (int) (pc - curMethod->insns));
             assert(false);
         }
@@ -4035,7 +4035,7 @@
             {
                 FINISH(3);
             } else {
-                //LOGE("Unknown invoke instr %02x at %d",
+                //ALOGE("Unknown invoke instr %02x at %d",
                 //    invokeInstr, (int) (pc - curMethod->insns));
                 assert(false);
             }
diff --git a/vm/mterp/out/InterpC-armv5te-vfp.cpp b/vm/mterp/out/InterpC-armv5te-vfp.cpp
index 01246ae..406bcae 100644
--- a/vm/mterp/out/InterpC-armv5te-vfp.cpp
+++ b/vm/mterp/out/InterpC-armv5te-vfp.cpp
@@ -102,7 +102,7 @@
         {                                                                   \
             char* desc;                                                     \
             desc = dexProtoCopyMethodDescriptor(&curMethod->prototype);     \
-            LOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
+            ALOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
                 myoff, (int) (pc - curMethod->insns),                       \
                 curMethod->clazz->descriptor, curMethod->name, desc);       \
             free(desc);                                                     \
@@ -321,14 +321,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
@@ -353,14 +353,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
diff --git a/vm/mterp/out/InterpC-armv5te.cpp b/vm/mterp/out/InterpC-armv5te.cpp
index 870e682..b06e25d 100644
--- a/vm/mterp/out/InterpC-armv5te.cpp
+++ b/vm/mterp/out/InterpC-armv5te.cpp
@@ -102,7 +102,7 @@
         {                                                                   \
             char* desc;                                                     \
             desc = dexProtoCopyMethodDescriptor(&curMethod->prototype);     \
-            LOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
+            ALOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
                 myoff, (int) (pc - curMethod->insns),                       \
                 curMethod->clazz->descriptor, curMethod->name, desc);       \
             free(desc);                                                     \
@@ -321,14 +321,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
@@ -353,14 +353,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
diff --git a/vm/mterp/out/InterpC-armv7-a-neon.cpp b/vm/mterp/out/InterpC-armv7-a-neon.cpp
index bd9fe28..250c2dc 100644
--- a/vm/mterp/out/InterpC-armv7-a-neon.cpp
+++ b/vm/mterp/out/InterpC-armv7-a-neon.cpp
@@ -102,7 +102,7 @@
         {                                                                   \
             char* desc;                                                     \
             desc = dexProtoCopyMethodDescriptor(&curMethod->prototype);     \
-            LOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
+            ALOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
                 myoff, (int) (pc - curMethod->insns),                       \
                 curMethod->clazz->descriptor, curMethod->name, desc);       \
             free(desc);                                                     \
@@ -321,14 +321,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
@@ -353,14 +353,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
diff --git a/vm/mterp/out/InterpC-armv7-a.cpp b/vm/mterp/out/InterpC-armv7-a.cpp
index 54b4509..747c4cf 100644
--- a/vm/mterp/out/InterpC-armv7-a.cpp
+++ b/vm/mterp/out/InterpC-armv7-a.cpp
@@ -102,7 +102,7 @@
         {                                                                   \
             char* desc;                                                     \
             desc = dexProtoCopyMethodDescriptor(&curMethod->prototype);     \
-            LOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
+            ALOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
                 myoff, (int) (pc - curMethod->insns),                       \
                 curMethod->clazz->descriptor, curMethod->name, desc);       \
             free(desc);                                                     \
@@ -321,14 +321,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
@@ -353,14 +353,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
diff --git a/vm/mterp/out/InterpC-portable.cpp b/vm/mterp/out/InterpC-portable.cpp
index 2abcb8d..b32432d 100644
--- a/vm/mterp/out/InterpC-portable.cpp
+++ b/vm/mterp/out/InterpC-portable.cpp
@@ -102,7 +102,7 @@
         {                                                                   \
             char* desc;                                                     \
             desc = dexProtoCopyMethodDescriptor(&curMethod->prototype);     \
-            LOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
+            ALOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
                 myoff, (int) (pc - curMethod->insns),                       \
                 curMethod->clazz->descriptor, curMethod->name, desc);       \
             free(desc);                                                     \
@@ -321,14 +321,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
@@ -353,14 +353,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
@@ -3018,7 +3018,7 @@
     /*
      * In portable interp, most unused opcodes will fall through to here.
      */
-    LOGE("unknown opcode 0x%02x\n", INST_INST(inst));
+    ALOGE("unknown opcode 0x%02x\n", INST_INST(inst));
     dvmAbort();
     FINISH(1);
 OP_END
@@ -3091,7 +3091,7 @@
             GOTO_exceptionThrown();
         } else if (typeCh != 'L' && typeCh != '[' && typeCh != 'I') {
             /* TODO: requires multiple "fill in" loops with different widths */
-            LOGE("non-int primitives not implemented");
+            ALOGE("non-int primitives not implemented");
             dvmThrowInternalError(
                 "filled-new-array not implemented for anything but 'int'");
             GOTO_exceptionThrown();
@@ -3608,7 +3608,7 @@
         {
             FINISH(3);
         } else {
-            //LOGE("Unknown invoke instr %02x at %d",
+            //ALOGE("Unknown invoke instr %02x at %d",
             //    invokeInstr, (int) (pc - curMethod->insns));
             assert(false);
         }
@@ -3985,7 +3985,7 @@
             {
                 FINISH(3);
             } else {
-                //LOGE("Unknown invoke instr %02x at %d",
+                //ALOGE("Unknown invoke instr %02x at %d",
                 //    invokeInstr, (int) (pc - curMethod->insns));
                 assert(false);
             }
diff --git a/vm/mterp/out/InterpC-x86-atom.cpp b/vm/mterp/out/InterpC-x86-atom.cpp
index b204ff9..00a1e50 100644
--- a/vm/mterp/out/InterpC-x86-atom.cpp
+++ b/vm/mterp/out/InterpC-x86-atom.cpp
@@ -102,7 +102,7 @@
         {                                                                   \
             char* desc;                                                     \
             desc = dexProtoCopyMethodDescriptor(&curMethod->prototype);     \
-            LOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
+            ALOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
                 myoff, (int) (pc - curMethod->insns),                       \
                 curMethod->clazz->descriptor, curMethod->name, desc);       \
             free(desc);                                                     \
@@ -321,14 +321,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
@@ -353,14 +353,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
@@ -1380,7 +1380,7 @@
             GOTO_exceptionThrown();
         } else if (typeCh != 'L' && typeCh != '[' && typeCh != 'I') {
             /* TODO: requires multiple "fill in" loops with different widths */
-            LOGE("non-int primitives not implemented");
+            ALOGE("non-int primitives not implemented");
             dvmThrowInternalError(
                 "filled-new-array not implemented for anything but 'int'");
             GOTO_exceptionThrown();
@@ -1897,7 +1897,7 @@
         {
             FINISH(3);
         } else {
-            //LOGE("Unknown invoke instr %02x at %d",
+            //ALOGE("Unknown invoke instr %02x at %d",
             //    invokeInstr, (int) (pc - curMethod->insns));
             assert(false);
         }
@@ -2274,7 +2274,7 @@
             {
                 FINISH(3);
             } else {
-                //LOGE("Unknown invoke instr %02x at %d",
+                //ALOGE("Unknown invoke instr %02x at %d",
                 //    invokeInstr, (int) (pc - curMethod->insns));
                 assert(false);
             }
diff --git a/vm/mterp/out/InterpC-x86.cpp b/vm/mterp/out/InterpC-x86.cpp
index 616e31f..ea441d7 100644
--- a/vm/mterp/out/InterpC-x86.cpp
+++ b/vm/mterp/out/InterpC-x86.cpp
@@ -102,7 +102,7 @@
         {                                                                   \
             char* desc;                                                     \
             desc = dexProtoCopyMethodDescriptor(&curMethod->prototype);     \
-            LOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
+            ALOGE("Invalid branch %d at 0x%04x in %s.%s %s",                 \
                 myoff, (int) (pc - curMethod->insns),                       \
                 curMethod->clazz->descriptor, curMethod->name, desc);       \
             free(desc);                                                     \
@@ -321,14 +321,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
@@ -353,14 +353,14 @@
     }
 #ifdef WITH_EXTRA_OBJECT_VALIDATION
     if (!dvmIsHeapAddress(obj)) {
-        LOGE("Invalid object %p", obj);
+        ALOGE("Invalid object %p", obj);
         dvmAbort();
     }
 #endif
 #ifndef NDEBUG
     if (obj->clazz == NULL || ((u4) obj->clazz) <= 65536) {
         /* probable heap corruption */
-        LOGE("Invalid object class %p (in %p)", obj->clazz, obj);
+        ALOGE("Invalid object class %p (in %p)", obj->clazz, obj);
         dvmAbort();
     }
 #endif
@@ -1322,7 +1322,7 @@
             GOTO_exceptionThrown();
         } else if (typeCh != 'L' && typeCh != '[' && typeCh != 'I') {
             /* TODO: requires multiple "fill in" loops with different widths */
-            LOGE("non-int primitives not implemented");
+            ALOGE("non-int primitives not implemented");
             dvmThrowInternalError(
                 "filled-new-array not implemented for anything but 'int'");
             GOTO_exceptionThrown();
@@ -1839,7 +1839,7 @@
         {
             FINISH(3);
         } else {
-            //LOGE("Unknown invoke instr %02x at %d",
+            //ALOGE("Unknown invoke instr %02x at %d",
             //    invokeInstr, (int) (pc - curMethod->insns));
             assert(false);
         }
@@ -2216,7 +2216,7 @@
             {
                 FINISH(3);
             } else {
-                //LOGE("Unknown invoke instr %02x at %d",
+                //ALOGE("Unknown invoke instr %02x at %d",
                 //    invokeInstr, (int) (pc - curMethod->insns));
                 assert(false);
             }
diff --git a/vm/native/dalvik_system_DexFile.cpp b/vm/native/dalvik_system_DexFile.cpp
index ad03e81..f328a19 100644
--- a/vm/native/dalvik_system_DexFile.cpp
+++ b/vm/native/dalvik_system_DexFile.cpp
@@ -122,7 +122,7 @@
     dvmHashTableUnlock(gDvm.userDexFiles);
 
     if (result != pDexOrJar) {
-        LOGE("Pointer has already been added?");
+        ALOGE("Pointer has already been added?");
         dvmAbort();
     }
 
diff --git a/vm/native/dalvik_system_Zygote.cpp b/vm/native/dalvik_system_Zygote.cpp
index 8d6ef4f..4e71e4f 100644
--- a/vm/native/dalvik_system_Zygote.cpp
+++ b/vm/native/dalvik_system_Zygote.cpp
@@ -206,7 +206,7 @@
         int err;
 
         if (rlimit_tuple->length != 3) {
-            LOGE("rlimits array must have a second dimension of size 3");
+            ALOGE("rlimits array must have a second dimension of size 3");
             return -1;
         }
 
@@ -236,7 +236,7 @@
     }
 
     if (!dvmGcPreZygoteFork()) {
-        LOGE("pre-fork heap failed");
+        ALOGE("pre-fork heap failed");
         dvmAbort();
     }
 
@@ -312,14 +312,14 @@
          * to disable that
          */
         if (prctl(PR_SET_DUMPABLE, 1, 0, 0, 0) < 0) {
-            LOGE("could not set dumpable bit flag for pid %d: %s",
+            ALOGE("could not set dumpable bit flag for pid %d: %s",
                  getpid(), strerror(errno));
         } else {
             struct rlimit rl;
             rl.rlim_cur = 0;
             rl.rlim_max = RLIM_INFINITY;
             if (setrlimit(RLIMIT_CORE, &rl) < 0) {
-                LOGE("could not disable core file generation for pid %d: %s",
+                ALOGE("could not disable core file generation for pid %d: %s",
                     getpid(), strerror(errno));
             }
         }
@@ -391,7 +391,7 @@
     }
 
     if (!dvmGcPreZygoteFork()) {
-        LOGE("pre-fork heap failed");
+        ALOGE("pre-fork heap failed");
         dvmAbort();
     }
 
@@ -413,7 +413,7 @@
             err = prctl(PR_SET_KEEPCAPS, 1, 0, 0, 0);
 
             if (err < 0) {
-                LOGE("cannot PR_SET_KEEPCAPS: %s", strerror(errno));
+                ALOGE("cannot PR_SET_KEEPCAPS: %s", strerror(errno));
                 dvmAbort();
             }
         }
@@ -423,32 +423,32 @@
         err = setgroupsIntarray(gids);
 
         if (err < 0) {
-            LOGE("cannot setgroups(): %s", strerror(errno));
+            ALOGE("cannot setgroups(): %s", strerror(errno));
             dvmAbort();
         }
 
         err = setrlimitsFromArray(rlimits);
 
         if (err < 0) {
-            LOGE("cannot setrlimit(): %s", strerror(errno));
+            ALOGE("cannot setrlimit(): %s", strerror(errno));
             dvmAbort();
         }
 
         err = setgid(gid);
         if (err < 0) {
-            LOGE("cannot setgid(%d): %s", gid, strerror(errno));
+            ALOGE("cannot setgid(%d): %s", gid, strerror(errno));
             dvmAbort();
         }
 
         err = setuid(uid);
         if (err < 0) {
-            LOGE("cannot setuid(%d): %s", uid, strerror(errno));
+            ALOGE("cannot setuid(%d): %s", uid, strerror(errno));
             dvmAbort();
         }
 
         err = setCapabilities(permittedCapabilities, effectiveCapabilities);
         if (err != 0) {
-            LOGE("cannot set capabilities (%llx,%llx): %s",
+            ALOGE("cannot set capabilities (%llx,%llx): %s",
                 permittedCapabilities, effectiveCapabilities, strerror(err));
             dvmAbort();
         }
@@ -465,7 +465,7 @@
         unsetSignalHandler();
         gDvm.zygote = false;
         if (!dvmInitAfterZygote()) {
-            LOGE("error in post-zygote initialization");
+            ALOGE("error in post-zygote initialization");
             dvmAbort();
         }
     } else if (pid > 0) {
@@ -509,7 +509,7 @@
          * we recheck here just to make sure that all is well.
          */
         if (waitpid(pid, &status, WNOHANG) == pid) {
-            LOGE("System server process %d has died. Restarting Zygote!", pid);
+            ALOGE("System server process %d has died. Restarting Zygote!", pid);
             kill(getpid(), SIGKILL);
         }
     }
diff --git a/vm/native/java_lang_Class.cpp b/vm/native/java_lang_Class.cpp
index 46606d8..93455e7 100644
--- a/vm/native/java_lang_Class.cpp
+++ b/vm/native/java_lang_Class.cpp
@@ -382,7 +382,7 @@
             case 'D': name = "double";  break;
             case 'V': name = "void";    break;
             default: {
-                LOGE("Unknown primitive type '%c'", descriptor[0]);
+                ALOGE("Unknown primitive type '%c'", descriptor[0]);
                 assert(false);
                 RETURN_PTR(NULL);
             }
diff --git a/vm/native/java_lang_System.cpp b/vm/native/java_lang_System.cpp
index 00bd87f..6ebf4f3 100644
--- a/vm/native/java_lang_System.cpp
+++ b/vm/native/java_lang_System.cpp
@@ -204,7 +204,7 @@
                 length * 8);
             break;
         default:        /* illegal array type */
-            LOGE("Weird array type '%s'", srcClass->descriptor);
+            ALOGE("Weird array type '%s'", srcClass->descriptor);
             dvmAbort();
         }
     } else {
diff --git a/vm/native/java_lang_VMClassLoader.cpp b/vm/native/java_lang_VMClassLoader.cpp
index 0640d95..eeff688 100644
--- a/vm/native/java_lang_VMClassLoader.cpp
+++ b/vm/native/java_lang_VMClassLoader.cpp
@@ -39,7 +39,7 @@
     char* name = NULL;
 
     name = dvmCreateCstrFromString(nameObj);
-    LOGE("ERROR: defineClass(%p, %s, %p, %d, %d)",
+    ALOGE("ERROR: defineClass(%p, %s, %p, %d, %d)",
         loader, name, data, offset, len);
     dvmThrowUnsupportedOperationException(
         "can't load this type of class file");
@@ -64,7 +64,7 @@
     int offset = args[2];
     int len = args[3];
 
-    LOGE("ERROR: defineClass(%p, %p, %d, %d)",
+    ALOGE("ERROR: defineClass(%p, %p, %d, %d)",
         loader, data, offset, len);
     dvmThrowUnsupportedOperationException(
         "can't load this type of class file");
diff --git a/vm/native/java_lang_reflect_Field.cpp b/vm/native/java_lang_reflect_Field.cpp
index d1918bc..dac784b 100644
--- a/vm/native/java_lang_reflect_Field.cpp
+++ b/vm/native/java_lang_reflect_Field.cpp
@@ -172,7 +172,7 @@
             value->l = dvmGetStaticFieldObjectVolatile(sfield);
             break;
         default:
-            LOGE("Unhandled field signature '%s'", sfield->signature);
+            ALOGE("Unhandled field signature '%s'", sfield->signature);
             dvmAbort();
         }
     }
@@ -219,7 +219,7 @@
             value->l = dvmGetFieldObject(obj, ifield->byteOffset);
             break;
         default:
-            LOGE("Unhandled field signature '%s'", ifield->signature);
+            ALOGE("Unhandled field signature '%s'", ifield->signature);
             dvmAbort();
         }
     } else {
@@ -254,7 +254,7 @@
             value->l = dvmGetFieldObjectVolatile(obj, ifield->byteOffset);
             break;
         default:
-            LOGE("Unhandled field signature '%s'", ifield->signature);
+            ALOGE("Unhandled field signature '%s'", ifield->signature);
             dvmAbort();
         }
     }
@@ -321,7 +321,7 @@
             dvmSetStaticFieldObjectVolatile(sfield, (Object*)value->l);
             break;
         default:
-            LOGE("Unhandled field signature '%s'", sfield->signature);
+            ALOGE("Unhandled field signature '%s'", sfield->signature);
             dvmAbort();
         }
     }
@@ -366,7 +366,7 @@
             dvmSetFieldObject(obj, ifield->byteOffset, (Object *)value->l);
             break;
         default:
-            LOGE("Unhandled field signature '%s'", ifield->signature);
+            ALOGE("Unhandled field signature '%s'", ifield->signature);
             dvmAbort();
         }
 #if ANDROID_SMP != 0
@@ -410,7 +410,7 @@
             dvmSetFieldObjectVolatile(obj, ifield->byteOffset, (Object*)value->l);
             break;
         default:
-            LOGE("Unhandled field signature '%s'", ifield->signature);
+            ALOGE("Unhandled field signature '%s'", ifield->signature);
             dvmAbort();
         }
     }
diff --git a/vm/oo/Array.cpp b/vm/oo/Array.cpp
index 0561988..00ec6d9 100644
--- a/vm/oo/Array.cpp
+++ b/vm/oo/Array.cpp
@@ -150,7 +150,7 @@
         width = 8;
         break;
     default:
-        LOGE("Unknown primitive type '%c'", type);
+        ALOGE("Unknown primitive type '%c'", type);
         dvmAbort();
         return NULL; // Keeps the compiler happy.
     }
@@ -413,7 +413,7 @@
         dvmFindSystemClassNoInit("Ljava/io/Serializable;");
     dvmLinearReadOnly(newClass->classLoader, newClass->interfaces);
     if (newClass->interfaces[0] == NULL || newClass->interfaces[1] == NULL) {
-        LOGE("Unable to create array class '%s': missing interfaces",
+        ALOGE("Unable to create array class '%s': missing interfaces",
             descriptor);
         dvmFreeClassInnards(newClass);
         dvmThrowInternalError("missing array ifaces");
@@ -614,7 +614,7 @@
         case 'Z': return 1;  /* boolean */
         }
     }
-    LOGE("class %p has an unhandled descriptor '%s'", arrayClass, descriptor);
+    ALOGE("class %p has an unhandled descriptor '%s'", arrayClass, descriptor);
     dvmDumpThread(dvmThreadSelf(), false);
     dvmAbort();
     return 0;  /* Quiet the compiler. */
diff --git a/vm/oo/Class.cpp b/vm/oo/Class.cpp
index b53ea3f..eecbb3a 100644
--- a/vm/oo/Class.cpp
+++ b/vm/oo/Class.cpp
@@ -410,7 +410,7 @@
 {
     /* make this a requirement -- don't currently support dirs in path */
     if (strcmp(gDvm.bootClassPathStr, ".") == 0) {
-        LOGE("ERROR: must specify non-'.' bootclasspath");
+        ALOGE("ERROR: must specify non-'.' bootclasspath");
         return false;
     }
 
@@ -609,7 +609,7 @@
         return false;
     }
     if (S_ISDIR(sb.st_mode)) {
-        LOGE("Directory classpath elements are not supported: %s", cpe->fileName);
+        ALOGE("Directory classpath elements are not supported: %s", cpe->fileName);
         return false;
     }
 
@@ -632,7 +632,7 @@
             return true;
         }
     } else {
-        LOGE("Unknown type suffix '%s'", suffix);
+        ALOGE("Unknown type suffix '%s'", suffix);
     }
 
     ALOGD("Unable to process classpath element '%s'", cpe->fileName);
@@ -700,7 +700,7 @@
         } else {
             if (isBootstrap &&
                     dvmPathToAbsolutePortion(cp) == NULL) {
-                LOGE("Non-absolute bootclasspath entry '%s'", cp);
+                ALOGE("Non-absolute bootclasspath entry '%s'", cp);
                 free(cpe);
                 cpe = NULL;
                 goto bail;
@@ -737,7 +737,7 @@
          * There's no way the vm will be doing anything if this is the
          * case, so just bail out (reasonably) gracefully.
          */
-        LOGE("No valid entries found in bootclasspath '%s'", pathStr);
+        ALOGE("No valid entries found in bootclasspath '%s'", pathStr);
         gDvm.lastMessage = pathStr;
         dvmAbort();
     }
@@ -811,7 +811,7 @@
             }
             break;
         default:
-            LOGE("Unknown kind %d", cpe->kind);
+            ALOGE("Unknown kind %d", cpe->kind);
             assert(false);
             break;
         }
@@ -1495,7 +1495,7 @@
      * making it an informative abort rather than an assert).
      */
     if (dvmCheckException(self)) {
-        LOGE("Class lookup %s attempted with exception pending", descriptor);
+        ALOGE("Class lookup %s attempted with exception pending", descriptor);
         ALOGW("Pending exception is:");
         dvmLogExceptionStackTrace();
         dvmDumpAllThreads(false);
@@ -1874,7 +1874,7 @@
         if (classMapData != NULL &&
             pHeader->directMethodsSize + pHeader->virtualMethodsSize != numMethods)
         {
-            LOGE("ERROR: in %s, direct=%d virtual=%d, maps have %d",
+            ALOGE("ERROR: in %s, direct=%d virtual=%d, maps have %d",
                 newClass->descriptor, pHeader->directMethodsSize,
                 pHeader->virtualMethodsSize, numMethods);
             assert(false);
@@ -2132,8 +2132,8 @@
 static void cloneMethod(Method* dst, const Method* src)
 {
     if (src->registerMap != NULL) {
-        LOGE("GLITCH: only expected abstract methods here");
-        LOGE("        cloning %s.%s", src->clazz->descriptor, src->name);
+        ALOGE("GLITCH: only expected abstract methods here");
+        ALOGE("        cloning %s.%s", src->clazz->descriptor, src->name);
         dvmAbort();
     }
     memcpy(dst, src, sizeof(Method));
@@ -2425,7 +2425,7 @@
     }
     dvmLinearReadOnly(clazz->classLoader, clazz->ifields);
     if (i == clazz->ifieldRefCount) {
-        LOGE("Unable to reorder 'referent' in %s", clazz->descriptor);
+        ALOGE("Unable to reorder 'referent' in %s", clazz->descriptor);
         return false;
     }
 
@@ -2434,7 +2434,7 @@
      * info about the class.
      */
     if (!dvmFindReferenceMembers(clazz)) {
-        LOGE("Trouble with Reference setup");
+        ALOGE("Trouble with Reference setup");
         return false;
     }
 
@@ -2521,12 +2521,12 @@
         (strcmp(clazz->descriptor, "Ljava/lang/Class;") == 0))
     {
         if (gDvm.classJavaLangClass->ifieldCount > CLASS_FIELD_SLOTS) {
-            LOGE("java.lang.Class has %d instance fields (expected at most %d)",
+            ALOGE("java.lang.Class has %d instance fields (expected at most %d)",
                  gDvm.classJavaLangClass->ifieldCount, CLASS_FIELD_SLOTS);
             dvmAbort();
         }
         if (gDvm.classJavaLangClass->sfieldCount != CLASS_SFIELD_SLOTS) {
-            LOGE("java.lang.Class has %d static fields (expected %d)",
+            ALOGE("java.lang.Class has %d static fields (expected %d)",
                  gDvm.classJavaLangClass->sfieldCount, CLASS_SFIELD_SLOTS);
             dvmAbort();
         }
@@ -2757,7 +2757,7 @@
         int count = clazz->virtualMethodCount;
 
         if (count != (u2) count) {
-            LOGE("Too many methods (%d) in interface '%s'", count,
+            ALOGE("Too many methods (%d) in interface '%s'", count,
                  clazz->descriptor);
             goto bail;
         }
@@ -2801,7 +2801,7 @@
     if ((clazz->classLoader == NULL)
             && (strcmp(clazz->descriptor, "Ljava/lang/ref/Reference;") == 0)) {
         if (!precacheReferenceOffsets(clazz)) {
-            LOGE("failed pre-caching Reference offsets");
+            ALOGE("failed pre-caching Reference offsets");
             dvmThrowInternalError(NULL);
             goto bail;
         }
@@ -2942,7 +2942,7 @@
         }
 
         if (actualCount != (u2) actualCount) {
-            LOGE("Too many methods (%d) in class '%s'", actualCount,
+            ALOGE("Too many methods (%d) in class '%s'", actualCount,
                  clazz->descriptor);
             goto bail;
         }
@@ -2955,7 +2955,7 @@
             clazz->vtable = (Method **)dvmLinearRealloc(clazz->classLoader,
                 clazz->vtable, sizeof(*(clazz->vtable)) * actualCount);
             if (clazz->vtable == NULL) {
-                LOGE("vtable realloc failed");
+                ALOGE("vtable realloc failed");
                 goto bail;
             } else {
                 LOGVV("+++  reduced vtable from %d to %d",
@@ -2968,7 +2968,7 @@
         /* java/lang/Object case */
         int count = clazz->virtualMethodCount;
         if (count != (u2) count) {
-            LOGE("Too many methods (%d) in base class '%s'", count,
+            ALOGE("Too many methods (%d) in base class '%s'", count,
                  clazz->descriptor);
             goto bail;
         }
@@ -3819,7 +3819,7 @@
              * that this can't happen at least due to a data integrity
              * problem.
              */
-            LOGE("Static initializer parse failed for %s at index %d",
+            ALOGE("Static initializer parse failed for %s at index %d",
                     clazz->descriptor, i);
             dvmAbort();
         }
@@ -3887,7 +3887,7 @@
              * Something up above had a problem. TODO: See comment
              * above the switch about verfication.
              */
-            LOGE("Bogus static initialization: value type %d in field type "
+            ALOGE("Bogus static initialization: value type %d in field type "
                     "%s for %s at index %d",
                 value.type, descriptor, clazz->descriptor, i);
             dvmAbort();
diff --git a/vm/reflect/Annotation.cpp b/vm/reflect/Annotation.cpp
index e5df65a..233db08 100644
--- a/vm/reflect/Annotation.cpp
+++ b/vm/reflect/Annotation.cpp
@@ -489,7 +489,7 @@
             newArray = dvmAllocArrayByClass(gDvm.classJavaLangObjectArray,
                 size, ALLOC_DEFAULT);
             if (newArray == NULL) {
-                LOGE("annotation element array alloc failed (%d)", size);
+                ALOGE("annotation element array alloc failed (%d)", size);
                 return false;
             }
 
@@ -531,7 +531,7 @@
         width = 0;
         break;
     default:
-        LOGE("Bad annotation element value byte 0x%02x (0x%02x)",
+        ALOGE("Bad annotation element value byte 0x%02x (0x%02x)",
             valueType, valueType & kDexAnnotationValueTypeMask);
         assert(false);
         return false;
@@ -580,7 +580,7 @@
      * (valueObj->clazz->descriptor+1, valueObj->clazz->classLoader).
      */
     if (strcmp(valueObj->clazz->descriptor, "[Ljava/lang/Object;") != 0) {
-        LOGE("Unexpected src type class (%s)", valueObj->clazz->descriptor);
+        ALOGE("Unexpected src type class (%s)", valueObj->clazz->descriptor);
         return NULL;
     }
     srcElemClass = gDvm.classJavaLangObject;
@@ -605,7 +605,7 @@
 
     newArray = dvmAllocArrayByClass(methodReturn, length, ALLOC_DEFAULT);
     if (newArray == NULL) {
-        LOGE("Failed creating duplicate annotation class (%s %d)",
+        ALOGE("Failed creating duplicate annotation class (%s %d)",
             methodReturn->descriptor, length);
         goto bail;
     }
@@ -617,7 +617,7 @@
         success = dvmUnboxObjectArray(newArray, srcArray, dstElemClass);
     }
     if (!success) {
-        LOGE("Annotation array copy failed");
+        ALOGE("Annotation array copy failed");
         dvmReleaseTrackedAlloc((Object*)newArray, self);
         newArray = NULL;
         goto bail;
@@ -686,7 +686,7 @@
     if (newMember == NULL || nameObj == NULL || methodObj == NULL ||
         methodReturn == NULL)
     {
-        LOGE("Failed creating annotation element (m=%p n=%p a=%p r=%p)",
+        ALOGE("Failed creating annotation element (m=%p n=%p a=%p r=%p)",
             newMember, nameObj, methodObj, methodReturn);
         goto bail;
     }
@@ -755,7 +755,7 @@
     if (annoClass == NULL) {
         annoClass = dvmResolveClass(clazz, typeIdx, true);
         if (annoClass == NULL) {
-            LOGE("Unable to resolve %s annotation class %d",
+            ALOGE("Unable to resolve %s annotation class %d",
                 clazz->descriptor, typeIdx);
             assert(dvmCheckException(self));
             return NULL;
@@ -778,7 +778,7 @@
             gDvm.classOrgApacheHarmonyLangAnnotationAnnotationMemberArray,
             size, ALLOC_DEFAULT);
         if (elementArray == NULL) {
-            LOGE("failed to allocate annotation member array (%d elements)",
+            ALOGE("failed to allocate annotation member array (%d elements)",
                 size);
             goto bail;
         }
@@ -1000,7 +1000,7 @@
         width = 0;
         break;
     default:
-        LOGE("Bad annotation element value byte 0x%02x", valueType);
+        ALOGE("Bad annotation element value byte 0x%02x", valueType);
         assert(false);
         return false;
     }
@@ -1616,7 +1616,7 @@
     if (hi < lo) {
         /* this should be impossible -- the method came out of this DEX */
         char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
-        LOGE("Unable to find method %s.%s %s in DEX file!",
+        ALOGE("Unable to find method %s.%s %s in DEX file!",
             method->clazz->descriptor, method->name, desc);
         free(desc);
         dvmAbort();
@@ -1925,7 +1925,7 @@
 
     if (hi < lo) {
         /* this should be impossible -- the field came out of this DEX */
-        LOGE("Unable to find field %s.%s %s in DEX file!",
+        ALOGE("Unable to find field %s.%s %s in DEX file!",
             field->clazz->descriptor, field->name, field->signature);
         dvmAbort();
     }
@@ -2254,7 +2254,7 @@
             value, kPrimitivesOrObjects);
 
     if (! processed) {
-        LOGE("Failed to process array element %d from %p",
+        ALOGE("Failed to process array element %d from %p",
                 iterator->size - iterator->elementsLeft,
                 iterator->encodedArray);
         iterator->elementsLeft = 0;
diff --git a/vm/reflect/Proxy.cpp b/vm/reflect/Proxy.cpp
index 94a87c2..02d43eb 100644
--- a/vm/reflect/Proxy.cpp
+++ b/vm/reflect/Proxy.cpp
@@ -200,7 +200,7 @@
      * with a duplicate name.
      */
     if (!dvmAddClassToHash(newClass)) {
-        LOGE("ERROR: attempted to generate %s more than once",
+        ALOGE("ERROR: attempted to generate %s more than once",
             newClass->descriptor);
         goto bail;
     }
@@ -492,7 +492,7 @@
                             gDvm.classJavaLangClassArray, commonCount,
                             ALLOC_DEFAULT);
                     if (throwArray == NULL) {
-                        LOGE("common-throw array alloc failed");
+                        ALOGE("common-throw array alloc failed");
                         return -1;
                     }
 
@@ -893,7 +893,7 @@
     invoke = dvmFindVirtualMethodHierByDescriptor(handler->clazz, "invoke",
             "(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;");
     if (invoke == NULL) {
-        LOGE("Unable to find invoke()");
+        ALOGE("Unable to find invoke()");
         dvmAbort();
     }
 
@@ -925,7 +925,7 @@
     returnType = dvmGetBoxedReturnType(method);
     if (returnType == NULL) {
         char* desc = dexProtoCopyMethodDescriptor(&method->prototype);
-        LOGE("Could not determine return type for '%s'", desc);
+        ALOGE("Could not determine return type for '%s'", desc);
         free(desc);
         assert(dvmCheckException(self));
         goto bail;
diff --git a/vm/reflect/Reflect.cpp b/vm/reflect/Reflect.cpp
index e43f1ae..c5d7fbe 100644
--- a/vm/reflect/Reflect.cpp
+++ b/vm/reflect/Reflect.cpp
@@ -49,12 +49,12 @@
 
         clazz = dvmFindClassNoInit(*ccp, NULL);
         if (clazz == NULL) {
-            LOGE("Couldn't find '%s'", *ccp);
+            ALOGE("Couldn't find '%s'", *ccp);
             return false;
         }
 
         if (clazz->ifieldCount != 1) {
-            LOGE("Found %d instance fields in '%s'",
+            ALOGE("Found %d instance fields in '%s'",
                 clazz->ifieldCount, *ccp);
             return false;
         }
@@ -1165,7 +1165,7 @@
     default: {
         /* should not have passed verification */
         char* desc = dexProtoCopyMethodDescriptor(&meth->prototype);
-        LOGE("Bad return type in signature '%s'", desc);
+        ALOGE("Bad return type in signature '%s'", desc);
         free(desc);
         dvmThrowInternalError(NULL);
         return NULL;
diff --git a/vm/test/TestHash.cpp b/vm/test/TestHash.cpp
index a58ee3f..52e421b 100644
--- a/vm/test/TestHash.cpp
+++ b/vm/test/TestHash.cpp
@@ -44,7 +44,7 @@
     //printf("Print from foreach:\n");
     dvmHashForeach(pTab, printFunc, &count);
     if (count != kNumTestEntries) {
-        LOGE("TestHash foreach test failed");
+        ALOGE("TestHash foreach test failed");
         assert(false);
     }
 }
@@ -67,7 +67,7 @@
         count++;
     }
     if (count != kNumTestEntries) {
-        LOGE("TestHash iterator test failed");
+        ALOGE("TestHash iterator test failed");
         assert(false);
     }
 }
@@ -108,7 +108,7 @@
         str = (const char*) dvmHashTableLookup(pTab, hash, tmpStr,
                 (HashCompareFunc) strcmp, false);
         if (str == NULL) {
-            LOGE("TestHash: failure: could not find '%s'", tmpStr);
+            ALOGE("TestHash: failure: could not find '%s'", tmpStr);
             /* return false */
         }
     }
@@ -121,7 +121,7 @@
     if (str == NULL) {
         /* good */
     } else {
-        LOGE("TestHash found nonexistent string (improper add?)");
+        ALOGE("TestHash found nonexistent string (improper add?)");
     }
 
     dumpForeach(pTab);
@@ -150,7 +150,7 @@
 
     /* remove the first one */
     if (!dvmHashTableRemove(pTab, hash, (void*)str1))
-        LOGE("TestHash failed to delete item");
+        ALOGE("TestHash failed to delete item");
     else
         free((void*)str1);     // "Remove" doesn't call the free func
 
@@ -163,18 +163,18 @@
         count++;
     }
     if (count != 1) {
-        LOGE("TestHash wrong number of entries (%d)", count);
+        ALOGE("TestHash wrong number of entries (%d)", count);
     }
 
     /* see if we can find them */
     str = (const char*) dvmHashTableLookup(pTab, hash, (void*)"one",
             (HashCompareFunc) strcmp,false);
     if (str != NULL)
-        LOGE("TestHash deleted entry has returned!");
+        ALOGE("TestHash deleted entry has returned!");
     str = (const char*) dvmHashTableLookup(pTab, hash, (void*)"two",
             (HashCompareFunc) strcmp,false);
     if (str == NULL)
-        LOGE("TestHash entry vanished");
+        ALOGE("TestHash entry vanished");
 
     /* force a table realloc to exercise tombstone removal */
     for (i = 0; i < 20; i++) {
diff --git a/vm/test/TestIndirectRefTable.cpp b/vm/test/TestIndirectRefTable.cpp
index 0997d61..f144254 100644
--- a/vm/test/TestIndirectRefTable.cpp
+++ b/vm/test/TestIndirectRefTable.cpp
@@ -79,7 +79,7 @@
 
     iref0 = (IndirectRef) 0x11110;
     if (irt.remove(cookie, iref0)) {
-        LOGE("unexpectedly successful removal");
+        ALOGE("unexpectedly successful removal");
         goto bail;
     }
 
@@ -91,14 +91,14 @@
     iref1 = irt.add(cookie, obj1);
     iref2 = irt.add(cookie, obj2);
     if (iref0 == NULL || iref1 == NULL || iref2 == NULL) {
-        LOGE("trivial add1 failed");
+        ALOGE("trivial add1 failed");
         goto bail;
     }
 
     if (irt.get(iref0) != obj0 ||
             irt.get(iref1) != obj1 ||
             irt.get(iref2) != obj2) {
-        LOGE("objects don't match expected values %p %p %p vs. %p %p %p",
+        ALOGE("objects don't match expected values %p %p %p vs. %p %p %p",
                 irt.get(iref0), irt.get(iref1), irt.get(iref2),
                 obj0, obj1, obj2);
         goto bail;
@@ -110,19 +110,19 @@
             !irt.remove(cookie, iref1) ||
             !irt.remove(cookie, iref2))
     {
-        LOGE("fifo deletion failed");
+        ALOGE("fifo deletion failed");
         goto bail;
     }
 
     /* table should be empty now */
     if (irt.capacity() != 0) {
-        LOGE("fifo del not empty");
+        ALOGE("fifo del not empty");
         goto bail;
     }
 
     /* get invalid entry (off the end of the list) */
     if (irt.get(iref0) != kInvalidIndirectRefObject) {
-        LOGE("stale entry get succeeded unexpectedly");
+        ALOGE("stale entry get succeeded unexpectedly");
         goto bail;
     }
 
@@ -134,7 +134,7 @@
     iref1 = irt.add(cookie, obj1);
     iref2 = irt.add(cookie, obj2);
     if (iref0 == NULL || iref1 == NULL || iref2 == NULL) {
-        LOGE("trivial add2 failed");
+        ALOGE("trivial add2 failed");
         goto bail;
     }
 
@@ -142,13 +142,13 @@
             !irt.remove(cookie, iref1) ||
             !irt.remove(cookie, iref0))
     {
-        LOGE("lifo deletion failed");
+        ALOGE("lifo deletion failed");
         goto bail;
     }
 
     /* table should be empty now */
     if (irt.capacity() != 0) {
-        LOGE("lifo del not empty");
+        ALOGE("lifo del not empty");
         goto bail;
     }
 
@@ -161,34 +161,34 @@
     iref1 = irt.add(cookie, obj1);
     iref2 = irt.add(cookie, obj2);
     if (iref0 == NULL || iref1 == NULL || iref2 == NULL) {
-        LOGE("trivial add3 failed");
+        ALOGE("trivial add3 failed");
         goto bail;
     }
 
     if (irt.capacity() != 3) {
-        LOGE("expected 3 entries, found %d", irt.capacity());
+        ALOGE("expected 3 entries, found %d", irt.capacity());
         goto bail;
     }
 
     if (!irt.remove(cookie, iref1) || irt.remove(cookie, iref1)) {
-        LOGE("unorder deletion1 failed");
+        ALOGE("unorder deletion1 failed");
         goto bail;
     }
 
     /* get invalid entry (from hole) */
     if (irt.get(iref1) != kInvalidIndirectRefObject) {
-        LOGE("hole get succeeded unexpectedly");
+        ALOGE("hole get succeeded unexpectedly");
         goto bail;
     }
 
     if (!irt.remove(cookie, iref2) || !irt.remove(cookie, iref0)) {
-        LOGE("unorder deletion2 failed");
+        ALOGE("unorder deletion2 failed");
         goto bail;
     }
 
     /* table should be empty now */
     if (irt.capacity() != 0) {
-        LOGE("unorder del not empty");
+        ALOGE("unorder del not empty");
         goto bail;
     }
 
@@ -203,32 +203,32 @@
     iref2 = irt.add(cookie, obj2);
     iref3 = irt.add(cookie, obj3);
     if (iref0 == NULL || iref1 == NULL || iref2 == NULL || iref3 == NULL) {
-        LOGE("trivial add4 failed");
+        ALOGE("trivial add4 failed");
         goto bail;
     }
     if (!irt.remove(cookie, iref1)) {
-        LOGE("remove 1 of 4 failed");
+        ALOGE("remove 1 of 4 failed");
         goto bail;
     }
     iref1 = irt.add(cookie, obj1);
     if (irt.capacity() != 4) {
-        LOGE("hole not filled");
+        ALOGE("hole not filled");
         goto bail;
     }
     if (!irt.remove(cookie, iref1) || !irt.remove(cookie, iref3)) {
-        LOGE("remove 1/3 failed");
+        ALOGE("remove 1/3 failed");
         goto bail;
     }
     if (irt.capacity() != 3) {
-        LOGE("should be 3 after two deletions");
+        ALOGE("should be 3 after two deletions");
         goto bail;
     }
     if (!irt.remove(cookie, iref2) || !irt.remove(cookie, iref0)) {
-        LOGE("remove 2/0 failed");
+        ALOGE("remove 2/0 failed");
         goto bail;
     }
     if (irt.capacity() != 0) {
-        LOGE("not empty after split remove");
+        ALOGE("not empty after split remove");
         goto bail;
     }
 
@@ -242,15 +242,15 @@
     irt.remove(cookie, iref0);
     iref1 = irt.add(cookie, obj1);
     if (irt.remove(cookie, iref0)) {
-        LOGE("mismatched del succeeded (%p vs %p)", iref0, iref1);
+        ALOGE("mismatched del succeeded (%p vs %p)", iref0, iref1);
         goto bail;
     }
     if (!irt.remove(cookie, iref1)) {
-        LOGE("switched del failed");
+        ALOGE("switched del failed");
         goto bail;
     }
     if (irt.capacity() != 0) {
-        LOGE("switching del not empty");
+        ALOGE("switching del not empty");
         goto bail;
     }
 
@@ -265,22 +265,22 @@
     if (iref0 != iref1) {
         /* try 0, should not work */
         if (irt.remove(cookie, iref0)) {
-            LOGE("temporal del succeeded (%p vs %p)", iref0, iref1);
+            ALOGE("temporal del succeeded (%p vs %p)", iref0, iref1);
             goto bail;
         }
     }
     if (!irt.remove(cookie, iref1)) {
-        LOGE("temporal cleanup failed");
+        ALOGE("temporal cleanup failed");
         goto bail;
     }
     if (irt.capacity() != 0) {
-        LOGE("temporal del not empty");
+        ALOGE("temporal del not empty");
         goto bail;
     }
 
     DBUG_MSG("+++ START null lookup\n");
     if (irt.get(NULL) != kInvalidIndirectRefObject) {
-        LOGE("null lookup succeeded");
+        ALOGE("null lookup succeeded");
         goto bail;
     }
 
@@ -288,7 +288,7 @@
     iref0 = irt.add(cookie, obj0);
     irt.remove(cookie, iref0);
     if (irt.get(iref0) != kInvalidIndirectRefObject) {
-        LOGE("stale lookup succeeded");
+        ALOGE("stale lookup succeeded");
         goto bail;
     }
 
@@ -300,38 +300,38 @@
     for (i = 0; i < kTableMax; i++) {
         manyRefs[i] = irt.add(cookie, obj0);
         if (manyRefs[i] == NULL) {
-            LOGE("Failed adding %d of %d", i, kTableMax);
+            ALOGE("Failed adding %d of %d", i, kTableMax);
             goto bail;
         }
     }
     if (irt.add(cookie, obj0) != NULL) {
-        LOGE("Table overflow succeeded");
+        ALOGE("Table overflow succeeded");
         goto bail;
     }
     if (irt.capacity() != (size_t)kTableMax) {
-        LOGE("Expected %d entries, found %d", kTableMax, irt.capacity());
+        ALOGE("Expected %d entries, found %d", kTableMax, irt.capacity());
         goto bail;
     }
     irt.dump("table with 20 entries, all filled");
     for (i = 0; i < kTableMax-1; i++) {
         if (!irt.remove(cookie, manyRefs[i])) {
-            LOGE("multi-remove failed at %d", i);
+            ALOGE("multi-remove failed at %d", i);
             goto bail;
         }
     }
     irt.dump("table with 20 entries, 19 of them holes");
     /* because of removal order, should have 20 entries, 19 of them holes */
     if (irt.capacity() != (size_t)kTableMax) {
-        LOGE("Expected %d entries (with holes), found %d",
+        ALOGE("Expected %d entries (with holes), found %d",
                 kTableMax, irt.capacity());
         goto bail;
     }
     if (!irt.remove(cookie, manyRefs[kTableMax-1])) {
-        LOGE("multi-remove final failed");
+        ALOGE("multi-remove final failed");
         goto bail;
     }
     if (irt.capacity() != 0) {
-        LOGE("multi-del not empty");
+        ALOGE("multi-del not empty");
         goto bail;
     }
 
@@ -410,12 +410,12 @@
 bool dvmTestIndirectRefTable()
 {
     if (!basicTest()) {
-        LOGE("IRT basic test failed");
+        ALOGE("IRT basic test failed");
         return false;
     }
 
     if (!performanceTest()) {
-        LOGE("IRT performance test failed");
+        ALOGE("IRT performance test failed");
         return false;
     }