playMaker

Author Topic: Removing Android Permissions  (Read 4157 times)

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Removing Android Permissions
« on: August 02, 2015, 03:42:41 PM »
This post is edited to contain only useful information:

Manual identification and removal of scripts that trigger specific permissions.

-"Prevent Phone from Sleeping" / aka Wake_Lock
-Any script that contains the word movie in the title

-"Control Vibration" - Remove:
-DeviceVibrate.cs

-"Precise Location (GPS and Network-Based)" - Remove:
-GetLocationInfo.cs
-ProjectLocationToMap.cs
-StartLocationServicesUpdate.cs
-StopLocationServicesUpdate.cs

-"Network Access" - Thanks to Alex for his help in identification with this.
-Remove the Networking folder

In the project tab of Unity, locate:  Plugins\PlayMaker\WebGL\PlayMaker.dll and ensure that WebGL and Android both have checkmarks (nothing else should have checkmarks).  Then click Apply.

In the project tab of Unity, locate:  Plugins\PlayMaker\PlayMaker.dll and remove the checkmark from Android.  Then click Apply.

Click File, Build Settings, click Player settings, Other settings, In Scripting Define Symbols enter "UNITY_WEBGL", press enter.  File, Save Project.  Then build your unity project

Please note the following caveats: 
1) Must be built as a final android APK.  A checkmark in google development build still seems to include unnecessary permissions despite the above changes.
2) Due to a bug in Unity 5.1, you cannot remove permissions at all, unless you edit the android manifest.xml post Unity3d. Downgrading to 5.0.4 works.
3) Downgrading is easy, download 5.0.4 here:  http://unity3d.com/get-unity/download/archive, backup your project, open it with 5.0.4 and it will "recompile" but it will work.
« Last Edit: May 10, 2016, 06:44:16 PM by PlaymakerNOOB »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2260
    • View Profile
    • jinxtergames
Re: Removing Android Permissions
« Reply #1 on: August 03, 2015, 10:49:31 AM »
Hi,
yeah that's pretty annoying.

there should be way that they are easier to take out (in an option menu)
or let them out standard and have an option to get what you need

i will do a request for this later, in a hurry now :)

clandestine

  • Full Member
  • ***
  • Posts: 230
    • View Profile
Re: Removing Android Permissions
« Reply #2 on: August 04, 2015, 09:08:57 AM »
I too am in need of guidance for removing permissions (especially the prevent from sleeping and network) for features i'm not using.

Thanks

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: Removing Android Permissions
« Reply #3 on: August 04, 2015, 08:22:08 PM »
Made the request, and it has more info on our issue regarding Sleep permissions.  http://hutonggames.com/playmakerforum/index.php?topic=10886.msg51419#msg51419

clandestine

  • Full Member
  • ***
  • Posts: 230
    • View Profile
Re: Removing Android Permissions
« Reply #4 on: August 05, 2015, 09:03:32 AM »
Made the request, and it has more info on our issue regarding Sleep permissions.  http://hutonggames.com/playmakerforum/index.php?topic=10886.msg51419#msg51419
Thats cool, thanks man!

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: Removing Android Permissions
« Reply #5 on: August 07, 2015, 08:07:41 PM »
see top post

600

  • Sr. Member
  • ****
  • Posts: 492
    • View Profile
    • Car and Traffic Playmaker assets
Re: Removing Android Permissions
« Reply #6 on: February 09, 2016, 11:57:22 AM »
Thanks PlaymakerNOOB for collecting all this info!
This post could be a good merge with Alex’s pinned FAQ.
DLL thing cleared the “Network Access requirements”, thanks!

Rabagast

  • Hero Member
  • *****
  • Posts: 623
    • View Profile
    • Homepage
Re: Removing Android Permissions
« Reply #7 on: April 17, 2016, 01:14:47 PM »
-"Network Access" - Thanks to Alex for his help in identification with this.

In the project tab of Unity, locate:  Plugins\PlayMaker\WebGL\PlayMaker.dll and ensure that WebGL and Android both have checkmarks (nothing else should have checkmarks).  Then click Apply.

In the project tab of Unity, locate:  Plugins\PlayMaker\PlayMaker.dll and remove the checkmark from Android.  Then click Apply.

Click File, Build Settings, click Player settings, Other settings, In Scripting Define Symbols enter "UNITY_WEBGL", press enter.  File, Save Project.  Then build your unity project

Please note the following caveats: 
1) Must be built as a final android APK.  A checkmark in google development build still seems to include unnecessary permissions despite the above changes.
2) Due to a bug in Unity 5.1, you cannot remove permissions at all, unless you edit the android manifest.xml post Unity3d. Downgrading to 5.0.4 works.
3) Downgrading is easy, download 5.0.4 here:  http://unity3d.com/get-unity/download/archive, backup your project, open it with 5.0.4 and it will "recompile" but it will work.


Hi!

I followed these steps, but I still have full internet access. I also removed the Network folder. I'm using Unity version 5.2.0f3 Personal and Playmaker version 1.8.0.f40.

Any ideas?

I need help soon. I can't release the game with this permission. Since this game is for kids and up, many people won't download it.

Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: Removing Android Permissions
« Reply #8 on: May 10, 2016, 04:44:37 PM »
I am not sure, though I did upgrade an android project from Unity 5.0 to 5.3 and then upgraded playmaker from 1.7.8 to 1.8.

Now heres where it gets odd.  Full network access is not listed as a requirement in android 6.0+ but on devices under 6, it shows up... even when I perform the previous steps to remove it.  Odd

Downgraded the project to 5.0, used 1.7.8 playmaker, followed the previous steps.  No internet permissions.  Appears to be an issue with 1.8 Playmaker.
« Last Edit: May 10, 2016, 06:37:39 PM by PlaymakerNOOB »

Rabagast

  • Hero Member
  • *****
  • Posts: 623
    • View Profile
    • Homepage
Re: Removing Android Permissions
« Reply #9 on: May 12, 2016, 02:36:59 PM »
Hi!

I tried with a brand new project, then it works. One of the assets that make internet access is "Easy Save 2", but it has to be something else also I don't know what. Because even if I got an updated version of Easy Save 2 with internet access removed, I still got internet access in my new finished game, but not in a brand new project.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

PlaymakerNOOB

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Re: Removing Android Permissions
« Reply #10 on: May 15, 2016, 09:06:38 AM »
Rabagast,

After going through my notes, I noticed that the Network folder in Playmaker was not listed as something to remove in the top post.  I have edited it to include that.   I think with my earlier comment i upgraded to 1.8 playmaker and forgot to remove the networking folder.

I took my finished android app from 5.0 (with 0 permissions using Playmaker 1.7.8) and upgraded it to unity 5.3 and tested on multiple devices with varying versions of android, it does not install with any permissions.