Hi All,
I am into an application development which is similar to su application but an enhanced version of su. So before testing the application,I wanted to check whether the application installation is working fine in Android Lollipop with pm command. Unfortunately I am getting "Failure [INSTALL_FAILED_INVALID_URI] " error.
I had initially tried with downloading third party apps and installing them with the pm command. Also I have enabled the option to allow apps from unknown source under Security . Since I was getting the same error,I tried to built the apk for the sample application within the Android BSP. But there also I am getting similiar issue.
I made sure the APK is not corrupted,because it is being installed in my mobile with Android Lollipop 5.1 successfully. Also I tried to install the same APK with pm command from kitkat terminal .Here also the app got installed succesfully.
I made a lame try to replace the working pm utility of kitkat and give a try on Lollipop, no hope there too.
Anybody has successfully installed application using pm install in Android Lollipop 5.0.2?
Solved! Go to Solution.
Anjali,
on line 23 your LogCat file is W/asset ( 1232): Asset path /WiFiDirectActivity.apk is neither a directory nor file (type=1).
Your apk is stored on /data/WiFiDirectActivity.apk bu you call Package manager with path /WiFiDirectActivity.apk. Please try to call Package manager with this command # pm install /data/WiFiDirectActivity.apk
Michal
Hi Anjalik,
have you tried to change permissions of /data/local to rwxrwxrwx ? This issue is on most rooted Android devices.
Michal
Hi Michal,
I had tried with changing the permission of /data/local to
rwxrwxrwx. Still I was getting the error.
I tried with adb install . This worked and now I am able to
install all kind of apps.
But what is the wrong with pm install is still unknown.
Thanks & Regards,
Anjali
Anjali,
can you provide Logcat output please?
Michal
Anjali,
on line 23 your LogCat file is W/asset ( 1232): Asset path /WiFiDirectActivity.apk is neither a directory nor file (type=1).
Your apk is stored on /data/WiFiDirectActivity.apk bu you call Package manager with path /WiFiDirectActivity.apk. Please try to call Package manager with this command # pm install /data/WiFiDirectActivity.apk
Michal
Hi Michal,
Thanks a lot . pm install /data/WiFiDirectActivity.apk worked well.
But I have a doubt. If I am moving inside /data/ directory where the
apk file is stored,then issuing the command as pm install
WiFiDirectActivity.apk*, *then the path should be just fine right? .
Why I need to go out of the /data/ and issue the command as you
mentioned. Just anxious to know the working trick.
Thanks & Regards,
Anjali.
Anjali,
Package Manager needs full path to the *.apk file. Or OS is not able to complete full path behind *.apk file.
Michal
Thanks a lot, Michal Susen, I'm sure this will help other community users as well!
Hi Michal,
Thanks for the explanation. Really helpful .
Regards,
Anjali
Anjali,
If this post answers your question, please click the Correct Answer button. It can help other community members.
Thank you!
Michal