I'm making a kotlin app for android that uses a 7z library to unzip some files, i got the libary to work but i would like to add functionality for getting the progress of the unzipping, this is already somewhat implemented into the library because with an argument i can make it print the percentage to the terminal, but now i dont know how to get the stdout into a variable for example. The library i'm using https://github.com/hzy3774/AndroidP7zip/tree/master
P7ZipApi.executeCommand("7z x $externalFilesDir/meta.7z -o$externalFilesDir/meta -p$password -bsp2" )
I found doccumentation on java proccesses but that only seem to allow commands of sorts, i dont know what other options would be possible.