kieronquinn / ambientmusicmod Goto Github PK
View Code? Open in Web Editor NEWPort of Now Playing from Pixels to other Android devices
License: GNU General Public License v3.0
Port of Now Playing from Pixels to other Android devices
License: GNU General Public License v3.0
I want to use this implementation on my pixel 4 because I gave up using the original feature after Google forced analytics for pixel 4 and above.
Sad to see the device is not recognized as being compatible :(
if this is a reimplantation, why is it not compatible with the original devices?
Problem:
Judging by terrible quality of any input playback from recognition test + fact that device needs to be directed specifically at the sound source + having to be relatively close to sound source - the wrong mic is being used.
That is a directional mic (located at the bottom of device) that is designed for recording voice during phone calls and not being optimal for ambient sounds.
Solution:
Is it possible to switch to the main mic (located at the top of device) that is probably designed to recognize ambient sounds?
AmbientMusicMod: 1.1.1
EdXposed: 0.5.2.2 (Yahfa)
Magisk: 22104 (latest canary build)
OS: OxygenOS 11.0.8.12 (stock rom, Android 11 based)
On Samsung devices without root, the Recognise feature only records static. However, when recording via another app to recognize music (ie. Shazam, Google app, or Google assistant), the song gets recognized mostly without any issue.
Adjusting Gain does not yield any improvement, with static still largely remaining.
Using AmbientMusicMod 2.0.1 apk via Shizuku.
Due to changes in Sound Trigger in AOSP Android 12, you may find this module does not work on it.
I do not currently have access to an Android 12 device that is rooted, and is not a Pixel (ie. one this module can be tested on). Once I do, I will attempt to update it to support it.
Samsung Tab S7+. Android 12
Magisk v25 (Zygisk)
SUI (Zygisk)
Went through the setup process. Allowed all permissions. Database downloaded. Went to test recognition and got very loud static. Lowered gain in advanced settings. Still static
I am using oneplus 7 pro with pixel experience rom.
This mod was working fine, then a new update to pixel ambient services came.
Unfortunately i didn't disable the auto update, but then i reverted "pixel ambient services" back to stock and disabled auto updates now.
But now the mod doesn't work. It just shows "Ambient music failed to start".
I have tried removing the mod from magisk and apk and then reinstalling, but still doesn't work.
Any way i could fix this?
Cause the mod was working perfectly fine.
ambient_music_mod_log_dump_2021-11-05T10_38_55.486.zip
It never starts. I have done everything right but still!
Device Raphael
PEX android 12
Magisk 24.1
Lsposed zygisk
Greetings, I have encountered a problem when trying to get the module to work. Below, I have attached the log dump. Thank you
I've made a first test on a OnePlus 8 Pro (Pixel Experience) and it works perfectly.
I've made the same test without root on Galaxy S22+ running OneUI
According to the playback function, the music is not audible at all, I can only hear distortions and strange noises, even with gain at 0.1x.
Every microphone is clear and working (tested using camera, call, recorder)
Device - Xiaomi Mi 10 Lite 5G
Android version - 11
Rom - CrDroid
I've followed the install instructions, everything is functional but bluetooth and alarm audio refuses to play. On bluetooth on top if you change the output device it always takes the phone, regardless of it being a bluetooth device or not.
I've built the module according to instructions but can't replicate earlier errors (codes varied a lot) I had on Sound Model compatible. I do however get currently result code -8880 while it stating being compatible.
I own a realme X2. The compatibility test shows that the sound model is incompatible.
Can you look into the matter?
Device - Asus Zenfone Max Pro M1 (X00td)
Android version - 10
Rom - Pixel Experience
When i try to test recognition, the process fails with "Ambient music failed to start"
ambient_music_mod_log_dump_2021-04-20T19_22_39.353.zip
i found the lsposed logs to be interesting so attaching them as well
LSPosed Log
--------- beginning of information
Manufacturer: asus
Brand: asus
Device: ASUS_X00T_2
Product: X00TD
Model: ZenFone Max Pro M1
Fingerprint: google/coral/coral:11/RP1A.201105.002/6869500:user/release-keys
ROM description: coral-user 11 RP1A.201105.002 6869500 release-keys
Architecture: arm64-v8a
Android build: QQ3A.200805.001
Android version: 10
Android sdk: 29
LSPosed version: v1.3.5 (5551)
Riru version: v25.4.2.r415.f42e9c3 (415)
Riru api: 25
Magisk: 1469b82a (21101)
2021-04-20 17:03:44.044 E/?(1471-1471): de.robv.android.xposed.XposedHelpers$ClassNotFoundError: java.lang.ClassNotFoundException: com.android.server.soundtrigger_middleware.SoundTriggerHw2Compat
at de.robv.android.xposed.XposedHelpers.findClass(Unknown Source:13)
at de.robv.android.xposed.XposedHelpers.findAndHookMethod(Unknown Source:0)
at com.kieronquinn.app.ambientmusicmod.xposed.apps.Android.setupSoundTriggerHooks(Android.kt:57)
at com.kieronquinn.app.ambientmusicmod.xposed.apps.Android.onAppHooked(Android.kt:41)
at com.kieronquinn.app.ambientmusicmod.xposed.Xposed.handleLoadPackage(Xposed.kt:25)
at de.robv.android.xposed.IXposedHookLoadPackage$Wrapper.handleLoadPackage(Unknown Source:2)
at de.robv.android.xposed.callbacks.XC_LoadPackage.call(Unknown Source:6)
at de.robv.android.xposed.callbacks.XCallback.callAll(Unknown Source:28)
at X0.beforeHookedMethod(:1)
at de.robv.android.xposed.LspHooker.handleHookedMethod(Unknown Source:75)
at LspHooker_.startBootstrapServices(Unknown Source:8)
at com.android.server.SystemServer.run(SystemServer.java:516)
at com.android.server.SystemServer.main(SystemServer.java:359)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:918)
Caused by: java.lang.ClassNotFoundException: com.android.server.soundtrigger_middleware.SoundTriggerHw2Compat
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:454)
at z0.b(Unknown Source:49)
at de.robv.android.xposed.XposedHelpers.findClass(Unknown Source:5)
... 15 more
Caused by: java.lang.ClassNotFoundException: com.android.server.soundtrigger_middleware.SoundTriggerHw2Compat
... 19 more
Lsposed configuration
The mod seems to record the songs well, in the playback it is heard well, however it does not recognize the songs, here is the dumpClick here.
Hi there
I just recently updated your Ambient music mod and found some of the features is not working for me.
Android version - Android 12
Device - Realme 2 Pro
ROM - Derpfest
Magisk - magisk v23.0
Hi i have installed Lsposed instead of xposed and in lsposed you have to give permission to the module to certain app in order to effect those apps and i was wondering what app should i give permission to?
Ps: i have given permission to "System Framework" but the module not working
First, congrats for releasing v2/v2.1, you've really outdone yourself. Thanks to the update the app is finally working well on my OnePlus 8 Pro AOSP 12.1.
However I still have a minor issue: Whenever I play audio in an app like TikTok, YouTube or Plex I get the error notification in set intervals while playing back (a video for example). Would it be possible to check for other apps playing audio and if they do not try to run the recognition?
I don't want it keeps on whole night even when I'm sleeping. Is it possible to set a time to enable(like 8am to 5pm) or disable(like 10pm to 7am) it?
I'm not aware of a open-source song recognition app that works offline, so even being able to do it triggered manually is a very useful feature for privacy enthusiasts. Having it as a normal app in app stores also means more people can be informed of the enhanced root+Xposed version available via the app.
So I noticed this behavior where the app needs to have it's cache cleared and force stopped or else the "now playing" tab would load continuously/way longer than usual
Device: Mi 10 Ultra
ROM: EU MIUI 12.6
Issue:
Installed magisk and LSPosed modules.
Tried manual test recognition, got nothing back after recording.
Also track database doesn't seem to load?
Logs:
ambient_music_mod_log_dump_2021-04-16T04_17_19.47.zip
I added whitelist for System Framework and Pixel Ambient Services.
I assume that this might not only affect the shortcut but that's the only place where I noticed it, sometimes the shortcut for the now playing history stops working, and using Scoop I recorded the crash log and hope you can find any use in it
FATAL EXCEPTION: DefaultDispatcher-worker-1
Process: com.google.intelligence.sense, PID: 24499
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:9392)
at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:1757)
at android.view.View.requestLayout(View.java:25595)
at android.view.View.requestLayout(View.java:25595)
at android.view.View.requestLayout(View.java:25595)
at android.view.View.requestLayout(View.java:25595)
at android.view.View.requestLayout(View.java:25595)
at android.widget.AbsListView.requestLayout(AbsListView.java:2034)
at android.view.View.requestLayout(View.java:25595)
at android.view.View.requestLayout(View.java:25595)
at android.view.View.requestLayout(View.java:25595)
at android.view.View.requestLayout(View.java:25595)
at android.widget.ImageView.setImageDrawable(ImageView.java:605)
at com.kieronquinn.app.ambientmusicmod.xposed.apps.PixelAmbientServices$setAlbumArtImage$1.invokeSuspend(PixelAmbientServices.kt:477)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Latest pixel ambient services doesn't seem to be supported, or at least, gives a warning.
Version tested to not work: 1.0.382690186
Opened this issue as an heads-up, to let know of the new version.
When the feature is on 'Hey Google' doesn't work. OnePlus 7 pro, android 11, Pixel epxeircen custom rom
Ambient Music Mod does not show up in the LSPosed app list. I've enabled the module for "System Framework" and "Pixel Ambient Services" but Ambient Music Mod app is missing.
My device :
Redmi Note 9 Pro Max (Excalibur)
Android -10
I have Magisk Installed
And EdExposed module is also running.I tried other troubleshooting options but that doesn't seem to work.
When I tested recognition it gave Ambient Music Failed To Start Error.
Initially I tried to bypass the 'Sound Model Compatibility' but after a reboot It says that it is compatable.
BTW here is the Log Dump :
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 gain upto 0.1x and still the noise was there.
I am using Galaxy S20 FE 5G, not rooted. Can give logs if needed.
Thanks for your Awesome work!
So my phone is oneplus 7t pro, and I don't have pixel ambient services app in stock. So I tried different version of this from apkmirror, but still cannot get the right one. I tried the oldest version which is 1.0.17, but still when I click "lauch ambient music app" button I got the mod app shut down immediatly, and it says that pixel ambient services version is not right. I try click "test recognition" and it fail to start.
My device is Redmi 4X, LianageOS 18.1. I have installed Edxposed, but it still shows "Xposed Module not enabled You must enable the Xposed module for Ambient Music to work"
This on an OnePlus 8 on Oxygen OS 11
App version 1.1.1
It shows the notification from the correct guess, but doesn't show the overlay on the lockscreen.
Here's the log dump:
ambient_music_mod_log_dump_2021-04-20T13_58_01.967.zip
If any other info is needed let me know.
Handset:- redmi note 9 pro miatoll
I use a los fork called sakura project with Nik gapps
Logs http://0x0.st/-mRN.zip
I don't have any sound modules active whatsoever, magisk and edxposed working fine but still can't get it fixed on my POCO F1. I tried it on pixel experience rom and other roms as well but still showing the same message!!
Any chance we can have an option to send to AS?
So I tried to follow the instructions just like you mentioned, Installed the Magisk module, enabled the XPosed module and whitelisted the apps, but at that point I realized that I don't have the Pixel Ambient Services (I assume the module is supposed to install it themselves because you no where mention which version is even supported). It also made my play services continuously crash. I don't know if this is because my Phone (OnePlus 7 Pro) was listed as incompatible but I don't think that's the cause. Please let me know if this is my fault or if there's something I can do to fix it, thank you
It seems that after enabling this module adaptive notifications stops working?
It's even gone from the settings within android: Screenshoot
Not sure of what other info I can provide regarding this and if there's any one else experiencing this.
OnePlus 8 on Android 11
Mod: 1.1.1
When installing the overlay a round hole near the supposed camera location appears and the clock disappears from the statusbar. The power button seems to be remapped from opening the power menu, to opening the Google Assistant. To open the power menu I need to do Power+Vol Up.
See attached image:
Any other info needed let me know.
It would be great to have some intents automate as we want in Tasker. Some like:
The classes com.kieronquinn.app.ambientmusicmod.app.ui.installer.build.InstallerBuildViewModel
and com.kieronquinn.app.ambientmusicmod.app.ui.installer.build.InstallerBuildViewModelImpl
are mentioned in AmbientApplication.kt
but the whole ui/installer/build package is missing with them in it. Therefore the app wont build or if outcommenting those the whole Magisk module builder tab is missing.
When listening to musing, 99% of the music appears to be filtered out when testing with the "test recognition" feature. I've tried tweaking with amplification but it makes no difference.
Music input sample
log dump
The smartphone app works very well, but I imagine how it would be even better if I could do some things directly from my watch.
If that were possible, the companion app could have the following features:
Great job on releasing V2 .
But there is a lack of option to reduce amplification, my playback is getting distorted at even at 1xGrain.
When installed and rebooted my op I got bootloop and now after few bootlops my lock screen not working so I can't access my phone. Please help quick
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.