I am trying to develop an app that allows the user to record system traces using systrace, i want to be able to run this inside a regular Android application, without the need of a PC or ROOT access to use the ADB.
From Android 9, there is an option to record system traces from the Developer Options, this works perfectly on the device without any external tools, but i need to have more control over this, because i will be running the systrace command over a period of time and then uploading the results to a server automatically (everything happens in the app)
Is there any way that i can do this from an Android Application ?
I tried using python inside an app and then running systrace, but it fails with an error because it can't find ADB.