Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CordovaApp-debug.apk - rm failed for -f, No such file or directory

I have just started to create mobile apps using Cordova with the framework Ionic, and everything works fine, except this:

adb install -r platforms/android/ant-build/CordovaApp-debug.apk
. I get the following:
3086 KB/s (3489699 bytes in 1.104s)
        pkg: /data/local/tmp/CordovaApp-debug.apk
Success
rm failed for -f, No such file or directory

And I guess that's why I have problems, when I'm using adb logcat.

It's worth mentioning that I have set "everything" up (android, java, git, ant and nodejs) in my environment variables, and I can build my applications and run them on my Samsung Galaxy S3.

Regards,

like image 416
Emil Rasmussen Avatar asked Sep 29 '22 23:09

Emil Rasmussen


1 Answers

I set the environment variable "ADB_TRACE=1" to see what's happening

environmental variables:
ADB_TRACE - Print debug information. A comma separated list of the following values 1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp

In my case, "adb" is trying to delete the apk file from /data/local/tmp/

Line 9966: system/core/adb/adb_client.c::adb_connect():adb_connect:
service shell:rm -f /data/local/tmp/myapp.apk

So, It seems that "adb" doesn't have the rights to delete the file.

like image 182
caoanan Avatar answered Oct 13 '22 00:10

caoanan