Status Update
Comments
tn...@google.com <tn...@google.com>
ac...@google.com <ac...@google.com> #2
2023-07-12 09:43:25.498 10110-10110 t.my.pkg my.redacted.pkg W type=1400 audit(0.0:176): avc: granted { execute } for path="/data/data/my.redacted.pkg/code_cache/startup_agents/75d1b755-agent.so" dev="dm-37" ino=335910 scontext=u:r:untrusted_app:s0:c168,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c168,c256,c512,c768 tclass=file app=my.redacted.pkg
2023-07-12 09:43:25.552 10110-10110 t.my.pkg my.redacted.pkg E Attempt to load writable dex file: /data/data/my.redacted.pkg/code_cache/.studio/live_edit.dex
We ran into this for the normal deployment pipeline when the QA are doing sanity tests for UDP. Android no longer allow the runtime to load a writable dex from the package's code_cache. We just have to do a delete and write much like IWI.
Noah, the live_edit.dex contains only the parents for the lambdas right? We only need to write it once anyways?
sa...@google.com <sa...@google.com> #3
Looks like the solution in ag/24099980 was to switch to WriteFile
which does not attempt to unlink
if the jar containing our lambda implementation is already there.
However I don't see anything in the log that would allow us to diagnose that. @noah, is it missing or I am missing it?
ac...@google.com <ac...@google.com> #4
no...@google.com <no...@google.com> #5
Apologies for the lack of clarity in the CL description; the issue is thus:
More recent version of Android do not allow loading writeable (in a file systems permission sense) dex files
We've addressed this issue previously by updating WriteFile()
, which we use to write dex files to code_cache
, to default to writing a readonly file
For whatever reason (probably my own error), one of our LiveEdit-specific dex files was NOT being written to code_cache using WriteFile()
and thus did NOT pick up this fix automatically.
This caused issues when using LiveEdit on versions of Android that forbid loading writeable dex.
ac...@google.com <ac...@google.com> #6
ho...@gmail.com <ho...@gmail.com> #7
ke...@gmail.com <ke...@gmail.com> #8
su...@gmail.com <su...@gmail.com> #9
ac...@google.com <ac...@google.com> #10
Hi,
Why is it marked fixed without a solution?
The fix for this particular bug is
Also, If you are having similar issue, please open a brand new bug. We have a system to track pending issues and make it visible to the leads of corresponding components. Otherwise, replying to closed bugs will limit the visiblity to whomever is still in the +cc entries of that particular bug whom sometimes might not be available to provide a prompt reply.
Thanks!
tn...@google.com <tn...@google.com> #11
The fix for this particular bug is here and I am not sure why the bot fails to tag this bug with it.
I think the bot which attaches commit messages to bugs only does that for internal bugs, not public bugs.
Description
I have an app which I'm running on the emulator, and that's been working fine. Then I switched to a different system image (from resizable emulator to a pixel 7 pro emulator image with bumped up font and display sizes).
Now I'm getting live edit warnings for trivial edits that usually work (such as changing the padding dimension) and the cause reported is just "AGENT_ERROR" (see screenshot).
The logcat output (with packages replaced):
And here's the IDE log:
AGP: 8.2.0-alpha11 Android Studio Hedgehog | 2023.1.1 Canary 11 Build #AI-231.9161.38.2311.10413018, built on June 29, 2023 Runtime version: 17.0.7+0-17.0.7b829.16-10353782 aarch64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. macOS 13.4.1 GC: G1 Young Generation, G1 Old Generation Memory: 3072M Cores: 10 Metal Rendering is ON Registry: external.system.auto.import.disabled=true debugger.new.tool.window.layout=true ide.text.editor.with.preview.show.floating.toolbar=false ide.experimental.ui=true feature.suggester.enable.suggesters=true
Non-Bundled Plugins: Key Promoter X (2023.1.0) training (231.8770.66) org.intellij.featureSuggester (231.278)