How do I add custom startup options to the emulator (especially android), e.g. to enable the root shell for admin shell commands?
Are you talking about your local workstation, or the virtual android device?
If it's the latter, then you can access the device's shell using:
adb -e shell
For more info, see this document