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

X86_64 emulator support: ARTist / ARTistGui cannot instrument apps on the Nougat 7.1.1 x86_64 emulator images #15

Open
sweisgerber-dev opened this issue May 15, 2018 · 0 comments

Comments

@sweisgerber-dev
Copy link
Member

sweisgerber-dev commented May 15, 2018

ARTist / ARTistGui cannot instrument apps on the Nougat 7.1.1 x86_64 emulator images

Everything works find on the Nougat 7.1.1 x86 images.

Cause:

/data/dalvik-cache/x86_64/ is empty on those images, but dex2oat looks for data/dalvik-cache/x86_64/system@[email protected] and possible more files there.
dex2oat also tries to copy them from /system/framework/x86_64/ but is not allowed to do so.

Things I tried:

  • Populating them manually from /system/framework/x86_64/*
    • compilation failed anyways and the newly copied files got deleted from /data/dalvik-cache/x86_64/ again, when executing dex2oat.
  • Forcing dex2oat to use --instruction-set=x86 leads to a working compilation/instrumentation process, but the instrumented oat-file won't get used afterwards when executing the APP.

Relevant Error Section

dex2artist: Could not create image space with image file '/system/framework/boot.art'. Attempting to fall back to imageless running. Error was: Unable to relocate image '/system/framework/boot.art' from '/system/framework/x86_64/boot.art' to '/data/dalvik-cache/x86_64/system@[email protected]': Only the zygote can create the global boot image.
dex2artist: Attempted image: /system/framework/boot.art
dex2artist: Dex file fallback disabled, cannot continue without image.
dex2artist: Failed to create runtime

Error Log (long)

ArtistProcExecutor: execute() SU [`export LD_LIBRARY_PATH=/data/app/saarland.cispa.artist.artistgui-2/lib/x86_64:/data/user/0/saarland.cispa.artist.artistgui/files/artist/lib/;/data/user/0/saarland.cispa.artist.artistgui/files/artist/dex2oat --oat-file=/data/app/de.heise.android.heiseonlineapp-1/oat/x86_64/base.odex --compiler-backend=Optimizing --compiler-filter=everything --generate-debug-info --compile-pic --dex-file=/data/app/de.heise.android.heiseonlineapp-1/base.apk --checksum-rewriting --dex-location=/data/app/de.heise.android.heiseonlineapp-1/base.apk --instruction-set=x86_64 --instruction-set-variant=atom --instruction-set-features=smp --instruction-set-features=default`]
ArtistProcExecutor: > execute() ProcessInfos: [Process[pid=24267, hasExited=false]]
ArtistProcExecutor: > execute() Waiting: de.heise.android.heiseonlineapp:dex2artist
art     : Dex location /system/framework/am.jar does not seem to include dex file. Allow oat file use. This is potentially dangerous.
tmp-mksh: type=1400 audit(0.0:979): avc: denied { execute } for name="dex2oat" dev="dm-0" ino=22057 scontext=u:r:init:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file permissive=1
tmp-mksh: type=1400 audit(0.0:980): avc: denied { execute_no_trans } for path="/data/data/saarland.cispa.artist.artistgui/files/artist/dex2oat" dev="dm-0" ino=22057 scontext=u:r:init:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=file permissive=1
memtrack: Couldn't load memtrack module (No such file or directory)
android.os.Debug: failed to load memtrack module: -2
Radio-JNI: register_android_hardware_Radio DONE
dex2artist: /data/user/0/saarland.cispa.artist.artistgui/files/artist/dex2oat --oat-file=/data/app/de.heise.android.heiseonlineapp-1/oat/x86_64/base.odex --compiler-backend=Optimizing --compiler-filter=everything --generate-debug-info --compile-pic --dex-file=/data/app/de.heise.android.heiseonlineapp-1/base.apk --checksum-rewriting --dex-location=/data/app/de.heise.android.heiseonlineapp-1/base.apk
dex2artist: Could not create image space with image file '/system/framework/boot.art'. Attempting to fall back to imageless running. Error was: Unable to relocate image '/system/framework/boot.art' from '/system/framework/x86_64/boot.art' to '/data/dalvik-cache/x86_64/system@[email protected]': Only the zygote can create the global boot image.
dex2artist: Attempted image: /system/framework/boot.art
dex2artist: Dex file fallback disabled, cannot continue without image.
dex2artist: Failed to create runtime
dex2artist: dex2oat took 4.737ms (threads: 4) 
AndroidRuntime: Calling main entry com.android.commands.am.Am
AndroidRuntime: Shutting down VM
EGL_emulation: eglMakeCurrent: 0x766803437320: ver 2 0 (tinfo 0x76680340c340)
WindowManager: Attempted to remove non-existing token: android.os.Binder@db980df
AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 0 <<<<<<
AndroidRuntime: CheckJNI is ON
art     : Could not create image space with image file '/system/framework/boot.art'. Attempting to fall back to imageless running. Error was: Unable to relocate image '/system/framework/boot.art' from '/system/framework/x86_64/boot.art' to '/data/dalvik-cache/x86_64/system@[email protected]': Only the zygote can create the global boot image.
art     : Attempted image: /system/framework/boot.art
art     : Unexpected CPU variant for X86 using defaults: x86_64
ArtistProcExecutor: > execute() Waiting: de.heise.android.heiseonlineapp:dex2artist DONE

Affected Projects

  • ArtistGui (configuring commandline / config parameter when calling dex2oat)
  • ARTist (perhaps we need to adapt this as well)
  • art (perhaps we need to adapt this as well)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant