Status Update
Comments
en...@google.com <en...@google.com> #2
Thanks! Over to Nader to take a detailed look!
gm...@google.com <gm...@google.com>
di...@google.com <di...@google.com>
ps...@google.com <ps...@google.com> #3
I believe we should dup
en...@google.com <en...@google.com> #4
Yes definitely. Thanks Siyamed!
In the meantime there maybe other ways to work around it. The main issue is that surface implicitly creates a seaprate layer which impacts the behavior of the blending modes. Being ale to just set the Brush on the paint directly would work around this in the most straightforward way.
ps...@google.com <ps...@google.com> #5
The issue is that the content depends on transparent pixels existing in the scene before the gradient is applied.
To address this you can do the following in order to force rasterization of the graphicsLayer into a separate buffer using CompositingStrategy.Offscreen
, then only draw the gradient on top of the pixels rendered by the text Composable.
Text("Hello World!", modifier =
// Use offscreen compositing strategy so that there are transparent pixels in the offscreen buffer
// to blend against with the SrcIn blend mode
Modifier.graphicsLayer(compositingStrategy = CompositingStrategy.Offscreen).drawWithCache {
val brush = Brush.horizontalGradient(listOf(Color.Red, Color.Blue, Color.Cyan, Color.Magenta, Color.Green))
onDrawWithContent {
drawContent()
drawRect(brush, blendMode = BlendMode.SrcIn)
}
}
)
en...@google.com <en...@google.com> #6
my devices are available from the picker
but it looks like profiler doesn't work on them either.. so it's not just the inspector at this point
this part makes me particularly sad:
so essentially all relevant tools no longer work on this userdebug device, despite it running relatively recent android version (11 is not that old and we have to support it)
en...@google.com <en...@google.com> #7
in case this bug is linked to Android R being too old, here is the same exact problem with Android V / 15:
ADB is working. ADB was started by the Android Studio, so I assume it is using the correct version. Yet - won't budge. This Pixel Tablet is also running a userdebug build.
ps...@google.com <ps...@google.com> #8
API level is not the issue - we support Android 11.
Inspectors and profilers share the same infrastructure, so it makes sense that both have the same problem. I will get a device and flash it with a userdebug build, hopefully I can replicate.
ps...@google.com <ps...@google.com> #9
I have tried on a lynx-userdebug 14. Everything works for me. Can you try with an emulator? I suspect it will work there.
I see this exception in the logs, which indicates that ddmlib is failing to copy the transport to the device. I am still not sure why.
2024-11-01 12:38:13,726 [ 23834] INFO - #com.android.tools.idea.transport.TransportFileManager - Pushing transport to /data/local/tmp/perfd/...
2024-11-01 12:38:14,073 [ 24181] WARN - #com.android.ddmlib - transfer error: couldn't create file: Permission denied
2024-11-01 12:38:14,073 [ 24181] WARN - #com.android.ddmlib - Error during Sync: couldn't create file: Permission denied
2024-11-01 12:38:14,073 [ 24181] WARN - #com.android.tools.idea.transport.TransportDeviceManager - Error when trying to spawn Transport
java.lang.RuntimeException: com.android.ddmlib.SyncException: couldn't create file: Permission denied
at com.android.tools.idea.transport.TransportFileManager.pushFileToDevice(TransportFileManager.java:331)
at com.android.tools.idea.transport.TransportFileManager.copyFileToDevice(TransportFileManager.java:269)
at com.android.tools.idea.transport.TransportFileManager.copyFilesToDevice(TransportFileManager.java:137)
at com.android.tools.idea.transport.TransportDeviceManager$TransportThread.run(TransportDeviceManager.java:255)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: com.android.ddmlib.SyncException: couldn't create file: Permission denied
at com.android.ddmlib.SyncService.doPushFile(SyncService.java:752)
at com.android.ddmlib.SyncService.pushFile(SyncService.java:442)
at com.android.ddmlib.internal.DeviceImpl.lambda$pushFile$28(DeviceImpl.java:1338)
at com.android.ddmlib.internal.DeviceImpl.logRun4(DeviceImpl.java:1849)
at com.android.ddmlib.internal.DeviceImpl.pushFile(DeviceImpl.java:1320)
at com.android.tools.idea.transport.TransportFileManager.pushFileToDevice(TransportFileManager.java:305)
en...@google.com <en...@google.com> #10
(please disregard this comment, seems i've ran out of disk space)
en...@google.com <en...@google.com> #11
edit: in the log i saw i am short on disk space (sigh).. let me clear up some space and try again.
ps...@google.com <ps...@google.com> #12
in the log i saw i am short on disk space (sigh).. let me clear up some space and try again
Yes I was about to suggest this, would explain why the emulator doesn't start.
A few things to try on your physical devices:
adb push yourfile.txt /data/local/tmp/perfd
, does this work?- Does running
adb root
make any difference? (if testing in Studio, it will require a restart after running the command) - How about
adb shell setenforce 0
? (this disables SELinux, so you might want to re-enable it after withadb shell setenforce 1
)
en...@google.com <en...@google.com> #13
- yes, it does - in every case, including the virtual device
% adb -d push args.gn /data/local/tmp/perfd
args.gn: 1 file pushed, 0 skipped. 0.1 MB/s (53 bytes in 0.000s)
% adb -e push args.gn /data/local/tmp/perfd
args.gn: 1 file pushed, 0 skipped. 0.1 MB/s (53 bytes in 0.001s)
- YES that seems to have done the trick THANK YOU! However, I can't run the
adb root
on emulator as all arm64 images i see appear to be production builds:
% adb root
adbd cannot run as root in production builds
- that wouldn't - and doesn't work on the non-userdebug devices (for the right reasons). so
adb root
was the answer for physical devices - emulated ones don't work - unless i deploy an AOSP image, which does not include play services (needed by Chrome - at least by Chrome Search that I work on, as this work requires me to sign in with Google).
Question
are there images i can use with AS that include play services and are rooted? does ASwB include these maybe?
ps...@google.com <ps...@google.com> #14
A newly created emulator (play services or not) should run the inspectors without issues, as long as the app is debuggable. In your case the emulator is not even detected.
Could you send the logs from the emulator too? although I expect to see the same issue from before.
To make sure, you don't have multiple versions of Studio running right? or Intellij with the Android Plugin.
en...@google.com <en...@google.com> #15
sure - i've attached them.
things are far worse since yesterday, when the emulator images booted up to some usable UI. today, these images boot up to a white screen and are completely useless.
the only thing that changed since yesterday is that i work from the office.
i went as far as removing AndroidStudio completely, and deleting the entire ~/Library/Android folder, but that didn't change anything. the sad thing is that i am unable to get any work done, as i've left my physical devices at home (seeing that the emulator images did boot up yesterday)...
Description
userdebug
build, and I can't inspect debuggable apks.I use 2024.1.1 patch 1 build where layout inspector (and profiler) mostly work; this build was also shared on Chromium Dev chat as mostly working - and it did work for a while, until it stopped.
even with all components up to date, LI doesn't work. Disabling some "embedded LI" settings presents me with a deeply confusing state, where I see live feed from my physical device, but LI says that no device is detected.
Attach log files from Android Studio 2A. In the IDE, select the Help..Collect Logs and Diagnostic Data menu option. 2B. Create a diagnostic report and save it to your local computer. 2C. Attach the report to this bug using the Add attachments button.
If you know what they are, write the steps to reproduce:
3A. Connect userdebug device, confirm developer options are enabled, adb connects and shows shell 3B. Start Android Studio 3C. click 'Layout Inspector'
Note it doesn't matter if i toggle 'enable auto connect' and 'enable embedded layout inspector' settings on or off. it just says "no device detected" and refuses to do anything.
Build: AI-241.18034.62.2411.12071903, 202407101413 AS: Koala | 2024.1.1 Patch 1 AI-241.18034.62.2411.12071903, JRE 17.0.11+0-17.0.11b1207.24-11852314x64 JetBrains s.r.o., OS Mac OS X(aarch64) v14.7, screens 3840.0x2160.0, 3840.0x2160.0; Retina Android Gradle Plugin: 8.1.0-rc01 Gradle: 8.0 Gradle JDK: JetBrains Runtime 17.0.11 - aarch64 NDK: from local.properties: (not specified), latest from SDK: (not found) CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: 3.29.3 Source: send_feedback_icon```