Thought I would start a thread for chromecast mirroring, I have tried without success to get this working. Chromecast works perfecty in the normal way and is great.
Chromecast firmware latest 17977
Chromcast app 1.7.4
MirrorEnabler v1
Crombi-KK latest build 0719 on internal
Logcat attached
mirror enable
I have try it and it hasn't work for me i hear there has to be file directory with : audio.r_submix.default. I ask the same question on crombikk rom and they told me that the file is there but it still doesnt work. I have been trying to use it with r3pwn experimental apk found here http://forum.xda-developers.com/hard...evice-t2812193
I haven't actually had a chance to look at this properly yet. When I get around to it I'll have a play. I see there are other tegra 3 devices working so there is hope.
I believe in the thread for the chromecast screencasting any device thread there's a known issue with devices with Tegra chips. If memory serves me well, there's some kind of issue one of the libraries and it being closed source so where is needed is not being properly accessed.
I'm not sure, but I don't believe any of the officially supported devices, right now, are running Tegra chips, so it's possible a fix won't be found till a Tegra device is officially supported.
Thanks. I have seen reports of people with tegra 3 devices saying it works for them so I have hope. I think the bigger issue is with tegra 2 devices which sounds like the problem you described.
Only progress I have made so far is to update to v5 mirror enabler, try the various options in there, and also tried different resolutions. Without success I'm afraid.
I might root my HTC one x+ just to try this out on.
Tegra 3 does support. miracast which is the same as. Mirroring. AFIK. Here is a good read: http://en.m.wikipedia.org/wiki/Miracast
OK, I have spent a bit of time digging with this. I can see a few options that may help. I still seem to get ApOpps errors with audio and CM11 has a known problem with this, however a fix may be to use this patch;
http://review.cyanogenmod.org/#/c/69871/ However I don't know how to do anything with that information. I can't see an obvious flashable zip and assume I would need to make one, but don't know how. It sounds like this is what may be causing the crashes when we try to stop casting.
The blank screen issue may be solved with this;
Check the BoardConfig.mk file in /android/system/device and the config.xml file in /frameworks/base/core/res/res/values directory in the Linux computer you used to compile. Also check hardware_composer.h to determine the HAL version. HAL v1.2 and greater don't require gralloc buffers, but HAL v1.1 requires gralloc buffers. Most likely chromecast is using video buffering. Generally, low ram devices do not use dedicated video buffering since that will reduce available for system/programs. Again I don't think there is anything I can do with this info because I don't compile Crombi-KK.
As far as I can tell we have the audio_policy.conf in /system/etc/ r_submix section added and the audio.r_submix.default.so in /system/lib/hw/
There is a database entry that must be present in go to /data/data/com.google.android.gsf/databases/gservices.db
open that database with sqlite editor and open the overrides and add
name
gms:cast:mirroring_enabled
value
true
I believe that the above is present in our gservices.db but I can't be 100% as I don't have SQLite editor, only a basic "reader" of sorts.
SELinux looks to be disabled so I don't think we need to worry about being in a permissive mode.
If someone from the Crombi-KK dev team wants to look into the above and write me a flashable zip to try I am more than willing to do so. However I don't think there is much more that I can do myself I'm afraid.
I have tried - different versions of mirror enabler with the various fixes in place. I am on latest GPS and chromecast app. I have tried the clear data, etc, etc. Powered the chromecast from an AC plug rather than the TV and I never get anything other than a blank screen. Logcat shows ApOpp audio errors and surface flinger errors. I don't get a GPS crash, the cast screen option exists and appears in the quicksettings with the later versions of mirrorenabler. The tab will "think" it is casting, but I get a blank screen and when trying to stop casting will soft reboot. That is about all I have I think..
Hope that may help someone!
I should also note that I have tried removing ViperFX as this is known to cause some issues with chromecast mirroring. I have tried different kernels and various options for GPU rendering etc, with no success either.
Gudders said:
OK, I have spent a bit of time digging with this. I can see a few options that may help. I still seem to get ApOpps errors with audio and CM11 has a known problem with this, however a fix may be to use this patch;
http://review.cyanogenmod.org/#/c/69871/ However I don't know how to do anything with that information. I can't see an obvious flashable zip and assume I would need to make one, but don't know how. It sounds like this is what may be causing the crashes when we try to stop casting.
The blank screen issue may be solved with this;
Check the BoardConfig.mk file in /android/system/device and the config.xml file in /frameworks/base/core/res/res/values directory in the Linux computer you used to compile. Also check hardware_composer.h to determine the HAL version. HAL v1.2 and greater don't require gralloc buffers, but HAL v1.1 requires gralloc buffers. Most likely chromecast is using video buffering. Generally, low ram devices do not use dedicated video buffering since that will reduce available for system/programs. Again I don't think there is anything I can do with this info because I don't compile Crombi-KK.
As far as I can tell we have the audio_policy.conf in /system/etc/ r_submix section added and the audio.r_submix.default.so in /system/lib/hw/
There is a database entry that must be present in go to /data/data/com.google.android.gsf/databases/gservices.db
open that database with sqlite editor and open the overrides and add
name
gms:cast:mirroring_enabled
value
true
I believe that the above is present in our gservices.db but I can't be 100% as I don't have SQLite editor, only a basic "reader" of sorts.
SELinux looks to be disabled so I don't think we need to worry about being in a permissive mode.
If someone from the Crombi-KK dev team wants to look into the above and write me a flashable zip to try I am more than willing to do so. However I don't think there is much more that I can do myself I'm afraid.
I have tried - different versions of mirror enabler with the various fixes in place. I am on latest GPS and chromecast app. I have tried the clear data, etc, etc. Powered the chromecast from an AC plug rather than the TV and I never get anything other than a blank screen. Logcat shows ApOpp audio errors and surface flinger errors. I don't get a GPS crash, the cast screen option exists and appears in the quicksettings with the later versions of mirrorenabler. The tab will "think" it is casting, but I get a blank screen and when trying to stop casting will soft reboot. That is about all I have I think..
Hope that may help someone!
Click to expand...
Click to collapse
Good info :good: Our source guy @lj50036 needs to review to see if we can implement it
Gudders said:
OK, I have spent a bit of time digging with this. I can see a few options that may help. I still seem to get ApOpps errors with audio and CM11 has a known problem with this, however a fix may be to use this patch;
http://review.cyanogenmod.org/#/c/69871/ However I don't know how to do anything with that information. I can't see an obvious flashable zip and assume I would need to make one, but don't know how. It sounds like this is what may be causing the crashes when we try to stop casting.
The blank screen issue may be solved with this;
Check the BoardConfig.mk file in /android/system/device and the config.xml file in /frameworks/base/core/res/res/values directory in the Linux computer you used to compile. Also check hardware_composer.h to determine the HAL version. HAL v1.2 and greater don't require gralloc buffers, but HAL v1.1 requires gralloc buffers. Most likely chromecast is using video buffering. Generally, low ram devices do not use dedicated video buffering since that will reduce available for system/programs. Again I don't think there is anything I can do with this info because I don't compile Crombi-KK.
As far as I can tell we have the audio_policy.conf in /system/etc/ r_submix section added and the audio.r_submix.default.so in /system/lib/hw/
There is a database entry that must be present in go to /data/data/com.google.android.gsf/databases/gservices.db
open that database with sqlite editor and open the overrides and add
name
gms:cast:mirroring_enabled
value
true
I believe that the above is present in our gservices.db but I can't be 100% as I don't have SQLite editor, only a basic "reader" of sorts.
SELinux looks to be disabled so I don't think we need to worry about being in a permissive mode.
If someone from the Crombi-KK dev team wants to look into the above and write me a flashable zip to try I am more than willing to do so. However I don't think there is much more that I can do myself I'm afraid.
I have tried - different versions of mirror enabler with the various fixes in place. I am on latest GPS and chromecast app. I have tried the clear data, etc, etc. Powered the chromecast from an AC plug rather than the TV and I never get anything other than a blank screen. Logcat shows ApOpp audio errors and surface flinger errors. I don't get a GPS crash, the cast screen option exists and appears in the quicksettings with the later versions of mirrorenabler. The tab will "think" it is casting, but I get a blank screen and when trying to stop casting will soft reboot. That is about all I have I think..
Hope that may help someone!
Click to expand...
Click to collapse
Wow that is a lot of stuff....
Let me take a look and see what I can find
Thx Josh
Updates?
Would really love to be able to use screen cast on crombi kk. Anyone?
I get the same black screen and reboot on 2014-09-06-RC3
I would love to get this to work.
Gudders said:
Thought I would start a thread for chromecast mirroring, I have tried without success to get this working. Chromecast works perfecty in the normal way and is great.
Chromecast firmware latest 17977
Chromcast app 1.7.4
MirrorEnabler v1
Crombi-KK latest build 0719 on internal
Logcat attached
Click to expand...
Click to collapse
Any update on this, folks? I'm on the latest (patched) Crombi-KK, latest Chromecast firmware and app, and MirrorEnabler V6. The "Cast Screen" shows up fine, but I still get the blank screen on the TV. When I "Disconnect" I get the reboot.
Thanks in advance
I am on the lastest release of Crombi-KK with Stability Patch and latest chromecast release. Same problems blank screen then soft reboot. Would love a fix.
Related
04/07/2011 UPDATE -- GREAT COMPILATION OF INFO HERE: http://forum.xda-developers.com/showthread.php?t=1026660
And another FAQ:
http://forum.xda-developers.com/showthread.php?t=874258 - please use this as an updated reference!
Also, this FAQ is VERY helpful: http://forum.xda-developers.com/showthread.php?t=865245
A good third-party doc on how to install the VEGAn ROM (not written by gojimi, FYI): http://www.blendblog.net/Blendblognet/tabid/36/EntryID/67/Default.aspx
or use this one, if that link is down : http://forum.xda-developers.com/showthread.php?p=12552736#post12552736
and lastly a good FAQ on the update.zip firmware process: http://forum.xda-developers.com/showthread.php?t=892090
This post last updated March 27th 2011.
Figured I'd start doing a brain dump of what I know, so far. Assume TnT Lite 4.x, as this is what I use. But stock / zPad / cm6.1 / all other 1.1-based ROMs might also work unless noted.
Please feel free to add to this FAQ with apps tested, general information etc.
---------------------------------------------------------------
General pre-sales / new user / "should I buy this?" information
Viewsonic support site: http://www.viewsonic.com/gtablet/support.htm. Their customer service is very good and I have used them many times. The only issue i have right now is a lack of information, but I don't fault CS for that.
Should you buy this?
It's up to you, but be aware of what you are getting into. Here's a quick breakdown of what you will / won't get:
- You are basically paying for hardware that is not optimized for Android. It's fast, but it could be a lot faster and we're hoping that future updates will take advantage of that. The hardware is bleeding edge, right now.
- The LCD screen is basically a netbook screen. With that in mind certain angles are really bad. It's looks pretty good spot-on, just like a netbook.
- HDMI works, but you need a dock which is not officially available yet (there is a zPAd dock that can be purchased, overseas).
- 720p/1080p might work, but needs to be encoded a certain way.
- Standard video seems fine, in particular Xvid AVI's.
- There are issues with games, right now. Some work, some don't. Simple as that. EDIT: There is a g-sensor fix that might correct this, in certain mods.
- There's an official app store, but it's not as extensive as the full Google Market.
- Angry Birds works.
- There's no official Flash support, yet (even as of 3/2011). That may change in the future and there are ways to get an unofficial patch (see below).
- To make the device really usable, you need to mod it and will need to be familiar on how to sideload apps. This is my opinion, of course.
The mods are not supported by Viewsonic, so keep that mind!
---------------------------------------------------------------
General information on the different unofficial ROMS available
- Vanilla restore image. This is an attempt by our community to have a restore image in case your device is having issues or you need to wipe any mods off before returning it. It will wipe the system data, but not the user data. For the latter, you'd want to do a factory reset under Settings -- Firmware. The link also has links to the actual firmware updates that TnT Inc. supports.
- zPad v3. This is a port of the zPad ROM to the GTab. Rothnic has spearheaded this effort.
- VEGAn-Tab. This is still a 1.00 beta firmware to port the Advent Vega firmware to the GTab. As of March 2011, it is fairly stable and very usable. The main dev (gojimi) is working on a Gingerbread port.
- TnT Lite v4. This is a streamlined version of the stock firmware. It leaves the status bar and settings area intact, for example - but removes the main TnT homescreen and replaces it with a stock launcher. It also has the same bugs as stock.
- CyanogenMod. This is an early beta so keep that in mind - I would recommend this only for technical users. It is an attempt to port cm to the GTab. Bekit has spearheaded this effort. There are a few recent efforts, mainly for Gingerbread.
Some cm links:
IRC: #tegratab in freenode.
Forum: http://tegratab.com
Complete nvflash restore: http://db.tt/Wm25t7U
CM6.1 (Beta4): http://goo.gl/Z3jaC
3/2011 EDIT: See the development area for more ROMs as there are more than I can review, here. This site has quite literally outgrown this one FAQ I had created.
---------------------------------------------------------------
Known issues
I used clockworkmod via ROM Manager and now I get a "Magic Value Mismatch" Error
AVOID ROM MANAGER, please. As of this writing, it installs a version of clockworkmod that does NOT play nice many of the ROMs we have, and might even have issues with stock ROMs. PLEASE AVOID!!
If you get that "Magic Value Mismatch", you have soft-bricked your device and will need to use the nvflash tool to correct that. See the development area for the nvflash sticky.
Date / Time reset to 1970 after powerdown / reboot
Update your ROM to correct this -- it's a fairly old issue.
GMT +0 after every reboot
This is a known bug with orignal TnT stock and TnT Lite 1.x, which some of us have already called VS about. It's probably somewhere in the TnT Framework. This was fixed with the 11/22 TnT firmware and the subsequent TnT Lite 2.00+. If you are on stock and see this, update your ROM.
Games cannot be played because they are titled by 90 degrees
This is a known bug with stock TnT / TnT Lite. No fix from the vendor, but certain ROMs (like VEGAn and TNT Lite) have a hack for this (care of dev gojimi!)
720p / 1080p h264 video problems
My understanding is that h264 HD playback works, but only to a certain point. Basically, videos encoded in "Main" Profile work, but those with "High" Profile do not. You can use a tool like mediainfo to see how your file in encoded.
I have used the excellent Handbrake application and an iPad profile, changing h.264 to MPEG-4 in the config, and that has worked for me on the device.
MicroSD is not being read by applications
This is a common issue with tablets, and I had seen this on my Pandigital Novel. Some applications are written to only read from /sdcard, which is the internal memory on our device. microSD is /sdcard2. So this is very hit and miss. On the zPAd, they actually map the microSD to /sdcard/sdcard1, which means that apps might be able to find that easier.
EDIT 1/2011: Some of the newer mods have an SDCARD2 fix, but it could cause media files to be deleted. A possible fix (to turn this feature off) is to create an empty file on the root of your microSD and call it ".nomedia". I have not heard of problems with the very latest mods or stock ROM.
There is no Market
Some of the mods do add the Google Android Market, but even so there are very few available apps visible. There is a fairly easy way to get around this, which is documented here: http://forum.xda-developers.com/showthread.php?t=845175
My device went to sleep and now I can't bring it back to life
This is a known issue with stock / TnT Lite 1.x+ -- the only known "fix" I know, other than opening up the device, is to let the battery drain until the device shuts itself off - this should take about 24 hours. Once this happens, you should be able to power it up again and recharge it. Newer ROMs may not have this issue.
Does the device accept 32GB microSD cards?
Yes. I own a 32GB microSD so I can confirm that.
My touch screen is all wonky / I have dead zones
See this post for a possible fix: http://forum.xda-developers.com/showpost.php?p=9774374&postcount=27
Also, try this GUI version (thanks gojimi!) : http://forum.xda-developers.com/showthread.php?t=934500
I have a zPad dock, but my Ethernet port is not working
See this post: http://forum.xda-developers.com/showthread.php?p=10242366#post10242366
---------------------------------------------------------------
Other General Information
Cases / accessories
So far, nothing supported but a few DIY's. We are building out a accessories section here: http://forum.xda-developers.com/forumdisplay.php?f=843
Running a firmware update / restore
All the ROMS use a standard firmware updater that can be used by non-technical users. Here is an explanation on how it works:
There is an "update.zip" file and a recovery foder with a file called "command". To flash your firmware, you place those on the root of your device's /sdcard. So, if your device is your F: drive for example, you should see F:\update.zip and F:\recovery\command.
Then, shutdown the device and boot up by holding the power button and volume up keys simultaneously for a few seconds - once you see the recovery text pop up in the upper left side, you can let go. The update will begin and the device will reboot about a minute later. After the reboot, I would highly recommend doing a device restore as that fixes a lot of issues (Settings -- Security -- Factory Data Reset).
You can also do this on a microSD - you just need to edit the command file and change "SDCARD" to "SDCARD2". For Windows users, don't add a .txt extension on the file as that won't work. The file name needs to be called "command".
The only ROM exceptions are the fully stock ones form Viewsonic / TnT, as I haven't touched those. You can use them in clockworkmod, or get the /recovery/command file from another ROM and then rename the stock ZIP to "update.zip" and combine them.
How to wipe data with Clockworkmod recovery (thanks to short/y for writing this!)
Boot into recovery (i.e. power down the device then power it up again while holding the volume up key) until you get the message that it's booting the recovery image.
Once you see the CWM (i.e. Clockworkmod) text screen, use the volume buttons to scroll down to the entry that says "wipe data/factory reset" (on CWM 2.5.1.2 it's the 3rd entry).
Press the Home key and, on the screen that comes up, scroll down to the line that says "Yes" and hit Home.
Once it's been formatted, return to the previous screen with the Back arrow until you're on the main screen where you can continue the process (flashing or booting).
thanks for putting all this information in one spot! ill be checking this thread when mine comes in tomorrow (was supposed to be today... so much for paying a little extra for expedited shipping.... grrr)
Thats really sad to know that it does not run videos well? I don't want to have to encode
videos to be able to watch on this thing...Not even with the side loaded apps?
Gajun said:
Thats really sad to know that it does not run videos well? I don't want to have to encode
videos to be able to watch on this thing...Not even with the side loaded apps?
Click to expand...
Click to collapse
I've tried several, with similar results. HD playback is very finicky with this device, at least as of this writing.
I have heard people state that h.264 720p works, but I have yet to see this in full 16:9 mode. 2:35 does seem to work. If someone has a file for me to test, I'll certainly download it. I hope that I can be proven wrong, here.
Gajun said:
Thats really sad to know that it does not run videos well? I don't want to have to encode
videos to be able to watch on this thing...Not even with the side loaded apps?
Click to expand...
Click to collapse
My G runs tnt 2.0. I downloaded an AVI and it plays well, but in 2.35 mode only, I couldn't zoom in...
Gajun said:
Thats really sad to know that it does not run videos well? I don't want to have to encode
videos to be able to watch on this thing...Not even with the side loaded apps?
Click to expand...
Click to collapse
Downloaded AVI's and FLV's work just fine with Rockplayer. I play AVI's in Hardware encoding mode, and FLV's with Software encoding mode.
Have you tried Act1 video player? I have used it for over a year on my Adroid phone and it will play pretty much anything. I installed it on the gtab earlier and playback is just as smooth as my computer. Plus it has the option to change aspects to suite the screen. One of the options, Full(stretch to full screen) looks great while playing an avi or any other format on the Tab.
Is it able to do GPS?
I loaded the NHL Game center app fine
But it wont let me watch games due to lack of gps signal
any ideas?
Thanks
sitnlow4life said:
Is it able to do GPS?
I loaded the NHL Game center app fine
But it wont let me watch games due to lack of gps signal
any ideas?
Thanks
Click to expand...
Click to collapse
No GPS on this thing.
sitnlow4life said:
Is it able to do GPS?
I loaded the NHL Game center app fine
But it wont let me watch games due to lack of gps signal
any ideas?
Thanks
Click to expand...
Click to collapse
Use the GPS on your phone via Bluetooth, assuming you have a smart phone
Google voice
No voice but texting works.
Steps I took
on my evo fully installed voice (switched roms recently didn't have it installed)
used Titanium to back up the app
Copied the 3 files to my titanium folder on the g tab
Restored the app
Lauched google voice. Got to where it said configure inbox then went back back back back to exit
inbox popped right up.
YMMV
Quick newbie question.... how to I drag/drop from my computer to the microSD? I'm on TnT lite.
Thanks!
-J
jdnyc said:
Quick newbie question.... how to I drag/drop from my computer to the microSD? I'm on TnT lite.
Thanks!
-J
Click to expand...
Click to collapse
It doesn't work on stock on TnT Lite. It's a bug that I hope VS will fix with their next release (crosses fingers).
roebeet said:
720p / 1080p h264 video problems
My understanding is that h264 HD playback works, but only to a certain point. Basically, videos encoded in "Main" Profile work, but those with "High" Profile do not. You can use a tool like mediainfo to see how your file in encoded.
I have used the excellent Handbrake application and an iPad profile, changing h.264 to MPEG-4 in the config, and that has worked for me on the device.
Click to expand...
Click to collapse
1. There is no iPad profile on handbrake
2. Which player did you use to play your encoded video?
Another newbie question... how do remove the Phone icon from the dock? I've tried a bunch of settings in ADW but can't get it to work.
Thanks!
jdnyc said:
Another newbie question... how do remove the Phone icon from the dock? I've tried a bunch of settings in ADW but can't get it to work.
Thanks!
Click to expand...
Click to collapse
Drag and drop any other icon which you need on top of it.
Thanks for the phone icon tip. One (hopefully) last question for a while. I'm using TnT Lite and have ADW. How do I change the wallpaper on my main screen? I can't find this option either. Really tried to find it but failed.
jdnyc said:
Thanks for the phone icon tip. One (hopefully) last question for a while. I'm using TnT Lite and have ADW. How do I change the wallpaper on my main screen? I can't find this option either. Really tried to find it but failed.
Click to expand...
Click to collapse
Long click on any empty space on your screen and choose wallpaper
Thanks. That wasn't working on my primary screen for some reason but worked on an empty one. k. Used up my stupid question tokens for the day...
artisticcheese said:
1. There is no iPad profile on handbrake
2. Which player did you use to play your encoded video?
Click to expand...
Click to collapse
I have on on the Linux version - my bad that I assumed the same on other versions - is there an updated profile, perhaps?
Thread is under construction.
WARNING: There have been 3 reports so far of failure to boot after installing the Shim HAL. This sort of problem should be assumed possible at this early "Alpha level research project" phase.
Please don't install if you have stock recovery or don't know what recovery is.
Please don't install if you are nervous. Wait a while for the bugs to get worked out and info compiled.
Don't install if not confident in your technical skills.
Don't install if you might freak out if your phone gets disabled for a little while.
For bootloops or to fix or remove: http://forum.xda-developers.com/showpost.php?p=52931431&postcount=67
Post #2 has download links and instructions: http://forum.xda-developers.com/showpost.php?p=52765309&postcount=2
Since interest has ramped up quickly, I've published a 99 cent "donate" version on Play: https://play.google.com/store/apps/details?id=fm.a2d.av (Wait until the $200 placeholder price disappears, LOL.)
I'm not sure "donate" is the right word, but it's the exact same app I'm distributing and will continue to distribute for free (for at least X months to a year ??), so nobody is under any obligation to buy to get the app. Updates will be automatic via Play though.
============================================================
AudioTricks / VolumeTricks is a new kind of "audio mod" that is HAL Shim based.
At present, it can raise or lower output volume and microphone input gains digitally.
Only works on ICS Android 4.0.3 and later. AOSP ROMs such as CM11 or other KitKat very much preferred. Many stock ROMs 4.1-4.3, won't work, especially HTC.
Post 2 has download link and instructions.
Disclaimer: Please understand that this is the first public release of this app. Although I endeavour to make my apps as safe as possible, one never knows whether or not some silly bug or unusual interaction might pop a speaker, headset or whatever. I have over 20 devices that I use for testing my apps and I try to "torture test" as much as possible. So if something goes pop, I'll be very sorry and do everything I can to analyze and fix any problems. If you're "not sure", just wait and more adventurous people will do the early testing needed to help ensure nothing breaks.
By it's very nature, any app that can boost volume creates risk for audio output devices as well as your ears.
For those who know my Spirit FM apps, this is a bit of a move for me. Spirit1 and Spirit2 both are alive and well, but the future of FM radio on Android seems to be dimming the last few years. I'll be splitting my time between apps based on the support I get.
Making this HAL Shim based provides some advantages and disadvantages over other methods of changing volume or gain.
Advantages include:
- Audio modification even for apps, games, etc. that use the low level Android NDK OpenSL ES API.
Disadvantages:
- Analog controls, if available, may be better.
AudioTricks is intended to be my name for a group of small apps, and/or a "master app" that includes the features of them all.
VolumeTricks is the first such small app to be released, and is focused on output volumes and input gains.
VolumeTricks may not be limited to the "HAL Shim" approach to audio mods. It may also include ALSA, ALSA UCM, and other methods to manipulate audio.
At this time, the app is free, but Copyright Me. I'll likely maintain a free version for some time, but I gotta eat too so there will be a paid version on Play when it seems ready.
At this time, this app has been tested mostly on CM11 and a few other AOSP ROMs. Many stock ROMs won't work, especially HTC.
The app is currently set to only work on Android KitKat 4.03+.
I haven't tested ART much yet, mostly Dalvik, but it's working OK on my One M7 w/ ART. Shouldn't be too hard to fix any ART issues.
So what the heck is a "HAL Shim" ??
Android uses HALs (Hardware Adaptation Libraries) as an API between Google's Android code and the phone OEMs hardware specific code. Android Audio has at least 2 HALs, one for "Policy" (selects outputs, inputs and some other stuff) and one for the audio transfers. The HAL Shim in this app works with the latter "Primary" HAL for audio transfers.
A SHIM is a component that sits between 2 other components and pretends to be the higher component as well as the lower component. Hierarchy:
Android AudioFlinger
------------------------
HAL Shim
------------------------
Primary Audio HAL
So, the HAL shim pretends to be an audio HAL to Android's AudioFlinger. AND it pretends to be Android AudioFlinger to the Primary Audio HAL.
The HAL shim acts as an intermediary. It can pass everything back and forth unmodified which makes it invisible. Or it can modify anything passing between, including the audio data.
Isn't there a better way to do this ? No, I don't think so. I don't want to be modifying a bunch of HALs on thousands of ROMs. I also don't want to be modifying AudioFlinger on those same hordes of ROMs.
What else can be done with the HAL Shim concept, besides "Volume Tricks".
I think some of these may be feasible:
- Recording all inputs and/or outputs. Maybe even both sides of phone calls.
- Analyze, Visualize, Equalize, Effects-ize all or many inputs and outputs.
- Bypass DRM.
- Maybe a method to modify (eg. encrypt / decrypt) phone call audio, inbound and outbound; possibly via pretending to be a BT headset....
Note that, at present, the HAL shim only works with the "Primary Audio Interface". Small-ish mods could do the same for HDMI, A2DP / BT, USB Audio, "Remote Submix" and whatever new audio devices Google defines.
Post 2 download link and instructions.
If a boot loop would ruin your day, please see warnings at top of post #1 and don't install this app until more mature.
Disclaimer: Please understand that this is the first public release of this app. Although I endeavour to make my apps as safe as possible, one never knows whether or not some silly bug or unusual interaction might pop a speaker, headset or whatever. I have over 20 devices that I use for testing my apps and I try to "torture test" as much as possible. So if something goes pop, I'll be very sorry and do everything I can to analyze and fix any problems. If you're "not sure", just wait and more adventurous people will do the early testing needed to help ensure nothing breaks.
By it's very nature, any app that can boost volume creates risk for audio output devices as well as your ears.
Android seems to have a ridiculously / hilariously complex audio system... LOL.
v140530: http://d-h.st/2lc#.U4hLA3KBugY
Fixes a LOT of issues, especially SU / mount issues with stock restrictive SELinux like Samsung stock 4.2+.
As always, Press Update/OK to update Shim HAL each new release.
- SU / root fixes, especially for SELinux Samsung 4.2+.
- Fine control removed.
- Coarse control range changed from -60 to +60 db ; now 0 to +36 db. Maybe I'm the only one w/ a need for gain reduction below 1.0 or 0 dB.
- Many other fixes.
Version av-140526:
- Fix the /system/addon.d/ ROM update backup/restore script used during ROM updates.
Version av-140525:
- Automatic gain reduction is now sticky, so reduces distortion when maxed. Touch sliders to reset.
- Numbers for VU.
- After amplification VU display.
- Sliders caiibrated in dB.
May not work on stock ROMs, especially older Android versions and HTC stock ROMs.
Starting this app for the first time should request root and prompt to install the HAL Shim and an addon.d backup/restore script to allow it to survive ROM updates.
After the Shim is installed, the "system_server" is killed in order to activate the Shim. Sometimes it may be better to completely reboot the phone, especially with effects, visualizers and player apps running at install time.
Once the app and Shim are installed, the app shows a "Remove" button that removes the Shim, should it be causing you problems or you just don't want/need it. The button will change to "Update" with newer versions of the app/Shim.
Sometimes, like on ROMs with old Legacy HALs, state detection won't work and the button will only offer to Install with no way to remove. As of v1.0.3 go to the 2nd tab (swipe from right to left) and there is a permanent Remove button.
If you remove the app without removing the Shim, the shim will remain, but should be mostly dormant. The easiest way to remove the Shim would be to reinstall the app and select the Remove button.
To manually remove the Shim and addon.d script, something like this should work from a connected PC with adb shell:
Code:
adb shell
su
mount -o remount,rw /system
ll /system/lib/hw/audio.primary.*.so
# !!!! Note the name of the HAL, like audio.primary.msm8960.so and use this name in next line. (If only audio.primary.default.so exists, use that.)
mv /system/lib/hw/audio.primary.orig.so /system/lib/hw/audio.primary.msm8960.so
rm /system/addon.d/99-audiotricks.sh
mount -o remount,ro /system
reboot
Using the app:
See post #3 for usage instructions.
Usage:
If a boot loop would ruin your day, please see warnings at top of post #1 and don't install this app until more mature.
Disclaimer: Please understand that this is the first public release of this app. Although I endeavour to make my apps as safe as possible, one never knows whether or not some silly bug or unusual interaction might pop a speaker, headset or whatever. I have over 20 devices that I use for testing my apps and I try to "torture test" as much as possible. So if something goes pop, I'll be very sorry and do everything I can to analyze and fix any problems. If you're "not sure", just wait and more adventurous people will do the early testing needed to help ensure nothing breaks.
By it's very nature, any app that can boost volume creates risk for audio output devices as well as your ears.
To select output volume or input gain, swipe left or right or use the tabs. The primary/left screen is for output volume.
Set the enable switch to ON to enable volume/gain adjustments.
The Left and Right indicators are logarithmic/DB audio level indicators, updated every 0.1 seconds with the peak audio level. These show the signal level before amplification. If they are VERY near the full width of the screen, there is little amplification that can be reasonably done. (But 80-90% leaves some room, given the exponential nature.)
For no boost, IE an amplification factor of 1.0, the Coarse and Fine controls should both be set to 0 at centre.
Setting Fine all the way right to +6 dB doubles audio power, setting to -6 dB halves audio power.
Setting Coarse to +30 dB creates an amp factor of 32, assuming Fine is set to 0. Setting -30 dB is about 0.03.
Note that an amp factor of 32 is very high, unless you are dealing with very low input signals.
The Shim detects when the signal will overload, and reduces the amp factor as needed to prevent overload/distortion. To raise it again, use the UI to reset.
There are some "streams" for which amplification will not work. I will support as many stream flags (such as Fast) as I can; remains to be seen; this is still kind of a "research project" at this stage.
At present, all streams are amplified the same amount. Per stream or stream type amp factors will be supported.
Just go to post #11 on next page.
Nothing to see here, move along.
Technical info to fill in later.
Pay no attention...
... to the man behind the curtain...
8 is lucky 7 + 1; even better.
Trouble-shooting info.
#10 is always "Future".
Comments and questions start here.
Volume control?
Hi Mike,
You are making me curious about this new project of you.
I bought a long time ago this app for level control. It is doing his job, but has lack of storing the settings and sometimes still adjust (unwanted) the volume.
Count me in for testing :fingers-crossed:
Edit: get an error parsing the apk :crying:
Rinoceros said:
Hi Mike,
You are making me curious about this new project of you.
I bought a long time ago this app for level control. It is doing his job, but has lack of storing the settings and sometimes still adjust (unwanted) the volume.
Count me in for testing :fingers-crossed:
Edit: get an error parsing the apk :crying:
Click to expand...
Click to collapse
Welcome to my new thread and app.
AFAICT, that app mostly just manipulates standard Android volume levels, which is fine, but not much different than the standard volume control.
I just downloaded my new app linked http://d-h.st/plb myself (7 downloads in first 2 hours now), and it installs fine on my One M7, and matches bit for bit the 1.0 version installed on my test phones.
So you're on stock based InsertCoin ROM ?
As long as it's Android 4.4 KitKat (API Level: 19), it SHOULD parse and install OK.
The binaries are for ARM devices only (ie 99+% of Android devices). Intel x86 or MIPs can't work (at present.)
I can't think of any other reason it won't parse, unless your copy is corrupted. This is the MD5 I get:
Code:
md5sum ~/Downloads/av-release.apk
2c8328e8cbe1f585f3b1634e36200c8f /home/mike/Downloads/av-release.apk
I'm happy to hear anyone else's stories of success or failure, but I'll need a good 7 hours of sleep first.
------------
Happy Victoria Day to all fellow Canadians & CommonWealther's, and Good Long Weekend to all those with a day off of work this Monday. Finally nice weather here lately...
mikereidis said:
I just downloaded my new app linked http://d-h.st/plb myself (7 downloads in first 2 hours now), and it installs fine on my One M7, and matches bit for bit the 1.0 version installed on my test phones.
So you're on stock based InsertCoin ROM ?
As long as it's Android 4.4 KitKat (API Level: 19), it SHOULD parse and install OK.
Click to expand...
Click to collapse
Aha, here might be my problem. My InsertCoin is still the good old JellyBean 4.3 (I am happy with this version and had nearly no problems and all the stuff is working on this one. So if it ain't broke; don't fix it )
The binaries are for ARM devices only (ie 99+% of Android devices). Intel x86 or MIPs can't work (at present.)
I can't think of any other reason it won't parse, unless your copy is corrupted. This is the MD5 I get:
Code:
md5sum ~/Downloads/av-release.apk
2c8328e8cbe1f585f3b1634e36200c8f /home/mike/Downloads/av-release.apk
I'm happy to hear anyone else's stories of success or failure, but I'll need a good 7 hours of sleep first.
Click to expand...
Click to collapse
Got the same MD5: 2C8328E8CBE1F585F3B1634E36200C8F
I am confused or it doesn't work on 4.3
Sleep well!
4.4
Does it work on Android below 4.4?
Can't wait to try it. Your work with Spirit was amazing, so I am sure this is too.
Thanks for the effort, but it ain't working on i9100, cm 11/kk 4.4.2. Tried to increase volume a little (level was about 3, but as you know, first written value is 5), there was a very strange noise as I tried to.increase volume via volume buttons while listening music via headphones. It was a crackling noise, looked to me like the phone is going to get damaged, so I removed HAL and uninstalled your app.
Rinoceros said:
Aha, here might be my problem. My InsertCoin is still the good old JellyBean 4.3 (I am happy with this version and had nearly no problems and all the stuff is working on this one. So if it ain't broke; don't fix it )
Got the same MD5: 2C8328E8CBE1F585F3B1634E36200C8F
I am confused or it doesn't work on 4.3
Sleep well!
Click to expand...
Click to collapse
Here's a v1.0.2 test release that will install on Android 2.2+: http://d-h.st/QfV
Draw Em! said:
Does it work on Android below 4.4?
Click to expand...
Click to collapse
It may. Here's a 2.2+ test release: http://d-h.st/QfV
Chances are lower the lower the Android version. I'd recommend 4.1+, but it may work on some Android 4.0 as well. Android 2.3 GB and older used a "legacy HAL API" which won't work.
At this time it's a "bleading edge" release, and most people comfortable with that have been running 4.4 the last 6 months, I'd think.
pilgrim011 said:
Thanks for the effort, but it ain't working on i9100, cm 11/kk 4.4.2. Tried to increase volume a little (level was about 3, but as you know, first written value is 5), there was a very strange noise as I tried to.increase volume via volume buttons while listening music via headphones. It was a crackling noise, looked to me like the phone is going to get damaged, so I removed HAL and uninstalled your app.
Click to expand...
Click to collapse
It sounds like it was working then, as it does for me on my 9100 with CM11.
In many circumstances audio amplitude will already be maxed out, and trying to increase volume will only result in the automatic gain control kicking in with a different value many times per second, thus leading to distortion and other audio "artifacts".
This solution is more helpful when, for some reason, the audio source material doesn't use the full 16 bits of amplitude. If the VU indicators in the app are showing peaks around 80-90% of the screen width, when the normal volume control is maxed, then amplitude is probably above 16,000 and could be near the absolute peak around 32,000.
For example, some audio may have been recorded that only peaks around 4,000 - 8,000, and for this, and amp factor of 4 may be useful. Another possible solution for this scenario is to enable Compression in DSP Manager or whatever. As with everything, this has pros and cons.
In many circumstances, when possible, it's better to raise analog gain, like Voodoo sound does on the Galaxy S GT-I9000. I'm going to look into this, but this sort of solution is very audio chip dependent.
I recently posted a few different times a query about the following problem in specific developers threads the kernels of whom I had experienced the sams problem. I made a few people frustrated because I didn't let it alone that noone was responding there. I havs come to find that it is the same on any kernel change and furthermore is the same with the stock rooted deodexed rox with stock kernel i am running now.
To save time I am going to paste here and edit from one pf my posts from the other threads....
........
I posted the question a couple of months ago if anyone else was experiencing issues when NOT JUST USING SCREEN MIRRORING, which works just fine for me, but when using screen mirroring & then employ an video streaming app (OTHER THAN YOUTUBE) like NETFLIX or hULU or HBO GO. I am getting an issue where I get sound across the stream but no video except the progress bar and volume controls. otherwise it is black screen. the menus even work fine for selecting a video but once it loads it is black, also if using HULU there is a 5 second video that introduces what series you are watching before the program starts. this will run with video but nothing but black screen +controls when program starts.
Does anyone else experience this after rooting or software modding. I am running as close to stock as I care to n920tuvs4dph2 stock deodexed rooted with stock kernel.
Next I will be reying stock with auto root. But I love some of these kernels out there and I am also inclined to keep a backup of the stock for when I want to mirror and flash kernel when I don't. But a fix would be nice.
I of course lost mirroring altogether when flashing current rom but a single line of build.prop editing rmedied that, but when trying to stream a netflix video ... BLACK.
PLEASE TEST THIS IF YOU HAVE THE TIME!
If you do not have a samsung TV or a Roku on which to test this then I encountered identical problem when trying to stream from a paid service to my laptop when using sidesync. Which I believe most anyone can test.
I would greatly appreciate your feedback on this and remember that all other elements of screen mirroring work fine except this. Alos streaming from You Tube works with video.
This particular feature fail has plagued me during whatever Spears changes i have made
Also please let me know which model phone (mine is Note 5 Tmo) you are using''
Thank you soooo much in advance!!!!
Found an answer HERE I had come across the fix of disabling hdcp in build.prop but didn't know own what it really meant. Basically hdcp is DRM or copyright protection and when you alter your stock software the apps that use hdcp will not function properly. There is no current or expected fix.
Hi,
I am back with one of my builds. Again this is just result of my hobby, feel free to use it, but do it on your own risk. Also any updates will be probably sporadic.
I wanted to publish my build as quickly as possible, becasuse I promised in another thread. So I simply took, what I have (and I am using right now). As a result there some detail I`d like to change for public release like this for the future (e.g. all the special feature enabled by default, the big dmesg buffer). Be careful. I`ll try to do better version as soon as possible. I don`t recomend this for begginers. Be sure you have backup.
This build is based on the official LineageOS code and contains several of my changes. In some cases it could be considered as fix, improvement, but sometimes a hack or even even security risk, so please read carefully following list. All the changes I did because I wanted the system on my device behave that way (at least time to time). Take it or leave it. Please note, that all the features are enabled by default. Be careful.
- built-in root support
- RIL is based on stock KitKat version (works better for me than the official version)
- the sensors libraries are also from stock KitKat (same reason as above )
- barometer sensor is correctly recognized by the system
- the menu button does, what it always did
- notification led brightness can be configured by user
- entering safe mode by holding specific keys during boot can be disabled by setprop persist.safe_mode_disabled true (this has always only annoyed me, but be sure you know you are doing)
- device wakeup by power button can be disabled when proximity and light sensors are blocked (e.g. in a pocket). Execute setprop persist.pwrbtn_proximity_block true
- external sdcard can be made world writeable by setprop persist.world_writable_sdcard true (be careful with this one, this opens a security risk)
- the notification led can blink when the battery is fully charged - enable by setprop persist.blink_when_charged true
- F2FS support
- the notification icons are also on the lock-screen as they ware in
previous Android versions. The carrier name is moved above the clock
(this cannot be turned off)
- the dmesg buffer size is increased to 16M. I set this for debugging
and remove it in next published build.
- ramdisk LZMA compression support
- sdcardfs support - This is faster replacemnt for the FUSE filesystem. I backported this for higher kernel version. Although I`ve been using this for several months without any problem, please consider this experimental. Enable with setprop persist.sys.sdcardfs
force_on
- mount directories for sdcard are protected against writing while the sdcard is not mounted (this solves a race condition problem which allows some apps to create files in there)
- there some other small changes related to my multiboot envrionment, czech translation, carrier name, etc.
Source code
In the installation zip there is a directory code_info with following content:
roomservice.xml - roomservice.xml for the build
commits - list of git repositories and commits used for the build
patches - directory tree with structure reflecting the source and containing
patches for individual projects. The idea (not always followed) is that one patch is one feature,if possible.
code1.diff - all the patches from patches directory together
code2.diff - changes which are not in patches directory
diff-commits.txt - obsolete, I`ll remove this one in the future or maybe use
it again
The only bug I know about is occasional crash of MTP, but I didn`t notice any negative consequences. There may some problem with battery charging (the display turns on time to time without no obvious reason during charging), but it may be some hardware error (bad cable or charger).
Since this is based on official LineageOS, thanks to everyone who contributed to it.
I am using this build for over a week without any problem, except those mentioned above.
Continue here, for the latest build.
UPDATE:
I totally forget about this yesterday - here are the proprietary files I used for this build proprietary-files-ocm13-skk-ril.tgz It is a mixture from the CM 13 official build and KitKat stock files, with modified ks file (then connect symbol is replaced with xonnect, so it doesn`t crash), maybe some other files and changes. I really don`t remember, I put this together during a long period of time. If you find any of your work inside, please accept my apologies and let me know. From my point of view it just works. If you want to apply the patches, then you will most probably want to change the hardcoded full path to these files in device/samsung/i9305/extract-files.sh.
UPDATE:
If you want to use anything from my patches, feel free to do so, just follow the license of the original project.
I tested it for about 4 hours for modem stability, taking the logs. All SAHARA transfers were ok, with no errors and retries. I should have mentioned your name in some post earlier
gongrats and many thanks @p.a.n. Your rom runs very well, its awesome. :good:
Do you mind, if I take your sources or parts of it or some files from your rom.zip for my builds? If I do so, I will mention you and what I took and give you credits.
rodman01 said:
gongrats and many thanks @p.a.n. Your rom runs very well, its awesome. :good:
Do you mind, if I take your sources or parts of it or some files from your rom.zip for my builds? If I do so, I will mention you and what I took and give you credits.
Click to expand...
Click to collapse
Thanks Use whatever you want from it just follow the license of the original project (I updated OP with similar note).
Help??? How to fix gps on this Rom plzz
Great work p.a.n.
Using for 24 hours no problems yet and seems very smooth.
Used it for a few hours with the built-in kernel then switched to Boeffla to get Boeffla Sound etc.
Very nice to have the customisable LED again as it was missing from the official LineageOS.
More importantly for me, the magnetic compass seems to work properly. I couldn't get it to work on official, nor on Rodman's RR.
No issues with GPS for me.
I had to install 'The SELinux Toggler' to set permissive so I could get Viper4Android to work (as with official) but I expected that.
One other thing, the MTP crash is the 'MTP host' app. I just disable this as it's only needed if you need your phone to be an MTP host for something like a digital camera, which I don't. It doesn't affect connections to your PC.
Is there an issue with the automatic execution of init.d scripts? I'm on Boeffla so it may just be that. Luckily you can tell Boeffla app to execute them anyway.
@Glenn2, thanks for testing I am not completely sure about it, but if I remember well, the compass problem is caused by the opensource sensor library (I think that just replacing the/system/lib/hw/sensors.smdk4x12.so with the one from my build should fix that). But the problem is not actually with the compass sensor, that one is ok, but in the opensource version there are missing some "fake" sensors, which provide calculated data based other "real" sensors. One of them provides orientation information, often used in apps as compass. Try some app (e.g. Androsens2) which lists all the sensors and you`ll see the difference - the "fake" ones have iNemo in their name.
I actually don`t care about the MTP crashes. It mostly happens after uninstalling some app, which doesn`t happen too often and otherwise I haven`t noticed any negative related to that. It is just annoying popup for me.
What do you mean by the question about init.d scripts?
p.a.n said:
What do you mean by the question about init.d scripts?
Click to expand...
Click to collapse
I have a couple of scripts and they were not running on boot. I don't know if Boeffla kernel affects busybox. I remedied this by telling the Boeffla Config app to run init.d scripts when it launches.
Also, I had a power manager service wakelock that kept my phone awake for hours, only a reboot cleared it. I had this happen a couple of times on official LineageOS too. Not the famous mdm_hsic_pm0 which now seems to be cured at long last! I had a period of no signal when I was on the London Underground, maybe that was the cause.
Glenn2 said:
I have a couple of scripts and they were not running on boot. I don't know if Boeffla kernel affects busybox. I remedied this by telling the Boeffla Config app to run init.d scripts when it launches.
Click to expand...
Click to collapse
There is /system/etc/init.d/* scripts, which run OK, or at least /system/etc/init.d/00banner does. There is also /system/etc/init.d/90userinit, which executes /data/local/userinit.sh. I remember that seme previous CM version there was also a user defined init.d somewhere in /data. This may what has changed, but I am not if this is your case.
Glenn2 said:
Also, I had a power manager service wakelock that kept my phone awake for hours, only a reboot cleared it.
Click to expand...
Click to collapse
This on is also often on the top of my kernel wakelock list, but never that bad, always with reasonable times.
Glenn2 said:
Not the famous mdm_hsic_pm0 which now seems to be cured at long last!
Click to expand...
Click to collapse
Yes, the solution has been sitting in the Samsung kernel source for a long time ...
Glenn2 said:
Great work p.a.n.
Using for 24 hours no problems yet and seems very smooth.
Used it for a few hours with the built-in kernel then switched to Boeffla to get Boeffla Sound etc.
Very nice to have the customisable LED again as it was missing from the official LineageOS.
More importantly for me, the magnetic compass seems to work properly. I couldn't get it to work on official, nor on Rodman's RR.
No issues with GPS for me.
I had to install 'The SELinux Toggler' to set permissive so I could get Viper4Android to work (as with official) but I expected that.
Click to expand...
Click to collapse
Do you install the last rom ??? Or not
It is worth pointing out that after backing and restoring between roms, the SELinux attributes for efs files can become not correct. That can lead to something like this :
Code:
06-28 04:17:43.705 3799 3799 W ks : type=1400 audit(0.0:30): avc: denied { read } for name="efs1.bin" dev=mmcblk0p11 ino=8200 scontext=u:r:qcks:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
Code:
06-28 04:17:43.712 3799 3799 E kickstart: Requested ID 16, file "/tombstones/qcks/efs1.bin"
06-28 04:17:43.712 3799 3799 E kickstart: ERROR: function: open_file:80 Unable to open input file /tombstones/qcks/efs1.bin. Error 13: Permission denied
It results in not working RIL because of enforced SELinux. Running restorecon fixes the problem.
moad gastro said:
Do you install the last rom ??? Or not
Click to expand...
Click to collapse
I don't know what your question means, as there is only one ROM. I installed from the link in the OP (dated the same date as the OP).
Still using this ROM, and still very few problems.
The day before yesterday it crashed with the screen off. Had to hold power button in to restart.
And yesterday the damn wakelock. It got stuck at a time when I had no signal, and also I used the camera, so either may be relevant. It didn't seem to cause any drastic battery drain though (see images attached). I suppose when the CPU is awake but only at 200MHz and not doing much it uses little more than when it is sleeping?
Regarding init.d scripts. I added one to /system/etc/init.d that simply writes a file to /data when it runs, to test that it DID run. Script starts #!/system/bin/sh
Results:
1) rom with its own kernel - didn't run
2) rom with Boeffla kernel - didn't run
3) rom with Boeffla kernel and Boeffla Config app set to execute init.d scripts itself - did run
One more, just for fun!
Two days ago I was at the Wimbledon tennis, and the location service and/or weather widget decided I was in Boulogne-Billancourt (Paris) instead! I then opened and closed Maps, refreshed the widget and it changed to the correct location!
..
Hi,
I'm trying to install the current build using TWRP 3.0.2-1, but it gets stuck at the "Patching system image unconditionally..." step with the progressbar at around 40%. It's been sitting there for about 10 minutes. Does anyone know how that'd be fixable?`
Cheers
Latest build is ok for me. I've flashed it using TWRP 3.1.0 build from rgib
https://drive.google.com/drive/folders/0B7pwslEEF0l4Yzk2Nm1jOGRDQVU
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
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)
Click to expand...
Click to collapse
InstallationDownload 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.
App keeps asking to update and there is no update
toolhas4degrees said:
App keeps asking to update and there is no update
Click to expand...
Click to collapse
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
Awesome module! Unfortunately, I couldn't get it working. (SM-A725F - Galaxy A72, Android 11)
When doing the test recognition, it says "Ambient Music failed to start". When I try multiple times, it does actually listen, but when it's done listening, it gives me "No response from Ambient Music".
I paid attention to all the steps and fixes, but none of them worked. Tried with LSPosed and Edxposed. Also tried without whitelist and checked, that ambient services has mic permissions.
SkylinesHD said:
Awesome module! Unfortunately, I couldn't get it working. (SM-A725F - Galaxy A72, Android 11)
When doing the test recognition, it says "Ambient Music failed to start". When I try multiple times, it does actually listen, but when it's done listening, it gives me "No response from Ambient Music".
I paid attention to all the steps and fixes, but none of them worked. Tried with LSPosed and Edxposed. Also tried without whitelist and checked, that ambient services has mic permissions.
Click to expand...
Click to collapse
Interesting that it's started listening fine but didn't respond at the end, that suggests that maybe the delay time isn't long enough. Try using it as if it were working, see if it picks up music playing as that doesn't have the same delay limit
Quinny899 said:
Interesting that it's started listening fine but didn't respond at the end, that suggests that maybe the delay time isn't long enough. Try using it as if it were working, see if it picks up music playing as that doesn't have the same delay limit
Click to expand...
Click to collapse
Tried that, didn't work. Couldn't see any addition on my lockscreen, when playing music. My phone starts lagging when turning off or on, as soon as I enabled the recognition on lockscreen.
SkylinesHD said:
Tried that, didn't work. Couldn't see any addition on my lockscreen, when playing music. My phone starts lagging when turning off or on, as soon as I enabled the recognition on lockscreen.
Click to expand...
Click to collapse
You should still get a notification of the song even with the lockscreen overlay disabled
Quinny899 said:
You should still get a notification of the song even with the lockscreen overlay disabled
Click to expand...
Click to collapse
I didn't get any notification of the song.
SkylinesHD said:
I didn't get any notification of the song.
Click to expand...
Click to collapse
Alright then so it's probably not working at all. Can you do a log dump from the app? Instructions are in the FAQ.
This is the dump I got
SkylinesHD said:
This is the dump I got
Click to expand...
Click to collapse
Thanks, that's very useful:
Code:
sound_trigger_platform: platform_get_lsm_usecase: No lsm usecase found for exec_mode 0
is in the logs, suggesting it doesn't like the sound_trigger_platform.xml file, specifically the lsm_usecase bit. Unfortunately the current version of the app fails to zip that right when dumping, so could you do the following please:
- Send the current file in /system/vendor/etc/sound_trigger_platform_info.xml
- Disable the Magisk module in the Magisk app, and reboot
- Send the new file in /system/vendor/etc/sound_trigger_platform_info.xml (this should be different to the first, and be original to your device)
I'll then try to figure out if something else may be required to be added on some devices, or if there's a limitation of the 'magic numbers' in the file I took from the Pixels (in which case it will likely sadly never work).
I'll also fix the dump thing so it zips the xml correctly for the next build.
Cheers!
Quinny899 said:
Thanks, that's very useful:
Code:
sound_trigger_platform: platform_get_lsm_usecase: No lsm usecase found for exec_mode 0
is in the logs, suggesting it doesn't like the sound_trigger_platform.xml file, specifically the lsm_usecase bit. Unfortunately the current version of the app fails to zip that right when dumping, so could you do the following please:
- Send the current file in /system/vendor/etc/sound_trigger_platform_info.xml
- Disable the Magisk module in the Magisk app, and reboot
- Send the new file in /system/vendor/etc/sound_trigger_platform_info.xml (this should be different to the first, and be original to your device)
I'll then try to figure out if something else may be required to be added on some devices, or if there's a limitation of the 'magic numbers' in the file I took from the Pixels (in which case it will likely sadly never work).
I'll also fix the dump thing so it zips the xml correctly for the next build.
Cheers!
Click to expand...
Click to collapse
Got the files, I hope the issue will be fixable. Good luck!
SkylinesHD said:
Got the files, I hope the issue will be fixable. Good luck!
Click to expand...
Click to collapse
Re-enable the module, extract and drop the attached file in /data/adb/modules/AmbientMusicTest/system/vendor/etc/ and reboot, see if that helps
Side note, I really need to change that AmbientMusicTest name
Quinny899 said:
Re-enable the module, extract and drop the attached file in /data/adb/modules/AmbientMusicTest/system/vendor/etc/ and reboot, see if that helps
Side note, I really need to change that AmbientMusicTest name
Click to expand...
Click to collapse
Great, this really works! But now I noticed another problem..
The database is loading for ever when I go on Track list, it also cannot recognize any song.
SkylinesHD said:
Great, this really works! But now I noticed another problem..
The database is loading for ever when I go on Track list, it also cannot recognize any song.
Click to expand...
Click to collapse
It's unlikely to be loading forever, it just takes a long time to load. Leave it for a few minutes and it should load.
Meanwhile, if the module is working now you'll probably want to play with the amplification a bit, test the output with the test playback and fingers crossed it'll start recognising things then.
Quinny899 said:
It's unlikely to be loading forever, it just takes a long time to load. Leave it for a few minutes and it should load.
Meanwhile, if the module is working now you'll probably want to play with the amplification a bit, test the output with the test playback and fingers crossed it'll start recognising things then.
Click to expand...
Click to collapse
The output is perfect, I left it loading for about ~2-3 mins., I'll try again. Hopefully it'll work.
SkylinesHD said:
The output is perfect, I left it loading for about ~2-3 mins., I'll try again. Hopefully it'll work.
Click to expand...
Click to collapse
If it still doesn't load after like 5 minutes (there's also a progress bar that should show progress) after restarting the app, what region are you in? I've previously tested the database parsing with en_GB and en_US and it was working fine but maybe it's broken for another one
Quinny899 said:
If it still doesn't load after like 5 minutes (there's also a progress bar that should show progress) after restarting the app, what region are you in? I've previously tested the database parsing with en_GB and en_US and it was working fine but maybe it's broken for another one
Click to expand...
Click to collapse
I'm located in germany (probably something like de_DE)
There is a progress bar, but it doesn't show me a progess. It's just like.. loading
On miui 12.5 I think my Problem is that I can't grant the App access to the microphone.
McFlypants said:
On miui 12.5 I think my Problem is that I can't grant the App access to the microphone.
Click to expand...
Click to collapse
Tap the microphone prompt in Ambient Music, you have to grant it manually via the app info (not sure why Google didn't just implement a prompt like everyone else does). I have also found that sometimes when you've just granted it access it doesn't immediately respond to test recognition, if you find it still sits loading after that then kill Ambient Music via the recents, reopen it via Ambient Music Mod, return to Ambient Music Mod and try running the recognition again.