I am trying to set up an emulated android device to debug some native code using Google's sanitizers. Upon using the asan_device_setup script required to prepare the device to run sanitized code, the following is comes up:
OUTPUT:
Peter Logan@DESKTOP-PLN /cygdrive/c/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin
$ sh asan_device_setup
>> Remounting /system rw
remount succeeded
Target architecture: i686
>> Copying files from the device
adb: error: cannot create file/directory '/tmp/tmp.8fXB5R9Db6/old': No such file or directory
adb: error: cannot create file/directory '/tmp/tmp.8fXB5R9Db6/old': No such file or directory
adb: error: cannot create file/directory '/tmp/tmp.8fXB5R9Db6/old': No such file or directory
adb: error: cannot create file/directory '/tmp/tmp.8fXB5R9Db6/old': No such file or directory
>> New installation
>> Generating wrappers
Only in new/: app_process.wrap
Only in new/: asanwrapper
Only in new/: libclang_rt.asan-i686-android.so
>> Pushing files to the device
Installing /system/lib/libclang_rt.asan-i686-android.so 644
adb: error: cannot stat '/tmp/tmp.8fXB5R9Db6/new/libclang_rt.asan-i686-android.so': No such file or directory
The code that is run by the script for the first set of errors is:
adb_pull /system/lib/"$ASAN_RT" "$TMPDIROLD" || true
adb_pull /system/bin/app_process32 "$TMPDIROLD" || true
adb_pull /system/bin/app_process.wrap "$TMPDIROLD" || true
adb_pull /system/bin/asanwrapper "$TMPDIROLD" || true
I checked and both the source files and "$TMPDIROLD" folder exist contrary to what the error message would suggest.
Any help to figure out what the cause of this is will be greatly appreciated.
Terminal: Cygwin
Emulator: Android API21, Rooted