I want to compile (through make) on my Android phone. I have root access.
I have almost all the things set up. But there's this hitch. All the configure files have a shebang of #!/bin/sh. I can execute them by $SHELL configure I've also set $CONFIG_SHELL But some configure files execute other shell scripts and they give the /bin/sh: no such file or directory.
I'm thinking about creating a symlink /bin/sh -> /system/bin/sh I've read somewhere that the root file system is the ramdisk and any changes to it will require to be done in the init.rc file. So, if I want to accomplish this I'd need to first create a directory 'bin' then make a symlink 'sh' in it. I doubt that ln will work in init.rc.
I have this another idea. Make a directory 'bin' somewhere preferably in Terminal IDE's (I'm using that) data directory. Then create a symlink in there sh -> /system/bin/sh. Then create 'bin' in / through and use mount the first bin to /bin through init.rc
Thirdly, I can just mkdir bin and cp /system/bin/sh /bin/sh
Also, all of these methods will fail and result in boot failure if any of the source directories cannot be found.
I want to know which method will be more safe and if there exists a safer alternative?