Loading fastboot/fastboot.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -995,7 +995,7 @@ static void rewrite_vbmeta_buffer(struct fastboot_buffer* buf, bool vbmeta_in_bo die("Failed writing to modified vbmeta"); } buf->fd = std::move(fd); lseek(fd, 0, SEEK_SET); lseek(buf->fd, 0, SEEK_SET); } static bool has_vbmeta_partition() { Loading Loading @@ -1063,7 +1063,7 @@ static void copy_boot_avb_footer(const std::string& partition, struct fastboot_b } buf->fd = std::move(fd); buf->sz = partition_size; lseek(fd, 0, SEEK_SET); lseek(buf->fd, 0, SEEK_SET); } static void flash_buf(const std::string& partition, struct fastboot_buffer *buf) Loading fastboot/testdata/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. package { default_applicable_licenses: ["Android-Apache-2.0"], } python_binary_host { name: "fastboot_gen_rand", visibility: [":__subpackages__"], Loading gatekeeperd/Android.bp +0 −2 Original line number Diff line number Diff line Loading @@ -40,8 +40,6 @@ cc_binary { "libbase", "libutils", "libcrypto", "libkeystore_aidl", "libkeystore_binder", "libhidlbase", "android.hardware.gatekeeper@1.0", "libgatekeeper_aidl", Loading gatekeeperd/gatekeeperd.cpp +1 −18 Original line number Diff line number Diff line Loading @@ -29,13 +29,11 @@ #include <android-base/properties.h> #include <android/binder_ibinder.h> #include <android/binder_manager.h> #include <android/security/keystore/IKeystoreService.h> #include <binder/IPCThreadState.h> #include <binder/IServiceManager.h> #include <binder/PermissionCache.h> #include <gatekeeper/password_handle.h> // for password_handle_t #include <hardware/hw_auth_token.h> #include <keystore/keystore_return_types.h> #include <libgsi/libgsi.h> #include <log/log.h> #include <utils/String16.h> Loading Loading @@ -303,7 +301,7 @@ class GateKeeperProxy : public BnGateKeeperService { if (gkResponse->payload().size() != 0) { // try to connect to IKeystoreAuthorization AIDL service first. AIBinder* authzAIBinder = AServiceManager_checkService("android.security.authorization"); AServiceManager_getService("android.security.authorization"); ::ndk::SpAIBinder authzBinder(authzAIBinder); auto authzService = IKeystoreAuthorization::fromBinder(authzBinder); if (authzService) { Loading @@ -328,21 +326,6 @@ class GateKeeperProxy : public BnGateKeeperService { LOG(ERROR) << "Failure in sending AuthToken to AuthorizationService."; return GK_ERROR; } } sp<IServiceManager> sm = defaultServiceManager(); sp<IBinder> binder = sm->getService(String16("android.security.keystore")); sp<security::keystore::IKeystoreService> service = interface_cast<security::keystore::IKeystoreService>(binder); if (service) { int result = 0; auto binder_result = service->addAuthToken(gkResponse->payload(), &result); if (!binder_result.isOk() || !keystore::KeyStoreServiceReturnCode(result).isOk()) { LOG(ERROR) << "Failure sending auth token to KeyStore: " << result; return GK_ERROR; } } else { LOG(ERROR) << "Cannot deliver auth token. Unable to communicate with " "Keystore."; Loading Loading
fastboot/fastboot.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -995,7 +995,7 @@ static void rewrite_vbmeta_buffer(struct fastboot_buffer* buf, bool vbmeta_in_bo die("Failed writing to modified vbmeta"); } buf->fd = std::move(fd); lseek(fd, 0, SEEK_SET); lseek(buf->fd, 0, SEEK_SET); } static bool has_vbmeta_partition() { Loading Loading @@ -1063,7 +1063,7 @@ static void copy_boot_avb_footer(const std::string& partition, struct fastboot_b } buf->fd = std::move(fd); buf->sz = partition_size; lseek(fd, 0, SEEK_SET); lseek(buf->fd, 0, SEEK_SET); } static void flash_buf(const std::string& partition, struct fastboot_buffer *buf) Loading
fastboot/testdata/Android.bp +4 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. package { default_applicable_licenses: ["Android-Apache-2.0"], } python_binary_host { name: "fastboot_gen_rand", visibility: [":__subpackages__"], Loading
gatekeeperd/Android.bp +0 −2 Original line number Diff line number Diff line Loading @@ -40,8 +40,6 @@ cc_binary { "libbase", "libutils", "libcrypto", "libkeystore_aidl", "libkeystore_binder", "libhidlbase", "android.hardware.gatekeeper@1.0", "libgatekeeper_aidl", Loading
gatekeeperd/gatekeeperd.cpp +1 −18 Original line number Diff line number Diff line Loading @@ -29,13 +29,11 @@ #include <android-base/properties.h> #include <android/binder_ibinder.h> #include <android/binder_manager.h> #include <android/security/keystore/IKeystoreService.h> #include <binder/IPCThreadState.h> #include <binder/IServiceManager.h> #include <binder/PermissionCache.h> #include <gatekeeper/password_handle.h> // for password_handle_t #include <hardware/hw_auth_token.h> #include <keystore/keystore_return_types.h> #include <libgsi/libgsi.h> #include <log/log.h> #include <utils/String16.h> Loading Loading @@ -303,7 +301,7 @@ class GateKeeperProxy : public BnGateKeeperService { if (gkResponse->payload().size() != 0) { // try to connect to IKeystoreAuthorization AIDL service first. AIBinder* authzAIBinder = AServiceManager_checkService("android.security.authorization"); AServiceManager_getService("android.security.authorization"); ::ndk::SpAIBinder authzBinder(authzAIBinder); auto authzService = IKeystoreAuthorization::fromBinder(authzBinder); if (authzService) { Loading @@ -328,21 +326,6 @@ class GateKeeperProxy : public BnGateKeeperService { LOG(ERROR) << "Failure in sending AuthToken to AuthorizationService."; return GK_ERROR; } } sp<IServiceManager> sm = defaultServiceManager(); sp<IBinder> binder = sm->getService(String16("android.security.keystore")); sp<security::keystore::IKeystoreService> service = interface_cast<security::keystore::IKeystoreService>(binder); if (service) { int result = 0; auto binder_result = service->addAuthToken(gkResponse->payload(), &result); if (!binder_result.isOk() || !keystore::KeyStoreServiceReturnCode(result).isOk()) { LOG(ERROR) << "Failure sending auth token to KeyStore: " << result; return GK_ERROR; } } else { LOG(ERROR) << "Cannot deliver auth token. Unable to communicate with " "Keystore."; Loading