-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathForm1.frm
1446 lines (1389 loc) · 42.1 KB
/
Form1.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
VERSION 5.00
Object = "{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}#1.1#0"; "ieframe.dll"
Begin VB.Form Form1
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
Caption = "YUYU助手v1.9"
ClientHeight = 8325
ClientLeft = 2280
ClientTop = 1260
ClientWidth = 5280
FillColor = &H00FFFFFF&
ForeColor = &H00FFFFFF&
Icon = "Form1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 8325
ScaleWidth = 5280
Begin VB.TextBox Text7
Height = 375
Left = 6480
TabIndex = 39
Text = "&HC0C000"
Top = 5040
Width = 1215
End
Begin VB.CommandButton Command8
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
Caption = "调整动画速度"
Enabled = 0 'False
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1440
MaskColor = &H00FFFF80&
Style = 1 'Graphical
TabIndex = 36
Top = 5880
Width = 1335
End
Begin VB.CommandButton Command3
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
Caption = "安装应用到手机"
Enabled = 0 'False
Height = 375
Left = 2400
MaskColor = &H00FFFFFF&
Style = 1 'Graphical
TabIndex = 34
Top = 3240
Width = 1575
End
Begin VB.CommandButton Command7
Caption = "Command7"
Height = 375
Left = 6720
TabIndex = 27
Top = 6480
Width = 1095
End
Begin VB.CommandButton Command22
Appearance = 0 'Flat
BackColor = &H00F5F1E7&
Caption = "查看所有应用"
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
MaskColor = &H00FFFFFF&
Style = 1 'Graphical
TabIndex = 26
Top = 3240
Width = 1815
End
Begin VB.CommandButton Command9
BackColor = &H00FFFFFF&
Caption = "设定手机IP"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3960
MaskColor = &H00FFFFFF&
Style = 1 'Graphical
TabIndex = 25
Top = 1800
Width = 1095
End
Begin VB.TextBox Text6
Height = 375
Left = 5640
TabIndex = 23
Top = 3480
Width = 3735
End
Begin SHDocVwCtl.WebBrowser WebBrowser1
Height = 2655
Left = 5640
TabIndex = 22
Top = 240
Width = 4815
ExtentX = 8493
ExtentY = 4683
ViewMode = 0
Offline = 0
Silent = 0
RegisterAsBrowser= 0
RegisterAsDropTarget= 1
AutoArrange = 0 'False
NoClientEdge = 0 'False
AlignLeft = 0 'False
NoWebView = 0 'False
HideFileNames = 0 'False
SingleClick = 0 'False
SingleSelection = 0 'False
NoFolders = 0 'False
Transparent = 0 'False
ViewID = "{0057D0E0-3573-11CF-AE69-08002B2E1262}"
Location = "http:///"
End
Begin VB.TextBox Text5
Height = 375
Left = 5640
TabIndex = 20
Top = 4080
Width = 3255
End
Begin VB.CommandButton Command21
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
Caption = "重试"
Enabled = 0 'False
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3120
MaskColor = &H00FFC0C0&
Style = 1 'Graphical
TabIndex = 19
Top = 1800
Width = 735
End
Begin VB.TextBox Text4
Height = 375
Left = 5640
TabIndex = 18
Text = "al"
Top = 5520
Width = 375
End
Begin VB.TextBox Text3
Height = 375
Left = 5640
TabIndex = 17
Text = "co"
Top = 5040
Width = 615
End
Begin VB.TextBox Text2
Height = 375
Left = 5640
TabIndex = 16
Text = "cannot"
Top = 6000
Width = 1215
End
Begin VB.TextBox Text1
Height = 375
Left = 5640
MultiLine = -1 'True
TabIndex = 15
Top = 4560
Width = 2295
End
Begin VB.Frame Frame2
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "快捷操作"
BeginProperty Font
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 1335
Left = 240
TabIndex = 10
Top = 3720
Width = 4815
Begin VB.CommandButton Command19
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
Caption = "启用自定清单应用"
Enabled = 0 'False
Height = 375
Left = 120
MaskColor = &H00FFFFFF&
Style = 1 'Graphical
TabIndex = 14
Top = 360
Width = 2295
End
Begin VB.CommandButton Command18
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
Caption = "启用所有已停用应用"
Enabled = 0 'False
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2640
MaskColor = &H00FFFFFF&
Style = 1 'Graphical
TabIndex = 13
Top = 360
Width = 2055
End
Begin VB.CommandButton Command17
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
Caption = "停用自定清单应用"
Enabled = 0 'False
Height = 375
Left = 120
MaskColor = &H00FFFFFF&
Style = 1 'Graphical
TabIndex = 12
Top = 840
Width = 2295
End
Begin VB.CommandButton Command16
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
Caption = "自定义应用清单"
Enabled = 0 'False
Height = 375
Left = 2640
MaskColor = &H00FFFFFF&
Style = 1 'Graphical
TabIndex = 11
Top = 840
Width = 2055
End
End
Begin VB.CommandButton Command14
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
Caption = "其他功能"
Enabled = 0 'False
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
Style = 1 'Graphical
TabIndex = 9
Top = 5880
Width = 1095
End
Begin VB.CommandButton Command11
BackColor = &H00FFFFFF&
Caption = "建立无线连接"
Enabled = 0 'False
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
MaskColor = &H00FFFFFF&
Style = 1 'Graphical
TabIndex = 7
Top = 1800
Width = 1335
End
Begin VB.CommandButton Command6
BackColor = &H00FFFFFF&
Caption = "重试有线连接"
Enabled = 0 'False
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
MaskColor = &H00FFFFFF&
Style = 1 'Graphical
TabIndex = 5
Top = 1800
Width = 1335
End
Begin VB.CommandButton Command2
Caption = "强制开启"
Height = 375
Left = 5640
TabIndex = 4
Top = 6480
Width = 1095
End
Begin VB.CommandButton Command12
Appearance = 0 'Flat
BackColor = &H00FFC671&
Caption = "启动"
Height = 375
Left = 4320
MaskColor = &H00FFC0C0&
Style = 1 'Graphical
TabIndex = 2
Top = 120
Visible = 0 'False
Width = 735
End
Begin VB.Timer Timer1
Interval = 15
Left = 5400
Top = 7800
End
Begin VB.CommandButton Command4
Appearance = 0 'Flat
BackColor = &H00DAEBB8&
Caption = "退出助手"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3960
MaskColor = &H00FF0000&
Style = 1 'Graphical
TabIndex = 0
Top = 7680
Width = 1095
End
Begin VB.CheckBox Check1
BackColor = &H00FFFFFF&
Caption = "退出但不结束adb"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00808080&
Height = 300
Left = 2160
MaskColor = &H00808080&
TabIndex = 33
Top = 7800
Width = 1815
End
Begin VB.Label Label16
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "收集错误"
BeginProperty Font
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00404040&
Height = 285
Left = 240
TabIndex = 41
Top = 6480
Width = 840
End
Begin VB.Shape Shape3
BackColor = &H00C0C0C0&
BorderColor = &H00C0C0C0&
FillColor = &H00C0C0C0&
FillStyle = 0 'Solid
Height = 30
Left = 120
Top = 6840
Width = 5055
End
Begin VB.Label Label13
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "打开cmd窗口"
BeginProperty Font
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00404040&
Height = 300
Left = 3480
TabIndex = 40
Top = 6480
Width = 1275
End
Begin VB.Label Label15
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "更多设置"
BeginProperty Font
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00404040&
Height = 285
Left = 2400
TabIndex = 38
Top = 6480
Width = 840
End
Begin VB.Label Label14
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "检查更新"
BeginProperty Font
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00404040&
Height = 285
Left = 1320
TabIndex = 37
Top = 6480
Width = 840
End
Begin VB.Label Label9
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "找到我:"
BeginProperty Font
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00404040&
Height = 285
Left = 240
TabIndex = 35
Top = 6960
Width = 840
End
Begin VB.Label Label12
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "酷安"
BeginProperty Font
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H006DC725&
Height = 300
Left = 3360
TabIndex = 32
Top = 6960
Width = 420
End
Begin VB.Label Label6
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "Bilibili"
BeginProperty Font
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C0C000&
Height = 300
Left = 2400
TabIndex = 31
Top = 6960
Width = 630
End
Begin VB.Label Label3
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "花粉俱乐部"
BeginProperty Font
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 400
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00808080&
Height = 300
Left = 1080
TabIndex = 30
Top = 6960
Width = 1050
End
Begin VB.Label Label11
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "点击更改adb端口"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 700
Underline = -1 'True
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H005809FF&
Height = 255
Left = 1440
TabIndex = 29
Top = 2280
Visible = 0 'False
Width = 1425
End
Begin VB.Label Label10
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "总是连接失败?"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H005809FF&
Height = 255
Left = 240
TabIndex = 28
Top = 2280
Visible = 0 'False
Width = 1260
End
Begin VB.Label Label2
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "查看详细教程"
BeginProperty Font
Name = "微软雅黑"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H005809FF&
Height = 330
Left = 3720
TabIndex = 24
Top = 2640
Width = 1440
End
Begin VB.Label Label5
BackColor = &H00FFFFFF&
Caption = "请勿更改下列值!!!"
BeginProperty Font
Name = "微软雅黑"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 5760
TabIndex = 21
Top = 3000
Width = 2775
End
Begin VB.Label Label7
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "断开无线连接"
BeginProperty Font
Name = "微软雅黑"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00808080&
Height = 255
Left = 360
TabIndex = 8
Top = 2280
Visible = 0 'False
Width = 1080
End
Begin VB.Label Label4
Appearance = 0 'Flat
AutoSize = -1 'True
BackColor = &H00FFFFFF&
BackStyle = 0 'Transparent
Caption = "启动中. . ."
BeginProperty Font
Name = "微软雅黑"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H006DC725&
Height = 285
Left = 240
TabIndex = 6
Top = 240
Width = 930
End
Begin VB.Label Label1
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "更多功能"
BeginProperty Font
Name = "微软雅黑"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 330
Left = 120
TabIndex = 3
Top = 5280
Width = 960
End
Begin VB.Shape Shape2
BackColor = &H00C0C0C0&
BorderColor = &H00C0C0C0&
FillColor = &H00C0C0C0&
FillStyle = 0 'Solid
Height = 30
Left = 120
Top = 5640
Width = 5055
End
Begin VB.Image Image2
Height = 50
Left = -6400
Picture = "Form1.frx":74CA
Stretch = -1 'True
Top = 1650
Visible = 0 'False
Width = 6480
End
Begin VB.Label Label8
AutoSize = -1 'True
BackColor = &H00FFFFFF&
Caption = "操作应用"
BeginProperty Font
Name = "微软雅黑"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 330
Left = 120
TabIndex = 1
Top = 2640
Width = 960
End
Begin VB.Shape Shape1
BackColor = &H00C0C0C0&
BorderColor = &H00C0C0C0&
FillColor = &H00C0C0C0&
FillStyle = 0 'Solid
Height = 30
Left = 120
Top = 3000
Width = 5055
End
Begin VB.Image Image1
Height = 1650
Left = 0
Picture = "Form1.frx":B24F
Top = 0
Width = 5280
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim L As String
Dim sr As String
Private Sub Command11_Click()
MsgBox "打开无线连接将使局域网内的其他设备均可能控制您的设备,请确认局域网设备及其安装的软件均安全后,再开启", 1 + 48, "警告"
Dim strFile As String
Dim intFile As Integer
Label4 = "正在建立无线连接. . ."
Shell "cmd /c adb devices"
Shell "cmd /c adb tcpip 5555"
If Text1 = "" Then 'F1
Form9.Show
Label4 = "没有连接记录,请先设定手机IP地址"
Else 'else
Label4 = Label4 & vbCrLf & "正在连接至:" & Text1
Shell "cmd /c adb connect " & Text1 & ">" & Text5 & "\IPC.txt"
Savetime = Timer
While Timer < Savetime + 2
DoEvents
Wend
Dim strDa As String
strFile = Text5 & "\IPC.txt"
intFile = FreeFile
Open strFile For Input As intFile
strDa = StrConv(InputB(FileLen(strFile), intFile), vbUnicode)
Debug.Print strDa
Close intFile
If Text2.Text = Left(strDa, 6) Or strDa = "" Then 'F2
Label4 = "建立无线连接失败!"
Call Command7_Click
ElseIf Text3.Text = Left(strDa, 2) Or Text4.Text = Left(strDa, 2) Then
Label4 = "建立无线连接成功!" & vbCrLf & "现在请您拔掉数据线后点击“重试”按钮"
Shell "cmd /c adb disconnect "
Command11.Enabled = False
Command11.Caption = "请按 重试 按钮"
Call Command7_Click
End If
End If
End Sub
Private Sub Command12_Click()
Form1.Show
d = 0
Image2.Left = -6240
Timer1.Interval = 28
Timer1.Enabled = True
Image2.Visible = True
Dim Savetime As Single
Label4 = "等待adb服务启动. . . " & vbCrLf & "亮屏更容易无线连接成功哦"
Savetime = Timer
While Timer < Savetime + 2
DoEvents
Wend
Label4 = Label4 & vbCrLf & "检查无线连接. . . "
Shell "cmd /c adb connect " & Text1 & ">" & Text5 & "\IPC.txt"
Savetime = Timer
While Timer < Savetime + 1
DoEvents
Wend
Dim strFile As String
Dim intFile As Integer
Dim strDa As String
strFile = Text5 & "\IPC.txt"
intFile = FreeFile
Open strFile For Input As intFile
strDa = StrConv(InputB(FileLen(strFile), intFile), vbUnicode)
Debug.Print strDa
Close intFile
Shell "cmd /c adb shell getprop ro.product.model" & ">" & Text5 & "\YUYU.txt"
Label4 = Label4 & vbCrLf & "检查有线连接. . . "
Savetime = Timer
While Timer < Savetime + 1
DoEvents
Wend
Dim strData As String
strFile = Text5 & "\YUYU.txt"
intFile = FreeFile
Open strFile For Input As intFile
strData = StrConv(InputB(FileLen(strFile), intFile), vbUnicode)
Debug.Print strData
Close intFile
If Text2.Text = Left(strDa, 6) Or strDa = "" Then 'F1
Label4 = "无线连接失败!"
If InStr(strData, "-") = 0 Then '有线连接也失败 'F2
Label4 = Label4 & vbCrLf & "有线连接也失败!" & vbCrLf & strDa & "没有已连接的设备,建议您检查操作后重试"
MsgBox "没有检查到已连接的设备!", 0 + 48, "设备未连接"
If Dir(Text5 & "\adb.txt") <> "" Then d = 1
ElseIf InStr(strData, "-") > 0 Then '有线连接成功
Label4 = Label4 & vbCrLf & "有线连接成功!" & vbCrLf & "欢迎你:" & strData
Command11.Enabled = 1
If InStr(Mid(sr, 3, 1), "1") > 0 Then Form11.Show
Call Command2_Click
End If 'end1
ElseIf Text3.Text = Left(strDa, 2) Or Text4.Text = Left(strDa, 2) Then
If InStr(strData, "-") = 0 Then 'f3
Label4 = "无线连接成功!但您同时连接了数据线!" & vbCrLf & "需要拨出数据线 或 点击“改为有线连接”," & vbCrLf & "才能正常执行操作!(若识别错误请点击“重试”)"
ElseIf InStr(strData, "-") > 0 Then
Label4 = "无线连接成功!" & vbCrLf & strDa & "欢迎你:" & strData
Call Command2_Click
Label7.Visible = True
If InStr(Mid(sr, 3, 1), "1") > 0 Then Form11.Show
End If 'end2
Command6.Caption = "改为有线连接"
End If 'end3
Command21.Enabled = True
Command6.Enabled = True
Timer1.Enabled = False
Timer1.Interval = 15
Image2.Visible = False
If d = 1 Then
Label10.Visible = True: Label11.Visible = True
ElseIf d = 0 Then
Label10.Visible = False: Label11.Visible = False
End If
End Sub
Private Sub Command13_Click()
Form5.Show
End Sub
Private Sub Command14_Click()
Label4 = ""
Form10.Show
End Sub
Private Sub Command16_Click()
Label4 = ""
Form7.Show
End Sub
Private Sub Command17_Click()
Dim S, c, n As String
Dim iLine As Integer
If Dir(Text5 & "\List1.txt") <> "" Then
Open Text5 & "\List1.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, S
n = n & vbCrLf & S
Loop
m = MsgBox("确认停用以下应用吗?" & n, 1, "停用应用")
Close #1
If m = 1 Then
Open Text5 & "\List1.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, S
If InStr(S, ":") > 0 Then
c = Mid(S, InStr(S, ":") + 1)
ElseIf InStr(S, ":") = 0 Then
c = S
End If
Shell "cmd /c adb shell pm disable-user " & c
Loop
Close #1
Label4 = "已停用所有自定义清单的应用"
MsgBox "已停用" & n
Else
Label4 = "已取消"
End If
Else
MsgBox "您还未自定义应用清单!"
End If
End Sub
Private Sub Command18_Click()
Label4 = "请稍后..."
Shell "cmd /c adb shell pm list packages -d" & ">" & Text5 & "\disable.txt"
Savetime = Timer
While Timer < Savetime + 1
DoEvents
Wend
Dim S, V, n As String
Open Text5 & "\disable.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, S
V = Mid(S, 9)
n = n & vbCrLf & V
Loop
Close #1
If S = "" Then
MsgBox "当前没有已停用的应用!"
Label4 = "当前没有已停用的应用"
Else
m = MsgBox("确认启用以下应用吗?" & n, 1, "启用所有已停用应用")
If m = 1 Then
Open Text5 & "\disable.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, S
V = Mid(S, 9)
Shell "cmd /c adb shell pm enable " & V
Loop
Close #1
Label4 = "已启用所有停用的应用"
MsgBox "已启用" & n
Else
Label4 = "已取消"
End If
End If
End Sub
Private Sub Command19_Click()
Dim S, c, n As String
Dim iLine As Integer
If Dir(Text5 & "\List1.txt") <> "" Then
Open Text5 & "\List1.txt" For Input As #1
Do While Not EOF(1)