I have modified a kernel's ramdisk to include a "settings" terminal run bash script.
However, when I type in terminal
su
dp
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?
/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)./sbin
in your$PATH
? For me it is. Apart from which: I'm not sure if your call tosymlink()
is correct (not familiar with that one from flashing). For the CLI tool, syntax would beln -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.