How do I get permission to create this file in an android shell? 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' &gt; /data/local.prop
/system/bin/sh: cannot create /data/local.prop: Permission denied
1|shell@android:/ $ sudo echo 'ro.kernel.qemu=1' &gt; /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.
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.