This group is probably not the best place to ask rooted related questions as it focuses on SDK development which root is not. XDA or StackOverflow might be a better bet, in general use of root in development is poorly documented though.
But no, an Android app cannot* run as root (And as annoying as it can be, this is really good for security, root is already overused in apps). You can however use su to open a shell or custom binary and keep that process running and communicate with that by writing to it's input stream. It's kind of messy and error handling sucks and you have to deal with the shell (Unless you write your own binary and communicate with that). -Kevin * Okay nothing is impossible, but seriously it's not realistic On Jun 5, 10:43 pm, Mike <[email protected]> wrote: > I am trying to create an application that takes advantage of Dynamic > Voltage and Frequency Scaling (DVFS). My phone is rooted and I can > successfully scale my device with the following command: > > psProc = Runtime.getRuntime().exec(new String[]{"su", "-c", "echo > 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed"}); > > However, this command is executed frequently since it appears within > the repaint method of a game. I would like to execute "echo 300000 > / > sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 300000", without > using "su", "-c", since switching to the root user may be slow. Can I > grant an entire application super user privileges before hand so that > I may omit "su", "-c", in my execution? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

