News for hackers. Stuff that matters.
Re:Hidden “App Ops” Feature in Android 4.3 Lets You Disable ... by sp332 on Friday July 26, 2013 @03:54PM (#6110184)
It does error checking. Would you write a program that constantly checks the config file to see if something changed, or to see if the euid it is running as suddenly changes? Of course not, why would you? And why would an Android app constantly check to see if the permissions it has been granted are suddenly un-granted?

More to the point: why would an app ask for permissions it didn't need in the first place? The most likely thing to happen is that the app would be useless.

Re:Hidden “App Ops” Feature in Android 4.3 Lets You Disable ... by Zigurd on Friday July 26, 2013 @04:07PM (#6110285)
"More to the point: why would an app ask for permissions it didn't need..."

Ad networks. So wrap the calls to the ad network library in try/catch, and, in most cases, that takes care of the mostly gratuitous permissions.

Re:Hidden “App Ops” Feature in Android 4.3 Lets You Disable ... by andybak on Friday July 26, 2013 @08:07PM (#6111249)
Or the Ad network code should handle this gracefully?
Re:Hidden “App Ops” Feature in Android 4.3 Lets You Disable ... by Zigurd on Friday July 26, 2013 @10:23PM (#6111634)
Not that I'm sympathetic to ad networks that data rape you to support some half-baked behavioral targeting, but one reason they don't now handle it gracefully is that SecuirtyException should in most cases be unhandled, because it would indicate some kind of defective installation. That's why this change has to be phased-in.
Re:Hidden “App Ops” Feature in Android 4.3 Lets You Disable ... by king_jester on Friday July 26, 2013 @04:06PM (#6110279)
Android as a framework is designed in such a way that most of the times you wish to access a feature of the device requires a permission you should be using components that can enforce a security check with the PackageManager or can handle the SecurityExceptions generated from not having a permission. Poorly architect-ed apps will have an issue with this, but those apps already have problems.
Re:Hidden “App Ops” Feature in Android 4.3 Lets You Disable ... by veeti on Friday July 26, 2013 @05:11PM (#6110617)
No. The Android API has always given the guarantee (and it still does) that your application's permissions will always be there. They can't be revoked during runtime. If it's in the manifest, it's perfectly fine to assume that you have it.

No piece of documentation or sample code has ever encouraged a pattern of "checking if your app has permission X or Y" because it's a total waste of time. Likewise, none of the built-in Android apps or any of the open-source apps from Google developers I've seen do that. There is no point to doing so.

In fact, it's actually bad practice because you're adding a bunch of error checking code for an error condition that's never going to happen. If you're getting a SecurityException for an action that you've explicitly requested the permission for, you're running on a broken API and it's not your responsibility to handle that.

The framework does include methods for checking permissions, but they are generally meant for things like inter-process communication and library code. There's no need to use them for ordinary applications you are building yourself. And nobody does that, rightfully so.

Re:Hidden “App Ops” Feature in Android 4.3 Lets You Disable ... by king_jester on Friday July 26, 2013 @09:59PM (#6111564)
I'm not suggesting that apps do this or even if it is a good idea to have this level of security checks in code. Rather, the Android framework encourages decentralized pieces of code that revolve accessing various capabilities of the API. The kind of paradigms in Android could be considered to be already a bit helpful in that they promote certain kinds of application architecture that may be more easily adapted to doing such security checks.

Ultimately it is a matter of time before something like this does make its way into the core features of Android. It is worth thinking about how Android is both deficient and helpful with its design philosophy regarding that eventuality.

Re:Hidden “App Ops” Feature in Android 4.3 Lets You Disable ... by sp332 on Friday July 26, 2013 @04:14PM (#6110320)
Handling an exception is one thing. Designing your app to work gracefully with random permissions denied sounds like a combinatorial explosion of testing and UI design.
Re:Hidden “App Ops” Feature in Android 4.3 Lets You Disable ... by king_jester on Friday July 26, 2013 @05:10PM (#6110611)
It's not very bad on Android. The framework really pushes for a kind of plug-in like architecture where you abstract your core components into things like Services, so thinking about those core features up front goes a long way to creating a common point to handle permission checks. If all else fails, an app could simply extend Application and check permissions at runtime.