返回列表 发新帖

[悬赏求助] 求教过模拟器检测

[复制链接]

2

主题

50

帖子

204

积分

初中生

Rank: 3Rank: 3

金币
14
好评
0
贡献
0
发表在  2019-9-3 08:23:34 来自手机  | 显示全部楼层 | 阅读模式
20金币
本帖最后由 ℒℴѵℯ 于 2019-9-3 08:31 编辑

求教大佬,这个软件检测模拟器怎么写HOOK,或者能不能改系统文件

  1. //
  2. // Decompiled by Jadx - 1387ms
  3. //
  4. package com.xm.bottle.activity.start;

  5. import android.content.pm.PackageManager;
  6. import android.os.Bundle;
  7. import android.support.annotation.Nullable;
  8. import com.amap.api.location.AMapLocationClient;
  9. import com.amap.api.location.AMapLocationClientOption;
  10. import com.amap.api.location.AMapLocationClientOption.AMapLocationMode;
  11. import com.stub.StubApp;
  12. import com.xm.bottle.activity.AppBaseActivity;
  13. import com.xm.bottle.dialog.BaseDialog;
  14. import com.xm.bottle.servlet.UpdateServlet;
  15. import com.xm.bottle.utils.LogUtil;
  16. import com.yanzhenjie.permission.PermissionNo;
  17. import com.yanzhenjie.permission.PermissionYes;
  18. import java.util.List;

  19. public class WelcomeActivity extends AppBaseActivity {
  20.    private static final String TAG = "WelcomeActivity";
  21.    public AMapLocationClientOption mLocationOption = null;
  22.    public AMapLocationClient mlocationClient;

  23.    static {
  24.       StubApp.interface11(4692);
  25.    }

  26.    protected native void onCreate(@Nullable Bundle bundle);

  27.    private void next() {
  28.       PackageManager pm = getPackageManager();
  29.       boolean telephony = pm.hasSystemFeature("android.hardware.telephony");
  30.       boolean gsm = pm.hasSystemFeature("android.hardware.telephony.gsm");
  31.       boolean wifi = pm.hasSystemFeature("android.hardware.wifi");
  32.       boolean cam = pm.hasSystemFeature("android.hardware.camera");
  33.       boolean gyr = pm.hasSystemFeature("android.hardware.sensor.gyroscope");
  34.       boolean light = pm.hasSystemFeature("android.hardware.sensor.light");
  35.       LogUtil.e(TAG, "是否支持电话:" + telephony);
  36.       LogUtil.e(TAG, "是否支持GSM:" + gsm);
  37.       LogUtil.e(TAG, "是否支持WIFI:" + wifi);
  38.       LogUtil.e(TAG, "是否支持相机:" + cam);
  39.       LogUtil.e(TAG, "是否支持陀螺仪:" + gyr);
  40.       LogUtil.e(TAG, "是否支持光线传感器:" + light);
  41.       if (telephony && gsm && wifi && cam && light) {
  42.          new UpdateServlet(this).execute(new String[0]);
  43.          return;
  44.       }
  45. 弹窗提示为模拟器
  46.       BaseDialog dialog = new BaseDialog(this);
  47.       dialog.setTitle(0x7f09007a);
  48.       dialog.setMessage(getString(0x7f090090));
  49.       dialog.setOk(getString(0x7f090121), new 2(this));
  50.    }

  51.    @PermissionYes(100)
  52.    private void onPermissionYes(List<String> list) {
  53.       location();
  54.       next();
  55.    }

  56.    @PermissionNo(100)
  57.    private void onPermissionNo(List<String> list) {
  58.       next();
  59.    }

  60.    private void location() {
  61.       this.mlocationClient = new AMapLocationClient(StubApp.getOrigApplicationContext(getApplicationContext()));
  62.       this.mLocationOption = new AMapLocationClientOption();
  63.       this.mlocationClient.setLocationListener(new 3(this));
  64.       this.mLocationOption.setNeedAddress(true);
  65.       this.mLocationOption.setLocationMode(AMapLocationMode.Hight_Accuracy);
  66.       this.mLocationOption.setInterval(2000);
  67.       this.mLocationOption.setOnceLocation(true);
  68.       this.mLocationOption.setOnceLocationLatest(true);
  69.       this.mlocationClient.setLocationOption(this.mLocationOption);
  70.       this.mlocationClient.startLocation();
  71.    }
  72. }
复制代码

  1. .class public Lcom/xm/bottle/activity/start/WelcomeActivity;
  2. .super Lcom/xm/bottle/activity/AppBaseActivity;
  3. .source "WelcomeActivity.java"



  4. # static fields
  5. .field private static final TAG:Ljava/lang/String; = "WelcomeActivity"


  6. # instance fields
  7. .field public mLocationOption:Lcom/amap/api/location/AMapLocationClientOption;

  8. .field public mlocationClient:Lcom/amap/api/location/AMapLocationClient;


  9. # direct methods
  10. .method static constructor <clinit>()V
  11.    .registers 2

  12.    const v0, 0x1254

  13.    invoke-static {v0}, Lcom/stub/StubApp;->interface11(I)V

  14.    return-void
  15. .end method

  16. .method public constructor <init>()V
  17.    .registers 2

  18.    .prologue
  19.    .line 39
  20.    invoke-direct {p0}, Lcom/xm/bottle/activity/AppBaseActivity;-><init>()V

  21.    .line 124
  22.    const/4 v0, 0x0

  23.    iput-object v0, p0, Lcom/xm/bottle/activity/start/WelcomeActivity;->mLocationOption:Lcom/amap/api/location/AMapLocationClientOption;

  24.    return-void
  25. .end method

  26. .method private location()V
  27.    .registers 6

  28.    .prologue
  29.    const/4 v4, 0x1

  30.    .line 127
  31.    new-instance v0, Lcom/amap/api/location/AMapLocationClient;

  32.    invoke-virtual {p0}, Lcom/xm/bottle/activity/start/WelcomeActivity;->getApplicationContext()Landroid/content/Context;

  33.    move-result-object v1

  34.    invoke-static/range {v1 .. v1}, Lcom/stub/StubApp;->getOrigApplicationContext(Landroid/content/Context;)Landroid/content/Context;

  35.    move-result-object v1

  36.    invoke-direct {v0, v1}, Lcom/amap/api/location/AMapLocationClient;-><init>(Landroid/content/Context;)V

  37.    iput-object v0, p0, Lcom/xm/bottle/activity/start/WelcomeActivity;->mlocationClient:Lcom/amap/api/location/AMapLocationClient;

  38.    .line 129
  39.    new-instance v0, Lcom/amap/api/location/AMapLocationClientOption;

  40.    invoke-direct {v0}, Lcom/amap/api/location/AMapLocationClientOption;-><init>()V

  41.    iput-object v0, p0, Lcom/xm/bottle/activity/start/WelcomeActivity;->mLocationOption:Lcom/amap/api/location/AMapLocationClientOption;

  42.    .line 131
  43.    iget-object v0, p0, Lcom/xm/bottle/activity/start/WelcomeActivity;->mlocationClient:Lcom/amap/api/location/AMapLocationClient;

  44.    new-instance v1, Lcom/xm/bottle/activity/start/WelcomeActivity$3;

  45.    invoke-direct {v1, p0}, Lcom/xm/bottle/activity/start/WelcomeActivity$3;-><init>(Lcom/xm/bottle/activity/start/WelcomeActivity;)V

  46.    invoke-virtual {v0, v1}, Lcom/amap/api/location/AMapLocationClient;->setLocationListener(Lcom/amap/api/location/AMapLocationListener;)V

  47.    .line 169
  48.    iget-object v0, p0, Lcom/xm/bottle/activity/start/WelcomeActivity;->mLocationOption:Lcom/amap/api/location/AMapLocationClientOption;

  49.    invoke-virtual {v0, v4}, Lcom/amap/api/location/AMapLocationClientOption;->setNeedAddress(Z)Lcom/amap/api/location/AMapLocationClientOption;

  50.    .line 171
  51.    iget-object v0, p0, Lcom/xm/bottle/activity/start/WelcomeActivity;->mLocationOption:Lcom/amap/api/location/AMapLocationClientOption;

  52.    sget-object v1, Lcom/amap/api/location/AMapLocationClientOption$AMapLocationMode;->Hight_Accuracy:Lcom/amap/api/location/AMapLocationClientOption$AMapLocationMode;

  53.    invoke-virtual {v0, v1}, Lcom/amap/api/location/AMapLocationClientOption;->setLocationMode(Lcom/amap/api/location/AMapLocationClientOption$AMapLocationMode;)Lcom/amap/api/location/AMapLocationClientOption;

  54.    .line 173
  55.    iget-object v0, p0, Lcom/xm/bottle/activity/start/WelcomeActivity;->mLocationOption:Lcom/amap/api/location/AMapLocationClientOption;

  56.    const-wide/16 v2, 0x7d0

  57.    invoke-virtual {v0, v2, v3}, Lcom/amap/api/location/AMapLocationClientOption;->setInterval(J)Lcom/amap/api/location/AMapLocationClientOption;

  58.    .line 174
  59.    iget-object v0, p0, Lcom/xm/bottle/activity/start/WelcomeActivity;->mLocationOption:Lcom/amap/api/location/AMapLocationClientOption;

  60.    invoke-virtual {v0, v4}, Lcom/amap/api/location/AMapLocationClientOption;->setOnceLocation(Z)Lcom/amap/api/location/AMapLocationClientOption;

  61.    .line 175
  62.    iget-object v0, p0, Lcom/xm/bottle/activity/start/WelcomeActivity;->mLocationOption:Lcom/amap/api/location/AMapLocationClientOption;

  63.    invoke-virtual {v0, v4}, Lcom/amap/api/location/AMapLocationClientOption;->setOnceLocationLatest(Z)Lcom/amap/api/location/AMapLocationClientOption;

  64.    .line 177
  65.    iget-object v0, p0, Lcom/xm/bottle/activity/start/WelcomeActivity;->mlocationClient:Lcom/amap/api/location/AMapLocationClient;

  66.    iget-object v1, p0, Lcom/xm/bottle/activity/start/WelcomeActivity;->mLocationOption:Lcom/amap/api/location/AMapLocationClientOption;

  67.    invoke-virtual {v0, v1}, Lcom/amap/api/location/AMapLocationClient;->setLocationOption(Lcom/amap/api/location/AMapLocationClientOption;)V

  68.    .line 183
  69.    iget-object v0, p0, Lcom/xm/bottle/activity/start/WelcomeActivity;->mlocationClient:Lcom/amap/api/location/AMapLocationClient;

  70.    invoke-virtual {v0}, Lcom/amap/api/location/AMapLocationClient;->startLocation()V

  71.    .line 184
  72.    return-void
  73. .end method

  74. .method private next()V
  75.    .registers 12

  76.    .prologue
  77.    .line 68
  78.    invoke-virtual {p0}, Lcom/xm/bottle/activity/start/WelcomeActivity;->getPackageManager()Landroid/content/pm/PackageManager;

  79.    move-result-object v5

  80.    .line 70
  81.    .local v5, "pm":Landroid/content/pm/PackageManager;
  82.    const-string/jumbo v8, "android.hardware.telephony"

  83.    invoke-virtual {v5, v8}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z

  84.    move-result v6

  85.    .line 73
  86.    .local v6, "telephony":Z
  87.    const-string/jumbo v8, "android.hardware.telephony.gsm"

  88.    invoke-virtual {v5, v8}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z

  89.    move-result v2

  90.    .line 76
  91.    .local v2, "gsm":Z
  92.    const-string/jumbo v8, "android.hardware.wifi"

  93.    invoke-virtual {v5, v8}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z

  94.    move-result v7

  95.    .line 79
  96.    .local v7, "wifi":Z
  97.    const-string/jumbo v8, "android.hardware.camera"

  98.    invoke-virtual {v5, v8}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z

  99.    move-result v0

  100.    .line 82
  101.    .local v0, "cam":Z
  102.    const-string/jumbo v8, "android.hardware.sensor.gyroscope"

  103.    invoke-virtual {v5, v8}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z

  104.    move-result v3

  105.    .line 85
  106.    .local v3, "gyr":Z
  107.    const-string/jumbo v8, "android.hardware.sensor.light"

  108.    invoke-virtual {v5, v8}, Landroid/content/pm/PackageManager;->hasSystemFeature(Ljava/lang/String;)Z

  109.    move-result v4

  110.    .line 87
  111.    .local v4, "light":Z
  112.    const-string/jumbo v8, "WelcomeActivity"

  113.    new-instance v9, Ljava/lang/StringBuilder;

  114.    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

  115.    const-string/jumbo v10, "是否支持电话:"

  116.    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

  117.    move-result-object v9

  118.    invoke-virtual {v9, v6}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

  119.    move-result-object v9

  120.    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

  121.    move-result-object v9

  122.    invoke-static {v8, v9}, Lcom/xm/bottle/utils/LogUtil;->e(Ljava/lang/String;Ljava/lang/String;)V

  123.    .line 88
  124.    const-string/jumbo v8, "WelcomeActivity"

  125.    new-instance v9, Ljava/lang/StringBuilder;

  126.    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

  127.    const-string/jumbo v10, "是否支持GSM:"

  128.    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

  129.    move-result-object v9

  130.    invoke-virtual {v9, v2}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

  131.    move-result-object v9

  132.    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

  133.    move-result-object v9

  134.    invoke-static {v8, v9}, Lcom/xm/bottle/utils/LogUtil;->e(Ljava/lang/String;Ljava/lang/String;)V

  135.    .line 89
  136.    const-string/jumbo v8, "WelcomeActivity"

  137.    new-instance v9, Ljava/lang/StringBuilder;

  138.    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

  139.    const-string/jumbo v10, "是否支持WIFI:"

  140.    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

  141.    move-result-object v9

  142.    invoke-virtual {v9, v7}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

  143.    move-result-object v9

  144.    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

  145.    move-result-object v9

  146.    invoke-static {v8, v9}, Lcom/xm/bottle/utils/LogUtil;->e(Ljava/lang/String;Ljava/lang/String;)V

  147.    .line 90
  148.    const-string/jumbo v8, "WelcomeActivity"

  149.    new-instance v9, Ljava/lang/StringBuilder;

  150.    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

  151.    const-string/jumbo v10, "是否支持相机:"

  152.    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

  153.    move-result-object v9

  154.    invoke-virtual {v9, v0}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

  155.    move-result-object v9

  156.    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

  157.    move-result-object v9

  158.    invoke-static {v8, v9}, Lcom/xm/bottle/utils/LogUtil;->e(Ljava/lang/String;Ljava/lang/String;)V

  159.    .line 91
  160.    const-string/jumbo v8, "WelcomeActivity"

  161.    new-instance v9, Ljava/lang/StringBuilder;

  162.    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

  163.    const-string/jumbo v10, "是否支持陀螺仪:"

  164.    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

  165.    move-result-object v9

  166.    invoke-virtual {v9, v3}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

  167.    move-result-object v9

  168.    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

  169.    move-result-object v9

  170.    invoke-static {v8, v9}, Lcom/xm/bottle/utils/LogUtil;->e(Ljava/lang/String;Ljava/lang/String;)V

  171.    .line 92
  172.    const-string/jumbo v8, "WelcomeActivity"

  173.    new-instance v9, Ljava/lang/StringBuilder;

  174.    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

  175.    const-string/jumbo v10, "是否支持光线传感器:"

  176.    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

  177.    move-result-object v9

  178.    invoke-virtual {v9, v4}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;

  179.    move-result-object v9

  180.    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

  181.    move-result-object v9

  182.    invoke-static {v8, v9}, Lcom/xm/bottle/utils/LogUtil;->e(Ljava/lang/String;Ljava/lang/String;)V

  183.    .line 94
  184.    if-eqz v6, :cond_e0

  185.    if-eqz v2, :cond_e0

  186.    if-eqz v7, :cond_e0

  187.    if-eqz v0, :cond_e0

  188.    if-eqz v4, :cond_e0

  189.    .line 96
  190.    new-instance v8, Lcom/xm/bottle/servlet/UpdateServlet;

  191.    invoke-direct {v8, p0}, Lcom/xm/bottle/servlet/UpdateServlet;-><init>(Landroid/app/Activity;)V

  192.    const/4 v9, 0x0

  193.    new-array v9, v9, [Ljava/lang/String;

  194.    invoke-virtual {v8, v9}, Lcom/xm/bottle/servlet/UpdateServlet;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

  195.    .line 108
  196.    :goto_df
  197.    return-void

  198.    .line 98
  199.    :cond_e0
  200.    new-instance v1, Lcom/xm/bottle/dialog/BaseDialog;

  201.    invoke-direct {v1, p0}, Lcom/xm/bottle/dialog/BaseDialog;-><init>(Landroid/content/Context;)V

  202.    .line 99
  203.    .local v1, "dialog":Lcom/xm/bottle/dialog/BaseDialog;
  204.    const v8, 0x7f09007a

  205.    invoke-virtual {v1, v8}, Lcom/xm/bottle/dialog/BaseDialog;->setTitle(I)V

  206.    .line 100
  207.    const v8, 0x7f090090

  208.    invoke-virtual {p0, v8}, Lcom/xm/bottle/activity/start/WelcomeActivity;->getString(I)Ljava/lang/String;

  209.    move-result-object v8

  210.    invoke-virtual {v1, v8}, Lcom/xm/bottle/dialog/BaseDialog;->setMessage(Ljava/lang/String;)V

  211.    .line 101
  212.    const v8, 0x7f090121

  213.    invoke-virtual {p0, v8}, Lcom/xm/bottle/activity/start/WelcomeActivity;->getString(I)Ljava/lang/String;

  214.    move-result-object v8

  215.    new-instance v9, Lcom/xm/bottle/activity/start/WelcomeActivity$2;

  216.    invoke-direct {v9, p0}, Lcom/xm/bottle/activity/start/WelcomeActivity$2;-><init>(Lcom/xm/bottle/activity/start/WelcomeActivity;)V

  217.    invoke-virtual {v1, v8, v9}, Lcom/xm/bottle/dialog/BaseDialog;->setOk(Ljava/lang/String;Landroid/view/View$OnClickListener;)V

  218.    goto :goto_df
  219. .end method

  220. .method private onPermissionNo(Ljava/util/List;)V
  221.    .registers 2
  222.    .annotation runtime Lcom/yanzhenjie/permission/PermissionNo;
  223.       value = 0x64
  224.    .end annotation

  225.    .annotation system Ldalvik/annotation/Signature;
  226.       value = {
  227.          "(",
  228.          "Ljava/util/List",
  229.          "<",
  230.          "Ljava/lang/String;",
  231.          ">;)V"
  232.       }
  233.    .end annotation

  234.    .prologue
  235.    .line 118
  236.    .local p1, "deniedPermissions":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
  237.    invoke-direct {p0}, Lcom/xm/bottle/activity/start/WelcomeActivity;->next()V

  238.    .line 119
  239.    return-void
  240. .end method

  241. .method private onPermissionYes(Ljava/util/List;)V
  242.    .registers 2
  243.    .annotation runtime Lcom/yanzhenjie/permission/PermissionYes;
  244.       value = 0x64
  245.    .end annotation

  246.    .annotation system Ldalvik/annotation/Signature;
  247.       value = {
  248.          "(",
  249.          "Ljava/util/List",
  250.          "<",
  251.          "Ljava/lang/String;",
  252.          ">;)V"
  253.       }
  254.    .end annotation

  255.    .prologue
  256.    .line 112
  257.    .local p1, "grantedPermissions":Ljava/util/List;, "Ljava/util/List<Ljava/lang/String;>;"
  258.    invoke-direct {p0}, Lcom/xm/bottle/activity/start/WelcomeActivity;->location()V

  259.    .line 113
  260.    invoke-direct {p0}, Lcom/xm/bottle/activity/start/WelcomeActivity;->next()V

  261.    .line 114
  262.    return-void
  263. .end method


  264. # virtual methods
  265. .method protected native onCreate(Landroid/os/Bundle;)V
  266.    .param p1  # Landroid/os/Bundle;
  267.       .annotation build Landroid/support/annotation/Nullable;
  268.       .end annotation
  269.    .end param
  270. .end method
复制代码

附件: 您需要 登录 才可以下载或查看,没有帐号?立即注册
回复

使用道具 举报

49

主题

728

帖子

1843

积分

高中生

一个笨猪

Rank: 4

金币
419
好评
8
贡献
1

考神

QQ
发表于 2019-9-3 09:21:39 来自手机  | 显示全部楼层
复制进JAVA,AIDE
回复

使用道具 举报

2

主题

50

帖子

204

积分

初中生

Rank: 3Rank: 3

金币
14
好评
0
贡献
0
发表于 2019-9-3 09:43:27 来自手机  | 显示全部楼层
张哥反编译 发表于 2019-9-3 09:21
复制进JAVA,AIDE

大哥,能详细一点吗
回复

使用道具 举报

49

主题

728

帖子

1843

积分

高中生

一个笨猪

Rank: 4

金币
419
好评
8
贡献
1

考神

QQ
发表于 2019-9-3 17:41:33 来自手机  | 显示全部楼层
ℒℴѵℯ 发表于 2019-9-3 09:43
大哥,能详细一点吗

按照我这样同样的方法,提取JAVA
帮助一个人,多一条路。
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表