Fix Legacy External Storage Access
- To check is the app require legacy external storage access or not:
su
PKG=
UID=$(dumpsys package $PKG 2>/dev/null | grep -m 1 Id= | sed -e 's/ userId=//g' -e 's/ appId=//g')
echo $PKG
appops get $PKG
echo "UID $UID"
appops get --uid $UID
If there is LEGACY_STORAGE written, then it's require legacy external storage access.
- We need to put these 3 lines at in AndroidManifest.xml
android:requestLegacyExternalStorage="true"
android:preserveLegacyExternalStorage="true"
android:requestRawExternalStorageAccess="true"
- For more info: https://developer.android.com/training/data-storage/use-cases
- To check is the app require legacy external storage access or not:
su
PKG=
UID=$(dumpsys package $PKG 2>/dev/null | grep -m 1 Id= | sed -e 's/ userId=//g' -e 's/ appId=//g')
echo $PKG
appops get $PKG
echo "UID $UID"
appops get --uid $UID
If there is LEGACY_STORAGE written, then it's require legacy external storage access.
- We need to put these 3 lines at in AndroidManifest.xml
android:requestLegacyExternalStorage="true"
android:preserveLegacyExternalStorage="true"
android:requestRawExternalStorageAccess="true"
- For more info: https://developer.android.com/training/data-storage/use-cases