alibaba / alibaba/AndFix

锤子手机 SMARTISAN SM801闪退(这个是我在你们库里打印的System.out.println(AndFix:[类名] [方法名] [查看的内容])

Open
#187 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
7k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

麻烦帮忙解决下啊:
没有补丁的时候运行正常,一放入补丁就无法启动,报这个错;
锤子手机 T2
Smartisan OS 版本:v2.5.3
型号:SM801
Android版本:5.1.1
处理器:Qualcomm Technologies,Inc.MSM8992
/***************************************************************************************************_**/
05-04 13:26:27.580: I/System.out(20104): AndFix:SecurityChecker init packageInfo.signatures[0]:android.content.pm.Signature@f41f9c07
05-04 13:26:27.581: I/System.out(20104): AndFix:SecurityChecker init mDebuggable:false
05-04 13:26:27.582: I/System.out(20104): AndFix:PatchManager init appVersion:1.0,mPatchDir:/data/data/com.euler.andfix/files/apatch
05-04 13:26:27.582: I/System.out(20104): AndFix:PatchManager init 3
05-04 13:26:27.585: I/System.out(20104): AndFix:PatchManager init ver:1.0,appVersion:1.0
05-04 13:26:27.585: I/System.out(20104): AndFix:PatchManager init 5
05-04 13:26:27.585: I/System.out(20104): AndFix:PatchManager initPatchs files:[Ljava.io.File;@3bf15f11
05-04 13:26:27.585: D/euler(20104): inited.
05-04 13:26:27.585: I/System.out(20104): AndFix:PatchManager loadPatch 0:
05-04 13:26:27.586: D/euler(20104): apatch loaded.
05-04 13:26:27.586: I/System.out(20104): AndFix:PatchManager addPatch path:/storage/emulated/0/out.apatch
05-04 13:26:27.586: I/System.out(20104): AndFix:PatchManager addPatch src.getName():out.apatch
05-04 13:26:27.595: I/System.out(20104): AndFix:PatchManager addPatch
05-04 13:26:27.617: I/System.out(20104): AndFix:Patch init mName:new,mTime:Wed May 04 11:11:37 GMT+08:00 2016
05-04 13:26:27.617: I/System.out(20104): AndFix:Patch init attrName:Created-Time
05-04 13:26:27.617: I/System.out(20104): AndFix:Patch init attrName:Manifest-Version
05-04 13:26:27.617: I/System.out(20104): AndFix:Patch init attrName:From-File
05-04 13:26:27.617: I/System.out(20104): AndFix:Patch init attrName:To-File
05-04 13:26:27.617: I/System.out(20104): AndFix:Patch init attrName:Created-By
05-04 13:26:27.617: I/System.out(20104): AndFix:Patch init attrName:Patch-Name
05-04 13:26:27.617: I/System.out(20104): AndFix:Patch init attrName:Patch-Classes
05-04 13:26:27.624: I/System.out(20104): AndFix:AndFixManager fix mSupport:true
05-04 13:26:27.628: I/System.out(20104): AndFix:SecurityChecker check 0 :
05-04 13:26:27.628: I/System.out(20104): AndFix:SecurityChecker check path :/data/data/com.euler.andfix/files/apatch/out.apatch
05-04 13:26:27.628: I/System.out(20104): AndFix:AndFixManager fix verifyApk success:
05-04 13:26:27.629: I/System.out(20104): AndFix:AndFixManager fix optfile.exists() :false
05-04 13:26:27.678: E/cutils-trace(20126): Error opening trace file: No such file or directory (2)
05-04 13:26:27.678: I/dex2oat(20126): /system/bin/dex2oat --runtime-arg -classpath --runtime-arg --instruction-set=arm64 --instruction-set-features=div,needfix_835769 --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --dex-file=/data/data/com.euler.andfix/files/apatch/out.apatch --oat-fd=24 --oat-location=/data/data/com.euler.andfix/files/apatch_opt/out.apatch --runtime-arg -Xms64m --runtime-arg -Xmx512m
05-04 13:26:27.678: I/dex2oat(20126): Runtime::Init startup
05-04 13:26:27.678: I/dex2oat(20126): Runtime: Init options image_ is /system/framework/boot.art
05-04 13:26:27.678: I/dex2oat(20126): ImageSpace::FindImageFilename system_image_filename=/system/framework/arm64/boot.art cache_filename=/data/dalvik-cache/arm64/system@framework@boot.art has_system=1 has_cache=1 is_global_cache=1
05-04 13:26:27.678: I/dex2oat(20126): ImageSpace::Create image_location: /system/framework/boot.art
05-04 13:26:27.678: I/dex2oat(20126): ImageSpace::Create found_image=1
05-04 13:26:27.678: I/dex2oat(20126): ImageSpace::Create relocate=1
05-04 13:26:27.678: I/dex2oat(20126): ImageSpace::Create can_compile=1
05-04 13:26:27.678: I/dex2oat(20126): ImageSpace::Create using image file /data/dalvik-cache/arm64/system@framework@boot.art for image location /system/framework/boot.art
05-04 13:26:27.679: I/dex2oat(20126): Heap::Create create imagespace success with image file: /system/framework/boot.art
05-04 13:26:27.708: I/dex2oat(20126): dex2oat took 29.888ms (threads: 6) arena alloc=30KB java alloc=3KB native alloc=444KB free=7MB
05-04 13:26:27.711: I/System.out(20104): AndFix:AndFixManager fix saveFingerprint:true
05-04 13:26:27.712: I/System.out(20104): AndFix:SecurityChecker saveOptSig fingerprint:-32122666410016329811881424134838069742
05-04 13:26:27.712: I/System.out(20104): AndFix:SecurityChecker saveOptSig file.getName():out.apatch
05-04 13:26:27.716: I/System.out(20104): AndFix:AndFixManager fix while:
05-04 13:26:27.716: I/System.out(20104): AndFix:AndFixManager fix entry:com.euler.test.A_CF
05-04 13:26:27.717: I/System.out(20104): AndFix:AndFixManager fix while clazz:class com.euler.test.A_CF
05-04 13:26:27.717: I/System.out(20104): AndFix:AndFixManager fixClass 0:
05-04 13:26:27.717: I/System.out(20104): AndFix:AndFixManager fixClass methodReplace:null
05-04 13:26:27.717: I/System.out(20104): AndFix:AndFixManager fixClass methodReplace:null
05-04 13:26:27.724: I/System.out(20104): AndFix:AndFixManager fixClass methodReplace:@com.alipay.euler.andfix.annotation.MethodReplace(clazz=com.euler.test.A, method=a)
05-04 13:26:27.724: I/System.out(20104): AndFix:AndFixManager fixClass clz :com.euler.test.A,meth:a
05-04 13:26:27.725: I/System.out(20104): AndFix:AndFixManager replaceMethod 0 clazz :null,clazz:null
05-04 13:26:27.725: I/System.out(20104): AndFix:AndFixManager replaceMethod 1 clazz :class com.euler.test.A,clazz:class com.euler.test.A
05-04 13:26:27.727: D/AndFix(20104): modify com.euler.test.A.s flag:
05-04 13:26:27.734: D/AndFix(20104): setFieldFlag_5_1: 81
05-04 13:26:27.734: D/AndFix(20104): modify com.euler.test.A.$change flag:
05-04 13:26:27.734: D/AndFix(20104): setFieldFlag_5_1: 33
05-04 13:26:27.734: D/AndFix(20104): modify com.euler.test.A.i flag:
05-04 13:26:27.734: D/AndFix(20104): setFieldFlag_5_1: 33
05-04 13:26:27.734: D/AndFix(20104): modify com.euler.test.A.o flag:
05-04 13:26:27.734: D/AndFix(20104): setFieldFlag_5_1: 33
05-04 13:26:27.734: I/System.out(20104): AndFix:AndFixManager replaceMethod 2 clazz :class com.euler.test.A,clazz:class com.euler.test.A
05-04 13:26:27.734: A/libc(20104): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8000912d93c50 in tid 20104 (om.euler.andfix)
05-04 13:26:27.841: I/DEBUG(348): *_\* **\* **\* **\* **\* **\* **\* **\* **\* **\* **\* **\* **\* **\* **\* ***
05-04 13:26:27.841: I/DEBUG(348): Build fingerprint: 'SMARTISAN/icesky_msm8992/icesky_msm8992:5.1.1/LMY47V/64:user/release-keys'
05-04 13:26:27.841: I/DEBUG(348): Revision: '0'
05-04 13:26:27.841: I/DEBUG(348): ABI: 'arm64'
05-04 13:26:27.842: I/DEBUG(348): pid: 20104, tid: 20104, name: om.euler.andfix >>> com.euler.andfix <<<
05-04 13:26:27.842: I/DEBUG(348): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8000912d93c50
05-04 13:26:27.854: W/debuggerd64(348): type=1400 audit(0.0:5854): avc: denied { search } for name="com.euler.andfix" dev="mmcblk0p41" ino=692854 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0 tclass=dir permissive=0
05-04 13:26:27.854: W/debuggerd64(348): type=1400 audit(0.0:5855): avc: denied { search } for name="com.euler.andfix" dev="mmcblk0p41" ino=692854 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0 tclass=dir permissive=0
05-04 13:26:27.867: I/DEBUG(348): x0 0000000912da0140 x1 0008000912d93c40 x2 0000000000000001 x3 0000000000000000
05-04 13:26:27.867: I/DEBUG(348): x4 0000007f8c47a06c x5 0000000000000000 x6 0000007f8c47a068 x7 0000000000000000
05-04 13:26:27.867: I/DEBUG(348): x8 0000000000000000 x9 6f3496641e7b7f5d x10 0000000000000000 x11 0000000000430000
05-04 13:26:27.867: I/DEBUG(348): x12 0000000000550000 x13 0000000000430000 x14 0000000000000000 x15 0000007f8c3fb000
05-04 13:26:27.867: I/DEBUG(348): x16 0000007f8c3fd470 x17 000000000000002e x18 0000007f8c349000 x19 0000000000000033
05-04 13:26:27.867: I/DEBUG(348): x20 0000007f8568ce4c x21 0000007f8c495000 x22 0000000012c7be20 x23 0000000012d8ede0
05-04 13:26:27.867: I/DEBUG(348): x24 0000000012da4ee0 x25 0000000012da5510 x26 0000000012c94f60 x27 0000000012da1d60
05-04 13:26:27.868: I/DEBUG(348): x28 0000000012d8ede0 x29 0000000012da7140 x30 0000007f8568d450
05-04 13:26:27.868: I/DEBUG(348): sp 0000007ff5ed38f0 pc 0000007f8568d464 pstate 0000000060000000
05-04 13:26:27.868: I/DEBUG(348): backtrace:
05-04 13:26:27.869: I/DEBUG(348): #00 pc 0000000000001464 /data/app/com.euler.andfix-1/lib/arm64/libandfix.so (replace_5_1(_JNIEnv_, _jobject_, _jobject*)+68)
05-04 13:26:27.869: I/DEBUG(348): #01 pc 0000000000001104 /data/app/com.euler.andfix-1/lib/arm64/libandfix.so
05-04 13:26:27.869: I/DEBUG(348): #02 pc 0000000000000e84 /data/app/com.euler.andfix-1/lib/arm64/libandfix.so
05-04 13:26:27.869: I/DEBUG(348): #03 pc 000000000000145c /data/data/com.euler.andfix/cache/slice-slice_8-classes.dex
05-04 13:26:27.884: W/debuggerd64(348): type=1400 audit(0.0:5856): avc: denied { search } for name="com.euler.andfix" dev="mmcblk0p41" ino=692854 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0 tclass=dir permissive=0
05-04 13:26:27.884: W/debuggerd64(348): type=1400 audit(0.0:5857): avc: denied { search } for name="com.euler.andfix" dev="mmcblk0p41" ino=692854 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0 tclass=dir permissive=0
05-04 13:26:28.260: I/DEBUG(348): Tombstone written to: /data/tombstones/tombstone_04

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the crash on the listed Smartisan T2 environment with out.apatch, then inspect the native backtrace for libandfix.so and replace_5_1. The work is done when loading the patch no longer produces the SIGSEGV during method replacement on the reported ARM64 Android 5.1.1 setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, cpp
Domain
mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.