Community
cancel
Showing results for 
Search instead for 
Did you mean: 
140 Views

VTune Profiling for User Image on ADB device

 Hi

I am using VTune version : VTune 2018 Update 3

I  want to do profile for some apps on ADB device flashed by User Celadon Image on KBL-NUC.

I am doing VTune profile for target system : Android device (ADB) , Target Type: Attach to Process, Analysis Type: Basic Hotspot

I am getting an error: 

Cannot attach to the target application due to an error returned by the 'run-as' utility. Suggestion: Make sure your Android image is installed correctly.

Also, when I switched to Target type: Profile System, and choose Analysis Type: Advanced Hotspot:

I am getting error:

This analysis type requires either an access to system-wide monitoring in the Linux perf subsystem or installation of the VTune Amplifier drivers (see the "Sampling Drivers" help topic for further details). Please set the /proc/sys/kernel/perf_event_paranoid value to 0 or less to continue without installing the drivers.

But when I do profile for Userdebug Image of Celadon flashing on KBL-NUC , and doing the above step on the same device. I do not see any error and successfully able to produce the result.

So can you please tell me, how to get  fixed these error while doing for User Image flashed on device. 

Thanks in advance!!

0 Kudos
5 Replies
Kirill_U_Intel
Employee
140 Views

Hi

userdebug image could be rooted (adb root) and VTune have abilities for all collection types in this case.

user image could NOT be rootes and advanced hotspots are not available at all on such devices.

Basic hotspots needs to have 'run-as' correct working utility

could you share output from 'adb shell run-as NAME_OF_PROFILED_PACKAGE id'?

for example, adb shell run-as com.intel.vtune id

Thanks, Kirill

140 Views

Hi KIRILL,

Thanks for your reply.

Here I am sending you my details id after doing : adb shell run-as com.intel.vtune id

uid=10087(u0_a87) gid=10087(u0_a87) groups=10087(u0_a87),1004(input),1007(log),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats),3009(readproc),3011(uhid) context=u:r:untrusted_app_25:s0:c512,c768

 

Kirill_U_Intel
Employee
140 Views

Could you share the run-as output for YOUR package? What is the name of profiled process?

140 Views

Hi Krill,

Here is the output after doing the : adb shell run-as com.jam.endo

run-as: package not debuggable: com.jam.endo

Thanks, Ratnesh

Kirill_U_Intel
Employee
140 Views

I see.

Unfortunately we could not profile not debuggable packages without root permissions.

Is it possible to build com.jam.endo.apk  with debuug key?

androidmanifest.xml example

    <application
        .....
         android:debuggable="true">
.....
    </application>
 
Reply