[APP] [8.0+] Dolby Atmos™ Axon 7 Oreo port 20180125

guitardedhero

Senior Member
Jan 17, 2012
7,941
24,077
0
39
Little Rock


Dolby Atmos™
for
Android Oreo



Description:
  • Dolby Atmos™ Digital Signal Processer with effects and Graphic User Interface ported from the latest ZTE™ Axon 7 Android Oreo firmware.
  • Dolby Atmos™ sound effects applied to media audio output supporting various media players.
  • MiFavor Music Player from the same firmware included only because of its Settings option to directly launch Dolby Atmos™ for testing purposes such as the possibility of additional features and/or other unique functionality.
  • Flexible custom recovery installation archive supporting Magisk and SuperSU installations including the options to install directly to /system for Magisk users and to install to /su for SuperSU¹ users. ¹ Experimental


Details:
  • A minimum of SDK 26 (Android 8.0) is required for installation to begin, else Exit 1 will abort the recovery installation activity.
  • Magisk users are provided the option of installing directly to /system instead of creating a Magisk module using the included arise_parameters.prop.
  • SuperSU users with the systemless root solution are provided the option of creating a SU module instead of installing directly to /system. This is similar to Magisk module installations and is a great alternative for those with insufficient /system space to accommodate a /system installation among other benefits Magisk users enjoy.
    • arise_parameters.prop may be extracted from the installation archive, placed directly into root of internal storage (e.g. /sdcard/arise_parameters.prop), and edited (details and instructions inside prop file) before installing the archive in recovery.
    • arise_parameters.prop (with no options active) will be automatically placed in the root of internal storage if not already present during the installation in recovery.
  • SuperSU users and Magisk users instructing a /system installation via a prepared /sdcard/arise_parameters.prop are encouraged to confirm a minimum of 100MB of /system space is available before beginning installation in recovery.
  • Magisk users performing the default Magisk module installation and SuperSU users performing the optional systemless installation will require 100MB more than the minimum available /data space acceptable (usually 500MB, 500MB + 100MB = 600MB).
  • Permissive SELinux Mode is currently required and will be set automatically each device boot. Do not install archive if this is not acceptable.
  • Third party audio effects and DSP's such as https://forum.xda-developers.com/showpost.php?p=75262097&postcount=201 ViPER4Android (<--
    link to @docnok63's solution :highfive:)
    may require some extra effort to allow processing due to Dolby Atmos' dependency on its output_session_processing music effect.


Instructions:
  • Performing a backup of the /system partition in recovery is encouraged for users other than Magisk users receiving the default installation in recovery:

    • TWRP > Backup > Check System > Edit name, if desired > Swipe to perform backup operation
  • Confirm device requirements are met and installation results are acceptable.
  • Confirm an escape route is available in the event of unsuccessful device boot or unsatisfactory experience.
  • Confirm successful download and location of downloaded archive(s).
  • Boot to recovery > Install > *.zip > Swipe to perform installation operation > Advanced > Copy Log > Reboot
  • Updating procedure is no different unless specified otherwise.


