Re: [android-developers] Re: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-10-21 Thread FiltrSoft

On Thursday, July 12, 2012 1:15:33 PM UTC-4, Dianne Hackborn wrote:

> If you want the user to give you debugging information, you can have them 
> generate a bug report with power + volume down + volume up which includes 
> the logs and lots of other data, and automatically brings up their e-mail 
> app to sent it all (plus a screenshot).  
>

Unfortunately, this only works with devices that have actual volume 
buttons, which the Kindle Fire doesn't have.  Hoping an easier way to 
generate an bug report gets implemented soon.  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

Re: [android-developers] Re: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-29 Thread Kristopher Micinski
>>  -- there's no refined access to the logs, you either get everything
> or nothing.
> isn't true - you can use a lot of switches and filters to get only what
> you're interested in (e.g. "-I" for only the "Information"-level logs.)
>
> If you mean this from a permissions-point of view, it could be implemented
> with e.g. "READ_SYSTEM_LOGS", etc. for a more fine-grained access model.
>

Yes, I meant from the permissions point of view (since the post mainly
concerned security).

This is the same as any other API, you can make most permissions finer
grained, but not always sensibly, as mapping APIs to permissions isn't
trivial already, but it's even more hazy how to segment the system
logs permission.

kris

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-29 Thread Nikolaus Fischer
While I agree that it's not a resource-friendly or "good" solution, it's
the only one - as long as no better solution (for the various things that
can be done with logs) is implemented on an SDK-level.

Also,
>  -- there's no refined access to the logs, you either get everything
or nothing.
isn't true - you can use a lot of switches and filters to get only what
you're interested in (e.g. "-I" for only the "Information"-level logs.)

If you mean this from a permissions-point of view, it could be implemented
with e.g. "READ_SYSTEM_LOGS", etc. for a more fine-grained access model.
On Jul 29, 2012 7:02 PM, "Kristopher Micinski" 
wrote:

> On Sun, Jul 29, 2012 at 1:35 AM, Chris Stratton  wrote:
> > On Jul 29, 12:18 am, Alex Pruss  wrote:
> >
> >> These kinds of things can provide a lot of value to users, and disabling
> >> log access forces users to have to root their devices to do these
> things.
> >
> > That's not the real problem though.  Reading the logs was never the
> > right way to customize the behavior of the device to the current
> > running activity - it was at most a crude workaround.
> >
> > The real "problem" is that android is designed with the idea that apps
> > should not alter the system's behavior on each other, and has
> > extremely limited mechanisms for recognizing "special" apps that would
> > be permitted to do so.
> >
> > While a real solution for that is long overdue, it's also a much more
> > complicated design conversation than the topic at hand.
> >
>
> I would agree with Chris' assessment on this.  Moreover, forgoing a
> more involved and specialized solution for secure system extensions,
> having the logs as a workaround is a dangerous and hacky solution.
> Why?
>   -- the log structure could change, breaking apps.
>   -- forcing developers to parse logs in this way is a horrible and
> taxing design strategy.
>   -- there's no refined access to the logs, you either get everything
> or nothing.
>   -- it's fairly well  recognized that you can do a whole lot of
> inference about the device and its users with log access..
>   -- not to mention dumb apps that dump things like passwords and the
> like.. (it's also been shown that most apps use http rather than
> https..)
>   -- polling the logs like this really sucks for battery life, and
> encourages the everlasting service antipattern.
>
> kris
>
> --
> 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
>

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-29 Thread Kristopher Micinski
On Sun, Jul 29, 2012 at 1:35 AM, Chris Stratton  wrote:
> On Jul 29, 12:18 am, Alex Pruss  wrote:
>
>> These kinds of things can provide a lot of value to users, and disabling
>> log access forces users to have to root their devices to do these things.
>
> That's not the real problem though.  Reading the logs was never the
> right way to customize the behavior of the device to the current
> running activity - it was at most a crude workaround.
>
> The real "problem" is that android is designed with the idea that apps
> should not alter the system's behavior on each other, and has
> extremely limited mechanisms for recognizing "special" apps that would
> be permitted to do so.
>
> While a real solution for that is long overdue, it's also a much more
> complicated design conversation than the topic at hand.
>

I would agree with Chris' assessment on this.  Moreover, forgoing a
more involved and specialized solution for secure system extensions,
having the logs as a workaround is a dangerous and hacky solution.
Why?
  -- the log structure could change, breaking apps.
  -- forcing developers to parse logs in this way is a horrible and
taxing design strategy.
  -- there's no refined access to the logs, you either get everything
or nothing.
  -- it's fairly well  recognized that you can do a whole lot of
inference about the device and its users with log access..
  -- not to mention dumb apps that dump things like passwords and the
like.. (it's also been shown that most apps use http rather than
https..)
  -- polling the logs like this really sucks for battery life, and
encourages the everlasting service antipattern.

kris

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-21 Thread Ievgenii Nazaruk
Hm, I've had an impression that permissions are granted or denied on each 
fresh start of application. But after doing some experiments and looking 
through logs, it seems that they are only granted or denied during 
installation. Which explains the behavior of inherently granted READ_LOGS 
permission. 

On Friday, July 20, 2012 9:29:26 PM UTC+3, Ran wrote:
>
> you're right.
>
> - Ran
>
>
> On Fri, Jul 20, 2012 at 5:49 PM, vt  wrote:
>
>> On Friday, July 20, 2012 2:50:19 AM UTC-7, Ran wrote:
>>>
>>> I just got the OTA for JellyBean on my Nexus S.
>>> READ_LOGS apps seem to work as before.. I can see all the logs in 
>>> alogcat.
>>>
>>> is this a bug?
>>>
>>
>> It looks like previously installed applications have inherited 
>> permissions that were given at installation time.
>>
>> --vt
>>
>> -- 
>> 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
>>
>
>  

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-20 Thread Ran Manor
you're right.

- Ran


On Fri, Jul 20, 2012 at 5:49 PM, vt  wrote:

