adb shell su: permission denied I was trying to unlock my android phone by adb installed. I tried to followed these steps:

adb devices adb shell cd data/system su rm *.key


But when I typed and enter su, it's showing permission denied. My phone is also rooted, but I don't know why after entering su it's showing permission denied.

Can you please tell what extra steps I have to do so that I don't get permission denied?
Most superuser apps don't allow adb su access by default. Depending on the app you used the option may vary in location, but basically you need to go to settings in the superuser app and change it from "apps only" to "apps and adb." This should allow you to use su in an adb shell.