Additional Information:

  • Escape routes for unsuccessful/unsatisfactory installations:
    • Magisk Module Installation:
      • If booted, navigate to /magisk using a capable file manager application and delete /dolbyatmos before rebooting the device. If experiencing an unsuccessful device boot, boot to recovery using the appropriate hardware button combination for the device, install the Magisk Recovery Management archive attached below, and follow the given instructions to delete the Magisk module (/magisk/dolbyatmos).
    • SuperSU/Magisk /system installations:
      • Restore Backup in recovery if available: TWRP > Restore > appropriate backup folder > Check System > Swipe to perform Restore operation
      • Install the currently installed rom zip in recovery without any partition wipes or install a different rom zip according to the rom developer's installation instructions.

  • Reporting bugs/failures:
    • An acceptable report will include the /sdcard/recovery.log received after the installation session before booting from recovery even if the recovery session appeared to be free from any error. An acceptable report will include relevant information/details to equip me to efficiently address the report.

  • Auditing:
    • Assessing the installation is encouraged for all users and is especially helpful when the collected information is included in reports of less than perfect experiences.
    • Dumpsys:
      • The dumpsys utility in Android can be a very valuable troubleshooting tool, especially audio output processing related issues, when targeting the audioflinger service. Recommended terminal application's include Terminal Emulator for Android and Termux.
      • In Android Terminal:
        Code:
        su
        dumpsys media.audio_flinger
        OR
        Code:
        su -c dumpsys media.audio_flinger
      • The output generated upon tapping the Enter key is the information of interest and can be copied from the Terminal and pasted with a report, if necessary.
      • This output includes the list of successfully configured audio sound effect libraries and any successfully created effect-chains from one or more of those libraries when combined with the successful installation of an appropriate apk, Dolby Atmos being one of many examples.
    • Logging:
      • The log utility in Android is another valuable tool for many various purposes, including troubleshooting. This utility is most convenient when used with a logging application such as Matlog in order to utilize features such as word filtering and syntax highlighting among others.
      • Using the logging application's search feature, the user can filter the displayed log output using words or characters relevant to this Dolby Atmos™ port such as: dolby, dax, dlb, dseffect and include that relevant log output with reports, if necessary.


  • Testing:
    • The possibility of my experience being different from others' experiences is always present! Those meeting the installation requirements may certainly test against various aspects stated as facts within this OP such as compatibility with other audio effects, functionality in Enforcing SELinux Mode, etc.


  • Vulnerabilities:
    • The installation, as with any device content, is not immune to impact from existing and future installations of custom content. This custom content may remove or modify necessary content, or introduce conflicting content preventing Dolby Atmos™ from functioning as intended by this mod's installation. Security measures can block these scenarios from occuring but will typically be implemented only after the discovery of such cases of "breaking" Dolby Atmos™ functionality, in which case, the relevant vulnerability will be omitted from this particular section.
    • Audio Modification Library (ver: ? - 2.9):
      • Scenarios: The AML 2.9 Magisk module has been found to remove a necessary audio effects configuration entry upon every device boot, if found by AML's detection mechanics targeting content to eradicate. This vulnerability for the Dolby Atmos™ system exists in every installation method if AML 2.9 is installed.
      • Solutions: Until this vulnerability is no longer exploited by the AML 2.9 Magisk module, the appropriate AML uninstallation procedure must be performed to restore Dolby Atmos ™ functionality. Fortunately, this vulnerability can be addressed quickly due to the active development of AML in addition to existing and active communication with AML authors.is currently being accommodated by the AML authors and should no longer present an issue with the next AML update. Props to the AML guys for focusing on securing a complimentary experience with this single package. :good:


Downloads:


Changelog:

  • Code:
    [B]20180125 -[/B]
    
    - Adjustment to Xposed detection.

    Code:
    [B]20180124-1 -[/B]
    
    - Unique atmos library and effect
    UUID to accommodate native Dolby
    effects.
    
    [B]20180124 -[/B]
    
    - Adjustment to Magisk variables with
    existing audio effects configurations.
    
    [B]20180122-2 -[/B]
    
    - Mount magisk.img with Magisk's
    util_functions.sh if initial mount
    attempt was unsuccessful.
    
    [B]20180122-1 -[/B]
    
    - Correction to audio effects
    configuration manipulation.
    
    [B]20180122 -[/B]
    
    - Correction of introduced errors.
    
    [B]20180121 -[/B]
    
    - Extensive adjustments to installation script.
    
    - Addressed Pixel, Samsung, /su module, and
    general installations.
    
    - Removed previously bundled music player.
    
    - Beginning of DolbyAtmos.apk customization
    and experimentation.
    
    [B]20180120-1 -[/B]
    
    - Conservative shift of boot scripts.
    
    [B]20180120 -[/B]
    
    - Various and discriminate installation
    and boot script adjustments.
    
    [B]20180119-3 -[/B]
    
    - Third time's the charm??
    
    [B]20180119-2 -[/B]
    
    - Yet another correction to boot script.
    
    [B]20180119-1 -[/B]
    
    - Correction to boot script.
    
    [B]20180119 -[/B]
    
    - Extensive adjustments to systemless
    module creation and boot script.
    
    - Removed build properties.
    
    - Default installations intended to
    accommodate HTC devices.
    
    [B]20180117-1 -[/B]
    
    - Correction to
    /odm/etc/audio_policy_configuration.xml
    symlink.
    
    [B]20180117 -[/B]
    
    - Various script corrections.
    
    - Recovery Management zip now supports
    SuperSU's /data/su.img and is now included
    in the Dolby Atmos zip for convenient access.
    
    
    
    [B]20180114-4 -[/B]
    
    - More script corrections.
    
    
    
    [B]20180114-3 -[/B]
    
    - Script error correction.
    
    
    
    [B]20180114-2 -[/B]
    
    - Further script changes.
    
    
    
    [B]20180114-1 -[/B]
    
    - Adjustment to supported .prop detection.
    
    - Removed experimental /*_contexts patches.
    
    - Various script changes.
    
    
    
    [B]20180114 -[/B]
    
    - Corrected Magisk module installation.
    
    - Added systemless installation option
    for SuperSU users (/su/dolbyatmos).
    
    - Updated /sdcard/arise_parameters.prop
    (will overwrite the no longer supported .prop).
    
    - Various script changes.
    
    
    
    [B]20180112-2 -[/B]
    
    - Added missing setprop section
    to script in /system installations.
    
    
    
    [B]20180112-1 -[/B]
    
    - Added two library dependencies
    to accommodate devices without
    either library. (@Zackptg5)
    
    - Adjustment to vendor partition
    audio effects configuration
    detection. (@Zackptg5)
    
    - Added Xposed alert describing
    potential conflict and potential resolution
    of Dolby Atmos functionality. (@MMWolverine)
    
    - Added /system free space detection,
    resolution methods, and installation exit
    for /system installations destined to fail due
    to insufficient space to accommodate the
    Dolby Atmos system.
    
    Massive shout out to the many users
    responsible for the current success rate
    enjoyed by this Dolby Atmos Oreo solution!
    
    :highfive:
    
    
    
    [B]20180112 -[/B]
    
    - Updated Magisk module.prop to 1530
    
    
    
    [B]20180112 -[/B]
    - Updated Magisk module.prop to 1530
    
    
    
    [B]Initial Release -[/B]
    -
 

Attachments

Last edited:

guitardedhero

Senior Member
Jan 17, 2012
7,941
24,077
0
39
Little Rock
Dos this work on the 5T also ?
I have successfully tested both Magisk module and /system installations (Magisk, not SuperSU) on the OnePlus 5 Open Beta 3 during the past seven days or so.

Testing elsewhere has been very minimal and unsuccessful, however, the installation script has continued to improve significantly since the most recent unsuccessful report, and is nearly perfect for the time being.

A successful and compatible installation absolutely hinges upon /system/bin/audioserver (introduced to Android devices with Nougat) of the device. This discovery was made last year when I ported the very first Nougat Dolby Atmos system, which ironically, was from the Axon 7 device as well.

This binary service is crucial to the current Dolby Atmos systems used in Nougat and now Oreo in their native environment. However, this file has completely different dependencies in Oreo than it does in Nougat thanks to the drastic changes to the audio framework in Android 8.0, and still more changes in Android 8.1.

Furthermore, it is not uncommon for /system/bin/audioserver to exist in several forms for a device in the various custom rom's available, so the rom currently installed on the device can play a critical role, although stock firmware seems to always have the better chance, at least for last year's Axon 7 Nougat Dolby Atmos port. For development purposes and efficiency, I only run stock firmware on my device.

When upgrading firmware or changing rom's, pay special attention to /system/bin/audioserver, as any change may allow a successful installation for a device achieving only unsuccessful installations previously. Typically, these unsuccessful installations result with device boot failure due to the media.dolby_memoryservice audioserver overwriting the existing audioserver on the device.

There is no way around this audioserver dependency, but we can certainly learn as much as we can by building a database of device audioservers with two groups:

Successful

Unsuccessful

I was able to determine audioserver compatibility accurately for Nougat, and the same should be possible for Oreo, although using different mechanics, I imagine.

I'll add a link to my Drive where users can upload a successful/unsuccessful audioserver to the relevant folder some time today. :good:
 

guitardedhero

Senior Member
Jan 17, 2012
7,941
24,077
0
39
Little Rock
Two questions:

is this independent of the "audio tuner" comming with OOS 5.0.1 or is this a replacement?
Does it work with BT connected headphones?
Fantastic questions! :highfive:

#1:
Embarrassingly, I completely forgot to check Audio Tuner (Dirac) while testing headset output for Dolby processing a few days ago.

It will be a day or so before I am able to test your inquiry as I am currently "in the doghouse" with my wife (AKA friend's couch), but I would be very surprised if Audio Tuner was negatively affected in any way by this Dolby Atmos installation.

Dirac is typically quite persistent in informing the user of any conflicts and I know for certain that Dirac has not complained once, at least in my usage this week.

#2:
Unfortunately, by not possessing a pair of Bluetooth headphones, I have no way of testing your inquiry. However, my audio sessions are almost exclusively Bluetooth output into a Sony SRS-X88 speaker system and I can confirm success. :good:
 
Last edited:

MMWolverine

Inactive Recognized Contributor
Sep 12, 2012
1,953
4,504
153
Hi,

Atmos GUI force closes for me on OOS 5.0.1 with Magisk 15.3. Flashed in codeworkx and blu_spark TWRP recovery. Logs attached.

Previously I was using Ainur Sauron MK II and your Dolby/V4A Oreo ports from the A.R.I.S.E. forum. Everything was working alongside the Dirac Audio Tuner. Of course I uninstalled those mods before flashing this new port.
 

Attachments

  • Like
Reactions: guitardedhero

guitardedhero

Senior Member
Jan 17, 2012
7,941
24,077
0
39
Little Rock
Hi,

Atmos GUI force closes for me on OOS 5.0.1 with Magisk 15.3. Flashed in codeworkx and blu_spark TWRP recovery. Logs attached.

Previously I was using Ainur Sauron MK II and your Dolby/V4A Oreo ports from the A.R.I.S.E. forum. Everything was working alongside the Dirac Audio Tuner. Of course I uninstalled those mods before flashing this new port.
Thank you very much for the report and included information! :good:

It seems the sound effect libraries may not be properly configured to allow the apk to function properly.

Would you mind providing the output generated from following the Dumpsys procedure detailed in the Auditing section of the OP?

Thanks again! :good:
 

MMWolverine

Inactive Recognized Contributor
Sep 12, 2012
1,953
4,504
153
Thank you very much for the report and included information! :good:

It seems the sound effect libraries may not be properly configured to allow the apk to function properly.

Would you mind providing the output generated from following the Dumpsys procedure detailed in the Auditing section of the OP?

Thanks again! :good:
Dumpsys attached, hope that helps. ;)
 

Attachments

  • Like
Reactions: guitardedhero

guitardedhero

Senior Member
Jan 17, 2012
7,941
24,077
0
39
Little Rock
Dumpsys attached, hope that helps. ;)
This absolutely helped and did, indeed, confirm my suspicion of an audio effect configuration issue. :good:

The dumpsys output confirms that a vendor audio effects configuration is sourced, so our next step is to examine any audio effects configurations existing in /system/vendor/etc (anything similar to audio_effects.conf, including audio_effects.xml).

Be sure to also confirm the presence of /system/(lib&lib64)/soundfx/(libswdap.so&libswvlldp.so)
:good:
 
Last edited:

docnok63

Senior Member
Nov 22, 2012
2,145
2,552
203
Memphis, TN
@guitardedhero You know I had to try this ASAP! I'm on OOS 5.0.1, Flash kernel 2.15.1, Magisk 15.3, codeworkx recovery. @ahrion and @Zackptg5 's V4A installed through Magisk Manager, and this mod. It installed flawlessly and I haven't had any crashes like others are reporting. Atmos sound amazing and was sorely missed. I just wish AM3D worked with our device. The only think I noticed is that that notification can't be swiped away nor does it launch the app. No biggie.

Strong work!!! :highfive: :cool:

EDIT: @bormo - I just verified this works in conjunction with Audio Tuner (Dirac) ...screen added
 

Attachments

Last edited:
  • Like
Reactions: guitardedhero

MMWolverine

Inactive Recognized Contributor
Sep 12, 2012
1,953
4,504
153
Seems the cause of the crashes in my case is Xposed. After I uninstalled it, Dolby is operating well. :good: Would like to have both, though. :D

P.S.
Re-installed Xposed with a cache wipe, no Dolby fc. I'll report if anything changes.
 
Last edited:
  • Like
Reactions: guitardedhero

Zackptg5

Recognized Developer
Sep 18, 2014
4,061
6,618
263
zackptg5.com
@guitardedhero

Stuck on the boot animation on my nexus 5x. I'm on latest stock 8.1 AOSP with magisk 15.3. I attached the logcat and it looks like the problem is related to audioserver. It's saying that:
Code:
library "libradioservice.so" not found
The lib is not present on my device so is it another dependency from the rom you ported dolby from? Thanks
 

Attachments

  • Like
Reactions: guitardedhero

guitardedhero

Senior Member
Jan 17, 2012
7,941
24,077
0
39
Little Rock
Absolutely fantastic reports reports, guys! :highfive:

These initial hours are providing substantial insight and forward progress, much more than I anticipated when deciding to limit visibility to this single device's forum section. :good:
@docnok63, congratulations on the very first successful installation besides me on the non-native device! The confirmation of unrestricted Audio Tuner functionality is crucial for our device, in my opinion, especially if using this section for exposure, so thank you for the quick confirmation. The matter of most importance to me has been compatibility with other third-party effects, specifically ViPER4Android. Are you able to assess this compatibility? Thanks again for the help getting a Dolby Atmos solution to the Oreo users! :good:
@MMWolverine, great job targeting your conflict so quickly! I observed the Xposed mentions in your long but was not going to address it until confirming a successful installation of all Dolby Atmos content and configurations. Having not been an Xposed user for a very long time, can you suggest an effective way to determine an existing Oreo Xposed installation by the presence of content installed to the device belonging to Xposed? Thanks again for such quick reports! :good:
@Zackptg5, what are the odds of three consecutive reports providing crucial and completely different reports of 100% relevant information lol? The libradioservice.so library exists natively on my device and the dependency of it is likely only noticed if unavailable. I have studied every bit of the Dolby Atmos apk and do not recall any mention of it whatsoever, so your report is incredibly valuable to me and possibly will not be the last unless this is a "missing link", doubtful as this would all prove to have been far too easy lol! I am incorporating libradioservice.so into the default installation, overwriting the native libraries if present, until reports warrant testing a custom installation when not already present. Everything is ready to archive, just waiting on an appropriate Xposed detection before wrapping it up. :good:
 

guitardedhero

Senior Member
Jan 17, 2012
7,941
24,077
0
39
Little Rock
@guitardedhero

Stuck on the boot animation on my nexus 5x. I'm on latest stock 8.1 AOSP with magisk 15.3. I attached the logcat and it looks like the problem is related to audioserver. It's saying that:
Code:
library "libradioservice.so" not found
The lib is not present on my device so is it another dependency from the rom you ported dolby from? Thanks
I am about to get started replacing a water heater and do not want to keep you waiting. Attached below are the two libraries native to the Dolby Atmos system with additional extensions to be supported by XDA's attachment system. I will not insult your intelligence by instructing the necessary procedure to incorporate them into your existing installation except that these are NOT vendor libraries lol. :good:
 

Attachments

  • Like
Reactions: Zackptg5

Zackptg5

Recognized Developer
Sep 18, 2014
4,061
6,618
263
zackptg5.com
I am about to get started replacing a water heater and do not want to keep you waiting. Attached below are the two libraries native to the Dolby Atmos system with additional extensions to be supported by XDA's attachment system. I will not insult your intelligence by instructing the necessary procedure to incorporate them into your existing installation except that these are NOT vendor libraries lol. :good:
Haha, it's all good :)
So now it's saying that libradio.so library isn't found. You wouldn't happen to have a copy of that with you? I have a feeling this may go on for a while lol
 
  • Like
Reactions: guitardedhero