From 82ff315bb0fecb9127970e01b399be53c92ca14f Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 31 Aug 2016 15:07:18 -0700 Subject: Add android::base::GetExecutablePath, switch adb and fastboot over. We'd long had two copies of this stuff, so rather than rewrite both Linux versions to use android::base::Readlink, let's kill the duplication too... Bug: http://b/30988271 Change-Id: I4de58a94a22a4b1faf969a6fc70ca1560a4d5121 --- fastboot/fastboot.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fastboot/fastboot.cpp') diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp index df0f6516e..987ba8356 100644 --- a/fastboot/fastboot.cpp +++ b/fastboot/fastboot.cpp @@ -47,6 +47,7 @@ #include #include +#include #include #include #include @@ -116,7 +117,7 @@ static struct { static std::string find_item_given_name(const char* img_name, const char* product) { if(product) { - std::string path = get_my_path(); + std::string path = android::base::GetExecutablePath(); path.erase(path.find_last_of('/')); return android::base::StringPrintf("%s/../../../target/product/%s/%s", path.c_str(), product, img_name); -- cgit v1.2.3