1

我需要在我的 android 应用程序的硬编码字符串数组中添加一个值。不幸的是我丢失了我的洞代码,所以我将apk反编译为smali。有人可以告诉我如何在“1D”和“2A”之间添加一个条目(我在代码中添加了注释)吗?

这里是 smali 代码的 Array 部分:

const/4 v1, 0x0

const-string v2, "1A"

aput-object v2, v0, v1

const/4 v1, 0x1

const-string v2, "1B"

aput-object v2, v0, v1

const/4 v1, 0x2

const-string v2, "1C"

aput-object v2, v0, v1

const/4 v1, 0x3

const-string v2, "1D"  //add entry "1E" after this

aput-object v2, v0, v1

const/4 v1, 0x4

const-string v2, "2A"

aput-object v2, v0, v1

const/4 v1, 0x5

const-string v2, "2B"

aput-object v2, v0, v1

const/4 v1, 0x6

const-string v2, "2C"

aput-object v2, v0, v1

const/4 v1, 0x7

const-string v2, "2D"

aput-object v2, v0, v1

const/16 v1, 0x8

const-string v2, "3A"

aput-object v2, v0, v1

const/16 v1, 0x9

const-string v2, "3B"

aput-object v2, v0, v1

const/16 v1, 0xa

const-string v2, "3C"

aput-object v2, v0, v1

const/16 v1, 0xb

const-string v2, "3D"

aput-object v2, v0, v1

const/16 v1, 0xc

const-string v2, "4A"

aput-object v2, v0, v1

const/16 v1, 0xd

const-string v2, "4B"

aput-object v2, v0, v1

const/16 v1, 0xe

const-string v2, "4C"

aput-object v2, v0, v1

const/16 v1, 0xf

const-string v2, "4D"

aput-object v2, v0, v1

const/16 v1, 0x10

const-string v2, "5A"

aput-object v2, v0, v1

const/16 v1, 0x11

const-string v2, "5B"

aput-object v2, v0, v1

const/16 v1, 0x12

const-string v2, "5C"

aput-object v2, v0, v1

const/16 v1, 0x13

const-string v2, "5D"

aput-object v2, v0, v1

const/16 v1, 0x14

const-string v2, "6A"

aput-object v2, v0, v1

const/16 v1, 0x15

const-string v2, "6B"

aput-object v2, v0, v1

const/16 v1, 0x16

const-string v2, "6C"

aput-object v2, v0, v1

const/16 v1, 0x17

const-string v2, "6D"

aput-object v2, v0, v1

const/16 v1, 0x18

const-string v2, "7A"

aput-object v2, v0, v1

const/16 v1, 0x19

const-string v2, "7B"

aput-object v2, v0, v1

const/16 v1, 0x1a

const-string v2, "7C"

aput-object v2, v0, v1

const/16 v1, 0x1b

const-string v2, "7D"

aput-object v2, v0, v1

const/16 v1, 0x1c

const-string v2, "8A"

aput-object v2, v0, v1

const/16 v1, 0x1d

const-string v2, "8B"

aput-object v2, v0, v1

const/16 v1, 0x1e

const-string v2, "8C"

aput-object v2, v0, v1

const/16 v1, 0x1f

const-string v2, "8D"

aput-object v2, v0, v1

谢谢你的帮助!

4

1 回答 1

2

对不起我的英语不好

我认为你必须换行:

new-array v0, [new_size = your_size + 1], [Ljava/lang/String;.

然后你必须在评论后加上几行:

const/4 v1, 0x4

const-string v2, "1E"

aput-object v2, v0, v1

然后增加以下行中的所有值:

const/4 v1, [value].

例如:

const/4 v1, 0x6 -> const/4 v1, 0x7

const/4 v1, 0x7 -> const/4 v1, 0x8
于 2013-10-21T14:16:05.990 回答