[APP][SHIZUKU][08/06] Ambient Music Mod - Pixel Now Playing port

Search This thread

Matthew78___

Member
Dec 3, 2022
18
10
Screenshot_20230515-162541.jpg
how do i fix this?
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
9,271
8,642
26
Salford, Greater Manchester, UK
quinny898.co.uk
Like an idiot I forgot to also release the Now Playing build which is required to fix the crash on Android 14, so here you go

Now Playing v1.3 said:
Fixed crash on Android 14 Beta 2

You may notice that there's a new Android System Intelligence build from Android 14 Beta 2 (U.0.beta.pixel7.520037477), which I've not updated to. This is intentional, since it hard-disables Now Playing History Summary. Guess Google didn't appreciate the leak!
 
  • Like
Reactions: osm0sis

RabbitType99

Member
Jun 3, 2021
7
1
I reinstalled now playing and ambient music mod, because the audio recordings were getting stuck. I now have the problem that the database is still there but I can not add or remove countries, the entries do not contain links to YouTube music or Spotify and it always shows that it is still downloading the database. I tried clearing the data of system apps, but the database doesn't get deleted. Can I do anything about that like deleting the database manually?
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
9,271
8,642
26
Salford, Greater Manchester, UK
quinny898.co.uk
I reinstalled now playing and ambient music mod, because the audio recordings were getting stuck. I now have the problem that the database is still there but I can not add or remove countries, the entries do not contain links to YouTube music or Spotify and it always shows that it is still downloading the database. I tried clearing the data of system apps, but the database doesn't get deleted. Can I do anything about that like deleting the database manually?
The "Global" database is built into the Now Playing app. There's nothing to delete.
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
9,271
8,642
26
Salford, Greater Manchester, UK
quinny898.co.uk
Ok that is understandable, but I still can not get the app to download anything. I can delete all data select the countries again, press the update button under music database, wait 3 days and then still nothing happens.
If you've let it sit while charging and on WiFi after 3 days, you may wish to try using the option in Settings > Advanced > Poke Job Scheduler, which will force a download. You will need to enable verbose logging first for the option to appear.
 

RabbitType99

Member
Jun 3, 2021
7
1
If you've let it sit while charging and on WiFi after 3 days, you may wish to try using the option in Settings > Advanced > Poke Job Scheduler, which will force a download. You will need to enable verbose logging first for the option to appear.
I tried that but that still did not fix the issue. I dumped the logs regarding the ambient music app and the now playing app maybe that helps.
 

Attachments

  • logs.txt
    87.2 KB · Views: 10

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
9,271
8,642
26
Salford, Greater Manchester, UK
quinny898.co.uk
I tried that but that still did not fix the issue. I dumped the logs regarding the ambient music app and the now playing app maybe that helps.
There's nothing useful in those logs unfortunately. If poking the job scheduler doesn't even unblock it, I don't have any more suggestions. The mod is reliant on the system to schedule the downloads, if that is not happening then nothing can be done.
 

ymyinfinity

New member
Feb 11, 2010
3
0
I have everything installed on my S22 and i can click the musical note in the app to figure out what's playing, however with everything enabled, it still doesn't tell me what's playing in the background if the song changes.

I've searched the database and the songs are present, and clicking the note icon detects the song again but it won't do it in the background.
I've set it to 1 minute refresh and refresh on screen wake as well. Is there anything that could be preventing the functionality in the background? Thank you!
 

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
9,271
8,642
26
Salford, Greater Manchester, UK
quinny898.co.uk
I have everything installed on my S22 and i can click the musical note in the app to figure out what's playing, however with everything enabled, it still doesn't tell me what's playing in the background if the song changes.

I've searched the database and the songs are present, and clicking the note icon detects the song again but it won't do it in the background.
I've set it to 1 minute refresh and refresh on screen wake as well. Is there anything that could be preventing the functionality in the background? Thank you!
 

ymyinfinity

New member
Feb 11, 2010
3
0
Thank you for such a quick reply! I had already put these settings to unrestricted, the website you linked me didn't have for my android version but I've attached screenshots of my settings. Please let me know if there is anything i could have missed?
 

Attachments

  • Screenshot_20230605_230522_Device care.jpg
    Screenshot_20230605_230522_Device care.jpg
    337 KB · Views: 24
  • Screenshot_20230605_230500_Settings.jpg
    Screenshot_20230605_230500_Settings.jpg
    222.2 KB · Views: 25
  • Screenshot_20230605_230444_Settings.jpg
    Screenshot_20230605_230444_Settings.jpg
    226.6 KB · Views: 24

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
9,271
8,642
26
Salford, Greater Manchester, UK
quinny898.co.uk
Thank you for such a quick reply! I had already put these settings to unrestricted, the website you linked me didn't have for my android version but I've attached screenshots of my settings. Please let me know if there is anything i could have missed?
I don't have a recent Samsung device to test so I can't provide any more info. It does work for others on Samsung devices though so it must be possible.
 

flaxx187

Senior Member
Jun 23, 2013
154
5
Google Pixel 6a
Hey thanks for this wonderfull app.

How can I see the song automatically on the lock screen?
By my side it search and shows the music only if I am click on the button "recognise", but is doesn't do it automatically.

After I recognise and start a new one, the old stay on the lockscreen.


Setting:
Recognition Period - Adaptive Recog.. is on
Period is on 1 Minute.
Trigger when Screen on is on.

I root my device and installed shizuku.


shall I install onDemand?

Edit:

This could be my solution
 
Last edited:

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
9,271
8,642
26
Salford, Greater Manchester, UK
quinny898.co.uk
Hey thanks for this wonderfull app.

How can I see the song automatically on the lock screen?
By my side it search and shows the music only if I am click on the button "recognise", but is doesn't do it automatically.

After I recognise and start a new one, the old stay on the lockscreen.


Setting:
Recognition Period - Adaptive Recog.. is on
Period is on 1 Minute.
Trigger when Screen on is on.

I root my device and installed shizuku.


shall I install onDemand?

Edit:

This could be my solution
The old one will stay until either it was projected to end (so if you skip or pause the song it will not disappear immediately), or a new recognition finishes with any result - replacing it if successful or clearing it if not.

On Demand is not the same as regular recognitions and should not be used like you are suggesting, unless the track is genuinely not in the database. It sounds like you are getting failed on device recognitions, so either the song is not in the database or you should check your recognition config to make sure it's audible.
 

flaxx187

Senior Member
Jun 23, 2013
154
5
Google Pixel 6a
The old one will stay until either it was projected to end (so if you skip or pause the song it will not disappear immediately), or a new recognition finishes with any result - replacing it if successful or clearing it if not.

On Demand is not the same as regular recognitions and should not be used like you are suggesting, unless the track is genuinely not in the database. It sounds like you are getting failed on device recognitions, so either the song is not in the database or you should check your recognition config to make sure it's audible.
Thanks for this very fast response!

I have updatet google apps.
The Error is going away, but the automatically the music arent pop up on my lockscreen.

I start with cherri cherri lady or be my lover. but It doesn't show me up.


In my case the period doesn't work.


thank you for your time and nervous, god bless you


ps: is it possible to have everytime the button on the lockscreen to get the music song?

For Demond, I think I should going for this tutorial: https://github.com/KieronQuinn/AmbientMusicMod/wiki/Enabling-On-Demand ( update Google apps )

Because I get the following error, that I should update google apps.


the latest stable-version is: https://www.apkmirror.com/apk/google-inc/google-search/google-search-14-21-14-release/

At the bottom I see the newest version ends with .28 not with .29 ( like on the tutorial )

Or it has to be .29 ?

Screenshot_20230607-173743_Ambient Music Mod.png



Screenshot_20230607-173737_Ambient Music Mod.png



1686159567636.png
 
Last edited:

Quinny899

Recognized Developer / Recognized Contributor
Jan 26, 2011
9,271
8,642
26
Salford, Greater Manchester, UK
quinny898.co.uk
Thanks for this very fast response!

