Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

[xdl] Expand Android permissions blacklist and add annotations #2458

Merged
merged 2 commits into from
Aug 15, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions packages/xdl/src/detach/AndroidShellApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -778,22 +778,33 @@ export async function runShellAppModificationsAsync(context, sdkVersion, buildMo

// Permissions we need to remove from the generated manifest
const blacklist = [
'android.permission.ACCESS_COARSE_LOCATION',
'android.permission.ACCESS_FINE_LOCATION',
'android.permission.CAMERA',
// module permissions - included by default / requires user to add to `android.permissions` list
'android.permission.ACCESS_COARSE_LOCATION', // expo-bluetooth, expo-location
'android.permission.ACCESS_FINE_LOCATION', // expo-location
'android.permission.ACCESS_BACKGROUND_LOCATION', // expo-location
'android.permission.CAMERA', // expo-barcode-scanner, expo-camera, expo-image-picker
'android.permission.RECORD_AUDIO', // expo-camera
'android.permission.READ_CONTACTS', // expo-contacts
'android.permission.WRITE_CONTACTS', // expo-contacts
'android.permission.READ_CALENDAR', // expo-calendar
'android.permission.WRITE_CALENDAR', // expo-calendar
'android.permission.READ_EXTERNAL_STORAGE', // expo-file-system, expo-image, expo-media-library, expo-video-thumbnails
'android.permission.WRITE_EXTERNAL_STORAGE', // expo-file-system, expo-media-library
'android.permission.USE_FINGERPRINT', // expo-local-authentication
'android.permission.USE_BIOMETRIC', // expo-local-authentication
'android.permission.VIBRATE', // expo-haptics

// react native debugging permissions - not required for standalone apps
'android.permission.READ_PHONE_STATE',
'android.permission.SYSTEM_ALERT_WINDOW',

// signature permissions - not available for 3rd party
'android.permission.MANAGE_DOCUMENTS',
'android.permission.READ_CONTACTS',
'android.permission.WRITE_CONTACTS',
'android.permission.READ_CALENDAR',
'android.permission.WRITE_CALENDAR',
'android.permission.READ_EXTERNAL_STORAGE',
'android.permission.READ_SMS', // https://github.com/expo/expo/pull/2982
'android.permission.REQUEST_INSTALL_PACKAGES', // https://github.com/expo/expo/pull/8969

// other permissions
'android.permission.READ_INTERNAL_STORAGE',
'android.permission.READ_PHONE_STATE',
'android.permission.RECORD_AUDIO',
'android.permission.USE_FINGERPRINT',
'android.permission.VIBRATE',
'android.permission.WRITE_EXTERNAL_STORAGE',
'android.permission.READ_SMS',
'com.anddoes.launcher.permission.UPDATE_COUNT',
'com.android.launcher.permission.INSTALL_SHORTCUT',
'com.google.android.gms.permission.ACTIVITY_RECOGNITION',
Expand Down