首页 > 其他分享 >超长参数的调用方式smali代码

超长参数的调用方式smali代码

时间:2022-11-24 13:06:42浏览次数:51  
标签:lang Ljava 调用 invoke int StringBuilder v1 超长 smali


这里面包含了范围的调用 多个参数的局部参数调用。

.line 150
invoke-super/range {p0 .. p3}, Lcn/qssq666/applicationdemo/BaseActivity;->onRequestPermissionsResult(I[Ljava/lang/String;[I)V

.line 151
invoke-static/range {p0 .. p3}, Lcn/qssq666/applicationdemo/Test111;->onRequestPermissionsResult(Lcn/qssq666/applicationdemo/MainActivity;I[Ljava/lang/String;[I)V
.class public Lcn/qssq666/applicationdemo/MainActivity;
.super Lcn/qssq666/applicationdemo/BaseActivity;
.source "MainActivity.java"


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


# direct methods
.method public constructor <init>()V
.locals 0

.line 7
invoke-direct {p0}, Lcn/qssq666/applicationdemo/BaseActivity;-><init>()V

return-void
.end method

.method public static fiveArg(IIIII)V
.locals 0

.line 25
invoke-static {p0, p2, p3, p4}, Lcn/qssq666/applicationdemo/MainActivity;->fourArg(IIII)V

return-void
.end method

.method public static fourArg(IIII)V
.locals 0

.line 29
invoke-static {p0, p2, p3}, Lcn/qssq666/applicationdemo/MainActivity;->threeArgMultiV(III)V

return-void
.end method

.method public static final testMultiArg(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;IIIIIIIIIIIIIIIIIIIIIIIIIIIII)V
.locals 4

.line 135
new-instance v0, Ljava/lang/StringBuilder;

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

move-object v1, p0

invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

const-string v1, ""

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-object v1, p1

invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

const-string v1, ""

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-object v1, p2

invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

const-string v1, ""

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

add-int v1, p3, p4

add-int/2addr v1, p5

add-int/2addr v1, p6

add-int/2addr v1, p7

add-int/2addr v1, p8

add-int/2addr v1, p9

add-int/2addr v1, p10

add-int/2addr v1, p11

add-int v1, v1, p12

add-int v1, v1, p13

add-int v1, v1, p14

add-int v1, v1, p15

add-int v1, v1, p16

add-int v1, v1, p17

add-int v1, v1, p18

add-int v1, v1, p19

add-int v1, v1, p20

add-int v1, v1, p21

add-int v1, v1, p22

add-int v1, v1, p23

add-int v1, v1, p24

add-int v1, v1, p25

add-int v1, v1, p26

add-int v1, v1, p27

add-int v1, v1, p28

add-int v1, v1, p29

add-int v1, v1, p30

add-int v1, v1, p31

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

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

move-result-object v0

const-string v1, "MainActivity"

.line 136
new-instance v2, Ljava/lang/StringBuilder;

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

const-string v3, "count:"

invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

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

move-result-object v0

invoke-static {v1, v0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

return-void
.end method

.method public static threeArgMultiV(III)V
.locals 1

.line 33
invoke-static {p0, p2}, Lcn/qssq666/applicationdemo/MainActivity;->twoArg(II)V

.line 71
new-instance p0, Ljava/lang/StringBuilder;

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

const/4 p1, 0x0

invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

const-string p2, ""

invoke-virtual {p0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

const-string p2, ""

invoke-virtual {p0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

const-string p1, ""

invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

const/16 p1, 0x1d

invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

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

move-result-object p0

const-string p1, "MainActivity"

.line 74
new-instance p2, Ljava/lang/StringBuilder;

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

const-string v0, "count:"

invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

invoke-virtual {p2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

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

move-result-object p0

invoke-static {p1, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

return-void
.end method

.method public static twoArg(II)V
.locals 3

const-string v0, "MainActivity"

.line 78
new-instance v1, Ljava/lang/StringBuilder;

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

const-string v2, "value:"

invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

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

move-result-object v1

invoke-static {v0, v1}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

.line 115
new-instance v0, Ljava/lang/StringBuilder;

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

const/4 v1, 0x0

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

const-string v2, ""

invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

const-string v2, ""

invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

const-string v1, ""

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

const/4 v1, 0x3

add-int/2addr v1, p0

add-int/2addr v1, p1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

add-int/lit8 v1, v1, 0x1

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

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

move-result-object p0

const-string p1, "MainActivity"

.line 118
new-instance v0, Ljava/lang/StringBuilder;

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

const-string v1, "count:"

invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

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

move-result-object p0

invoke-static {p1, p0}, Landroid/util/Log;->w(Ljava/lang/String;Ljava/lang/String;)I

return-void
.end method


# virtual methods
.method protected onCreateFix(Landroid/os/Bundle;)V
.locals 0

const p1, 0x7f09001b

.line 20
invoke-virtual {p0, p1}, Lcn/qssq666/applicationdemo/MainActivity;->setContentView(I)V

const/4 p1, 0x1

.line 21
invoke-static {p1, p1, p1, p1, p1}, Lcn/qssq666/applicationdemo/MainActivity;->fiveArg(IIIII)V

return-void
.end method

.method public final onRequestPermissionsResult(I[Ljava/lang/String;[I)V
.locals 32
.param p2 # [Ljava/lang/String;
.annotation build Landroid/support/annotation/NonNull;
.end annotation
.end param
.param p3 # [I
.annotation build Landroid/support/annotation/NonNull;
.end annotation
.end param

move-object/from16 v1, p3

.line 123
invoke-super/range {p0 .. p3}, Lcn/qssq666/applicationdemo/BaseActivity;->onRequestPermissionsResult(I[Ljava/lang/String;[I)V

.line 125
invoke-static/range {p1 .. p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

move-result-object v0

const/4 v2, 0x0

const/4 v3, 0x1

const/4 v4, 0x2

const/4 v5, 0x3

const/4 v6, 0x4

const/4 v7, 0x5

const/4 v8, 0x6

const/4 v9, 0x7

const/16 v10, 0x8

const/16 v11, 0x9

const/4 v12, 0x1

const/4 v13, 0x1

const/4 v14, 0x1

const/4 v15, 0x1

const/16 v16, 0x1

const/16 v17, 0x1

const/16 v18, 0x1

const/16 v19, 0x1

const/16 v20, 0x1

const/16 v21, 0x1

const/16 v22, 0x1

const/16 v23, 0x1

const/16 v24, 0x1

const/16 v25, 0x1

const/16 v26, 0x1

const/16 v27, 0x1

const/16 v28, 0x1

const/16 v29, 0x1

const/16 v30, 0x1

const/16 v31, 0x1

invoke-static/range {v0 .. v31}, Lcn/qssq666/applicationdemo/MainActivity;->testMultiArg(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;IIIIIIIIIIIIIIIIIIIIIIIIIIIII)V

return-void
.end method
package cn.qssq666.applicationdemo;

import android.os.Bundle;
import android.support.annotation.NonNull;
import android.util.Log;

public class MainActivity extends BaseActivity {
private static final String TAG = "MainActivity";


/*
@Override
public final void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
*/

@Override
protected void onCreateFix(Bundle savedInstanceState) {
setContentView(R.layout.activity_main);
MainActivity.fiveArg(1, 1, 1, 1, 1);
}

public static void fiveArg(int a, int b, int c, int d, int e) {
fourArg(a, c, d, e);
}

public static void fourArg(int a, int b, int c, int d) {
threeArgMultiV(a, c, d);
}

public static void threeArgMultiV(int a1, int b1, int c1) {
twoArg(a1, c1);


Object obj1 = null;
Object obj2 = null;
Object obj3 = null;
int num1 = 1;
int num2 = 1;
int num3 = 1;
int a = 1;
int b = 1;
int c = 1;
int d = 1;
int e = 1;
int f = 1;
int g = 1;
int h = 1;
int i = 1;
int j = 1;
int k = 1;
int l = 1;
int m = 1;
int n = 1;
int o = 1;
int p = 1;
int q = 1;
int r = 1;
int s = 1;
int t = 1;
int u = 1;
int v = 1;
int w = 1;
int x = 1;
int y = 1;

int z = 1;


Object count = obj1 + "" + obj2 + "" + obj3 + "" + (num1 + num2 + num3 + a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z);


Log.w(TAG, "count:" + count);
}

public static void twoArg(int a, int b) {
Log.w(TAG, "value:" + a + b);


Object obj1 = null;
Object obj2 = null;
Object obj3 = null;
int num1 = 1;
int num2 = 1;
int num3 = 1;

int c = 1;
int d = 1;
int e = 1;
int f = 1;
int g = 1;
int h = 1;
int i = 1;
int j = 1;
int k = 1;
int l = 1;
int m = 1;
int n = 1;
int o = 1;
int p = 1;
int q = 1;
int r = 1;
int s = 1;
int t = 1;
int u = 1;
int v = 1;
int w = 1;
int x = 1;
int y = 1;

int z = 1;


Object count = obj1 + "" + obj2 + "" + obj3 + "" + (num1 + num2 + num3 + a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z);


Log.w(TAG, "count:" + count);
}

@Override
public final void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);

MainActivity.testMultiArg(requestCode, grantResults, null, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
}

public static final void testMultiArg(Object obj1, Object obj2, Object obj3, int num1, int num2, int num3,
int a, int b,
int c,
int d,
int e, int f, int g, int h, int i, int j, int k, int l, int m, int n, int o, int p, int q, int r, int s, int t, int u, int v, int w, int x, int y, int z) {


Object count = obj1 + "" + obj2 + "" + obj3 + "" + (num1 + num2 + num3 + a + b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r + s + t + u + v + w + x + y + z);
Log.w(TAG, "count:" + count);
}

}

标签:lang,Ljava,调用,invoke,int,StringBuilder,v1,超长,smali
From: https://blog.51cto.com/u_15458814/5883452

相关文章