Starting with Android 6.0, third-party applications cannot see the contents of the SDCard.
In Android 6.0, third-party applications do not have access to sdcard_r and sdcard_rw GID. Instead, access is controlled by installing only for this application an appropriate representation of the runtime is required. Cross-user interactions are blocked using all GIDs.
https://source.android.com/devices/storage/
As additional information, Android 6.0 introduces Adapttable Storage and Runtime Permissions , which impose restrictions on interaction with the deviceโs storage.
Hope this helps you.
Update
Regarding how to access the file from DDMS to Android 6.0. This action is not allowed. If you need to access the file from your application, you can use this sample source code:
@Override protected void onCreate(Bundle savedInstanceState) { mPermissions = new String[] { Manifest.permission.WRITE_EXTERNAL_STORAGE }; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { boolean isAllow = ContextCompat.checkSelfPermission(this, mPermissions[0]) == PackageManager.PERMISSION_GRANTED; if (!isAllow) { if (shouldShowRequestPermissionRationale(mPermissions[0])) { // There is you need to display confirmation dialog about why you need to get this permission. if (confirm("You need to copy database to device storage") == YES) { requestPermissions(mPermissions, REQUEST_CODE_ASK_PERMISSIONS) } else { // User does not agree with your requirements // You should decide how the app will work in this case. message("You can't use this app!"); finish(); } return; } requestPermissions(mPermissions, REQUEST_CODE_ASK_PERMISSIONS); } } else { runTheApp(); } } @Override public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { switch (requestCode) { case REQUEST_CODE_ASK_PERMISSIONS: if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { runTheApp(); } else { message("You can't use this app!") } } break; case REJECT_CODE_PERMISSIONS: break; default: super.onRequestPermissionsResult(requestCode, permissions, grantResults); } }
source share