Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BYLAppRobot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuyang
BYLAppRobot
Commits
38ea59bf
Commit
38ea59bf
authored
Oct 28, 2018
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手动停止修复,应用重置
parent
d8629fba
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
Task.kt
app/src/main/java/com/duolebo/blyrobot/data/Task.kt
+10
-2
No files found.
app/src/main/java/com/duolebo/blyrobot/data/Task.kt
View file @
38ea59bf
...
...
@@ -32,7 +32,8 @@ class Task : IAppBaseCallback {
"3"
to
"截图失败"
,
"4"
to
"图片上传中"
,
"5"
to
"上报失败"
,
"6"
to
"处理完成"
)
"6"
to
"处理完成"
,
"7"
to
"手动停止"
)
lateinit
var
apkInfo
:
ApkInfo
// 截图存放路径
...
...
@@ -96,7 +97,10 @@ class Task : IAppBaseCallback {
val
success
=
this
.
processChannels
(
0
)
// 再次尝试
if
(!
success
)
{
this
.
launchApp
()
if
(
this
.
status
==
"7"
)
return
this
.
launchApp
(
true
)
// 重新切换到上次崩溃的频道,接着抓取
for
(
i
in
0
until
this
.
channelIndex
)
{
AdbUtil
.
sendMultiKey
(
this
.
apkInfo
.
channelKeyEvent
)
...
...
@@ -133,6 +137,7 @@ class Task : IAppBaseCallback {
fun
destroy
()
{
// 杀掉tcpdump进程
this
.
status
=
"7"
AdbUtil
.
killTcpdump
()
// 退出应用
...
...
@@ -175,6 +180,9 @@ class Task : IAppBaseCallback {
Log
.
i
(
TAG
,
"processChannels"
)
step
()
for
(
i
in
index
+
1
until
this
.
apkInfo
.
channelCount
)
{
if
(
this
.
status
==
"7"
)
return
false
// 模拟按键事件. 切换频道进行抓取
this
.
channelIndex
=
i
capture
(
apkInfo
.
captureDelay
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment