diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 641134a..a42c336 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -493,7 +493,7 @@
 
 void IPCThreadState::stopProcess(bool immediate)
 {
-    //LOGI("**** STOPPING PROCESS");
+    //ALOGI("**** STOPPING PROCESS");
     flushCommands();
     int fd = mProcess->mDriverFD;
     mProcess->mDriverFD = -1;
@@ -530,9 +530,9 @@
     if ((flags & TF_ONE_WAY) == 0) {
         #if 0
         if (code == 4) { // relayout
-            LOGI(">>>>>> CALLING transaction 4");
+            ALOGI(">>>>>> CALLING transaction 4");
         } else {
-            LOGI(">>>>>> CALLING transaction %d", code);
+            ALOGI(">>>>>> CALLING transaction %d", code);
         }
         #endif
         if (reply) {
@@ -543,9 +543,9 @@
         }
         #if 0
         if (code == 4) { // relayout
-            LOGI("<<<<<< RETURNING transaction 4");
+            ALOGI("<<<<<< RETURNING transaction 4");
         } else {
-            LOGI("<<<<<< RETURNING transaction %d", code);
+            ALOGI("<<<<<< RETURNING transaction %d", code);
         }
         #endif
         
@@ -1009,7 +1009,7 @@
                 }
             }
 
-            //LOGI(">>>> TRANSACT from pid %d uid %d\n", mCallingPid, mCallingUid);
+            //ALOGI(">>>> TRANSACT from pid %d uid %d\n", mCallingPid, mCallingUid);
             
             Parcel reply;
             IF_LOG_TRANSACTIONS() {
@@ -1033,7 +1033,7 @@
                 if (error < NO_ERROR) reply.setError(error);
             }
             
