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

Search This thread

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
8,492
7,729
23
Salford, Greater Manchester, UK
quinny898.co.uk
Can't hide Ambient Music Mod from Edxposed. App warns me that "one or more settings is preventing me from hiding the app"

The rest is all green mark and test recognition fails to start.
You don't want to hide Ambient Music Mod from EdXposed, that would break it. If you have the blacklist (Xposed Hide) enabled, you don't need to do any messing with the hide stuff.

Post a log dump if it fails to start.
 

TrippyEngine

Senior Member
Jun 2, 2017
278
73
Not starting recognition on my Poco F1 on miui 12 android 10, with a snapdragon 845
 

Attachments

  • ambient_music_mod_log_dump_2021-04-19T23_45_17.253.zip
    15.5 KB · Views: 3

chickenmatt5

Member
Apr 21, 2018
12
0
OnePlus 7 Pro
On a OnePlus 7 Pro, I got all the way up to Test Recognition and I get "Ambient Music failed to start". I made sure mic permissions were allowed and I haven't touched any EdXposed hiding options before. Logs attached, would appreciate any suggestions!
 

Attachments

  • ambient_music_mod_log_dump_2021-04-19T19_49_31.447.zip
    13.7 KB · Views: 3

NateDev

Senior Member
  • Aug 18, 2016
    723
    154
    Mississauga
    OnePlus 7 Pro
    On a OnePlus 7 Pro, I got all the way up to Test Recognition and I get "Ambient Music failed to start". I made sure mic permissions were allowed and I haven't touched any EdXposed hiding options before. Logs attached, would appreciate any suggestions!

    I also have a 7 Pro, same error here. Are you able to disable battery optimization for Pixel Ambient Services? It is stuck on Intelligent Control for me, and the icon is just the generic teal APK icon with the Android logo.

    EDIT: I grepped for com.google.intelligence.sense and it seems like its not installed for me.
    EDIT2: Got it working, might not be too helpful to you as I also installed TotallyAnxious mod and I now have the app installed, even though I don't remember seeing Ambient Services inside the zip. But either way its working now (maybe it was the reboot, idk)
     
    Last edited:

    chickenmatt5

    Member
    Apr 21, 2018
    12
    0
    OnePlus 7 Pro
    I also have a 7 Pro, same error here. Are you able to disable battery optimization for Pixel Ambient Services? It is stuck on Intelligent Control for me, and the icon is just the generic teal APK icon with the Android logo.
    I'm unable to even see optimisation options for that app.
    Screenshot_20210419-212724.jpg
     

    chickenmatt5

    Member
    Apr 21, 2018
    12
    0
    OnePlus 7 Pro
    Ah, yeah that's the reason. OOS doesn't allow you to change battery optimization on system apps. You'll need to either find a way to do it with ADB, flash A10 Open Beta, A11 Open Beta, or *maybe* A11 stable.
    I was able to use ADB and I no longer see the notification to disable battery optimization, but I still get "Ambient Music failed to start". Would more logs be potentially useful, or is there just too much incompatibility with A10?
     

    NateDev

    Senior Member
  • Aug 18, 2016
    723
    154
    Mississauga
    OnePlus 7 Pro
    I was able to use ADB and I no longer see the notification to disable battery optimization, but I still get "Ambient Music failed to start". Would more logs be potentially useful, or is there just too much incompatibility with A10?
    Idk I'm not the dev, but I'd take logs and attach them here anyways because now u have a different issue (before it was battery optimization now probably something else) and hopefully Quinn can look at them and solve them.
     

    chickenmatt5

    Member
    Apr 21, 2018
    12
    0
    OnePlus 7 Pro
    EDIT: I grepped for com.google.intelligence.sense and it seems like its not installed for me.
    EDIT2: Got it working, might not be too helpful to you as I also installed TotallyAnxious mod and I now have the app installed, even though I don't remember seeing Ambient Services inside the zip. But either way its working now (maybe it was the reboot, idk)
    Is TotallyAnxious a ROM? I was able to use adb shell dumpsys deviceidle whitelist +com.google.intelligence.sense to get battery optimisation disabled for it, so I assume it's installed for me. Still not working for me however, many reboots later.
     

    chickenmatt5

    Member
    Apr 21, 2018
    12
    0
    OnePlus 7 Pro
    Idk I'm not the dev, but I'd take logs and attach them here anyways because now u have a different issue (before it was battery optimization now probably something else) and hopefully Quinn can look at them and solve them.
    Ah, my mistake. Thanks for the suggestions!

    Here's hoping
     

    Attachments

    • ambient_music_mod_log_dump_2021-04-19T23_02_19.592.zip
      12 KB · Views: 1

    NateDev

    Senior Member
  • Aug 18, 2016
    723
    154
    Mississauga
    OnePlus 7 Pro
    Ok so now I'm facing an issue as well. (I did switch from Edxposed to LSposed, not sure if that can cause any issues). Here's what happens.

    I play a song for 45s, turn on the screen, nothing. I leave the screen on, play another 45s, nothing. I turn the screen on, login, and then turn the screen off. Pretty quickly (5,10s) the song will update on the lock screen. If I listen manually, it will also listen.

    However, sometimes it will say "Failed to start" when doing it manually. Opening the app, waiting a bit, and just randomly it will start listening again. But I feel like its getting stopped a lot because half the time manually it says failed to start it feels like

    So it seems kinda hit or miss, like it gets killed sometimes (or maybe it just isn't waking up, I have it on automatic?, but that wouldn't affect the manual listening, which is also affected occasionally - AND I have it on listen when screen on). I have all the battery optimizations off for the apps and also sleep standby disabled. I will get logs tomorrow and reattach them.

    edit: Seems better on 1m interval but even still didn't detect a song 2mins in but showed up immediately once I hit the fp sensor and then locked the device again).

    I wonder what the frequency of automatic is


    EDIT: well after just leaving it on my desk screen off and playing 5 songs straight it got all of them, so seems to be working fine I guess for now? :p ill continue to see how it is, thanks this is a great mod, been waiting on a port since the pixel 2 release day haha
     
    Last edited:

    ock

    Senior Member
    Mar 9, 2010
    1,007
    1,382
    This may be obvious for some, but wasn't to me initially😛:

    If you are not getting the recognition to start, check that the xposed module is applied on pixel ambient services.
     
    • Like
    Reactions: JudgeDread11

    autobulb

    Member
    Dec 27, 2013
    42
    8
    It's been a while since I've used Xposed. Now I see there is EdXposed and LSPosed which seem newer than the original. Which is the best one to use? (OP5T with A10)
     

    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
      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​


      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.
      Can't hide Ambient Music Mod from Edxposed. App warns me that "one or more settings is preventing me from hiding the app"

      The rest is all green mark and test recognition fails to start.
      1
      @emime12

      Your error is
      exf: startRecognition failed, error=-2147483648
      Which means it won't work and likely never will, sorry.
    • 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