I'm trying to root a Kindle and I'm stuck. Getting permission denied and don't know how or what permissions to change.

mike@Inspiron:~/Downloads/android-sdk-linux/platform-tools$ adb shell
shell@android:/ $ echo 'ro.kernel.qemu=1' > /data/local.prop
/system/bin/sh: cannot create /data/local.prop: Permission denied
1|shell@android:/ $ sudo echo 'ro.kernel.qemu=1' > /data/local.prop            
/system/bin/sh: cannot create /data/local.prop: Permission denied
1|shell@android:/ $ sudo
/system/bin/sh: sudo: not found
127|shell@android:/ $

I'm using Ubuntu 12.04 if it makes a difference.

  • I've achieved root without w/o acquiring these permissions. Thanks for any help. – hortstu Feb 6 '13 at 19:32

Short answer: You will have to root your device for that.

Explanation: The shell user has no write permission there. The /data directory is not owned by shell, nor does their group match: on my Motorola Milestone 2, e.g., it is owned by system:system and has the permissions drwxrwxr-x, while shell belongs to the shell group only. Only on a rooted device you could either change the permissions, or be privileged enough to override them.

PS: On Android, the sudo command is simply called su -- which explains your last error (/system/bin/sh: sudo: not found) in case your device is already rooted.

  • @hortstu if you found it helpful, don't hesitate to upvote (click the "up" arrow next to it) or, if it mysteriously solved your problem, even accept it (the "checkmark" button). But whatever you decide: I'm glad I could help :) – Izzy Feb 6 '13 at 21:14
  • I'd love to but still don't have enough reputation. – hortstu Feb 8 '13 at 4:07
  • Ooops... I've thought at least on answers to ones own question... Well, in this case sorry for the "teacher-stuff". Now you have the rep :) – Izzy Feb 8 '13 at 7:41

Try this:

adb shell "cd /data/local && mkdir tmp"
adb shell mv /data/local/tmp /data/local/tmp.bak
adb shell ln -s /data /data/local/tmp
adb reboot

adb wait-for-device
adb shell rm /data/local.prop
adb shell "echo \"ro.kernel.qemu=1\" > /data/local.prop"
adb reboot

By creating a link to from /data to /data/local/tmp, Android will believe you are writing to /data/local/tmp even though you're actually writing to /data. This method is actually used to successfully root many devices, though some have it specifically in the build.prop that /data/tmp is off limits.

This method might not work with a Kindle Fire, though I haven't tried. I have rooted a Kindle Fire, but it involved a different method entirely. First, TWRP recovery had to be flashed. Then, a fake recovery image exploit. Then, you could gain access to copy over your su and busybox binaries.

You can try the local.prop method as I described above though. It is compatible with many devices.

  • Thanks for your help. I managed to achieve root. For reasons I don't understand I was able to skip a few steps in the tutorial and it worked perfectly. – hortstu Feb 6 '13 at 19:30

You did not follow the rooting instruction properly.


The instruction above would have you create symbolic links to the /data/ directory from /data/local/tmp/ which would make the /data/local.prop writable after a reboot.

Make sure you follow the instructions precisely, including the reboots and all, and make sure you check each step that they do not produce unexpected error message.

  • I did follow the rooting instuction properly I was just using a different root technique than the one you've linked to. Thanks for your help but I ended up being able to skip a few steps for reasons I don't understand and I have rooted the kindle. – hortstu Feb 6 '13 at 19:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.