Dim fs As Long = File.Size(dir, fn)
Dim fullPathToApkFile As String = File.Combine(dir, fn)
Dim comm As String = "cat $fullPathToApkFile | pm install -S $length".Replace("$fullPathToApkFile", fullPathToApkFile).Replace("$length", fs)
Dim res As Boolean = Super_User(comm)
......
Sub Super_User(command As String) As Boolean
Dim su As SuShell
If su.DeviceRooted Then
Dim Process As SuProcess
Process = su.Acquire("Su")
If Process.Acquired Then
Process.Execute(command)
Process.WaitForCompletion
Log("Su.Success = " & Process.Success)
Return Process.Success
Else
ToastMessageShow("Permissions error !", False)
End If
Else
ToastMessageShow("Device not rooted !", False)
End If
Return False
End Sub