内容纲要

Android开发

引用res/string变量

String flag1 = getString(R.string.first);

引用Manifest.xml变量

ApplicationInfo

image-20210726202026482

即对AndroidManifest.xml的引用

image-20210726201857997

PackageManager pm = this.getPackageManager();
        String pn = this.getPackageName();
        ApplicationInfo appInfo = null;
        try {
            appInfo = pm.getApplicationInfo(pn, PackageManager.GET_META_DATA);
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
        }
        String flag2=appInfo.metaData.getString("second");

axml和xml

.axml用于layout

maven仓库

https://www.jianshu.com/p/41b3e906f60c

image-20211007032351223

image-20211007032429903

image-20211007032440741

image-20211007032445866

image-20211007032450428

image-20211007032455469

引用包

image-20211007032551846

image-20211007032544223

官方文档

//buildscript里是gradle脚本执行所需依赖,分别是对应的maven库和插件

//allprojects里是项目本身需要的依赖

AS添加依赖后,未引用也会被加载

@JSONField

image-20211007011506036

https://blog.csdn.net/u011425751/article/details/51219242

Toast

//默认效果
Toast.makeText(getApplicationContext(), "默认Toast样式",
     Toast.LENGTH_SHORT).show();
//自定义位置
toast = Toast.makeText(getApplicationContext(),
     "自定义位置Toast", Toast.LENGTH_LONG);
   toast.setGravity(Gravity.CENTER, 0, 0);
   toast.show();
//带图片
toast = Toast.makeText(getApplicationContext(),
     "带图片的Toast", Toast.LENGTH_LONG);
   toast.setGravity(Gravity.CENTER, 0, 0);
   LinearLayout toastView = (LinearLayout) toast.getView();
   ImageView imageCodeProject = new ImageView(getApplicationContext());
   imageCodeProject.setImageResource(R.drawable.icon);
   toastView.addView(imageCodeProject, 0);
   toast.show();
//完全自定义效果
LayoutInflater inflater = getLayoutInflater();
   View layout = inflater.inflate(R.layout.custom,
     (ViewGroup) findViewById(R.id.llToast));
   ImageView image = (ImageView) layout
     .findViewById(R.id.tvImageToast);
   image.setImageResource(R.drawable.icon);
   TextView title = (TextView) layout.findViewById(R.id.tvTitleToast);
   title.setText("Attention");
   TextView text = (TextView) layout.findViewById(R.id.tvTextToast);
   text.setText("完全自定义Toast");
   toast = new Toast(getApplicationContext());
   toast.setGravity(Gravity.RIGHT | Gravity.TOP, 12, 40);
   toast.setDuration(Toast.LENGTH_LONG);
   toast.setView(layout);
   toast.show();

https://www.cnblogs.com/salam/archive/2010/11/10/1873654.html

反射

getProperty

通过反射来获取(设置)设备属性

https://ccccc.blog.csdn.net/article/details/82293435

//获取系统属性
public static public String getProperty(String key, String defaultValue) {    
    String value = defaultValue;  
    try {  
        Class<?> c = Class.forName("android.os.SystemProperties");  
        Method get = c.getMethod("get", String.class, String.class);
        value = (String)(get.invoke(c, key, "unknown" ));///***///
    } catch (Exception e) {  
        e.printStackTrace();
    }finally {  
        return value;  
    }
}  
//设置系统属性
public static void setProperty(String key, String value) {    
    try {    
        Class<?> c = Class.forName("android.os.SystemProperties");  
        Method set = c.getMethod("set", String.class, String.class);
        set.invoke(c, key, value );///***///
    } catch (Exception e) {
        e.printStackTrace();
    }  
}

sensorManager

获取传感器信息

//examples
private void checkSensorNumber(Context activity_context){
        SensorManager sensorManager=(SensorManager)activity_context.getSystemService(SENSOR_SERVICE);
        List sensorList=sensorManager.getSensorList(-1);
        int number=sensorList.size();
        if(number<=7) Toast.makeText(this, "Sensor number<=7. Number is: "+number+"\r\n", Toast.LENGTH_SHORT).show();
    }

private void checkLightSensor(Context activity_context){
        SensorManager sensorManager = (SensorManager) activity_context.getSystemService(SENSOR_SERVICE);
        if(sensorManager.getDefaultSensor(5) == null)
            Toast.makeText(this, "Light sensor not supported.", Toast.LENGTH_SHORT).show();
    }

https://vimsky.com/zh-tw/examples/detail/java-method-android.hardware.SensorManager.getSensorList.html

官方文档

exec使用

private  String do_exec(String cmd) {
        String s = "/n";
        try {
            Process p = Runtime.getRuntime().exec(cmd);
            BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
            String line = null;
            while ((line = in.readLine()) != null) {
                s += line + "/n";
            }
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return s;
    }

String value=do_exec("cat /proc/self/cgroup");

https://blog.csdn.net/thinkinwm/article/details/12583161

关于\r\n

https://blog.csdn.net/longforus/article/details/51925285

获取apk签名

public void getSignature(){
        Context ctx=this.getApplicationContext();
        PackageInfo packageinfo = null;
        try {
            packageinfo = ctx.getPackageManager().getPackageInfo(ctx.getPackageName(), PackageManager.GET_SIGNATURES);
            Log.d(TAG, "getInfo: "+packageinfo);
        } catch (PackageManager.NameNotFoundException e) {
            e.printStackTrace();
        }
        Signature [] signatures=packageinfo.signatures;
        Log.d(TAG, "getSignature: "+signatures[0]);
    }

混淆

https://www.jianshu.com/p/6a07046e65f4

微信开源资源混淆

优点:

​ 可用于减少apk包的大小

防护方法:

​ jni显示注册(分析onload函数破解)

​ native检测pid来反调试(分析onload找反调点进行nop)

extends和implements

https://blog.csdn.net/qq_37858386/article/details/79024000

image-20211007024826519

hook(详例未写)

大概知识

添加仓库

image-20211007025012258

toolbar

//Toolbar基本代码
<android.support.v7.widget.Toolbar
    android:id="@+id/toolbar_normal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:collapseIcon="@mipmap/ic_launcher"
    app:buttonGravity="bottom"
    app:navigationIcon="@mipmap/ic_launcher"
    app:popupTheme="@style/Animation.AppCompat.Dialog"
    app:logoDescription="asdasdasd"
    app:maxButtonHeight="50dp"
    app:navigationIcon="@mipmap/back" //返回键
    app:title="Title"
    app:titleTextColor="#ffffff"
    android:background="@color/colorPrimaryDark"
    app:subtitle="SubTitle"
    app:subtitleTextColor="#ffffff"
    app:logo="@mipmap/ic_launcher">

</android.support.v7.widget.Toolbar>

ndk编写

/*.java*/
package com.example.helloworld;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.example.helloworld.databinding.ActivityMainBinding;

public class MainActivity extends AppCompatActivity {

    // Used to load the 'native-lib' library on application startup.
    static {
        System.loadLibrary("native-lib");
    }

    private ActivityMainBinding binding;
    private String str;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        binding = ActivityMainBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());

        TextView tv = binding.sampleText;
        Button btn = binding.button;
        EditText et = binding.editText;

        btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                /*y要写在onClick里面*/
                str = et.getText().toString().trim();
                if (stringCrypt(str))
                    tv.setText(stringFromJNI());
                else
                    tv.setText("bye");
            }

        });//注意这里是);
    }

    /**
     * A native method that is implemented by the 'native-lib' native library,
     * which is packaged with this application.
     */
    public native String stringFromJNI();
    public native boolean stringCrypt(String str);

}
/*.cpp*/
#include <jni.h>
#include <string>
#include<iostream>

extern "C" JNIEXPORT jstring JNICALL
Java_com_example_helloworld_MainActivity_stringFromJNI(
        JNIEnv* env,
        jobject /* this */) {
    std::string hello = "Hello World";
    return env->NewStringUTF(hello.c_str());
}
extern "C"
JNIEXPORT jboolean JNICALL
Java_com_example_helloworld_MainActivity_stringCrypt(JNIEnv *env, jobject thiz, jstring str) {
    const char *str_final = env->GetStringUTFChars(str,0);
    if(!strcmp("hello",str_final))
        return JNI_TRUE;
    else
        return JNI_FALSE;

}
/*layout/activity_main.xml*/
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <TextView
        android:id="@+id/sample_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0.498"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.209" />

    <Button
        android:id="@+id/button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="OK"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0.498"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.434" />

    <EditText
        android:id="@+id/edit_text"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:ems="10"
        android:inputType="textPersonName"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0.497"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.326" />

</androidx.constraintlayout.widget.ConstraintLayout>

知识点

jni函数中的变量JNIEnv与jobject

JNIEnv *env相当于指向java的环境变量,可以调用java中的方法

jobject thiz相当于this,即类实例

NewStringUTF

将string转为jstring

在原有java中添加ndk设置

对在app文件下的build.gradle进行两处修改,经测试,微博sdk可调用,但是只在真机(arm)上可用,AS虚拟机配置为x86会闪退(缺少.so文件)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.sina.weibo.sdk.demo"
        minSdkVersion 22
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        /**********************************ndk**********************************/
        externalNativeBuild {
            cmake {
                cppFlags '-std=c++11'
            }
        }
/**********************************ndk**********************************/

    }
    signingConfigs {
        debug {
            storeFile file('../debug.keystore')
            storePassword "android"
            keyAlias "androiddebugkey"
            keyPassword "android"
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.debug
        }
    }
/**********************************ndk**********************************/
    externalNativeBuild {
        cmake {
            path file('src/main/cpp/CMakeLists.txt')
            version '3.10.2'
        }
    }
    ndkVersion '20.0.5594570'
/**********************************ndk**********************************/
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation ('com.sina.weibo.sdk:core:10.10.0:openDefaultRelease@aar')
    implementation 'com.android.support:support-v4:26.0.0-alpha1'
}

https://zhuanlan.zhihu.com/p/27026394

组件绑定

private ActivityMainBinding binding;
binding = ActivityMainBinding.inflate(getLayoutInflater());

定义一个绑定,在后面将变量与组件进行绑定,如:TextView tv = binding.sampleText;

这里的sampleText需注意,组件的id为sample_text,同理EditText et = binding.editText;的组件也为edit_text

按钮监听

btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                str = et.getText().toString().trim();
                if (stringCrypt(str))
                    tv.setText(stringFromJNI());
                else
                    tv.setText("bye");
            }

        });
//onClick函数

Super

image-20210722104540641

@Override

image-20210722104756439

https://www.runoob.com/java/java-override-overload.html

加上@Override可以检查方法重写的正确性

Random & SecureRandom

Random:伪随机数

//不给予指定种子,则默认使用系统时间戳作为种子
Random r = new Random();
//指定种子
Random r = new Random(12345);
//得到的结果会一样
//同理,Math.random()调用Random类,机制一样

SecureRandom:真随机数

SecureRandom用来创建安全的随机数。

SecureRandom无法指定种子;使用RNG(random number generator)算法。

种子是通过CPU的热噪声、读写磁盘的字节、网络流量等各种随机事件产生的“熵”。

SecureRandom secureRandom = new SecureRandom();

一些报错

Cannot fit requested classes in a single dex file

image-20211007032833741

Could not determine java version from '11.0.8'

换jdk

Failed to find Build Tools revision 31.0.0

切换buildtools版本(不要最新版)

Manifest merger failed : Apps targeting Android 12 and higher are required to specify an explicit

在activity中添加android:exported

This view is not constrained vertically

加上水平和垂直的约束

类org.codehaus.groovy.vmplugin.v7.Java7找不到

Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:”

XX项目 is registered as a Git root, but no Git repositories were found there

Gradle Offline Mode

Gradle sync failed: Could not find com.android.tools.build:gradle:3.0.0.

AS3.0后可以在工程build.gradle里加入google(),加后报错消失

could not initialize class……——路径一致

[Can't choose a valid JDK for Android Studio, so my Gradle is Failing. ——修改路径](https://askubuntu.com/questions/853936/help-cant-choose-a-valid-jdk-for-android-studio-so-my-gradle-is-failing-why)

image-20210729230337755

一些实例

//模拟器检测,大多数的沙箱和模拟器可以检测出
package com.example.emulatordetection;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Context;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.widget.Toast;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.reflect.Method;
import java.util.List;
import java.util.concurrent.ConcurrentHashMap;

public class MainActivity extends AppCompatActivity implements EmulatorCheckCallback {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        checkEmulator(MainActivity.this,MainActivity.this);
    }
    private boolean checkEmulator(Context acvtivity_context,EmulatorCheckCallback activity_callback){
        if(acvtivity_context!=null&&activity_callback!=null){
            checkFeaturesByHardware();
            checkFeaturesByFlavor();
            checkFeaturesByModel();
            checkFeaturesByManufacturer();
            checkFeaturesByBoard();
            checkFeaturesByPlatform();
            checkFeaturesByBaseBand();
            checkSensorNumber(acvtivity_context);
            checkCameraFlash(acvtivity_context);
            checkCamera(acvtivity_context);
            checkBluetooth(acvtivity_context);
            checkLightSensor(acvtivity_context);
            checkFeaturesByCgroup();
            checkAppNumber();
        }
        return false;
    }

    private void checkFeaturesByHardware(){
        CheckResult hardware;
        String type = this.getProperty("ro.hardware");
        int flag = 0;
        if(type == null) {
            hardware=new CheckResult(0, null);  // result,value
        }
        String type_low = type.toLowerCase();
        int result_return = 1;
        switch(type_low.hashCode()) {
            case 937844646: {
                if(type_low.equals("android_x86")) {
                    flag = 6;
                    break;
                }
                flag=-1;
                break;
            }
            case -1367724016: {
                if(!type_low.equals("cancro")) {
                    flag=-1;
                    break;
                }
                flag = 2;
                break;
            }
            case -822798509: {
                if(!type_low.equals("vbox86")) {
                    flag=-1;
                    break;
                }
                flag = 5;
                break;
            }
            case 109271: {
                if(!type_low.equals("nox")) {
                    flag=-1;
                    break;
                }
                flag = 1;
                break;
            }
            case 3570999: {
                if(!type_low.equals("ttvm")) {
                    flag=-1;
                    break;
                }
                break;
            }
            case 3613077: {
                if(!type_low.equals("vbox")) {
                    flag=-1;
                    break;
                }
                flag = 4;
                break;
            }
            case 100361430: {
                if(!type_low.equals("intel")) {
                    flag=-1;
                    break;
                }
                flag = 3;
                break;
            }
            default: {
                flag=-1;
                break;
            }
        }
        switch(flag) {
            case 0:
            case 1:
            case 2:
            case 3:
            case 4:
            case 5:
            case 6: {
                break;
            }
            default: {
                result_return = 2;
                break;
            }
        }
        hardware=new CheckResult(result_return, type);  // result,value
        int hardware_result=hardware.result;
        if(hardware_result==0){
            hardware_result=1;
        }else if(hardware_result!=1){
            hardware_result=0;
        }else{
                Toast.makeText(this, "Hardware not found.\r\n", Toast.LENGTH_SHORT).show();
        }
    }
    private void checkFeaturesByFlavor(){
        String value=this.getProperty("ro.build.flavor");
        CheckResult flavor;
        if(value==null) flavor=new CheckResult(0,null);
        String value_low=value.toLowerCase();
        int result=1;
        if(value_low.contains("vbox"))  ;
        else if(value_low.contains("sdk_gphone"))   ;
        else    result=2;
        flavor=new CheckResult(result,value);
        if(flavor.result==1){
            Toast.makeText(this, "Flavor not found.\r\n", Toast.LENGTH_SHORT).show();
        }
    }
    private void checkFeaturesByModel(){
        String value=this.getProperty("ro.product.model");
        CheckResult model;
        if(value==null) model=new CheckResult(0,null);
        String value_low = value.toLowerCase();
        int result=1;
        if(value_low.contains("google_sdk"))   ;
        else if(value_low.contains("emulator")) ;
        else if(value_low.contains("android sdk built for x86")) ;
        else {
            result=2;
        }
        model=new CheckResult(result,value);
        if(model.result==1){
            Toast.makeText(this, "Model not found.\r\n", Toast.LENGTH_SHORT).show();
        }
    }
    private void checkFeaturesByManufacturer(){
        String value=this.getProperty("ro.product.manufacturer");
        CheckResult manufacturer;
        if(value==null) manufacturer=new CheckResult(0,null);
        String value_low = value.toLowerCase();
        int result=1;
        if(value_low.contains("genymotion"))    ;
        else if(value_low.contains("netease"))  ;
        else    result=2;
        manufacturer=new CheckResult(result,value);
        if(manufacturer.result==1){
            Toast.makeText(this, "Manufacturer not found.\r\n", Toast.LENGTH_SHORT).show();
        }
    }
    private void checkFeaturesByBoard(){
        String value=this.getProperty("ro.product.board");
        CheckResult board;
        if(value==null) board=new CheckResult(0,null);
        String value_low = value.toLowerCase();
        int result=1;
        if(value_low.contains("android"))    ;
        else if(value_low.contains("goldfish"))  ;
        else    result=2;
        board=new CheckResult(result,value);
        if(board.result==1){
            Toast.makeText(this, "Board not found.\r\n", Toast.LENGTH_SHORT).show();
        }
    }
    private void checkFeaturesByPlatform(){
        String value=this.getProperty("ro.board.platform");
        CheckResult platform;
        if(value==null) platform=new CheckResult(0,null);
        int result=value.toLowerCase().contains("android")?1:2;
        platform=new CheckResult(result,value);
        if(platform.result==1)  Toast.makeText(this, "Platform not found.\r\n", Toast.LENGTH_SHORT).show();
    }
    private void checkFeaturesByBaseBand(){
        String value=this.getProperty("gsm.version.baseband");
        CheckResult baseband;
        if(value==null) baseband=new CheckResult(0,null);
        int result=value.contains("1.0.0.0")? 1 : 2;
        baseband=new CheckResult(result,value);
        if(baseband.result==1) Toast.makeText(this, "Base band not found.\r\n", Toast.LENGTH_SHORT).show();
    }
    private void checkSensorNumber(Context activity_context){
        SensorManager sensorManager=(SensorManager)activity_context.getSystemService(SENSOR_SERVICE);
        List sensorList=sensorManager.getSensorList(-1);
        int number=sensorList.size();
        if(number<=7) Toast.makeText(this, "Sensor number<=7. Number is: "+number+"\r\n", Toast.LENGTH_SHORT).show();
    }
    private void checkCameraFlash(Context activity_context){
        if(!activity_context.getPackageManager().hasSystemFeature("android.hardware.camera.flash"))
            Toast.makeText(this, "Camera flash not supported.", Toast.LENGTH_SHORT).show();
    }
    private void checkCamera(Context activity_context){
        if(!activity_context.getPackageManager().hasSystemFeature("android.hardware.camera"))
            Toast.makeText(this, "Camera not supported.", Toast.LENGTH_SHORT).show();
    }
    private void checkBluetooth(Context activity_context){
        if(!activity_context.getPackageManager().hasSystemFeature("android.hardware.bluetooth"))
            Toast.makeText(this, "Bluetooth not supported.", Toast.LENGTH_SHORT).show();
    }
    private void checkLightSensor(Context activity_context){
        SensorManager sensorManager = (SensorManager) activity_context.getSystemService(SENSOR_SERVICE);
        if(sensorManager.getDefaultSensor(5) == null)
            Toast.makeText(this, "Light sensor not supported.", Toast.LENGTH_SHORT).show();
    }
    private void checkFeaturesByCgroup(){
        String value=do_exec("cat /proc/self/cgroup");
        CheckResult Cgroup;
        if(value==null) Cgroup=new CheckResult(0,null);
        else    Cgroup=new CheckResult(2,value);
        if(Cgroup.result==0) Toast.makeText(this, "Cgourp is null.", Toast.LENGTH_SHORT).show();
    }
    private void checkAppNumber(){
        String value=do_exec("pm list package -3");//third-part packages
        if(value==null) Toast.makeText(this, "exec no return.", Toast.LENGTH_SHORT).show();
        else{
        int number=0;
        number=value.split("package:").length;
        Toast.makeText(this, "App number is: "+number, Toast.LENGTH_LONG).show();
        }
    }

    public void findEmulator(String arg2) {
        Log.d("TEST", arg2);
    }
    private String getProperty(String arg2) {
        Object v0=null;
        String value=null;
        try {
            Class<?> c = Class.forName("android.os.SystemProperties");
            Method get = c.getMethod("get", String.class, String.class);
            value = (String)(get.invoke(c, arg2, "unknown" ));
            if(TextUtils.isEmpty(((CharSequence)value))) {
                value = null;
            }
        } catch (Exception e) {
            e.printStackTrace();
        }finally {
            return value;
        }
    }
    private  String do_exec(String cmd) {
        String s = "/n";
        try {
            Process p = Runtime.getRuntime().exec(cmd);
            BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
            String line = null;
            while ((line = in.readLine()) != null) {
                s += line + "/n";
            }
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return s;
    }

}

class CheckResult {
    public static final int RESULT_EMULATOR = 1;
    public static final int RESULT_MAYBE_EMULATOR = 0;
    public static final int RESULT_UNKNOWN = 2;
    public int result;
    public String value;

    public CheckResult(int arg1, String arg2) {
        super();
        this.result = arg1;
        this.value = arg2;
    }
}
interface EmulatorCheckCallback {
    void findEmulator(String arg1);
}