[Samsung Galaxy A3, A5, A7 (2017) ROMs, Kernels, Re] exzerry:
Making Radio work (WIP)

So I've came around a patch for this ROM and came really close to make it running, but stuck on an error described below:

You get to the Radio mainactivity, it even detects there is no antenna connected, but when trying to turn the radio on, you see this error in adb logcat *:W

Rooting or clear stock doesn't solve permission error.

Missing FMRadio files in this ROM could be taken from HadesRom 1.5 for A7 2017

/system/lib/libfmradio_jni.so
/system/lib64/libfmradio_jni.so
/system/priv-app/HybridRadio_P/HybridRadio_P.apk

04-05 04:23:51.703 3244 3258 W AppOps : Bad call: specified package android under uid 10220 but it is really 1000
04-05 04:23:51.703 3244 3258 W AppOps : java.lang.RuntimeException: here
04-05 04:23:51.703 3244 3258 W AppOps : at com.android.server.AppOpsService.getOpsRawLocked(AppOpsService.java:2066)
04-05 04:23:51.703 3244 3258 W AppOps : at com.android.server.AppOpsService.noteOperationUnchecked(AppOpsService.java:1632)
04-05 04:23:51.703 3244 3258 W AppOps : at com.android.server.AppOpsService.noteOperation(AppOpsService.java:1626)
04-05 04:23:51.703 3244 3258 W AppOps : at android.app.AppOpsManager.noteOpNoThrow(AppOpsManager.java:2623)
04-05 04:23:51.703 3244 3258 W AppOps : at android.app.AppOpsManager.noteOp(AppOpsManager.java:2566)
04-05 04:23:51.703 3244 3258 W AppOps : at com.android.server.audio.MediaFocusControl.requestAudioFocus(MediaFocusControl.java:794)
04-05 04:23:51.703 3244 3258 W AppOps : at com.android.server.audio.AudioService.requestAudioFocus(AudioService.java:8272)
04-05 04:23:51.703 3244 3258 W AppOps : at android.media.AudioManager.requestAudioFocus(AudioManager.java:2915)
04-05 04:23:51.703 3244 3258 W AppOps : at android.media.AudioManager.requestAudioFocus(AudioManager.java:2710)
04-05 04:23:51.703 3244 3258 W AppOps : at com.android.server.FMRadioService.on(FMRadioService.java:2326)
04-05 04:23:51.703 3244 3258 W AppOps : at com.android.server.FMRadioService.on(FMRadioService.java:2241)
04-05 04:23:51.703 3244 3258 W AppOps : at com.samsung.android.media.fmradio.internal.IFMPlayer$Stub.onTransact(IFMPlayer.java:81)
04-05 04:23:51.703 3244 3258 W AppOps : at android.os.Binder.execTransact(Binder.java:739)
04-05 04:23:51.704 3244 3258 W System.err: java.lang.SecurityException: android from uid 10220 not allowed to perform TAKE_AUDIO_FOCUS
04-05 04:23:51.704 3244 3258 W System.err: at android.app.AppOpsManager.noteOp(AppOpsManager.java:2568)
04-05 04:23:51.704 3244 3258 W System.err: at com.android.server.audio.MediaFocusControl.requestAudioFocus(MediaFocusControl.java:794)
04-05 04:23:51.704 3244 3258 W System.err: at com.android.server.audio.AudioService.requestAudioFocus(AudioService.java:8272)
04-05 04:23:51.704 3244 3258 W System.err: at android.media.AudioManager.requestAudioFocus(AudioManager.java:2915)
04-05 04:23:51.704 3244 3258 W System.err: at android.media.AudioManager.requestAudioFocus(AudioManager.java:2710)
04-05 04:23:51.704 3244 3258 W System.err: at com.android.server.FMRadioService.on(FMRadioService.java:2326)
04-05 04:23:51.704 3244 3258 W System.err: at com.android.server.FMRadioService.on(FMRadioService.java:2241)
04-05 04:23:51.704 3244 3258 W System.err: at com.samsung.android.media.fmradio.internal.IFMPlayer$Stub.onTransact(IFMPlayer.java:81)
04-05 04:23:51.704 3244 3258 W System.err: at android.os.Binder.execTransact(Binder.java:739)

Tried the appops adb command to bypass TAKE_AUDIO_FOCUS, but no success in that direction.

Maybe [MENTION=4658360]corsicanu[/MENTION] could take a look or [MENTION=4315222]Option58[/MENTION]