I have modified a kernel's ramdisk to include a "settings" terminal run bash script.

However, when I type in terminal


I get file is not found. dp exists in the ramdisk as /sbin/dp I've attempted to create a symlink on flashing it with the following

symlink("/system/bin/dp", "/sbin/dp");

However, I notice the symlink is never created (yes, I have data, system, and cache mounted during the flash process)

How can I ensure dp is run via just typing in the above?

  • 3
    /system/bin should be in the PATH for that. Have you made your script executable by the user trying to invoke it (e.g. chmod 0755 /system/bin/dp)? I place my "user stuff" in /system/xbin, which is also in the path, and never had any issues with them not being executable (unless I forgot those permissions, of course).
    – Izzy
    Aug 24, 2015 at 20:27
  • well.... the script is in /sbin/dp What I want to do is create the dymlink to /system/bin (or /system/xbin)
    – Kevin
    Aug 27, 2015 at 17:52
  • Just wondering why. Isn't /sbin in your $PATH? For me it is. Apart from which: I'm not sure if your call to symlink() is correct (not familiar with that one from flashing). For the CLI tool, syntax would be ln -s <file> <link>. Maybe you've just got it the wrong way around? The code in your question puts the target (link) first, and the source (file) last.
    – Izzy
    Aug 27, 2015 at 18:28
  • Not sure why it's not in my path. Yeah, I was thinking of executing a shell command to do it... we'll see how that goes :)
    – Kevin
    Aug 27, 2015 at 18:38


You must log in to answer this question.

Browse other questions tagged .