CordobaApp-debug.apk - rm failed for -f, no such file or directory

I just started creating mobile apps using Cordova with an Ionic framework, and everything works fine except for 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 why I have problems when I use adb logcat.

It is worth noting that I set β€œeverything” up (android, java, git, ant and nodejs) in my environment variables, and I can create my applications and run them on my Samsung Galaxy S3.

Hi,

+5
source share
2 answers

I set the environment variable " ADB_TRACE = 1 " to see what happens

environmental variables:
ADB_TRACE - Print debugging 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 remove 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" does not have permission to delete the file.

+2
source

The problem, as suggested in the comment, is that the associated rm does not always support the -f option. To verify that this is true, from the adb shell prompt, you can either try the rm command, or without it: -f: the first one will fail or try just β€œrm”: it will probably be an echo of β€œrm [-rR] target while it will echo "rm [-frR] etc." or some if it supports the -f option.

However, at least on my device this is dishonest: the application is not installed!

+2
source

Source: https://habr.com/ru/post/1211494/


All Articles