我找到了一个检测位置欺骗并返回警告屏幕的应用程序。[1]:https ://i.stack.imgur.com/qbhuU.jpg
然后我尝试对应用程序进行逆向工程并删除isFromMockProvider()
检查位置数据是否来自模拟位置提供程序的功能。我从一个 smali 文件中找到了这些代码行
method public onLocationChanged(Landroid/location/Location;)V
.registers 10
.annotation build Landroidx/annotation/RequiresApi;
api = 0x12
.end annotation
const-string v0, "0"
.line 1
invoke-virtual {p1}, Landroid/location/Location;->isFromMockProvider()Z
move-result v1
const-string v2, "IS_MOCK"
const-string v3, "LIVE_TRACKING_MOCK_LOCATION"
if-eqz v1, :cond_1e
.line 2
new-instance p1, Landroid/content/Intent;
invoke-direct {p1, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string v0, "false"
.line 3
invoke-virtual {p1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
.line 4
invoke-static {p0}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->getInstance(Landroid/content/Context;)Landroidx/localbroadcastmanager/content/LocalBroadcastManager;
move-result-object v0
invoke-virtual {v0, p1}, Landroidx/localbroadcastmanager/content/LocalBroadcastManager;->sendBroadcast(Landroid/content/Intent;)Z
return-void
.line 5
:cond_1e
new-instance v1, Landroid/content/Intent;
invoke-direct {v1, v3}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const-string v3, "false"
此处必须进行哪些更改以防止检测到模拟位置?