yashsingh1/xdaforums huggingface dataset:
[Android Apps and Games] Harkness:
Hi, I have a OnePlus 7 (Oxygen OS 11.0.3.1).

I have installed "Pixel Ambient Service (version 1.0.279736494)" and "Android System Intelligence (version R.26.playstore.pixel2.398031113)"

Opening LSposed and going on "modules" I have activated:

Framework System;

Android Accessibility;

Ambient Display;

Android System Intelligence;

Magisk;

OnePlus system Service;

Pixel Ambient Service;

System UI.

But on the lock screen, the app, doesn't appear and clicking on "Test recognition" appears "Ambient Music falied to start"

How I can do?

Here there is a dump file after a recognition failed:
[Android Apps and Games] Quinny899:
Something is wrong with the Magisk module install:

10-17 19:24:02.707 9888 9888 E AndroidRuntime: Caused by: java.lang.SecurityException: Caller does not hold the permission android.permission.MANAGE_SOUND_TRIGGER
10-17 19:24:02.707 9888 9888 E AndroidRuntime: at android.media.soundtrigger.SoundTriggerManager.getModelState(SoundTriggerManager.java:442)
10-17 19:24:02.707 9888 9888 E AndroidRuntime: at com.android.server.soundtrigger.SoundTriggerService.enforceCallingPermission(SoundTriggerService.java:1536)
10-17 19:24:02.707 9888 9888 E AndroidRuntime: at com.android.server.soundtrigger.SoundTriggerService.access$000(SoundTriggerService.java:98)
10-17 19:24:02.707 9888 9888 E AndroidRuntime: at com.android.server.soundtrigger.SoundTriggerService$SoundTriggerServiceStub.getModelState(SoundTriggerService.java:651)
10-17 19:24:02.707 9888 9888 E AndroidRuntime: at com.android.server.soundtrigger.SoundTriggerService$SoundTriggerServiceStub.onTransact(SoundTriggerService.java:251)

Reinstall the module, and if that doesn't fix it there's nothing that can be done, sorry
[Android Apps and Games] Harkness:
I tried but nothing to do. Can it be because the permission for "Pixel Ambient Service" must have the permission in "Always all the time"?. Because if it were to be so to me only marks the possibility of enabling "Allow only while using the app
[Android Apps and Games] appy123droid:
I'm having the same issue, that is, no respose after listening..... I followed and extracted the zip u provided still shows the same issue
[Android Apps and Games] Rand0mGuyy:
Installed it on a Oneplus 7 pro with andorid 12 custom ROM.

It seems to be installed ok but when I try the test recognition it doesn't work.

"Ambient Music failed to start".

Already tried rebooting and all the battery optimization is off.
[Android Apps and Games] Christos_A:
Hey guys, for anyone who's been getting a sound model incompatible error, u need to disable the "Hey google" detection on Google Assistant. Also u need to tick those on LSPosed. That's how i got mine working on the latest OOS11 on an 8T. My problem now is that its using the noise cancelling mic, which kills audio quality and probably slows down detection as well.
[Android Apps and Games] Chiranz:
Hey,

iVe installed this module and everything is checked under compatibility.

Im still an error, the recognition wont start.

Ambient music failed to start!
[Android Apps and Games] Quinny899:
exf: startRecognition failed, error=-2147483648

