top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Permission denied error when using SystemProperties.set() in Android

+1 vote
700 views

I've a problem of not having enough permissions for setting a “persist.xxxxx” property from one of the applications. This application shares the User-id of the phone so I tried to hack in property_service.c and add an entry:

{“persist.”, AID_RADIO, 0} 
in property_perms structure. 

After this I was able to set the property but without this I get a “permission denied” error "> init: sys_prop: permission denied uid:1001 name:persist.xxxxx". Any clue...

posted Aug 19, 2013 by Ahmed Patel

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

Similar Questions
+6 votes

In android generally when an app is installed, the PackageInstallerActivity and PackageManagerService make sure to assign the supplementary gid's to the app. This determines the level of access when an app is invoked everytime.

I just wanted to confirm if any verification process takes place in the runtime from packagemanager or any other service for that matter.

The app is granted the corresponding access from the gid's that should get it running technically and Packagemanager will only come into picture incase of updating the app.

Is my understanding correct?

0 votes

A user on my box has Wordpress installed under a virtualhost. He has other users uploading photos to different directories using Wordpress' interface. The concern is that these directories are defaulting/need to be setup to 777 permissions for the uploads to be successful.

Any advice.

+2 votes

I'm receiving the following exception:

java.net.SocketException: "Permission denied": connect

when instantiating a Socket from a servlet:

final Socket smtpSocket = new Socket(mailTransportHost, mailTransportPort);

This application was running as a service under Windows Server 3003 R2 32-bits. After migrating it to Windows Server 2008 R2 64-bit, I cannot longer establish connection with the smtp server.

This only happen when running Tomcat as a service. Running as a standalone (starting it up using startup.bat) works fine. No exception instantiating Socket, emails are sent.

Environment:

 - Windows Server 2008 R2 64-bit
 - Tomcat 7.0.39
 - jdk1.6.0_33-x64
0 votes

I tried to run Dalvik in portable mode by setting /data/local.prop as follows:

dalvik.vm.execution-mode = int:portable

But after I reboot the device (which is a Nexus 7), app_process (hosting zygote) still starts in jit mode.

However, if I run:

adb shell stop
adb shell setprop dalvik.vm.execution-mode int:portable
adb shell start

Then app_process will run in portable mode. Is /data/local.prop deprecated or something is missing here?

0 votes

I understand not allowing apps to automatically install home screen widgets as it could be annoying but for n00bish users it can be a challenge to instruct them on how to do so and so it DRASTICALLY weakens the business case for building a widget (and thereby diminishes a defining feature of Android).
To remedy this I wanted to suggest either an API that allows for installing a home screen widget after a confirmation with the user and/or an app permission that allows an app to install home screen widgets and/or a feature on Google Play that could take care of the confirming and installing.


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...