What are the main things you can do in a real shell versus termux for instance?

It's a pretty big sandbox in my experience.

If something bothers me with my phone's UI or if I want to change the behavior of some system service, I can do e.g. "apt source phosh", patch it and then "apt build-dep .", "dpkg-buildpackage -b" and "apt install" it right on the phone. I can even send the patch for upstreaming from there.

How easy it is to do an equivalent thing on Android?

[deleted]