Re: [android-developers] Re: Enable usb debugging (under settings/applications/development) programatically from within app
If that's the case, nothing's preventing those other people from doing unspeakably terrible things to the device. Like uninstalling your application altogether. Nothing - short of building your own firmware, that is. -- Kostya 13.08.2010 18:41, Mathias Lin пишет: This non-technical client will hand/rent out the device to other people for daily usage. I don't want those people to be mess around with adb in any way. -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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: Enable usb debugging (under settings/applications/development) programatically from within app
Thanks for the info. It's clear now. "enable adb by hand": I don't want to deliver the device with adb enabled, because I don't want the end-user to be able to do anything with adb. Scenario is that my client (very non-technical) does the data sync between PC application and Android device (using adb in the background), so all he needs to do is plug in the device and sync from within the Android application. In fact, he cannot even leave the application. So everything should be handled from the application, incl. enabling adb end disabling adb when the data sync is completed. This non-technical client will hand/rent out the device to other people for daily usage. I don't want those people to be mess around with adb in any way. On Aug 12, 7:03 pm, Kostya Vasilyev wrote: > "Ordinary" applications can't change Secure settings. > > The built-in settings application can change secure settings because it > has a special key that the firmware knows about. Unless you create your > own firmware, you can't give your application the same functionality. > > Now, any reason why you couldn't enable adb "by hand", before handing > over the device with the application to the customer? > > - Kostya > > 12.08.2010 5:37, Mathias Lin : > > > > > Thanks for the info. But as I understand it, the settings are read > > only: > > > "Secure system settings, containing system preferences that > > applications can read but are not allowed to write. These are for > > preferences that the user must explicitly modify through the system UI > > or specialized APIs for those values, not modified directly by > > applications." > > > .. or could you please tell me about the special key - couldn't find > > any information about where to get or register such key. With > > 'platform knows about' you mean the key needs to be registered with > > the device first outside the app? > > (Since I'm in full control of the devices and bundle the app together > > with a device for distribution, that would be doable). > > > On Aug 12, 4:49 am, Kostya Vasilyev wrote: > >> ... but that is a Secure setting and, as such, can only be manipulated by > >> applications signed with a special key (that the platform knows about). > > >> -- > >> Kostya Vasilyev --http://kmansoft.wordpress.com > > >> 12.08.2010 0:26 "QR" : > > >> usb debugging is another name for the Android Debug Bridge (ADB). The > >> item you're looking for is > >> here:http://developer.android.com/reference/android/provider/Settings.Secu... > > >> On Aug 11, 5:39 am, Mathias Lin wrote:> Is it > >> possible to enable usb debuggi... > >>> I was looking at Permission.WRITE_SETTINGS andhttp:// > >> developer.android.com/reference/android/provider/Settings.Syst... > > >>> but couldn't find any appropriate setting there. > >> -- > >> You received this message because you are su... > > -- > Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com -- 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: Enable usb debugging (under settings/applications/development) programatically from within app
"Ordinary" applications can't change Secure settings. The built-in settings application can change secure settings because it has a special key that the firmware knows about. Unless you create your own firmware, you can't give your application the same functionality. Now, any reason why you couldn't enable adb "by hand", before handing over the device with the application to the customer? - Kostya 12.08.2010 5:37, Mathias Lin пишет: Thanks for the info. But as I understand it, the settings are read only: "Secure system settings, containing system preferences that applications can read but are not allowed to write. These are for preferences that the user must explicitly modify through the system UI or specialized APIs for those values, not modified directly by applications." .. or could you please tell me about the special key - couldn't find any information about where to get or register such key. With 'platform knows about' you mean the key needs to be registered with the device first outside the app? (Since I'm in full control of the devices and bundle the app together with a device for distribution, that would be doable). On Aug 12, 4:49 am, Kostya Vasilyev wrote: ... but that is a Secure setting and, as such, can only be manipulated by applications signed with a special key (that the platform knows about). -- Kostya Vasilyev --http://kmansoft.wordpress.com 12.08.2010 0:26 пользователь "QR" написал: usb debugging is another name for the Android Debug Bridge (ADB). The item you're looking for is here:http://developer.android.com/reference/android/provider/Settings.Secu... On Aug 11, 5:39 am, Mathias Lin wrote:> Is it possible to enable usb debuggi... I was looking at Permission.WRITE_SETTINGS andhttp:// developer.android.com/reference/android/provider/Settings.Syst... but couldn't find any appropriate setting there. -- You received this message because you are su... -- Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com -- 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: Enable usb debugging (under settings/applications/development) programatically from within app
Hi Mathias, The Settings-App uses a persistent system property to enable/disable adb. The property_service inside the system controls which "process-id" is allowed to set the different properties. Any Property starting with "persistent.service.*" can only be set by AID_SYSTEM. So you app must be a system app to be able to set this kind of properties and for this you have to sign it with the platform key of the particular device. Good luck ! Frank On 12 Aug., 03:37, Mathias Lin wrote: > Thanks for the info. But as I understand it, the settings are read > only: > > "Secure system settings, containing system preferences that > applications can read but are not allowed to write. These are for > preferences that the user must explicitly modify through the system UI > or specialized APIs for those values, not modified directly by > applications." > > .. or could you please tell me about the special key - couldn't find > any information about where to get or register such key. With > 'platform knows about' you mean the key needs to be registered with > the device first outside the app? > (Since I'm in full control of the devices and bundle the app together > with a device for distribution, that would be doable). > > On Aug 12, 4:49 am, Kostya Vasilyev wrote: > > > > > ... but that is a Secure setting and, as such, can only be manipulated by > > applications signed with a special key (that the platform knows about). > > > -- > > Kostya Vasilyev --http://kmansoft.wordpress.com > > > 12.08.2010 0:26 пользователь "QR" написал: > > > usb debugging is another name for the Android Debug Bridge (ADB). The > > item you're looking for is > > here:http://developer.android.com/reference/android/provider/Settings.Secu... > > > On Aug 11, 5:39 am, Mathias Lin wrote:> Is it > > possible to enable usb debuggi... > > > I was looking at Permission.WRITE_SETTINGS andhttp:// > > > developer.android.com/reference/android/provider/Settings.Syst... > > > > but couldn't find any appropriate setting there. > > > -- > > You received this message because you are su...- Zitierten Text ausblenden - > > - Zitierten Text anzeigen - -- 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: Enable usb debugging (under settings/applications/development) programatically from within app
Thanks for the info. But as I understand it, the settings are read only: "Secure system settings, containing system preferences that applications can read but are not allowed to write. These are for preferences that the user must explicitly modify through the system UI or specialized APIs for those values, not modified directly by applications." .. or could you please tell me about the special key - couldn't find any information about where to get or register such key. With 'platform knows about' you mean the key needs to be registered with the device first outside the app? (Since I'm in full control of the devices and bundle the app together with a device for distribution, that would be doable). On Aug 12, 4:49 am, Kostya Vasilyev wrote: > ... but that is a Secure setting and, as such, can only be manipulated by > applications signed with a special key (that the platform knows about). > > -- > Kostya Vasilyev --http://kmansoft.wordpress.com > > 12.08.2010 0:26 пользователь "QR" написал: > > usb debugging is another name for the Android Debug Bridge (ADB). The > item you're looking for is > here:http://developer.android.com/reference/android/provider/Settings.Secu... > > On Aug 11, 5:39 am, Mathias Lin wrote:> Is it possible > to enable usb debuggi... > > I was looking at Permission.WRITE_SETTINGS andhttp:// > > developer.android.com/reference/android/provider/Settings.Syst... > > > but couldn't find any appropriate setting there. > > -- > You received this message because you are su... -- 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: Enable usb debugging (under settings/applications/development) programatically from within app
... but that is a Secure setting and, as such, can only be manipulated by applications signed with a special key (that the platform knows about). -- Kostya Vasilyev -- http://kmansoft.wordpress.com 12.08.2010 0:26 пользователь "QR" написал: usb debugging is another name for the Android Debug Bridge (ADB). The item you're looking for is here: http://developer.android.com/reference/android/provider/Settings.Secure.html#ADB_ENABLED On Aug 11, 5:39 am, Mathias Lin wrote: > Is it possible to enable usb debuggi... > I was looking at Permission.WRITE_SETTINGS andhttp:// developer.android.com/reference/android/provider/Settings.Syst... > but couldn't find any appropriate setting there. -- You received this message because you are su... -- 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: Enable usb debugging (under settings/applications/development) programatically from within app
usb debugging is another name for the Android Debug Bridge (ADB). The item you're looking for is here: http://developer.android.com/reference/android/provider/Settings.Secure.html#ADB_ENABLED On Aug 11, 5:39 am, Mathias Lin wrote: > Is it possible to enable usb debugging (under > settings/applications/development) programatically from within my app? > > I was looking at Permission.WRITE_SETTINGS > andhttp://developer.android.com/reference/android/provider/Settings.Syst... > but couldn't find any appropriate setting there. -- 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