diff --git a/libril/ril.cpp b/libril/ril.cpp
index 738eda5..4c11a15 100644
--- a/libril/ril.cpp
+++ b/libril/ril.cpp
@@ -92,11 +92,11 @@
     #define startRequest           sprintf(printBuf, "(")
     #define closeRequest           sprintf(printBuf, "%s)", printBuf)
     #define printRequest(token, req)           \
-            LOGD("[%04d]> %s %s", token, requestToString(req), printBuf)
+            ALOGD("[%04d]> %s %s", token, requestToString(req), printBuf)
 
     #define startResponse           sprintf(printBuf, "%s {", printBuf)
     #define closeResponse           sprintf(printBuf, "%s}", printBuf)
-    #define printResponse           LOGD("%s", printBuf)
+    #define printResponse           ALOGD("%s", printBuf)
 
     #define clearPrintBuf           printBuf[0] = 0
     #define removeLastChar          printBuf[strlen(printBuf)-1] = 0
@@ -337,7 +337,7 @@
     ret = pthread_mutex_unlock(&s_pendingRequestsMutex);
     assert (ret == 0);
 
-    LOGD("C[locl]> %s", requestToString(request));
+    ALOGD("C[locl]> %s", requestToString(request));
 
     s_callbacks.onRequest(request, data, len, pRI);
 }
@@ -2249,7 +2249,7 @@
     uint8_t uct;
     void* dest;
 
-    LOGD("Inside responseCdmaSms");
+    ALOGD("Inside responseCdmaSms");
 
     if (response == NULL && responselen != 0) {
         LOGE("invalid response: NULL");
@@ -2465,7 +2465,7 @@
             LOGE("Error on getpwuid() errno: %d", errno);
         }
     } else {
-        LOGD("Error on getsockopt() errno: %d", errno);
+        ALOGD("Error on getsockopt() errno: %d", errno);
     }
 
     if ( !is_phone_socket ) {
@@ -2877,7 +2877,7 @@
     if (pRI->local > 0) {
         // Locally issued command...void only!
         // response does not go back up the command socket
-        LOGD("C[locl]< %s", requestToString(pRI->pCI->requestNumber));
+        ALOGD("C[locl]< %s", requestToString(pRI->pCI->requestNumber));
 
         goto done;
     }
@@ -2910,7 +2910,7 @@
         }
 
         if (s_fdCommand < 0) {
-            LOGD ("RIL onRequestComplete: Command channel closed");
+            ALOGD ("RIL onRequestComplete: Command channel closed");
         }
         sendResponse(p);
     }
@@ -2937,11 +2937,11 @@
 wakeTimeoutCallback (void *param) {
     // We're using "param != NULL" as a cancellation mechanism
     if (param == NULL) {
-        //LOGD("wakeTimeout: releasing wake lock");
+        //ALOGD("wakeTimeout: releasing wake lock");
 
         releaseWakeLock();
     } else {
-        //LOGD("wakeTimeout: releasing wake lock CANCELLED");
+        //ALOGD("wakeTimeout: releasing wake lock CANCELLED");
     }
 }
 
@@ -2961,7 +2961,7 @@
             return RADIO_TECH_1xRTT;
 
         default:
-            LOGD("decodeVoiceRadioTechnology: Invoked with incorrect RadioState");
+            ALOGD("decodeVoiceRadioTechnology: Invoked with incorrect RadioState");
             return -1;
     }
 }
@@ -2982,7 +2982,7 @@
             return CDMA_SUBSCRIPTION_SOURCE_NV;
 
         default:
-            LOGD("decodeCdmaSubscriptionSource: Invoked with incorrect RadioState");
+            ALOGD("decodeCdmaSubscriptionSource: Invoked with incorrect RadioState");
             return -1;
     }
 }
@@ -3001,7 +3001,7 @@
        case RADIO_STATE_RUIM_LOCKED_OR_ABSENT:
            return radioState;
        default:
-           LOGD("decodeSimStatus: Invoked with incorrect RadioState");
+           ALOGD("decodeSimStatus: Invoked with incorrect RadioState");
            return -1;
    }
 }
diff --git a/libril/ril_event.cpp b/libril/ril_event.cpp
index 4a4b330..0679a20 100644
--- a/libril/ril_event.cpp
+++ b/libril/ril_event.cpp
@@ -75,7 +75,7 @@
 #define DEBUG 0
 
 #if DEBUG
