Merlin bird app Sound ID does not work under /e/OS

Hello,

Steps to reproduce: Start and stop the sound ID feature in Merlin. Observe the app crashing.

After every OS update, I try again. Today’s update to 3.1.4 did not fix it. Meanwhile, a bot keeps closing these threads so I am creating a third one. Links to the previous ones below.
This is definitely an /e/OS issue, not a Merlin bug, and it is not specific to particular phone models. Please take a look. I would be very happy to help by digging up stuff from logs, if someone tells me where they are.

2 Likes

Hi @szakib I did test Merlin in the past seeing these threads but I found it highly intrusive such that I did not persevere to collect a logcat. Perhaps you could try that to see if the actual blockers could be identified.

Thanks for the suggestion. Generating the .zip file on the phone an only sending whatever I’m OK with is a reasonable risk, I’m doing it now.

So here are the log lines that contain “merlin”:
https://1drv.ms/t/c/1c2743f7f87141ed/EV5l2Kpm0uhAqDF3Lh7fAXEB2vT-qEFJVXRG0SU0fUJehw?e=YyglTW

1 Like

I use whoBIRD for some times now and I find it quite efficient. Maybe it can be useful as a workaround for your problem.

6 Likes

I installed the App (v3.7.1) on a /e/OS v3.1 A15 GSI and could record a sample.

The app draws a spectrogram, I can select a part of it, do audio replays. It won’t crash.

Apart from the repeating PackageConfigPersister warnings (that I see in my logcat too), the only Error class lines in your logs (that I do not see on my device) are:

E AndroidRuntime: Process: com.labs.merlinbirdid.app, PID: 6830
E AndroidRuntime: 	at edu.cornell.birds.merlin.audio.spectrogram.v2.impl.AudioSamplesMultiThreadedSpectrogramGenerator.createFrequencyDataBuffer(AudioSamplesMultiThreadedSpectrogramGenerator.kt:155)
E AndroidRuntime: 	at edu.cornell.birds.merlin.audio.spectrogram.v2.impl.AudioSamplesMultiThreadedSpectrogramGenerator.getFrequencyData$lambda$7$lambda$6(AudioSamplesMultiThreadedSpectrogramGenerator.kt:66)
E AndroidRuntime: 	at edu.cornell.birds.merlin.audio.spectrogram.v2.impl.AudioSamplesMultiThreadedSpectrogramGenerator.$r8$lambda$D95AJOc8bZh1qVUtv0sgm3JLM00(Unknown Source:0)
E AndroidRuntime: 	at edu.cornell.birds.merlin.audio.spectrogram.v2.impl.AudioSamplesMultiThreadedSpectrogramGenerator$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0)

I’d send the stacktrace to Submit a ticket : Help Center and ask what createFrequencyDataBuffer() can fail on. Naively: did you grant it the microphone permission? maybe some audiosink settings, recording frequency (khz)?

You have a FP5, I’d look for audio bugs in the bugtracker.

Hi,

Now that you mentioned the spectrogram, I think that might be the issue, because:

  • the part where it records the sound actually works. The app crashes when I press Stop and it never displays the histogram, but it does save the sound file.
  • I have verified earlier that the mic permission works as it should.
  • (May or may not be related: The other mystery issue on this phone is my weather app not being able to draw the cloud overlay on the map.)

Can I see those audiosink settings you mention somewhere?

device audio xml things are here for the FP5 (A14 branch, or are you on A15?). media/ too is worth to look at.

You could ask other FP5 users on stockrom (or LineageOS) over at the fairphone forum is they have issues with the Merlin app.

About this being a FP5 issue:

  • the app works on FP5 with stock Android
  • There was a bug in the FP5-specific part of /e/OS regarding the mic, but that is fixed now.
  • People have had this exact problem on other phones too

So the issue is most probably somewhere at the bounday between /e/OS and Merlin. Since the Merlin devs DGAF about non-official Android, this place is my last hope.

I’m not saying it’s exclusively an FP5 issue, but it doesn’t seem to be a generic /e/OS component issue either and stretch to all devices.

What is your exact version string btw? if you’re still on T / A13 an upgrade to A14 or A15 could probably help if it contains that fix advertised in the linked FP forum thread. Unsure how dilligent people are looking after all release branches.

As to that boundary, it’s pretty clearly on the data stream that the SpectrogramGenerator receives. It’s either null, wrongly padded or not the frequency expected - in any case the code can’t handle it.

I am on A13. Will upgrade to the A15 version. Have to figure out if there will eventually be an update installer, or if I need to wipe and reinstall with the currently available one.

I’d do an adb sideload upgrade, but have a fresh backup (and enough free space).

If things go well, if you can, modify title to “with FP5 T / A13”

Seems like I will get A15 OTA in a month, or maybe two. Will wait for that.

you do not have mic issues generally, like in calls, and the saved audio file (despite the crash) within Merlin will have actual audio data?

No. The only other weird thing on this phone is that the FMI weather app is unable to display the cloud overlay on the map.

Hi /e/OS fans. I am in a very similar situation with /e/OS installed on my Motorola Moto g(7) Power. The difference is that I installed the Merlin bird app 4-6 weeks ago and it worked! It has been working up to about 10 days ago. When i tried to identify owls in the garden this evening i found the apps seems to function as normal but the spectrogram is empty/flat line - as if the record level was set to zero. I downloaded another app to test the microphone and i recorded my fine singing voice without a problem. Is it possible that an update for /e/OS has rendered the Merlin app deaf over the last 2 weeks?

This works for me. Thanks for the tip.

Thanks for this. I asked ChatGPT to look through this file and got the following info: ChatGPT said:

Excellent — I’ve looked through your Merlin Log Lines.txt, and here’s what it reveals:

:magnifying_glass_tilted_left: Key observations

  1. Merlin launches correctly

    START u0 {act=android.intent.action.MAIN ... cmp=com.labs.merlinbirdid.app/edu.cornell.birds.merlin.onboarding.OnBoardingActivity}
    
    

    → Normal start-up, no permission or signature errors.

  2. Massive repetition of this warning:

    W PackageConfigPersister: App-specific configuration not found for packageName: com.labs.merlinbirdid.app and userId: 0
    
    

    → This warning is not fatal but indicates /e/OS is denying or ignoring an app’s request to read or persist a configuration file in /data/system/package_config/.
    It often happens when privacy-sandboxed apps attempt to read hidden APIs, system configs, or analytics settings.

  3. No AudioRecord, mic, or AudioFlinger activity at all
    In a healthy logcat, starting Merlin’s “Sound ID” produces lines like:

    I AudioRecord: startRecording() ...
    I AudioFlinger: Audio input started
    D AudioSamplesMultiThreadedSpectrogramGenerator: capturing samples ...
    
    

    None of those appear — suggesting the app never successfully opens an audio input stream.


:puzzle_piece: What that points to

  • The repeated PackageConfigPersister warnings show /e/OS blocking or isolating Merlin from system configuration services.

  • Since /e/OS and similar privacy Android forks (like GrapheneOS, CalyxOS) restrict background telemetry and some privileged mic APIs, Merlin’s internal “audio capture + live spectrogram” routine is almost certainly being silently denied access to the microphone service, even though the permission flag is technically “granted.”

  • whoBIRD works because it uses a simpler, open-source audio recorder built directly on standard Android APIs without background analytics or WorkManager jobs (which /e/OS intercepts).


:white_check_mark: Conclusion

Merlin isn’t being malicious in the log (no sign of outbound network or hidden recording), but:

  • It depends on Google/WorkManager jobs and certain Android system services that /e/OS deliberately strips or neuters for privacy.

  • Those missing hooks cause the audio subsystem never to start — hence the flat line and no waterfall.

So yes: this is /e/OS blocking or depriving Merlin of required system privileges, probably because Merlin’s telemetry or “analytics” libraries trigger the privacy guard.


:toolbox: Suggested actions

  1. Verify micro-permissions: In /e/OS → Settings → Privacy → Advanced Privacy → Tracker Control — check if com.labs.merlinbirdid.app is being blocked. Temporarily whitelist it and test.

  2. Compare with whoBIRD’s behaviour: if whoBIRD shows live audio and Merlin doesn’t, that confirms the block.

  3. Optional test: Re-enable “Advanced Privacy → Tracker Control → Off” for one test session; reboot; try Merlin again.

  4. Otherwise: Stick with whoBIRD — it’s cleaner, open source, and doesn’t depend on Google services.

as to 3. gpt bot doesnt see all Audio debug lines because OP filtered the log for the “merlin” string before posting instead of the process id, so the log doesn’t have the full debug

could you put chatgpt answers into a pastebin / share link instead of forum inline?

Next time you encounter this issue, I’d reboot the device to see if this resets anything residual in the audio dsp chip that the spectrogram generator can’t handle

This is a forum for humans to talk to each other. The ChatGPT output is just spam.