Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Additional permissions


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 3 - Last Post: Jan 5, 2017 6:59 AM Last Post By: Yves Depreitere
Yves Depreitere

Posts: 61
Registered: 5/20/02
Additional permissions  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 4, 2017 3:15 AM
I've used a features that requires an additional permission that isn't listed on de permissions tab of Rad Studio.
So, I've added the permission into the template manifest (see below).
The permission (MANAGE_USERS) apparantly needs signing.
A certification was created, my projects was cleaned and build with release - application store.
Deployment was started from the deployment page (blue icon with green arrow).
The command "$ jarsigner -verify my_signed.apk" displays "jar verified".

But when I run my program it complains about the MANAGE_USERS permission.
During install the following permissions are listed:
- modify or delete the contents of your SD card
- read the contents of your SD card
- full network access
- view network connections
- view Wi-Fi-connections
No mention of user management. however
What went wrong?

I've tried with and without an additional permission (INTERACT_ACROSS_USERS_FULL)

Android Manifest:
<?xml version="1.0" encoding="utf-8"?>
<!-- BEGIN_INCLUDE(manifest) -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="%package%"
android:versionCode="%versionCode%"
android:versionName="%versionName%"
android:installLocation="%installLocation%">

<!-- This is the platform API where NativeActivity was introduced. -->
<uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="%targetSdkVersion%" />
<%uses-permission%>
<!-- Manually added permissions -->
<uses-permission android:name="android.permission.MANAGE_USERS" />
<uses-feature android:glEsVersion="0x00020000" android:required="True"/>
<application android:persistent="%persistent%"
android:restoreAnyVersion="%restoreAnyVersion%"
android:label="%label%"
android:debuggable="%debuggable%"
android:largeHeap="%largeHeap%"
android:icon="%icon%"
android:theme="%theme%"
android:hardwareAccelerated="%hardwareAccelerated%">

<%application-meta-data%>
<%services%>
<!-- Our activity is a subclass of the built-in NativeActivity framework class.
This will take care of integrating with our NDK code. -->
<activity android:name="com.embarcadero.firemonkey.FMXNativeActivity"
android:label="%activityLabel%"
android:configChanges="orientation|keyboard|keyboardHidden|screenSize"
android:launchMode="singleTask">
<!-- Tell NativeActivity the name of our .so -->
<meta-data android:name="android.app.lib_name"
android:value="%libNameValue%" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<%activity%>
<%receivers%>
</application>
</manifest>
<!-- END_INCLUDE(manifest) -->
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Additional permissions  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 4, 2017 10:19 AM   in response to: Yves Depreitere in response to: Yves Depreitere
Yves wrote:

I've used a features that requires an additional permission that isn't
listed on de permissions tab of Rad Studio.

Then you will have to edit the project's AndroidManifest.xml file directly:

http://docwiki.embarcadero.com/RADStudio/en/Android_Application_Manifest_File

http://docwiki.embarcadero.com/RADStudio/en/Preparing_an_Android_Application_for_Deployment#Customizing_Your_AndroidManifest.xml_File

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="%package%"
android:versionCode="%versionCode%"
android:versionName="%versionName%"
android:installLocation="%installLocation%">

When signing your app with a platform signature, you might need to add an
"android:sharedUserId" attribute to the <manifest> element:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="%package%"
android:versionCode="%versionCode%"
android:versionName="%versionName%"
android:installLocation="%installLocation%"
android:sharedUserId="android.uid.system">

You might also need to define the MANAGE_USERS permission in your manifest
with a <permission> element before you specify it in a <uses-permission>
element:

<permission android:name="android.permission.MANAGE_USERS"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
android:protectionLevel="signature|system" />

--
Remy Lebeau (TeamB)
Yves Depreitere

Posts: 61
Registered: 5/20/02
Re: Additional permissions  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 4, 2017 11:32 AM   in response to: Yves Depreitere in response to: Yves Depreitere
Thanks Remy

After adding all modifications almost all permissions are listed on the install screen, except MANAGE_USERS
On top of that, the app fails to install (X App not installed) on install screen.

Will continue fresh tomorrow...
Yves Depreitere

Posts: 61
Registered: 5/20/02
Re: Additional permissions  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 5, 2017 6:59 AM   in response to: Yves Depreitere in response to: Yves Depreitere
No luck looking at it with a fresh mind.
When I add "android:installLocation="%installLocation%" a whole lot of permissions are added to the install list, but the program won't install anymore.
If I leave it out, the program installs but the MANAGE_USERS permission isn't added.
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02