List of the processes running on Android | |
in: Android So/Code: Android Data: 15/05/2018 Ora: 15.13:34 Articolo visualizzato: 3612 volte |
|
Today I came across the porting of a code to make it compatible for Android 7, so nougat, from the previous version. During this phase I discovered that from the SDK 25 onwards there is no longer the possibility to list via the listFiles of /proc. This happened for security reasons narrowing the range of action that differentiates Android from iOS. (not of safety is well understood) The code that you glue is the relative one before the SDK 25 version. It remains valid from versions 25 onwards but is restricted to the reading permissions of the user running the application, so it will not list all the processes. public static List Alternatively, we always talk about devices with root, you can create a small script in sh: sudo -c 'pidof processname' For example, save it in the folder files of our app giving it the correct permissions via adb and then retrieve it via getRuntime().exec().I don't know if there are other valid and functional methods in case you comment to me suggesting? Thank you all!
This happened for security reasons narrowing the range of action that differentiates Android from iOS. (not of safety is well understood) The code that you glue is the relative one before the SDK 25 versio
| |
|
Articoli Correlati
List of the processes running on Android |
Rilasciato Iphone OS 4 beta 2 agli sviluppatori |
HP Slate 500: Il Tablet con Win7 |
Come installare Android su pc - Virtual PC |
Condivisione File tra Mac e Pc |
Commenti
Scrivi Commento