In addition to what Alex-p wrote, you can also set the
ENV environment variable to override the path of the
mkshrc file used.
All login shells also read
$HOME/.profile (these are a good place to
export ENV). Apparently (for some reason that defies my ability to explain),
adb shell does not start a login shell¹, though, so
/system/etc/mkshrc is the file you will have to change for that.
(Disclaimer: I’m the
① I’d expect “adb shell” to behave like ssh and start login shells if there is no explicit command given, as it does start a (new) session every time it’s run. Subshells will be interactive but not login shells, of course. But this is not the place to discuss that… if I care I’ll take it up at AOSP via Gerrit.