• Welcome to the all-new Android Central Forums! - We're still moving some things around, so you may see a few quirks here and there, but we're working on getting things fully completed as soon as possible. For now, take a look around, and if you run into any major issues, please let us know in this thread!

Access system API from application

Sanjeeth_KG

New member
Jul 7, 2022
3
0
0
Hey Guys,

i have a rooted phone with Android 12 image, i would like to call an system API from an application, how would i go about it ?
things i have done so far without success
1. built the apk with aosp build
2. copied the application in /system/priv-app folder
3. created permission.xml in /etc/permissions/ folder
4. ofcourse have asked the permission in the manifest file

inspite of all these i still get the error "this user nor the process have the permission for MAINELINE_NETWORK_STACK

any help would be appreciated
 

B. Diddy

Senior Ambassador
Moderator
Mar 9, 2012
161,942
290
83
Welcome to Android Central! I moved this from the Galaxy S9 forum to the Software Development forum for more specific traffic.
 

Kizzy Catwoman

Ambassador
Feb 2, 2017
7,661
35
48
Android 12 has a system inbuilt called Scoped Storage. This limits access to system files and folders. I would try the XDA forums for more specific help with this issue as they specialise in this type of issue.