diff --git a/keystore-engine/Android.mk b/keystore-engine/Android.mk
index e7cab53..bd86b6a 100644
--- a/keystore-engine/Android.mk
+++ b/keystore-engine/Android.mk
@@ -20,7 +20,7 @@
 
 LOCAL_MODULE_TAGS := optional
 
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/ssl/engines
+LOCAL_MODULE_RELATIVE_PATH := ssl/engines
 
 LOCAL_SRC_FILES := \
 	eng_keystore.cpp \
diff --git a/keystore-engine/dsa_meth.cpp b/keystore-engine/dsa_meth.cpp
index 6adfa2d..372d5c4 100644
--- a/keystore-engine/dsa_meth.cpp
+++ b/keystore-engine/dsa_meth.cpp
@@ -23,7 +23,7 @@
  *
  */
 
-#include <utils/UniquePtr.h>
+#include <UniquePtr.h>
 
 //#define LOG_NDEBUG 0
 #define LOG_TAG "OpenSSL-keystore-dsa"
diff --git a/keystore-engine/ecdsa_meth.cpp b/keystore-engine/ecdsa_meth.cpp
index 7b673a2..a059b54 100644
--- a/keystore-engine/ecdsa_meth.cpp
+++ b/keystore-engine/ecdsa_meth.cpp
@@ -23,7 +23,7 @@
  *
  */
 
-#include <utils/UniquePtr.h>
+#include <UniquePtr.h>
 
 //#define LOG_NDEBUG 0
 #define LOG_TAG "OpenSSL-keystore-ecdsa"
diff --git a/keystore-engine/eng_keystore.cpp b/keystore-engine/eng_keystore.cpp
index 6f5b01a..6feb0f9 100644
--- a/keystore-engine/eng_keystore.cpp
+++ b/keystore-engine/eng_keystore.cpp
@@ -23,7 +23,7 @@
  *
  */
 
-#include <utils/UniquePtr.h>
+#include <UniquePtr.h>
 
 #include <sys/socket.h>
 #include <stdarg.h>
diff --git a/keystore-engine/rsa_meth.cpp b/keystore-engine/rsa_meth.cpp
index b949fa4..da9e45f 100644
--- a/keystore-engine/rsa_meth.cpp
+++ b/keystore-engine/rsa_meth.cpp
@@ -23,7 +23,7 @@
  *
  */
 
-#include <utils/UniquePtr.h>
+#include <UniquePtr.h>
 
 //#define LOG_NDEBUG 0
 #define LOG_TAG "OpenSSL-keystore-rsa"
diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp
index 64809ad..f120a36 100644
--- a/keystore/keystore.cpp
+++ b/keystore/keystore.cpp
@@ -44,8 +44,8 @@
 
 #include <keymaster/softkeymaster.h>
 
+#include <UniquePtr.h>
 #include <utils/String8.h>
-#include <utils/UniquePtr.h>
 #include <utils/Vector.h>
 
 #include <keystore/IKeystoreService.h>
@@ -1506,7 +1506,7 @@
         Blob keyBlob(item, itemLength, NULL, 0, ::TYPE_GENERIC);
         keyBlob.setEncrypted(flags & KEYSTORE_FLAG_ENCRYPTED);
 
-        return mKeyStore->put(filename.string(), &keyBlob, callingUid);
+        return mKeyStore->put(filename.string(), &keyBlob, targetUid);
     }
 
     int32_t del(const String16& name, int targetUid) {
@@ -1527,7 +1527,7 @@
 
         Blob keyBlob;
         ResponseCode responseCode = mKeyStore->get(filename.string(), &keyBlob, TYPE_GENERIC,
-                callingUid);
+                targetUid);
         if (responseCode != ::NO_ERROR) {
             return responseCode;
         }
@@ -1825,7 +1825,7 @@
             rsa_params.modulus_size = keySize;
 
             if (args->size() > 1) {
-                ALOGI("invalid number of arguments: %d", args->size());
+                ALOGI("invalid number of arguments: %zu", args->size());
                 return ::SYSTEM_ERROR;
             } else if (args->size() == 1) {
                 sp<KeystoreArg> pubExpBlob = args->itemAt(0);
@@ -1882,7 +1882,7 @@
             return ::PERMISSION_DENIED;
         }
 
