Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On another linux system I might expect to find a .profile file, or something in /etc used by default. I'm unable to determine what sets the system path for processes not running in a shell.

share|improve this question
I'm not sure either, but you can create /etc/profile and use it. – Matthew Read Dec 17 '10 at 19:23
up vote 7 down vote accepted

It appears to be defined in /init.rc, at least on my device:

export PATH /sbin:/system/sbin:/system/bin:/system/xbin

I don't think you can edit this file directly though, even with root access, because it is part of the read-only boot image, not the /system partition. If you want to edit it then I guess you would have to unpack, edit and re-pack the boot image as described here:

I haven't tried this though.

share|improve this answer
Thanks. I'm going to continue looking for a solution that doesn't involve modifying the boot image, such as possibly union mounting a replacement copy of the file on top of the boot image late in the process. I'll update this if I find a solution. – Sparr Jan 18 '11 at 3:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.