AndroidDeveloperLB / PhoneCallRecorder

A POC of recording calls
Apache License 2.0
47 stars 8 forks source link

Cannot record calls on android pixel 6 #11

Open weshlokman opened 4 months ago

weshlokman commented 4 months ago

Getting an error when initiating a call with the VOICE_CALL recording source Android 14, API34

  1. I get the following toast : "error while starting to record"

2024-05-08 22:33:00.776 30102-30102 AppLog com...le.user.phonecallrecordertest D starting record 2024-05-08 22:33:00.779 30041-31273 RoleContro...erviceImpl com....android.permissioncontroller E Default/fallback role holder package doesn't qualify for the role, package: com.google.android.gms.supervision, role: android.app.role.SYSTEM_SUPERVISION 2024-05-08 22:33:00.784 1102-9075 AudioFlinger audioserver E createRecord() getInputForAttr return error -1 2024-05-08 22:33:00.785 1324-2025 AudioRecord mediaserver E createRecord_l(0): AudioFlinger could not create record track, status: -1 2024-05-08 22:33:00.786 1324-2025 RefBase mediaserver W RefBase: Object at 0xe7dc812c lost last weak reference before it had a strong reference 2024-05-08 22:33:00.786 1324-2025 StagefrightRecorder mediaserver E audio source is not initialized 2024-05-08 22:33:00.786 30102-30102 MediaRecorder com...le.user.phonecallrecordertest E start failed: -2147483648 2024-05-08 22:33:00.786 30102-30102 AppLog com...le.user.phonecallrecordertest E error while recording:java.lang.RuntimeException: start failed. 2024-05-08 22:33:00.793 1324-2025 StagefrightRecorder mediaserver W stop while neither recording nor paused 2024-05-08 22:33:00.794 1324-2025 StagefrightRecorder mediaserver W stop while neither recording nor paused 2024-05-08 22:33:00.794 30102-30102 AppLog com...le.user.phonecallrecordertest D stopping record process 2024-05-08 22:33:00.794 30102-30102 MediaRecorder com...le.user.phonecallrecordertest E stop called in an invalid state: 1 2024-05-08 22:33:00.794 1324-2025 StagefrightRecorder mediaserver W stop while neither recording nor paused 2024-05-08 22:33:00.795 30102-30102 AppLog com...le.user.phonecallrecordertest D stopped record process 2024-05-08 22:33:00.795 30102-30102 System.err com...le.user.phonecallrecordertest W java.lang.RuntimeException: start failed. 2024-05-08 22:33:00.795 30102-30102 System.err com...le.user.phonecallrecordertest W at android.media.MediaRecorder.start(Native Method) 2024-05-08 22:33:00.795 30102-30102 System.err com...le.user.phonecallrecordertest W at com.example.user.phonecallrecordertest.Recorder.startRecording$lambda-2(Recorder.kt:144) 2024-05-08 22:33:00.796 30102-30102 System.err com...le.user.phonecallrecordertest W at com.example.user.phonecallrecordertest.Recorder.$r8$lambda$xEeO4e7P9qq_2rStzqVY9Sp4WUg(Unknown Source:0) 2024-05-08 22:33:00.796 30102-30102 System.err com...le.user.phonecallrecordertest W at com.example.user.phonecallrecordertest.Recorder$$ExternalSyntheticLambda2.run(Unknown Source:2) 2024-05-08 22:33:00.796 30102-30102 System.err com...le.user.phonecallrecordertest W at android.os.Handler.handleCallback(Handler.java:942) 2024-05-08 22:33:00.796 30102-30102 System.err com...le.user.phonecallrecordertest W at android.os.Handler.dispatchMessage(Handler.java:99) 2024-05-08 22:33:00.796 30102-30102 System.err com...le.user.phonecallrecordertest W at android.os.Looper.loopOnce(Looper.java:201) 2024-05-08 22:33:00.797 30102-30102 System.err com...le.user.phonecallrecordertest W at android.os.Looper.loop(Looper.java:288) 2024-05-08 22:33:00.797 30102-30102 System.err com...le.user.phonecallrecordertest W at android.app.ActivityThread.main(ActivityThread.java:7918) 2024-05-08 22:33:00.797 30102-30102 System.err com...le.user.phonecallrecordertest W at java.lang.reflect.Method.invoke(Native Method) 2024-05-08 22:33:00.797 30102-30102 System.err com...le.user.phonecallrecordertest W at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) 2024-05-08 22:33:00.797 30102-30102 System.err com...le.user.phonecallrecordertest W at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) 2024-05-08 22:33:00.809 24557-24622 Parcel com.android.systemui W Expecting binder but got null!

AndroidDeveloperLB commented 4 months ago

Could be that something else is recording? Have you tried on a different device?

weshlokman commented 4 months ago

I also tried with a pixel 4 android 13 same exact result


From: AndroidDeveloperLB @.> Sent: Thursday, May 9, 2024 2:18:54 AM To: AndroidDeveloperLB/PhoneCallRecorder @.> Cc: weshlokman @.>; Author @.> Subject: Re: [AndroidDeveloperLB/PhoneCallRecorder] Cannot record calls on android pixel 6 (Issue #11)

Could be that something else is recording? Have you tried on a different device?

— Reply to this email directly, view it on GitHubhttps://github.com/AndroidDeveloperLB/PhoneCallRecorder/issues/11#issuecomment-2102020703, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGA2FHHHP3N3RY2UABQ37HTZBMIM5AVCNFSM6AAAAABHOBJYZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBSGAZDANZQGM. You are receiving this because you authored the thread.Message ID: @.***>

AndroidDeveloperLB commented 4 months ago

How weird. Maybe Google started to block such a thing? Try ACR Phone app with its addon. It uses the same thing, using accessibility. I wonder if it will work for you or have an issue too

AndroidDeveloperLB commented 4 months ago

I've now tested on my Pixel 6 with Android 14. Still works fine (after you enable accessibility and change the audio source). Sadly quite a low volume, but that's what you get.... :(

I wonder if there is an easy way to inspect the volume in general, and then boost the volume if needed

weshlokman commented 4 months ago

Oh okay thanks for the reply will try this then which voice source did you use ?


From: AndroidDeveloperLB @.> Sent: Thursday, May 9, 2024 6:12:41 AM To: AndroidDeveloperLB/PhoneCallRecorder @.> Cc: weshlokman @.>; Author @.> Subject: Re: [AndroidDeveloperLB/PhoneCallRecorder] Cannot record calls on android pixel 6 (Issue #11)

I've now tested on my Pixel 6 with Android 14. Still works fine (after you enable accessibility and change the audio source). Sadly quite a low volume, but that's what you get.... :(

I wonder if there is an easy way to inspect the volume in general, and then boost the volume if needed

— Reply to this email directly, view it on GitHubhttps://github.com/AndroidDeveloperLB/PhoneCallRecorder/issues/11#issuecomment-2102369148, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGA2FHDSS7JABWL3NBDV73LZBNDZTAVCNFSM6AAAAABHOBJYZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBSGM3DSMJUHA. You are receiving this because you authored the thread.Message ID: @.***>

AndroidDeveloperLB commented 4 months ago

I wrote on the app itself which source to use. Read it. Please tell me if it worked for you. Also if you find a way to handle volume, at least after you create a file.