I want to program and debug in my android phone. To do that I downloaded c4droid and it's gcc plugin. after a lot of tries I understood that gcc is in directory /data/data/com.n0n3m4.droidc/files/gcc/bin/arm-linux-androideabi-gcc, and gdb in /data/data/com.n0n3m4.droidc/files/gcc/debugger/gdb (the paths contain the file names).

Because those gcc and gdb isn't regular ones, I can't just type gcc or gdb to execute it. But I want to use those commands..

I tried to solve this problem in several ways:

  1. I tried to add the paths to the $PATH variable using set and export, but it doesn't give me to do so (but without warnings).

  2. I tried to add links to the paths in the $PATH. but it doesn't give me to do so.

  3. I tried to use alias to make new commands. It works, but only for the same user in the same terminal, and after exiting, the alias canceled.

  4. I tried to make script with the 2 aliases to make them easier to run. but even the script runs currently, the aliases didn't applied.

So... How do I make aliases? or what can I do insted? Do you know why one or more of my tries didn't work for me?


Try using C4droid-Shell, and use $CC instead of gcc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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