I want the fastboot status on vb.net
I use this command to check the status of the device's adb
Dim devicestate, fastbootdetect As String
android.UpdateDeviceList()
If (android.HasConnectedDevices) Then
devicestate = Adb.ExecuteAdbCommand(Adb.FormAdbCommand("get-state"))
If devicestate = "device" Then
PictureBox1.BackColor = Color.Lime
But have a problem checking fastboot status I use this command
fastbootdetect = Fastboot.ExecuteFastbootCommand(Fastboot.FormFastbootCommand("devices"))
If fastbootdetect = "fastboot" Then
PictureBox1.BackColor = Color.Blue
lblAutoConnect.Text = "Device found in fastboot ! "
lblModelNumber.Text = "--"
lblVersion.Text = "--"
lblBrandName.Text = "--"
In the fastboot command, press the command The output is as follows
5a52461 fastboot
5a52461 is different in every model
The command I run above just checks for "fastboot"
But the output is "5a52461 fatboot"
What is the command to check Existence the "fastboot" on the output?
The following should work:
If fastbootdetect.Contains("fastboot") Then
'...run your code here
End If
You can also use Like
:
If fastbootdetect Like "*fastboot*" Then
'...run your code here
End If
Please note: both functions are case sensitive.
If you want to ignore the case:
If fastbootdetect.ToLower.Contains("fastboot") Then
'...run your code here
End If
You can also use Like
:
If fastbootdetect.ToLower Like "*fastboot*" Then
'...run your code here
End If