apk builder compute permissions

317 views
Skip to first unread message

Chris

unread,
Oct 12, 2015, 4:06:17 PM10/12/15
to AndroidScript
I am interested in how the apk builder computes permissions.

I have a proprietary encryption technique I developed for our websites that I just ran my DS app through.

In DS the app runs without a problem. However, when I compile to apk all kinds of things seem to break, most notibly, the ability to write/read to sdcard.

I am doing other testing. Just wanted some input. Also, would it be feasible for a future version to list the permissions and allow us to remove or add if needed, maybe an 'advanced' button that opened a check list of the permissions?

Steve Garman

unread,
Oct 12, 2015, 4:15:04 PM10/12/15
to AndroidScript
It does a fairly unsophisticated string search through the code looking for DroidScript keywords.

It includes permissions even for code that is commented out, so if you need to add sdcard access, adding a comment
//app.WriteFile()
would probably do it.

I know of no way to strip permissions apart from unzipping the APK, attacking the manifest, rezipping and signing.

Dave Smart

unread,
Oct 12, 2015, 5:15:24 PM10/12/15
to AndroidScript
Just so you know guys... you can add permissions to an App by putting a line at the top like this:-

_AddPermissions( "Network,USB" );


Possible values:-
 Share, USB, Network, Camera, Location, SMS, WakeLock, Shortcut, Vibrate, License, Bluetooth, Storage, 
Contacts, SmartWatch2, Sounds, Vending, Record, Phone, Accounts, Boot, Body

This function was originally designed for use in plugins, but there is not reason not to use it in your main App either

Regards
David

Steve Garman

unread,
Oct 12, 2015, 5:32:48 PM10/12/15
to AndroidScript
Thanks for that Dave.

Do you think that plugins might benefit from an equivalent _AddOptions ?

Siddheshwar

unread,
Nov 12, 2018, 1:48:56 AM11/12/18
to DroidScript
Friends,
I m using webview to display an URL ,
unable to pick and upload image , application is crashing .

already added permissions ("Storage")
requesting your hel....

BareK

unread,
Nov 16, 2018, 3:34:47 PM11/16/18
to DroidScript
Can you provide a sample code reproducing the problem?
Reply all
Reply to author
Forward
0 new messages