gkd
gkd copied to clipboard
弹窗广告规则有效但 无法跳过
打开app后,等待5s,让无法跳过的开屏广告自动过去,进入首页后的广告弹窗规则是对的,但是无法跳过。对现有规则精简到如下后依然无用 注意:app进入首页后,【广告弹窗】有两个,点击完后,有一个【公告弹窗】,想来是不影响
{
id: 'com.flutter3.ctangxin.vf0egg',
name: '糖心Vlog',
groups: [
{
key: 1,
name: '广告弹窗',
rules: [
{
matches:
'FrameLayout > View > View > View[index=0] > View > ImageView[childCount=1] + View[clickable=true && desc=null]',
snapshotUrls: 'https://i.gkd.li/import/12836891',
},
],
},
{
key: 2,
name: '公告弹窗',
rules: [
{
matches: '@[desc="取消"][clickable=true] + [desc="确定"]',
snapshotUrls: 'https://i.gkd.li/import/12836854',
},
],
},
],
}
切回桌面,后台重新进入一次,可触发点击,关掉一个【广告弹窗】1,再回桌面,后台在进一次,会触发关闭【广告弹窗】2和【公告弹窗】。
22:08:05.551 D/GkdAbService [DefaultDispatcher-worker-4, li.songe.gkd.service.GkdAbService$1$7$1.emit(GkdAbService.kt:301)]: TopActivity(appId=com.miui.home, activityId=null)
22:08:05.932 D/GkdAbService [DefaultDispatcher-worker-4, li.songe.gkd.service.GkdAbService$1$7$1.emit(GkdAbService.kt:301)]: TopActivity(appId=com.miui.home, activityId=com.miui.home.launcher.Launcher)
22:08:07.920 D/GkdAbService [DefaultDispatcher-worker-4, li.songe.gkd.service.GkdAbService$1$7$1.emit(GkdAbService.kt:301)]: args[0] = TopActivity(appId=com.flutter3.ctangxin.vf0egg, activityId=com.example.flutter3_frame.MainActivity)
args[1] = subsId:0, gKey=1, gName:广告弹窗, ruleIndex:0, rKey:null, active:true
args[2] = subsId:0, gKey=2, gName:公告弹窗, ruleIndex:0, rKey:null, active:true
22:08:10.530 D/NodeInfo [DefaultDispatcher-worker-7, li.songe.gkd.data.NodeInfo$Companion.info2nodeList(NodeInfo.kt:123)]: args[0] = TopActivity(appId=com.flutter3.ctangxin.vf0egg, activityId=com.example.flutter3_frame.MainActivity)
args[1] = 快照收集:12, 耗时:15ms
22:08:16.528 D/NodeInfo [DefaultDispatcher-worker-6, li.songe.gkd.data.NodeInfo$Companion.info2nodeList(NodeInfo.kt:123)]: args[0] = TopActivity(appId=com.flutter3.ctangxin.vf0egg, activityId=com.example.flutter3_frame.MainActivity)
args[1] = 快照收集:13, 耗时:12ms
22:08:21.654 D/NodeInfo [DefaultDispatcher-worker-7, li.songe.gkd.data.NodeInfo$Companion.info2nodeList(NodeInfo.kt:123)]: args[0] = TopActivity(appId=com.flutter3.ctangxin.vf0egg, activityId=com.example.flutter3_frame.MainActivity)
args[1] = 快照收集:13, 耗时:11ms
22:08:26.272 D/NodeInfo [DefaultDispatcher-worker-4, li.songe.gkd.data.NodeInfo$Companion.info2nodeList(NodeInfo.kt:123)]: args[0] = TopActivity(appId=com.flutter3.ctangxin.vf0egg, activityId=com.example.flutter3_frame.MainActivity)
args[1] = 快照收集:22, 耗时:11ms
22:08:31.589 D/GkdAbService [DefaultDispatcher-worker-8, li.songe.gkd.service.GkdAbService$1$7$1.emit(GkdAbService.kt:301)]: TopActivity(appId=com.miui.home, activityId=com.miui.home.launcher.Launcher)
22:08:36.196 D/GkdAbService [DefaultDispatcher-worker-4, li.songe.gkd.service.GkdAbService$1$7$1.emit(GkdAbService.kt:301)]: args[0] = TopActivity(appId=com.flutter3.ctangxin.vf0egg, activityId=com.example.flutter3_frame.MainActivity)
args[1] = subsId:0, gKey=1, gName:广告弹窗, ruleIndex:0, rKey:null, active:true
args[2] = subsId:0, gKey=2, gName:公告弹窗, ruleIndex:0, rKey:null, active:true
22:08:46.622 D/GkdAbService [DefaultDispatcher-worker-6, li.songe.gkd.service.GkdAbService$1$7$1.emit(GkdAbService.kt:301)]: TopActivity(appId=com.miui.home, activityId=com.miui.home.launcher.Launcher)
22:08:47.234 D/GkdAbService [DefaultDispatcher-worker-6, li.songe.gkd.service.GkdAbService$1$newQueryTask$1.invokeSuspend(GkdAbService.kt:136)]: args[0] = FrameLayout > View > View > View[index=0] > View > ImageView[childCount=1] + View[clickable=true && desc=null]
args[1] = AttrInfo(id=, name=android.view.View, text=null, desc=null, clickable=true, focusable=true, checkable=false, checked=false, longClickable=false, visibleToUser=false, left=366, top=1931, right=407, bottom=1971, width=41, height=40, childCount=0, index=0, depth=0)
args[2] = ActionResult(action=clickNode, result=true)
22:08:47.409 D/GkdAbService [DefaultDispatcher-worker-8, li.songe.gkd.service.GkdAbService$1$7$1.emit(GkdAbService.kt:301)]: args[0] = TopActivity(appId=com.flutter3.ctangxin.vf0egg, activityId=null)
args[1] = subsId:0, gKey=1, gName:广告弹窗, ruleIndex:0, rKey:null, active:false
args[2] = subsId:0, gKey=2, gName:公告弹窗, ruleIndex:0, rKey:null, active:true
22:08:50.322 D/GkdAbService [DefaultDispatcher-worker-6, li.songe.gkd.service.GkdAbService$1$newQueryTask$1.invokeSuspend(GkdAbService.kt:136)]: args[0] = @[desc="取消"][clickable=true] + [desc="确定"]
args[1] = AttrInfo(id=, name=android.view.View, text=null, desc=取消, clickable=true, focusable=true, checkable=false, checked=false, longClickable=false, visibleToUser=true, left=240, top=1559, right=504, bottom=1658, width=264, height=99, childCount=0, index=0, depth=0)
args[2] = ActionResult(action=clickNode, result=true)
22:08:55.387 D/GkdAbService [DefaultDispatcher-worker-8, li.songe.gkd.service.GkdAbService$1$7$1.emit(GkdAbService.kt:301)]: TopActivity(appId=com.miui.home, activityId=com.miui.home.launcher.Launcher)
22:08:57.607 D/GkdAbService [DefaultDispatcher-worker-6, li.songe.gkd.service.GkdAbService$1$7$1.emit(GkdAbService.kt:301)]: TopActivity(appId=li.songe.gkd.debug, activityId=li.songe.gkd.MainActivity)
是否系从开屏到进入主界面 出现弹窗,5s时间太长导致GKD休眠了,但是从后台二次进入app时,弹窗仍在,也只发生了一次点击
腾讯视频8.9.95.28007开屏广告出现上述情况
进入首页后的广告弹窗规则是对的,但是无法跳过。对现有规则精简到如下后依然无用
测试这个应用在界面变化出现弹窗的时候并不会发出无障碍事件, gkd 无法感知界面变化从而运行规则
我设置了matchDelay: 5000,但是刚打开app,5秒无法跳过的开屏广告过后,也并没有触发匹配广告弹窗
。切一下后台matchDelay: 5000后倒是可以触发匹配。但是重叠的2个广告弹窗,只跳了一个
************* Log Head ****************
Date of Log : 2023_12_24
Rom Info : RomInfo{name=xiaomi, version=V14.0.8.0.TKHCNXM}
Device Manufacturer: Xiaomi
Device Model : M2012K11AC
Android Version : 13
Android SDK : 33
App VersionName : 1.5.4
App VersionCode : 14
************* Log Head ****************
17:49:26.912 D/SourceFile [DefaultDispatcher-worker-5, li.songe.gkd.service.GkdAbService$1$5$1.emit(SourceFile:1)]: TopActivity(appId=com.miui.home, activityId=com.miui.home.launcher.Launcher, number=1)
17:49:28.270 D/SourceFile [DefaultDispatcher-worker-8, li.songe.gkd.service.GkdAbService$1$5$1.emit(SourceFile:1)]: args[0] = TopActivity(appId=com.flutter3.ctangxin.vf0egg, activityId=com.example.flutter3_frame.MainActivity, number=1)
args[1] = id:-1, v:0, gKey=1, gName:广告弹窗, rIndex:0, rKey:null, rCode:4
args[2] = id:-1, v:0, gKey=2, gName:公告弹窗, rIndex:0, rKey:null, rCode:0
17:49:43.983 D/ComplexSnapshotKt [DefaultDispatcher-worker-9, li.songe.gkd.data.ComplexSnapshotKt.createComplexSnapshot(ComplexSnapshotKt.java:144)]: args[0] = TopActivity(appId=com.flutter3.ctangxin.vf0egg, activityId=com.example.flutter3_frame.MainActivity, number=1)
args[1] = 快照收集:13, 耗时:6ms
17:49:52.561 D/SourceFile [DefaultDispatcher-worker-3, li.songe.gkd.service.GkdAbService$1$5$1.emit(SourceFile:1)]: TopActivity(appId=com.miui.home, activityId=com.miui.home.launcher.Launcher, number=1)
17:49:53.363 D/SourceFile [DefaultDispatcher-worker-1, li.songe.gkd.service.GkdAbService$1$5$1.emit(SourceFile:1)]: args[0] = TopActivity(appId=com.flutter3.ctangxin.vf0egg, activityId=null, number=0)
args[1] = id:-1, v:0, gKey=1, gName:广告弹窗, rIndex:0, rKey:null, rCode:4
args[2] = id:-1, v:0, gKey=2, gName:公告弹窗, rIndex:0, rKey:null, rCode:0
17:49:58.182 D/SourceFile [DefaultDispatcher-worker-3, li.songe.gkd.service.GkdAbService$1$newQueryTask$1.invoke(SourceFile:2)]: args[0] = FrameLayout > View > View > View[index=0] > View > ImageView[childCount=1] + View[clickable=true && desc=null]
args[1] = AttrInfo(id=, vid=null, name=android.view.View, text=null, desc=null, clickable=true, focusable=true, checkable=false, checked=false, editable=false, longClickable=false, visibleToUser=true, left=471, top=1719, right=609, bottom=1856, width=138, height=137, childCount=0, index=0, depth=0)
args[2] = ActionResult(action=clickNode, result=true)
17:50:01.075 D/SourceFile [DefaultDispatcher-worker-9, li.songe.gkd.service.GkdAbService$1$5$1.emit(SourceFile:1)]: TopActivity(appId=com.miui.home, activityId=com.miui.home.launcher.Launcher, number=2)
17:50:03.615 D/SourceFile [DefaultDispatcher-worker-5, li.songe.gkd.service.GkdAbService$1$5$1.emit(SourceFile:1)]: args[0] = TopActivity(appId=com.flutter3.ctangxin.vf0egg, activityId=null, number=0)
args[1] = id:-1, v:0, gKey=1, gName:广告弹窗, rIndex:0, rKey:null, rCode:4
args[2] = id:-1, v:0, gKey=2, gName:公告弹窗, rIndex:0, rKey:null, rCode:0
17:50:08.412 D/SourceFile [DefaultDispatcher-worker-8, li.songe.gkd.service.GkdAbService$1$newQueryTask$1.invoke(SourceFile:2)]: args[0] = FrameLayout > View > View > View[index=0] > View > ImageView[childCount=1] + View[clickable=true && desc=null]
args[1] = AttrInfo(id=, vid=null, name=android.view.View, text=null, desc=null, clickable=true, focusable=true, checkable=false, checked=false, editable=false, longClickable=false, visibleToUser=true, left=471, top=1719, right=609, bottom=1856, width=138, height=137, childCount=0, index=0, depth=0)
args[2] = ActionResult(action=clickNode, result=true)
17:50:08.552 D/SourceFile [DefaultDispatcher-worker-8, li.songe.gkd.service.GkdAbService$1$newQueryTask$1.invoke(SourceFile:2)]: args[0] = @[desc="取消"][clickable=true] + [desc="确定"]
args[1] = AttrInfo(id=, vid=null, name=android.view.View, text=null, desc=取消, clickable=true, focusable=true, checkable=false, checked=false, editable=false, longClickable=false, visibleToUser=true, left=240, top=1559, right=504, bottom=1658, width=264, height=99, childCount=0, index=0, depth=0)
args[2] = ActionResult(action=clickNode, result=true)
17:50:11.216 D/SourceFile [DefaultDispatcher-worker-3, li.songe.gkd.service.GkdAbService$1$5$1.emit(SourceFile:1)]: TopActivity(appId=li.songe.gkd, activityId=li.songe.gkd.MainActivity, number=1)
切换后台再切回来可以主动让 gkd 感知变化
使用 matchDelay 可以让 gkd 在一段时间后主动运行一次查询任务
使用 matchDelay 可以让 gkd 在一段时间后主动运行一次查询任务
如17:49:28.270
日志所示,等待无法跳过的5s开屏过后,并未正确作用于广告弹窗
没看懂你想说啥,你刚切回来所有规则的状态都要重置,也就是开始重新延迟
17:49:28.270 反应的状态是正确的,哪里有不对?
17:49:28.270
17:49:28.270 是正确的,但matchDelay:5000后不是应该触发一次主动的匹配查询吗,这时候已经有广告弹窗了,应该是可以匹配查询到的
我不知道为什么 17:49:28.270 之后的 5s 不触发
但是从 17:50:03.615 来看,5s 后是触发了的
我不知道为什么 17:49:28.270 之后的 5s 不触发
但是从 17:50:03.615 来看,5s 后是触发了的
这个是我切一下桌面(不杀后台),再切回去就能跳一下了
从第一次进入应用 5000ms 后并没有出现广告弹窗,你换成 7000ms 就可以触发了
从第一次进入应用 5000ms 后并没有出现广告弹窗,你换成 7000ms 就可以触发了
改成7000可以了。 还有个问题,就是有2个广告弹窗,每次却只点了一个
因为 7000ms 这个时刻的界面只有一个规则匹配,底下那个弹窗属于另一个窗口不在 gkd 的匹配范围
一个换成 7000ms,另一个换成 8000ms 估计就可以
一个换成 8000ms 估计就
它一共叠了3个弹窗,最底下是公共弹窗
,上面2个是广告弹窗
,规则都是对的。
现在就是7000ms后,只点了最顶层的广告弹窗
,第2层广告弹窗
没一次点掉。
我简单给代码GkdAbService.kt
加了几行日志输出,发现第1层点掉后,点第2层时,到val target = rule.query(nodeVal) ?: continue
就结束了。
大佬麻烦再研究下
一个换成 8000ms 估计就
它一共叠了3个弹窗,最底下是
公共弹窗
,上面2个是广告弹窗
,规则都是对的。 现在就是7000ms后,只点了最顶层的广告弹窗
,第2层广告弹窗
没一次点掉。 我简单给代码GkdAbService.kt
加了几行日志输出,发现第1层点掉后,点第2层时,到val target = rule.query(nodeVal) ?: continue
就结束了。大佬麻烦再研究下
刚测试了下,点击后 页面activityIds
无变化时,规则无法连续触发
如下,点击手机设置里的Android 版本 13
版本号,确认连续点击失败
{
id: 'com.android.settings',
name: '设置',
groups: [
{
key: 1,
name: '点击测试',
quickFind: true,
matchTime: 10000,
actionMaximum: 5,
resetMatch: 'app',
rules: '@[id="com.android.settings:id/base_card_item"] [text="Android 版本"]',
snapshotUrls: 'https://i.gkd.li/import/13766619',
},
],
}
************* Log Head ****************
Date of Log : 2023_12_25
Rom Info : RomInfo{name=xiaomi, version=V14.0.8.0.TKHCNXM}
Device Manufacturer: Xiaomi
Device Model : M2012K11AC
Android Version : 13
Android SDK : 33
App VersionName : 1.5.4
App VersionCode : 14
************* Log Head ****************
23:34:32.303 D/SourceFile [DefaultDispatcher-worker-4, li.songe.gkd.service.GkdAbService$1$6$1.emit(SourceFile:1)]: TopActivity(appId=com.miui.home, activityId=com.miui.home.launcher.Launcher, number=1)
23:34:32.502 D/BaseContinuationImpl [DefaultDispatcher-worker-6, kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:11)]: args[0] = @[id="com.android.settings:id/base_card_item"] [text="Android 版本"]
args[1] = AttrInfo(id=null, vid=null, name=android.widget.FrameLayout, text=null, desc=null, clickable=false, focusable=false, checkable=false, checked=false, editable=false, longClickable=false, visibleToUser=true, left=564, top=844, right=1032, bottom=1886, width=468, height=1042, childCount=1, index=0, depth=0)
args[2] = ActionResult(action=clickNode, result=true)
23:34:32.846 D/SourceFile [DefaultDispatcher-worker-7, li.songe.gkd.service.GkdAbService$1$6$1.emit(SourceFile:1)]: args[0] = TopActivity(appId=com.android.settings, activityId=com.android.settings.SubSettings, number=1)
args[1] = id:-1, v:0, gKey=1, gName:点击测试, rIndex:0, rKey:null, rCode:6
23:34:37.837 D/SourceFile [DefaultDispatcher-worker-3, li.songe.gkd.service.GkdAbService$1$6$1.emit(SourceFile:1)]: TopActivity(appId=com.miui.home, activityId=com.miui.home.launcher.Launcher, number=1)
23:34:38.165 D/SourceFile [DefaultDispatcher-worker-9, li.songe.gkd.service.GkdAbService$1$6$1.emit(SourceFile:1)]: TopActivity(appId=li.songe.gkd, activityId=li.songe.gkd.MainActivity, number=2)
23:35:41.481 D/SourceFile [DefaultDispatcher-worker-8, li.songe.gkd.service.GkdAbService$1$6$1.emit(SourceFile:1)]: TopActivity(appId=com.miui.aod, activityId=null, number=0)
规则无法连续触发
actionCd 默认值为 1000 ,rCode:6
代表处于冷却时间,调整 actionCd 为其它值即可
规则无法连续触发
actionCd 默认值为 1000 ,
rCode:6
代表处于冷却时间,调整 actionCd 为其它值即可
但cd结束了也没有继续点击,actionCd
设置200
和2000
都没效果
界面需要产生无障碍事件才能触发规则查询
你的点击可能并没有导致界面触发无障碍事件
因此规则没有运行
请问在 v1.6.3 此问题是否仍然存在?
请问在 v1.6.3 此问题是否仍然存在?
依然只能跳1次
21:57:56.502 D/SourceFile [DefaultDispatcher-worker-6, li.songe.gkd.service.GkdAbService$1$6$1.emit(SourceFile:1)]: TopActivity(appId=com.miui.home, activityId=com.miui.home.launcher.Launcher, number=1)
21:57:57.402 D/SourceFile [DefaultDispatcher-worker-5, li.songe.gkd.service.GkdAbService$1$6$1.emit(SourceFile:1)]: args[0] = TopActivity(appId=com.flutter3.ctangxin.vf0egg, activityId=com.example.flutter3_frame.MainActivity, number=1)
args[1] = id:-1, v:1, type:app, gKey=1, gName:广告弹窗, index:0, key:null, status:处于匹配延迟
args[2] = id:-1, v:1, type:app, gKey=2, gName:公告弹窗, index:0, key:null, status:ok
args[3] = id:0, v:182, type:global, gKey=0, gName:开屏广告, index:0, key:0, status:ok
args[4] = id:0, v:182, type:global, gKey=0, gName:开屏广告, index:1, key:-1, status:ok
21:58:05.046 D/BaseContinuationImpl [DefaultDispatcher-worker-5, kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl.java:11)]: args[0] = id:-1, v:1, type:app, gKey=1, gName:广告弹窗, index:0, key:null, status:处于冷却时间
args[1] = AttrInfo(id=null, vid=null, name=android.widget.FrameLayout, text=null, desc=null, clickable=false, focusable=false, checkable=false, checked=false, editable=false, longClickable=false, visibleToUser=true, left=0, top=0, right=1080, bottom=2400, width=1080, height=2400, childCount=2, index=0, depth=0)
args[2] = ActionResult(action=clickNode, result=true)
21:58:22.401 D/SourceFile [DefaultDispatcher-worker-7, li.songe.gkd.service.GkdAbService$1$6$1.emit(SourceFile:1)]: TopActivity(appId=li.songe.gkd, activityId=li.songe.gkd.MainActivity, number=1)
你好,使用这个 https://github.com/gkd-kit/gkd/actions/runs/7399770751 搭配如下规则应该可行了,在我手机上测试通过
{
id: 'com.flutter3.ctangxin.ef0eee', // 注意 appId 有随机后缀, 需修改为你自己的 appId
name: '糖心Vlog',
groups: [
{
key: 1,
name: '广告弹窗',
matchDelay: 7000,
actionCd: 100,
rules: [
{
matches:
'FrameLayout > View > View > View[index=0] > View > ImageView[childCount=1] + View[clickable=true && desc=null]',
snapshotUrls: 'https://i.gkd.li/import/12836891',
},
],
},
{
key: 2,
name: '公告弹窗',
rules: [
{
matches: '@[desc="取消"][clickable=true] + [desc="确定"]',
snapshotUrls: 'https://i.gkd.li/import/12836854',
},
],
},
],
}
麻烦有空测试一下
另外问一下,这个 app 有破解版没
你好,使用这个 https://github.com/gkd-kit/gkd/actions/runs/7399770751 搭配如下规则应该可行了,在我手机上测试通过
{ id: 'com.flutter3.ctangxin.ef0eee', // 注意 appId 有随机后缀, 需修改为你自己的 appId name: '糖心Vlog', groups: [ { key: 1, name: '广告弹窗', matchDelay: 7000, actionCd: 100, rules: [ { matches: 'FrameLayout > View > View > View[index=0] > View > ImageView[childCount=1] + View[clickable=true && desc=null]', snapshotUrls: 'https://i.gkd.li/import/12836891', }, ], }, { key: 2, name: '公告弹窗', rules: [ { matches: '@[desc="取消"][clickable=true] + [desc="确定"]', snapshotUrls: 'https://i.gkd.li/import/12836854', }, ], }, ], }
麻烦有空测试一下
另外问一下,这个 app 有破解版没
辛苦大佬,经测试有效。暂未找到破解版,不过我直接在模拟器上下载绑定过推荐,可以获得几天vip奖励
https://github.com/gkd-kit/gkd/releases