-        State state = mKeyStore->getState(callingUid);
+        State state = mKeyStore->getState(targetUid);
         if ((flags & KEYSTORE_FLAG_ENCRYPTED) && !isKeystoreUnlocked(state)) {
             ALOGD("calling import in state: %d", state);
             return state;
@@ -1891,7 +1891,7 @@
         String8 name8(name);
         String8 filename(mKeyStore->getKeyNameForUidWithDir(name8, targetUid));
 
-        return mKeyStore->importKey(data, length, filename.string(), callingUid, flags);
+        return mKeyStore->importKey(data, length, filename.string(), targetUid, flags);
     }
 
     int32_t sign(const String16& name, const uint8_t* data, size_t length, uint8_t** out,
@@ -2063,11 +2063,11 @@
         }
 
         String8 name8(name);
-        String8 filename(mKeyStore->getKeyNameForUidWithDir(name8, callingUid));
+        String8 filename(mKeyStore->getKeyNameForUidWithDir(name8, targetUid));
 
         Blob keyBlob;
         ResponseCode responseCode = mKeyStore->get(filename.string(), &keyBlob, ::TYPE_KEY_PAIR,
-                callingUid);
+                targetUid);
         if (responseCode != ::NO_ERROR) {
             return responseCode;
         }
@@ -2214,7 +2214,7 @@
         String8 sourceFile(mKeyStore->getKeyNameForUidWithDir(source8, srcUid));
 
         String8 target8(destKey);
-        String8 targetFile(mKeyStore->getKeyNameForUidWithDir(target8, srcUid));
+        String8 targetFile(mKeyStore->getKeyNameForUidWithDir(target8, destUid));
 
         if (access(targetFile.string(), W_OK) != -1 || errno != ENOENT) {
             ALOGD("destination already exists: %s", targetFile.string());
@@ -2223,19 +2223,20 @@
 
         Blob keyBlob;
         ResponseCode responseCode = mKeyStore->get(sourceFile.string(), &keyBlob, TYPE_ANY,
-                callingUid);
+                srcUid);
         if (responseCode != ::NO_ERROR) {
             return responseCode;
         }
 
-        return mKeyStore->put(targetFile.string(), &keyBlob, callingUid);
+        return mKeyStore->put(targetFile.string(), &keyBlob, destUid);
     }
 
     int32_t is_hardware_backed(const String16& keyType) {
         return mKeyStore->isHardwareBacked(keyType) ? 1 : 0;
     }
 
-    int32_t clear_uid(int64_t targetUid) {
+    int32_t clear_uid(int64_t targetUid64) {
+        uid_t targetUid = static_cast<uid_t>(targetUid64);
         uid_t callingUid = IPCThreadState::self()->getCallingUid();
         if (!has_permission(callingUid, P_CLEAR_UID)) {
             ALOGW("permission denied for %d: clear_uid", callingUid);
@@ -2248,13 +2249,19 @@
             return state;
         }
 
+        if (targetUid64 == -1) {
+            targetUid = callingUid;
+        } else if (!is_granted_to(callingUid, targetUid)) {
+            return ::PERMISSION_DENIED;
+        }
+
         const keymaster_device_t* device = mKeyStore->getDevice();
         if (device == NULL) {
             ALOGW("can't get keymaster device");
             return ::SYSTEM_ERROR;
         }
 
-        UserState* userState = mKeyStore->getUserState(callingUid);
+        UserState* userState = mKeyStore->getUserState(targetUid);
         DIR* dir = opendir(userState->getUserDirName());
         if (!dir) {
             ALOGW("can't open user directory: %s", strerror(errno));
@@ -2262,7 +2269,7 @@
         }
 
         char prefix[NAME_MAX];
-        int n = snprintf(prefix, NAME_MAX, "%u_", static_cast<uid_t>(targetUid));
+        int n = snprintf(prefix, NAME_MAX, "%u_", targetUid);
 
         ResponseCode rc = ::NO_ERROR;
 
@@ -2284,7 +2291,7 @@
 
             String8 filename(String8::format("%s/%s", userState->getUserDirName(), file->d_name));
             Blob keyBlob;
-            if (mKeyStore->get(filename.string(), &keyBlob, ::TYPE_ANY, callingUid)
+            if (mKeyStore->get(filename.string(), &keyBlob, ::TYPE_ANY, targetUid)
                     != ::NO_ERROR) {
                 ALOGW("couldn't open %s", filename.string());
                 continue;
diff --git a/softkeymaster/Android.mk b/softkeymaster/Android.mk
index 0064d01..7eee9c5 100644
--- a/softkeymaster/Android.mk
+++ b/softkeymaster/Android.mk
@@ -16,7 +16,7 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := keystore.default
-LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw
+LOCAL_MODULE_RELATIVE_PATH := hw
 LOCAL_SRC_FILES := module.cpp
 LOCAL_C_INCLUDES := \
 	system/security/keystore \
diff --git a/softkeymaster/keymaster_openssl.cpp b/softkeymaster/keymaster_openssl.cpp
index 4aaaea2..783148e 100644
--- a/softkeymaster/keymaster_openssl.cpp
+++ b/softkeymaster/keymaster_openssl.cpp
@@ -28,7 +28,7 @@
 #include <openssl/err.h>
 #include <openssl/x509.h>
 
-#include <utils/UniquePtr.h>
+#include <UniquePtr.h>
 
 // For debugging
 //#define LOG_NDEBUG 0
@@ -191,7 +191,7 @@
         publicLen = (publicLen << 8) | *p++;
     }
     if (p + publicLen > end) {
-        ALOGE("public key length encoding error: size=%ld, end=%d", publicLen, end - p);
+        ALOGE("public key length encoding error: size=%ld, end=%td", publicLen, end - p);
         return NULL;
     }
 
@@ -204,7 +204,7 @@
         privateLen = (privateLen << 8) | *p++;
     }
     if (p + privateLen > end) {
-        ALOGE("private key length encoding error: size=%ld, end=%d", privateLen, end - p);
+        ALOGE("private key length encoding error: size=%ld, end=%td", privateLen, end - p);
         return NULL;
     }
 
diff --git a/softkeymaster/module.cpp b/softkeymaster/module.cpp
index 758dfe7..cba3a79 100644
--- a/softkeymaster/module.cpp
+++ b/softkeymaster/module.cpp
@@ -26,7 +26,7 @@
 
 #include <openssl/err.h>
 
-#include <utils/UniquePtr.h>
+#include <UniquePtr.h>
 
 // For debugging
 //#define LOG_NDEBUG 0
@@ -78,20 +78,20 @@
 }
 
 static struct hw_module_methods_t keystore_module_methods = {
-    open: openssl_open,
+    .open = openssl_open,
 };
 
 struct keystore_module HAL_MODULE_INFO_SYM
 __attribute__ ((visibility ("default"))) = {
-    common: {
-        tag: HARDWARE_MODULE_TAG,
-        module_api_version: KEYMASTER_MODULE_API_VERSION_0_2,
-        hal_api_version: HARDWARE_HAL_API_VERSION,
-        id: KEYSTORE_HARDWARE_MODULE_ID,
-        name: "Keymaster OpenSSL HAL",
-        author: "The Android Open Source Project",
-        methods: &keystore_module_methods,
-        dso: 0,
-        reserved: {},
+    .common = {
+        .tag = HARDWARE_MODULE_TAG,
+        .module_api_version = KEYMASTER_MODULE_API_VERSION_0_2,
+        .hal_api_version = HARDWARE_HAL_API_VERSION,
+        .id = KEYSTORE_HARDWARE_MODULE_ID,
+        .name = "Keymaster OpenSSL HAL",
+        .author = "The Android Open Source Project",
+        .methods = &keystore_module_methods,
+        .dso = 0,
+        .reserved = {},
     },
 };
