how deal with huge unwanted permission list when export project for android?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By mrmrn
:warning: Old Version Published before Godot 3 was released.

Dear all.
I make a small project exported to android and sent it to a market. the market sent an email to me and said your app have a lot of permission that does not needed!
the list of permissions is:

godot.custom.19
godot.custom.18
godot.custom.17
godot.custom.16
godot.custom.15
godot.custom.14
godot.custom.13
godot.custom.12
godot.custom.11
godot.custom.10
godot.custom.9
godot.custom.8
godot.custom.7
godot.custom.6
godot.custom.5
godot.custom.4
godot.custom.3
godot.custom.2
godot.custom.1
godot.custom.0
godot.WRITE_USER_DICTIONARY
godot.WRITE_SYNC_SETTINGS
godot.WRITE_SOCIAL_STREAM
godot.WRITE_SMS
godot.WRITE_SETTINGS
godot.WRITE_SECURE_SETTINGS
godot.WRITE_PROFILE
godot.WRITE_HISTORY_BOOKMARKS
godot.WRITE_GSERVICES
godot.WRITE_EXTERNAL_STORAGE
godot.WRITE_CONTACTS
godot.WRITE_CALL_LOG
godot.WRITE_CALENDAR
godot.WRITE_APN_SETTINGS
godot.WAKE_LOCK
godot.VIBRATE
godot.USE_SIP
godot.USE_CREDENTIALS
godot.UPDATE_DEVICE_STATS
godot.UNINSTALL_SHORTCUT
godot.TRANSMIT_IR
godot.SYSTEM_ALERT_WINDOW
godot.SUBSCRIBED_FEEDS_WRITE
godot.SUBSCRIBED_FEEDS_READ
godot.STATUS_BAR
godot.SIGNAL_PERSISTENT_PROCESSES
godot.SET_WALLPAPER_HINTS
godot.SET_WALLPAPER
godot.SET_TIME_ZONE
godot.SET_TIME
godot.SET_PROCESS_LIMIT
godot.SET_PREFERRED_APPLICATIONS
godot.SET_POINTER_SPEED
godot.SET_ORIENTATION
godot.SET_DEBUG_APP
godot.SET_ANIMATION_SCALE
godot.SET_ALWAYS_FINISH
godot.SET_ALARM
godot.SET_ACTIVITY_WATCHER
godot.SEND_SMS
godot.SEND_RESPOND_VIA_MESSAGE
godot.RESTART_PACKAGES
godot.REORDER_TASKS
godot.RECORD_AUDIO
godot.RECEIVE_WAP_PUSH
godot.RECEIVE_SMS
godot.RECEIVE_MMS
godot.RE CEIVE_BOOT_COMPLETED
godot.REBOOT
godot.READ_USER_DICTIONARY
godot.READ_SYNC_STATS
godot.READ_SYNC_SETTINGS
godot.READ_SOCIAL_STREAM
godot.READ_SMS
godot.READ_PROFILE
godot.READ_PHONE_STATE
godot.READ_LOGS
godot.READ_INPUT_STATE
godot.READ_HISTORY_BOOKMARKS
godot.READ_FRAME_BUFFER
godot.READ_EXTERNAL_STORAGE
godot.READ_CONTACTS
godot.READ_CALL_LOG
godot.READ_CALENDAR
godot.PROCESS_OUTGOING_CALLS
godot.PERSISTENT_ACTIVITY
godot.NFC
godot.MOUNT_UNMOUNT_FILESYSTEMS
godot.MOUNT_FORMAT_FILESYSTEMS
godot.MODIFY_PHONE_STATE
godot.MODIFY_AUDIO_SETTINGS
godot.MEDIA_CONTENT_CONTROL
godot.MASTER_CLEAR
godot.MANAGE_DOCUMENTS
godot.MANAGE_APP_TOKENS
godot.MANAGE_ACCOUNTS
godot.LOCATION_HARDWARE
godot.KILL_BACKGROUND_PROCESSES
godot.INTERNET
godot.INTERNAL_SYSTEM_WINDOW

… the list goes on
what can I do for solving this problem?

I read somewhere I must use apk tool and modify android_debug.apk and android_release.apk manifests and export project again and this time the unwanted permissons must removed!
I dont know is it true or not but I`m going to do that.

mrmrn | 2016-03-08 16:21

:bust_in_silhouette: Reply From: neikeq

Are you sure these permission are disabled in the Android Export options?
Export → Android → Permissions
If the permissions are disabled in the options but you still get that message, then it may be a bug to report in the issue tracker.

It may also be related to this issue: All Uses-Permission (AndroidManifest) was written. Can't be changed via Editor · Issue #1813 · godotengine/godot · GitHub

thank you dearneikeq
yes, all the permissions are off in export menu.
when I want to install it on my device it needs no permission but the market says r\that all the permissins are needed for your package!

mrmrn | 2016-03-08 14:49

:bust_in_silhouette: Reply From: volzhs

Godot android template has all kinds of permission by default.
But, actually, the permission name is not right, so it’s ignored when run.
If you enable a permission, godot will change permission name properly.

disabled permission > godot.ACCESS_WIFI_STATE
enabled permission > android.permission.ACCESS_WIFI_STATE

If you really need to remove all the permissions,
you need to make android template your own.

There is a platform/android/AndroidManifest.xml.template,
and you can see all permissions there.
remove all unwanted permissions, and make android template and use it.

I didn’t try this (remove permission placeholder). but I guess it will work…

volzhs | 2016-03-08 14:12

However if it shows them as requested permissions on the Play Store, that’s kind of annoying. I personally avoid any app that requires more permissions than I deem necessary, so I would be annoyed by Godot apps telling me that they need 50+ permissions.

Akien | 2016-03-08 14:15

In this issue reduz said Android ignores them. Maybe we should open an issue.

neikeq | 2016-03-08 14:36

dear volzhs, thank you very much.
yes I dont want any permissions, but how to use disabled permission > godot.ACCESS_WIFI_STATE command?

and for my own android template, how can I make it by myself?

mrmrn | 2016-03-08 14:52

@Akien no, wrong permissions are also ignored on the Play Store too.
And app does not ask about wrong permission either.

volzhs | 2016-03-08 14:54

@mrmrn
Just leave it unchecked at Export > Target > Android > Permissions.
and compile thing, see this. Compiling for Android — Godot Engine (latest) documentation in English

volzhs | 2016-03-08 14:57

@volzhs
He said all the permissions were off in the export menu.

neikeq | 2016-03-08 15:50

@volzhs
they are uncheck in Export > Target > Android > Permissions.

mrmrn | 2016-03-08 16:05

mrmrn, how did you solve the issue? I have exactly same problem. After uploading my app Play store says that my app requests 165 permissions…

lukas | 2016-03-25 21:59

method1-You must use apktool and edit all apk files manifests you used for exporting your game.
you must delet all of unused permissions and then export your program again.
then your unused godot permissions will erase from your manifest.

method2-I think you can edit only your final apk ,too. but I used method 1.

mrmrn | 2016-03-26 11:17

@mrmrn
Thanks a lot for answer!
Method1 means that I have to edit AndroidManifest.xml.template in directory platform/android of Godot source and then I have to compile new export templates for Android?

lukas | 2016-03-26 11:39