> On Friday, July 20, 2012 2:50:19 AM UTC-7, Ran wrote:
>>
>> I just got the OTA for JellyBean on my Nexus S.
>> READ_LOGS apps seem to work as before.. I can see all the logs in alogcat
>> .
>>
>> is this a bug?
>>
>
> It looks like previously installed applications have inherited permissions
> that were given at installation time.
>
> --vt
>
> --
> 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
>

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-19 Thread matteo sisti sette


El dijous 19 de juliol de 2012 14:02:06 UTC+2, Mark Murphy (a Commons Guy) 
va escriure:
>
>
> POWER + VOLUME-UP + VOLUME-DOWN, simultaneously pressed, should slowly 
> generate a report that you can mail to wherever you want. 
>
>
Great! I thought you were making fun of me and that would reboot or 
something (lol) but that works :) 

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-19 Thread Kostya Vasilyev
In one of the prior messages on this thread, Dianne Hackborn mentioned her
plans to implement a UI screen in Settings to enable READ_LOGS (for apps
that have it in their manifest).

One could hope that this screen, whenever it appears, will have a
documented launch action - so that apps like CatLog, aLogCat, etc can
prompt the user and bring this screen up.

This scheme already works for third party keyboards - out of the ones I
use, both Swype and Swift Key 3 (highly recommended) have a setup wizard
that

1) explains that the just installed keyboard needs to be enabled
2) brings up the system settings screen where this can be done

Very simple and it works.

-- K

2012/7/19 vt 

> On Thursday, July 19, 2012 7:54:35 AM UTC-7, Kristopher Micinski wrote:
>
>> On Thu, Jul 19, 2012 at 10:44 AM, vt wrote:
>>
>
>
>> > If a leaf falls to the ground in a forest and no one hears it, does it
>> make
>> > a sound?
>> >
>> > In other words, if your ADK app controls, say, an expensive aquarium
>> with
>> > fish and corals in it (which can easily run into five figures), and you
>> get
>> > back home after a week's vacation to find that a few days ago your app
>> ran
>> > amok and boiled everything and your fish is dead, how is my cool ADK
>> > contraption better than a terminally dim PIC hack?
>> >
>> > - How do I make the bug report span across an arbitrary length of time?
>> > - How do I trigger a bug report generation, say, on a regular basis, or
>> from
>> > inside an application?
>> >
>>
>> This is basically why things like ACRA were invented...,
>>
>> There's nothing stopping you from dumping your app's logs to a file
>> and then syncing that with your backend periodically..
>>
>
> App log is not enough. Earlier in this thread I mentioned that often, and
> in cases where hardware is involved, almost always, system logs contain
> information directly related to what is happening to your app.
>
> As for ACRA, isn't it also going to be crippled by READ_LOGS no longer
> granted?
>
> It starts looking like a security theater to me.
>
> All right, one can do all this if one gets the custom ROM to get the logs
> over WiFi (by extension: one can build a custom ROM which disregards
> READ_LOGS completely). Hence, a malicious party will be able to read logs
> no matter what *on device in their physical possession*.
>
> So, why is it not possible for a user to do the same on the production
> build, *on device in their physical possession*?
>
> kris
>>
>
> --vt
>
> --
> 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
>

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-19 Thread Kristopher Micinski
>
> App log is not enough. Earlier in this thread I mentioned that often, and in
> cases where hardware is involved, almost always, system logs contain
> information directly related to what is happening to your app.
>
> As for ACRA, isn't it also going to be crippled by READ_LOGS no longer
> granted?
>

I don't think so?  I would highly highly highly doubt that.., someone
can confirm..

> It starts looking like a security theater to me.
>
> All right, one can do all this if one gets the custom ROM to get the logs
> over WiFi (by extension: one can build a custom ROM which disregards
> READ_LOGS completely). Hence, a malicious party will be able to read logs no
> matter what *on device in their physical possession*.
>

That's right, and that's why I always tell people that it's useless to
do things like "hide" their code from the user / other programs...,
Once you assume that your app can be run on things that aren't just
stock firmware, you have a more interesting situation..

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-19 Thread vt
On Thursday, July 19, 2012 7:54:35 AM UTC-7, Kristopher Micinski wrote:
>
> On Thu, Jul 19, 2012 at 10:44 AM, vt wrote: 
>
 

> > If a leaf falls to the ground in a forest and no one hears it, does it 
> make 
> > a sound? 
> > 
> > In other words, if your ADK app controls, say, an expensive aquarium 
> with 
> > fish and corals in it (which can easily run into five figures), and you 
> get 
> > back home after a week's vacation to find that a few days ago your app 
> ran 
> > amok and boiled everything and your fish is dead, how is my cool ADK 
> > contraption better than a terminally dim PIC hack? 
> > 
> > - How do I make the bug report span across an arbitrary length of time? 
> > - How do I trigger a bug report generation, say, on a regular basis, or 
> from 
> > inside an application? 
> > 
>
> This is basically why things like ACRA were invented..., 
>
> There's nothing stopping you from dumping your app's logs to a file 
> and then syncing that with your backend periodically.. 
>

App log is not enough. Earlier in this thread I mentioned that often, and 
in cases where hardware is involved, almost always, system logs contain 
information directly related to what is happening to your app.

As for ACRA, isn't it also going to be crippled by READ_LOGS no longer 
granted?

It starts looking like a security theater to me.

All right, one can do all this if one gets the custom ROM to get the logs 
over WiFi (by extension: one can build a custom ROM which disregards 
READ_LOGS completely). Hence, a malicious party will be able to read logs 
no matter what *on device in their physical possession*.

So, why is it not possible for a user to do the same on the production 
build, *on device in their physical possession*?

kris 
>

--vt

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-19 Thread Kristopher Micinski
On Thu, Jul 19, 2012 at 10:44 AM, vt  wrote:
> On Thursday, July 19, 2012 5:02:06 AM UTC-7, Mark Murphy (a Commons Guy)
> wrote:
>>
>> On Tue, Jul 17, 2012 at 6:05 AM, matteo sisti sette wrote:
>> > So, now a very simple question.
>> >
>> > How do I, the user, the owner of my phone and a human being, see the
>> > logs
>> > and e.g. email them to myself for inspection, without rooting the device
>> > and/or connecting it to a computer and/or running complicated
>> > command-line
>> > stuff? I mean how do I do this in Jelly Bean?
>>
>> POWER + VOLUME-UP + VOLUME-DOWN, simultaneously pressed, should slowly
>> generate a report that you can mail to wherever you want.
>
>
> If a leaf falls to the ground in a forest and no one hears it, does it make
> a sound?
>
> In other words, if your ADK app controls, say, an expensive aquarium with
> fish and corals in it (which can easily run into five figures), and you get
> back home after a week's vacation to find that a few days ago your app ran
> amok and boiled everything and your fish is dead, how is my cool ADK
> contraption better than a terminally dim PIC hack?
>
> - How do I make the bug report span across an arbitrary length of time?
> - How do I trigger a bug report generation, say, on a regular basis, or from
> inside an application?
>

This is basically why things like ACRA were invented...,

There's nothing stopping you from dumping your app's logs to a file
and then syncing that with your backend periodically..

kris

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-19 Thread vt
On Thursday, July 19, 2012 5:02:06 AM UTC-7, Mark Murphy (a Commons Guy) 
wrote:
>
> On Tue, Jul 17, 2012 at 6:05 AM, matteo sisti sette wrote: 
> > So, now a very simple question. 
> > 
> > How do I, the user, the owner of my phone and a human being, see the 
> logs 
> > and e.g. email them to myself for inspection, without rooting the device 
> > and/or connecting it to a computer and/or running complicated 
> command-line 
> > stuff? I mean how do I do this in Jelly Bean? 
>
> POWER + VOLUME-UP + VOLUME-DOWN, simultaneously pressed, should slowly 
> generate a report that you can mail to wherever you want. 
>

If a leaf falls to the ground in a forest and no one hears it, does it make 
a sound?

In other words, if your ADK app controls, say, an expensive aquarium with 
fish and corals in it (which can easily run into five figures), and you get 
back home after a week's vacation to find that a few days ago your app ran 
amok and boiled everything and your fish is dead, how is my cool ADK 
contraption better than a terminally dim PIC hack?

- How do I make the bug report span across an arbitrary length of time?
- How do I trigger a bug report generation, say, on a regular basis, or 
from inside an application?

Mark Murphy (a Commons Guy) 


--vt 

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-19 Thread Mark Murphy
On Tue, Jul 17, 2012 at 6:05 AM, matteo sisti sette
 wrote:
> So, now a very simple question.
>
> How do I, the user, the owner of my phone and a human being, see the logs
> and e.g. email them to myself for inspection, without rooting the device
> and/or connecting it to a computer and/or running complicated command-line
> stuff? I mean how do I do this in Jelly Bean?

POWER + VOLUME-UP + VOLUME-DOWN, simultaneously pressed, should slowly
generate a report that you can mail to wherever you want.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in DC: http://marakana.com/training/android/

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-19 Thread Mark Murphy
On Wed, Jul 18, 2012 at 3:17 AM, Karthik
 wrote:
> We are currently working on an ERP based Device Administration App in
> android, which need to monitor other application and decide which one to run
> and which one not to, based on server side policy.

This cannot be implemented as an SDK application. Please create your
own custom ROM for this.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in DC: http://marakana.com/training/android/

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-18 Thread Kostya Vasilyev
But... looking back at the thread's history, I don't believe anyone from
Google has said that development permissions are activated with "adb shell
pm grant".

Perhaps the command to grant specifically development permissions is
something else?

-- K

2012/7/18 Ievgenii Nazaruk 

> Thanks for trying this out. Now it looks like that there is no supported
> way to grant development permissions on production devices.
>
>
> On Wednesday, July 18, 2012 9:49:54 PM UTC+3, Kostya Vasilyev wrote:
>>
>> Just ran a quick test on my Galaxy Nexus with stock OTA 4.1.1
>>
>> 1) Added the permission to the manifest:
>>
>> 
>>
>> 2) Pushed an update from Eclipse, this appeared in the adb logcat:
>>
>> 07-18 22:43:20.265 W/PackageManager(  306): Not granting permission
>> android.permission.READ_LOGS to package org.kman.AquaMail
>> (protectionLevel=50 flags=0x8be46)
>>
>> 3) Tried to grant the permission:
>>
>> ~$adb shell
>> shell@android:/ $ pm grant org.kman.AquaMail
>> android.permission.READ_LOGS
>> Operation not allowed: java.lang.SecurityException: Neither user 2000 nor
>> current process has android.permission.GRANT_**REVOKE_PERMISSIONS.
>>
>> 4) Who is user 2000?
>>
>> shell@android:/ $ id
>> uid=2000(shell) gid=2000(shell) groups=1003(graphics),1004(**
>> input),1007(log),1009(mount),**1011(adb),1015(sdcard_rw),**
>> 1028(sdcard_r),3001(net_bt_**admin),3002(net_bt),3003(inet)**
>> ,3006(net_bw_stats)
>>
>> Aha, it's the uid used by "adb shell".
>>
>> -- K
>>
>> 2012/7/18 Ievgenii Nazaruk 
>>
>>> I guess that's because I tried it on emulator. I don't have a device
>>> with JB to verify that same procedure works for real devices.
>>>
>>>
>>> On Wednesday, July 18, 2012 7:58:10 PM UTC+3, vt wrote:

 On Friday, July 13, 2012 1:54:45 AM UTC-7, Ievgenii Nazaruk wrote:

 I've tested the "adb shell pm grant  android.permission.READ_LOGS"
> and can confirm that it enables READ_LOGS permission for my application.


 How did you dodge "Operation not allowed: java.lang.SecurityException:
 Neither user 2000 nor current process has android.permission.GRANT_**
 REVOK**E_PERMISSIONS"?

 --vt

>>>  --
>>> 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
>>>
>>
>>  --
> 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
>

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-18 Thread vt
On Wednesday, July 18, 2012 2:11:35 PM UTC-7, Mark Murphy (a Commons Guy) 
wrote:

> What about debugging an app running on an Android device 
> > with ADK accessory connected - it's not even possible to connect adb to 
> it 
> > now, is it? 
>
> Use a ROM that enables adb over WiFi, or hope they add that to 
> standard builds someday (last I checked, it only worked with Google 
> TV). 
>

See, here's the problem - I'm not a commercial developer. I just don't have 
time for this - I barely have enough time to get the Open Source project 
I'm working on where it needs to be. It's a hassle that can be easily 
avoided - something tells me that *one* application that captures log 
output, and which has to be specifically installed on a device, won't be a 
security problem, or at least will significantly alleviate it. And if 
Google wants to release it, I'm sure they have enough manpower to make it 
happen.

Or, oh horror, we can get a mechanism to selectively grant permissions 
(which has been an outstanding issue for quite a while now, with no 
resolution in sight).

Can *I* do it? I think I probably can, though it is a major hassle and loss 
of time, 'cause this is just not what I normally do.
Can a newbie do it? Well, I guess that'll be a showstopper for quite a lot 
of them.

This issue is an obstacle - as usual, there's a tradeoff between security 
and convenience. It's just it's too skewed away from convenience this time.

Mark Murphy (a Commons Guy) 
>
 
--vt 

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-18 Thread Mark Murphy
On Wed, Jul 18, 2012 at 4:22 PM, vt  wrote:
> Yes, it is possible to debug an app with USB debugging connected - but for a
> short time, Eclipse plugin doesn't offer much of a buffer.

You are welcome to capture LogCat data via adb logcat. Or, there
should be some Java code for getting LogCat over adb (what DDMS uses,
particularly for the standalone edition), though that will be
undocumented/unsupported in all likelihood.

> What about debugging an app running on an Android device
> with ADK accessory connected - it's not even possible to connect adb to it
> now, is it?

Use a ROM that enables adb over WiFi, or hope they add that to
standard builds someday (last I checked, it only worked with Google
TV).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.8 Available!

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-18 Thread vt
On Wednesday, July 18, 2012 12:01:37 PM UTC-7, Ievgenii Nazaruk wrote:

Thanks for trying this out. Now it looks like that there is no supported 
> way to grant development permissions on production devices. 

 
So, question to Android folks, then - what does it take to be able to debug 
the app on a non-rooted production device? Or, even simpler, to read/record 
logs like aLogCat and aLogRec do.

Yes, it is possible to debug an app with USB debugging connected - but for 
a short time, Eclipse plugin doesn't offer much of a buffer.

But what about debugging an app that has to run for a long, long time - 
weeks and months? What about debugging an app running on an Android device 
with ADK accessory connected - it's not even possible to connect adb to it 
now, is it?

Even if an app can write its own logs, it's not sufficient - especially in 
a case where hardware is involved, events in the system logs have direct 
relation to what is happening to the app - and they're not available.

--vt

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-18 Thread Ievgenii Nazaruk
Thanks for trying this out. Now it looks like that there is no supported 
way to grant development permissions on production devices. 

On Wednesday, July 18, 2012 9:49:54 PM UTC+3, Kostya Vasilyev wrote:
>
> Just ran a quick test on my Galaxy Nexus with stock OTA 4.1.1
>
> 1) Added the permission to the manifest:
>
> 
>
> 2) Pushed an update from Eclipse, this appeared in the adb logcat:
>
> 07-18 22:43:20.265 W/PackageManager(  306): Not granting permission 
> android.permission.READ_LOGS to package org.kman.AquaMail 
> (protectionLevel=50 flags=0x8be46)
>
> 3) Tried to grant the permission:
>
> ~$adb shell
> shell@android:/ $ pm grant org.kman.AquaMail android.permission.READ_LOGS 
>  
> Operation not allowed: java.lang.SecurityException: Neither user 2000 nor 
> current process has android.permission.GRANT_REVOKE_PERMISSIONS.
>
> 4) Who is user 2000?
>
> shell@android:/ $ id
> uid=2000(shell) gid=2000(shell) 
> groups=1003(graphics),1004(input),1007(log),1009(mount),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats)
>
> Aha, it's the uid used by "adb shell".
>
> -- K
>
> 2012/7/18 Ievgenii Nazaruk 
>
>> I guess that's because I tried it on emulator. I don't have a device with 
>> JB to verify that same procedure works for real devices. 
>>
>>
>> On Wednesday, July 18, 2012 7:58:10 PM UTC+3, vt wrote:
>>>
>>> On Friday, July 13, 2012 1:54:45 AM UTC-7, Ievgenii Nazaruk wrote:
>>>
>>> I've tested the "adb shell pm grant  android.permission.READ_LOGS" 
 and can confirm that it enables READ_LOGS permission for my application. 
>>>
>>>
>>> How did you dodge "Operation not allowed: java.lang.SecurityException: 
>>> Neither user 2000 nor current process has android.permission.GRANT_**
>>> REVOKE_PERMISSIONS"?
>>>
>>> --vt
>>>
>>  -- 
>> 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
>>
>
>

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-18 Thread Kostya Vasilyev
Just ran a quick test on my Galaxy Nexus with stock OTA 4.1.1

1) Added the permission to the manifest:



2) Pushed an update from Eclipse, this appeared in the adb logcat:

07-18 22:43:20.265 W/PackageManager(  306): Not granting permission
android.permission.READ_LOGS to package org.kman.AquaMail
(protectionLevel=50 flags=0x8be46)

3) Tried to grant the permission:

~$adb shell
shell@android:/ $ pm grant org.kman.AquaMail android.permission.READ_LOGS

Operation not allowed: java.lang.SecurityException: Neither user 2000 nor
current process has android.permission.GRANT_REVOKE_PERMISSIONS.

4) Who is user 2000?

shell@android:/ $ id
uid=2000(shell) gid=2000(shell)
groups=1003(graphics),1004(input),1007(log),1009(mount),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats)

Aha, it's the uid used by "adb shell".

-- K

2012/7/18 Ievgenii Nazaruk 

> I guess that's because I tried it on emulator. I don't have a device with
> JB to verify that same procedure works for real devices.
>
>
> On Wednesday, July 18, 2012 7:58:10 PM UTC+3, vt wrote:
>>
>> On Friday, July 13, 2012 1:54:45 AM UTC-7, Ievgenii Nazaruk wrote:
>>
>> I've tested the "adb shell pm grant  android.permission.READ_LOGS"
>>> and can confirm that it enables READ_LOGS permission for my application.
>>
>>
>> How did you dodge "Operation not allowed: java.lang.SecurityException:
>> Neither user 2000 nor current process has android.permission.GRANT_**
>> REVOKE_PERMISSIONS"?
>>
>> --vt
>>
>  --
> 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
>

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-15 Thread Ran Manor
me too. Isn't that the old behavior?

- Ran


On Sun, Jul 15, 2012 at 1:33 PM, b0b  wrote:

>
>
> On Sunday, 15 July 2012 11:08:13 UTC+2, Ran wrote:
>>
>> I was definitely running the JB emulator.
>>
>> So if you install aLogcat on the emulator, you can see only your own app
>> logs? and nothing else?
>>
>>
> using aLogcat in the JB emulator I could see all system logs.
>
> --
> 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
>

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-15 Thread b0b


On Sunday, 15 July 2012 11:08:13 UTC+2, Ran wrote:
>
> I was definitely running the JB emulator.
>
> So if you install aLogcat on the emulator, you can see only your own app 
> logs? and nothing else?
>
>
using aLogcat in the JB emulator I could see all system logs. 

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-15 Thread Ran Manor
I was definitely running the JB emulator.

So if you install aLogcat on the emulator, you can see only your own app
logs? and nothing else?

- Ran


On Sun, Jul 15, 2012 at 12:02 PM, Ievgenii Nazaruk <
ievgenii.naza...@gmail.com> wrote:

> On my instance of JB emulator it runs with new behavior.
>
> Make sure you've started correct emulator, as I noticed several times that
> ADT/SDK 20.0 could start something else (non-selected item) from the list.
>
>
>
> On Sunday, July 15, 2012 9:54:18 AM UTC+3, Ran wrote:
>>
>> It seems that on the JB emulator everything works as before.
>> Is that by design?
>>
>> Thanks.
>>
>>
>> On Thursday, July 12, 2012 9:29:20 PM UTC+3, nnk wrote:
>>>
>>>
>>> There's no documented, approved way to read the log entries.
>>>
>>> Having said that, if you just exec() logcat, as you did before, you'll
>>> automatically get your own log entries. You don't need to do anything
>>> special. The log system knows which log entries belong to you, and
>>> which log entries belong to others, and will only give you your log
>>> entries.
>>>
>>> -- Nick
>>>
>>> On Jul 12, 10:24 am, Mark Murphy  wrote:
>>> > On Thu, Jul 12, 2012 at 12:59 PM, Dianne Hackborn 
>>> wrote:
>>> > > however every app can read the logs containing only the lines
>>> > > *they* have written, without needing any permission.
>>> >
>>> > OK, I'll bite: how do you do this? Most of the read-the-logs code that
>>> > I have seen uses logcat via Runtime#exec(), and I don't see a
>>> > command-line switch on logcat to limit output to just your own
>>> > process' lines.
>>> >
>>> > (BTW, count me as one of the fans of this decision, despite the very
>>> > loud grumblings I expect you will receive from various quarters)
>>> >
>>> > Thanks!
>>> >
>>> > --
>>> > Mark Murphy (a Commons Guy)http://commonsware.com|htt**
>>> p://github.com/commonsguyhttp:**//commonsware.com/blog|http://**
>>> twitter.com/commonsguy
>>> >
>>> > Android Training in 
>>> > NYC:http://marakana.com/**training/android/
>>>
>>  --
> 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
>

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-13 Thread Zsolt Vasvari
Funny, today I tried it again and it only showed its own logs.  Yesterday, 
it showed all logs which I verified by starting another app's Activity.

There is probably a bug somewhere where the permission is still granted 
somehow.


On Friday, July 13, 2012 3:46:58 PM UTC+8, BoD wrote:
>
>  It is supposed to only show its *own* logs.
> And I confirm this behavior with CatLog on my own JB device.
> If you have a different behavior well I guess it's a bug ;)
>
> -- 
> B.LUBEK
>
> On 07/13/2012 02:39 AM, Zsolt Vasvari wrote:
>  
> What are we talking about this in this thread?  I just tried the CatLog 
> app on my official build (JRO03C) build on my Galaxy Nexus and it shows the 
> logcat as it always has.  
>
> On Friday, July 13, 2012 8:09:50 AM UTC+8, Mark Murphy (a Commons Guy) 
> wrote: 
>>
>> On Thu, Jul 12, 2012 at 8:02 PM, Peter Sinnott  
>> wrote: 
>> > 3 devices with ICS ( HTC Desire / HTC One X / Asus Transformer ) 
>> > and none of them seem to do it. Probably something obvious I'm doing 
>> > wrong. 
>>
>> Either that, or it's not universal. I just gave it a few tries on a 
>> Samsung Galaxy Tab 2 7.0, also running ICS, and could not seem to get 
>> it to trigger. Which is why we need some other trigger mechanism that 
>> isn't a button-ish form of the game Twister. The concept (let the user 
>> send system logs to who they wish) is sound, but it has to be 
>> something reasonable for users to accomplish. 
>>
>> -- 
>> Mark Murphy (a Commons Guy) 
>> http://commonsware.com | http://github.com/commonsguy 
>> http://commonsware.com/blog | http://twitter.com/commonsguy 
>>
>> _The Busy Coder's Guide to Android Development_ Version 3.8 Available! 
>>
> -- 
> 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 
>
>
>
> -- 
> BoD
>
>  

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-13 Thread Kostya Vasilyev
2012/7/13 Mark Murphy 

> On Thu, Jul 12, 2012 at 7:39 PM, Peter Sinnott  wrote:
> > Is that new in JB? All I can manage to do is turn off the screen or
> > reboot.
>
> I was able to get it working in a Galaxy Nexus running ICS, but only
> after several tries.
>

Works for me on stock 4.0.4 as well, but the "user experience" is really
weird:

1. There is a significant delay while the data is being collected / packed
with no feedback of any kind.

2. The keys that make up the combo continue to perform their primary
function: i.e. whlie doing this, I get the "power off / airplane mode"
menu, and the ringer volume slides all the way up (or down).

-- K

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-13 Thread BoD

