Remove Permissions on CocoonJS Games

Discussion and feedback on Construct 2

Post » Sat Jan 12, 2013 2:52 pm

Does anyone know how to remove the default Android permissions on a game created using CocoonJS cloud compiler?

It seems that when you create a game with the cloud compiler, the following permissions are automatically added to the apk:

android.permission.CAMERA
android.permission.WRITE_EXTERNAL_STORAGE
android.permission.INTERNET
android.permission.ACCESS_COARSE_LOCATION
android.permission.ACCESS_NETWORK_STATE
android.permission.READ_PHONE_STATE
android.permission.ACCESS_FINE_LOCATION
android.permission.VIBRATE
android.permission.RECEIVE_BOOT_COMPLETED

This is a problem for me for two reasons:
a) This prevents me from giving the game a Content Rating of 'Everyone' on Google Play. Google automatically bumps the rating up to 'low maturity' if the app asks for location permissions. My game is a game for preschool children, so I need to set a rating of 'Everyone'.

b) Some users are put off by games that seek excessive permissions, as there is a lot of malware out there.

Does @ludei have any plans to make these setting optional?
B
14
S
3
G
3
Posts: 25
Reputation: 3,217

Post » Sat Jan 12, 2013 4:55 pm

You'll need to decompile the unsigned apk then modify the relevant xml, recompile, sign and align. I've tried doing this with an apk multi-tool but have always ended up with errors. Would be great if @ludei could have the cloud generate a set of files that can be dropped into Eclipse.
B
31
S
11
G
7
Posts: 197
Reputation: 6,682

Post » Sat Jan 12, 2013 8:04 pm

You need to ask Ludei about this. I don't think there's anything we can do to change the permissions when exporting from C2.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Sat Jan 12, 2013 8:28 pm

Hi, you should decompile the apk file and change the "AndroidManifest.xml" and then recompile it again. Inside the "AndroidManifest.xml" you'll find the permission line like "<uses-permission android:name="android.permission.INTERNET" />". It should work when you delete it. Here is the link for tutorial.
B
9
S
2
G
3
Posts: 4
Reputation: 3,038

Post » Mon Jan 14, 2013 11:15 am

Thanks for the replies guys.

The tutorial on decompiling the apk looks far too complicated and scary for me. It took me so long to get my app working in the first place, that I don't want to risk messing it up.

I guess I will have to wait and hope that @ludei gives us this option in the future...
B
14
S
3
G
3
Posts: 25
Reputation: 3,217

Post » Wed Jan 16, 2013 3:01 pm

Hi @sicetix ... in the end, I followed the steps of the tutorial as far as I could.

I managed to decompile the app and remove the xml signs

But I did not understand how to recompile the app

The tutorial was unclear about this. I originally signed my app using a keystore file I created by following the ludei tutorial ... I do not understand how to re-sign the app...
B
14
S
3
G
3
Posts: 25
Reputation: 3,217

Post » Wed Jan 16, 2013 4:46 pm

Hi everyone,

Yes, the Cloud Compiler currently does that because we don't yet have a method to selectively enable/disable features in CocoonJS, so every possible permission that any part of CocoonJS can ever use must be requested.

We're working on a system to selectively enable/disable certain parts of our system (camera,store,ads...) so those permissions aren't needed, but it's not yet finished and it'll take a few weeks at least to be released.

Until then, we think your only option is to try your luck with the apk tool other users have suggested.
B
9
S
4
G
4
Posts: 383
Reputation: 3,616

Post » Wed Jan 16, 2013 7:07 pm

Thanks ludei -- I can wait a few weeks or so!
B
14
S
3
G
3
Posts: 25
Reputation: 3,217

Post » Wed Apr 17, 2013 7:19 pm

@ludei Any progress on this issue?
B
41
S
8
G
6
Posts: 58
Reputation: 6,820

Post » Sat May 04, 2013 6:30 am

Perhaps an easy way would be for the Developer to tell Ludei what permissions they want their app to have?

Perhaps via some checkboxes or the like?
B
21
S
5
G
2
Posts: 26
Reputation: 2,512

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Mirlas, radbrothers and 11 guests