-            //LOGI("<<<< TRANSACT from pid %d restore pid %d uid %d\n",
+            //ALOGI("<<<< TRANSACT from pid %d restore pid %d uid %d\n",
             //     mCallingPid, origPid, origUid);
             
             if ((tr.flags & TF_ONE_WAY) == 0) {
@@ -1110,7 +1110,7 @@
                                 const size_t* objects, size_t objectsSize,
                                 void* cookie)
 {
-    //LOGI("Freeing parcel %p", &parcel);
+    //ALOGI("Freeing parcel %p", &parcel);
     IF_LOG_COMMANDS() {
         alog << "Writing BC_FREE_BUFFER for " << data << endl;
     }
diff --git a/libs/binder/IServiceManager.cpp b/libs/binder/IServiceManager.cpp
index 1fa4c35..1c1b546 100644
--- a/libs/binder/IServiceManager.cpp
+++ b/libs/binder/IServiceManager.cpp
@@ -78,7 +78,7 @@
             bool res = pc->checkPermission(permission, pid, uid);
             if (res) {
                 if (startTime != 0) {
-                    LOGI("Check passed after %d seconds for %s from uid=%d pid=%d",
+                    ALOGI("Check passed after %d seconds for %s from uid=%d pid=%d",
                             (int)((uptimeMillis()-startTime)/1000),
                             String8(permission).string(), uid, pid);
                 }
@@ -106,7 +106,7 @@
             // Wait for the permission controller to come back...
             if (startTime == 0) {
                 startTime = uptimeMillis();
-                LOGI("Waiting to check permission %s from uid=%d pid=%d",
+                ALOGI("Waiting to check permission %s from uid=%d pid=%d",
                         String8(permission).string(), uid, pid);
             }
             sleep(1);
@@ -136,7 +136,7 @@
         for (n = 0; n < 5; n++){
             sp<IBinder> svc = checkService(name);
             if (svc != NULL) return svc;
-            LOGI("Waiting for service %s...\n", String8(name).string());
+            ALOGI("Waiting for service %s...\n", String8(name).string());
             sleep(1);
         }
         return NULL;
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 4ec2243..e455980 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -1096,7 +1096,7 @@
     if (flat) {
         switch (flat->type) {
             case BINDER_TYPE_FD:
-                //LOGI("Returning file descriptor %ld from parcel %p\n", flat->handle, this);
+                //ALOGI("Returning file descriptor %ld from parcel %p\n", flat->handle, this);
                 return flat->handle;
         }        
     }
@@ -1226,14 +1226,14 @@
 {
     size_t i = mObjectsSize;
     if (i > 0) {
-        //LOGI("Closing file descriptors for %d objects...", mObjectsSize);
+        //ALOGI("Closing file descriptors for %d objects...", mObjectsSize);
     }
     while (i > 0) {
         i--;
         const flat_binder_object* flat
             = reinterpret_cast<flat_binder_object*>(mData+mObjects[i]);
         if (flat->type == BINDER_TYPE_FD) {
-            //LOGI("Closing fd: %ld\n", flat->handle);
+            //ALOGI("Closing fd: %ld\n", flat->handle);
             close(flat->handle);
         }
     }
@@ -1266,7 +1266,7 @@
     mError = NO_ERROR;
     mData = const_cast<uint8_t*>(data);
     mDataSize = mDataCapacity = dataSize;
-    //LOGI("setDataReference Setting data size of %p to %lu (pid=%d)\n", this, mDataSize, getpid());
+    //ALOGI("setDataReference Setting data size of %p to %lu (pid=%d)\n", this, mDataSize, getpid());
     mDataPos = 0;
     ALOGV("setDataReference Setting data pos of %p to %d\n", this, mDataPos);
     mObjects = const_cast<size_t*>(objects);
@@ -1340,7 +1340,7 @@
 void Parcel::freeDataNoInit()
 {
     if (mOwner) {
-        //LOGI("Freeing data ref of %p (pid=%d)\n", this, getpid());
+        //ALOGI("Freeing data ref of %p (pid=%d)\n", this, getpid());
         mOwner(this, mData, mDataSize, mObjects, mObjectsSize, mOwnerCookie);
     } else {
         releaseObjects();
@@ -1446,7 +1446,7 @@
         if (objects && mObjects) {
             memcpy(objects, mObjects, objectsSize*sizeof(size_t));
         }
-        //LOGI("Freeing data ref of %p (pid=%d)\n", this, getpid());
+        //ALOGI("Freeing data ref of %p (pid=%d)\n", this, getpid());
         mOwner(this, mData, mDataSize, mObjects, mObjectsSize, mOwnerCookie);
         mOwner = NULL;
 
diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp
index fa0ee8c..104cefb 100644
--- a/libs/gui/SurfaceTexture.cpp
+++ b/libs/gui/SurfaceTexture.cpp
@@ -64,7 +64,7 @@
 // Macros for including the SurfaceTexture name in log messages
 #define ST_LOGV(x, ...) ALOGV("[%s] "x, mName.string(), ##__VA_ARGS__)
 #define ST_LOGD(x, ...) ALOGD("[%s] "x, mName.string(), ##__VA_ARGS__)
-#define ST_LOGI(x, ...) LOGI("[%s] "x, mName.string(), ##__VA_ARGS__)
+#define ST_LOGI(x, ...) ALOGI("[%s] "x, mName.string(), ##__VA_ARGS__)
 #define ST_LOGW(x, ...) LOGW("[%s] "x, mName.string(), ##__VA_ARGS__)
 #define ST_LOGE(x, ...) LOGE("[%s] "x, mName.string(), ##__VA_ARGS__)
 
diff --git a/libs/utils/Asset.cpp b/libs/utils/Asset.cpp
index 7c34c6a..07693bb 100644
--- a/libs/utils/Asset.cpp
+++ b/libs/utils/Asset.cpp
@@ -89,7 +89,7 @@
   	    gTail->mNext = this;
   	    gTail = this;
   	}
-    //LOGI("Creating Asset %p #%d\n", this, gCount);
+    //ALOGI("Creating Asset %p #%d\n", this, gCount);
 }
 
 Asset::~Asset(void)
@@ -109,7 +109,7 @@
         mPrev->mNext = mNext;
     }
     mNext = mPrev = NULL;
-    //LOGI("Destroying Asset in %p #%d\n", this, gCount);
+    //ALOGI("Destroying Asset in %p #%d\n", this, gCount);
 }
 
 /*
diff --git a/libs/utils/AssetManager.cpp b/libs/utils/AssetManager.cpp
index e7c4d47..77db3d4 100644
--- a/libs/utils/AssetManager.cpp
+++ b/libs/utils/AssetManager.cpp
@@ -117,14 +117,14 @@
       mCacheMode(cacheMode), mCacheValid(false)
 {
     int count = android_atomic_inc(&gCount)+1;
-    //LOGI("Creating AssetManager %p #%d\n", this, count);
+    //ALOGI("Creating AssetManager %p #%d\n", this, count);
     memset(mConfig, 0, sizeof(ResTable_config));
 }
 
 AssetManager::~AssetManager(void)
 {
     int count = android_atomic_dec(&gCount);
-    //LOGI("Destroying AssetManager in %p #%d\n", this, count);
+    //ALOGI("Destroying AssetManager in %p #%d\n", this, count);
 
     delete mConfig;
     delete mResources;
@@ -1780,7 +1780,7 @@
     : mPath(path), mZipFile(NULL), mModWhen(modWhen),
       mResourceTableAsset(NULL), mResourceTable(NULL)
 {
-    //LOGI("Creating SharedZip %p %s\n", this, (const char*)mPath);
+    //ALOGI("Creating SharedZip %p %s\n", this, (const char*)mPath);
     mZipFile = new ZipFileRO;
     ALOGV("+++ opening zip '%s'\n", mPath.string());
     if (mZipFile->open(mPath.string()) != NO_ERROR) {
@@ -1858,7 +1858,7 @@
 
 AssetManager::SharedZip::~SharedZip()
 {
-    //LOGI("Destroying SharedZip %p %s\n", this, (const char*)mPath);
+    //ALOGI("Destroying SharedZip %p %s\n", this, (const char*)mPath);
     if (mResourceTable != NULL) {
         delete mResourceTable;
     }
diff --git a/libs/utils/BackupData.cpp b/libs/utils/BackupData.cpp
index 5afe2dc..f956306 100644
--- a/libs/utils/BackupData.cpp
+++ b/libs/utils/BackupData.cpp
@@ -78,7 +78,7 @@
     paddingSize = padding_extra(n);
     if (paddingSize > 0) {
         uint32_t padding = 0xbcbcbcbc;
-        if (DEBUG) LOGI("writing %d padding bytes for %d", paddingSize, n);
+        if (DEBUG) ALOGI("writing %d padding bytes for %d", paddingSize, n);
         amt = write(m_fd, &padding, paddingSize);
         if (amt != paddingSize) {
             m_status = errno;
@@ -125,7 +125,7 @@
     header.keyLen = tolel(keyLen);
     header.dataSize = tolel(dataSize);
 
-    if (DEBUG) LOGI("writing entity header, %d bytes", sizeof(entity_header_v1));
+    if (DEBUG) ALOGI("writing entity header, %d bytes", sizeof(entity_header_v1));
     amt = write(m_fd, &header, sizeof(entity_header_v1));
     if (amt != sizeof(entity_header_v1)) {
         m_status = errno;
@@ -133,7 +133,7 @@
     }
     m_pos += amt;
 
-    if (DEBUG) LOGI("writing entity header key, %d bytes", keyLen+1);
+    if (DEBUG) ALOGI("writing entity header key, %d bytes", keyLen+1);
     amt = write(m_fd, k.string(), keyLen+1);
     if (amt != keyLen+1) {
         m_status = errno;
diff --git a/libs/utils/BackupHelpers.cpp b/libs/utils/BackupHelpers.cpp
index aee7ff0..882bf71 100644
--- a/libs/utils/BackupHelpers.cpp
+++ b/libs/utils/BackupHelpers.cpp
@@ -628,7 +628,7 @@
 
     // [ 329 : 8 ] and [ 337 : 8 ] devmajor/devminor, not used
 
-    LOGI("   Name: %s", fullname.string());
+    ALOGI("   Name: %s", fullname.string());
 
     // If we're using a pax extended header, build & write that here; lengths are
     // already preflighted
diff --git a/libs/utils/ObbFile.cpp b/libs/utils/ObbFile.cpp
index 2907b56..11fe1e9 100644
--- a/libs/utils/ObbFile.cpp
+++ b/libs/utils/ObbFile.cpp
@@ -179,14 +179,14 @@
     actual = TEMP_FAILURE_RETRY(read(fd, scanBuf, footerSize));
     // readAmount is guaranteed to be less than kMaxBufSize
     if (actual != (ssize_t)footerSize) {
-        LOGI("couldn't read ObbFile footer: %s\n", strerror(errno));
+        ALOGI("couldn't read ObbFile footer: %s\n", strerror(errno));
         free(scanBuf);
         return false;
     }
 
 #ifdef DEBUG
     for (int i = 0; i < footerSize; ++i) {
-        LOGI("char: 0x%02x\n", scanBuf[i]);
+        ALOGI("char: 0x%02x\n", scanBuf[i]);
     }
 #endif
 
@@ -217,7 +217,7 @@
     free(scanBuf);
 
 #ifdef DEBUG
-    LOGI("Obb scan succeeded: packageName=%s, version=%d\n", mPackageName.string(), mVersion);
+    ALOGI("Obb scan succeeded: packageName=%s, version=%d\n", mPackageName.string(), mVersion);
 #endif
 
     return true;
diff --git a/libs/utils/ResourceTypes.cpp b/libs/utils/ResourceTypes.cpp
index 559afd8..3569e32 100644
--- a/libs/utils/ResourceTypes.cpp
+++ b/libs/utils/ResourceTypes.cpp
@@ -1164,7 +1164,7 @@
     : ResXMLParser(*this)
     , mError(NO_INIT), mOwnedData(NULL)
 {
-    //LOGI("Creating ResXMLTree %p #%d\n", this, android_atomic_inc(&gCount)+1);
+    //ALOGI("Creating ResXMLTree %p #%d\n", this, android_atomic_inc(&gCount)+1);
     restart();
 }
 
@@ -1172,13 +1172,13 @@
     : ResXMLParser(*this)
     , mError(NO_INIT), mOwnedData(NULL)
 {
-    //LOGI("Creating ResXMLTree %p #%d\n", this, android_atomic_inc(&gCount)+1);
+    //ALOGI("Creating ResXMLTree %p #%d\n", this, android_atomic_inc(&gCount)+1);
     setTo(data, size, copyData);
 }
 
 ResXMLTree::~ResXMLTree()
 {
-    //LOGI("Destroying ResXMLTree in %p #%d\n", this, android_atomic_dec(&gCount)-1);
+    //ALOGI("Destroying ResXMLTree in %p #%d\n", this, android_atomic_dec(&gCount)-1);
     uninit();
 }
 
@@ -1631,7 +1631,7 @@
 
     mTable.unlock();
 
-    //LOGI("Applying style 0x%08x (force=%d)  theme %p...\n", resID, force, this);
+    //ALOGI("Applying style 0x%08x (force=%d)  theme %p...\n", resID, force, this);
     //dumpToLog();
     
     return NO_ERROR;
@@ -1639,7 +1639,7 @@
 
 status_t ResTable::Theme::setTo(const Theme& other)
 {
-    //LOGI("Setting theme %p from theme %p...\n", this, &other);
+    //ALOGI("Setting theme %p from theme %p...\n", this, &other);
     //dumpToLog();
     //other.dumpToLog();
     
@@ -1670,7 +1670,7 @@
         }
     }
 
-    //LOGI("Final theme:");
+    //ALOGI("Final theme:");
     //dumpToLog();
     
     return NO_ERROR;
@@ -1752,21 +1752,21 @@
 
 void ResTable::Theme::dumpToLog() const
 {
-    LOGI("Theme %p:\n", this);
+    ALOGI("Theme %p:\n", this);
     for (size_t i=0; i<Res_MAXPACKAGE; i++) {
         package_info* pi = mPackages[i];
         if (pi == NULL) continue;
         
-        LOGI("  Package #0x%02x:\n", (int)(i+1));
+        ALOGI("  Package #0x%02x:\n", (int)(i+1));
         for (size_t j=0; j<pi->numTypes; j++) {
             type_info& ti = pi->types[j];
             if (ti.numEntries == 0) continue;
             
-            LOGI("    Type #0x%02x:\n", (int)(j+1));
+            ALOGI("    Type #0x%02x:\n", (int)(j+1));
             for (size_t k=0; k<ti.numEntries; k++) {
                 theme_entry& te = ti.entries[k];
                 if (te.value.dataType == Res_value::TYPE_NULL) continue;
-                LOGI("      0x%08x: t=0x%x, d=0x%08x (block=%d)\n",
+                ALOGI("      0x%08x: t=0x%x, d=0x%08x (block=%d)\n",
                      (int)Res_MAKEID(i, j, k),
                      te.value.dataType, (int)te.value.data, (int)te.stringBlock);
             }
@@ -1779,7 +1779,7 @@
 {
     memset(&mParams, 0, sizeof(mParams));
     memset(mPackageMap, 0, sizeof(mPackageMap));
-    //LOGI("Creating ResTable %p\n", this);
+    //ALOGI("Creating ResTable %p\n", this);
 }
 
 ResTable::ResTable(const void* data, size_t size, void* cookie, bool copyData)
@@ -1789,12 +1789,12 @@
     memset(mPackageMap, 0, sizeof(mPackageMap));
     add(data, size, cookie, copyData);
     LOG_FATAL_IF(mError != NO_ERROR, "Error parsing resource table");
-    //LOGI("Creating ResTable %p\n", this);
+    //ALOGI("Creating ResTable %p\n", this);
 }
 
 ResTable::~ResTable()
 {
-    //LOGI("Destroying ResTable in %p\n", this);
+    //ALOGI("Destroying ResTable in %p\n", this);
     uninit();
 }
 
@@ -1881,7 +1881,7 @@
 
     header->header = (const ResTable_header*)data;
     header->size = dtohl(header->header->header.size);
-    //LOGI("Got size 0x%x, again size 0x%x, raw size 0x%x\n", header->size,
+    //ALOGI("Got size 0x%x, again size 0x%x, raw size 0x%x\n", header->size,
     //     dtohl(header->header->header.size), header->header->header.size);
     LOAD_TABLE_NOISY(LOGV("Loading ResTable @%p:\n", header->header));
     LOAD_TABLE_NOISY(printHexData(2, header->header, header->size < 256 ? header->size : 256,
@@ -2350,7 +2350,7 @@
                         *outTypeSpecFlags = set->typeSpecFlags;
                     }
                     *outBag = (bag_entry*)(set+1);
-                    //LOGI("Found existing bag for: %p\n", (void*)resID);
+                    //ALOGI("Found existing bag for: %p\n", (void*)resID);
                     return set->numAttrs;
                 }
                 LOGW("Attempt to retrieve bag 0x%08x which is invalid or in a cycle.",
@@ -4273,7 +4273,7 @@
             TABLE_GETENTRY(
                 ResTable_config thisConfig;
                 thisConfig.copyFromDtoH(type->config);
-                LOGI("Adding config to type %d: imsi:%d/%d lang:%c%c cnt:%c%c "
+                ALOGI("Adding config to type %d: imsi:%d/%d lang:%c%c cnt:%c%c "
                      "orien:%d touch:%d density:%d key:%d inp:%d nav:%d w:%d h:%d "
                      "swdp:%d wdp:%d hdp:%d\n",
                       type->id,
diff --git a/libs/utils/Static.cpp b/libs/utils/Static.cpp
index ceca435..bfcb2da 100644
--- a/libs/utils/Static.cpp
+++ b/libs/utils/Static.cpp
@@ -57,8 +57,8 @@
     virtual status_t writeLines(const struct iovec& vec, size_t N)
     {
         //android_writevLog(&vec, N);       <-- this is now a no-op
-        if (N != 1) LOGI("WARNING: writeLines N=%d\n", N);
-        LOGI("%.*s", vec.iov_len, (const char*) vec.iov_base);
+        if (N != 1) ALOGI("WARNING: writeLines N=%d\n", N);
+        ALOGI("%.*s", vec.iov_len, (const char*) vec.iov_base);
         return NO_ERROR;
     }
 };
diff --git a/libs/utils/ZipFileRO.cpp b/libs/utils/ZipFileRO.cpp
index 3069352..6ca9a28 100644
--- a/libs/utils/ZipFileRO.cpp
+++ b/libs/utils/ZipFileRO.cpp
@@ -210,7 +210,7 @@
 
     ssize_t actual = TEMP_FAILURE_RETRY(read(mFd, scanBuf, sizeof(int32_t)));
     if (actual != (ssize_t) sizeof(int32_t)) {
-        LOGI("couldn't read first signature from zip archive: %s", strerror(errno));
+        ALOGI("couldn't read first signature from zip archive: %s", strerror(errno));
         free(scanBuf);
         return false;
     }
@@ -218,7 +218,7 @@
     {
         unsigned int header = get4LE(scanBuf);
         if (header == kEOCDSignature) {
-            LOGI("Found Zip archive, but it looks empty\n");
+            ALOGI("Found Zip archive, but it looks empty\n");
             free(scanBuf);
             return false;
         } else if (header != kLFHSignature) {
@@ -761,7 +761,7 @@
                 (ZD_TYPE) actual, (ZD_TYPE) uncompLen);
             goto unmap;
         } else {
-            LOGI("+++ successful write\n");
+            ALOGI("+++ successful write\n");
         }
     } else {
         if (!inflateBuffer(fd, ptr, uncompLen, compLen))
