FORUMS
Remove All Ads from XDA

[GUIDE] Remove DSEE-HX Restrictions and enable it on any music app

1,550 posts
Thanks Meter: 5,941
 
Post Reply Email Thread
DISCLAIMER: DSEE-HX will only work on apps which supports the Sony Hi-Res Audio API, in time just Sony Music and Poweramp (with own buffering, and slightly buggy) support it.

I also try now to find all relations to Sony Hi-Res Audio API, here u get more infos: http://forum.xda-developers.com/show...8&postcount=13


I think it annoyed every user that we ever had to use Sony Music to get the magic of DSEE-HX. With this guide I remove this restriction.


The guide will include:
  1. Decompiling
  2. Modifiying Smali
  3. Recompiling

Before u start: I am not responsible for any brick of your phone or soundenhancement


Part 1: Decompile

I use an very easy tool to recompile and decompile apps Tickle My Android

Install it how @Ticklefish describe it on his thread

Get the SoundEnhancement.apk file out of your System

The way how to get the file with ADB:
Code:
adb pull /system/app/SoundEnhancement/SoundEnhancement.apk C:/%WhereEverUWantToCopyIt%
U also can copy it to your phone SDCard and then copy it on ur PC


Push the SoundEnhancement APK to the _in directory on TickleMyAndroid (u find them on the WorkSpaces folders in TickleMyAndroid folder)

Now open TickleMyAndroid.exe, go to Theming Menu/Decompile and Select SoundEnhancement.apk

É voila, we finished decompiling


Part 2: Modify Smali

Now on your Workspace appeared a folder called _working, navigate to it and u will see a folder called SoundEnhancement.apk

From there u navigate to smali/com/sonyericsson/soundenhancement/ and open the file MorePreferenceFragment.smali

Go to line 334, the lines u will see should look like this:
Code:
    .line 451
    iget-object v4, p0, Lcom/sonyericsson/soundenhancement/MorePreferenceFragment;->mService:Lcom/sonyericsson/soundenhancement/audioeffect/AudioEffectService;

    invoke-interface {v4}, Lcom/sonyericsson/soundenhancement/audioeffect/AudioEffectService;->isDseeHxGlobalSetting()Z

    move-result v4

    if-nez v4, :cond_3

    const-string v4, "com.sonyericsson.music"

    iget-object v5, p0, Lcom/sonyericsson/soundenhancement/MorePreferenceFragment;->mPackageName:Ljava/lang/String;

    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_3

    .line 452
    const v4, 0x7f040006

    invoke-virtual {p0, v4}, Lcom/sonyericsson/soundenhancement/MorePreferenceFragment;->addPreferencesFromResource(I)V

    .line 453
    const-string v4, "dsee_hx"
Now remove the lines which i marked red:

Code:
    .line 451
    iget-object v4, p0, Lcom/sonyericsson/soundenhancement/MorePreferenceFragment;->mService:Lcom/sonyericsson/soundenhancement/audioeffect/AudioEffectService;

    invoke-interface {v4}, Lcom/sonyericsson/soundenhancement/audioeffect/AudioEffectService;->isDseeHxGlobalSetting()Z

    move-result v4

    if-nez v4, :cond_3

    const-string v4, "com.sonyericsson.music"

    iget-object v5, p0, Lcom/sonyericsson/soundenhancement/MorePreferenceFragment;->mPackageName:Ljava/lang/String;

    invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-eqz v4, :cond_3

    .line 452
    const v4, 0x7f040006

    invoke-virtual {p0, v4}, Lcom/sonyericsson/soundenhancement/MorePreferenceFragment;->addPreferencesFromResource(I)V

    .line 453
    const-string v4, "dsee_hx"
At the end it should look like this:

Code:
    .line 451
    iget-object v4, p0, Lcom/sonyericsson/soundenhancement/MorePreferenceFragment;->mService:Lcom/sonyericsson/soundenhancement/audioeffect/AudioEffectService;

    invoke-interface {v4}, Lcom/sonyericsson/soundenhancement/audioeffect/AudioEffectService;->isDseeHxGlobalSetting()Z

    move-result v4

    .line 452
    const v4, 0x7f040006

    invoke-virtual {p0, v4}, Lcom/sonyericsson/soundenhancement/MorePreferenceFragment;->addPreferencesFromResource(I)V

    .line 453
    const-string v4, "dsee_hx"
Finished Smali editing

Part 3: Recompile

Open again TickleMyAndroid.exe and navigate to Theming Menu -> Recompile Apps -> Recompile with Original Signature (HIGHLY RECOMMENDED) and click on SoundEnhancement.apk and wait the compilation time.

When it's finished u will find in your workspace a folder called _out and there is the SoundEnhancement.apk again, but without App Check for DSEE-HX

Push it back to your system and reboot


Finished, you successfully disabled the App Check for DSEE-HX


I hope this could help


Credits:
@Ticklefish for TickleMyAndroid
Team Project Desire
Team Harmonics Symphonium
RXS Moonbreakers
9th Circle of Development
and that I had today nothing to do so I decided to look on smali codes :P
The Following 33 Users Say Thank You to PDesire For This Useful Post: [ View ]
16th August 2016, 12:40 AM |#2  
Nice guide.

Just to let you know that you don't need to use adb to pull the file before copying it to your _in folder. If you're using TMA, you can use the "Pull Any File From Any Location" option in the Pull Menu instead.

Sent from my Sony Xperia Z3 Compact using XDA Labs
The Following 6 Users Say Thank You to Ticklefish For This Useful Post: [ View ] Gift Ticklefish Ad-Free
16th August 2016, 06:55 AM |#3  
SnoopyOne's Avatar
Senior Member
Flag Kaohsiung City
Thanks Meter: 65
 
More
@PDesire Great guide! And I was thinking about if there's a way to remove the ''whole restriction'' and make it ''globally'' just like HTC.
Because some apps didn't use the Sound effect like YouTube.
16th August 2016, 10:14 AM |#4  
PDesire's Avatar
OP Recognized Developer / Recognized Contributor
Flag Frankfurt am Main
Thanks Meter: 5,941
 
Donate to Me
More
Quote:
Originally Posted by SnoopyOne

@PDesire Great guide! And I was thinking about if there's a way to remove the ''whole restriction'' and make it ''globally'' just like HTC.
Because some apps didn't use the Sound effect like YouTube.

That would require hard modifications because DSEE-HX is so routed that it works only with the Sony Hi Res Audio API which is placed into audioflinger


Your PDesire
The Following User Says Thank You to PDesire For This Useful Post: [ View ]
16th August 2016, 12:30 PM |#5  
SnoopyOne's Avatar
Senior Member
Flag Kaohsiung City
Thanks Meter: 65
 
More
Quote:
Originally Posted by PDesire

That would require hard modifications because DSEE-HX is so routed that it works only with the Sony Hi Res Audio API which is placed into audioflinger


Your PDesire

I know it may be hard and it's impossible to had DSEE-HX to all apps,my wish is to remove the restriction to get SoundEnhancement effect(without DSEE-HX) to all apps.
16th August 2016, 01:08 PM |#6  
timlu85's Avatar
Junior Member
Flag Taipei
Thanks Meter: 13
 
More
@PDesire awesome guide !!!
BTW Smali on Lollipop have be little different but roughly the same thx ^^
18th August 2016, 12:45 AM |#7  
jimRnor's Avatar
Senior Member
Flag Sarawak
Thanks Meter: 3,127
 
Donate to Me
More
Nice guide ma8!!
18th August 2016, 08:00 AM |#8  
M.Ned's Avatar
Senior Member
Thanks Meter: 13
 
More
I use Poweramp and it uses Sony Hi-Res API already. Why would you need to do this if it already uses it?
18th August 2016, 03:23 PM |#9  
Member
Flag Binhduong
Thanks Meter: 16
 
More
Quote:
Originally Posted by M.Ned

I use Poweramp and it uses Sony Hi-Res API already. Why would you need to do this if it already uses it?

I think Hi-res in PowerAmp just make it available to decode and play true Hi-res music file.About DSEE-HX, it " converts both compressed sound and CD-quality sound (uncompressed or lossless 44.1kHz/16bit) to near Hi-Res quality sound by recreating higher frequency signals and finer signals ( sampling frequency up to 96kHz and bit depth up to 24bit" ( explained by Sony)
The Following User Says Thank You to H.Khanh For This Useful Post: [ View ] Gift H.Khanh Ad-Free
18th August 2016, 06:52 PM |#10  
PDesire's Avatar
OP Recognized Developer / Recognized Contributor
Flag Frankfurt am Main
Thanks Meter: 5,941
 
Donate to Me
More
Quote:
Originally Posted by M.Ned

I use Poweramp and it uses Sony Hi-Res API already. Why would you need to do this if it already uses it?

It uses it yes it's right but Sony Sound Enhancement but u just could use it on Sony Music. Now u can use it on ANY player which uses the Sony Hi Res Audio API (On poweramp it has some bugs but i can tell it works with some workarounds)


Your PDesire
19th August 2016, 06:19 AM |#11  
Member
Flag Binhduong
Thanks Meter: 16
 
More
Not working with Soundenhancement.apk in z5 MM
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes