On Mon, Nov 28, 2011 at 5:15 AM, cpphool <[email protected]> wrote:
> I was wondering what is the correct approach when developing
> applications with non-public functionality for Android device
> manufacturers.

Just say no.

> First of all, there are a lot of Android permissions that are not
> granted to 3rd party apps unless they are signed with manufacturer
> certificate, f.e. "android.permission.READ_FRAME_BUFFER".
>
> http://developer.android.com/reference/android/Manifest.permission.html#READ_FRAME_BUFFER
>
> Android documentation says: "Allows an application to take screen
> shots and more generally get access to the frame buffer data". Ok, so
> how can I take this screen shot? Is there some API?

No.

> Or should I
> directly access framebuffer (like many applications that work on
> rooted devices do)?

Your guess is as good as mine.

> 1) Where can I find out how these permissions exactly work?

Read through the source code on http://source.android.com. Searching
on the name of the permission frequently comes up with interesting
stuff.

> 2) Should not there be some information if permissions are accessible
> by normal 3rd party applications or not?

There isn't in the documentation.

However, in frameworks/base/core/res/AndroidManifest.xml in the source
code, you will see declarations like:

    <!-- Allows an application to take screen shots and more generally
         get access to the frame buffer data -->
    <permission android:name="android.permission.READ_FRAME_BUFFER"
        android:label="@string/permlab_readFrameBuffer"
        android:description="@string/permdesc_readFrameBuffer"
        android:protectionLevel="signature" />

The android:protectionLevel tells you what is required. In this case,
"signature" means that it must be signed with the same signing key as
is used with the firmware. You will also sometimes see
"signatureOrSystem", which (from what I can tell) allows both
signature-based apps and ones that reside in /system/app.

> 3) Secondly, is there a way of testing an applications that uses these
> non-public permissions? I assume that you would have rooted device in
> order to do so. But can you switch something in the rooted Android
> operating system so that it would grant all permissions for all
> applications?

Not that I am aware of, but that's a far better question for some
firmware-related Google Group, hosted over on
http://source.android.com.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to