It is supposed to only show its *own* logs.
And I confirm this behavior with CatLog on my own JB device.
If you have a different behavior well I guess it's a bug ;)

--
B.LUBEK

On 07/13/2012 02:39 AM, Zsolt Vasvari wrote:
What are we talking about this in this thread?  I just tried the 
CatLog app on my official build (JRO03C) build on my Galaxy Nexus and 
it shows the logcat as it always has.


On Friday, July 13, 2012 8:09:50 AM UTC+8, Mark Murphy (a Commons Guy) 
wrote:


On Thu, Jul 12, 2012 at 8:02 PM, Peter Sinnott mailto:psinn...@gmail.com>> wrote:
> 3 devices with ICS ( HTC Desire / HTC One X / Asus Transformer )
> and none of them seem to do it. Probably something obvious I'm
doing
> wrong.

Either that, or it's not universal. I just gave it a few tries on a
Samsung Galaxy Tab 2 7.0, also running ICS, and could not seem to get
it to trigger. Which is why we need some other trigger mechanism that
isn't a button-ish form of the game Twister. The concept (let the
user
send system logs to who they wish) is sound, but it has to be
something reasonable for users to accomplish.

-- 
Mark Murphy (a Commons Guy)

http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.8
Available!

--
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 



--
BoD

--
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-12 Thread Zsolt Vasvari
What are we talking about this in this thread?  I just tried the CatLog app 
on my official build (JRO03C) build on my Galaxy Nexus and it shows the 
logcat as it always has.  

On Friday, July 13, 2012 8:09:50 AM UTC+8, Mark Murphy (a Commons Guy) 
wrote:
>
> On Thu, Jul 12, 2012 at 8:02 PM, Peter Sinnott  
> wrote: 
> > 3 devices with ICS ( HTC Desire / HTC One X / Asus Transformer ) 
> > and none of them seem to do it. Probably something obvious I'm doing 
> > wrong. 
>
> Either that, or it's not universal. I just gave it a few tries on a 
> Samsung Galaxy Tab 2 7.0, also running ICS, and could not seem to get 
> it to trigger. Which is why we need some other trigger mechanism that 
> isn't a button-ish form of the game Twister. The concept (let the user 
> send system logs to who they wish) is sound, but it has to be 
> something reasonable for users to accomplish. 
>
> -- 
> Mark Murphy (a Commons Guy) 
> http://commonsware.com | http://github.com/commonsguy 
> http://commonsware.com/blog | http://twitter.com/commonsguy 
>
> _The Busy Coder's Guide to Android Development_ Version 3.8 Available! 
>

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-12 Thread Mark Murphy
On Thu, Jul 12, 2012 at 8:02 PM, Peter Sinnott  wrote:
> 3 devices with ICS ( HTC Desire / HTC One X / Asus Transformer )
> and none of them seem to do it. Probably something obvious I'm doing
> wrong.

Either that, or it's not universal. I just gave it a few tries on a
Samsung Galaxy Tab 2 7.0, also running ICS, and could not seem to get
it to trigger. Which is why we need some other trigger mechanism that
isn't a button-ish form of the game Twister. The concept (let the user
send system logs to who they wish) is sound, but it has to be
something reasonable for users to accomplish.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.8 Available!

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-12 Thread Mark Murphy
On Thu, Jul 12, 2012 at 7:39 PM, Peter Sinnott  wrote:
> Is that new in JB? All I can manage to do is turn off the screen or
> reboot.

I was able to get it working in a Galaxy Nexus running ICS, but only
after several tries.

I filed an feature request to offer something else, perhaps through
Settings, to get to the same behavior:

http://code.google.com/p/android/issues/detail?id=34815

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.8 Available!

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-12 Thread Kostya Vasilyev
2012/7/12 Dianne Hackborn 

> Applications accessing the system logs has been a long-standing issue.
>  There is various code in the system that tries to trim personal and other
> dangerous information out when it prints to the log, but this often misses
> things, and just makes the system using the logs much more complicated and
> risky.
>
> The logs are also a target for malware, since it can look at what is being
> printed there to infer a lot about what is going on in the device.
>

Understood, but you just made legitimate use impossible.


>
> Plus, as I said, access to the logs has never been any part of the SDK,
> and this was very deliberate, because it is not a facility we want
> applications to use or feel like we can maintain for applications as the
> platform evolves.
>

You saying that doesn't make it any less useful or necessary in some cases
(and those cases are "when you need it, you really really need it").


>
> If you want the user to give you debugging information, you can have them
> generate a bug report with power + volume down + volume up which includes
> the logs and lots of other data, and automatically brings up their e-mail
> app to sent it all (plus a screenshot).  We were just discussing that we
> should have an easier way to generate these as well, I am going to look at
> adding something to the settings app.
>

Ah, the usual "almost done, but not quite, and really, wait for the next
version where it'll really work, and pray that your users will have it on
their devices".

Is there something wrong with how Android's release schedule is largely
tied to Google I/O and the Christmas buying season?

This feature works on my 4.0.4, which was released in November - where's
the docs?

I see the developer site received a fancy redesign, surely someone could
find the time to write this up?


>
> I also have started introducing the concept of a "development" permission,
> which read logs is classified as.  This allows the app to request the
> permission, but not get it at install.  You can however grant it with an
> adb shell command once it is installed.
>

I fail to see the use case for this.

Reading the system logs is useful for remotely diagnosing weirdness out on
the user's devices, when one specifically needs the system logs and not
just the app logs.

Do you expect end users to install the development tools and adb in order
to grant this permission, should the need arise?


>  At some point later I expect to have a UI in the system for doing this,
> but we are going to hold off on that to be careful about how we present
> this.
>
> As far as the percentage of devices running JB, if you want to make that
> argument then we should just stop doing any improvements now since a few
> days after release very few devices will have them.  We consider this a
> significant improvement to the security of the platform, and going forward
> it is what we want to have.
>

Pffft.

Well, I think you should.

It took your team about six months to get the Galaxy Nexus to where it 1.
doesn't reboot on its own and 2. is able to accept incoming calls and SMS.

Still, a few times a day I see it freeze for a few seconds and kill the
foreground app, dumping me to Launcher. This happens in Gmail and the
browser - both of which are pre-installed apps, developed at Google.

