Execute setprop from application

by Giorgio M. » Wed, 04 Mar 2009 02:01:27 GMT

Sponsored Links
 I have to execute the shell command

setprop net.dns1 xxx.xxx.xxx.xxx

from an android activity but i can't find a working way to do it.

How can i execute this command from the application?


Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com


Execute setprop from application

by Dianne Hackborn » Wed, 04 Mar 2009 04:16:07 GMT

 Sorry, you can't.

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.


Sponsored Links

Execute setprop from application

by hengli cui » Wed, 04 Mar 2009 10:58:10 GMT

 You can try SystemProperties.set().

2009/3/4 Dianne Hackborn <hack...@android.com>


Execute setprop from application

by Long » Thu, 05 Mar 2009 09:12:34 GMT

 Your AP don't have root permission to do it.
Try using a booting exist "excutable" to do it.


Other Threads

1. Parse Error during installation of application.

most likely a case of bad package



2. Data connection hold during deep sleep?

Hey Guys,

I have an issue with data connections on the Dream being dropped when
the phone goes into Deep sleep. I have a number of AlarmManagers being
fired at intervals of between 1 - 3 hours it seems at night time when
the phone is not being used these alarms do not seem to get a data
connection in order to hit a server to get some information back. Is
this common? If so is it possible to get a data lock requiring the 3G
connection to spin up so I can make a request?

Thanks in advance,



3. Cubeworks

4. product graph

5. Prospek Android di Indonesia? (Was: IWIC indosat)

6. is it possible to reference custom drawable from layout file?

7. Where to copy pictures so Gallery will show them?