Rakesh patanga
Rakesh patanga

Reputation: 822

aapt dump badging fails "dump failed because assets could not be loaded"

When I run the aapt dump badging on my apk I get the below error

W/asset   (17217): Asset path Users/username/Downloads/appname.apk is neither a directory nor file (type=1).
ERROR: dump failed because assets could not be loaded

I couldn't find why it happens.
I'm using iMac.

Upvotes: 4

Views: 8190

Answers (2)

LF-DevJourney
LF-DevJourney

Reputation: 28554

I come this issue with

sudo -u www /usr/share/aapt/aapt d badging /home/roofe/200.apk
getFileType got errno=13 on '/home/roofe/200.apk'
getFileType got errno=13 on '/home/roofe/200.apk'
W/asset   ( 1315): Asset path /home/roofe/200.apk is neither a directory nor file (type=0).
ERROR: dump failed because assets could not be loaded

But when I use sudo /usr/share/aapt/aapt d badging /home/roofe/200.apk, it works well. So I realise it's caused by permission.

Then I move the file to /data/www where the full path have the mode www:www, and it works.

Upvotes: 1

Durai Amuthan.H
Durai Amuthan.H

Reputation: 32320

I have faced this problem in my case it was missing of the (.)dot in following terminal command

./aapt dump badging /Users/username/Documents/Android/Release/PROD/appname.apk 

Hope this helps

Upvotes: 4

Related Questions