Lineage OS 17.1: running app as root username

Search This thread

vv_777

Member
Jan 29, 2021
7
0
I would like an application to run as root in order to make privileged system calls for performance analysis. To that end, I've installed Lineage OS 17.1, and have /system partition writable and have downloaded Magisk manager systemizer. However even after moving the application to /system/app/ and launching the activity via

Device: OnePlus 6T

> am start -n package_name/package_name.ActivityName

the application still launches as a regular user, i.e. username u0_* thereby still not allowing privileged system calls from being made, e.g. perf event calls here:

Can someone please help or point me to whether any other custom ROM could help with this.

Thanks!
 

jwoegerbauer

Senior Member
  • Jul 11, 2009
    5,578
    9
    1,342
    European Union
    IMO this thread's title is misleading: user with UID 0 is the root user, means Android's default user, means the user for whom device was registered.

    If your intention is to have an app superuser rights may be this helps: add
    Code:
    <uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
    to app's Manifest file.
     
    Last edited: