how to use SET_DEBUG_APP permission - android

I found the SET_DEBUG_APP permission - it seems to grant permission to do exactly what I need to do at the moment - unfortunately I found no documentation on how to use it - can anybody shed some light on how to use it?

Like any other permission, add it to the AndroidManifest.xml file.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.somebody.amazing_app" >
...
<uses-permission android:name="android.permission.SET_DEBUG_APP" />
...
<application
...
</application>
...
</manifest>
Most of my devices don't need this; they debug just fine without this line. But one of my devices insists--it won't start running the app in debug mode without this line.

Related

How to add manifest permission QUERY_ALL_PACKAGES

The documentation says to add permission to the manifest in order to get all installed applications on the device starting from Android 11 and above, I added but underlines in red and writes
A declaration should generally be used instead of QUERY_ALL_PACKAGES; see https://g.co/dev/packagevisibility for details
What am I doing wrong?
<manifest ...>
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
...
</manifest>

Permissions in AndroidManifest.xml are ignored in Flutter

In my Flutter application I need to use microphone. As I test application in emulator in myproject/android/app/src/debug/AndroidManifest.xml I have:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="temp.myproject.myproject">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
</manifest>
However, my application still doesn't have permission to use microphone. So, I need to use permission_handler library to make it work:
Map<Permission, PermissionStatus> statuses = await [Permission.microphone].request();
I thought that adding uses-permission.. in AndroidManifest is enough, but it doesn't work without permission_handler. Could anyone explain why, or what I do/understand wrong.
You can uninstall the app and install it again on your physical or emulator device, in order make sure that the app is running from fresh install, and to make sure that the AndroidManifest is re-register into the device

Android 4.2 filters out CHANGE_CONFIGURATION permission?

I come across a weird problem, I got an application allowing to freely change the font size on Android Device (Font Size Setter). It uses introspection to call some internal Android apis. To do this call, it needs the following permission : android.permission.CHANGE_CONFIGURATION. It worked like a charm under Android 4.0 and up to 4.2 where it does not work anymore.
Digging into logs I found out that I can't update font size because it misses this permission. Debbuging to check effective permissions, I got these when inspecting the PackageInfo corresponding to my app
requestedPermissions = {java.lang.String[2]#830038778728}
[0] = {java.lang.String#830038778760}"android.permission.CHANGE_CONFIGURATION"
[1] = {java.lang.String#830038778896}"android.permission.WRITE_SETTINGS"
requestedPermissionsFlags = {int[2]#830038779016}
[0] = 1
[1] = 3
Does somebody got any clue about what's going on, or any workaround idea ?
Thanks a lot for reading me.
Per request, the AndroidManifest.xml file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fr.gatay.android.fss"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="14"/>
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.WRITE_SETTINGS"/>
<application android:label="#string/app_name" android:icon="#drawable/app_icon">
<activity android:name=".MainActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
Check this post http://blog.sightidea.com/?p=44
You can ask your user to grant permission to the app with adb tool:
>adb shell
>pm grant com.yourapp.packagename android.permission.CHANGE_CONFIGURATION
The protection level of CHANGE_CONFIGURATION permission has been changed to "system|signature|development" (v4.2) from "dangerous" (v4.1 and below) since Android v4.2
It looks like that no way for 3rd part apps to get CHANGE_CONFIGURATION permission on Android 4.2+ devices. :-(
At least at present, CHANGE_CONFIGURATION requires for your app either to be signed by the firmware signing key or be installed on a system partition. You can see this by examining the framework manifest, where these permissions are defined.

FlashBuilder adds INTERNET permission even though it is not in my APP XML when building APK

I have an Mobile AIR project in FlashBuilder 4.6(Using AIR 3.4) and I am having a real problem publishing an APK. Here is the section from my APP XML:
<manifestAdditions><![CDATA[
<manifest android:installLocation="auto">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
</manifest>
]]></manifestAdditions>
For some reason, when I create an APK, the INTERNET permission is being tacked on the end of the manifest permissions block. Note that the application.xml in the asset/META-INF/AIR folder still looks correct.
Any ideas where I am going wrong?
After a lot more searching, I found my own answer:
Note: When you bundle the runtime, ADT adds the INTERNET and
BROADCAST_STICKY permissions to your application. These permissions
are required by the AIR runtime.
BROADCAST_STICKY seems to no longer be required, but apparently when using captive runtime we cannot get around this.

Android Application is not installed

I tried signing the application and tried just debugging it. I have the Galaxy nexus. i have been able to run on the device before but now when I compile and build it shows up on the device but when i try and run it it tells me the application is not installed. I have tried to reinstall it too!
thanks
You need to add Internet permission for the app you're installing, in its manifest file, by adding the following line to the manifest file:
<uses-permission android:name="android.permission.INTERNET" />
Do this before the <application ...> tag

Categories

Resources