-#define dlog(x...) LOGD( x )
+#define dlog(x...) ALOGD( x )
 static void dump_event(struct ril_event * ev)
 {
     dlog("~~~~ Event %x ~~~~", (unsigned int)ev);
diff --git a/mock-ril/src/cpp/ctrl_server.cpp b/mock-ril/src/cpp/ctrl_server.cpp
index 90b6d4c..c1c3c39 100644
--- a/mock-ril/src/cpp/ctrl_server.cpp
+++ b/mock-ril/src/cpp/ctrl_server.cpp
@@ -39,7 +39,7 @@
 //#define CONTROL_SERVER_DEBUG
 #ifdef  CONTROL_SERVER_DEBUG
 
-#define DBG(...) LOGD(__VA_ARGS__)
+#define DBG(...) ALOGD(__VA_ARGS__)
 
 #else
 
@@ -356,7 +356,7 @@
                     if (status != STATUS_OK) break;
 
                     if (mh.cmd() == ril_proto::CTRL_CMD_ECHO) {
-                        LOGD("CtrlServerThread::Worker echo");
+                        ALOGD("CtrlServerThread::Worker echo");
                         status = WriteMessage(&mh, buffer);
                         if (status != STATUS_OK) break;
                     } else {
@@ -450,14 +450,14 @@
     if (status != STATUS_OK) {
         LOGE("mock_ril control server could not start");
     } else {
-        LOGD("CtrlServer started");
+        ALOGD("CtrlServer started");
     }
 
 #if 0
-    LOGD("Test CtrlServerThread stop sleeping 10 seconds...");
+    ALOGD("Test CtrlServerThread stop sleeping 10 seconds...");
     v8::Unlocker unlocker;
     sleep(10);
-    LOGD("Test CtrlServerThread call Stop");
+    ALOGD("Test CtrlServerThread call Stop");
     g_ctrl_server->Stop();
     v8::Locker locker;
 
diff --git a/mock-ril/src/cpp/experiments.cpp b/mock-ril/src/cpp/experiments.cpp
index 5fa6fec..0bb6b98 100644
--- a/mock-ril/src/cpp/experiments.cpp
+++ b/mock-ril/src/cpp/experiments.cpp
@@ -39,17 +39,17 @@
     int data[] = {1, 2, 3};
 
     int *param = data;
-    LOGD("before push q.size=%d", q.size());
+    ALOGD("before push q.size=%d", q.size());
     q.push(param);
-    LOGD("after push q.size=%d", q.size());
+    ALOGD("after push q.size=%d", q.size());
     void *p = q.front();
     if (p == param) {
-        LOGD("q.push succeeded");
+        ALOGD("q.push succeeded");
     } else {
-        LOGD("q.push failed");
+        ALOGD("q.push failed");
     }
     q.pop();
-    LOGD("after pop q.size=%d", q.size());
+    ALOGD("after pop q.size=%d", q.size());
 }
 
 v8::Handle<v8::Value> GetReqScreenState(v8::Local<v8::String> property,
@@ -59,7 +59,7 @@
             v8::Local<v8::External>::Cast(self->GetInternalField(0));
     void *p = wrap->Value();
     int state = static_cast<int *>(p)[0];
-    LOGD("GetReqScreenState state=%d", state);
+    ALOGD("GetReqScreenState state=%d", state);
     return v8::Integer::New(state);
 }
 
@@ -73,7 +73,7 @@
     v8::Handle<v8::Value> onRilRequestFunctionValue = context->Global()->Get(name);
     if(!onRilRequestFunctionValue->IsFunction()) {
         // Wasn't a function
-        LOGD("callOnRilRequest X wasn't a function");
+        ALOGD("callOnRilRequest X wasn't a function");
         return false;
     }
     v8::Handle<v8::Function> onRilRequestFunction =
@@ -87,9 +87,9 @@
             v8::ObjectTemplate::New()->NewInstance();
     switch(request) {
         case(RIL_REQUEST_SCREEN_STATE): {
-            LOGD("callOnRilRequest RIL_REQUEST_SCREEN_STATE");
+            ALOGD("callOnRilRequest RIL_REQUEST_SCREEN_STATE");
             if (datalen < sizeof(int)) {
-                LOGD("callOnRilRequest err size < sizeof int");
+                ALOGD("callOnRilRequest err size < sizeof int");
             } else {
                 v8::Handle<v8::ObjectTemplate> params_obj_template =
                         v8::ObjectTemplate::New();
@@ -105,7 +105,7 @@
             break;
         }
         default: {
-            LOGD("callOnRilRequest X unknown request");
+            ALOGD("callOnRilRequest X unknown request");
             break;
         }
     }
@@ -117,19 +117,19 @@
     v8::Handle<v8::Value> result =
         onRilRequestFunction->Call(context->Global(), argc, argv);
     if (try_catch.HasCaught()) {
-        LOGD("callOnRilRequest error");
+        ALOGD("callOnRilRequest error");
         ReportException(&try_catch);
         retValue = false;
     } else {
         v8::String::Utf8Value result_string(result);
-        LOGD("callOnRilRequest result=%s", ToCString(result_string));
+        ALOGD("callOnRilRequest result=%s", ToCString(result_string));
         retValue = true;
     }
     return retValue;
 }
 
 void testOnRilRequestUsingCppRequestObjs(v8::Handle<v8::Context> context) {
-    LOGD("testOnRilRequestUsingCppRequestObjs E:");
+    ALOGD("testOnRilRequestUsingCppRequestObjs E:");
     v8::HandleScope handle_scope;
 
     v8::TryCatch try_catch;
@@ -149,94 +149,94 @@
         callOnRilRequest(context, RIL_REQUEST_SCREEN_STATE, data,
                 sizeof(data), NULL);
     }
-    LOGD("testOnRilRequestUsingCppRequestObjs X:");
+    ALOGD("testOnRilRequestUsingCppRequestObjs X:");
 }
 
 void testReqScreenStateProtobuf() {
     v8::HandleScope handle_scope;
     v8::TryCatch try_catch;
 
-    LOGD("testReqScreenStateProtobuf E");
+    ALOGD("testReqScreenStateProtobuf E");
 
-    LOGD("create ReqScreenState");
+    ALOGD("create ReqScreenState");
     ril_proto::ReqScreenState* ss = new ril_proto::ReqScreenState();
     ss->set_state(true);
     bool state = ss->state();
-    LOGD("state=%d", state);
+    ALOGD("state=%d", state);
     ss->set_state(false);
     state = ss->state();
-    LOGD("state=%d", state);
+    ALOGD("state=%d", state);
     int len = ss->ByteSize();
-    LOGD("create buffer len=%d", len);
+    ALOGD("create buffer len=%d", len);
     char *buffer = new char[len];
-    LOGD("serialize");
+    ALOGD("serialize");
     bool ok = ss->SerializeToArray(buffer, len);
     if (!ok) {
-        LOGD("testReqScreenStateProtobuf X: Could not serialize ss");
+        ALOGD("testReqScreenStateProtobuf X: Could not serialize ss");
         return;
     }
-    LOGD("ReqScreenState serialized ok");
+    ALOGD("ReqScreenState serialized ok");
     ril_proto::ReqScreenState *newSs = new ril_proto::ReqScreenState();
     ok = newSs->ParseFromArray(buffer, len);
     if (!ok) {
-        LOGD("testReqScreenStateProtobuf X: Could not deserialize ss");
+        ALOGD("testReqScreenStateProtobuf X: Could not deserialize ss");
         return;
     }
-    LOGD("newSs->state=%d", newSs->state());
+    ALOGD("newSs->state=%d", newSs->state());
 
     delete [] buffer;
     delete ss;
     delete newSs;
-    LOGD("testReqScreenStateProtobuf X");
+    ALOGD("testReqScreenStateProtobuf X");
 }
 
 void testReqHangUpProtobuf() {
     v8::HandleScope handle_scope;
     v8::TryCatch try_catch;
 
-    LOGD("testReqHangUpProtobuf E");
+    ALOGD("testReqHangUpProtobuf E");
 
-    LOGD("create ReqHangUp");
+    ALOGD("create ReqHangUp");
     ril_proto::ReqHangUp* hu = new ril_proto::ReqHangUp();
     hu->set_connection_index(3);
     bool connection_index = hu->connection_index();
-    LOGD("connection_index=%d", connection_index);
+    ALOGD("connection_index=%d", connection_index);
     hu->set_connection_index(2);
     connection_index = hu->connection_index();
-    LOGD("connection_index=%d", connection_index);
-    LOGD("create buffer");
+    ALOGD("connection_index=%d", connection_index);
+    ALOGD("create buffer");
     int len = hu->ByteSize();
     char *buffer = new char[len];
-    LOGD("serialize");
+    ALOGD("serialize");
     bool ok = hu->SerializeToArray(buffer, len);
     if (!ok) {
-        LOGD("testReqHangUpProtobuf X: Could not serialize hu");
+        ALOGD("testReqHangUpProtobuf X: Could not serialize hu");
         return;
     }
-    LOGD("ReqHangUp serialized ok");
+    ALOGD("ReqHangUp serialized ok");
     ril_proto::ReqHangUp *newHu = new ril_proto::ReqHangUp();
     ok = newHu->ParseFromArray(buffer, len);
     if (!ok) {
-        LOGD("testReqHangUpProtobuf X: Could not deserialize hu");
+        ALOGD("testReqHangUpProtobuf X: Could not deserialize hu");
         return;
     }
-    LOGD("newHu->connection_index=%d", newHu->connection_index());
+    ALOGD("newHu->connection_index=%d", newHu->connection_index());
 
     delete [] buffer;
     delete hu;
     delete newHu;
-    LOGD("testReqHangUpProtobuf X");
+    ALOGD("testReqHangUpProtobuf X");
 }
 
 void testProtobufV8(v8::Handle<v8::Context> context) {
-    LOGD("testProtobufV8 E:");
+    ALOGD("testProtobufV8 E:");
     v8::HandleScope handle_scope;
 
     v8::TryCatch try_catch;
     try_catch.SetVerbose(true);
 
     if (try_catch.HasCaught()) {
-        LOGD("TryCatch.hasCaught is true after protobuf_v8::init");
+        ALOGD("TryCatch.hasCaught is true after protobuf_v8::init");
         ReportException(&try_catch);
     }
     runJs(context, &try_catch, "local-string",
@@ -268,14 +268,14 @@
         "print('serializedOriginalReqScreenState.length=' + serializedOriginalReqScreenState.length);\n"
         "newReqScreenState = ReqScreenStateSchema.parse(serializedOriginalReqScreenState);\n"
         "print('newReqScreenState: state=' + newReqScreenState.state);\n");
-    LOGD("testProtobufV8 X");
+    ALOGD("testProtobufV8 X");
 }
 
 void experiments(v8::Handle<v8::Context> context) {
-    LOGD("experiments E: ********");
+    ALOGD("experiments E: ********");
     testStlPort();
     testReqScreenStateProtobuf();
     testOnRilRequestUsingCppRequestObjs(context);
     testProtobufV8(context);
-    LOGD("experiments X: ********\n");
+    ALOGD("experiments X: ********\n");
 }
diff --git a/mock-ril/src/cpp/js_support.cpp b/mock-ril/src/cpp/js_support.cpp
index a2ce9c5..bca0a33 100644
--- a/mock-ril/src/cpp/js_support.cpp
+++ b/mock-ril/src/cpp/js_support.cpp
@@ -34,7 +34,7 @@
 //#define JS_SUPPORT_DEBUG
 #ifdef  JS_SUPPORT_DEBUG
 
-#define DBG(...) LOGD(__VA_ARGS__)
+#define DBG(...) ALOGD(__VA_ARGS__)
 
 #else
 
@@ -88,7 +88,7 @@
         const char* cstr = ToCString(strUtf8);
         offset += snprintf(&str[offset], str_size, "%s", cstr);
     }
-    LOGD("%s", str);
+    ALOGD("%s", str);
     delete [] str;
     return v8::Undefined();
 }
@@ -301,7 +301,7 @@
 }
 
 void testRadioState(v8::Handle<v8::Context> context) {
-    LOGD("testRadioState E:");
+    ALOGD("testRadioState E:");
     v8::HandleScope handle_scope;
 
     v8::TryCatch try_catch;
@@ -314,11 +314,11 @@
         "}\n"
         "gRadioState = 1;\n"
         "print('last gRadioState=' + gRadioState);\n");
