3

I'm attempting some Android system integration on a BeagleBoard like device. I have complete file system access as I can read/write/format the CF card hosting the boot and rootfs partitions. For example, I can easily modify init.rc to execute arbitrary commands during the device bootup.

Based on this, how can I enable root access for the user on the device? If that's not possible, how can I setup dropbear SSH (or any other service) such that it runs with root privileges? z4root does not work, and I'm sure there must be a better method given complete file system access. This is Android 2.2 (Froyo) for what it's worth.

snakile
  • 52,936
  • 62
  • 169
  • 241
Jason Nichols
  • 11,603
  • 5
  • 34
  • 53

1 Answers1

3

Modifying the default.prop file to set ro.secure to 0 will let the adb shell run as root as it typically does on the emulator or a development device.

Because it's not a case envisioned by the android architects, solutions that give you root "some of the time" "for some purposes" as you might find on a desktop linux box are not necessarily well developed, but you may be able to borrow something from the sources of one of the community roms such as cyanogen.

Chris Stratton
  • 39,853
  • 6
  • 84
  • 117
  • is there a method to give the user complete root access, even when not in adb? – Jason Nichols Feb 05 '11 at 16:41
  • 1
    Depends on how you want the user to, er, access the access. You could make the toolbox shell setuid root, but they'd need an application to access a shell from the touchscreen. Of course any application on the device could programatically drive that shell too. Probably its better to think through the things that need root access and delegate them to unix groups (paired with android manifest permissions) with only that specific power, or run them as system services. – Chris Stratton Feb 05 '11 at 17:07