Chinaunix首页 | 论坛 | 博客
  • 博客访问: 78677
  • 博文数量: 24
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 161
  • 用 户 组: 普通用户
  • 注册时间: 2015-01-04 17:48
文章分类

全部博文(24)

文章存档

2015年(24)

我的朋友

分类: Android平台

2015-09-07 00:06:57

2048 1.1.6.apk 中检测虚拟机函数

0c2bd4-0000ce: final static private org.cocos2dx.lib.Cocos2dxActivity.isAndroidEmulator:()Z


|  .regsize     : [6]  
|  .insnsSize   : [95] 16-bit
|  registers:   v0  v1  v2  v3  v4  v5  


0c2be4: 62013e00        |0000: sget-object v1, field@003e // Landroid/os/Build;.MODEL:Ljava/lang/String;
//虚拟机返回的是sdk,真机返回的是机型
0c2be8: 62039609        |0002: sget-object v3, field@0996 // Lorg/cocos2dx/lib/Cocos2dxActivity;.TAG:Ljava/lang/String;
0c2bec: 22047603        |0004: new-instance v4, class@0376 // Ljava/lang/StringBuilder;
0c2bf0: 1a056122        |0006: const-string v5, string@2261 // "model="
0c2bf4: 7020ce155400    |0008: invoke-direct {v4, v5}, method@15ce // Ljava/lang/StringBuilder;.<init>:(Ljava/lang/String;)V
0c2bfa: 6e20d5151400    |000b: invoke-virtual {v4, v1}, method@15d5 // Ljava/lang/StringBuilder;.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
0c2c00: 0c04            |000e: move-result-object v4
0c2c02: 6e10e1150400    |000f: invoke-virtual {v4}, method@15e1 // Ljava/lang/StringBuilder;.toString:()Ljava/lang/String;
0c2c08: 0c04            |0012: move-result-object v4
0c2c0a: 7120a80c4300    |0013: invoke-static {v3, v4}, method@0ca8 // Landroid/util/Log;.d:(Ljava/lang/String;Ljava/lang/String;)I
0c2c10: 62023f00        |0016: sget-object v2, field@003f // Landroid/os/Build;.PRODUCT:Ljava/lang/String;
//虚拟机返回的sdk,真机返回机型相关

0c2c14: 62039609        |0018: sget-object v3, field@0996 // Lorg/cocos2dx/lib/Cocos2dxActivity;.TAG:Ljava/lang/String;
0c2c18: 22047603        |001a: new-instance v4, class@0376 // Ljava/lang/StringBuilder;
0c2c1c: 1a054d25        |001c: const-string v5, string@254d // "product="
0c2c20: 7020ce155400    |001e: invoke-direct {v4, v5}, method@15ce // Ljava/lang/StringBuilder;.<init>:(Ljava/lang/String;)V
0c2c26: 6e20d5152400    |0021: invoke-virtual {v4, v2}, method@15d5 // Ljava/lang/StringBuilder;.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
0c2c2c: 0c04            |0024: move-result-object v4
0c2c2e: 6e10e1150400    |0025: invoke-virtual {v4}, method@15e1 // Ljava/lang/StringBuilder;.toString:()Ljava/lang/String;
0c2c34: 0c04            |0028: move-result-object v4
0c2c36: 7120a80c4300    |0029: invoke-static {v3, v4}, method@0ca8 // Landroid/util/Log;.d:(Ljava/lang/String;Ljava/lang/String;)I
0c2c3c: 1200            |002c: const/4 v0, #int 0 // #0
0c2c3e: 38021b00        |002d: if-eqz v2, 0048 // +001b
0c2c42: 1a03d426        |002f: const-string v3, string@26d4 // "sdk"
0c2c46: 6e20a2153200    |0031: invoke-virtual {v2, v3}, method@15a2 // Ljava/lang/String;.equals:(Ljava/lang/Object;)Z
0c2c4c: 0a03            |0034: move-result v3
0c2c4e: 39032800        |0035: if-nez v3, 005d // +0028
0c2c52: 1a03d814        |0037: const-string v3, string@14d8 // "_sdk"
0c2c56: 6e20a0153200    |0039: invoke-virtual {v2, v3}, method@15a0 // Ljava/lang/String;.contains:(Ljava/lang/CharSequence;)Z
0c2c5c: 0a03            |003c: move-result v3
0c2c5e: 39032000        |003d: if-nez v3, 005d // +0020
0c2c62: 1a03e126        |003f: const-string v3, string@26e1 // "sdk_"
0c2c66: 6e20a0153200    |0041: invoke-virtual {v2, v3}, method@15a0 // Ljava/lang/String;.contains:(Ljava/lang/CharSequence;)Z
0c2c6c: 0a03            |0044: move-result v3
0c2c6e: 39031800        |0045: if-nez v3, 005d // +0018
0c2c72: 1200            |0047: const/4 v0, #int 0 // #0
0c2c74: 62039609        |0048: sget-object v3, field@0996 // Lorg/cocos2dx/lib/Cocos2dxActivity;.TAG:Ljava/lang/String;
0c2c78: 22047603        |004a: new-instance v4, class@0376 // Ljava/lang/StringBuilder;
0c2c7c: 1a05ae1e        |004c: const-string v5, string@1eae // "isEmulator="
0c2c80: 7020ce155400    |004e: invoke-direct {v4, v5}, method@15ce // Ljava/lang/StringBuilder;.<init>:(Ljava/lang/String;)V
0c2c86: 6e20d6150400    |0051: invoke-virtual {v4, v0}, method@15d6 // Ljava/lang/StringBuilder;.append:(Z)Ljava/lang/StringBuilder;
0c2c8c: 0c04            |0054: move-result-object v4
0c2c8e: 6e10e1150400    |0055: invoke-virtual {v4}, method@15e1 // Ljava/lang/StringBuilder;.toString:()Ljava/lang/String;
0c2c94: 0c04            |0058: move-result-object v4
0c2c96: 7120a80c4300    |0059: invoke-static {v3, v4}, method@0ca8 // Landroid/util/Log;.d:(Ljava/lang/String;Ljava/lang/String;)I
0c2c9c: 0f00            |005c: return v0
0c2c9e: 1210            |005d: const/4 v0, #int 1 // #1
0c2ca0: 28ea            |005e: goto 0048 // -0016


      catches       : (none)
======================================================
//BOARD 主板
String phoneInfo = "BOARD: " + android.os.Build.BOARD;
phoneInfo += ", BOOTLOADER: " + android.os.Build.BOOTLOADER;
//BRAND 运营商
phoneInfo += ", BRAND: " + android.os.Build.BRAND;
phoneInfo += ", CPU_ABI: " + android.os.Build.CPU_ABI;
phoneInfo += ", CPU_ABI2: " + android.os.Build.CPU_ABI2;
//DEVICE 驱动
phoneInfo += ", DEVICE: " + android.os.Build.DEVICE;
//DISPLAY 显示
phoneInfo += ", DISPLAY: " + android.os.Build.DISPLAY;
//指纹
phoneInfo += ", FINGERPRINT: " + android.os.Build.FINGERPRINT;
//HARDWARE 硬件
phoneInfo += ", HARDWARE: " + android.os.Build.HARDWARE;
phoneInfo += ", HOST: " + android.os.Build.HOST;
phoneInfo += ", ID: " + android.os.Build.ID;
//MANUFACTURER 生产厂家
phoneInfo += ", MANUFACTURER: " + android.os.Build.MANUFACTURER;
//MODEL 机型
phoneInfo += ", MODEL: " + android.os.Build.MODEL;
phoneInfo += ", PRODUCT: " + android.os.Build.PRODUCT;
phoneInfo += ", RADIO: " + android.os.Build.RADIO;
phoneInfo += ", RADITAGSO: " + android.os.Build.TAGS;
phoneInfo += ", TIME: " + android.os.Build.TIME;
phoneInfo += ", TYPE: " + android.os.Build.TYPE;
phoneInfo += ", USER: " + android.os.Build.USER;
//VERSION.RELEASE 固件版本
phoneInfo += ", VERSION.RELEASE: " + android.os.Build.VERSION.RELEASE;
phoneInfo += ", VERSION.CODENAME: " + android.os.Build.VERSION.CODENAME;
//VERSION.INCREMENTAL 基带版本
phoneInfo += ", VERSION.INCREMENTAL: " + android.os.Build.VERSION.INCREMENTAL;
//VERSION.SDK SDK版本
phoneInfo += ", VERSION.SDK: " + android.os.Build.VERSION.SDK;
phoneInfo += ", VERSION.SDK_INT: " + android.os.Build.VERSION.SDK_INT;
阅读(1364) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~