android c++ command-line shell

C++ Command Line Apps on Android?

Is it possible to make a command line app for linux, and then run it on android with shell? Since android runs on linux, I don’t see why there would be any problems running it. I know that /system/bin/* has all the things you can use from adb so this should be the same.