-
-
Notifications
You must be signed in to change notification settings - Fork 39
feat: support for recording internal audio in rooted devices #284
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
# Conflicts: # app/src/main/AndroidManifest.xml # app/src/main/java/com/bnyro/recorder/ui/models/RecorderModel.kt
This comment was marked as off-topic.
This comment was marked as off-topic.
I think it's not working on Samsung oneUI. but the magisk module is working fine |
Debug builds won't work |
app/src/main/java/com/bnyro/recorder/ui/models/RecorderModel.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have a working rooted device to test this at the moment - but the changes look fine (except for some small nitpicks in the comments).
Though I wonder if we shouldn't show a toast or a note when users want to select that option, that they need root and follow some steps to make it work? Because currently, users would just try it without any setup and think it just doesn't work.
yes, maybe a additional checkmark for enabling root features, and additional root options can be added later like show taps, enable demo mode when using screen recording, disable all notification while screen recording, disable flag secure etc. |
I don't have a rooted device either. I used the AOSP rom in android emulator with magisk installed.
I didn't want to support or endorse the use of magisk modules. but the same time, not block anyone from using it. Nevertheless, I can create a new repo and put the magisk module there with the instructions, if you're ok with it |
yes open sourcing the magisk module would be the right move |
That's fine with me 👍 |
@SuhasDissa I tried the github actions apk and built a local release and signed it with the test key. In both cases the apk was installed in /system/system_ext/priv-app, adb dump of the package shows the permission is granted (even without the permissions xml, i added it later though for completeness). I tried several variations (audio only and screen recorder, wav and no wav, different encodings, some crash the app though) but all files are without any audio. i am using an android emulator (x86_64, automotive, should probably not make any difference though) and I play back sound using spotify and vlc (an mp3 file). any clues as to what i am doing wrong? |
Did you set the audio source as internal audio? |
Yes 😄 Addition: My current assumption is that this is due to android automotive. |
closes #281
Demo recording
recordyou.mp4
Guide for Root users
For this to work the app needs the
android.permission.CAPTURE_AUDIO_OUTPUT
permission. This permission is a privileged permission. so the app needs to be installed as a privileged app.How to manually grant the permission
adb root
or any other method to move the app's apk from/data/app/<app folder>
to/system/priv-app/RecordYou/RecordYou.apk
priv-app-permission-recordyou.xml
(name doesn't matter) with the following content: