Thursday, April 22, 2021

Http/1.1 vs Http/2 vs Http/3 on Android

General Differences

As the version upgrades, the new versions support extra compression techniques to increase the network speed.


HTTP/1.1

The most base HTTP version.


HTTP/2

This blog explains well in detail.

Date: Since 2015

Speed improvements through:
- Request multiplexing: Multiple requests for data in parallel over a single TCP connection
- Header compression.
- Binary protocol


HTTP/3

This blog explains well in detail.

Date: Since 2019

QUIC is a network layer protocol implemented over UDP. Simply put, QUIC is an improvement over TCP. On top of TCP, QUIC also provides:
  • Dramatically reduced connection establishment time
  • Improved congestion control
  • Multiplexing without head of line blocking
  • Forward error correction
  • Connection migration



Friday, October 23, 2020

How to detect whether the Notification is turned off by the user or not

Users can turn off the notification from the Android Settings.

Here's how to detect it programmatically.


For Android O+, also need to check the channel you're looking for is turned off.


private fun isNotificationEnabled(context: Context, channelId: String): Boolean {
try {
var enabled = NotificationManagerCompat.from(context).areNotificationsEnabled()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O &&
isChannelBlocked(context, channelId)) {
enabled = false
}
return enabled
} catch (e: Exception) {
}
return false
}


@TargetApi(Build.VERSION_CODES.O)
@RequiresApi(Build.VERSION_CODES.M)
private fun isChannelBlocked(context: Context, channelId: String): Boolean {
try {
val manager = context.getSystemService(NotificationManager::class.java)
val channel = manager.getNotificationChannel(channelId)
return channel != null && channel?.importance == NotificationManager.IMPORTANCE_NONE
} catch (e: Exception) {
}
return false
}

 

Wednesday, February 22, 2017

[Android Permissions] Get list of all available permissions

You can use the adb command to get the list of all available permissions of the phone.

adb shell pm list permissions


However, please note not all permission will be granted just because your app requests them in the AndroidManifest.xml
- Some permissions need to be signed by the system signature key

 The result for the Google Pixel phone (Android 7.1.1) is:
permission:android.permission.REAL_GET_TASKS
permission:android.permission.ACCESS_CACHE_FILESYSTEM
permission:android.permission.REMOTE_AUDIO_PLAYBACK
permission:com.google.android.apps.photos.permission.C2D_MESSAGE
permission:android.permission.REGISTER_WINDOW_MANAGER_LISTENERS
permission:android.permission.INTENT_FILTER_VERIFICATION_AGENT
permission:android.permission.BIND_INCALL_SERVICE
permission:com.google.android.gms.trustagent.framework.model.DATA_CHANGE_NOTIFICATION
permission:android.permission.WRITE_SETTINGS
permission:com.google.android.vending.verifier.ACCESS_VERIFIER
permission:android.permission.CONTROL_KEYGUARD
permission:com.google.android.calendar.permission.C2D_MESSAGE
permission:android.permission.CONFIGURE_WIFI_DISPLAY
permission:android.permission.CONFIGURE_DISPLAY_COLOR_MODE
permission:android.permission.ACCESS_WIMAX_STATE
permission:android.permission.SET_INPUT_CALIBRATION
permission:android.permission.RECOVERY
permission:android.permission.TEMPORARY_ENABLE_ACCESSIBILITY
permission:com.google.android.talk.permission.C2D_MESSAGE
permission:android.permission.SET_PROCESS_LIMIT
permission:com.qualcomm.permission.ATCMD
permission:com.google.android.googlequicksearchbox.permission.C2D_MESSAGE
permission:android.permission.FRAME_STATS
permission:com.google.android.gm.permission.BROADCAST_INTERNAL
permission:com.google.android.gms.permission.APPINDEXING
permission:android.permission.BRICK
permission:com.vzw.APNPERMISSION
permission:android.permission.BIND_PRINT_RECOMMENDATION_SERVICE
permission:com.google.android.videos.permission.MOCK_GCM_RECEIVE
permission:android.permission.RESTART_PACKAGES
permission:android.permission.STORAGE_INTERNAL
permission:android.permission.USE_CREDENTIALS
permission:android.permission.TABLET_MODE
permission:android.permission.BIND_KEYGUARD_APPWIDGET
permission:android.permission.BIND_DEVICE_ADMIN
permission:android.permission.MODIFY_AUDIO_SETTINGS
permission:android.permission.ACCESS_CHECKIN_PROPERTIES
permission:android.permission.KILL_UID
permission:android.permission.SIGNAL_PERSISTENT_PROCESSES
permission:android.permission.BIND_PRINT_SERVICE
permission:android.permission.ACCESS_NOTIFICATION_POLICY
permission:com.android.permission.READ_OMADM_SETTINGS
permission:android.permission.BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE
permission:android.permission.MODIFY_AUDIO_ROUTING
permission:android.permission.RECEIVE_BLUETOOTH_MAP
permission:android.permission.ACCESS_MOCK_LOCATION
permission:com.google.android.apps.enterprise.dmagent.permission.NotificationBroadcastReceiverPermission
permission:android.permission.BIND_VR_LISTENER_SERVICE
permission:android.permission.GET_APP_OPS_STATS
permission:android.permission.RECEIVE_DATA_ACTIVITY_CHANGE
permission:android.permission.GET_PACKAGE_IMPORTANCE
permission:com.google.android.youtube.permission.C2D_MESSAGE
permission:com.vzw.lc.SWITCH_ENV
permission:android.permission.READ_WIFI_CREDENTIAL
permission:android.permission.BIND_DREAM_SERVICE
permission:android.permission.WRITE_GSERVICES
permission:com.android.printspooler.permission.ACCESS_ALL_PRINT_JOBS
permission:android.permission.INSTALL_LOCATION_PROVIDER
permission:com.google.android.voicesearch.AUDIO_FILE_ACCESS
permission:android.permission.MANAGE_ACCOUNTS
permission:android.permission.CONTROL_WIFI_DISPLAY
permission:android.permission.SYSTEM_ALERT_WINDOW
permission:android.permission.BIND_CARRIER_SERVICES
permission:com.google.android.gsf.subscribedfeeds.permission.C2D_MESSAGE
permission:android.permission.BROADCAST_PHONE_ACCOUNT_REGISTRATION
permission:android.permission.START_TASKS_FROM_RECENTS
permission:com.google.android.apps.enterprise.dmagent.permission.AutoRegisterPermission
permission:android.permission.CONTROL_LOCATION_UPDATES
permission:com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE
permission:android.permission.GET_TOP_ACTIVITY_INFO
permission:com.google.android.gms.auth.authzen.permission.DEVICE_SYNC_FINISHED
permission:android.permission.CLEAR_APP_USER_DATA
permission:android.permission.PROVIDE_TRUST_AGENT
permission:android.permission.BROADCAST_CALLLOG_INFO
permission:com.google.android.gms.chromesync.permission.CONTENT_PROVIDER_ACCESS
permission:android.permission.INSTALL_PACKAGES
permission:android.permission.MANAGE_SOUND_TRIGGER
permission:android.permission.SEND_RESPOND_VIA_MESSAGE
permission:com.android.permission.WHITELIST_BLUETOOTH_DEVICE
permission:android.permission.ACCESS_FM_RADIO
permission:com.qti.permission.AUDIO
permission:android.permission.MANAGE_VOICE_KEYPHRASES
permission:android.permission.SHUTDOWN
permission:android.permission.CHANGE_COMPONENT_ENABLED_STATE
permission:com.google.android.gms.permission.CHECKIN_NOW
permission:android.permission.BIND_QUICK_SETTINGS_TILE
permission:android.permission.BIND_TV_INPUT
permission:android.permission.NFC
permission:android.permission.MODIFY_PARENTAL_CONTROLS
permission:android.permission.INTERNAL_SYSTEM_WINDOW
permission:android.permission.PROCESS_PHONE_ACCOUNT_REGISTRATION
permission:android.permission.RETRIEVE_WINDOW_TOKEN
permission:com.google.android.street.permission.C2D_MESSAGE
permission:com.google.android.gms.permission.SEND_ANDROID_PAY_DATA
permission:android.permission.BIND_WALLPAPER
permission:com.verizon.vzwavs.permission.READ
permission:com.im360nytvr.permission.C2D_MESSAGE
permission:android.permission.START_ANY_ACTIVITY
permission:android.permission.CAMERA_SEND_SYSTEM_EVENTS
permission:com.google.android.apps.now.OPT_IN_WIZARD
permission:com.google.android.gms.auth.authzen.permission.GCM_DEVICE_PROXIMITY
permission:android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS
permission:com.google.android.googlequicksearchbox.permission.FINISH_GEL_ACTIVITY
permission:android.permission.GET_PROCESS_STATE_AND_OOM_SCORE
permission:android.permission.BROADCAST_SMS
permission:android.permission.CALL_PRIVILEGED
permission:android.permission.BIND_INTENT_FILTER_VERIFIER
permission:android.permission.MANAGE_APP_TOKENS
permission:android.permission.CHANGE_NETWORK_STATE
permission:android.permission.CAPTURE_TV_INPUT
permission:android.permission.MASTER_CLEAR
permission:android.permission.PERSISTENT_ACTIVITY
permission:android.permission.BIND_TELECOM_CONNECTION_SERVICE
permission:android.permission.WRITE_SYNC_SETTINGS
permission:com.google.android.providers.gsf.permission.WRITE_GSERVICES
permission:android.permission.SET_DEBUG_APP
permission:android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
permission:android.permission.RESET_SHORTCUT_MANAGER_THROTTLING
permission:android.permission.RESET_FINGERPRINT_LOCKOUT
permission:android.permission.RECEIVE_BOOT_COMPLETED
permission:com.qualcomm.permission.QCOM_DIAG
permission:android.permission.LOOP_RADIO
permission:android.permission.GLOBAL_SEARCH_CONTROL
permission:android.permission.SUBSCRIBED_FEEDS_READ
permission:com.google.android.gms.auth.permission.POST_SIGN_IN_ACCOUNT
permission:android.permission.PEERS_MAC_ADDRESS
permission:android.permission.DEVICE_POWER
permission:com.google.android.providers.settings.permission.READ_GSETTINGS
permission:com.google.android.apps.enterprise.dmagent.permission.InvokeDMSecurityLogsServicePermission
permission:com.google.android.gms.cloudsave.BIND_EVENT_BROADCAST
permission:com.android.vending.permission.C2D_MESSAGE
permission:com.qualcomm.qti.permission.USE_QTI_TELEPHONY_SERVICE
permission:android.permission.SET_TIME_ZONE
permission:android.permission.REMOVE_TASKS
permission:wsj.reader_sp.permission.RECEIVE_ADM_MESSAGE
permission:com.google.android.googlequicksearchbox.permission.PAUSE_HOTWORD
permission:android.permission.EXPAND_STATUS_BAR
permission:com.android.launcher.permission.UNINSTALL_SHORTCUT
permission:android.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS
permission:com.google.android.gms.permission.REPORT_TAP
permission:android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
permission:android.permission.READ_PROFILE
permission:android.permission.BIND_VOICE_INTERACTION
permission:com.google.android.marvin.feedback.permission.TALKBACK
permission:android.permission.BLUETOOTH
permission:android.permission.BROADCAST_WAP_PUSH
permission:android.permission.CHANGE_WIFI_MULTICAST_STATE
permission:com.google.android.onetimeinitializer.permission.ONE_TIME_INITIALIZED
permission:android.permission.DVB_DEVICE
permission:android.permission.PERFORM_SIM_ACTIVATION
permission:com.android.alarm.permission.SET_ALARM
permission:android.permission.CAPTURE_AUDIO_HOTWORD
permission:android.permission.WRITE_MEDIA_STORAGE
permission:com.android.voicemail.permission.READ_VOICEMAIL
permission:android.permission.WRITE_BLOCKED_NUMBERS
permission:com.qualcomm.permission.USE_QCRIL_MSG_TUNNEL
permission:android.permission.SET_ANIMATION_SCALE
permission:com.google.android.gms.permission.AD_ID_NOTIFICATION
permission:com.android.vending.setup.PLAY_SETUP_SERVICE
permission:android.permission.GET_TASKS
permission:android.permission.BROADCAST_NETWORK_PRIVILEGED
permission:android.permission.ACCESS_SURFACE_FLINGER
permission:android.permission.SUBSCRIBED_FEEDS_WRITE
permission:com.google.android.googleapps.permission.ACCESS_GOOGLE_PASSWORD
permission:android.permission.AUTHENTICATE_ACCOUNTS
permission:android.permission.INTERNET
permission:android.permission.TV_INPUT_HARDWARE
permission:com.android.vending.INTENT_VENDING_ONLY
permission:android.permission.TRANSMIT_IR
permission:com.google.android.gms.permission.C2D_MESSAGE
permission:android.permission.RETRIEVE_WINDOW_CONTENT
permission:com.android.permission.CONNMO_SETTINGS
permission:com.shakingearthdigital.vrsecardboard.permission.C2D_MESSAGE
permission:android.permission.REORDER_TASKS
permission:com.android.browser.permission.READ_HISTORY_BOOKMARKS
permission:android.permission.GET_INTENT_SENDER_INTENT
permission:com.android.chrome.permission.CHILD_SERVICE
permission:com.google.android.apps.gcs.permission.BROADCAST_NETWORK_SCORES
permission:com.google.android.videos.permission.C2D_MESSAGE
permission:android.permission.BLUETOOTH_ADMIN
permission:android.permission.CONTROL_VPN
permission:android.permission.UPDATE_DEVICE_STATS
permission:android.permission.BLUETOOTH_STACK
permission:android.permission.BLUETOOTH_MAP
permission:android.permission.READ_PRECISE_PHONE_STATE
permission:com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION
permission:com.google.android.gms.magictether.permission.CONNECTED_HOST_CHANGED
permission:android.permission.MANAGE_FINGERPRINT
permission:com.google.android.partnersetup.permission.UPDATE_CLIENT_ID
permission:com.google.android.gms.permission.CONTACTS_SYNC_DELEGATION
permission:android.permission.NET_ADMIN
permission:com.google.android.gms.permission.GAMES_DEBUG_SETTINGS
permission:android.permission.CARRIER_FILTER_SMS
permission:com.google.android.gms.WRITE_VERIFY_APPS_CONSENT
permission:android.permission.PERFORM_CDMA_PROVISIONING
permission:com.google.android.gms.trustagent.permission.TRUSTAGENT_STATE
permission:android.permission.BIND_CONNECTION_SERVICE
permission:com.verizon.api.ACCESS
permission:android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS
permission:android.permission.WRITE_SOCIAL_STREAM
permission:android.permission.LAUNCH_TRUST_AGENT_SETTINGS
permission:android.permission.REGISTER_CALL_PROVIDER
permission:android.permission.GET_PACKAGE_SIZE
permission:android.permission.CLEAR_APP_GRANTED_URI_PERMISSIONS
permission:android.permission.BIND_VPN_SERVICE
permission:android.permission.TRUST_LISTENER
permission:android.permission.ACCOUNT_MANAGER
permission:android.permission.MANAGE_USB
permission:com.google.android.partnersetup.permission.WRITE_APP_PROVIDER
permission:android.permission.ACCESS_ALL_DOWNLOADS
permission:android.permission.INTERACT_ACROSS_USERS_FULL
permission:android.permission.BIND_APPWIDGET
permission:android.permission.STOP_APP_SWITCHES
permission:android.permission.RECEIVE_MEDIA_RESOURCE_USAGE
permission:android.permission.BATTERY_STATS
permission:com.google.android.gms.permission.INTERNAL_BROADCAST
permission:android.permission.PACKAGE_USAGE_STATS
permission:android.permission.WRITE_PROFILE
permission:android.permission.MOUNT_UNMOUNT_FILESYSTEMS
permission:android.permission.GET_ACCOUNTS_PRIVILEGED
permission:android.permission.TETHER_PRIVILEGED
permission:android.permission.WRITE_SECURE_SETTINGS
permission:com.android.vending.TOS_ACKED
permission:android.permission.SERIAL_PORT
permission:android.permission.BIND_NOTIFICATION_LISTENER_SERVICE
permission:android.permission.BIND_SCREENING_SERVICE
permission:com.google.android.apps.gcs.WRITE_EXPERIMENTS
permission:android.permission.CAPTURE_AUDIO_OUTPUT
permission:android.permission.BIND_MIDI_DEVICE_SERVICE
permission:android.permission.MOVE_PACKAGE
permission:android.permission.SET_ACTIVITY_WATCHER
permission:android.permission.READ_BLOCKED_NUMBERS
permission:com.google.android.apps.wallpaper.NOTIFY_ROTATING_WALLPAPER_CHANGED
permission:android.permission.STATUS_BAR_SERVICE
permission:com.google.android.gms.apps.helprtc.INTERNAL_BROADCAST
permission:android.permission.READ_SEARCH_INDEXABLES
permission:com.android.permission.WRITE_OMADM_SETTINGS
permission:android.permission.NFC_HANDOVER_STATUS
permission:android.permission.SCORE_NETWORKS
permission:android.permission.DIAGNOSTIC
permission:android.permission.ACCESS_LOCATION_EXTRA_COMMANDS
permission:android.permission.RECEIVE_WIFI_CREDENTIAL_CHANGE
permission:android.permission.READ_PRIVILEGED_PHONE_STATE
permission:android.permission.UPDATE_LOCK_TASK_PACKAGES
permission:android.permission.ACCESS_DOWNLOAD_MANAGER
permission:android.permission.BROADCAST_STICKY
permission:com.google.android.gms.magictether.permission.TEST_NOTIFICATION
permission:android.permission.ASEC_ACCESS
permission:android.permission.BIND_REMOTE_DISPLAY
permission:android.permission.BLUETOOTH_PRIVILEGED
permission:com.google.android.gms.permission.CAR
permission:android.permission.SET_ALWAYS_FINISH
permission:wsj.reader_sp.permission.C2D_MESSAGE
permission:android.permission.HARDWARE_TEST
permission:android.permission.BIND_NOTIFICATION_RANKER_SERVICE
permission:com.google.android.videos.permission.INVALIDATE_AUTH_TOKENS
permission:android.permission.ASEC_CREATE
permission:com.google.android.apps.enterprise.dmagent.permission.AutoSyncPermission
permission:com.google.android.apps.enterprise.dmagent.permission.InvokeDMServicePermission
permission:android.permission.WRITE_SMS
permission:android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME
permission:com.qualcomm.qti.permission.ACCESS_USER_AUTHENTICATION_APIS
permission:android.intent.category.MASTER_CLEAR.permission.C2D_MESSAGE
permission:android.permission.ACCESS_KEYGUARD_SECURE_STORAGE
permission:android.permission.BIND_JOB_SERVICE
permission:android.permission.CONFIRM_FULL_BACKUP
permission:android.permission.CAPTURE_SECURE_VIDEO_OUTPUT
permission:android.permission.SET_TIME
permission:android.permission.WRITE_APN_SETTINGS
permission:com.google.android.providers.settings.permission.WRITE_GSETTINGS
permission:android.permission.CHANGE_WIFI_STATE
permission:com.android.permission.INJECT_OMADM_SETTINGS
permission:com.google.android.apps.gcs.RECEIVE_GCS_STATE
permission:android.permission.BIND_PACKAGE_VERIFIER
permission:android.permission.READ_INSTALL_SESSIONS
permission:android.permission.MODIFY_CELL_BROADCASTS
permission:android.permission.MODIFY_DAY_NIGHT_MODE
permission:android.permission.BIND_ROUTE_PROVIDER
permission:android.permission.RECEIVE_STK_COMMANDS
permission:android.permission.GET_PASSWORD
permission:android.permission.BIND_CARRIER_MESSAGING_SERVICE
permission:android.permission.ACCESS_BLUETOOTH_SHARE
permission:android.permission.PACKAGE_VERIFICATION_AGENT
permission:com.google.android.apps.maps.permission.PREFETCH
permission:android.permission.SET_ORIENTATION
permission:android.permission.REVOKE_RUNTIME_PERMISSIONS
permission:wsj.reader_sp.permission.UA_DATA
permission:android.permission.MANAGE_USERS
permission:com.android.vending.billing.BILLING_ACCOUNT_SERVICE
permission:com.qti.permission.DIAG
permission:com.google.android.gm.email.permission.ACCESS_PROVIDER
permission:com.android.ims.permission.PRESENCE_ACCESS
permission:android.permission.SET_PREFERRED_APPLICATIONS
permission:android.permission.BIND_TV_REMOTE_SERVICE
permission:android.permission.FLASHLIGHT
permission:android.permission.DELETE_CACHE_FILES
permission:com.verizon.vzwavs.permission.WRITE
permission:com.google.android.hangouts.START_HANGOUT
permission:android.permission.SET_WALLPAPER_COMPONENT
permission:android.permission.ACCESS_NETWORK_STATE
permission:android.permission.BIND_CONDITION_PROVIDER_SERVICE
permission:android.permission.ACCESS_MTP
permission:android.permission.DISABLE_KEYGUARD
permission:android.permission.BACKUP
permission:android.permission.PROCESS_CALLLOG_INFO
permission:android.permission.CHANGE_CONFIGURATION
permission:android.permission.USER_ACTIVITY
permission:android.permission.LOCAL_MAC_ADDRESS
permission:com.google.android.gms.permission.SHOW_PAYMENT_CARD_DETAILS
permission:android.permission.READ_LOGS
permission:com.google.android.apps.maps.permission.C2D_MESSAGE
permission:android.permission.COPY_PROTECTED_DATA
permission:com.google.android.gms.magictether.permission.SCANNED_DEVICE
permission:android.permission.ASEC_DESTROY
permission:android.permission.INTERACT_ACROSS_USERS
permission:android.permission.SET_WALLPAPER
permission:android.permission.ASEC_RENAME
permission:com.android.ims.rcs.permission.STATUS_CHANGED
permission:android.permission.SET_KEYBOARD_LAYOUT
permission:android.permission.UPDATE_CONFIG
permission:android.permission.ACCESS_NETWORK_CONDITIONS
permission:com.verizon.ACCESS_VZW_ACCOUNT
permission:android.permission.READ_DREAM_STATE
permission:android.permission.QUERY_DO_NOT_ASK_CREDENTIALS_ON_BOOT
permission:com.google.android.launcher.permission.RECEIVE_FIRST_LOAD_BROADCAST
permission:android.permission.UPDATE_LOCK
permission:android.permission.READ_NETWORK_USAGE_HISTORY
permission:android.permission.ACCESS_DRM_CERTIFICATES
permission:com.google.android.gsf.permission.C2D_MESSAGE
permission:com.google.android.googlequicksearchbox.permission.FLUSH_LOGS
permission:android.permission.TV_VIRTUAL_REMOTE_CONTROLLER
permission:android.permission.MANAGE_APP_OPS_RESTRICTIONS
permission:android.permission.READ_INPUT_STATE
permission:android.permission.KILL_BACKGROUND_PROCESSES
permission:android.permission.CACHE_CONTENT
permission:android.permission.ACCESS_VOICE_INTERACTION_SERVICE
permission:android.permission.BIND_PRINT_SPOOLER_SERVICE
permission:android.permission.BIND_DIRECTORY_SEARCH
permission:android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS
permission:com.google.android.gms.permission.GRANT_WALLPAPER_PERMISSIONS
permission:android.permission.WRITE_USER_DICTIONARY
permission:com.android.rcs.eab.permission.READ_WRITE_EAB
permission:android.permission.REGISTER_SIM_SUBSCRIPTION
permission:android.permission.READ_SYNC_STATS
permission:android.permission.WRITE_DREAM_STATE
permission:android.permission.FREEZE_SCREEN
permission:broadcast.cne.permission
permission:android.permission.DOWNLOAD_CACHE_NON_PURGEABLE
permission:com.google.android.dialer.permission.C2D_MESSAGE
permission:android.permission.REBOOT
permission:android.permission.DISPATCH_NFC_MESSAGE
permission:com.google.android.gms.chimera.permission.CONFIG_CHANGE
permission:com.google.android.gms.auth.permission.FACE_UNLOCK
permission:android.permission.MOUNT_FORMAT_FILESYSTEMS
permission:android.permission.OEM_UNLOCK_STATE
permission:android.permission.REGISTER_CONNECTION_MANAGER
permission:android.permission.MANAGE_DEVICE_ADMINS
permission:android.permission.CLEAR_APP_CACHE
permission:android.permission.CHANGE_APP_IDLE_STATE
permission:com.google.android.gms.auth.permission.GOOGLE_ACCOUNT_CHANGE
permission:com.google.android.gms.trustagent.framework.model.DATA_ACCESS
permission:android.permission.BIND_TRUST_AGENT
permission:com.google.android.apps.tycho.permission.SWITCHING_BROADCAST
permission:android.permission.MANAGE_DOCUMENTS
permission:android.permission.ACCESS_PDB_STATE
permission:android.permission.MANAGE_NETWORK_POLICY
permission:android.permission.BIND_REMOTEVIEWS
permission:com.google.android.apps.gcs.permission.RECEIVE_NETWORK_SCORES
permission:android.permission.ASEC_MOUNT_UNMOUNT
permission:android.permission.GRANT_RUNTIME_PERMISSIONS
permission:android.permission.SET_POINTER_SPEED
permission:android.permission.CHANGE_BACKGROUND_DATA_SETTING
permission:android.permission.MANAGE_NOTIFICATIONS
permission:com.sand.airdroid.permission.C2D_MESSAGE
permission:com.android.systemui.permission.SELF
permission:com.android.chrome.TOS_ACKED
permission:android.permission.GLOBAL_SEARCH
permission:com.google.android.apps.tycho.WRITE_EXPERIMENTS
permission:android.permission.NET_TUNNELING
permission:android.permission.CONNECTIVITY_INTERNAL
permission:android.permission.FACTORY_TEST
permission:android.permission.SET_WALLPAPER_HINTS
permission:android.permission.MANAGE_MEDIA_PROJECTION
permission:android.permission.READ_SYNC_SETTINGS
permission:com.google.android.gms.permission.SHOW_TRANSACTION_RECEIPT
permission:com.google.android.apps.now.CURRENT_ACCOUNT_ACCESS
permission:com.google.android.partnersetup.permission.ACCESS_PROVIDER
permission:com.android.browser.permission.WRITE_HISTORY_BOOKMARKS
permission:com.android.chrome.permission.C2D_MESSAGE
permission:android.permission.BROADCAST_PACKAGE_REMOVED
permission:android.permission.OVERRIDE_WIFI_CONFIG
permission:android.permission.FORCE_STOP_PACKAGES
permission:android.permission.MANAGE_CA_CERTIFICATES
permission:com.qualcomm.qti.permission.RADIO_CONFIG_INTERFACE
permission:android.permission.CAPTURE_VIDEO_OUTPUT
permission:android.permission.ACCESS_NOTIFICATIONS
permission:android.permission.VIBRATE
permission:com.android.certinstaller.INSTALL_AS_USER
permission:com.google.android.gsf.permission.CONNECTION
permission:android.permission.BIND_ACCESSIBILITY_SERVICE
permission:android.server.checkin.CHECKIN.permission.C2D_MESSAGE
permission:android.permission.MANAGE_ACTIVITY_STACKS
permission:android.permission.SEND_CALL_LOG_CHANGE
permission:com.google.android.music.permission.C2D_MESSAGE
permission:android.permission.HDMI_CEC
permission:android.permission.BIND_INPUT_METHOD
permission:android.permission.INVOKE_CARRIER_SETUP
permission:android.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST
permission:android.permission.REMOVE_DRM_CERTIFICATES
permission:com.google.android.googleapps.permission.GOOGLE_MAIL_SWITCH
permission:android.permission.READ_USER_DICTIONARY
permission:android.permission.FILTER_EVENTS
permission:com.google.android.gms.permission.SAFETY_NET
permission:android.permission.RECEIVE_EMERGENCY_BROADCAST
permission:com.google.android.apps.tycho.permission.C2D_MESSAGE
permission:com.google.android.finsky.permission.GEARHEAD_SERVICE
permission:android.permission.CREATE_USERS
permission:com.google.android.gms.googlehelp.LAUNCH_SUPPORT_SCREENSHARE
permission:android.permission.MODIFY_NETWORK_ACCOUNTING
permission:com.google.android.gms.common.internal.SHARED_PREFERENCES_PERMISSION
permission:android.permission.CRYPT_KEEPER
permission:android.permission.BIND_NFC_SERVICE
permission:android.permission.START_PRINT_SERVICE_CONFIG_ACTIVITY
permission:com.android.voicemail.permission.WRITE_VOICEMAIL
permission:com.google.android.gms.permission.SHOW_WARM_WELCOME_TAPANDPAY_APP
permission:android.permission.GET_DETAILED_TASKS
permission:android.permission.NOTIFY_PENDING_SYSTEM_UPDATE
permission:android.permission.DISPATCH_PROVISIONING_MESSAGE
permission:android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK
permission:android.permission.MODIFY_APPWIDGET_BIND_PERMISSIONS
permission:com.google.andorid.gms.chimera.permission.QUERY_MODULES
permission:android.permission.ACCESS_WIFI_STATE
permission:com.google.android.apps.enterprise.dmagent.permission.C2D_MESSAGE
permission:com.google.android.gms.permission.BROADCAST_TO_GOOGLEHELP
permission:com.google.android.gms.permission.READ_VALUABLES_IMAGES
permission:android.permission.FORCE_BACK
permission:com.android.chrome.permission.READ_WRITE_BOOKMARK_FOLDERS
permission:com.google.android.launcher.permission.RECEIVE_LAUNCH_BROADCASTS
permission:android.permission.CHANGE_WIMAX_STATE
permission:com.google.android.gms.auth.authzen.permission.KEY_REGISTRATION_FINISHED
permission:android.permission.CAMERA_DISABLE_TRANSMIT_LED
permission:android.permission.REQUEST_INSTALL_PACKAGES
permission:android.permission.CONTROL_INCALL_EXPERIENCE
permission:android.permission.MODIFY_PHONE_STATE
permission:com.google.android.gm.email.permission.GET_WIDGET_UPDATE
permission:android.permission.ACCESS_VR_MANAGER
permission:com.google.android.gm.email.permission.UPDATE_AUTH_NOTIFICATION
permission:com.google.android.googlequicksearchbox.LAUNCH_FROM_DSP_HOTWORD
permission:android.permission.PACKET_KEEPALIVE_OFFLOAD
permission:com.android.launcher.permission.INSTALL_SHORTCUT
permission:android.permission.BIND_TEXT_SERVICE
permission:android.permission.STATUS_BAR
permission:android.permission.READ_FRAME_BUFFER
permission:android.permission.SEND_SMS_NO_CONFIRMATION
permission:com.google.android.gms.DRIVE
permission:com.qualcomm.permission.QCOM_AUDIO
permission:android.permission.DUMP
permission:com.qualcomm.permission.QCOM_RADIO
permission:android.permission.GET_APP_GRANTED_URI_PERMISSIONS
permission:android.permission.LOCATION_HARDWARE
permission:com.google.android.marvin.talkback.permission.LABELING
permission:com.google.android.googlequicksearchbox.LAUNCH_WITH_RECORDED_AUDIO
permission:android.permission.READ_SOCIAL_STREAM
permission:android.permission.WAKE_LOCK
permission:android.permission.INJECT_EVENTS
permission:android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
permission:android.permission.BIND_CHOOSER_TARGET_SERVICE
permission:android.permission.UPDATE_APP_OPS_STATS
permission:android.permission.ACCESS_EPHEMERAL_APPS
permission:android.permission.ACCESS_INPUT_FLINGER
permission:android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS
permission:android.permission.READ_OEM_UNLOCK_STATE
permission:com.android.vending.billing.ADD_CREDIT_CARD
permission:com.google.android.apps.docs.permission.C2D_MESSAGE
permission:android.permission.SET_SCREEN_COMPATIBILITY
permission:com.android.vending.billing.IN_APP_NOTIFY.permission.C2D_MESSAGE
permission:android.permission.MEDIA_CONTENT_CONTROL
permission:android.permission.DELETE_PACKAGES
permission:com.google.android.gms.magictether.permission.DISABLE_SOFT_AP
permission:com.google.android.calendar.permission.READ_OOBE
permission:com.google.android.gms.chromesync.permission.METADATA_UPDATED




You can group permissions by following command:
adb shell pm list permissions

Result:
All Permissions:

group:com.google.android.gms.permission.CAR_INFORMATION
  permission:com.google.android.gms.permission.CAR_VENDOR_EXTENSION
  permission:com.google.android.gms.permission.CAR_MILEAGE
  permission:com.google.android.gms.permission.CAR_FUEL

group:android.permission-group.CONTACTS
  permission:android.permission.WRITE_CONTACTS
  permission:android.permission.GET_ACCOUNTS
  permission:android.permission.READ_CONTACTS

group:android.permission-group.PHONE
  permission:android.permission.READ_CALL_LOG
  permission:android.permission.ACCESS_UCE_OPTIONS_SERVICE
  permission:android.permission.READ_PHONE_STATE
  permission:android.permission.ACCESS_IMS_CALL_SERVICE
  permission:android.permission.CALL_PHONE
  permission:android.permission.ACCESS_UCE_PRESENCE_SERVICE
  permission:android.permission.WRITE_CALL_LOG
  permission:android.permission.USE_SIP
  permission:android.permission.PROCESS_OUTGOING_CALLS
  permission:com.android.voicemail.permission.ADD_VOICEMAIL

group:android.permission-group.CALENDAR
  permission:android.permission.READ_CALENDAR
  permission:android.permission.WRITE_CALENDAR

group:android.permission-group.CAMERA
  permission:android.permission.CAMERA

group:android.permission-group.SENSORS
  permission:android.permission.BODY_SENSORS
  permission:android.permission.USE_FINGERPRINT

group:android.permission-group.LOCATION
  permission:android.permission.ACCESS_FINE_LOCATION
  permission:com.google.android.gms.permission.CAR_SPEED
  permission:android.permission.ACCESS_COARSE_LOCATION

group:android.permission-group.STORAGE
  permission:android.permission.READ_EXTERNAL_STORAGE
  permission:android.permission.WRITE_EXTERNAL_STORAGE

group:android.permission-group.MICROPHONE
  permission:android.permission.RECORD_AUDIO

group:android.permission-group.SMS
  permission:android.permission.READ_SMS
  permission:android.permission.RECEIVE_WAP_PUSH
  permission:android.permission.RECEIVE_MMS
  permission:android.permission.RECEIVE_SMS
  permission:android.permission.SEND_SMS
  permission:android.permission.READ_CELL_BROADCASTS

ungrouped:
  permission:android.permission.REAL_GET_TASKS
  permission:android.permission.ACCESS_CACHE_FILESYSTEM
  permission:android.permission.REMOTE_AUDIO_PLAYBACK
  permission:com.google.android.apps.photos.permission.C2D_MESSAGE
  permission:android.permission.REGISTER_WINDOW_MANAGER_LISTENERS
  permission:android.permission.INTENT_FILTER_VERIFICATION_AGENT
  permission:android.permission.BIND_INCALL_SERVICE
  permission:com.google.android.gms.trustagent.framework.model.DATA_CHANGE_NOTIFICATION
  permission:android.permission.WRITE_SETTINGS
  permission:com.google.android.vending.verifier.ACCESS_VERIFIER
  permission:android.permission.CONTROL_KEYGUARD
  permission:com.google.android.calendar.permission.C2D_MESSAGE
  permission:android.permission.CONFIGURE_WIFI_DISPLAY
  permission:android.permission.CONFIGURE_DISPLAY_COLOR_MODE
  permission:android.permission.ACCESS_WIMAX_STATE
  permission:android.permission.SET_INPUT_CALIBRATION
  permission:android.permission.RECOVERY
  permission:android.permission.TEMPORARY_ENABLE_ACCESSIBILITY
  permission:com.google.android.talk.permission.C2D_MESSAGE
  permission:android.permission.SET_PROCESS_LIMIT
  permission:com.qualcomm.permission.ATCMD
  permission:com.google.android.googlequicksearchbox.permission.C2D_MESSAGE
  permission:android.permission.FRAME_STATS
  permission:com.google.android.gm.permission.BROADCAST_INTERNAL
  permission:com.google.android.gms.permission.APPINDEXING
  permission:android.permission.BRICK
  permission:com.vzw.APNPERMISSION
  permission:android.permission.BIND_PRINT_RECOMMENDATION_SERVICE
  permission:com.google.android.videos.permission.MOCK_GCM_RECEIVE
  permission:android.permission.RESTART_PACKAGES
  permission:android.permission.STORAGE_INTERNAL
  permission:android.permission.USE_CREDENTIALS
  permission:android.permission.TABLET_MODE
  permission:android.permission.BIND_KEYGUARD_APPWIDGET
  permission:android.permission.BIND_DEVICE_ADMIN
  permission:android.permission.MODIFY_AUDIO_SETTINGS
  permission:android.permission.ACCESS_CHECKIN_PROPERTIES
  permission:android.permission.KILL_UID
  permission:android.permission.SIGNAL_PERSISTENT_PROCESSES
  permission:android.permission.BIND_PRINT_SERVICE
  permission:android.permission.ACCESS_NOTIFICATION_POLICY
  permission:com.android.permission.READ_OMADM_SETTINGS
  permission:android.permission.BIND_RUNTIME_PERMISSION_PRESENTER_SERVICE
  permission:android.permission.MODIFY_AUDIO_ROUTING
  permission:android.permission.RECEIVE_BLUETOOTH_MAP
  permission:android.permission.ACCESS_MOCK_LOCATION
  permission:com.google.android.apps.enterprise.dmagent.permission.NotificationBroadcastReceiverPermission
  permission:android.permission.BIND_VR_LISTENER_SERVICE
  permission:android.permission.GET_APP_OPS_STATS
  permission:android.permission.RECEIVE_DATA_ACTIVITY_CHANGE
  permission:android.permission.GET_PACKAGE_IMPORTANCE
  permission:com.google.android.youtube.permission.C2D_MESSAGE
  permission:com.vzw.lc.SWITCH_ENV
  permission:android.permission.READ_WIFI_CREDENTIAL
  permission:android.permission.BIND_DREAM_SERVICE
  permission:android.permission.WRITE_GSERVICES
  permission:com.android.printspooler.permission.ACCESS_ALL_PRINT_JOBS
  permission:android.permission.INSTALL_LOCATION_PROVIDER
  permission:com.google.android.voicesearch.AUDIO_FILE_ACCESS
  permission:android.permission.MANAGE_ACCOUNTS
  permission:android.permission.CONTROL_WIFI_DISPLAY
  permission:android.permission.SYSTEM_ALERT_WINDOW
  permission:android.permission.BIND_CARRIER_SERVICES
  permission:com.google.android.gsf.subscribedfeeds.permission.C2D_MESSAGE
  permission:android.permission.BROADCAST_PHONE_ACCOUNT_REGISTRATION
  permission:android.permission.START_TASKS_FROM_RECENTS
  permission:com.google.android.apps.enterprise.dmagent.permission.AutoRegisterPermission
  permission:android.permission.CONTROL_LOCATION_UPDATES
  permission:com.google.android.gms.permission.BIND_NETWORK_TASK_SERVICE
  permission:android.permission.GET_TOP_ACTIVITY_INFO
  permission:com.google.android.gms.auth.authzen.permission.DEVICE_SYNC_FINISHED
  permission:android.permission.CLEAR_APP_USER_DATA
  permission:android.permission.PROVIDE_TRUST_AGENT
  permission:android.permission.BROADCAST_CALLLOG_INFO
  permission:com.google.android.gms.chromesync.permission.CONTENT_PROVIDER_ACCESS
  permission:android.permission.INSTALL_PACKAGES
  permission:android.permission.MANAGE_SOUND_TRIGGER
  permission:android.permission.SEND_RESPOND_VIA_MESSAGE
  permission:com.android.permission.WHITELIST_BLUETOOTH_DEVICE
  permission:android.permission.ACCESS_FM_RADIO
  permission:com.qti.permission.AUDIO
  permission:android.permission.MANAGE_VOICE_KEYPHRASES
  permission:android.permission.SHUTDOWN
  permission:android.permission.CHANGE_COMPONENT_ENABLED_STATE
  permission:com.google.android.gms.permission.CHECKIN_NOW
  permission:android.permission.BIND_QUICK_SETTINGS_TILE
  permission:android.permission.BIND_TV_INPUT
  permission:android.permission.NFC
  permission:android.permission.MODIFY_PARENTAL_CONTROLS
  permission:android.permission.INTERNAL_SYSTEM_WINDOW
  permission:android.permission.PROCESS_PHONE_ACCOUNT_REGISTRATION
  permission:android.permission.RETRIEVE_WINDOW_TOKEN
  permission:com.google.android.street.permission.C2D_MESSAGE
  permission:com.google.android.gms.permission.SEND_ANDROID_PAY_DATA
  permission:android.permission.BIND_WALLPAPER
  permission:com.verizon.vzwavs.permission.READ
  permission:com.im360nytvr.permission.C2D_MESSAGE
  permission:android.permission.START_ANY_ACTIVITY
  permission:android.permission.CAMERA_SEND_SYSTEM_EVENTS
  permission:com.google.android.apps.now.OPT_IN_WIZARD
  permission:com.google.android.gms.auth.authzen.permission.GCM_DEVICE_PROXIMITY
  permission:android.permission.SEND_DOWNLOAD_COMPLETED_INTENTS
  permission:com.google.android.googlequicksearchbox.permission.FINISH_GEL_ACTIVITY
  permission:android.permission.GET_PROCESS_STATE_AND_OOM_SCORE
  permission:android.permission.BROADCAST_SMS
  permission:android.permission.CALL_PRIVILEGED
  permission:android.permission.BIND_INTENT_FILTER_VERIFIER
  permission:android.permission.MANAGE_APP_TOKENS
  permission:android.permission.CHANGE_NETWORK_STATE
  permission:android.permission.CAPTURE_TV_INPUT
  permission:android.permission.MASTER_CLEAR
  permission:android.permission.PERSISTENT_ACTIVITY
  permission:android.permission.BIND_TELECOM_CONNECTION_SERVICE
  permission:android.permission.WRITE_SYNC_SETTINGS
  permission:com.google.android.providers.gsf.permission.WRITE_GSERVICES
  permission:android.permission.SET_DEBUG_APP
  permission:android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
  permission:android.permission.RESET_SHORTCUT_MANAGER_THROTTLING
  permission:android.permission.RESET_FINGERPRINT_LOCKOUT
  permission:android.permission.RECEIVE_BOOT_COMPLETED
  permission:com.qualcomm.permission.QCOM_DIAG
  permission:android.permission.LOOP_RADIO
  permission:android.permission.GLOBAL_SEARCH_CONTROL
  permission:android.permission.SUBSCRIBED_FEEDS_READ
  permission:com.google.android.gms.auth.permission.POST_SIGN_IN_ACCOUNT
  permission:android.permission.PEERS_MAC_ADDRESS
  permission:android.permission.DEVICE_POWER
  permission:com.google.android.providers.settings.permission.READ_GSETTINGS
  permission:com.google.android.apps.enterprise.dmagent.permission.InvokeDMSecurityLogsServicePermission
  permission:com.google.android.gms.cloudsave.BIND_EVENT_BROADCAST
  permission:com.android.vending.permission.C2D_MESSAGE
  permission:com.qualcomm.qti.permission.USE_QTI_TELEPHONY_SERVICE
  permission:android.permission.SET_TIME_ZONE
  permission:android.permission.REMOVE_TASKS
  permission:wsj.reader_sp.permission.RECEIVE_ADM_MESSAGE
  permission:com.google.android.googlequicksearchbox.permission.PAUSE_HOTWORD
  permission:android.permission.EXPAND_STATUS_BAR
  permission:com.android.launcher.permission.UNINSTALL_SHORTCUT
  permission:android.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS
  permission:com.google.android.gms.permission.REPORT_TAP
  permission:android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS
  permission:android.permission.READ_PROFILE
  permission:android.permission.BIND_VOICE_INTERACTION
  permission:com.google.android.marvin.feedback.permission.TALKBACK
  permission:android.permission.BLUETOOTH
  permission:android.permission.BROADCAST_WAP_PUSH
  permission:android.permission.CHANGE_WIFI_MULTICAST_STATE
  permission:com.google.android.onetimeinitializer.permission.ONE_TIME_INITIALIZED
  permission:android.permission.DVB_DEVICE
  permission:android.permission.PERFORM_SIM_ACTIVATION
  permission:com.android.alarm.permission.SET_ALARM
  permission:android.permission.CAPTURE_AUDIO_HOTWORD
  permission:android.permission.WRITE_MEDIA_STORAGE
  permission:com.android.voicemail.permission.READ_VOICEMAIL
  permission:android.permission.WRITE_BLOCKED_NUMBERS
  permission:com.qualcomm.permission.USE_QCRIL_MSG_TUNNEL
  permission:android.permission.SET_ANIMATION_SCALE
  permission:com.google.android.gms.permission.AD_ID_NOTIFICATION
  permission:com.android.vending.setup.PLAY_SETUP_SERVICE
  permission:android.permission.GET_TASKS
  permission:android.permission.BROADCAST_NETWORK_PRIVILEGED
  permission:android.permission.ACCESS_SURFACE_FLINGER
  permission:android.permission.SUBSCRIBED_FEEDS_WRITE
  permission:com.google.android.googleapps.permission.ACCESS_GOOGLE_PASSWORD
  permission:android.permission.AUTHENTICATE_ACCOUNTS
  permission:android.permission.INTERNET
  permission:android.permission.TV_INPUT_HARDWARE
  permission:com.android.vending.INTENT_VENDING_ONLY
  permission:android.permission.TRANSMIT_IR
  permission:com.google.android.gms.permission.C2D_MESSAGE
  permission:android.permission.RETRIEVE_WINDOW_CONTENT
  permission:com.android.permission.CONNMO_SETTINGS
  permission:com.shakingearthdigital.vrsecardboard.permission.C2D_MESSAGE
  permission:android.permission.REORDER_TASKS
  permission:com.android.browser.permission.READ_HISTORY_BOOKMARKS
  permission:android.permission.GET_INTENT_SENDER_INTENT
  permission:com.android.chrome.permission.CHILD_SERVICE
  permission:com.google.android.apps.gcs.permission.BROADCAST_NETWORK_SCORES
  permission:com.google.android.videos.permission.C2D_MESSAGE
  permission:android.permission.BLUETOOTH_ADMIN
  permission:android.permission.CONTROL_VPN
  permission:android.permission.UPDATE_DEVICE_STATS
  permission:android.permission.BLUETOOTH_STACK
  permission:android.permission.BLUETOOTH_MAP
  permission:android.permission.READ_PRECISE_PHONE_STATE
  permission:com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION
  permission:com.google.android.gms.magictether.permission.CONNECTED_HOST_CHANGED
  permission:android.permission.MANAGE_FINGERPRINT
  permission:com.google.android.partnersetup.permission.UPDATE_CLIENT_ID
  permission:com.google.android.gms.permission.CONTACTS_SYNC_DELEGATION
  permission:android.permission.NET_ADMIN
  permission:com.google.android.gms.permission.GAMES_DEBUG_SETTINGS
  permission:android.permission.CARRIER_FILTER_SMS
  permission:com.google.android.gms.WRITE_VERIFY_APPS_CONSENT
  permission:android.permission.PERFORM_CDMA_PROVISIONING
  permission:com.google.android.gms.trustagent.permission.TRUSTAGENT_STATE
  permission:android.permission.BIND_CONNECTION_SERVICE
  permission:com.verizon.api.ACCESS
  permission:android.permission.INSTALL_GRANT_RUNTIME_PERMISSIONS
  permission:android.permission.WRITE_SOCIAL_STREAM
  permission:android.permission.LAUNCH_TRUST_AGENT_SETTINGS
  permission:android.permission.REGISTER_CALL_PROVIDER
  permission:android.permission.GET_PACKAGE_SIZE
  permission:android.permission.CLEAR_APP_GRANTED_URI_PERMISSIONS
  permission:android.permission.BIND_VPN_SERVICE
  permission:android.permission.TRUST_LISTENER
  permission:android.permission.ACCOUNT_MANAGER
  permission:android.permission.MANAGE_USB
  permission:com.google.android.partnersetup.permission.WRITE_APP_PROVIDER
  permission:android.permission.ACCESS_ALL_DOWNLOADS
  permission:android.permission.INTERACT_ACROSS_USERS_FULL
  permission:android.permission.BIND_APPWIDGET
  permission:android.permission.STOP_APP_SWITCHES
  permission:android.permission.RECEIVE_MEDIA_RESOURCE_USAGE
  permission:android.permission.BATTERY_STATS
  permission:com.google.android.gms.permission.INTERNAL_BROADCAST
  permission:android.permission.PACKAGE_USAGE_STATS
  permission:android.permission.WRITE_PROFILE
  permission:android.permission.MOUNT_UNMOUNT_FILESYSTEMS
  permission:android.permission.GET_ACCOUNTS_PRIVILEGED
  permission:android.permission.TETHER_PRIVILEGED
  permission:android.permission.WRITE_SECURE_SETTINGS
  permission:com.android.vending.TOS_ACKED
  permission:android.permission.SERIAL_PORT
  permission:android.permission.BIND_NOTIFICATION_LISTENER_SERVICE
  permission:android.permission.BIND_SCREENING_SERVICE
  permission:com.google.android.apps.gcs.WRITE_EXPERIMENTS
  permission:android.permission.CAPTURE_AUDIO_OUTPUT
  permission:android.permission.BIND_MIDI_DEVICE_SERVICE
  permission:android.permission.MOVE_PACKAGE
  permission:android.permission.SET_ACTIVITY_WATCHER
  permission:android.permission.READ_BLOCKED_NUMBERS
  permission:com.google.android.apps.wallpaper.NOTIFY_ROTATING_WALLPAPER_CHANGED
  permission:android.permission.STATUS_BAR_SERVICE
  permission:com.google.android.gms.apps.helprtc.INTERNAL_BROADCAST
  permission:android.permission.READ_SEARCH_INDEXABLES
  permission:com.android.permission.WRITE_OMADM_SETTINGS
  permission:android.permission.NFC_HANDOVER_STATUS
  permission:android.permission.SCORE_NETWORKS
  permission:android.permission.DIAGNOSTIC
  permission:android.permission.ACCESS_LOCATION_EXTRA_COMMANDS
  permission:android.permission.RECEIVE_WIFI_CREDENTIAL_CHANGE
  permission:android.permission.READ_PRIVILEGED_PHONE_STATE
  permission:android.permission.UPDATE_LOCK_TASK_PACKAGES
  permission:android.permission.ACCESS_DOWNLOAD_MANAGER
  permission:android.permission.BROADCAST_STICKY
  permission:com.google.android.gms.magictether.permission.TEST_NOTIFICATION
  permission:android.permission.ASEC_ACCESS
  permission:android.permission.BIND_REMOTE_DISPLAY
  permission:android.permission.BLUETOOTH_PRIVILEGED
  permission:com.google.android.gms.permission.CAR
  permission:android.permission.SET_ALWAYS_FINISH
  permission:wsj.reader_sp.permission.C2D_MESSAGE
  permission:android.permission.HARDWARE_TEST
  permission:android.permission.BIND_NOTIFICATION_RANKER_SERVICE
  permission:com.google.android.videos.permission.INVALIDATE_AUTH_TOKENS
  permission:android.permission.ASEC_CREATE
  permission:com.google.android.apps.enterprise.dmagent.permission.AutoSyncPermission
  permission:com.google.android.apps.enterprise.dmagent.permission.InvokeDMServicePermission
  permission:android.permission.WRITE_SMS
  permission:android.permission.SUBSTITUTE_NOTIFICATION_APP_NAME
  permission:com.qualcomm.qti.permission.ACCESS_USER_AUTHENTICATION_APIS
  permission:android.intent.category.MASTER_CLEAR.permission.C2D_MESSAGE
  permission:android.permission.ACCESS_KEYGUARD_SECURE_STORAGE
  permission:android.permission.BIND_JOB_SERVICE
  permission:android.permission.CONFIRM_FULL_BACKUP
  permission:android.permission.CAPTURE_SECURE_VIDEO_OUTPUT
  permission:android.permission.SET_TIME
  permission:android.permission.WRITE_APN_SETTINGS
  permission:com.google.android.providers.settings.permission.WRITE_GSETTINGS
  permission:android.permission.CHANGE_WIFI_STATE
  permission:com.android.permission.INJECT_OMADM_SETTINGS
  permission:com.google.android.apps.gcs.RECEIVE_GCS_STATE
  permission:android.permission.BIND_PACKAGE_VERIFIER
  permission:android.permission.READ_INSTALL_SESSIONS
  permission:android.permission.MODIFY_CELL_BROADCASTS
  permission:android.permission.MODIFY_DAY_NIGHT_MODE
  permission:android.permission.BIND_ROUTE_PROVIDER
  permission:android.permission.RECEIVE_STK_COMMANDS
  permission:android.permission.GET_PASSWORD
  permission:android.permission.BIND_CARRIER_MESSAGING_SERVICE
  permission:android.permission.ACCESS_BLUETOOTH_SHARE
  permission:android.permission.PACKAGE_VERIFICATION_AGENT
  permission:com.google.android.apps.maps.permission.PREFETCH
  permission:android.permission.SET_ORIENTATION
  permission:android.permission.REVOKE_RUNTIME_PERMISSIONS
  permission:wsj.reader_sp.permission.UA_DATA
  permission:android.permission.MANAGE_USERS
  permission:com.android.vending.billing.BILLING_ACCOUNT_SERVICE
  permission:com.qti.permission.DIAG
  permission:com.google.android.gm.email.permission.ACCESS_PROVIDER
  permission:com.android.ims.permission.PRESENCE_ACCESS
  permission:android.permission.SET_PREFERRED_APPLICATIONS
  permission:android.permission.BIND_TV_REMOTE_SERVICE
  permission:android.permission.FLASHLIGHT
  permission:android.permission.DELETE_CACHE_FILES
  permission:com.verizon.vzwavs.permission.WRITE
  permission:com.google.android.hangouts.START_HANGOUT
  permission:android.permission.SET_WALLPAPER_COMPONENT
  permission:android.permission.ACCESS_NETWORK_STATE
  permission:android.permission.BIND_CONDITION_PROVIDER_SERVICE
  permission:android.permission.ACCESS_MTP
  permission:android.permission.DISABLE_KEYGUARD
  permission:android.permission.BACKUP
  permission:android.permission.PROCESS_CALLLOG_INFO
  permission:android.permission.CHANGE_CONFIGURATION
  permission:android.permission.USER_ACTIVITY
  permission:android.permission.LOCAL_MAC_ADDRESS
  permission:com.google.android.gms.permission.SHOW_PAYMENT_CARD_DETAILS
  permission:android.permission.READ_LOGS
  permission:com.google.android.apps.maps.permission.C2D_MESSAGE
  permission:android.permission.COPY_PROTECTED_DATA
  permission:com.google.android.gms.magictether.permission.SCANNED_DEVICE
  permission:android.permission.ASEC_DESTROY
  permission:android.permission.INTERACT_ACROSS_USERS
  permission:android.permission.SET_WALLPAPER
  permission:android.permission.ASEC_RENAME
  permission:com.android.ims.rcs.permission.STATUS_CHANGED
  permission:android.permission.SET_KEYBOARD_LAYOUT
  permission:android.permission.UPDATE_CONFIG
  permission:android.permission.ACCESS_NETWORK_CONDITIONS
  permission:com.verizon.ACCESS_VZW_ACCOUNT
  permission:android.permission.READ_DREAM_STATE
  permission:android.permission.QUERY_DO_NOT_ASK_CREDENTIALS_ON_BOOT
  permission:com.google.android.launcher.permission.RECEIVE_FIRST_LOAD_BROADCAST
  permission:android.permission.UPDATE_LOCK
  permission:android.permission.READ_NETWORK_USAGE_HISTORY
  permission:android.permission.ACCESS_DRM_CERTIFICATES
  permission:com.google.android.gsf.permission.C2D_MESSAGE
  permission:com.google.android.googlequicksearchbox.permission.FLUSH_LOGS
  permission:android.permission.TV_VIRTUAL_REMOTE_CONTROLLER
  permission:android.permission.MANAGE_APP_OPS_RESTRICTIONS
  permission:android.permission.READ_INPUT_STATE
  permission:android.permission.KILL_BACKGROUND_PROCESSES
  permission:android.permission.CACHE_CONTENT
  permission:android.permission.ACCESS_VOICE_INTERACTION_SERVICE
  permission:android.permission.BIND_PRINT_SPOOLER_SERVICE
  permission:android.permission.BIND_DIRECTORY_SEARCH
  permission:android.permission.CONNECTIVITY_USE_RESTRICTED_NETWORKS
  permission:com.google.android.gms.permission.GRANT_WALLPAPER_PERMISSIONS
  permission:android.permission.WRITE_USER_DICTIONARY
  permission:com.android.rcs.eab.permission.READ_WRITE_EAB
  permission:android.permission.REGISTER_SIM_SUBSCRIPTION
  permission:android.permission.READ_SYNC_STATS
  permission:android.permission.WRITE_DREAM_STATE
  permission:android.permission.FREEZE_SCREEN
  permission:broadcast.cne.permission
  permission:android.permission.DOWNLOAD_CACHE_NON_PURGEABLE
  permission:com.google.android.dialer.permission.C2D_MESSAGE
  permission:android.permission.REBOOT
  permission:android.permission.DISPATCH_NFC_MESSAGE
  permission:com.google.android.gms.chimera.permission.CONFIG_CHANGE
  permission:com.google.android.gms.auth.permission.FACE_UNLOCK
  permission:android.permission.MOUNT_FORMAT_FILESYSTEMS
  permission:android.permission.OEM_UNLOCK_STATE
  permission:android.permission.REGISTER_CONNECTION_MANAGER
  permission:android.permission.MANAGE_DEVICE_ADMINS
  permission:android.permission.CLEAR_APP_CACHE
  permission:android.permission.CHANGE_APP_IDLE_STATE
  permission:com.google.android.gms.auth.permission.GOOGLE_ACCOUNT_CHANGE
  permission:com.google.android.gms.trustagent.framework.model.DATA_ACCESS
  permission:android.permission.BIND_TRUST_AGENT
  permission:com.google.android.apps.tycho.permission.SWITCHING_BROADCAST
  permission:android.permission.MANAGE_DOCUMENTS
  permission:android.permission.ACCESS_PDB_STATE
  permission:android.permission.MANAGE_NETWORK_POLICY
  permission:android.permission.BIND_REMOTEVIEWS
  permission:com.google.android.apps.gcs.permission.RECEIVE_NETWORK_SCORES
  permission:android.permission.ASEC_MOUNT_UNMOUNT
  permission:android.permission.GRANT_RUNTIME_PERMISSIONS
  permission:android.permission.SET_POINTER_SPEED
  permission:android.permission.CHANGE_BACKGROUND_DATA_SETTING
  permission:android.permission.MANAGE_NOTIFICATIONS
  permission:com.sand.airdroid.permission.C2D_MESSAGE
  permission:com.android.systemui.permission.SELF
  permission:com.android.chrome.TOS_ACKED
  permission:android.permission.GLOBAL_SEARCH
  permission:com.google.android.apps.tycho.WRITE_EXPERIMENTS
  permission:android.permission.NET_TUNNELING
  permission:android.permission.CONNECTIVITY_INTERNAL
  permission:android.permission.FACTORY_TEST
  permission:android.permission.SET_WALLPAPER_HINTS
  permission:android.permission.MANAGE_MEDIA_PROJECTION
  permission:android.permission.READ_SYNC_SETTINGS
  permission:com.google.android.gms.permission.SHOW_TRANSACTION_RECEIPT
  permission:com.google.android.apps.now.CURRENT_ACCOUNT_ACCESS
  permission:com.google.android.partnersetup.permission.ACCESS_PROVIDER
  permission:com.android.browser.permission.WRITE_HISTORY_BOOKMARKS
  permission:com.android.chrome.permission.C2D_MESSAGE
  permission:android.permission.BROADCAST_PACKAGE_REMOVED
  permission:android.permission.OVERRIDE_WIFI_CONFIG
  permission:android.permission.FORCE_STOP_PACKAGES
  permission:android.permission.MANAGE_CA_CERTIFICATES
  permission:com.qualcomm.qti.permission.RADIO_CONFIG_INTERFACE
  permission:android.permission.CAPTURE_VIDEO_OUTPUT
  permission:android.permission.ACCESS_NOTIFICATIONS
  permission:android.permission.VIBRATE
  permission:com.android.certinstaller.INSTALL_AS_USER
  permission:com.google.android.gsf.permission.CONNECTION
  permission:android.permission.BIND_ACCESSIBILITY_SERVICE
  permission:android.server.checkin.CHECKIN.permission.C2D_MESSAGE
  permission:android.permission.MANAGE_ACTIVITY_STACKS
  permission:android.permission.SEND_CALL_LOG_CHANGE
  permission:com.google.android.music.permission.C2D_MESSAGE
  permission:android.permission.HDMI_CEC
  permission:android.permission.BIND_INPUT_METHOD
  permission:android.permission.INVOKE_CARRIER_SETUP
  permission:android.permission.CHANGE_DEVICE_IDLE_TEMP_WHITELIST
  permission:android.permission.REMOVE_DRM_CERTIFICATES
  permission:com.google.android.googleapps.permission.GOOGLE_MAIL_SWITCH
  permission:android.permission.READ_USER_DICTIONARY
  permission:android.permission.FILTER_EVENTS
  permission:com.google.android.gms.permission.SAFETY_NET
  permission:android.permission.RECEIVE_EMERGENCY_BROADCAST
  permission:com.google.android.apps.tycho.permission.C2D_MESSAGE
  permission:com.google.android.finsky.permission.GEARHEAD_SERVICE
  permission:android.permission.CREATE_USERS
  permission:com.google.android.gms.googlehelp.LAUNCH_SUPPORT_SCREENSHARE
  permission:android.permission.MODIFY_NETWORK_ACCOUNTING
  permission:com.google.android.gms.common.internal.SHARED_PREFERENCES_PERMISSION
  permission:android.permission.CRYPT_KEEPER
  permission:android.permission.BIND_NFC_SERVICE
  permission:android.permission.START_PRINT_SERVICE_CONFIG_ACTIVITY
  permission:com.android.voicemail.permission.WRITE_VOICEMAIL
  permission:com.google.android.gms.permission.SHOW_WARM_WELCOME_TAPANDPAY_APP
  permission:android.permission.GET_DETAILED_TASKS
  permission:android.permission.NOTIFY_PENDING_SYSTEM_UPDATE
  permission:android.permission.DISPATCH_PROVISIONING_MESSAGE
  permission:android.permission.ALLOW_ANY_CODEC_FOR_PLAYBACK
  permission:android.permission.MODIFY_APPWIDGET_BIND_PERMISSIONS
  permission:com.google.andorid.gms.chimera.permission.QUERY_MODULES
  permission:android.permission.ACCESS_WIFI_STATE
  permission:com.google.android.apps.enterprise.dmagent.permission.C2D_MESSAGE
  permission:com.google.android.gms.permission.BROADCAST_TO_GOOGLEHELP
  permission:com.google.android.gms.permission.READ_VALUABLES_IMAGES
  permission:android.permission.FORCE_BACK
  permission:com.android.chrome.permission.READ_WRITE_BOOKMARK_FOLDERS
  permission:com.google.android.launcher.permission.RECEIVE_LAUNCH_BROADCASTS
  permission:android.permission.CHANGE_WIMAX_STATE
  permission:com.google.android.gms.auth.authzen.permission.KEY_REGISTRATION_FINISHED
  permission:android.permission.CAMERA_DISABLE_TRANSMIT_LED
  permission:android.permission.REQUEST_INSTALL_PACKAGES
  permission:android.permission.CONTROL_INCALL_EXPERIENCE
  permission:android.permission.MODIFY_PHONE_STATE
  permission:com.google.android.gm.email.permission.GET_WIDGET_UPDATE
  permission:android.permission.ACCESS_VR_MANAGER
  permission:com.google.android.gm.email.permission.UPDATE_AUTH_NOTIFICATION
  permission:com.google.android.googlequicksearchbox.LAUNCH_FROM_DSP_HOTWORD
  permission:android.permission.PACKET_KEEPALIVE_OFFLOAD
  permission:com.android.launcher.permission.INSTALL_SHORTCUT
  permission:android.permission.BIND_TEXT_SERVICE
  permission:android.permission.STATUS_BAR
  permission:android.permission.READ_FRAME_BUFFER
  permission:android.permission.SEND_SMS_NO_CONFIRMATION
  permission:com.google.android.gms.DRIVE
  permission:com.qualcomm.permission.QCOM_AUDIO
  permission:android.permission.DUMP
  permission:com.qualcomm.permission.QCOM_RADIO
  permission:android.permission.GET_APP_GRANTED_URI_PERMISSIONS
  permission:android.permission.LOCATION_HARDWARE
  permission:com.google.android.marvin.talkback.permission.LABELING
  permission:com.google.android.googlequicksearchbox.LAUNCH_WITH_RECORDED_AUDIO
  permission:android.permission.READ_SOCIAL_STREAM
  permission:android.permission.WAKE_LOCK
  permission:android.permission.INJECT_EVENTS
  permission:android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
  permission:android.permission.BIND_CHOOSER_TARGET_SERVICE
  permission:android.permission.UPDATE_APP_OPS_STATS
  permission:android.permission.ACCESS_EPHEMERAL_APPS
  permission:android.permission.ACCESS_INPUT_FLINGER
  permission:android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS
  permission:android.permission.READ_OEM_UNLOCK_STATE
  permission:com.android.vending.billing.ADD_CREDIT_CARD
  permission:com.google.android.apps.docs.permission.C2D_MESSAGE
  permission:android.permission.SET_SCREEN_COMPATIBILITY
  permission:com.android.vending.billing.IN_APP_NOTIFY.permission.C2D_MESSAGE
  permission:android.permission.MEDIA_CONTENT_CONTROL
  permission:android.permission.DELETE_PACKAGES
  permission:com.google.android.gms.magictether.permission.DISABLE_SOFT_AP
  permission:com.google.android.calendar.permission.READ_OOBE
  permission:com.google.android.gms.chromesync.permission.METADATA_UPDATED



You can get only the dangerous permission by following command:
adb shell pm list permissions -d -g

Result:
Dangerous Permissions:

group:com.google.android.gms.permission.CAR_INFORMATION
  permission:com.google.android.gms.permission.CAR_VENDOR_EXTENSION
  permission:com.google.android.gms.permission.CAR_MILEAGE
  permission:com.google.android.gms.permission.CAR_FUEL

group:android.permission-group.CONTACTS
  permission:android.permission.WRITE_CONTACTS
  permission:android.permission.GET_ACCOUNTS
  permission:android.permission.READ_CONTACTS

group:android.permission-group.PHONE
  permission:android.permission.READ_CALL_LOG
  permission:android.permission.READ_PHONE_STATE
  permission:android.permission.CALL_PHONE
  permission:android.permission.WRITE_CALL_LOG
  permission:android.permission.USE_SIP
  permission:android.permission.PROCESS_OUTGOING_CALLS
  permission:com.android.voicemail.permission.ADD_VOICEMAIL

group:android.permission-group.CALENDAR
  permission:android.permission.READ_CALENDAR
  permission:android.permission.WRITE_CALENDAR

group:android.permission-group.CAMERA
  permission:android.permission.CAMERA

group:android.permission-group.SENSORS
  permission:android.permission.BODY_SENSORS

group:android.permission-group.LOCATION
  permission:android.permission.ACCESS_FINE_LOCATION
  permission:com.google.android.gms.permission.CAR_SPEED
  permission:android.permission.ACCESS_COARSE_LOCATION

group:android.permission-group.STORAGE
  permission:android.permission.READ_EXTERNAL_STORAGE
  permission:android.permission.WRITE_EXTERNAL_STORAGE

group:android.permission-group.MICROPHONE
  permission:android.permission.RECORD_AUDIO

group:android.permission-group.SMS
  permission:android.permission.READ_SMS
  permission:android.permission.RECEIVE_WAP_PUSH
  permission:android.permission.RECEIVE_MMS
  permission:android.permission.RECEIVE_SMS
  permission:android.permission.SEND_SMS
  permission:android.permission.READ_CELL_BROADCASTS