• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Fixing permission on android

djgyo12

Newbie
Nov 19, 2013
43
6
Hellow guys.. Can some one explain in human words and language whats fixing permission on android means and what does it do?? I know sometimes it is recommended to fix permission i can be done with rom manager but before i do something i need to know first what im doing ... A good, nice, well explained, and knowledgeable answer will be helpful for many of us. Thanks a lot.
 
I managed to find a pretty decent explanation of the process over at http://androidforums.com/triumph-all-things-root/510022-fix-permissions.html:

In Android, each app runs as its own UID (user ID) just like multiple people would have their own UID on a big UNIX system. The reasoning is the same, to prevent apps (people) from messing with each other's data. The data for each app has to be 'owned' by the UID the app runs as, and additionally the app itself (.apk file) has to be that same UID. Unlike big UNIX systems, these IDs are stored in the packages.xml file in /data/system. This file, in addition to storing UIDs, stores the android permissions of each program as described in its manifest (permissions like writing to the sdcard, monitoring phone state, turning wifi on and off, accessing bluetooth, etc). If the file is damaged, deleted, or otherwise unreadable, it is regenerated. The app UIDs are assigned initially in the order you install them (10001, 10002, etc.). When the packages.xml regenerates, it grabs the Android permissions from the .apks but doesn't know what the old UIDs were. That's where fix_permissions comes in.

Whether run from recovery or a booted system, fix_permissions reads through the packages.xml file and performs a chown/chmod command (which changes owner/change read-write-execute permissions) on each .apk and the data directory for it. It doesn't fix Android permissions (e.g. if phone.apk lost the ability to make calls, fix_permissions wouldn't help -- see below). While CyanogenMod udpates the version of fix_permissions in the ROM on a semi-regular basis, the version in any given recovery is probably older (and recoveries aren't upgraded on devices as often, either). So if fix_permissions in recovery doesn't work, the one in the booted rom might (or vice versa).

Hope that helps :)

PS - I'm also moving your thread into a forum for general Android discussion. Maybe some other nerds will be able to chime in with some additional information :thumbup:
 
Upvote 0
I don't understand why clockwork removed the option from cwm and put it in ROM Manager :thinking:

It was way easier in recovery to fix permissions right after installing an update for a nightly rom .. But now have to download all my apps install rom manager..and then fix... But still a nice tool tho,.. Also i wish they could put back in cwm the option to wipe battery stats.
 
Upvote 0
I managed to find a pretty decent explanation of the process over at http://androidforums.com/triumph-all-things-root/510022-fix-permissions.html:



Hope that helps :)

PS - I'm also moving your thread into a forum for general Android discussion. Maybe some other nerds will be able to chime in with some additional information :thumbup:

Thanks a lot for your quick response...and it really helped to understand what fixing.permission really does or what is it for. Thank you!
 
  • Like
Reactions: codesplice
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones