In order to use the command su in Linux you need to have the root
password, which unless you rooted your AVD you won't be able to do.
You can however create the directory from inside your application if
you give it the permission:
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-
permission>
which should be placed within the <manifest></manifest> scope on your
manifest.xml.
Then, something like this in your code will create the directory:
File myDir=new File("/sdcard/scope_pics");
myDir.mkdirs();
Where scope_pics should be replaced by whatever directory structure
you would like it to have. There also might be a default root
password for AVDs.... Since they are development tools and not
consumer hardware, I don't know what interest there would be in
restricting developers from root access to the platform.
On Mar 11, 10:04 am, Sachin Sharma <[email protected]> wrote:
> Hello,
>
> I am using a android emulator. I created a sdcard on it by using a
> option in eclipse. Once I start the emulator, I go to 'terminal
> emulator', give command 'cd sdcard'. Since I need to create my own
> folder in sdcard, I give command mkdir myfolder, it gives the error:
> mkdir failed for myfolder, Permission Denied
>
> Somewhere I read in the forum that 'su' command should be given. On
> giving the command su, the error displayed is: uid 10016 not allowed
> to su.
>
> Any Help?
>
> Thanks!!
--
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
To unsubscribe from this group, send email to
android-beginners+unsubscribegooglegroups.com or reply to this email with the
words "REMOVE ME" as the subject.