Question: I want to fetch the clientroot of perforce in a perl script.

I wrote the code as :

```
my $workspace_root=system("p4 client -o | findstr /b Root");
print $workspace_root;

```

Instead of printing the path, it prints `0`

Could anyone please tell what I am missing here?

Answer: 
After trying the different solutions from the different answers, I tried changing the USB debugging cable, and the problem resolved finally.
i was also getting the same error repeatedly but could not solve it as i am complete new to android development.
But then it came to my mind that the error is appearing because its not able to install the apk in the device as the error says.
So i make sure that my Oneplus3 is in debugging mode and also allowing file transfer when connected via USB. 
And this solved the problem.

Also previously it was not doing the instant run but now it does.

So check whether your android device is allowed to transfer files while connected via USB. This might help.