Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Commit

Permalink
v14 update
Browse files Browse the repository at this point in the history
  • Loading branch information
LeddaZ committed Jan 12, 2020
1 parent 920ff3c commit 852a3a8
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 15 deletions.
30 changes: 28 additions & 2 deletions src/ADBManager/fastboot.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

44 changes: 40 additions & 4 deletions src/ADBManager/fastboot.vb
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,50 @@
End Sub

Private Sub BtnFReboot_Click(sender As Object, e As EventArgs) Handles BtnFReboot.Click
Dim adb As New Process
Dim adbinfo As New System.Diagnostics.ProcessStartInfo With {
Dim fastboot As New Process
Dim fastbootinfo As New System.Diagnostics.ProcessStartInfo With {
.FileName = "cmd.exe",
.UseShellExecute = True,
.CreateNoWindow = False,
.Arguments = "/c fastboot reboot && pause"
}
adb.StartInfo = adbinfo
adb.Start()
fastboot.StartInfo = fastbootinfo
fastboot.Start()
End Sub

Private Sub BtnFlashRecovery_Click(sender As Object, e As EventArgs) Handles BtnFlashRecovery.Click
Dim img As String
img = InputBox("Enter the recovery image path", "Flash a recovery image")
If img = Nothing Then
MsgBox("You have entered an empty path.", MsgBoxStyle.Critical, "Error")
Else
Dim fastboot As New Process
Dim fastbootinfo As New System.Diagnostics.ProcessStartInfo With {
.FileName = "cmd.exe",
.UseShellExecute = True,
.CreateNoWindow = False,
.Arguments = "/c fastboot flash recovery " + img + " && pause"
}
fastboot.StartInfo = fastbootinfo
fastboot.Start()
End If
End Sub

Private Sub BtnBootImage_Click(sender As Object, e As EventArgs) Handles BtnBootImage.Click
Dim boot As String
boot = InputBox("Enter the image path", "Boot an image")
If boot = Nothing Then
MsgBox("You have entered an empty path.", MsgBoxStyle.Critical, "Error")
Else
Dim fastboot As New Process
Dim fastbootinfo As New System.Diagnostics.ProcessStartInfo With {
.FileName = "cmd.exe",
.UseShellExecute = True,
.CreateNoWindow = False,
.Arguments = "/c fastboot boot " + boot + " && pause"
}
fastboot.StartInfo = fastbootinfo
fastboot.Start()
End If
End Sub
End Class
36 changes: 31 additions & 5 deletions src/ADBManager/main.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/ADBManager/main.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="BtnReboot.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
Expand Down
32 changes: 31 additions & 1 deletion src/ADBManager/main.vb
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@

Private Sub BtnRecord_Click(sender As Object, e As EventArgs) Handles BtnRecord.Click
Dim name As String
name = InputBox("Enter the filename", "Record screen")
name = InputBox("Enter the filename without the extension", "Record screen")
If name = Nothing Then
MsgBox("You have entered an empty filename.", MsgBoxStyle.Critical, "Error")
Else
Expand Down Expand Up @@ -169,4 +169,34 @@
adb.Start()
End If
End Sub

Private Sub BtnKillServer_Click(sender As Object, e As EventArgs) Handles BtnKillServer.Click
Dim adb As New Process
Dim adbinfo As New System.Diagnostics.ProcessStartInfo With {
.FileName = "cmd.exe",
.UseShellExecute = True,
.CreateNoWindow = False,
.Arguments = "/c adb kill-server && pause"
}
adb.StartInfo = adbinfo
adb.Start()
End Sub

Private Sub BtnLogcat_Click(sender As Object, e As EventArgs) Handles BtnLogcat.Click
Dim log As String
log = InputBox("Enter the logcat filename without the extension. Press Ctrl+C to stop.", "Grab a logcat")
If log = Nothing Then
MsgBox("You have entered an empty filename.", MsgBoxStyle.Critical, "Error")
Else
Dim adb As New Process
Dim adbinfo As New System.Diagnostics.ProcessStartInfo With {
.FileName = "cmd.exe",
.UseShellExecute = True,
.CreateNoWindow = False,
.Arguments = "/c adb logcat > " + log + ".txt"
}
adb.StartInfo = adbinfo
adb.Start()
End If
End Sub
End Class

0 comments on commit 852a3a8

Please sign in to comment.