• XDA Forums have been migrated to XenForo. To discuss, report bugs and other issues, use this thread.

How to fix the "invalid download uri" problem

Did it worked?


  • Total voters
    0

ntn_labs

New member
May 1, 2010
419
176
0
Orava
www.ntnlabs.sk
Hi

"Invalid download uri" is a bad ass error that is the biggest flaw (IMHO) You can encounter. Solutions are (as far as I can tell):
- cache clear
- factory reset

But for those, who did this and still have the same problem (or don't wanna try the factory reset) there might be some hope. (I was searching for solutions and found none like this, so I hope I don't duplicate someone's ideas)

I was fighting with this for a longer time and I guess I finally managed to fix it. I tried to clear cache, Google Store and Services, I even removed and reinstalled Google Play. But as logcat said, there was still problem with access to the file that was downloaded (something about JaveException:FileAccessInvalid - or something similar).

So, to make the long story short:
- connect phone
- adb shell
- cd /data/data/com.android.providers.downloads
- ls -al

There should be 4 directories:
- one of them (install) is a link (not visible in CM File Manager, but visible in shell)
- app_sslcache, cache, databases

Those three should have similar attributes (drwxrwx--x), in my case, cache had ony drwx--x--x.

So an easy fix: chmod 771 cache (You should be root) and voila, everything works (You don't need reboot or to stop google play or anything) and no more "invalid download uri".

Please, if You have this problem try this fix and if it works for You, let others know (maybe even in the comment section below)...

PS: It's not dangerous, but anyway... You do this at Your own risk.
 
Last edited:

ultimatemonty

New member
Nov 29, 2010
1
0
0
Atlanta
Thanks!!!

Old thread but throwing a thank you out there. Was having this issue after rooting my VZW M8 and this solved the problem. Thanks! I also shared this link over on AndroidForums.com as I found a similar thread with no solution while googling this issue.

So thanks!
 

GeobMcFly

New member
Nov 25, 2010
318
21
0
Paris
Thank you, for the inspiration, by looking at the logs, it was some permission pbl in com.android.vending and after some try, it was com.android.vending itself that was with bad permission.

771 on com.android.vending fix it for me!
 

sweetmango

New member
Feb 16, 2008
4
0
0
Hi, was reading your suggestion how to fix problem"invalid dowload url' problem, followed your guide but no luck.

You wrote:

There should be 4 directories:
- one of them (install) is a link (not visible in CM File Manager, but visible in shell)
- app_sslcache, cache, databases

I have galaxy S5, rooted, using root explorer(everything visible) and within data/data/androidproviders.downloads I have only 3 files.

cache,databeses and lib.

but in another directory data/data/com.android.vending I do have files you mentioned and some more.

All of my files as well directories have same set of permissions, which is

rwxrwx-x

I know you mentioned we should have drwxrwx--x and I don't know how to change it(if my permissions are wrong).


IF you can help pls I would appreciate.
 

ntn_labs

New member
May 1, 2010
419
176
0
Orava
www.ntnlabs.sk
Hi, was reading your suggestion how to fix problem"invalid dowload url' problem, followed your guide but no luck.

You wrote:

There should be 4 directories:
- one of them (install) is a link (not visible in CM File Manager, but visible in shell)
- app_sslcache, cache, databases

I have galaxy S5, rooted, using root explorer(everything visible) and within data/data/androidproviders.downloads I have only 3 files.

cache,databeses and lib.

but in another directory data/data/com.android.vending I do have files you mentioned and some more.

All of my files as well directories have same set of permissions, which is

rwxrwx-x

I know you mentioned we should have drwxrwx--x and I don't know how to change it(if my permissions are wrong).


IF you can help pls I would appreciate.
Must be the "new" Android version... I don't have enough info to help You. the pesmissions are correct. That "d" in the beginning says it's a directory. After that there are rwx (means: Read, Write, eXecute) three times. These permissions are for Owner, Group and Others. That means the owner (the app that created this directory/file) should have full rights:rwx. He can read, write and execute the file/directory. Group is just a group of owners that can share some data. Like, You can put pictures into a directory and have all apps in group "viewers" access them. And then Others. Others are all other apps that are there. So basically drwxrwxrwx means anyone can do anything with that file/directory. drwx------ means only the owner has full access, all others cannot do anything. That's the permission system in linux/android in a really really fast lesson.

Now what You need to do is to find where S5 puts the things it downloads from App Store. Maybe You are missing that folder I have found. Dunno. Try to google it out and maybe someone can help You better. Or try to find it Yourself.

What I would do is to connect S5 with a cable to a PC, run adb shell logcat and then I would try to install something from the App Store. You will see all that crap that's going on and if there will be an error, You can see it, read it, think about it and solve it ;)

Ot put it here and I will think for You :D
 

sweetmango

New member
Feb 16, 2008
4
0
0
"invalid dowload url' problem

Thank you very much for super fast response. BTW, besides this post about 'invalid dowload url' problem there is nothing on the net, not one single word. I resolved my issue with reseting my phone and everything is fine now(it was easy since I have back up of everything). Will re search more and let you know if find any answers. Anyway, was looking at permissions in same folder after reseting my phone and everything is same as before but works. Thank you again, for your effort.




Must be the "new" Android version... I don't have enough info to help You. the pesmissions are correct. That "d" in the beginning says it's a directory. After that there are rwx (means: Read, Write, eXecute) three times. These permissions are for Owner, Group and Others. That means the owner (the app that created this directory/file) should have full rights:rwx. He can read, write and execute the file/directory. Group is just a group of owners that can share some data. Like, You can put pictures into a directory and have all apps in group "viewers" access them. And then Others. Others are all other apps that are there. So basically drwxrwxrwx means anyone can do anything with that file/directory. drwx------ means only the owner has full access, all others cannot do anything. That's the permission system in linux/android in a really really fast lesson.

Now what You need to do is to find where S5 puts the things it downloads from App Store. Maybe You are missing that folder I have found. Dunno. Try to google it out and maybe someone can help You better. Or try to find it Yourself.

What I would do is to connect S5 with a cable to a PC, run adb shell logcat and then I would try to install something from the App Store. You will see all that crap that's going on and if there will be an error, You can see it, read it, think about it and solve it ;)

Ot put it here and I will think for You :D
 
Last edited:

dibblebill

New member
Jun 3, 2012
1,466
673
0
31
Raleigh, NC
www.youtube.com
I don't have install in either place (com.android.provides.downloads or com.android.vending) on my PadFone X and keep running into this issue

EDIT: In my case it won't download the whole app.

EDIT: Downgrading Play Store fixed it!
 
Last edited:

oupire

New member
Nov 25, 2014
1
0
0
Did this with Root Explorer, just want to mention, permission 771 should be granted not only for cache folder, but to every sub-folder.

Anyway thanx, this is really working solution.
 

Merman1983

New member
Jul 23, 2007
126
21
0
Electric Ladyland
Just a quick note: Noticed this error after installing the Xposed Module "Root Cloak". Since this error only showed up for root apps I figured that was the problem. Was able to update (TiBU and Greenify) by disabling Root Cloak - rebooting - updating - re-enabling Root Cloak.

Not sure what item I added to Root Cloak that is causing this issue, but for now this "solved" the problem for me.
 

sysmai

New member
Jun 29, 2008
55
8
0
Just a quick note: Noticed this error after installing the Xposed Module "Root Cloak". Since this error only showed up for root apps I figured that was the problem. Was able to update (TiBU and Greenify) by disabling Root Cloak - rebooting - updating - re-enabling Root Cloak.

Not sure what item I added to Root Cloak that is causing this issue, but for now this "solved" the problem for me.
Dead or not I have ran into the exact same thing twice. First time was right after root cloak, and this time its been a while. That and a bad memory had me end up here. Root Cloak or not a simple fix permissions in something as old as ROM Manager or just do it in custom recovery fixed it for me. Android 4.3. Galaxy Note 10.1 2014 rooted stock with multi user. I note multi user because it has also caused me some grief due to knox magically appearing in the second user even though completely removed from ROM and also must enable multi user root in supersu. Thanks for making me chase permissions instead of go after the old sd card mount issues.
 
  • Like
Reactions: Merman1983

goraventech

New member
Apr 30, 2015
1
0
0
Solution to "Invalid download URI."

After some time of troubleshooting this issue, and performing all the previously recommended steps, we believe we found a really easy solution. In fact, I feel really frustrated that I didn't do this to begin with, but hey, live and learn.

This solution will typically work for folks who are getting this on almost every app, with a few exceptions. You may notice that some apps will install while others throw this "Invalid download URI." When an app is downloaded, the installer will then look to see where the app wants to install. Most of the time, these apps request to use the "SD Card" mount point. On most Android devices, even if you do not have a SD card installed, you will still have a SD Card mount point, which simply points to another location within the phones storage. It turns out that in this case, the S4 we were working on, had a SD card installed, but it was defective. So the installer would attempt to perform the installation step, but since the SD card wasn't responding appropriately, we would get this "Invalid download URI" error. After the card was removed, the Play store began functioning normally and apps would install without any issues.

Hopefully this helps everyone who had no success with the cache clearing and permission change solutions.
 

Legitsu

Well-known member
Aug 30, 2013
1,329
423
83
I wanna bump this to say thanks to the op and xda in general I been fighting with the aopen Opensign tablet10s that uses some hacked apon version of ics trying to get gapps working this thread was the final piece of the puzzle
THANK YOU
 
  • Like
Reactions: ntn_labs
Our Apps
Get our official app! (coming soon)
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone