Open
Conversation
(cherry picked from commit 5888ad5) (cherry picked from commit f3830ab)
7342d06 to
c2c774b
Compare
schrnz
requested changes
Sep 13, 2019
Member
schrnz
left a comment
There was a problem hiding this comment.
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?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.