I have updatet google apps.
The Error is going away, but the automatically the music arent pop up on my lockscreen.

I start with cherri cherri lady or be my lover. but It doesn't show me up.


In my case the period doesn't work.


thank you for your time and nervous, god bless you


ps: is it possible to have everytime the button on the lockscreen to get the music song?

For Demond, I think I should going for this tutorial: https://github.com/KieronQuinn/AmbientMusicMod/wiki/Enabling-On-Demand ( update Google apps )

Because I get the following error, that I should update google apps.


the latest stable-version is: https://www.apkmirror.com/apk/google-inc/google-search/google-search-14-21-14-release/

At the bottom I see the newest version ends with .28 not with .29 ( like on the tutorial )

Or it has to be .29 ?

View attachment 5927695


View attachment 5927691


View attachment 5927689
That is build .28 and is an APK, not a bundle. Read the guide, it tells you to use .29 and needs to be a bundle.

As for why music isn't recognising, it's probably because you don't have the database downloaded. Let it sit and download first, before messing with on demand.
 
  • Like
Reactions: osm0sis

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Thanks for this great mod.

    Can someone point the latest google bundle compatible with 'On Demand'? I downloaded a bunch of (.29) bundles, but none had the 'sound split' functionality.
    Yeah whoever's been uploading them doesn't have the split at the moment for some reason. Latest is probably this one, but I'm currently on a train and the WiFi won't like a 180MB download.

    The general rule is the more splits it has, the more likely it is to have the sound search split. Unfortunately APKmirror doesn't display splits before you download, so it requires manually downloading and checking builds.
    2
    Thanks for your prompt response. I think your attachment may take time to upload due to you being on train.

    If you can share the app version, that will help.
    Nah I'm just dumb and forgot to send the link. Got 5G briefly while I'm stopped at a station so I can send an image at least.


    If it's not got the split, check this section and work your way down, check all the ones with higher bundle counts (the green tags like 8S = 8 splits). You can open the downloaded bundles as zips with any old file manager to check, rather than having to load them into the APKmirror app, the required split is called like sound_fingerprinter or something
    2
    Would kernelsu support be considered as part of your roadmap for Ambient Music Mod as an alternative to Magisk or Shizuku?

    Thank you for sharing your work with the community!
    I think the SUI (Shizuku API for root) module already supports KernelSU as long as Zygisk for KernelSU is installed.
    1
    Google App 14.37.22.29 (arm64-v8a) (320-640dpi) (Android 10+) Bundle has the sound split.

    APKmirror link


    Thanks. So, we also need to keep the app updates disabled for Google app I assume?
    Yes, unfortunately. Manual updating only or it will revert.

    I did see a telegram post yesterday about how you can get the Samsung build of Messages by adding a system feature, so I need to look into whether this is controlled by a similar one (perhaps one of the PIXEL_YEAR ones), in which case it could be included in the overlay to enable automatic updates
    1
    Something in NikGapps makes it prefer .29 with the sound split, could check there.
    Perfect, cheers

    I also asked Artem about making it display which files are in a split before downloading and it turns out you already can - the button "what's in this split" (of course!) lists them and their signature hashes, so check for the sound split in that
  • 30
    Ambient Music Mod Banner

    Ambient Music Mod is a Shizuku/Sui app that ports Now Playing from Pixels to other Android devices.

    Requirements​

    • Android device running Android 9.0 or above (11+ recommended).
    • Shizuku (Android 12+) or Sui Magisk module (Android 9+).
      • Shizuku does not require root, instead needing an ADB command or a few button presses to be made every reboot.

    Features​

    • Full Now Playing support, based on the latest version from Pixel devices and the latest music databases
    • Automatic Ambient Music recognition, with settings to control how often recognition runs - finding the right balance between battery usage and convenience
    • Now Playing History, Favourites and Summary support
    • Support to trigger recognitions manually, including a homescreen widget
    • On Demand recognition on supported devices, using the Google Assistant-backed recognition engine for songs that are not in the local database (must be triggered manually)
    • Show Now Playing songs on the lock screen (accessibility service required)
    • View the full track list of recognisable songs, and change the database location if your taste does not match your device's locale

    Screenshots​

    Screenshots

    Changelog​

    2.3.1
    - Fixed crash on Android 14 Beta 3

    2.3
    - Android 14 Beta 2 support
    - Added option to control Ambient Music Mod externally from apps like Tasker with options:
    • Enable Now Playing
    • Disable Now Playing
    • Toggle Now Playing
    • Start an On Device Recognition
    • Start an Online Recognition (if supported & enabled)
    - External Access can be protected by an Access Token which must be provided by the apps interacting with it (enabled by default)
    - Updated dependencies
    For info on how to use External Access, check the page in the app or the Wiki page

    2.2.2
    - Fixed On Demand not working via the root method on some devices
    - Improved Track Listing info, showing more details on tracks where available and fixing the Ask Google button
    - Crash fixes

    2.2.1

    This is quite a large update, please make sure to update Ambient Music Mod and then Now Playing from the Updates screen after installing

    - Enabled Now Playing Summary in the Now Playing History, a new feature that's not even on Pixels yet, which displays statistics about your listening habits including genre, artists, and timings from the last 30 days (configurable down to 1 day up to 365 days)
    - NNFPv3 (the updated model) is now enabled on all devices except legacy armv7. Google have switched Pixels over to using it, indicating music databases for the legacy model may stop being updated at some point.
    Please note that due to format changes, a database update will be forced after updating, and any saved On Demand recognitions will be removed. This is unavoidable, and Google has already done this on Pixel devices with official Now Playing
    - Added experimental option to download extra country databases (up to two)
    - Added option to periodically (daily/weekly/monthly) back up to a specified location
    - Improved track list viewer speed by caching track info in Ambient Music Mod, rather than loading it from the Now Playing database every time. This will increase the storage footprint of Ambient Music Mod, but you can clear the app's cache if it becomes an issue.
    - Added a track info viewer to the track list, displaying all available information for a track on one page, including links to play tracks in the database
    - Added option to edit and delete stored On Demand tracks
    - Updated database downloader, and implemented a system whereby the system Job Scheduler (which is relied on to schedule downloads) gets told to expedite downloads where possible. This should improve the speed of database downloads.
    - Improved Lock Screen detection logic
    - Fixed an issue where some switches in the app behaved differently depending on whether the text or the switch handle was pressed
    - Fixed an issue where notifications for Now Playing were being re-enabled after being disabled by the user on some devices

    nb: Version 2.2.1 fixes a cache issue with 2.2 which may impact updates. For this reason, it has replaced 2.2 and that version has been removed.

    2.1.2
    - Fixed Restore option not showing any options of files to restore

    2.1.1
    - Improved adaptive lock screen overlay
    - Fixed insets on 3 button devices
    - Allow install on x86_64 devices without libhoudini or libndk

    2.1
    - Added x86_64 support
    - Fixed Android 13 Shizuku issue
    - Updated switch style
    - Removed "run when battery saver enabled" as it was not functioning and cannot be fixed
    - Fixed overlay continuing to appear when bedtime mode is enabled
    - Added message about static noise to playback screen

    2.0.5
    - Fixed an issue where on device recognition would not work on some devices using Shizuku

    2.0.4
    - Added the ability for On Demand recognitions to run without the Magisk overlay module, so long as the device is rooted. You must start Shizuku as root or use Sui to make use of this method, and the overlay is still preferred if it works on your device. Please read the Wiki page for more information.
    - Further improvements to the On Demand overlay, fixing issues on OnePlus devices
    - Fixed the Lock Screen overlay not appearing when Smart Lock is enabled
    - Fixed Alternative Encoding and Lock Screen Overlay colour options not being backed up

    2.0.3
    - Added armv7 support
    - Fixed crashes on Android 10
    - Fixed an issue where some tracks were not showing up in the track list or in the track count (US database is actually 69k tracks, not 53k)
    - Added an option to change the lockscreen overlay text colour
    - The lockscreen overlay text now has a slight shadow, improving visibility
    - Added caching for updates, which should prevent rate-limit issues. You can force an update check (ignoring cache) by swiping to refresh.
    - Enabled landscape orientation
    - Fixed background crashes in Now Playing, which may help download issues.
    - Improved Magisk On Demand module overlay installing, which may fix bootloops on some devices

    Note: Due to issues with the backend database update system, there have been two database updates in the last two days. This is now fixed, and future updates will be timely rather than all at once. Apologies for any inconvenience.

    2.0.2:
    - Added alternative encoding option, fixing distortion/crackling on some devices when enabled
    IMPORTANT: You must also update Now Playing to 1.0.1 for the alternative encoding option to work. Use the Updates page in the app to update Now Playing.
    - Increased max gain to 3.0 to cope with new encoding which requires a higher gain on some devices
    - Reduced the chance of audio recording errors
    - Removed "Timeout" notification as it was more useless than it was useful
    - Fixed unclickable Chips on Recognition Success page (eg. Ask Google)

    Installation​

    Download the latest APK from the GitHub Releases page and install it. Ambient Music Mod will download and install the latest Now Playing APK for you as part of the setup process.

    If you have any questions, please read the FAQ before opening a GitHub issue or replying to the thread.
    5
    Isn't android 12 OOS update been out for some time now? Which device the dev is using?
    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.
    5
    Ambient Music Mod v2.2.1 + Now Playing v1.2 are now available, and it's a big one

    Changelog said:
    This is quite a large update, please make sure to update Ambient Music Mod and then Now Playing from the Updates screen after installing

    - Enabled Now Playing Summary in the Now Playing History, a new feature that's not even on Pixels yet, which displays statistics about your listening habits including genre, artists, and timings from the last 30 days (configurable down to 1 day up to 365 days)
    - NNFPv3 (the updated model) is now enabled on all devices except legacy armv7. Google have switched Pixels over to using it, indicating music databases for the legacy model may stop being updated at some point.
    Please note that due to format changes, a database update will be forced after updating, and any saved On Demand recognitions will be removed. This is unavoidable, and Google has already done this on Pixel devices with official Now Playing
    - Added experimental option to download extra country databases (up to two)
    - Added option to periodically (daily/weekly/monthly) back up to a specified location
    - Improved track list viewer speed by caching track info in Ambient Music Mod, rather than loading it from the Now Playing database every time. This will increase the storage footprint of Ambient Music Mod, but you can clear the app's cache if it becomes an issue.
    - Added a track info viewer to the track list, displaying all available information for a track on one page, including links to play tracks in the database
    - Added option to edit and delete stored On Demand tracks
    - Updated database downloader, and implemented a system whereby the system Job Scheduler (which is relied on to schedule downloads) gets told to expedite downloads where possible. This should improve the speed of database downloads.
    - Improved Lock Screen detection logic
    - Fixed an issue where some switches in the app behaved differently depending on whether the text or the switch handle was pressed
    - Fixed an issue where notifications for Now Playing were being re-enabled after being disabled by the user on some devices

    nb: Version 2.2.1 fixes a cache issue with 2.2 which may impact updates. For this reason, it has replaced 2.2 and that version has been removed.

    Download from GitHub releases or via the app's updater as usual
    5
    Ambient Music Mod v2.0.4 & Now Playing v1.0.3 released:

    • Added the ability for On Demand recognitions to run without the Magisk overlay module, so long as the device is rooted. You must start Shizuku as root or use Sui to make use of this method, and the overlay is still preferred if it works on your device. Please read the Wiki page for more information.
    • Further improvements to the On Demand overlay, fixing issues on OnePlus devices
    • Fixed the Lock Screen overlay not appearing when Smart Lock is enabled
    • Fixed Alternative Encoding and Lock Screen Overlay colour options not being backed up
    Download from GitHub releases as usual
    4
    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!