-1

I was tryng to reboot my device with my app, but it throws an exception with Error message "The app with xxxx uid and with xxxx pid you can't reboot the device". So, if I can search what is the pid or uid that can, may be like a pid of alarm or other can do that, because are from the OS. Thanks for all

titusfx
  • 1,431
  • 19
  • 30

2 Answers2

4

How i can change the uid and pid of my app?

This is not possible.

The thing is that i try to reboot my app

You do not "reboot" an "app". You reboot a device.

but he throw a exception and the messages say that with xxxx uid and with xxxx pid you cant reboot

Only applications considered part of the firmware can hold the necessary permissions to reboot a device. If you wish to reboot a device, build your own custom firmware.

CommonsWare
  • 910,778
  • 176
  • 2,215
  • 2,253
  • true enough. However if you manager to change configuration (like device lang) and your app is not saving the option to handle the configuration change herself your app will be restarted, i'm not sure about the process though, most chances process and Application object will remain and only the Activity stack will be reseted. – codeScriber Sep 26 '11 at 12:47
  • @codeScriber: "your app will be restarted" -- correct. This is no different than switching from portrait to landscape. It has nothing to do with the verb "reboot", any more than you would describe parking a car as "crashing a car". – CommonsWare Sep 26 '11 at 13:53
1

You can request superuser privileges on rooted devices thru the su command and reboot the device with reboot.

trashkalmar
  • 883
  • 5
  • 11
  • I was thinking in something like that too, but how i can execute that commands??? I try to find the source of some terminal. thanks – titusfx Sep 26 '11 at 13:46