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

System instrumentation #87

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

alfink
Copy link
Collaborator

@alfink alfink commented Sep 12, 2019

@alfink alfink force-pushed the system_instrumentation branch from 7342d06 to c2c774b Compare September 12, 2019 12:24
Copy link
Member

@schrnz schrnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome feature! Unfortunately, I ran into a problem on all my devices b/c the services.jar with the systemserver's code is not fully present there:

$ adb pull /system/framework/services.jar
/system/framework/services.jar: 1 file pulled. 0.0 MB/s (183 bytes in 0.045s)
$ unzip services.jar 
Archive:  services.jar
 extracting: META-INF/MANIFEST.MF    
$ tree
.
├── META-INF
│   └── MANIFEST.MF
└── services.jar

1 directory, 2 files

When I checked the corresponding oat file, oatdump indicated that it was pre-compiled from the AOSP tree instead of on-device during the first boot. Example from a OnePlus 3T (Android 9), but had similar results on a rooted Nexus 9 running Android 6:

dex2oat-cmdline = out/host/linux-x86/bin/dex2oatd --runtime-arg -Xms64m --runtime-arg -Xmx512m --class-loader-context=& --boot-image=out/target/product/OnePlus3/dex_bootjars/system/framework/boot.art --dex-file=out/target/common/obj/JAVA_LIBRARIES/services_intermediates/javalib.jar --dex-location=/system/framework/services.jar --oat-file=out/target/product/OnePlus3/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.odex --android-root=out/target/product/OnePlus3/system --instruction-set=arm64 --instruction-set-variant=kryo --instruction-set-features=default --runtime-arg -Xnorelocate --compile-pic --no-generate-debug-info --generate-build-id --abort-on-hard-verifier-error --force-determinism --no-inline-from=core-oj.jar --compiler-filter=speed --generate-mini-debug-info --compilation-reason=prebuilt --app-image-file=out/target/product/OnePlus3/obj/JAVA_LIBRARIES/services_intermediates/oat/arm64/javalib.art --image-format=lz4 --profile-file=out/target/product/OnePlus3/obj/JAVA_LIBRARIES/services_intermediates//profile.prof

It seems we have to investigate if the code is simply not there or somewhere else. We might be able to dump it from the oat in some cases...

Could you have a look into why it is there for your test device but not others?

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

Successfully merging this pull request may close these issues.

Crash: Resources.NotFoundException in AppIconCache
2 participants