-
Notifications
You must be signed in to change notification settings - Fork 396
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
帮忙看下,我直接运行dcc.py文件,报错 #11
Comments
ndk版本是多少,用最新的试试. |
用是19.2.5345600版本,电脑是mac系统的 |
我都是在ubuntu下测试的,mac我没有测试过.你先网上看看" 'INT64_MAX' was not declared in this scope" 这种错误怎么解决的,有可能是哪个头文件没有include进来.我晚上看看. |
换了ndk20版本,没有上面的问题了。现在有个 |
vi project/jni/Application.mk 把第4行打开,第5行注释掉. |
[ERROR ] dcc: Compile app-releasenode222.apk failed! |
把第四行改成这样.加上x86
|
可以了。APP_ABI := armeabi-v7a arm64-v8a x86 x86_64,,看看能不能跑先不知道啥原因,我的apktool路径都要全路径。
…------------------ 原始邮件 ------------------
发件人: "amimo"<[email protected]>;
发送时间: 2019年11月16日(星期六) 下午3:10
收件人: "amimo/dcc"<[email protected]>;
抄送: "helloworld"<[email protected]>; "Author"<[email protected]>;
主题: Re: [amimo/dcc] 帮忙看下,我直接运行dcc.py文件,报错 (#11)
把第四行改成这样.加上x86
APP_ABI := armeabi-v7a arm64-v8a x86
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
1-16 15:05:05.252 25510-25510/? E/AndroidRuntime: FATAL EXCEPTION: main |
需要插入加载libnc.so代码,参考这个回复 |
还是不太明白,是要原工程加入 |
加载库有两种改法. |
按照第二种方法处理了一下 |
你看这个方法的代码是不是已经隐藏了 "Java_com_lfgam_xinji_ActiveCodeActivity_onCreate". |
1:没有开启最后一行,ActiveCodeActivity 这个类 public native void onCreate(Bundle bundle);已经隐藏了。其它没有类没有隐藏
2:开启最后一行.*; ,出现如下错误,但可以运行编译
Traceback (most recent call last):
File "dcc.py", line 347, in compile_dex
code = compiler.get_source_method(m)
File "/Users/kwing/PycharmProjects/dcc/dex2c/compiler.py", line 557, in get_source_method
irmethod = z.process()
File "/Users/kwing/PycharmProjects/dcc/dex2c/compiler.py", line 170, in process
self.build()
File "/Users/kwing/PycharmProjects/dcc/dex2c/compiler.py", line 208, in build
self.verify_phi_operand_type()
File "/Users/kwing/PycharmProjects/dcc/dex2c/compiler.py", line 245, in verify_phi_operand_type
raise Exception("inconsistency phi operand type %s %s %s" % (phi, same_type, op_type))
Exception: inconsistency phi operand type v7_7 I Ljava/lang/String;
[WARNING ] dcc: compile method failed:Lcom/lfgam/xinji/utils/AppInfoUtils;getCpuName()Ljava/lang/String; (inconsistency phi operand type v0_4 I Ljava/lang/String;)
Traceback (most recent call last):
File "dcc.py", line 347, in compile_dex
code = compiler.get_source_method(m)
File "/Users/kwing/PycharmProjects/dcc/dex2c/compiler.py", line 557, in get_source_method
irmethod = z.process()
File "/Users/kwing/PycharmProjects/dcc/dex2c/compiler.py", line 170, in process
self.build()
File "/Users/kwing/PycharmProjects/dcc/dex2c/compiler.py", line 208, in build
self.verify_phi_operand_type()
File "/Users/kwing/PycharmProjects/dcc/dex2c/compiler.py", line 245, in verify_phi_operand_type
raise Exception("inconsistency phi operand type %s %s %s" % (phi, same_type, op_type))
Exception: inconsistency phi operand type v0_4 I Ljava/lang/String;
[WARNING ] dcc: compile method failed:Lokhttp3/Headers;of([Ljava/lang/String;)Lokhttp3/Headers; (unkonw type vResult_1)
Traceback (most recent call last):
File "dcc.py", line 347, in compile_dex
code = compiler.get_source_method(m)
File "/Users/kwing/PycharmProjects/dcc/dex2c/compiler.py", line 557, in get_source_method
irmethod = z.process()
File "/Users/kwing/PycharmProjects/dcc/dex2c/compiler.py", line 170, in process
self.build()
File "/Users/kwing/PycharmProjects/dcc/dex2c/compiler.py", line 207, in build
self.verify_operand_type()
File "/Users/kwing/PycharmProjects/dcc/dex2c/compiler.py", line 229, in verify_operand_type
raise Exception('unkonw type %s' % var)
Exception: unkonw type vResult_1
3:有什么办法可以去掉一些类不nation化,,比如系统类不nation化,举个例子看看?
…------------------ 原始邮件 ------------------
发件人: "amimo"<[email protected]>;
发送时间: 2019年11月16日(星期六) 晚上6:17
收件人: "amimo/dcc"<[email protected]>;
抄送: "helloworld"<[email protected]>; "Author"<[email protected]>;
主题: Re: [amimo/dcc] 帮忙看下,我直接运行dcc.py文件,报错 (#11)
你看这个方法的代码是不是已经隐藏了 "Java_com_lfgam_xinji_ActiveCodeActivity_onCreate".
如果你要隐藏所有方法,把filter.txt文件最后一行打开.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
这是我在类型推导失败或者我检测到类型推导不正确抛的异常,程序应该还是能正常运行. |
ok,确实是可以编译,filter.txt文件我再试试怎么规划。编译时间真的要很长,,谢谢啦
…------------------ 原始邮件 ------------------
发件人: "amimo"<[email protected]>;
发送时间: 2019年11月16日(星期六) 晚上6:40
收件人: "amimo/dcc"<[email protected]>;
抄送: "helloworld"<[email protected]>; "Author"<[email protected]>;
主题: Re: [amimo/dcc] 帮忙看下,我直接运行dcc.py文件,报错 (#11)
这是我在类型推导失败或者我检测到类型推导不正确抛的异常,程序应该还是能正常运行.
支持正则过滤需要编译和禁止编译的方法.filter.txt里面有,你看我处理demo和onCreate的写法.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
No implementation found for void de.robv.android.xposed.mods.tutorial.AutoHook.loadPrefs()
|
加载的时机可能还是晚了。你在JApplication的静态代码块加载试试。 |
我这个是xposed插件 |
很久很久以前,我玩xposed的时候是这样加载native库的,不知道xposed的api现在变什么样了,你可以参考下. java.lang.System.load("/data/data/" + 插件包名 + "/lib/" + "libnc.so"); |
放在handleLoadPackage 下面也是找不到路径,不知道是不是系统版本问题,还在摸索中 |
确定so已经解压出来,并且加载路径是对的? |
确定路径是对的,,现在我系统是6.0. 插件没处理先都是运行正常的,,处理后就是说找不到nc路径 |
Log看看,我之前在4.4上是可以加载native库的. |
这个是现在改成data/app目录下的代码。
|
大佬,用这个api, java.lang.System.load,你这个路径下次安装就会变的.用我的那个写法,单用户下路径是固定的. |
1:现在 改成 public AutoHook() { |
apk里面就没有这个so库吧。 |
1:libnc.so这个文件都有,每个abi版本nc文件都有,安装后应该arm/libnc.so这目录的 |
你复制一个到
如果可以你后面可以自己把so解压到files下面,然后用绝对路径加载。 |
/com.lfgam.xinji/armeabi-v7a/lib # ls -al |
chmod 777 /data/data/com.lfgam.xinji/armeabi-v7a/lib/libnc.so |
目录,文件权限全加了,还是找不到, |
这都不行。 |
可以了!!!晕晕 .method public constructor ()V
|
代码还没有被执行吧。重复加载是没有问题的,原来的代码你不要删除。Java_com_lfgam_xinji_ActiveCodeActivity你在这个类的init里面也加上试试。 |
olchains/llvm/prebuilt/darwin-x86_64/bin/clang++: Argument list too long |
之前不能加载的问题好了? |
之前也是处理一个函数没问题,开启全部就不行。主要是过滤规则不懂写,,混淆过后都是a,b,c那种函数 |
我说的是库找不到的问题.
这个问题怎么解决的? |
还没有想到办法怎么处理路径问题,,想不明白怎么无缘多出armeabi-v7a这东西 |
你先把流程跑通,有可能xposed模块就不能用这个加固,如果是这样的话,继续折腾这个玩意就没有意义了. |
这是因为系统还没初始化完成。。。遇到了 |
nc <= well_known_classes.cpp
jni/nc/Dex2C.cpp: In function 'int64_t d2c_double_to_long(double)':
jni/nc/Dex2C.cpp:75:42: error: 'INT64_MAX' was not declared in this scope
} else if (val > static_cast(INT64_MAX)) {
^
jni/nc/Dex2C.cpp:77:42: error: 'INT64_MIN' was not declared in this scope
} else if (val < static_cast(INT64_MIN)) {
^
jni/nc/Dex2C.cpp: In function 'int64_t d2c_float_to_long(float)':
jni/nc/Dex2C.cpp:89:41: error: 'INT64_MAX' was not declared in this scope
} else if (val > static_cast(INT64_MAX)) {
^
jni/nc/Dex2C.cpp:91:41: error: 'INT64_MIN' was not declared in this scope
} else if (val < static_cast(INT64_MIN)) {
^
jni/nc/Dex2C.cpp: In function 'int32_t d2c_double_to_int(double)':
jni/nc/Dex2C.cpp:103:41: error: 'INT32_MAX' was not declared in this scope
} else if (val > static_cast(INT32_MAX)) {
^
jni/nc/Dex2C.cpp:105:41: error: 'INT32_MIN' was not declared in this scope
} else if (val < static_cast(INT32_MIN)) {
^
jni/nc/Dex2C.cpp: In function 'int32_t d2c_float_to_int(float)':
jni/nc/Dex2C.cpp:117:41: error: 'INT32_MAX' was not declared in this scope
} else if (val > static_cast(INT32_MAX)) {
^
jni/nc/Dex2C.cpp:119:41: error: 'INT32_MIN' was not declared in this scope
} else if (val < static_cast(INT32_MIN)) {
^
make: *** [obj/local/armeabi-v7a/objs/nc/nc/Dex2C.o] Error 1
The text was updated successfully, but these errors were encountered: