Sub GetMountPoints
'Call like this
Dim MountPoints As Map = DevicePaths
'Log here just to show the results
Log("Device Paths Found..." & CRLF & "_____________________")
For i = 0 To MountPoints.Size -1
Log(MountPoints.GetKeyAt(i) & ", " & MountPoints.GetValueAt(i))
Next
End Sub
Sub DevicePaths As Map
'Should work with Android versions below 4.3
Dim lp As List
Dim dpaths As Map
Dim ChkVal As String
Dim dp As String = File.DirRootExternal
dpaths.Initialize
lp = File.ReadList("/system/etc/", "vold.fstab")
For i = 0 To lp.Size -1
ChkVal = lp.get(i)
ChkVal = ChkVal.Replace(":", " ")
If ChkVal.ToLowerCase.StartsWith("dev_mount") Then
dpaths.Put(SGW(ChkVal, 2), SGW(ChkVal, 3))
End If
Next
Return dpaths
End Sub
Sub SGW(CStr As String, GE As Int) As String
Dim t As List
Dim rs As String
Dim sd As String
sd = " "
t = Regex.Split(sd, CStr)
rs = t.Get(GE-1)
Return rs
End Sub