Github Tutorial App Shows You How to Use… Github

Github can get pretty complicated and using it can become quite daunting, especially … more

Google Glass-like Clip-On For Regular Glasses Developed by Sony

For the price of $2,000, a pair of glasses that can run apps, take pictures, … more

Micromax Takes OnePlus to Court! Android Wear Receives Lollipop – XDA TV

Android 5.0 Lollipop is available officially for the Moto 360! … more

Google Invites Selected Devs to Buy Project Tango Development Kit

Just about a month ago, the curious Project Tango development kit was … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Any way to reset permissions for all apps? (root)

OP britoso

17th April 2010, 08:36 AM   |  #1  
britoso's Avatar
OP Senior Member
Flag Orlando
Thanks Meter: 286
 
2,743 posts
Join Date:Joined: Jan 2010
Donate to Me
More
I've been playing around on my phone, esp with framework-res.apk .
Now many of my apps have their permissions screwed up (There was a UID mismatch on two seperate occasions)
The apps that show up in the log (below) sometimes FC becasue they dont have the right permissions granted.

Sample logcat on startup:
Code:
D/PackageManager(  141): Scanning app dir /data/app-private
D/PackageManager(  141): Scanning app dir /sd-ext/app-private
I/PackageManager(  141): Time to scan packages: 12.442 seconds
W/PackageManager(  141): Not granting permission com.android.launcher.permission.INSTALL_SHORTCUT to package com.google.code.appsorganizer because it was previously installed without
W/PackageManager(  141): Not granting permission android.permission.INTERNET to package lysesoft.andftp because it was previously installed without
W/PackageManager(  141): Not granting permission android.permission.BATTERY_STATS to package com.dynotes.miniinfo because it was previously installed without
W/PackageManager(  141): Not granting permission android.permission.INTERNET to package com.greenecomputing.linpack because it was previously installed without
I'm thinking an "adb install -r <file.apk>" for each of these apps will fix it...but before that I want to know if theres another/quicker way (reset to default permissions as in each app's apk).

thanks.
18th April 2010, 04:26 AM   |  #2  
Member
Flag Calgary
Thanks Meter: 0
 
88 posts
Join Date:Joined: Oct 2009
More
In AmonRa's recovery there is an option under the "Other" submenu called "Fix apk uid mismatches." It sounds like that is what you need.

Edit: Yeah I just checked, that is what you need. Once run, that script will give you a "fix_permission.log" file in the root of your sdcard.
Last edited by FaJu; 18th April 2010 at 04:30 AM.
18th April 2010, 07:08 AM   |  #3  
britoso's Avatar
OP Senior Member
Flag Orlando
Thanks Meter: 286
 
2,743 posts
Join Date:Joined: Jan 2010
Donate to Me
More
Quote:
Originally Posted by FaJu

In AmonRa's recovery there is an option under the "Other" submenu called "Fix apk uid mismatches." It sounds like that is what you need.

Edit: Yeah I just checked, that is what you need. Once run, that script will give you a "fix_permission.log" file in the root of your sdcard.

That was what I used to fix the UID mismatches. The permissions problem still remains.
18th April 2010, 08:10 AM   |  #4  
Member
Flag Calgary
Thanks Meter: 0
 
88 posts
Join Date:Joined: Oct 2009
More
Oh that's weird. Sorry I got nothing.
20th April 2012, 05:16 PM   |  #5  
Jarmezrocks's Avatar
Senior Member
Flag Gold Coast
Thanks Meter: 466
 
949 posts
Join Date:Joined: Mar 2011
Donate to Me
More
Try re-setting the permissions for each individual app in the actual install script.

Are they installed in system/app? I am assuming so?

If you know the permissions code number that you want to set for the app you can set it accordingly. If you want to try something just for testing to see if your app will work but not as a permanent proceedure try this:

Code:
set_perm(0777, 0777, 0777, "/system/app/your_app_name_here.apk");
This sets specific permissions to that app in particular as totally open, meaning anything can do anything to that app. Once you boot and test the app and see that it works then bring the permissions back on that app to be suitable.

You can also if you are not keen on installing to system partition do this
Code:
symlink("/data/app/your_app_name_here.apk", "/system/app/your_app_name_here.apk");
20th April 2012, 06:44 PM   |  #6  
Jarmezrocks's Avatar
Senior Member
Flag Gold Coast
Thanks Meter: 466
 
949 posts
Join Date:Joined: Mar 2011
Donate to Me
More
I'll upload you guys a boot init.d script that will reset permissions on your apps to correct 644 on every boot for after testing.

Can you please tell me what chipset details are? Like on galaxy S MTD system is something like /dev/block/mtdblock2 /system

What is system and data partitions on nexus one?

Once I know these details and if your ROM has init.d support then I the boot script will ensure that this is done on boot every time
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes