adb shell run-as /data/data/com.mypackagename
returns
adb command not found
though I see adb in the dir
If you are in that directory, you can run it with a leading dot-slash, i.e. ./adb shell run-as /data/data/com.mypackagename.
./adb shell run-as /data/data/com.mypackagename
In general, you might want to add that directory to your PATH environment variable.
PATH