일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
- tracerpid
- Linux custom packer
- android inject
- initial-exec
- on stack replacement
- LLVM 난독화
- Obfuscator
- so inject
- on-stack replacement
- custom packer
- apm
- pthread
- Android
- tracing
- 난독화
- anti debugging
- LLVM Obfuscator
- linux thread
- linux debugging
- TLS
- v8 tracing
- OSR
- v8 optimizing
- Injection
- Linux packer
- thread local storage
- LLVM
- uftrace
- 안티디버깅
- pinpoint
- Today
- Total
Why should I know this?
Dexopt, Dex2oat 실행 옵션 본문
/system/bin/dex2oat --zip-fd=6 --zip-location=/system/app/Email.apk --oat-fd=7 --oat-location=/data/dalvik-cache/system@app@Email.apk@classes.dex --profile-file=/data/dalvik-cache/profiles/com.android.email
/system/bin/dex2oat --image=/data/dalvik-cache/system@framework@boot.art --runtime-arg-Xms64m --runtime-arg -Xmx64m --dex-file=/system/framework/core-libart.jar --dex-file=/system/framework/conscrypt.jar --dex-file=/system/framework/okhttp.jar --dex-file=/system/framework/core-junit.jar --dex-file=/system/framework/bouncycastle.jar --dex-file=/system/framework/ext.jar --dex-file=/system/framework/framework.jar --dex-file=/system/framework/framework2.jar --dex-file=/system/framework/telephony-common.jar --dex-file=/system/framework/voip-common.jar --dex-file=/system/framework/mms-common.jar--dex-file=/system/framework/android.policy.jar --dex-file=/system/framework/services.jar --dex-file=/system/framework/apache-xml.jar --dex-file=/system/framework/webviewchromium.jar --oat-file=/data/dalvik-cache/system@framework@boot.oat --runtime-arg -implicit-checks:none --instruction-set=arm --instruction-set-features=default --base=0x70000000 --image-classes-zip=/system/framework/framework.jar
// while aosp building
dex2oatd I 10313 10313 art/dex2oat/dex2oat.cc:1329] out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m --boot-image=out/target/product/generic_x86_64/dex_bootjars/system/framework/boot.art --dex-file=out/target/product/generic_x86_64/obj/APPS/Calendar_intermediates/x86_64/package.odex.input --dex-location=/system/app/Calendar/Calendar.apk --oat-file=out/target/product/generic_x86_64/obj/APPS/Calendar_intermediates/x86_64/package.odex --android-root=out/target/product/generic_x86_64/system --instruction-set=x86_64 --instruction-set-features=default --include-patch-information --runtime-arg -Xnorelocate --no-include-debug-symbols
dex2oatd I 12781 12781 art/dex2oat/dex2oat.cc:1329] out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m --boot-image=out/target/product/generic_x86_64/dex_bootjars/system/framework/boot.art --dex-file=out/target/product/generic_x86_64/obj/APPS/DownloadProviderUi_intermediates/x86_64/package.odex.input --dex-location=/system/app/DownloadProviderUi/DownloadProviderUi.apk --oat-file=out/target/product/generic_x86_64/obj/APPS/DownloadProviderUi_intermediates/x86_64/package.odex --android-root=out/target/product/generic_x86_64/system --instruction-set=x86_64 --instruction-set-features=default --include-patch-information --runtime-arg -Xnorelocate --no-include-debug-symbols
dex2oatd I 12576 12576 art/dex2oat/dex2oat.cc:1329] out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m --boot-image=out/target/product/generic_x86_64/dex_bootjars/system/framework/boot.art --dex-file=out/target/product/generic_x86_64/obj/APPS/DocumentsUI_intermediates/x86_64/package.odex.input --dex-location=/system/app/DocumentsUI/DocumentsUI.apk --oat-file=out/target/product/generic_x86_64/obj/APPS/DocumentsUI_intermediates/x86_64/package.odex --android-root=out/target/product/generic_x86_64/system --instruction-set=x86_64 --instruction-set-features=default --include-patch-information --runtime-arg -Xnorelocate --no-include-debug-symbols
Compiler backends:
– Quick
– Optimizing
– Portable
Quick Backend
- Medium level IR (DEX bytecode)
- Low level IR
- Native code
- Some optimizations at each stage
Portable backend
- Uses LLVM bitcode as its LIR
- Op)miza)ons using LLVM op)mizer
- Code genera)on is done by LLVM backend
Portable backend는 5 이후 제거됨. 6부터는 오직 Quick, Optimizing만 사용 가능
# out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m --boot-image=out/target/product/generic_x86_64/dex_bootjars/system/framework/boot.art --dex-file=out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/classes.dex --dex-location=/system/app/DocumentsUI/DocumentsUI.apk --oat-file=out/target/product/generic_x86_64/obj/APPS/DocumentsUI_intermediates/x86_64/package.odex --android-root=out/target/product/generic_x86_64/system --instruction-set=x86_64 --instruction-set-features=default --include-patch-information --runtime-arg -Xnorelocate --no-include-debug-symbols --bitcode=/AOSP5/ttest.bc --compiler-backend=Portable dex2oatd I 74756 74756 art/dex2oat/dex2oat.cc:1329] out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m --boot-image=out/target/product/generic_x86_64/dex_bootjars/system/framework/boot.art --dex-file=out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/classes.dex --dex-location=/system/app/DocumentsUI/DocumentsUI.apk --oat-file=out/target/product/generic_x86_64/obj/APPS/DocumentsUI_intermediates/x86_64/package.odex --android-root=out/target/product/generic_x86_64/system --instruction-set=x86_64 --instruction-set-features=default --include-patch-information --runtime-arg -Xnorelocate --no-include-debug-symbols --bitcode=/AOSP5/ttest.bc --compiler-backend=Portable dex2oatd F 74756 74756 art/compiler/compiler.cc:191] Portable compiler not compiled dex2oatd E 74756 74756 art/runtime/base/mutex-inl.h:119] Lock level violation: holding "abort lock" (level AbortLock - 5) while locking "mutator lock" (level MutatorLock - 46)
'Knowledge > Android' 카테고리의 다른 글
SystemCall 직접 박아넣기 (0) | 2022.12.07 |
---|---|
Android Hooking - Java layer 편 #1 (3) | 2022.12.07 |
ARMv7 에서 Cacheflush를 사용할 때 주의점 (0) | 2020.02.22 |
Android 보안솔루션의 기법 깨기 (8) | 2019.02.22 |
Android에서 모든 Activity를 후킹하는 가장 깔끔한 방법. (2) | 2019.02.18 |