[MODULE][Magisk & Xposed][19/04] Ambient Music Mod - Pixel Ambient Music port for other, compatible devices

Search This thread

munchy_cool

Senior Member
Apr 6, 2008
8,619
2,369
void (0)
No response from Ambient ...
using lsposed ...selected System Framework, Android System, Ambient Services, and Device Personalization Services.
logs attached
 

Attachments

  • ambient_music_mod_log_dump_2021-04-20T14_02_24.484.zip
    12.3 KB · Views: 9

nicesoni_ash

Senior Member
May 26, 2012
6,090
10,950
127.0.0.1
Never seen it do that. Are you running any gapps-related mods like MicroG or a custom signed build of something? This will cause it to not be able to load the databases, so beyond that no idea if it'll work or not.
I am now in the same situation as


Easier I had the error for model compatibility but lsposed fixed that but recognition still failing.

I am on a custom rom for Android 10 with minimum gapps package flashed. No microG or other custom signed package.

Packages I enabled the lsposed module for are- system framework/device personalisation Services/ Pixel ambient services but I couldn't find Ambient music mod apk in it.

I took the logs again if they are helpful somehow else I wouldn't know what else to try.

Thanls.
 

Attachments

  • ambient_music_mod_log_dump_2021-04-21T00_03_10.649.zip
    8.6 KB · Views: 3

TrippyEngine

Senior Member
Jun 2, 2017
278
73
Correct, the OEM has to change the vendor stuff as it's not usually tied to the ROM.
Using EdXposed instead of LSposed the error I get at the same device as munchy_cool is exf: startRecognition failed, error=-61 instead of -2147483648.

I think both me and him are using Poco F1 to try this mod. I guess something else might be the issue.
 

ioneng

Senior Member
Mar 29, 2005
205
13
That's the one I was trying to think of, thanks. If you are having the issue of the APK not appearing, this'll fix it.
Hey I tried to install overlay mount fix but it failed with error ”no overlay mounts detected”. I know that you didn't make that module but do you have any idea of why?
 

hotelmariofan

Member
Aug 20, 2010
25
6
Are you using OOS or a custom rom? I tried a recorder app and it seems there is some kind of noise cancelling ongoing, where the music picked up by one mic may be cancelled by another. Not sure if Google suppressed this noise cancellation in ambient services/ Now Playing, or if the Pixel phones only had one mic - sounds unlikely (pun unintended)

That's pretty normal, it does that on mine and yet works fine. You may want to whack the amplification up even more (you can set a custom value in the advanced settings if the slider isn't enough)
OOS 11.0.5.5. It seems like the noise cancellation is just so that it is incredibly chopping, cutting out, being too quiet, with occasional unrecognizable peaks. There doesn't seem to be a good middle ground no matter how granularly I adjust the amplification. There is either a majority of dampened/inaudible sounds with minority blown out peaks or vice versa. Not sure if this is just the OS or the app, but I lean more towards OS. Though upon searching, I don't see much coverage for noise cancellation or any ability to disable it.
 

huztek

New member
May 21, 2016
4
0
Xiaomi Mi 10 Ultra
I keep getting this error, "ambient music failed to start"
Screenshot_2021-04-21-14-58-54-046_com.kieronquinn.app.ambientmusicmod.jpg
 

k073l

New member
Aug 28, 2016
3
0
Xiaomi Redmi 4X
Test Recognition fails to start, although installation went flawlessly.
Tried rebooting and double-checking that Magisk and Xposed modules are enabled but no luck.
I've also observed that Pixel Ambient Services keep crashing.
Is it fixable?
Attaching logdump
 

Attachments

  • ambient_music_mod_log_dump_2021-04-21T09_50_11.325.zip
    5.9 KB · Views: 0

Karolpeszek

Member
Jul 1, 2020
5
1
Are you using OOS or a custom rom? I tried a recorder app and it seems there is some kind of noise cancelling ongoing, where the music picked up by one mic may be cancelled by another. Not sure if Google suppressed this noise cancellation in ambient services/ Now Playing, or if the Pixel phones only had one mic - sounds unlikely (pun unintended)
I managed to get it running. I just had to disable adaptive battery feature. I'm running custom rom Pixel Experience 11.
 
  • Like
Reactions: f0li0

gionny26

New member
Apr 21, 2021
2
0
Hi, I'm using a OnePlus 7T and I've encountered two problems. The first one is that it keeps saying my xposed module isn't enabled (I think it is but idk how to check, sorry I'm a beginner haha) and the second one is that I can't disable the optimisation of the pixel ambient services. If I press the blue button and then press the don't optimise option, as soon as I go back it resets it to intelligent control. (Note: I overrode the sound model compatible check)
 

Attachments

  • Screenshot_20210421-115656.jpg
    Screenshot_20210421-115656.jpg
    417.7 KB · Views: 11
  • Screenshot_20210421-115724.jpg
    Screenshot_20210421-115724.jpg
    344.5 KB · Views: 11

Elzaa

Member
  • Dec 4, 2013
    25
    2
    Melbourne
    Got Riru+LSPosed installed and activated, Ambient installer app was happy (all compatibility checks showing green ticks). Built Magisk module, installed via Magisk and rebooted phone, phone booted to black screen after boot animation. Can access power menu only.

    Any advice on restoring access before I do a factory reset? Have tried reinstalling ROM via TWRP with and without Magisk, same results (or it gets stuck on boot animation). Tried safe-mode via the power menu I can access - same deal (but shows "safe mode" text in bottom left)

    OnePlus 6, Oxygen OS 10.3.9, Android 10.
     

    Quinny899

    Recognized Developer / Recognized Contributor
    Jan 26, 2011
    8,492
    7,729
    23
    Salford, Greater Manchester, UK
    quinny898.co.uk
    Got Riru+LSPosed installed and activated, Ambient installer app was happy (all compatibility checks showing green ticks). Built Magisk module, installed via Magisk and rebooted phone, phone booted to black screen after boot animation. Can access power menu only.

    Any advice on restoring access before I do a factory reset? Have tried reinstalling ROM via TWRP with and without Magisk, same results (or it gets stuck on boot animation). Tried safe-mode via the power menu I can access - same deal (but shows "safe mode" text in bottom left)

    OnePlus 6, Oxygen OS 10.3.9, Android 10.
    If you can boot without Magisk and it still does it, it's not caused by this mod. Without Magisk it can't replace any files and Xposed won't work, so the module can't do anything at all.
     
    • Like
    Reactions: Elzaa

    NateDev

    Senior Member
  • Aug 18, 2016
    723
    154
    Mississauga
    OnePlus 7 Pro
    Hi, I'm using a OnePlus 7T and I've encountered two problems. The first one is that it keeps saying my xposed module isn't enabled (I think it is but idk how to check, sorry I'm a beginner haha) and the second one is that I can't disable the optimisation of the pixel ambient services. If I press the blue button and then press the don't optimise option, as soon as I go back it resets it to intelligent control. (Note: I overrode the sound model compatible check)
    Install product mount fix thing. That happens when ambient services isn't installed. The icon is just the generic one right
     

    Top Liked Posts

    • There are no posts matching your filters.
    • 2
      So this is a weird one. Installed on 7t OOS 11.0.0.2, but doesn't work.
      After some digging I realized that Magisk doesn't mount the pixel ambient services app into /system/product/priv-app, as in the folder gets created, but the apk and lib folder inside isn't there. They are there though under the /data/adb/modules/AmbientMusicMod folder. Tried installing manually, but I guess it needs to be a system app to function. What kind of logs should I even send for this one?
      Initially had this issue, but solved it by installing Zackptg5's Overlay Mount Fix. You can find it in Magisk Manager module downloads.
      2
      Sorry for the second question: when I try to enable the mod in LSPosed manager, it asks to me to select an app. I don't know which app to select and the Ambient Music apps don't appear on the list. If I don't select an app the mod doesn't get enabled. Not sure what to do about that.
      I selected System Framework, Android System, Ambient Services, and Device Personalization Services.

      For some reason this mods own app doesn't show up tho, otherwise I would've enabled it as well like mentioned.
      1
      The font works fine (just using Magisk to place the fonts in the system). Making it be used on the system elements on the other hand was difficult, as overlays are partially broken on Oxygen OS 11. I made a custom Xposed module do it instead, which I won't be releasing as I don't want another thing to have to maintain.

      different person, same topic. just adding that another person would appreciate having this module lol, even if it was just a post and forget type thing with no support/updates. greatly appreciate all the work you do.
      1
      @emime12

      Your error is
      exf: startRecognition failed, error=-2147483648
      Which means it won't work and likely never will, sorry.
      1
      Not starting recognition on my Poco F1 on miui 12 android 10, with a snapdragon 845
      exf: startRecognition failed, error=-61
      Is your error code. No known solution for this one either.
    • 13
      Important: YOU MUST HAVE BOTH XPOSED AND MAGISK INSTALLED TO USE THIS MODULE. READ THE FAQ FOR MORE INFO.

      Ambient Music Mod​

      A hybrid Xposed & Magisk module that ports Pixel Ambient Music to other, compatible devices. If you don't know what Pixel Ambient Music is, it's the feature that recognises music that's playing in the background (ie. not from your phone) automatically. It does this locally, without a connection, and doesn't send any data to Google servers for recognition.

      The aim of this feature is simple - you'll never wonder "what's that song" again when around the house or out and about - as your phone will tell you without you even having to ask.

      Please read the FAQ before asking questions or reporting issues

      Features​

      • Full Ambient Music support, including downloading the latest databases from Google
      • Music recognition when the device is idle or in use (exclusions apply, see the FAQ for more details)
      • Now Playing History built in, and support for third party history apps
      • The ability to display the current now playing track on the lock screen using an Accessibility overlay service
      • Manual recognition on demand in the Ambient Music Mod app
      • Settings to control the amplification, how often recognition should be triggered, whether to run on the small CPU cores and what to do when a song recognition notification is tapped
      • View all the recognisable track in your locally downloaded database via the Track List option

      Requirements​

      • Magisk
      • Xposed
      • A device with a Snapdragon processor that supports Sound Trigger 2.1 or above (the app will tell you if it's compatible)

      Installation Instructions​

      • Install the latest release APK from the GitHub releases page
      • Open the app, check your device is compatible and build the module using the Build Installer option
      • Install the built Magisk module using the Magisk app
      • Enable the Xposed module in Xposed Manager
      • Reboot

      Changelog​

      1.1.1
      Fixed an issue where the Xposed warning dialog continue button did not work

      1.1
      • Added a new compatibility checker that checks if getModelState() [and therefore hopefully the module] is supported. This isn't 100% perfect so a bypass is also available
      • Tweaked sound trigger injection to include an XML line that's required for some devices
      • Fixed track list not loading for some people
      • Hopefully fixed log dump zips
      • Newly built modules will now also keep a copy of your original sound trigger XML. This change allows for comparison in the log dumps, and may help updates in the future.
      IMPORTANT: When updating the module (which will force you to uninstall/disable the current module and reboot), the module name will change. Therefore, you are advised to uninstall the previous module as part of this process.

      Screenshots​

      Ambient Music Mod displaying the currently playing track on the lock screen of a OnePlus 7T Pro running Oxygen OS 11:



      Settings, Installer, standard Ambient Music settings & Now Playing history



      You can verify that the songs displayed in these screenshots were being played at the time by viewing a screenshot of the playlist from the radio station being listened to at the time here

      1,270 days, stop the clock.
      2
      So this is a weird one. Installed on 7t OOS 11.0.0.2, but doesn't work.
      After some digging I realized that Magisk doesn't mount the pixel ambient services app into /system/product/priv-app, as in the folder gets created, but the apk and lib folder inside isn't there. They are there though under the /data/adb/modules/AmbientMusicMod folder. Tried installing manually, but I guess it needs to be a system app to function. What kind of logs should I even send for this one?
      Initially had this issue, but solved it by installing Zackptg5's Overlay Mount Fix. You can find it in Magisk Manager module downloads.
      2
      Sorry for the second question: when I try to enable the mod in LSPosed manager, it asks to me to select an app. I don't know which app to select and the Ambient Music apps don't appear on the list. If I don't select an app the mod doesn't get enabled. Not sure what to do about that.
      I selected System Framework, Android System, Ambient Services, and Device Personalization Services.

      For some reason this mods own app doesn't show up tho, otherwise I would've enabled it as well like mentioned.
      1
      App keeps asking to update and there is no update
      My bad, forgot to knock the internal version back down after testing the update dialog. I've "updated" the APK on GitHub, it's exactly the same build with the correct internal version, and will install on top :)
      1
      The font works fine (just using Magisk to place the fonts in the system). Making it be used on the system elements on the other hand was difficult, as overlays are partially broken on Oxygen OS 11. I made a custom Xposed module do it instead, which I won't be releasing as I don't want another thing to have to maintain.

      different person, same topic. just adding that another person would appreciate having this module lol, even if it was just a post and forget type thing with no support/updates. greatly appreciate all the work you do.
    Our Apps
    Get our official app!
    The best way to access XDA on your phone
    Nav Gestures
    Add swipe gestures to any Android
    One Handed Mode
    Eases uses one hand with your phone