The upcoming major Android OS update, Android 11, is set to have two important tools that promote better transparency into private data access and their exact causes of exits. These tools, called Data Access Audit APIs and Process Exit Reasons are specifically designed to give Android smartphone app developers, and possibly users as well, better insights into the performance of their apps.
Android Developers have introduced two new tools crafted specifically for offering clearer information about the way apps installed on smartphone access and process the private user information. These tools are expected to be included inside the upcoming Android 11.
Data Access Auditing APIs
In Android 11, developers will have access to new APIs that will give them enhanced transparency into the usage of private and protected data. Developers indicate such a feature could be useful, for example, for large apps that may have legacy code and those that use third-party libraries or SDKs. There are essentially two APIs in the package.
The first API is a ‘Callback’ allowing apps to backtrace the use of data protected by runtime permissions to the code that triggered the usage. To be notified, any app can set a callback in AppOpsManager which will be invoked each time a section of code uses private data, such as getting location updates. App developers and users can create specific logic to track, ingest, and analyze the data.
Android 11 introduces “better” privacy, through more granular permissions.
Yet, permissions are fundamentally flawed and changes to them cosmetic. The real privacy problems in apps remain unsolved.https://t.co/JgzzHHByLo
— Konrad Kollnig (@KKollnig) July 2, 2020
The second API is aimed at apps with higher complexity. In other words, the second API is meant for apps with multiple features. An app for any social media platform might have a ‘find friends’ feature and a photo tagging feature. Needless to add, all such features demand a subset of sensitive data. The ‘find friends’ uses an Android smartphone user’s location and contacts. Meanwhile, photos tag uses location, contacts, and camera. In Android 11, developers can create a new Context object that allows them to attribute a subset of the app’s code to one or more features. Moving ahead, every permission usage can be traced to the features associated with the context.
Process Exit Reasons:
Developers and Android app users have always had a difficult time tracking down the cause of apps getting terminated. There are several common reasons for abrupt app termination. These include an ANR, a crash, or the user choosing to force stop the app. To better understand and diagnose the cause, some developers are adding customized code to their apps. These are intended to create custom analytics which is often used to improve the app’s health, stability, and runtime.
Android 11 introduces a new ActivityManager API to report historical information related to an app process’s termination. Developers can easily use the API to retrieve any available historical process exit diagnostic information, such as whether a process termination is due to ANRs, memory issues, or other reasons.