[android-developers] Re: Protecting files on non-rooted phones
Thanks for the tip. For the record, it works on 2.2. There have been a number of times that I have wanted to be able to see the files for my app, and I am glad to find that there is a way. Thanks again. On Jan 7, 6:55 pm, Dianne Hackborn wrote: > Unfortunately I don't recall exactly when it went in. Maybe 2.3? It is the > "run-as" command. > > > > On Fri, Jan 7, 2011 at 5:42 PM, John Gaby wrote: > > I must be setting the files as world readable then. > > > I didn't know that if the app was debuggable that you could change the > > shell to run as an app uid. Can you tell me what version of Android > > that works for, and how I do that? > > > Thanks. > > > On Jan 7, 4:25 pm, Dianne Hackborn wrote: > > > On a user build, adb can not access any application files, with these > > > exceptions: > > > > - If the app has declared itself debuggable, recent versions of android > > will > > > allow the shell user to change to run as that app uid and thus access its > > > files. > > > - If you create files that are explicitly marked as world readable or > > > writeable, then the shell will be able to read/write those files as > > > indicated. > > > > On Fri, Jan 7, 2011 at 3:41 PM, John Gaby wrote: > > > > I find that, when using a actual device that is not rooted, that I > > > > cannot see the contents folders created by my application. However, > > > > if I know the exact name and path of a file, I CAN pull or push it > > > > using ADB. Is there a way to prevent external access to application > > > > files (on a non-rooted phone, of course). > > > > > Thanks > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups "Android Developers" group. > > > > To post to this group, send email to > > android-developers@googlegroups.com > > > > To unsubscribe from this group, send email to > > > > android-developers+unsubscr...@googlegroups.com > > > > > > > For more options, visit this group at > > > >http://groups.google.com/group/android-developers?hl=en > > > > -- > > > Dianne Hackborn > > > Android framework engineer > > > hack...@android.com > > > > Note: please don't send private questions to me, as I don't have time to > > > provide private support, and so won't reply to such e-mails. All such > > > questions should be posted on public forums, where I and others can see > > and > > > answer them. > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Protecting files on non-rooted phones
Unfortunately I don't recall exactly when it went in. Maybe 2.3? It is the "run-as" command. On Fri, Jan 7, 2011 at 5:42 PM, John Gaby wrote: > I must be setting the files as world readable then. > > I didn't know that if the app was debuggable that you could change the > shell to run as an app uid. Can you tell me what version of Android > that works for, and how I do that? > > Thanks. > > On Jan 7, 4:25 pm, Dianne Hackborn wrote: > > On a user build, adb can not access any application files, with these > > exceptions: > > > > - If the app has declared itself debuggable, recent versions of android > will > > allow the shell user to change to run as that app uid and thus access its > > files. > > - If you create files that are explicitly marked as world readable or > > writeable, then the shell will be able to read/write those files as > > indicated. > > > > > > > > On Fri, Jan 7, 2011 at 3:41 PM, John Gaby wrote: > > > I find that, when using a actual device that is not rooted, that I > > > cannot see the contents folders created by my application. However, > > > if I know the exact name and path of a file, I CAN pull or push it > > > using ADB. Is there a way to prevent external access to application > > > files (on a non-rooted phone, of course). > > > > > Thanks > > > > > -- > > > You received this message because you are subscribed to the Google > > > Groups "Android Developers" group. > > > To post to this group, send email to > android-developers@googlegroups.com > > > To unsubscribe from this group, send email to > > > android-developers+unsubscr...@googlegroups.com > > > > > > For more options, visit this group at > > >http://groups.google.com/group/android-developers?hl=en > > > > -- > > Dianne Hackborn > > Android framework engineer > > hack...@android.com > > > > Note: please don't send private questions to me, as I don't have time to > > provide private support, and so won't reply to such e-mails. All such > > questions should be posted on public forums, where I and others can see > and > > answer them. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Protecting files on non-rooted phones
I must be setting the files as world readable then. I didn't know that if the app was debuggable that you could change the shell to run as an app uid. Can you tell me what version of Android that works for, and how I do that? Thanks. On Jan 7, 4:25 pm, Dianne Hackborn wrote: > On a user build, adb can not access any application files, with these > exceptions: > > - If the app has declared itself debuggable, recent versions of android will > allow the shell user to change to run as that app uid and thus access its > files. > - If you create files that are explicitly marked as world readable or > writeable, then the shell will be able to read/write those files as > indicated. > > > > On Fri, Jan 7, 2011 at 3:41 PM, John Gaby wrote: > > I find that, when using a actual device that is not rooted, that I > > cannot see the contents folders created by my application. However, > > if I know the exact name and path of a file, I CAN pull or push it > > using ADB. Is there a way to prevent external access to application > > files (on a non-rooted phone, of course). > > > Thanks > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Dianne Hackborn > Android framework engineer > hack...@android.com > > Note: please don't send private questions to me, as I don't have time to > provide private support, and so won't reply to such e-mails. All such > questions should be posted on public forums, where I and others can see and > answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en