docs: public static List<StorageInfo> getStorageList() {
  
          List<StorageInfo> list = new ArrayList<StorageInfo>();
          String def_path = "";
          boolean def_path_internal = false;
          String def_path_state = "";
          boolean def_path_readonly = true;
          boolean def_path_available = false;
          try {
              if (Environment.getExternalStorageDirectory() != null) {
                  def_path = Environment.getExternalStorageDirectory().getPath();
              }
          } catch (Throwable ex) {
              //trap for android studio layout editor and some for certain devices
              //see https://github.com/osmdroid/osmdroid/issues/508
              ex.printStackTrace();
          }
          try {
              def_path_internal = (Build.VERSION.SDK_INT >= 9) && !Environment.isExternalStorageRemovable();
          } catch (Throwable ex) {
              //trap for android studio layout editor and some for certain devices
              //see https://github.com/osmdroid/osmdroid/issues/508
              ex.printStackTrace();
          }
          try {
              def_path_state = Environment.getExternalStorageState();
          } catch (Throwable ex) {
              //trap for android studio layout editor and some for certain devices
              //see https://github.com/osmdroid/osmdroid/issues/508
              ex.printStackTrace();
          }
          try {
              def_path_available = def_path_state.equals(Environment.MEDIA_MOUNTED) || def_path_state.equals(Environment.MEDIA_MOUNTED_READ_ONLY);
          } catch (Throwable ex) {
              //trap for android studio layout editor and some for certain devices
              //see https://github.com/osmdroid/osmdroid/issues/508
              ex.printStackTrace();
          }
  
          try {
              def_path_readonly = Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED_READ_ONLY);
          } catch (Throwable ex) {
              //trap for android studio layout editor and some for certain devices
              //see https://github.com/osmdroid/osmdroid/issues/508
              ex.printStackTrace();
          }
          BufferedReader buf_reader = null;
          try {
              HashSet<String> paths = new HashSet<String>();
              buf_reader = new BufferedReader(new FileReader("/proc/mounts"));
              String line;
              int cur_display_number = 1;
              Log.d(TAG, "/proc/mounts");
              while ((line = buf_reader.readLine()) != null) {
                  Log.d(TAG, line);
                  if (line.contains("vfat") || line.contains("/mnt")) {
                      StringTokenizer tokens = new StringTokenizer(line, " ");
                      String unused = tokens.nextToken(); //device
                      String mount_point = tokens.nextToken(); //mount point
                      if (paths.contains(mount_point)) {
                          continue;
                      }
                      unused = tokens.nextToken(); //file system
                      List<String> flags = Arrays.asList(tokens.nextToken().split(",")); //flags
                      boolean readonly = flags.contains("ro");
  
                      if (mount_point.equals(def_path)) {
                          paths.add(def_path);
                          list.add(0, new StorageInfo(def_path, def_path_internal, readonly, -1));
                      } else if (line.contains("/dev/block/vold")) {
                          if (!line.contains("/mnt/secure")
                              && !line.contains("/mnt/asec")
                              && !line.contains("/mnt/obb")
                              && !line.contains("/dev/mapper")
                              && !line.contains("tmpfs")) {
                              paths.add(mount_point);
                              // if (isWritable(new File(mount_point+ File.separator)))
                              list.add(new StorageInfo(mount_point, false, readonly, cur_display_number++));
                          }
                      }
                  }
              }
  
              if (!paths.contains(def_path) && def_path_available && def_path.length() > 0) {
                  list.add(0, new StorageInfo(def_path, def_path_internal, def_path_readonly, -1));
              }
  
          } catch (FileNotFoundException ex) {
              ex.printStackTrace();
          } catch (IOException ex) {
              ex.printStackTrace();
          } finally {
              if (buf_reader != null) {
                  try {
                      buf_reader.close();
                  } catch (IOException ex) {
                  }
              }
          }
          Set<File> allStorageLocationsRevised = getAllStorageLocationsRevised();
          Iterator<File> iterator = allStorageLocationsRevised.iterator();
          while (iterator.hasNext()) {
              File next = iterator.next();
              boolean found = false;
              for (int i = 0; i < list.size(); i++) {
                  if (list.get(i).path.equals(next.getAbsolutePath())) {
                      found = true;
                      break;
                  }
              }
              if (!found) {
                  list.add(new StorageInfo(next.getAbsolutePath(), false, false, -1));
              }
          }
  
  
          return list;
      }