My Android device is an AOSP 13 launch device, based on x86_64 architecture, bootloader is also unlocked. I downloaded latest Android studio from Ubuntu software as my testpc is Ubuntu machine. I have one vendor application(already installed in the device) and i can able to run profiler for that apk in Android Studio by connecting my AOSP 13 device through adb. I can also able to see system processes, system applications listed in the profiler.
I have another Android device which is AOSP 14, based on x86_64 architecture, bootloader is also unlocked. I installed the same vendor apk which i used for AOSP 13 in the AOSP 14 device(apk is compatible for both versions), but in the Android studio profiler i can't see this apk. Not only this apk, i haven't seen any system processes or system applications listed in profiler. As per this link added the <profileable android:shell="true" />
in the AndroidManifest.xml of my apk then i can able to profile the vendor apk. My question is, is this expected? Like in Android 13, i can able to see system processes and applications listed in Android studio profiler, but in Android 14 i can't see any system processes or applications in profiler and only able to run profiler if the apk's AndroidManifest.xml has <profileable android:shell="true" />
.
My Android device is an AOSP 13 launch device, based on x86_64 architecture, bootloader is also unlocked. I downloaded latest Android studio from Ubuntu software as my testpc is Ubuntu machine. I have one vendor application(already installed in the device) and i can able to run profiler for that apk in Android Studio by connecting my AOSP 13 device through adb. I can also able to see system processes, system applications listed in the profiler.
I have another Android device which is AOSP 14, based on x86_64 architecture, bootloader is also unlocked. I installed the same vendor apk which i used for AOSP 13 in the AOSP 14 device(apk is compatible for both versions), but in the Android studio profiler i can't see this apk. Not only this apk, i haven't seen any system processes or system applications listed in profiler. As per this link added the <profileable android:shell="true" />
in the AndroidManifest.xml of my apk then i can able to profile the vendor apk. My question is, is this expected? Like in Android 13, i can able to see system processes and applications listed in Android studio profiler, but in Android 14 i can't see any system processes or applications in profiler and only able to run profiler if the apk's AndroidManifest.xml has <profileable android:shell="true" />
.
1 Answer
Reset to default 0Based on your description "in Android 13, i can able to see system processes and applications listed in Android studio profiler", I believe this Android 13 device may be using a userdebug
build system image, which can be verified by adb shell getprop | grep ro.build.fingerprint
. Most devices on the market are using user
builds.
Since Android 14, the default debuggability of apps in usedebug builds is changed. Only debuggable or profileable apps can be seen by the profiler. The <profileable android:shell="true" />
line makes your app profileable, which is recommended because it creates a scenario that's closest to the end user's.
If adding <profileable android:shell="true" />
is impossible, you can allow a debugger or profiler to work with your app by setting the persist.debug.dalvik.vm.jdwp.enabled
system property. This essentially restores the behavior of Android 13 or older.
adb shell setprop persist.debug.dalvik.vm.jdwp.enabled 1
adb reboot
Here is more context: https://source.android.com/docs/core/runtime/configure#jdwp_options.