-    LOGD("testRadioState X:");
+    ALOGD("testRadioState X:");
 }
 
 void testMsSleep(v8::Handle<v8::Context> context) {
-    LOGD("testMsSleep E:");
+    ALOGD("testMsSleep E:");
     v8::HandleScope handle_scope;
 
     v8::TryCatch try_catch;
@@ -330,22 +330,22 @@
         "  print('msSleep ' + sleeptime);\n"
         "  msSleep(sleeptime);\n"
         "}\n");
-    LOGD("testMsSleep X:");
+    ALOGD("testMsSleep X:");
 }
 
 void testPrint(v8::Handle<v8::Context> context) {
-    LOGD("testPrint E:");
+    ALOGD("testPrint E:");
     v8::HandleScope handle_scope;
 
     v8::TryCatch try_catch;
     try_catch.SetVerbose(true);
 
     runJs(context, &try_catch, "local-string", "print(\"Hello\")");
-    LOGD("testPrint X:");
+    ALOGD("testPrint X:");
 }
 
 void testCompileError(v8::Handle<v8::Context> context) {
-    LOGD("testCompileError E:");
+    ALOGD("testCompileError E:");
     v8::HandleScope handle_scope;
 
     v8::TryCatch try_catch;
@@ -353,11 +353,11 @@
 
     // +++ generate a compile time error
     runJs(context, &try_catch, "local-string", "+++");
-    LOGD("testCompileError X:");
+    ALOGD("testCompileError X:");
 }
 
 void testRuntimeError(v8::Handle<v8::Context> context) {
-    LOGD("testRuntimeError E:");
+    ALOGD("testRuntimeError E:");
     v8::HandleScope handle_scope;
 
     v8::TryCatch try_catch;
@@ -369,7 +369,7 @@
         "  print(\"Hi there\");\n"
         "}\n"
         "helloo()");
-    LOGD("testRuntimeError X:");
+    ALOGD("testRuntimeError X:");
 }
 
 void testReadFile() {
@@ -377,18 +377,18 @@
     size_t length;
     int status;
 
-    LOGD("testReadFile E:");
+    ALOGD("testReadFile E:");
 
     status = ReadFile("/sdcard/data/no-file", &buffer, &length);
-    LOGD("testReadFile expect status != 0, status=%d, buffer=%p, length=%d",
+    ALOGD("testReadFile expect status != 0, status=%d, buffer=%p, length=%d",
             status, buffer, length);
 
-    LOGD("testReadFile X:");
+    ALOGD("testReadFile X:");
 }
 
 
 void testReadFileToStringBuffer(v8::Handle<v8::Context> context) {
-    LOGD("testReadFileToStringBuffer E:");
+    ALOGD("testReadFileToStringBuffer E:");
     v8::HandleScope handle_scope;
 
     v8::TryCatch try_catch;
@@ -399,11 +399,11 @@
         "print(\"fileContents:\\n\" + fileContents);\n"
         "buffer = readFileToBuffer(\"ril.desc\");\n"
         "print(\"buffer.length=\" + buffer.length);\n");
-    LOGD("testReadFileToStringBuffer X:");
+    ALOGD("testReadFileToStringBuffer X:");
 }
 
 void testJsSupport(v8::Handle<v8::Context> context) {
-    LOGD("testJsSupport E: ********");
+    ALOGD("testJsSupport E: ********");
     testRadioState(context);
     testMsSleep(context);
     testPrint(context);
@@ -411,5 +411,5 @@
     testRuntimeError(context);
     testReadFile();
     testReadFileToStringBuffer(context);
-    LOGD("testJsSupport X: ********\n");
+    ALOGD("testJsSupport X: ********\n");
 }
diff --git a/mock-ril/src/cpp/mock_ril.cpp b/mock-ril/src/cpp/mock_ril.cpp
index f6b6807..646c322 100644
--- a/mock-ril/src/cpp/mock_ril.cpp
+++ b/mock-ril/src/cpp/mock_ril.cpp
@@ -59,7 +59,7 @@
 //#define MOCK_RIL_DEBUG
 #ifdef  MOCK_RIL_DEBUG
 
-#define DBG(...) LOGD(__VA_ARGS__)
+#define DBG(...) ALOGD(__VA_ARGS__)
 
 #else
 
@@ -243,7 +243,7 @@
 
     void * Worker(void *param)
     {
-        LOGD("UnsolicitedThread::Worker E param=%p", param);
+        ALOGD("UnsolicitedThread::Worker E param=%p", param);
 
         v8::Locker locker;
 
@@ -261,7 +261,7 @@
             v8::Locker locker;
         }
 
-        LOGD("UnsolicitedThread::Worker X param=%p", param);
+        ALOGD("UnsolicitedThread::Worker X param=%p", param);
 
         return NULL;
     }
@@ -296,7 +296,7 @@
     int ret;
     pthread_attr_t attr;
 
-    LOGD("RIL_Init E: ----------------");
+    ALOGD("RIL_Init E: ----------------");
 
     // Initialize V8
     v8::V8::Initialize();
@@ -335,13 +335,13 @@
     responsesInit(context);
 
 #if 0
-    LOGD("RIL_Init run tests #####################");
+    ALOGD("RIL_Init run tests #####################");
     testJsSupport(context);
     testRequests(context);
     experiments(context);
     testWorker();
     testWorkerV8(context);
-    LOGD("RIL_Init tests completed ###############");
+    ALOGD("RIL_Init tests completed ###############");
 #endif
 
     // Register our call backs so when we startMockRil
@@ -357,6 +357,6 @@
     ut->Run(NULL);
 #endif
 
-    LOGD("RIL_Init X: ----------------");
+    ALOGD("RIL_Init X: ----------------");
     return &s_callbacks;
 }
diff --git a/mock-ril/src/cpp/node_buffer.cpp b/mock-ril/src/cpp/node_buffer.cpp
index d72e19e..4c08a26 100644
--- a/mock-ril/src/cpp/node_buffer.cpp
+++ b/mock-ril/src/cpp/node_buffer.cpp
@@ -41,7 +41,7 @@
 //#define BUFFER_DEBUG
 #ifdef  BUFFER_DEBUG
 
-#define DBG(...) LOGD(__VA_ARGS__)
+#define DBG(...) ALOGD(__VA_ARGS__)
 
 #else
 
diff --git a/mock-ril/src/cpp/protobuf_v8.cpp b/mock-ril/src/cpp/protobuf_v8.cpp
index 1622ba5..19f87c1 100644
--- a/mock-ril/src/cpp/protobuf_v8.cpp
+++ b/mock-ril/src/cpp/protobuf_v8.cpp
@@ -34,7 +34,7 @@
 //#define PROTOBUF_V8_DEBUG
 #ifdef  PROTOBUF_V8_DEBUG
 
-#define DBG(...) LOGD(__VA_ARGS__)
+#define DBG(...) ALOGD(__VA_ARGS__)
 
 #else
 
@@ -372,7 +372,7 @@
           } else {
             str_value = ToCString(value);
             // TODO: Why can str_value be corrupted sometimes?
-            LOGD("str_value=%s", str_value);
+            ALOGD("str_value=%s", str_value);
             vd = ed->FindValueByName(str_value);
             if (vd == NULL) {
               snprintf(error_buff, sizeof(error_buff),
diff --git a/mock-ril/src/cpp/requests.cpp b/mock-ril/src/cpp/requests.cpp
index 366ba30..5fda19c 100644
--- a/mock-ril/src/cpp/requests.cpp
+++ b/mock-ril/src/cpp/requests.cpp
@@ -38,7 +38,7 @@
 //#define REQUESTS_DEBUG
 #ifdef  REQUESTS_DEBUG
 
-#define DBG(...) LOGD(__VA_ARGS__)
+#define DBG(...) ALOGD(__VA_ARGS__)
 
 #else
 
@@ -403,7 +403,7 @@
 }
 
 int requestsInit(v8::Handle<v8::Context> context, RilRequestWorkerQueue **rwq) {
-    LOGD("requestsInit E");
+    ALOGD("requestsInit E");
 
     rilReqConversionMap[RIL_REQUEST_GET_SIM_STATUS] = ReqWithNoData; // 1
     rilReqConversionMap[RIL_REQUEST_ENTER_SIM_PIN] = ReqEnterSimPin; // 2
@@ -433,7 +433,7 @@
     *rwq = new RilRequestWorkerQueue(context);
     int status = (*rwq)->Run();
 
-    LOGD("requestsInit X: status=%d", status);
+    ALOGD("requestsInit X: status=%d", status);
     return status;
 }
 
@@ -446,7 +446,7 @@
     ReqConversionMap::iterator itr;
     int status;
 
-    LOGD("testRilRequest: request=%d", request);
+    ALOGD("testRilRequest: request=%d", request);
 
     itr = rilReqConversionMap.find(request);
     if (itr != rilReqConversionMap.end()) {
@@ -463,7 +463,7 @@
 }
 
 void testRequests(v8::Handle<v8::Context> context) {
-    LOGD("testRequests E: ********");
+    ALOGD("testRequests E: ********");
 
     v8::TryCatch try_catch;
 
@@ -521,5 +521,5 @@
         }
     }
 
-    LOGD("testRequests X: ********\n");
+    ALOGD("testRequests X: ********\n");
 }
diff --git a/mock-ril/src/cpp/responses.cpp b/mock-ril/src/cpp/responses.cpp
index d13fecf..fdf06fc 100644
--- a/mock-ril/src/cpp/responses.cpp
+++ b/mock-ril/src/cpp/responses.cpp
@@ -35,7 +35,7 @@
 //#define RESPONSES_DEBUG
 #ifdef  RESPONSES_DEBUG
 
-#define DBG(...) LOGD(__VA_ARGS__)
+#define DBG(...) ALOGD(__VA_ARGS__)
 
 #else
 
@@ -501,7 +501,7 @@
 }
 
 int responsesInit(v8::Handle<v8::Context> context) {
-    LOGD("responsesInit E");
+    ALOGD("responsesInit E");
     int status = STATUS_OK;
 
     rilRspConversionMap[RIL_REQUEST_GET_SIM_STATUS] = RspGetSimStatus; // 1
@@ -531,6 +531,6 @@
     unsolRilRspConversionMap[RIL_UNSOL_SIGNAL_STRENGTH] = UnsolRspSignalStrength;  // 1009
 
 
-    LOGD("responsesInit X: status=%d", status);
+    ALOGD("responsesInit X: status=%d", status);
     return STATUS_OK;
 }
diff --git a/mock-ril/src/cpp/util.cpp b/mock-ril/src/cpp/util.cpp
index 6d0bf1a..97d9f9a 100644
--- a/mock-ril/src/cpp/util.cpp
+++ b/mock-ril/src/cpp/util.cpp
@@ -44,20 +44,20 @@
         // V8 didn't provide any extra information about this error; just
         // print the exception.
         if (alternate_message == NULL || strlen(alternate_message) == 0) {
-            LOGD("LogErrorMessage no message");
+            ALOGD("LogErrorMessage no message");
         } else {
-            LOGD("LogErrorMessage no message: %s", alternate_message);
+            ALOGD("LogErrorMessage no message: %s", alternate_message);
         }
     } else {
         v8::String::Utf8Value filename(message->GetScriptResourceName());
         const char* filename_string = ToCString(filename);
         int linenum = message->GetLineNumber();
-        LOGD("file:%s line:%i", filename_string, linenum);
+        ALOGD("file:%s line:%i", filename_string, linenum);
 
         // Print line of source code.
         v8::String::Utf8Value sourceline(message->GetSourceLine());
         const char* sourceline_string = ToCString(sourceline);
-        LOGD("%s", sourceline_string);
+        ALOGD("%s", sourceline_string);
 
         // Print location information under source line
         int start = message->GetStartColumn();
@@ -72,8 +72,8 @@
         memset(error_string, ' ', start);
         memset(&error_string[start], '^', lenErr);
         error_string[size-1] = 0;
-        LOGD("%s", error_string);
-        LOGD("%s", ToCString(v8::String::Utf8Value(message->Get())));
+        ALOGD("%s", error_string);
+        ALOGD("%s", ToCString(v8::String::Utf8Value(message->Get())));
         delete [] error_string;
     }
 }
diff --git a/mock-ril/src/cpp/worker.cpp b/mock-ril/src/cpp/worker.cpp
index 0379621..1508a52 100644
--- a/mock-ril/src/cpp/worker.cpp
+++ b/mock-ril/src/cpp/worker.cpp
@@ -23,7 +23,7 @@
 //#define WORKER_DEBUG
 #ifdef  WORKER_DEBUG
 
-#define DBG(...) LOGD(__VA_ARGS__)
+#define DBG(...) ALOGD(__VA_ARGS__)
 
 #else
 
@@ -306,7 +306,7 @@
 
 class TestWorkerQueue : public WorkerQueue {
     virtual void Process(void *p) {
-        LOGD("TestWorkerQueue::Process: EX p=%p", p);
+        ALOGD("TestWorkerQueue::Process: EX p=%p", p);
     }
 };
 
@@ -314,7 +314,7 @@
   public:
     void * Worker(void *param)
     {
-        LOGD("TesterThread::Worker E param=%p", param);
+        ALOGD("TesterThread::Worker E param=%p", param);
         WorkerQueue *wq = (WorkerQueue *)param;
 
         // Test AddDelayed
@@ -327,7 +327,7 @@
         wq->AddDelayed((void *)2000, 2000);
 
         for (int i = 1; isRunning(); i++) {
-            LOGD("TesterThread: looping %d", i);
+            ALOGD("TesterThread: looping %d", i);
             wq->Add((void *)i);
             wq->Add((void *)i);
             wq->Add((void *)i);
@@ -335,14 +335,14 @@
             sleep(1);
         }
 
-        LOGD("TesterThread::Worker X param=%p", param);
+        ALOGD("TesterThread::Worker X param=%p", param);
 
         return NULL;
     }
 };
 
 void testWorker() {
-    LOGD("testWorker E: ********");
+    ALOGD("testWorker E: ********");
 
     // Test we can create a thread and delete it
     TesterThread *tester = new TesterThread();
@@ -350,18 +350,18 @@
 
     TestWorkerQueue *wq = new TestWorkerQueue();
     if (wq->Run() == STATUS_OK) {
-        LOGD("testWorker WorkerQueue %p running", wq);
+        ALOGD("testWorker WorkerQueue %p running", wq);
 
         // Test we can run a thread, stop it then delete it
         tester = new TesterThread();
         tester->Run(wq);
-        LOGD("testWorker tester %p running", tester);
+        ALOGD("testWorker tester %p running", tester);
         sleep(10);
-        LOGD("testWorker tester %p stopping", tester);
+        ALOGD("testWorker tester %p stopping", tester);
         tester->Stop();
-        LOGD("testWorker tester %p stopped", tester);
+        ALOGD("testWorker tester %p stopped", tester);
         wq->Stop();
-        LOGD("testWorker wq %p stopped", wq);
+        ALOGD("testWorker wq %p stopped", wq);
     }
-    LOGD("testWorker X: ********\n");
+    ALOGD("testWorker X: ********\n");
 }
diff --git a/mock-ril/src/cpp/worker_v8.cpp b/mock-ril/src/cpp/worker_v8.cpp
index 61e1d3b..0e71b06 100644
--- a/mock-ril/src/cpp/worker_v8.cpp
+++ b/mock-ril/src/cpp/worker_v8.cpp
@@ -30,7 +30,7 @@
 //#define WORKER_V8_V8_DEBUG
 #ifdef  WORKER_V8_V8_DEBUG
 
-#define DBG(...) LOGD(__VA_ARGS__)
+#define DBG(...) ALOGD(__VA_ARGS__)
 
 #else
 
@@ -193,13 +193,13 @@
 }
 
 void testWorkerV8(v8::Handle<v8::Context> context) {
-    LOGD("testWorkerV8 E: ********");
+    ALOGD("testWorkerV8 E: ********");
     v8::HandleScope handle_scope;
 
     v8::TryCatch try_catch;
     try_catch.SetVerbose(true);
 
-    LOGD("testWorkerV8 runJs");
+    ALOGD("testWorkerV8 runJs");
     runJs(context, &try_catch, "local-string",
         "var w1 = new Worker(function (msg) {"
         "     print('w1: ' + msg);\n"
@@ -214,7 +214,7 @@
         "w1.add('two');\n"
         "w1.addDelayed('four', 2000);\n"
     );
-    LOGD("testWorkerV8 X: ********");
+    ALOGD("testWorkerV8 X: ********");
 }
 
 extern void WorkerV8ObjectTemplateInit(v8::Handle<v8::ObjectTemplate> target) {
diff --git a/reference-ril/atchannel.c b/reference-ril/atchannel.c
index f878b35..410ad0e 100644
--- a/reference-ril/atchannel.c
+++ b/reference-ril/atchannel.c
@@ -69,7 +69,7 @@
 {
     if (len < 0)
         len = strlen(buff);
-    LOGD("%.*s", len, buff);
+    ALOGD("%.*s", len, buff);
 }
 #endif
 
@@ -398,9 +398,9 @@
         } else if (count <= 0) {
             /* read error encountered or EOF reached */
             if(count == 0) {
-                LOGD("atchannel: EOF reached");
+                ALOGD("atchannel: EOF reached");
             } else {
-                LOGD("atchannel: read error %s", strerror(errno));
+                ALOGD("atchannel: read error %s", strerror(errno));
             }
             return NULL;
         }
@@ -413,7 +413,7 @@
     s_ATBufferCur = p_eol + 1; /* this will always be <= p_read,    */
                               /* and there will be a \0 at *p_read */
 
-    LOGD("AT< %s\n", ret);
+    ALOGD("AT< %s\n", ret);
     return ret;
 }
 
@@ -499,7 +499,7 @@
         return AT_ERROR_CHANNEL_CLOSED;
     }
 
-    LOGD("AT> %s\n", s);
+    ALOGD("AT> %s\n", s);
 
     AT_DUMP( ">> ", s, strlen(s) );
 
@@ -538,7 +538,7 @@
         return AT_ERROR_CHANNEL_CLOSED;
     }
 
-    LOGD("AT> %s^Z\n", s);
+    ALOGD("AT> %s^Z\n", s);
 
     AT_DUMP( ">* ", s, strlen(s) );
 
diff --git a/reference-ril/reference-ril.c b/reference-ril/reference-ril.c
index ce2b0ce..f5495db 100644
--- a/reference-ril/reference-ril.c
+++ b/reference-ril/reference-ril.c
@@ -1033,12 +1033,12 @@
     int retry = 10;
     const char *pdp_type;
 
-    LOGD("requesting data connection to APN '%s'", apn);
+    ALOGD("requesting data connection to APN '%s'", apn);
 
     fd = open ("/dev/qmi", O_RDWR);
     if (fd >= 0) { /* the device doesn't exist on the emulator */
 
-        LOGD("opened the qmi device\n");
+        ALOGD("opened the qmi device\n");
         asprintf(&cmd, "up:%s", apn);
         len = strlen(cmd);
 
@@ -1070,7 +1070,7 @@
                 goto error;
             } else {
                 status[rlen] = '\0';
-                LOGD("### status: %s", status);
+                ALOGD("### status: %s", status);
             }
         } while (strncmp(status, "STATE=up", 8) && strcmp(status, "online") && --retry);
 
@@ -1083,7 +1083,7 @@
 
         qmistatus = system("netcfg rmnet0 dhcp");
 
-        LOGD("netcfg rmnet0 dhcp: status %d\n", qmistatus);
+        ALOGD("netcfg rmnet0 dhcp: status %d\n", qmistatus);
 
         if (qmistatus < 0) goto error;
 
@@ -1273,7 +1273,7 @@
     ATResponse *p_response;
     int err;
 
-    LOGD("onRequest: %s", requestToString(request));
+    ALOGD("onRequest: %s", requestToString(request));
 
     /* Ignore all requests except RIL_REQUEST_GET_SIM_STATUS
      * when RADIO_STATE_UNAVAILABLE.
@@ -1506,12 +1506,12 @@
             int i;
             const char ** cur;
 
-            LOGD("got OEM_HOOK_STRINGS: 0x%8p %lu", data, (long)datalen);
+            ALOGD("got OEM_HOOK_STRINGS: 0x%8p %lu", data, (long)datalen);
 
 
             for (i = (datalen / sizeof (char *)), cur = (const char **)data ;
                     i > 0 ; cur++, i --) {
-                LOGD("> '%s'", *cur);
+                ALOGD("> '%s'", *cur);
             }
 
             // echo back strings
diff --git a/rild/rild.c b/rild/rild.c
index 18ff671..9a1975e 100644
--- a/rild/rild.c
+++ b/rild/rild.c
@@ -148,7 +148,7 @@
         int           fd = open("/proc/cmdline",O_RDONLY);
 
         if (fd < 0) {
-            LOGD("could not open /proc/cmdline:%s", strerror(errno));
+            ALOGD("could not open /proc/cmdline:%s", strerror(errno));
             goto OpenLib;
         }
 
@@ -157,7 +157,7 @@
         while (len == -1 && errno == EINTR);
 
         if (len < 0) {
-            LOGD("could not read /proc/cmdline:%s", strerror(errno));
+            ALOGD("could not read /proc/cmdline:%s", strerror(errno));
             close(fd);
             goto OpenLib;
         }
@@ -193,7 +193,7 @@
                     done = 1;
                     break;
                 }
-                LOGD("could not connect to %s socket: %s",
+                ALOGD("could not connect to %s socket: %s",
                     QEMUD_SOCKET_NAME, strerror(errno));
                 if (--tries == 0)
                     break;
@@ -235,7 +235,7 @@
             hasLibArgs = 1;
             rilLibPath = REFERENCE_RIL_PATH;
 
-            LOGD("overriding with %s %s", arg_overrides[1], arg_overrides[2]);
+            ALOGD("overriding with %s %s", arg_overrides[1], arg_overrides[2]);
         }
     }
 OpenLib:
