Skip to content
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

求大神解答几个问题 #2

Closed
shenyunhuan opened this issue Oct 11, 2017 · 4 comments
Closed

求大神解答几个问题 #2

shenyunhuan opened this issue Oct 11, 2017 · 4 comments

Comments

@shenyunhuan
Copy link

1 SIGN_FRONT_DEBUG SIGN_END_DEBUG 是哪几位,怎么来的,我debug模式得到了SIGN_END_DEBUG的值但是SIGN_FRONT_DEBUG 怎么还是和你的一样,debug签名不一样啊
2 native解密报错
3 不支持中文
4 服务器怎么解密呢

@dfqin
Copy link
Owner

dfqin commented Oct 11, 2017

  1. SIGN_FRONT_DEBUG这些本来就是写死的常量,用来判断是不是自己的签名。
    2.多放些log出来吧,我这边无法重现。
    3.应该不可能,加密是针对byte数组的。
    4.demo中以实现

@dfqin dfqin closed this as completed Oct 11, 2017
@shenyunhuan
Copy link
Author

你试试纯中文
2 :byte[] oriData = SecureUtil.decryptData(deData); 这行代码报错
JNI DETECTED ERROR IN APPLICATION: negative jsize: -50

@shenyunhuan
Copy link
Author

JNI DETECTED ERROR IN APPLICATION: negative jsize: -147
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] in call to NewByteArray
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] from byte[] com.dfqin.encrypt.SecureUtil.decryptData(android.content.Context, byte[])
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] "main" prio=5 tid=1 Runnable
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] | group="main" sCount=0 dsCount=0 obj=0x74f37698 self=0x55a30e9af0
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] | sysTid=14623 nice=-1 cgrp=top_visible sched=0/0 handle=0x7fa8621000
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] | state=R schedstat=( 1932406944 72594288 1354 ) utm=161 stm=32 core=3 HZ=100
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] | stack=0x7fecc6c000-0x7fecc6e000 stackSize=8MB
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] | held mutexes= "mutator lock"(shared held)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #00 pc 000000000048b384 /system/lib64/libart.so (_ZN3art15DumpNativeStackERNSt3__113basic_ostreamIcNS0_11char_traitsIcEEEEiPKcPNS_9ArtMethodEPv+236)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #1 pc 000000000045a77c /system/lib64/libart.so (_ZNK3art6Thread4DumpERNSt3__113basic_ostreamIcNS1_11char_traitsIcEEEE+220)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #2 pc 000000000030e690 /system/lib64/libart.so (ZN3art9JavaVMExt8JniAbortEPKcS2+1000)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #3 pc 000000000030ef48 /system/lib64/libart.so (_ZN3art9JavaVMExt9JniAbortVEPKcS2_St9__va_list+116)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #4 pc 0000000000142974 /system/lib64/libart.so (_ZN3art11ScopedCheck6AbortFEPKcz+144)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #05 pc 0000000000149e38 /system/lib64/libart.so (_ZN3art11ScopedCheck5CheckERNS_18ScopedObjectAccessEbPKcPNS_12JniValueTypeE.constprop.116+7644)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #06 pc 0000000000156e8c /system/lib64/libart.so (_ZN3art8CheckJNI17NewPrimitiveArrayEPKcP7_JNIEnviNS_9Primitive4TypeE+476)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #07 pc 0000000000009b2c /data/app/com.dfqin.encrypt-1/lib/arm64/libnative-lib.so (_ZN7_JNIEnv12NewByteArrayEi+36)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #08 pc 0000000000009cc0 /data/app/com.dfqin.encrypt-1/lib/arm64/libnative-lib.so (_ZN11EncodeUtils11decryptDataEP7_JNIEnvRP11_jbyteArrayi+296)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #09 pc 0000000000008bf4 /data/app/com.dfqin.encrypt-1/lib/arm64/libnative-lib.so (???)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #10 pc 0000000000128768 /system/lib64/libart.so (art_quick_generic_jni_trampoline+152)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #11 pc 000000000011edd8 /system/lib64/libart.so (art_quick_invoke_static_stub+600)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #12 pc 000000000012dae4 /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+344)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #13 pc 00000000004cd95c /system/lib64/libart.so (artInterpreterToCompiledCodeBridge+212)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #14 pc 00000000002a7ea8 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+480)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #15 pc 00000000000dde00 /system/lib64/libart.so (ZN3art11interpreter15ExecuteGotoImplILb0ELb0EEENS_6JValueEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameES2+22200)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #16 pc 0000000000285cb0 /system/lib64/libart.so (artInterpreterToInterpreterBridge+220)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #17 pc 00000000002a7ea8 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+480)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #18 pc 00000000000dde00 /system/lib64/libart.so (ZN3art11interpreter15ExecuteGotoImplILb0ELb0EEENS_6JValueEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameES2+22200)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #19 pc 0000000000285cb0 /system/lib64/libart.so (artInterpreterToInterpreterBridge+220)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #20 pc 00000000002a7ea8 /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+480)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #21 pc 00000000000dde78 /system/lib64/libart.so (ZN3art11interpreter15ExecuteGotoImplILb0ELb0EEENS_6JValueEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameES2+22320)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #22 pc 00000000002858b8 /system/lib64/libart.so (_ZN3art11interpreter30EnterInterpreterFromEntryPointEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameE+96)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #23 pc 000000000053a470 /system/lib64/libart.so (artQuickToInterpreterBridge+632)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #24 pc 00000000001288a4 /system/lib64/libart.so (art_quick_to_interpreter_bridge+100)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] native: #25 pc 0000000001616870 /data/dalvik-cache/arm64/system@framework@boot.oat (???)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] at com.dfqin.encrypt.SecureUtil.decryptData(Native method)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] at com.dfqin.encrypt.SecureUtil.decryptData(SecureUtil.java:21)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] at com.dfqin.encrypt.MainActivity.nativeDecode(MainActivity.java:129)
10-12 10:23:44.284 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] at com.dfqin.encrypt.MainActivity.onClick(MainActivity.java:60)
10-12 10:23:44.285 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] at android.view.View.performClick(View.java:5264)
10-12 10:23:44.285 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] at android.view.View$PerformClick.run(View.java:21297)
10-12 10:23:44.285 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] at android.os.Handler.handleCallback(Handler.java:743)
10-12 10:23:44.285 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] at android.os.Handler.dispatchMessage(Handler.java:95)
10-12 10:23:44.285 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] at android.os.Looper.loop(Looper.java:150)
10-12 10:23:44.285 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] at android.app.ActivityThread.main(ActivityThread.java:5546)
10-12 10:23:44.285 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] at java.lang.reflect.Method.invoke!(Native method)
10-12 10:23:44.285 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
10-12 10:23:44.285 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:684)
10-12 10:23:44.285 14623-14623/com.dfqin.encrypt A/art: art/runtime/java_vm_ext.cc:410]
10-12 10:23:44.285 14623-14623/com.dfqin.encrypt A/art: art/runtime/runtime.cc:368] Runtime aborting...
10-12 10:23:44.285 14623-14623/com.dfqin.encrypt A/art: art/runtime/runtime.cc:368]

@shenyunhuan
Copy link
Author

我看了一下,可能是只有arm64-v8a 的so文件 原因

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants