0

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?

muru
  • 72,889
Yagel
  • 1
  • Aliases are disabled for noninteractive shells. See http://unix.stackexchange.com/questions/1496/why-doesnt-my-bash-script-recognize-aliases – muru Jan 18 '15 at 18:18
  • @muru this answer me only no. 4 – Yagel Jan 18 '15 at 18:20
  • I don't understand what you mean by 1 or 2, and regarding 3, I suppose you didn't save it in your .bashrc: http://unix.stackexchange.com/q/155718/70524 – muru Jan 18 '15 at 18:42

1 Answers1

0

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

Michael Mrozek
  • 93,103
  • 40
  • 240
  • 233