I don't recall an HTC Hero with 1.6, or a Motorola Milestone with 2.1 doing
anything like this.

Everything after that has been a gradual decline in stability, from one
release to the next.

Speaking as a user, and as a developer both, each new release makes me
think "guess what they broke this time", and this applies to development
tools and Market as well - the whole Android experience.

Is this progress?

-- K

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-12 Thread Ievgenii Nazaruk
Personally, as a user I welcome this change. 

My concern was that this wasn't mentioned in changes description. And 
what's more important there is no way to enable READ_LOGS during 
development/testing process. It's good there are (tentative?) plans to 
introduce a way to enable such permissions for developers in later 
releases. It would've been great to have both these changes at the same 
time. But we have what we have.

By the way, thanks for the power + volume down + volume up trick. Didn't 
know it existed. This somewhat mitigates the issue in some cases. 

/Ievgenii Nazaruk

On Thursday, July 12, 2012 8:15:33 PM UTC+3, Dianne Hackborn wrote:
>
> Applications accessing the system logs has been a long-standing issue. 
>  There is various code in the system that tries to trim personal and other 
> dangerous information out when it prints to the log, but this often misses 
> things, and just makes the system using the logs much more complicated and 
> risky.
>
> The logs are also a target for malware, since it can look at what is being 
> printed there to infer a lot about what is going on in the device.
>
> Plus, as I said, access to the logs has never been any part of the SDK, 
> and this was very deliberate, because it is not a facility we want 
> applications to use or feel like we can maintain for applications as the 
> platform evolves.
>
> If you want the user to give you debugging information, you can have them 
> generate a bug report with power + volume down + volume up which includes 
> the logs and lots of other data, and automatically brings up their e-mail 
> app to sent it all (plus a screenshot).  We were just discussing that we 
> should have an easier way to generate these as well, I am going to look at 
> adding something to the settings app.
>
> I also have started introducing the concept of a "development" permission, 
> which read logs is classified as.  This allows the app to request the 
> permission, but not get it at install.  You can however grant it with an 
> adb shell command once it is installed.  At some point later I expect to 
> have a UI in the system for doing this, but we are going to hold off on 
> that to be careful about how we present this.
>
> As far as the percentage of devices running JB, if you want to make that 
> argument then we should just stop doing any improvements now since a few 
> days after release very few devices will have them.  We consider this a 
> significant improvement to the security of the platform, and going forward 
> it is what we want to have.
>
> On Thu, Jul 12, 2012 at 10:00 AM, Kostya Vasilyev wrote:
>
>> I have my own logging solution in my app, and even though it's very 
>> useful...
>>
>> ... being able to see the system logs is invaluable and irreplaceable in 
>> some situations.
>>
>> For example, I recently experienced LVL validation failures and asked the 
>> users to use CatLog (one the of apps on Market that can read and email 
>> logcat output). With the logcat output in hand, it was obvious that the 
>> failure is on Google's side (again!) and I knew what to do about it.
>>
>> I understand that the Android team's concern, as was previously mentioned 
>> on the list, is for applications that may print personal user's information 
>> in the system log.
>>
>> Why, then, is the remedy such that it punishes apps that are not in 
>> violation of the user's privacy with their logcat use?
>>
>> Is the actual install share of JB so high already that this change is 
>> believed to be a meaningful solution?
>>  
>> -- K
>>
>>
>> 2012/7/12 Latimerius 
>>
>>> The upcoming ACRA release will (probably) contain the ability to
>>> include a custom application-private log file in a report.  So if you
>>> only care for reading the system log to read your own log messages,
>>> that should be taken care of.  Of course, if you really want to read
>>> the actual stuff logged by the system and other apps, that's going to
>>> be tougher.
>>>
>>> On Thu, Jul 12, 2012 at 5:19 PM, b0b  wrote:
>>> > The thing is that it is better to not rely on READ_LOGS to (for 
>>> example)
>>> > provide logs to ACRA.
>>> > The bonus is that your app will not need that permission which is kind 
>>> of
>>> > scary.
>>> >
>>> > How can it be done ?
>>> >
>>> > - wrap all your logging calls into functions adding your log message + 
>>> any
>>> > other metadata (like tag or timestamp) to a cache were you keep the 
>>> last n
>>> > log lines. Can be done with a simple LinkedHashMap overriding
>>> > removeEldestEntry().
>>> > - modify ACRA by  adding a custom column that will contain the content 
>>> of
>>> > the log cache. When the crash report is constructed, fill that column 
>>> with
>>> > the cache data
>>> > - profit!
>>> >
>>> >
>>> >
>>> > --
>>> > 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 fro

Re: [android-developers] Re: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-12 Thread Dianne Hackborn
Applications accessing the system logs has been a long-standing issue.
 There is various code in the system that tries to trim personal and other
dangerous information out when it prints to the log, but this often misses
things, and just makes the system using the logs much more complicated and
risky.

The logs are also a target for malware, since it can look at what is being
printed there to infer a lot about what is going on in the device.

Plus, as I said, access to the logs has never been any part of the SDK, and
this was very deliberate, because it is not a facility we want applications
to use or feel like we can maintain for applications as the platform
evolves.

If you want the user to give you debugging information, you can have them
generate a bug report with power + volume down + volume up which includes
the logs and lots of other data, and automatically brings up their e-mail
app to sent it all (plus a screenshot).  We were just discussing that we
should have an easier way to generate these as well, I am going to look at
adding something to the settings app.

I also have started introducing the concept of a "development" permission,
which read logs is classified as.  This allows the app to request the
permission, but not get it at install.  You can however grant it with an
adb shell command once it is installed.  At some point later I expect to
have a UI in the system for doing this, but we are going to hold off on
that to be careful about how we present this.

As far as the percentage of devices running JB, if you want to make that
argument then we should just stop doing any improvements now since a few
days after release very few devices will have them.  We consider this a
significant improvement to the security of the platform, and going forward
it is what we want to have.

On Thu, Jul 12, 2012 at 10:00 AM, Kostya Vasilyev wrote:

> I have my own logging solution in my app, and even though it's very
> useful...
>
> ... being able to see the system logs is invaluable and irreplaceable in
> some situations.
>
> For example, I recently experienced LVL validation failures and asked the
> users to use CatLog (one the of apps on Market that can read and email
> logcat output). With the logcat output in hand, it was obvious that the
> failure is on Google's side (again!) and I knew what to do about it.
>
> I understand that the Android team's concern, as was previously mentioned
> on the list, is for applications that may print personal user's information
> in the system log.
>
> Why, then, is the remedy such that it punishes apps that are not in
> violation of the user's privacy with their logcat use?
>
> Is the actual install share of JB so high already that this change is
> believed to be a meaningful solution?
>
> -- K
>
>
> 2012/7/12 Latimerius 
>
>> The upcoming ACRA release will (probably) contain the ability to
>> include a custom application-private log file in a report.  So if you
>> only care for reading the system log to read your own log messages,
>> that should be taken care of.  Of course, if you really want to read
>> the actual stuff logged by the system and other apps, that's going to
>> be tougher.
>>
>> On Thu, Jul 12, 2012 at 5:19 PM, b0b  wrote:
>> > The thing is that it is better to not rely on READ_LOGS to (for example)
>> > provide logs to ACRA.
>> > The bonus is that your app will not need that permission which is kind
>> of
>> > scary.
>> >
>> > How can it be done ?
>> >
>> > - wrap all your logging calls into functions adding your log message +
>> any
>> > other metadata (like tag or timestamp) to a cache were you keep the
>> last n
>> > log lines. Can be done with a simple LinkedHashMap overriding
>> > removeEldestEntry().
>> > - modify ACRA by  adding a custom column that will contain the content
>> of
>> > the log cache. When the crash report is constructed, fill that column
>> with
>> > the cache data
>> > - profit!
>> >
>> >
>> >
>> > --
>> > 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
>>
>> --
>> 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
>>
>
>  --
> 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-devel

Re: [android-developers] Re: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-12 Thread Kostya Vasilyev
I have my own logging solution in my app, and even though it's very
useful...

... being able to see the system logs is invaluable and irreplaceable in
some situations.

For example, I recently experienced LVL validation failures and asked the
users to use CatLog (one the of apps on Market that can read and email
logcat output). With the logcat output in hand, it was obvious that the
failure is on Google's side (again!) and I knew what to do about it.

I understand that the Android team's concern, as was previously mentioned
on the list, is for applications that may print personal user's information
in the system log.

Why, then, is the remedy such that it punishes apps that are not in
violation of the user's privacy with their logcat use?

Is the actual install share of JB so high already that this change is
believed to be a meaningful solution?

-- K

2012/7/12 Latimerius 

> The upcoming ACRA release will (probably) contain the ability to
> include a custom application-private log file in a report.  So if you
> only care for reading the system log to read your own log messages,
> that should be taken care of.  Of course, if you really want to read
> the actual stuff logged by the system and other apps, that's going to
> be tougher.
>
> On Thu, Jul 12, 2012 at 5:19 PM, b0b  wrote:
> > The thing is that it is better to not rely on READ_LOGS to (for example)
> > provide logs to ACRA.
> > The bonus is that your app will not need that permission which is kind of
> > scary.
> >
> > How can it be done ?
> >
> > - wrap all your logging calls into functions adding your log message +
> any
> > other metadata (like tag or timestamp) to a cache were you keep the last
> n
> > log lines. Can be done with a simple LinkedHashMap overriding
> > removeEldestEntry().
> > - modify ACRA by  adding a custom column that will contain the content of
> > the log cache. When the crash report is constructed, fill that column
> with
> > the cache data
> > - profit!
> >
> >
> >
> > --
> > 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
>
> --
> 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
>

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-12 Thread Latimerius
The upcoming ACRA release will (probably) contain the ability to
include a custom application-private log file in a report.  So if you
only care for reading the system log to read your own log messages,
that should be taken care of.  Of course, if you really want to read
the actual stuff logged by the system and other apps, that's going to
be tougher.

On Thu, Jul 12, 2012 at 5:19 PM, b0b  wrote:
> The thing is that it is better to not rely on READ_LOGS to (for example)
> provide logs to ACRA.
> The bonus is that your app will not need that permission which is kind of
> scary.
>
> How can it be done ?
>
> - wrap all your logging calls into functions adding your log message + any
> other metadata (like tag or timestamp) to a cache were you keep the last n
> log lines. Can be done with a simple LinkedHashMap overriding
> removeEldestEntry().
> - modify ACRA by  adding a custom column that will contain the content of
> the log cache. When the crash report is constructed, fill that column with
> the cache data
> - profit!
>
>
>
> --
> 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

-- 
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-12 Thread BoD

On 07/12/2012 02:45 PM, Mark Murphy wrote:

On Thu, Jul 12, 2012 at 8:37 AM, BoD  wrote:

This is a serious issue because it makes extremely valuable libraries like
ACRA inoperative.

ACRA does not need READ_LOGS. Certain ACRA features might need READ_LOGS.
I think we can all agree that one main feature of this library (and 
others) is the ability to read/send the logs.


It appears in the new source code. The protectionLevel for READ_LOGS 
is now "signature|system|development". The new pipe syntax for 
protectionLevel is also undocumented (see 
http://code.google.com/p/android/issues/detail?id=34785). 


Thank you for this.
This is extremely unfortunate.
I opened this issue:
http://code.google.com/p/android/issues/detail?id=34792

--
BoD

--
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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-12 Thread Mark Murphy
On Thu, Jul 12, 2012 at 8:37 AM, BoD  wrote:
> This is a serious issue because it makes extremely valuable libraries like
> ACRA inoperative.

ACRA does not need READ_LOGS. Certain ACRA features might need READ_LOGS.

>> Did anyone see this change documented?

It does not appear to be documented.

>> Can someone confirm this behavior on Galaxy Nexus with Jelly Bean on it
>> (the one released to attendees of Google I/O)?

It appears in the new source code. The protectionLevel for READ_LOGS
is now "signature|system|development". The new pipe syntax for
protectionLevel is also undocumented (see
http://code.google.com/p/android/issues/detail?id=34785).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.8 Available!

-- 
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