I was trying to install apk files from
adb. I used the command
adb install <app-name>.apk command. But it returned
/sbin/sh: pm: not found
But if I login to the shell with
adb shell and do
which pm, it returns
But still I can't install apk using
pm. If I do
pm install /sdcard/app-name.apk It returns same
/sbin/sh: pm: not found error.
whoami returns strange things.
whoami: unknown uid 0
But If I become
root and install using
pm it works just fine! What could be the problem and How do I solve it?
I'm using a custom ROM (WolfRom v2) on Xperia Sola Phone (2012).
ls -l /system/bin/pm. With
root and non-root both returns this result.
# ls -l /system/bin/pm -rwxr-xr-x root root 191 2008-08-01 18:00 pm
adb shell "/system/bin/pm install /sdcard/app-name.apk" returns same error
/sbin/sh: /system/bin/pm: not found
I also checked the
ls -la /system/bin/sh returns this
lrwxrwxrwx root root 2016-12-06 12:00 sh -> mksh
Which looks a little unusual. Also
ls -la /system/bin/mksh returns this
-rwxr-xr-x root shell 153344 2008-08-01 18:00 mksh
I've also seen that running
mksh instead of
sh directly gives a root shell.