[Q] Fix Permissions - Android Q&A, Help & Troubleshooting

I would like to think I am very familiar with GNU/Linux/UN*X permissions, but I don't have the foggiest idea as to what "fix permissions" does in Android recoveries and apps.
Is anyone willing to give an accurate overview of what's happening? If so, please do. Finally, can anyone point me towards some opensource code that implements such a task? That would be most appreciated.
Thanks in advance.

exiquio said:
I would like to think I am very familiar with GNU/Linux/UN*X permissions, but I don't have the foggiest idea as to what "fix permissions" does in Android recoveries and apps.
Is anyone willing to give an accurate overview of what's happening? If so, please do. Finally, can anyone point me towards some opensource code that implements such a task? That would be most appreciated.
Thanks in advance.
Click to expand...
Click to collapse
In order not to have applications to affect others, Android creates a new user/group to store data for each app and the permission information is keep in packages.xml. fix_permissions is to ensure permission integrity.
ROM Manager bundles fix_permissions shell script (I am sure others too):
/data/data/com.koushikdutta.rommanager/files/fix_permissions

Tingtan already explained the process of fix permissions and suggested ROM Manager as the shell commander but you can also fix permissions in CWM recovery by going to advanced/fix permissions/yes
Sent from my PC36100 using XDA App

hmmm, not realy clear for newbie like me, can you explain what problem will happen if fix permision ( in CMW ) is needed but i don't do it ?

When I flashed a rom, I always fix permissions at the end, then reboot.. That's how I learned to flash. :thumbup:
You can also fix permissions in rom toolbox under the "manage apps. " Its on bottom, just slide bottom bar to left and you will see it.
Codename FC18

taitrandht said:
hmmm, not realy clear for newbie like me, can you explain what problem will happen if fix permision ( in CMW ) is needed but i don't do it ?
Click to expand...
Click to collapse
http://wiki.cyanogenmod.com/wiki/Fix_permissions
Just found that. Sounds like what tingtan was saying.

Thanks I did not know that I could fix my permissions in Rom Tool Box.

Hello.
I suspect that fixing permissions implementation differs between tools. I suspect some of them doing worse to the system by performing this.
I'd appreciate a suggestion of tool doing this best (ie. no bad impact on system performance)

I just ran this from ROM Manager and thought... oh what have I done now...
I didn't really need to do it or anything. At least it didn't appear to have created issues
But, is it more or less secure now?

problem starting all aps after fix permission
just trying fix permission after flash rom and now my andriod cann't execute launcher and android system.
Nav bar and notification bar still show up, so the only thing i can use is setting menu.
Clear data on apps cann't do either due to, in active button (keep computing size all time)
Any idea how to fix this?

darkfader said:
I just ran this from ROM Manager and thought... oh what have I done now...
I didn't really need to do it or anything. At least it didn't appear to have created issues
But, is it more or less secure now?
Click to expand...
Click to collapse
More secure - tingtan answered that a couple of posts up now hit his thanks button

I am using Phil Touch recovery and for some reason I don't have the option "fix permissions" in the advanced section. Any theories for why?

mafra staue
H0LT3R said:
I am using Phil Touch recovery and for some reason I don't have the option "fix permissions" in the advanced section. Any theories for why?
Click to expand...
Click to collapse
its been removed with 5.10.0 version i think

wyklocnik said:
its been removed with 5.10.0 version i think
Click to expand...
Click to collapse
Guess it's a background process.

Stock Recovery Permission Fix?
How do you 'fix permissions' if you have only stock recovery?
I thought I needed to do this with my Titanium backup file.
I read that you must move the file into the system directory (off of SD Card or EXT SD Card) to do this, however this can be a problem and an inconvenience for such a large file, is there another recommended way of doing this if your Rooted but pure stock?
(Ideally this would alleviate the need to move the file, or at least would take care of the manual process if it's not possible to rectify in place.)

Fix permission?
Guys i have a note 3 sm n9005 and i am running cm12.1 ever since it came out. Well the rom is pretty good and stable but its missing some features on my device like the( on screen nav bar, ambient display , themer for cm themes) and im kinda frustrated cuz they are some nice features to be missing. Anyhow i tried liquidsmooth 4.1 and i did get the nav bar and the other settings, but now im back to cm cuz ls 4.1 has some bugs and again im without these features on cm12.1. Will this fix permissions thing solve the problem?? And if any one knows the fix for it please share it with me. Thanks.

I would like to invite you guys to test my new app Parasol which can solve the permission problem in Android M~
http://forum.xda-developers.com/android/apps-games/app-parasol-alpha-t3190615

Hi there,
Parasol is a new app to solve the permission problem in Android M. Here is the link: http://forum.xda-developers.com/android/apps-games/app-parasol-alpha-t3190615
Just try it and give me some expert feedback. Thanks a lot~

shell script to fix permissions
This is my first shell script but it fixed the permissions on an app that started crashing after I upgraded to android M
it takes the /data/data/XXX folder name as its only parameter
This script only repairs the owner:group of the data files
Please send comments - this script can be used by anyone in any way
Code:
#!/bin/sh
if [ "$1" != "" ]; then
#The folders in /data/data each have a different owner. The next line gets the owner and the strips the whitespace
appusername=$(stat -c "%U" /data/data/$1 | xargs)
#The next line constructs the chown command to repair the permissions for all the files in the target folder
fixperm="chown -R $appusername:$appusername /data/data/$1/*"
#Display the command to the user
echo "$fixperm"
#Uncomment the next line if you would like the script to fix the permission
#eval $fixperm
else
echo "Missing target folder parameter"
fi

Related

[REF][Patch] Malware Exploit for all pre-Gingerbread phones

I'm posting this here for visibility for Fascinate users and ROM developers. In the following thread you can find all the information, as well as how to download and apply the patch files:
http://forum.xda-developers.com/showthread.php?t=977154
I'm sure it will be incorporated into the major ROM's soon. However, if you install apps from unverified sources, or regularly try out new apps from the market, you shouldn't wait.
Patching via CWM:
imnuts said:
Here are two zips if people want them and don't feel like going to another thread/page/topic/whatever.
DroidDreamMalwarePatch_pre-edify.zip
DroidDreamMalwarePatch_edify.zip
Click to expand...
Click to collapse
Patching via ADB or terminal emulator:
Alternatively, probably the quickest way (and if you copy and paste, the most fool-proof) if you are rooted and know how to use ADB, is to open up a command prompt or a terminal emulator on the phone to access the adb shell. If on a PC, type:
Code:
adb shell su
Then type the following lines, omitting the $ and # (if you are on a terminal emulator, start here):
Code:
$ su
# mount -o rw,remount /dev/block/stl9 /system
# touch /system/bin/profile
# chmod 444 /system/bin/profile
You are now protected from the current iteration of DroidDream Malware. Consider installing a security program like LookOut to protect against future vulnerabilities.​
Original Post:
Rodderik said:
[Patch][Rom]Malware Exploit for all pre-Gingerbread phones
Who is affected? All phones pre-gingerbread
Who should act? Users and developers using pre-gingerbread roms
How do I fix? Flash attached .zip at the bottom of this post or use one of the alternate methods down there
What if I think I was infected? Completely wipe your device, format sdard, go back to stock and re-apply rom, then flash the attached .zip (before installing any apps)
Why should I care? read below...
http://www.androidpolice.com/2011/0...your-phone-steal-your-data-and-open-backdoor/
Link to publishers apps here. I just randomly stumbled into one of the apps, recognized it and noticed that the publisher wasn’t who it was supposed to be.
Super Guitar Solo for example is originally Guitar Solo Lite. I downloaded two of the apps and extracted the APK’s, they both contain what seems to be the "rageagainstthecage" root exploit – binary contains string "CVE-2010-EASY Android local root exploit (C) 2010 by 743C". Don’t know what the apps actually do, but can’t be good.
I appreciate being able to publish an update to an app and the update going live instantly, but this is a bit scary. Some sort of moderation, or at least quicker reaction to malware complaints would be nice.
EDIT: After some dexing and jaxing, the apps seem to be at least posting the IMEI and IMSI codes to http://184.105.245.17:8080/GMServer/GMServlet, which seems to be located in Fremont, CA.
I asked our resident hacker to take a look at the code himself, and he’s verified it does indeed root the user’s device via rageagainstthecage or exploid. But that’s just the tip of the iceberg: it does more than just yank IMEI and IMSI. There’s another APK hidden inside the code, and it steals nearly everything it can: product ID, model, partner (provider?), language, country, and userID. But that’s all child’s play; the true pièce de résistance is that it has the ability to download more code. In other words, there’s no way to know what the app does after it’s installed, and the possibilities are nearly endless.
Click to expand...
Click to collapse
The offending apps from publisher Myournet:
* Falling Down
* Super Guitar Solo
* Super History Eraser
* Photo Editor
* Super Ringtone Maker
* Super Sex Positions
* Hot Sexy Videos
* Chess
* ????_Falldown
* Hilton Sex Sound
* Screaming Sexy Japanese Girls
* Falling Ball Dodge
* Scientific Calculator
* Dice Roller
* ????
* Advanced Currency Converter
* App Uninstaller
* ????_PewPew
* Funny Paint
* Spider Man
* ???
Click to expand...
Click to collapse
http://www.androidpolice.com/2011/0...-android-nightmare-and-weve-got-more-details/
Now, on to some more details of the virus. We should point out that this vulnerability was patched with Gingerbread, meaning any device running Android 2.3+ should be fine. In other words, if you’re looking to play the blame game (which I’m not, but having read all the comments on the original post, many people are), then there’s plenty to go around. The hole was fixed by Google, but it’s relatively useless since many phones aren’t yet running a version of Android that is protected. It’s noteworthy that some manufacturers released updates that patched the exploit for devices without updating to Gingerbread; unfortunately, it appears that minority is quite a small one.
Perhaps most important is the question of what infected users can do about their situation; unfortunately, the answer is not much of anything. Because the virus opens up a backdoor and can bring in new code at any time, the only way to really rid an infected device of any damage is to completely wipe the device – not exactly the optimal solution, but it looks like the only one available, at least for now.
Finally, Justin notes that ROM developers working with pre-Gingerbread versions of Android can prevent the virus from backdooring in code by putting a dummy file at /system/bin/profile.
Click to expand...
Click to collapse
As you can see androidpolice.com reports on this backdoor and roots and steals personal information. The apps are removed from the market but that doesn't mean they got them all. Attached is a flashable fix as suggested by androidpolice.com
So users can flash this .zip or simply create a blank file called profile and place it in /system/bin/ (developers are encouraged to include this file in future releases. A blank file is not going to affect performance at all)
Alternate methods:
Using 'adb shell' or terminal emulator (should work on any ROOTED phone) as suggest by xaueious here
Code:
$ su
su
# remount rw
Remounting /system (/dev/stl9) in read/write mode
# touch /system/bin/profile
# chmod 644 /system/bin/profile
#
Alternate 2:
Download blank profile file from here (or create one and name it profile)
Use a program like Root Explorer to copy it to /system/bin/
Then longpress on it and check the permissions should be read/write for user, read for group, and read for others.
Alternate 3:
cyansmoker has put together an apk for the patch here https://market.android.com/details?id=com.voilaweb.mobile.droiddreamkiller
Thanks for pointing this out photoframd and androidpolice.com for investigating and reporting!
UPDATE: I renamed the .zip file and reuploaded it (350 hits wow). Also in the edify scripted version I added 644 permissions to the file (but if you already flashed it then it should have defaulted to that). I also added a pre-edify version of the patch thanks to xaueious for people using a recovery that does not yet understand edify.
Click to expand...
Click to collapse
Thanks
Sent from my Rocking dj05, themed superdark w/o swype mod, voodoo 5, with custom boot and shutdown.. With premium xda app.
I would also recommend installing the free Lookout Mobile Security app. I find it to be very non-intrusive on my phone, no negligible battery drain or performance issues. Just scans any app you install, looking for bad stuff. Also does weekly full system scans, contact backup, and provides phone lock/alarm/location tracking features in case you lose it. Premium version has even more bells and whistles.
Posted from my EB01 SuperClean Fascinate with Voodoo
This has been stuck for the time being as it seems to be affected a BOATLOAD of users. Thanks for the linkage!
Here are two zips if people want them and don't feel like going to another thread/page/topic/whatever.
adb shell busybox touch /system/bin/profile
is all you need. Most fascinate kernels (of recent) have a bug, and /system is mounted as r/w.
So everyone should flash this no matter what rom you are using? Should we flash the new cwr also?
sorry delete
jcase said:
adb shell busybox touch /system/bin/profile
is all you need. Most fascinate kernels (of recent) have a bug, and /system is mounted as r/w.
Click to expand...
Click to collapse
adb shell chmod 644 /system/bin/profile
also?
NOsquid said:
adb shell chmod 644 /system/bin/profile
also?
Click to expand...
Click to collapse
This would probably be a good thing. Basically locks the file from being written to, right? Should I add it to the first post?
lasportsfan said:
So everyone should flash this no matter what rom you are using? Should we flash the new cwr also?
Click to expand...
Click to collapse
Yes.
All this is is a quick fix that will create a blank file. The current iteration of the malware checks to see if it already exists. This file fools it into thinking it already exists, so it moves on.
As you might guess, the author needs to only update his code to bypass this, in order for this to be an issue again.
And now that this is out, someone else will probably try it. Someone who is a little more thorough.
Moral of the story?
Be careful.
Consider running something like LookOut.
Backup your important data regularly.
As far as CWM goes, is there some kind of connection to the malware thing? Or just in general?
(If just in general, it's better to ask elsewhere as to not derail the thread).
Otherwise, I don't believe the newest (orange) clockwork recovery from ROM manager is fully compatible yet. Last I heard, it still had some bad binaries and 1 bad mounting point. Stick with the Red from JT's thread (which is the same bundled into SuperClean). Other than a couple superficial bugs that don't hurt anything, it works wonderfully and has more features than the orange CWM currently has.
GizmoDroid said:
This would probably be a good thing. Basically locks the file from being written to, right? Should I add it to the first post?
Click to expand...
Click to collapse
I dunno, it was in Rodderik's post but jcase didn't mention it. He's smarter than me, that's why I asked...
444 or 000 would be safer as that would prevent the file from being overwritten at all. 444 for read-only, 000 for no access.
If I never downloaded any of the apps in the list and have lookout on my phone is this neccesary to download or should i not be worried?
italysfinest327 said:
If I never downloaded any of the apps in the list and have lookout on my phone is this neccesary to download or should i not be worried?
Click to expand...
Click to collapse
Who should act? Users and developers using pre-gingerbread roms
Click to expand...
Click to collapse
I'd say that means you should be worried. Those apps listed are just the ones that were found on the market with them from one publisher. Just how virus's can get put into any application on a PC, the same can be done on phones.
Remember folks, our phones are just as exploitable as any other computer, so be careful!
good thing the patch came out!
imnuts said:
444 or 000 would be safer as that would prevent the file from being overwritten at all. 444 for read-only, 000 for no access.
Click to expand...
Click to collapse
Not sure whether Android interprets permissions differently from desktop Linux, but even if a file is 000 the owner can delete it on Debian. And root definitely can. If the file needs to be there for the root exploit to work, then this prevents it, but if they can run the root exploit and get root while this file is there then changing permissions on it will do nothing.
iofthestorm said:
Not sure whether Android interprets permissions differently from desktop Linux, but even if a file is 000 the owner can delete it on Debian. And root definitely can. If the file needs to be there for the root exploit to work, then this prevents it, but if they can run the root exploit and get root while this file is there then changing permissions on it will do nothing.
Click to expand...
Click to collapse
This is just another reason why I see this as a quick fix for what will need to have a much better one in the future.
If anyone hears of a more robust solution (besides using LookOut), let us know!
I navigated through Root Explorer to system/bin/profile and found a file there that reports
"01 Aug 08 06:00:00 rwxr-xr-x 0 bytes".
The 2008 date has me worried, although the 0 bytes means it is empty. Does anybody know if this is put there by FrankenClean 2.8 as a fix for this issue, or am I the only one on SuperClean seeing this (which would be bad!)
SupraLance said:
I navigated through Root Explorer to system/bin/profile and found a file there that reports
"01 Aug 08 06:00:00 rwxr-xr-x 0 bytes".
The 2008 date has me worried, although the 0 bytes means it is empty. Does anybody know if this is put there by FrankenClean 2.8 as a fix for this issue, or am I the only one on SuperClean seeing this (which would be bad!)
Click to expand...
Click to collapse
It is included in SC2.8. The 0 bytes is the best indicator that you are clean, since this patch is merely an empty file.
If you were infected, that file would actually have code in it.
For CWM 2.5.x.x DJ05, which one do you flash? or both?
DroidDreamMalwarePatch_pre-edify.zip
DroidDreamMalwarePatch_edify.zip
Thanks and sorry for the trouble, just wanted to be sure.

[Q] Attempt to get Advanced settings back in CM10.2

I have tried following these directions to temporarily get the Advanced menu back for the CM10.2 nightlies so I can enable dock audio. I keep getting the following error:
Error type 3
Error: Activity class {com.cyanogenmod.device/com.cyanogenmod.device.DeviceSettings} does not exist
It seems to work on other VZW Note 2 Android 4.3 based roms, but I cannot get it to work on our nightlies.
Is there an additional file or entry missing somewhere?
Thank you for any assistance.
Hopper8 said:
Ok, for anyone who is missing the 'Device settings' or 'Advanced Settings' menu (since it was left out of CM10.2. See here for more details.) These settings include mDNIE screen settings and backlight control. I for one use them.
Anyway: To get these settings back, follow these steps.
1. Download attached apk (I took it from Rootbox 4.2.2, but it works just the same on 4.3).
2. Paste it into /system/app, set permissions to rw-r--r-- and reboot.
3. Enter terminal Emulator, and type:
Code:
su [enter]
am start -n com.cyanogenmod.settings.device/.DeviceSettings [enter]
(obviously don't type [enter], press the enter key....)
4. Device Settings will open up, set whatever you desire
Note: to re-open the app, you will have to do it throught Terminal Emulator again. There's no other way of launching it that I could find, even Titanium Backup doesn't recognise it as able to run.
Big thanks to Unisexist6969 and Markox89 for helping figure this out
Edit: most users of a launcher such as nova or similar should be able to add a homescreen shortcut using nova activities shortcut. Personally this doesn't work for me, I'm not sure why. The method above will work regardless of using a different launcher, or if someone (like myself) doesn't have the option to add a shortcut, or if they plain don't want a homescreen shortcut (also like myself).
Click to expand...
Click to collapse
mising said:
I have tried following these directions to temporarily get the Advanced menu back for the CM10.2 nightlies so I can enable dock audio. I keep getting the following error:
Error type 3
Error: Activity class {com.cyanogenmod.device/com.cyanogenmod.device.DeviceSettings} does not exist
It seems to work on other VZW Note 2 Android 4.3 based roms, but I cannot get it to work on our nightlies.
Is there an additional file or entry missing somewhere?
Thank you for any assistance.
Click to expand...
Click to collapse
I'm running the Eclipse ROM (which I believe is based off of CM 10.2), and I had this issue before I restarted the phone. After restarting, it fixed the problem. If this issue persists after restarting your phone, maybe someone else can chime in?
Sorry I couldn't be of more assistance.
SonOfUncleSam said:
I'm running the Eclipse ROM (which I believe is based off of CM 10.2), and I had this issue before I restarted the phone. After restarting, it fixed the problem. If this issue persists after restarting your phone, maybe someone else can chime in?
Sorry I couldn't be of more assistance.
Click to expand...
Click to collapse
Rebooting didn't help, I am back on a TW ROM for the moment since I use my dock everyday, but plan on trying Eclipse or PAC this weekend.
Sbrissen said he is going to put the option back in the settings once they figure out where they want to put it, so I just keep flashing the nightlies every few days to check.
Thank you for your input though.

How to fix the "invalid download uri" problem

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.
It WORKED!
What a life saver, I was able to change the permissions through FX Root Explorer.
Thank YOU.
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!
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!
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.
sweetmango said:
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.
Click to expand...
Click to collapse
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
"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.
ntn_labs said:
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
Click to expand...
Click to collapse
Try without an SD card in your device.
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!
Thanks, it worked
I didn't try changing permissions but just cleared the Download Manager data and it did work
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.
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.
Merman1983 said:
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.
Click to expand...
Click to collapse
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.
Fixing permissions worked for me thanks!
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.
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

SystemUpdateService Wakelock Fix

My phone had a constant wakelock and it was draining my battery.
After doing more research I found that it is because of a recent update to Google Play Services. The Cyanogenmod fix is here:
http://review.cyanogenmod.org/91021
The workaround I used was to enable the service at startup. Only the receivers should be disabled, the service should remain enabled. See the above link for details.
Here is a workaround I use:
Install Script Manager (SManager) from Play Store. https://play.google.com/store/apps/details?id=os.tools.scriptmanager.
Enable Browse as root in SManager (Advanced > Configuration).
From SManager, create a script in /data/local/ with the name 'startsysupservice'.
Edit the script and put the following line in the file:
su -c "pm enable com.google.android.gms/.update.SystemUpdateService"
Mark the following options: Su, Boot, Bg.
Change the radio button from 'Is script' to 'Is executable'. This may not be required for CarbonRom but was when I tested this on CyanogenMod. If you don't select this, the CPU may be constantly doing something so it will actually be worse than before (this selection may have something to do with what shell is used to execute this).
Hit Save. Reboot the phone.
Whenever the phone boots up, it will start the service which should stop the wakelock. It may take a few minutes before the script is run, but eventually the service will start. You can use the 'Disable Service' app to check that it worked.
NOTE: The correct way is for your ROM maintainer to update the sources with the new patch. Unfortunately, many ROMs are no longer maintained (especially for older devices) so this way is a good way to get around this issue for these ROMs. I originally created this for CarbonRom on my P769. I then switched to CyanogenMod 11 by dhiru1602 and this workaround still worked. It should work on other devices as well.
frostinide said:
My phone had a constant wakelock. After doing more research I found that it is because of a recent update to Google Play Services. The Cyanogenmod fix is here:
http://review.cyanogenmod.org/#/c/91021/
The fix I used was to enable the service at startup. Only the receivers should be disabled, the service should remain enabled. See the above link for details.
Here is a workaround I use:
Install Script Manager (SManager) from Play Store. https://play.google.com/store/apps/details?id=os.tools.scriptmanager.
Enable Browse as root in SManager (Advanced > Configuration).
From SManager, create a script in /data/local/ called 'startsysupservice' with the single line:
su -c "pm enable com.google.android.gms/.update.SystemUpdateService"
Mark the following options: Su, Boot, Bg.
Hit Save. Reboot the phone.
Whenever the phone boots up, it will start the service which should stop the wakelock. It may take a few minutes before the script is run, but eventually the service will start. You can use the 'Disable Service' app to check that it worked.
It would be nice if the Cyanogenmod fix in the link above could be merged into CarbonRom and other ROMs for future releases, but I wanted to share this workaround in the meantime. I have P769 with CarbonRom.
Click to expand...
Click to collapse
Interesting info Frost..
and the script is a good idea. By the time I have Oneplus O2 OS all patched up, it will look worse than Frankenstein and I'll never remember all of the operations.
Frost,
Would you detail the differences between "Only the receivers should be disabled, the service should remain enabled"?
Thanks.
JeffDC said:
Would you detail the differences between "Only the receivers should be disabled, the service should remain enabled"?
Click to expand...
Click to collapse
I got that information from the CyanogenMod link I posted. You can see the patch there and see exactly what lines were changed for this fix.
I suggest you read the Android development documentation if you want to know how it all works.
I also found this link, but I can't vouch for its correctness as I don't have enough knowledge of how Android works: http://stackoverflow.com/questions/14548927/android-broadcast-receiver-vs-service
This is a major problem affecting all CM based custom ROMS. The problem is Carbon is not doing anything about it. If you go on their website, there is no new nightly for Galaxy S3 D2LTE - It has been the same ROM since 2014. When you boot the phone, it disables SystemUpdateService. So the phone never sleeps. Waiting for Carbon to Fix this issue.
So here's the real question...
WHERE is this Code within the CM and CM based ROMS that disables SystemUpdateService at boot?
ocd_amp said:
The problem is Carbon is not doing anything about it.
Click to expand...
Click to collapse
If you go to their website, they say they basically stopped working on KitKat except for certain fixes, and are concentrating on Lollipop.
https://carbonrom.org/on-to-sweeter-things/
You can check on their website for more info or if you want to try and contact them. Although I would say it's not really worth it.
I would just use the workaround that I posted (or any other workaround out there). It's not the cleanest solution, but it gets the job done.
ocd_amp said:
WHERE is this Code within the CM and CM based ROMS that disables SystemUpdateService at boot?
Click to expand...
Click to collapse
Check the link I put to the CyanogenMod fix. It has the patch showing the exact line changes and the files that have changed.
update!
Please check this thread.
[MOD] [v7.0.99] Google Play Services with System Update Wake Lock Fix
http://forum.xda-developers.com/one...mod-google-play-services-update-wake-t3078082
frostinide said:
My phone had a constant wakelock and it was draining my battery. I am using CarbonRom on my P769.
After doing more research I found that it is because of a recent update to Google Play Services. The Cyanogenmod fix is here:
http://review.cyanogenmod.org/91021
The workaround I used was to enable the service at startup. Only the receivers should be disabled, the service should remain enabled. See the above link for details.
Here is a workaround I use:
Install Script Manager (SManager) from Play Store. https://play.google.com/store/apps/details?id=os.tools.scriptmanager.
Enable Browse as root in SManager (Advanced > Configuration).
From SManager, create a script in /data/local/ called 'startsysupservice' with the single line:
su -c "pm enable com.google.android.gms/.update.SystemUpdateService"
Mark the following options: Su, Boot, Bg.
Change the radio button from 'Is script' to 'Is executable'. This may not be required for CarbonRom but was when I tested this on CyanogenMod. If you don't select this, the CPU may be constantly doing something so it will actually be worse than before (this selection may have something to do with what shell is used to execute this).
Hit Save. Reboot the phone.
Whenever the phone boots up, it will start the service which should stop the wakelock. It may take a few minutes before the script is run, but eventually the service will start. You can use the 'Disable Service' app to check that it worked.
It would be nice if the Cyanogenmod fix in the link above could be merged into CarbonRom and other ROMs for future releases, but I wanted to share this workaround in the meantime.
Click to expand...
Click to collapse
Thanks a lot buddy.
From a battery drain of anywhere between 20-45% / hour, went straight to 0.3% / hour since the last 4 hours now ( was sleeping myself, but nonetheless the lower end aka 20% drain used to take place when I was sleeping.
Your fix has restored my battery life ( atleast in this short time I do feel that has happened)
Thanks again.
Hi there,
i got rid of the googleupdateservice wakelock by the above hack.
But now i have the fingerprintscannerwakelock keeping my device awake.
Any suggestions for that??
This is the only method I've found to work on my phone to automate the process upon boot. Thanks!!! I've tried about 10 different other ways, from init.d scripts to autoruns to appOps to modified play service apks to you name it.
frostinide said:
My phone had a constant wakelock and it was draining my battery. I am using CarbonRom on my P769.
After doing more research I found that it is because of a recent update to Google Play Services. The Cyanogenmod fix is here:
http://review.cyanogenmod.org/91021
The workaround I used was to enable the service at startup. Only the receivers should be disabled, the service should remain enabled. See the above link for details.
Here is a workaround I use:
Install Script Manager (SManager) from Play Store. https://play.google.com/store/apps/details?id=os.tools.scriptmanager.
Enable Browse as root in SManager (Advanced > Configuration).
From SManager, create a script in /data/local/ called 'startsysupservice' with the single line:
su -c "pm enable com.google.android.gms/.update.SystemUpdateService"
Mark the following options: Su, Boot, Bg.
Change the radio button from 'Is script' to 'Is executable'. This may not be required for CarbonRom but was when I tested this on CyanogenMod. If you don't select this, the CPU may be constantly doing something so it will actually be worse than before (this selection may have something to do with what shell is used to execute this).
Hit Save. Reboot the phone.
Whenever the phone boots up, it will start the service which should stop the wakelock. It may take a few minutes before the script is run, but eventually the service will start. You can use the 'Disable Service' app to check that it worked.
It would be nice if the Cyanogenmod fix in the link above could be merged into CarbonRom and other ROMs for future releases, but I wanted to share this workaround in the meantime.
Click to expand...
Click to collapse
I don't get what you mean by "with the single line:
su -c "pm enable com.google.android.gms/.update.SystemUpdateService"
How do I do that part? All I get is an option to set the name of the script
noob to android said:
But now i have the fingerprintscannerwakelock keeping my device awake.
Any suggestions for that??
Click to expand...
Click to collapse
Sorry, no idea on that one. You should probably create a new post for that.
wasiq224 said:
I don't get what you mean by "with the single line:
su -c "pm enable com.google.android.gms/.update.SystemUpdateService"
How do I do that part? All I get is an option to set the name of the script
Click to expand...
Click to collapse
Put in 'startsysupservice' as the name of the script. Then edit the script (there is an edit button at the top) and put the following line in there:
su -c "pm enable com.google.android.gms/.update.SystemUpdateService"
After it's saved, edit it again to make sure the contents did actually save. If it doesn't work, you may need to save on your sdcard first and then copy it over manually with a root explorer.
It works but you have to say that this file must have changed permissions.
Thanks a lot.
Dru79 said:
It works but you have to say that this file must have changed permissions.
Thanks a lot.
Click to expand...
Click to collapse
Which are the new permissions for the file?

Apollo loop trapped in setting and google

My Apollo is currently stuck in a loop trapped in between the Google welcome screen and settings. This happened after trying to add gapps on a rooted 4.5.2. Originally it fell into this as I was setting permissions on one of the system files. All of a sudden it went into Google welcome screen and settings, completely isolating launcher, apps and even home buttons. In a panic move I performed a factory reset which went well, but I am still at the same spot. I guess the factory reset does not modify system files, which leaves me a bit confused and questioning weather I still have my root or not? I've tried through and to mount the file system as a rw and I have tried to modify the file that caused this but it won't let me.. Always says read only. I can't upgrade or downgrade as I have modified the ota filename not to upgrade and when I try to modify it's name I get the same error... Read only.... Could someone please help me? Is there a way to remount my system file to rw? Or is there a way I could force an update like Odin? Thanks in advanced for any input on this.
Figured my issue out.. Im definetly a noob when it comes to Linux commands... I was trying to obtain super user permission by typing SU in order to mount the system as rw. I wasn't aware that when shell promt begins $ it's read only, and # is rw. I was never going into rw because my kindle screen was always off and every time I would request SU It would ask for acknowledgement through the screen the normal way it's usually granted. Long story short, I modified the appropriate files and voila.... Everything works.
help needed
Hello,I'm stuck in the same situation as you had before.I am also stuck between the google welcome page and the wifi page,could you guide me along as to how to solve this problem?I'm a complete noob when it comes to rooting and the etc,so if you will,please guide me step-by step.
Cheers,

Categories

Resources