Changing the default.prop file to set ro.secure to 0 will allow the adb shell to run as root, as is usually done on an emulator or development device.
Since this is not the case that the Android architects foresees, the solutions that give you “some of the times” for some purposes, as you might find on your desktop, are not necessarily well developed, but you may be able to borrow something from sources of one of the communities, such as cyanogen.
source
share