ADB Cannot recursively Push Directories to /data/local/tmp/directory on Pixel 2 but can on /sdcard

Viewed 766

can someone help me figure out why I can't adb push directories recursively to /data/local/tmp/exampleProject on a Pixel 2 and 2 XL?

adb shell mkdir -p /data/local/tmp/exampleProject/resources
adb push resources/. /data/local/tmp/exampleProject/resources

I get the following for files already in a subdirectory:

adb: failed to copy 'resources/./fileOpenTest/exampleUnitTestResource.txt' to '/data/local/tmp/exampleProject/resources/./fileOpenTest/exampleUnitTestResource.txt': remote secure_mkdirs failed: Operation not permitted

The overall goal here is to run GoogleTests (C++ unit tests) in /data/local/tmp. For some reason, the recursive adb push (and the GoogleTests) works fine on my Nexus 6P (8.1.0), Samsung Galaxy S9 (8.0.0... why is it still on 8.0.0 c'mon Samsung wtf), and on the emulator (although to run the tests with file-write permissions, the ... su is gimped so I have to manually pipe echo the arguments and pipe it into su).

I did end up working around the issue on the Pixel 2 by copying everything to /sdcard/exampleProject then adb shell mv'ing to /data/local/tmp/exampleProject, but I'd like to understand why I can't do this directly but can on other devices.

Anyone having this specific problem? I have a feeling that this problem is specific to 9.0, which will complicate my device farm googletest work in the future =.=

0 Answers
Related