There's no known fix for this.
[Android Apps and Games] Gurcharan5:
Despite the sound model check being passed, the service will not start (rog 2 running A12 Ponce's pixel experience gsi), any ideas why? I have disabled battery saver and battery optimisation for the apps it says but still didn't work ...
[Android Apps and Games] Quinny899:
Post the debug log, the checks are not perfect.
[Android Apps and Games] Gurcharan5:
Sorry, here they are
[Android Apps and Games] Quinny899:
There's no logs at all for Pixel Ambient Services in there. Have you started Pixel Ambient Services since the last reboot? There's at least one notification I can see in your video that suggests you haven't.
[Android Apps and Games] Gurcharan5:
Since then I've realised it's due to having battery saver enabled. I have disabled it and it works but now it comes up saying no response back.
[Android Apps and Games] Quinny899:
exf: startRecognition failed, error=-2147483648

No known fix again.
[Android Apps and Games] :
Hi, I keep getting "Ambient Music failed to start". On OnePlus 7 Pro, AOSPA Android 12.

ambient_music_mod_log_dump_2021-12-21T20_35_03.356.zip

drive.google.com

There are the logs. Thanks
[Android Apps and Games] 4ymnoy doktor:
I have a question: Why don't I have Sound Trigger (according to the test in your app), even though Voice Match works for me?
[Android Apps and Games] 4ymnoy doktor:
And can I get the magisk module already built? What if it works for me?
[Android Apps and Games] Quinny899:
It needs a specific sound trigger implementation, please read the FAQs.

No, magisk modules are specific to each device and firmware.
[Android Apps and Games] kop1r:
Unfortunately it does not work on my Mi A1, on PE A12 firmware. Launched Pixel Ambient Services, but to no avail. During the test, it writes that an failed to start.
[Android Apps and Games] Quinny899:
Post a log dump as detailed in the FAQs.
[Android Apps and Games] kop1r:
Is in attachments
[Android Apps and Games] Quinny899:
So it is, apologies it wasn't showing in the app.

01-22 12:45:20.496 5985 6058 E AmbientMusicServiceMana: exf: startRecognition failed, error=-2147483648

There's no known fix for this.
[Android Apps and Games] kop1r:
Sadly, thanks for the reply
[Android Apps and Games] YoHoJo:
OnePlus 6T

Test Recognition goes through all steps, but results in "No response from Ambient Music"

Log attached. Seems like same issue as above, unfortunately.

Thanks for your efforts on this!
[Android Apps and Games] Quinny899:
Your error is different:

SoundTriggerMiddlewareValidation: com.android.server.soundtrigger_middleware.HalException: loadSoundModel_2_1 (code -61)

But there's still no known fix.
[Android Apps and Games] iluvmyswamp:
Installs fine, but when testing it fails to start, Mi 9T, POSP ROM on Android 12
[Android Apps and Games] Quinny899:
There's no error in there, but other people with similar devices had the error that there is no known fix for, so it's probably the same for you.
[Android Apps and Games] Manan Khalid:
Installed fine but when testing it says Failed to start. Mi 9 PE12
[Android Apps and Games] Quinny899:
There's no error in those logs, though you may want to try this fix for your device:

https://xdaforums.com/t/module-magi...ther-compatible-devices.4260761/post-84892533
[Android Apps and Games] Manan Khalid:
Tried the fix but still it didn't work for some reason. Anyways heres another log just after rebooting incase somethings different this time. If not then ig it won't work for my device with my current setup.
[Android Apps and Games] iamrance.asa:
Which app?
[Android Apps and Games] Quinny899:
Still no error, I think it's safe to assume it's not compatible.
[Android Apps and Games] McFlypants:
It was long time ago, but as far as i remember i used termux to grant permissions
[Android Apps and Games] iamrance.asa:
Thanks for the reply. Sadly, I already used terminal and termux. It only turns on the microphone permission for "allowed only when app is active." I can't allow always on any app it seems. I thought you might had find one of the many permission manager apks that actually works. :(
[Android Apps and Games] Quinny899:
Only when active includes foreground services, so you're already covered. You don't need to run terminal commands.
[Android Apps and Games] McFlypants:
What brand/ROM do you use? I was on MIUI and i sometimes had to use activity

launcher to get into the settings, MIUI don't let me enter. I was able to enter the android permission settings that are invisible on MIUI
[Android Apps and Games] iamrance.asa:
It keeps telling me it fails when I test it in the Ambient Music Mod APK. It tells me everything is compatible. I use Lsposed (Zygisk) and enabled everything I thought it might need but I've never been able to get it to work on my device (Mi 11 Venus) :(

I have a Xiaomi Mi 11 on MIUI 13 now. I also have MIUI optimization off. It's just never worked for me. Not on 12, 12.5, or 13. I just thought it was an incapability with MIUI but seeing your post I thought I would give it another try. I do run the weekly of MIUIMiX based on Xiaomi EU, so it's a cross between the China ROM and Global
[Android Apps and Games] Quinny899:
If you get the failed to start, it is almost definitely not a permissions issue. Post a log dump.
[Android Apps and Games] McFlypants:
I did this when i had a k20 pro with miui 12. But now i own a poco f3 and i can't exactly remember what i did. But i know it was working sometime
[Android Apps and Games] monster234:
Have bugs that i previously experienced been fixed?
[Android Apps and Games] Quinny899:
Your issue is caused by your system, there is always a chance of permissions issues with mods that add priv-app permissions. The short answer is no, as it can never be fixed.
[Android Apps and Games] monster234:
It's been a while even magisk updated itself even when I'm now able to use Xposed and zygisk with clean safetynet and also few android updates for 10 version is this possible that if i try again it will not happen?
[Android Apps and Games] monster234:
Also it was only one module that did this to me i ldk why but I have tested dozens of modules but it was only this
[Android Apps and Games] monster234:
Also if i remember i didn't used overlay mount fix could that be an issue?
[Android Apps and Games] monster234:
Now installer shows that: model incompatible result code -2147483648
[Android Apps and Games] Quinny899:
There's no workaround for that, your device is incompatible.
[Android Apps and Games] iamrance.asa:
Is there a more detailed guide on log dumps for it? I couldn't find the option in my developer settings even after the Module is installed and active and I've rebooted a couple times
[Android Apps and Games] Quinny899:
Yes, in the FAQ in the app.
[Android Apps and Games] iamrance.asa:
Ah. That's where I was looking. I've just been unable to find the option in Developer Options even with the ambient music mod module installed and after reboot. Just feel like there's something I'm missing
[Android Apps and Games] Quinny899:
It's in the developer options in the app, not the system settings. The FAQ tells you how to enable the developer options too.
[Android Apps and Games] iamrance.asa:
Ah. I feel a bit like an idiot now. Here's the log.
[Android Apps and Games] Quinny899:
There's no error in those logs, so no idea what is causing your issue, chances are the firmware is unsupported.
[Android Apps and Games] kiliasu:
My device prompts startup failure when testing recognition, here is my log.

Looking forward to your reply.
[Android Apps and Games] JudgeDread11:
I used to have it working on my OnePlus 7 on Android 11. I have upgraded to Android 12 KOSP.

When i test recognition i get an error 'ambient music failed to start.

I have 'system framework', 'system intelligence' and 'pixel ambient services' whitelisted in lsposed. 'Android', 'device personalization services' (replaced by system intelligence) and 'ambient music mod' are not available.

Battery optimization is turned off for all.

I seen to remember to have the same issue on Android 11 and it was solved by installing the'overlay mount fix' magisk module. But that module doesn't work on Android 12 anymore.

Anybody got any suggestion on how to do on Android 12 what the 'overlay mount fix' module does on Android 11?

Or other suggestions i can try?
[Android Apps and Games] Quinny899:
The overlay fix is for Oxygen OS I believe, doesn't matter for custom ROMs.

The module doesn't seem to work on A12 and there's nothing I can do until OnePlus finally updates my 7T Pro as I plan to keep it on stock.
[Android Apps and Games] joeyhuab:
Any chance you can collab with custom ROM developers and make this baked into ROMs?
[Android Apps and Games] Quinny899:
It's open source so anyone is most welcome to pull the changes in, but from discussions I had at the time of release you'd need to include Xposed anyway for the mods to Pixel Ambient Services so it was kind of pointless.
[Android Apps and Games] joeyhuab:
RIP. We've baked in Ambient Music stuff (among other Pixel goodies) from Raven's SystemUIGoogle.apk and got the UI/Layout of the latest Ambient Now Playing + Using overlays to force enable Now Playing services from Device Personalization Services + Adding the prebuilt matcher_tah, music_detector files but it ends with a Soundtrigger error, sadly.

Funny enough, that's the exact same error I think I received when I installed your app.
[Android Apps and Games] Quinny899:
Yeah it just won't work on some devices. I don't think it ever will on them, no matter what is done.

I presume you've checked the logcat around the error, made sure there's nothing else that might give clues as to what it's failing on? You might need to mess with the XML that Ambient Music Mod patches a little.
[Android Apps and Games] joeyhuab:
Kinda gave up on it for now. But I think it was trying to patch audio_mixer file? But yeah, I made a flag for the ROM instead in case Pixel owners might wanna build with the Now Playing stuff.
[Android Apps and Games] Quinny899:
sound_trigger_platform_info.xml

AmbientMusicMod/app/src/main/java/com/kieronquinn/app/ambientmusicmod/components/installer/SoundTriggerPlatformXML.kt at 76c941de11470273b2282f3ff28c9a0d9c3392b6 · KieronQuinn/AmbientMusicMod

Port of Now Playing from Pixels to other Android devices - KieronQuinn/AmbientMusicMod

github.com
[Android Apps and Games] joeyhuab:
Alright I'll retry your mod later today and will let you know. Thanks for the replies btw. Appreciate it.
[Android Apps and Games] Gruber008:
I have the same issue as the guy you quoted here. I have OnePlus 7T Pro but I've seen people saying that it worked for them on OOS 11, am I doing something wrong or I just can't read well?
[Android Apps and Games] Quinny899:
Which firmware are you running?
[Android Apps and Games] Gruber008:
I'm on 11.0.4.1.HD01BA. Can I just override it or will that cause an issue?

Also, does Viper4 or any other music mod interfere with your mod?
[Android Apps and Games] Quinny899:
That should work, and yes Viper works with it. I'm not sure why you're getting that error, make sure you have enabled the Xposed module on all the required apps.
[Android Apps and Games] Gruber008:
So I must be doing something wrong, I just installed the app and started it. I didn't enable module in the Lsposed because I thought I need to build Magisk module first like it stated on GitHub repo.

I'm not sure where to enable it in Lsposed - just on system framework?
[Android Apps and Games] Quinny899:
You need to use the app to create the Magisk module, install the module, reboot and enable the Xposed module on Android System Intelligence (may also be Device Personalisation Services), System Framework and Pixel Ambient Services (as well as the module itself, but that should be pre-selected), and reboot again.
[Android Apps and Games] Gruber008:
Thanks you so much, everything seems to be working fine :)
[Android Apps and Games] TerrorByteX:
I gave up on waiting for A12 for my OP7 Pro and moved to a custom ROM. Was so looking forward to getting this on my phone but after reading all 16 pages here I'm bummed to find out that it's not functional on Android 12. Getting that same unfixable error code as everyone else it seems.

The success stories peppered through the comments gave me hope, but alas, it's going to stay on the wishlist for now.

Hope you're able to figure out a solution whenever OP gets around to releasing A12 for your phone. It's such a nifty little feature to have!
[Android Apps and Games] Greamos:
anyone willing to check my log files? test recognition is failing.. it says my phone is supported.. ( running custom android 12 rom on a Oneplus 8 Pro )

you would be amazing if you manage to fix this! <3
[Android Apps and Games] Quinny899:
The module does not support Android 12 currently.
[Android Apps and Games] vincleo:
I've successfully installed the module on miui 12.5 (and working) on my Raphael but the database isn't updating. I've even set the WiFi as unmetered using an activity launcher. Attaching a screenshot for further help (Only mobile data shows up to restrict).

Edit: Never mind, had to uninstall it. It was causing issues with earpiece volume during calls.
[Android Apps and Games] xeltos:
I am trying it out on Mi A1 (tissot) Pixel Experience rom Android 12.

Using LSposed.

When I press test recognition, I get error saying failed to launch. What am I doing wrong?
[Android Apps and Games] Quinny899:
The module does not currently work on Android 12.
[Android Apps and Games] xeltos:
Oh.

#facepalm. My bad.
[Android Apps and Games] TerrorByteX:
Literally two posts above yours it says the module doesn't work on Android 12...

The dev is waiting for A12 official on OOS to update the module.

Edit: didn't his comment or your reply. Facepalm moment for me too
[Android Apps and Games] yot2703:
Wish this would work without Xposed :(

LSPosed crashing my phone... (OnePlus 8 Pro)

Edit: Can confirm not working on OnePlus 10 Pro Oxygen OS 12 A12.

It tells me the Sound Trigger is incompatible.
[Android Apps and Games] xeltos:
Isn't android 12 OOS update been out for some time now? Which device the dev is using?
[Android Apps and Games] Quinny899:
7T Pro. It's in closed beta.

I gave up waiting because it's ridiculous how long it's taken and am working on 12 support using an AOSP ROM.
[Android Apps and Games] TerrorByteX:
🥳🥳🥳

Yeah it is ridiculous. They don't care about the OP7 series anymore. Thrilled and grateful you're working on it. Hope it's doable.
[Android Apps and Games] Darkaeluz:
I just discovered this module, I'll patiently await for any progress, thanks for your hard work!
[Android Apps and Games] justauserthatusesaphone:
Text recognition failing with lsposed.
[Android Apps and Games] J0nDoe297:
Is this compatible for 32-bit devices??? Because my device can't install the apk
[Android Apps and Games] Quinny899:
No and it never will be, there have never been 32 bit Pixels.
[Android Apps and Games] Quinny899:
Ambient Music Mod 2.0 is here, with a complete overhaul including dropping the need for an Xposed module, and even root.

Read more: https://medium.com/@KieronQuinn/now-playing-ambient-music-mod-v2-93cd4042cc11

Download the latest release from GitHub releases

Important: If you are upgrading from Ambient Music Mod 1.x, please uninstall the old version completely including the Xposed module and Pixel Ambient Services and reboot before installing this new version.

-

I've also asked this thread to be moved since it's no longer a Magisk module

Moved, thanks Badger50!
[Android Apps and Games] Quinny899:
Minor bugfix 2.0.1:

Download from GitHub releases as usual
[Android Apps and Games] Plausible7292:
Non-root S21 my audio playback just sounds like noise... Turned the gain to x0.1 but still nothing. pcm file: https://www.file.io/nZle/download/jjkbjLKN9Bg9

EDIT 21/6: It works for me now! I updated to Ambient Music Mod 2.0.2, and Now Playing 1.0.1, and turned on Use Alternative Encoding
[Android Apps and Games] AlcatrazBlaze:
View attachment 5641563
[Android Apps and Games] s3xymo:
Same problem here. On android 12 rooted enabled Shizuku and all I'm hearing is static even when gain is set to x0.1
[Android Apps and Games] Quinny899:
Doesn't Recognise Songs - Noise during playback · Issue #47 · KieronQuinn/AmbientMusicMod

I have tried recognising songs manually from the Ambient Music Mod App. I played a song, the app showed no results found. Tried playing the playback and it was full of noise. Tried lowering the gai...

github.com

I can't do anything if the microphone is providing static.
[Android Apps and Games] Quinny899:
That error means it couldn't connect to GitHub, make sure you've not blocked internet.
[Android Apps and Games] Plausible7292:
Even if the microphone is working normally, eg. In the voice recording app?
[Android Apps and Games] saxmydix:
Yup, same thing happened to me. Zenfone 8 with custom rom installed.
[Android Apps and Games] Prasanna_16:
Same problem for me on non-root redmi note 10 pro with arrow os 12.1. Seems like a bug.
[Android Apps and Games] Quinny899:
Voice recording uses the normal mic, this uses hotword. Different source.
[Android Apps and Games] Plausible7292:
Are there any other apps that use hotword? Just want to check if the problem can be replicated
[Android Apps and Games] Quinny899:
Only Assistant, but I presume its model is able to deal with the noise since it's only recording voice. Remember hotword is designed for voice, not music.
[Android Apps and Games] Plausible7292:
Ahh, that's a shame. Thanks for the help anyway
[Android Apps and Games] BHUSHAN7988:
View attachment 5641887what does this mean and does anyone know how to fix this please
[Android Apps and Games] Quinny899:
For a start, let the download finish first. Then try a recognition again.
[Android Apps and Games] Prof. Yaffle:
I'm getting it quite a bit as well. Songs are being recognised really well but I am also getting that as well. My database finished downloading hours ago
[Android Apps and Games] Theo1218:
I couldn't recognize any song, the playback I get from them it's just a very distorted audio, even tried the 0.1 gain configuration
[Android Apps and Games] Quinny899:
Just released version 2.0.2:

Download from GitHub releases as usual
[Android Apps and Games] BHUSHAN7988:
It won't download even after 30 min any known fix?
[Android Apps and Games] Quinny899:
Reboot, it might be stuck. Also make sure you actually disabled the WiFi requirement during setup, since you're on mobile data. If you didn't, you can change it in Settings > Advanced.
[Android Apps and Games] J0nDoe297:
Hello! The new release seems to have patched the distorted audio problem so great job! One thing I wanted to ask was that: is OnDemand Overlay only for rooted users?
[Android Apps and Games] Quinny899:
Yes, unfortunately there's no way to set the service without root. Google specifically disabled it for the Music Recognition Service (normally Shell can set "temporary" services), presumably for privacy reasons.
[Android Apps and Games] J0nDoe297:
That's a shame. Anyways, thank you for your quick response and keep up the great work.
[Android Apps and Games] Plausible7292:
It works perfectly now!
[Android Apps and Games] Madnikx:
Now Playing is not showing on lock screen unfortunately, can it be fixed?

Sony Xperia 1 II, OEM ROM
[Android Apps and Games] Quinny899:
Do you have Adaptive Lock Screen overlay enabled? If so, disable it.
[Android Apps and Games] mrjellee:
The 2.0 version works pretty good for me! The new 2.0.1 update fixed the static a little bit for me.

Is there any way to get it to appear on the ambient display? I am on a custom ROM and can enable "Now Playing" setting in the settings > sounds using Pixelify module.
[Android Apps and Games] Quinny899:
No, there's no code to do that on any AoD other than stock Pixels.
[Android Apps and Games] Madnikx:
That solved my problem, thank you!
[Android Apps and Games] nishant_713:
2.0.2 seems to have fixed distorted audio issue, and the service is working flawlessly. Amazing work Quinny!

However I can't use microphone in WhatsApp/Google duo with ambient music mod installed. Neither on calls, not in recordings
[Android Apps and Games] Quinny899:
The microphone source used by AMM is the hotword mic, if it's interfering with other apps then it's a system bug on your device and beyond my control.
[Android Apps and Games] nishant_713:
Oh okay. Will let the ROM dev know. Thanks 👐🏻
[Android Apps and Games] Server Reset:
Hi, I have a fold 3 and after messing around the recognition works when manually triggered (had to use alternate encoding and other stuff) but for the life of me I cannot get lock screen/ automatic recognition to work.

Any tips or ideas?

Running android 12 with the June security patch (esim update), US unlocked through shizuku.
[Android Apps and Games] Quinny899:
Make sure you've disabled battery optimisation. Do the notifications show up from the background, is it just not showing on the lock screen?
[Android Apps and Games] Server Reset:
Now playing notifications aren't showing and I disabled optimization during app setup.