yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Themes and Apps] tarobun:
Most ROM have a slightly different version of Phone.apk so it's best to modify the one that came with your ROM.

Having said that, the fix is very simple (just changing a 1 to a 0) so you could hex-edit the apk/odex directly... how good is your hex editing skills?

To make the changes via hex editing, do the following:

For odex ROMs:

Download the Phone.odex file

Open in hex editor

Search for the bytes: 32 84 2F 00 12 13 (there should be only 1 match)

Change the last byte to 03

Save and upload Phone.odex to /system/app

Reboot

For dexodex ROMs:

Download the Phone.apk file

Extract the classes.dex file (unzip Phone.apk classes.dex)

Open in hex editor

Search for the bytes: 32 84 2F 00 12 13 (there should be only 1 match)

Change the last byte to 03

Save and add classes.dex back to apk (zip Phone.apk classes.dex)

Upload Phone.apk to /system/app

Reboot

Otherwise upload your Phone.apk and I'll make the change for u.
[Galaxy S II Themes and Apps] AznImport:
I tried editing the phone.apk file using the HEX Editor. When placing the modified Phone.apk back into the system/app folder and rebooting, the phone has no service. Not sure what I did wrong. I have uploaded my original Phone.apk file from CheckRom V4's Rom for your attention. Thanks!! (I also tried de-compiling the Phone.apk file and editing the script using APK Manager...same result: "No Service")
[Galaxy S II Themes and Apps] tarobun:
Ok - I've hex edited your Phone.apk. Try pushing this to /system/app... if it doesn't work try to wipe the dalvik cache and failing that - post your logcat.
[Galaxy S II Themes and Apps] AznImport:
So I tried your Hex Edited Phone.apk...unfortunately it still does not work...still shows the network being down. As for the LogCat, I am a complete newb on how to read/collect data from Logcat...I installed "aLogcat" from the market but I am not sure what info is relevant to post... Am I on the right track? How will I be able to pinpoint the issue to post? Thanks again for all your time =)
[Galaxy S II Themes and Apps] tarobun:
@AznImport

Here's an signed update.zip to apply in recovery. This will delete the existing dalvik-cache for Phone.apk as well as updating the Phone.apk in /system/app

This will ensure that the old classes.dex is deleted and that the Phone.apk is updated cleanly, ie. while not in use.

To get the logcat you'll need to install adb and then use the 'adb logcat' command to get the logcat.
[Galaxy S II Themes and Apps] blurblah:
just to be sure, I just need to change it to 32 84 2F 00 12 03 ?

Do I need to do any special steps b4 i copy back to replace the original Phone.apk? I tried your method and oso got the same results, mms.apk failed, force closed and no reception.

EDIT: I managed to upload the hex-edited Phone.apk into /system/app and reboot. The NR is still on during a call, so is the echo...
[Galaxy S II Themes and Apps] tarobun:
Yes that's correct, just change it to 32 84 2F 00 12 03.

Can you try putting your phone in flight mode first before replacing the Phone.apk?

Also clear the dalvik-cache if it doesn't work.

Thx.
[Galaxy S II Themes and Apps] AznImport:
Thanks for all the instructions....just want to let you know that even with airplane mode enabled and phone.apk transfered to the phone, im still getting no service (i also tried your update.zip) ...ill try getting a logcat later in the day...thanks :)
[Galaxy S II Themes and Apps] AznImport:
I tried a phone.apk that disables noise reduction from the start...unfortunately the echo is still present (and again only at the beginning of the call)...if possible..can you take a look at the phone.apk file i have posted?? Thanks.
[Galaxy S II Themes and Apps] ctomgee:
It's been noted that it doesn't work on the first call after the phone is rebooted, but WILL work on all following calls until the phone is rebooted again. Have you tried another call?
[Galaxy S II Themes and Apps] AznImport:
yes ive tried many calls...as a matter of fact, i believe the phone.apk file that i posted works even from the first call..the noise reduction is automatically turned off and can be turned back on..for me, the noise reduction only kicks in after 2-3 seconds in the conversation...anyone own a otterbox commuter case that can confirm this problem?
[Galaxy S II Themes and Apps] Dauntless:
Rom: Androidmeda 4.4.7 (is deodexed)

Kernel: UltimateKernel 2.3

Baseband: KI4

I tried doing what you said, but everything just FC'd and I couldn't get a connection.

Here's exactly what I did:

- Put phone in flight mode

- Connnect to usb

- adb pull system/apk/Phone.apk Phone.apk

- unzip Phone.apk classes.dex

- Edit file (had only 1 match, changed 13 to 3)

- adb remount

- adb push Phone.apk system/apk/Phone.apk

- adb reboot

Since it FC's, I'm guessing the dalvik cache isn't using the old version. Or could that still help? Did I do something else wrong?
[Galaxy S II Themes and Apps] ctomgee:
Did you change it to 3, or 03? This is hexadecimal - leading zeroes matter.
[Galaxy S II Themes and Apps] Dauntless:
Changed it to 03 (sorry, should have been clearer)
[Galaxy S II Themes and Apps] kokoskokis544:
I have an otterbox, im running cm and i dont have this problem. I never had this problem even with stock roms...however a friend of mine with otterbox had it and as soon as she removed it the echo was gone
[Galaxy S II Themes and Apps] AznImport:
I see..makes me wonder if this issue is rom/modem/kernal related...would you be able to post your modem/kernal?? Thanks
[Galaxy S II Themes and Apps] tarobun:
Ok my bad. Looks like deodex file needs extra step to fix checksum error (my odex rom didn't complain though).

Fyi, here's the error from the logcat:

E/dalvikvm( 2884): ERROR: bad checksum (3bae80c0, expected 457f80d0)

5a) Search for the checksum bytes: D0 80 7F 45 (should start from the 9th byte)

5b) Change to new checksum: C0 80 AE 3B
[Galaxy S II Themes and Apps] Dauntless:
I cant find that checksum. I've attached my Phone.apk. Would you mind taking a look?

- edit -

I'm flashing another rom since I can't even find the GUI option to enable/disable NR in my current one. I'll try again myself with the Phone.apk from my new CheckRom rom.
[Galaxy S II Themes and Apps] Dauntless:
-- double post --

My post didn't show up so I tried again. Then both appeared
[Galaxy S II Themes and Apps] EQUANT:
Will this fix work for 2.3.5 BVKJ4 version?

Btw, in my case, the echo on the other line is present only when i keep the phone in it's rubber protective cover. Once i remove the cover or disable NR echo goes away.
[Galaxy S II Themes and Apps] hahaboy:
i try to use apk manager to extract and compile but i cant do it...

i hope you can help me

, this NR really annoying.

i tried to use apk manager to extract it, but i dont know how to compile it back, and i get unsignAPK
[Galaxy S II Themes and Apps] tarobun:
Guys, there's too many versions of Phone.apk for me to fix them all. :)

I've updated the instructions so that they will work correctly for you now so try to do them yourself. If you don't know how to use Apkmanager or apktool then I'd suggest you need to do some searching. :)
[Galaxy S II Themes and Apps] hahaboy:
how to zip back to apk ?
[Galaxy S II Themes and Apps] tarobun:
zip Phone.apk classes.dex
[Galaxy S II Themes and Apps] blurblah:
I tried to copy the FixDEXChecksum.jar code from your link but it wont run. Says corrupted Jarfile.

Could you paste your FixDEXChecksum.jar here so that I can use it to fix the Checksum of the classes.dex? Hopefully this would solve the problem once and for all..

Thanks so much for the works so far!
[Galaxy S II Themes and Apps] tarobun:
What errors are you getting? I downloaded the FixDEXChecksum.jar file again to check and it works fine.

%:> unzip -t FixDEXChecksum.jar
Archive: FixDEXChecksum.jar
testing: META-INF/ OK
testing: META-INF/MANIFEST.MF OK
testing: FixDEXChecksum.class OK
No errors detected in compressed data of FixDEXChecksum.jar.

I'm not sure which jar file you're using,... just download the attachment from the post. No need to use the code in the link, it's just there if you want to know how it works.
[Galaxy S II Themes and Apps] hahaboy:
the apk file extraced to folder. then i i make it back to apk ?

when i try to use fixdexchecksum , error like my screen captured
[Galaxy S II Themes and Apps] tarobun:
File not found... you misspelled 'classess.dex', should be 'classes.dex'
[Galaxy S II Themes and Apps] hahaboy:
thanks, done.

now i got the classes.dex in the phone.apk folder, how i zip it back to apk ? using winrar ?

---------- Post added at 01:02 PM ---------- Previous post was at 12:13 PM ----------

after googling , i use winrar to zip it back. finally IT WORKS LIKE CHARMS !!!!!

thanks tarobun !!!

i got no problem with 1st call or 2nd calll now
[Galaxy S II Themes and Apps] blurblah:
Thanks a lot tarobun, I also managed to finally get it all working. Its NR off by default on my first call so far!

No more irritating echo too...brillant!
[Galaxy S II Themes and Apps] fraser82:
hi, i have open and modyfied the phone.odex file. when i try to upload to the system/app folder i receive this error:

java.io.filenotfoundexception:/system/app/phone.odex (read only file system)

how i can upload it?

thanks
[Galaxy S II Themes and Apps] tarobun:
adb remount
[Galaxy S II Themes and Apps] athulag:
Thanks tarobun. Your odex instructions worked like a charm
[Galaxy S II Themes and Apps] fraser82:
hi, i have modyfied the phone.odex file and i have placed it into the system/app folder, overwriting the stock file but the echo is still present.

i have upload the file, can you control if this file is corret?

thanks a lot

Francesco

PS for upload the file into the system/app i have root the phone and whit the root explorer i have made the folder in read/write mode and than i have copied the phone.odex file into the app folder, overwriting the stock file
[Galaxy S II Themes and Apps] tarobun:
I had a quick look and it looks like you've made the right change, although I did get 2 errors while decompiling your odex (not sure if that matters).

You can easily tell if the change is successful by looking for the noise suppression icon when you're in a call - it's the icon on the left of the Hold button and looks like a noise graph.

If you use the original odex, you will see it immediately when you connect to another person. The new odex will not have this icon when you connect, but you can turn it on by using the menu during the call.

If the echo is still present with the icon off then your phone might have other problems causing the echo.
[Galaxy S II Themes and Apps] yabadabadooo:
is it possible that the line 32 84 2F 00 12 13 doesnt exist in every phone.apk?

edit: the phone.apk is from cm7

on cynogen the tweak doesnt work, right?
[Galaxy S II Themes and Apps] tarobun:
that's correct
[Galaxy S II Themes and Apps] croperas:
Hi,

I followed this thread and tried all fixes mentioned, but none work... :(

I even commented or deleted every line line that mentions NOISE and still no go.

During the calls i can see noise reduction is on....

Please Help.
[Galaxy S II Themes and Apps] croperas:
Anyone, anyone at all ?? :(
[Galaxy S II Themes and Apps] Galactus:
If anyone could make a version with noise cancellation off permanently for XILA2 I'd be extremely greatful :D
[Galaxy S II Themes and Apps] alf69mi:
Noise reduction disabled on odexed stock rom XWKI4,

seems to be working , echo disappeared also with a problematic tpu case on.

Making a call, noise reduction is now disabled by default.

just a tip,

when you copy back the edited Phone.odex to /system/app

remember to change back owner/group to root root and permissions on file to rw-r--r-- (644)

then reboot

Brillant, thankyou!
[Galaxy S II Themes and Apps] Galactus:
Edit: Wrong thread
[Galaxy S II Themes and Apps] croperas:
Didn't work for me on a deodexed rom....
[Galaxy S II Themes and Apps] tarobun:
Post your Phone.apk/Phone.odex and tell me which ROM you're using.
[Galaxy S II Themes and Apps] croperas:
Just upgraded to CheckROM RevoHD V6.

Here it is.

Thanks
[Galaxy S II Themes and Apps] tarobun:
Looks like it's a XWLA4 based rom. Applied hex patch as I outlined earlier and tested with CheckROM RevoHD™ V6. Works fine.
[Galaxy S II Themes and Apps] croperas:
I replaced the file and it seems that the noise reduction tab completely disappeared, so i must ask is this how it should look? did you delete the resources.arsc file before compiling? because it has the same effect of making the noise reduction tab disappear...

Also can you tell me which hex editor did you use?
[Galaxy S II Themes and Apps] tarobun:
In some (most?) roms, you can turn on and off the noise reduction during a phone call by using the menu button - menu option is called "Noise Reduction On/Off". With the noise reduction "on" the icon is shown, when it is "off" the icon disappears.

The reason I said "some roms" is because I couldn't see that option in the CheckROM RevoHD™ V6.

You can only change the noise reduction during a phone call, not while dialling or ringing. Although you can turn it on/off during the call, it will not remember the state... it will always start "off" (the original Phone.apk will always start "on").

And no, I didn't delete anything. Just changed a 1 ("on") to a 0 ("off"). The smaller apk size is due to the compression of the classes.dex.

I used the hex editor 0xED for Mac OSX.
[Galaxy S II Themes and Apps] croperas:
Thanks a lot for your help :)
[Galaxy S II Themes and Apps] Jrhoop:
tarobun - many thanks for your work on this. Tested and it works. My only mistake was trying to edit the hex file for the phone.apk instead of the phone.odex file. Duhhhh!
[Galaxy S II Themes and Apps] alf69mi:
Hello tarobun,

just installed stock ICS XXLPQ , and in new Phone.odex i'm unable to find string 32 84 2F 00 12 13 .

Would it be possible to fix ICS Phone.odex?

Thanks
[Galaxy S II Themes and Apps] Stink:
You can activate the noise suppression in my dialer?

Here is the link above to post, thanks in advance!
[Galaxy S II Themes and Apps] diavolo_78:
Hello and thank you for your edit . I would also change the file phone will ask you some info I have is phone.odex the file , the file phone.apk with the green phone icon ... which of these files should I change ? Ginger is the rom 2.3.6 . KK2 poland .

Once changed just plug it in / system / app and overwrite the original after backing up ?
[Galaxy S II Themes and Apps] firero:
update for ics 4.0.3

for ICS 4.0.3 you will have to search for 10 01 22 00 D6 and replace 10 with 20

smali :

.method private onPhoneStateChanged(Landroid/os/AsyncResult;)V

...

invoke-static {v0, v1, v1}, Lcom/android/phone/PhoneUtils;->turnOnNoiseSuppression(Landroid/content/Context;ZZ)V

second parameter has to be modified to v2:

invoke-static {v0, v2, v1}, Lcom/android/phone/PhoneUtils;->turnOnNoiseSuppression(Landroid/content/Context;ZZ)V
[Galaxy S II Themes and Apps] bazzag:
FYI...If you want an echo-free ROM go for CM9, as it doesn't have NR implemented yet, hopefully never.
[Galaxy S II Themes and Apps] ctomgee:
Or, you could follow these directions (http://xdaforums.com/showthread.php?t=1441510). If it works, then you can use whatever ROM you want, with or without NR.

I did this, and now with NR defaulted on and a case on the phone, no echo.

I used to have a modded phone with NR defaulted off, but I decided that one of the features of this phone that I paid for was NR, so I wanted it working.
[Galaxy S II Themes and Apps] x625:
hello tarobun

I really appreciate you if you can update your string value for ICS odex roms because after I updated to ICS again suffer from this problem and don't want to use some physical way to open my phone and the code don't exist on official ICS roms

thank you so much
[Galaxy S II Themes and Apps] tarobun:
The answer has already been provided by firero :)

But search for just 10 01 22 00 and change first byte from 10 to 20.
[Galaxy S II Themes and Apps] x625:
Worked finally ICS !!!

excellent work! outstanding!!

thank you so much !

according to firero post I searched 10 01 22 00 D6 before and found nothing .

but after I search only 10 01 22 00 I finally found It .and I found there is a D5 in end of string not D6.

thank you again man. you are my savior!
[Galaxy S II Themes and Apps] diavolo_78:
Hello , I too would like to make the change ... but I did not understand the steps to do .

you describe step by step ?

---------- Post added at 11:32 PM ---------- Previous post was at 11:30 PM ----------

Hello , I too would like to make the change ... but I did not understand the steps to do .

you describe step by step ? Then I wanted to ask in this way, the noise reduction is disabled by default , but you can activate the menu ?
[Galaxy S II Themes and Apps] diavolo_78:
hello,

someone could make a guide to make this change ?

I can not do that I did not understand the steps to do .

I installed everything on the pc , sdk , jdk , apktool and I downloaded apk file manager, notepad + + ... now I have to do ?

please help me ...............
[Galaxy S II Themes and Apps] x625:
for ICS rom:

hello diavolo

this is the steps already mentioned in this topic to how set default noise reductions OFF in phone calls. dont need to disable it each time in each phone calls. you can use http://www.mediafire.com/?dbwgi2dded8bt7a for Hex editing and take attention to always backup your original files . read this topic from beginning and you will get it. if didn't get it then say what is your exact problem
[Galaxy S II Themes and Apps] diavolo_78:
my problem is that I do not know where to find the bytes 10 01 22 00 to change, and where is smali
[Galaxy S II Themes and Apps] x625:
steps mentioned in this topic dont need to work with smali. you dont need it .

just in Hex editor search menu set the database type to hex-value and serch for the 10 01 22 00 in all directions for the phone.odex file of ICS roms.
[Galaxy S II Themes and Apps] x625:
hello again,

I used the way in post 74 for GB stock rom and post 131 for official ICS rom it worked good.

but for some reason I came back again to latest GB 2.3.6 UHLB2 but deodexed by wanam(stock rom). Again have trouble:

1. the string 32 84 2F 00 12 13 not exist in classes.dex (extracted from phone.apk)

2. I extracted classes.dex with winrar from phone.apk but dont know how to Save and add classes.dex back to phone.apk?? (I mean how to repack new phone.apk with new classes.dex with winrar??)

please guide me how could it be done

thanks in advance
[Galaxy S II Themes and Apps] paradoxsm:
Sorry to Hijack an old thread but I've been trying to solve this horrible issue since getting the phone. It's ether open it up and remove the second mic (killing the speakerphone) or just giving up and getting another phone.

Tarobun your posts have been of great help to at least TRY to fix this!

I tried hex editing the phone.apk (and following the java checksum) on my deodexed rom but it seems to have done nothing. Testing by simple means of calling another number, playing speech through the bottom mic and any sound at the top mic still affects it horribly.

Android 2.3.6, BB I9100XXKI4, Siyah 2.6.35.14-DarkKnight v2.3+

I never had the option on mine when in call to turn the noise suppression off, a friend has a stock device with carrier branded firmware and has both an in-call option and the squiggly icon present.

I have two phone.apk's that are supposed to work with this rom, neither give me the in-call option. One has "record", the other has "add call"

I did also try to copy across the Phone.apk, Phone_Util.apk, PhoneCrashNotifier.apk, PhoneErrService.apk from a RomKitchen rom that DID have the option to no avail.

What I did find curious was when I DID install the RomKitchen ROM (which drank battery) and subsequently ODIN'd the official carrier branded firmware that my device came with back on it, the noise suppression option was still present. Once I'd done a full hardware reset however, it was once again gone so there must be some other hidden setting that enables the presence of the selectable noise cancelling user interface.

I would attach the files but I can see only valid extensions but no upload button, might be because I'm "new" even though I registered when this site was dedicated to my HTC Wallaby (Qtek 1010)
[Galaxy S II Themes and Apps] vegitamaster66:
Hi... i read all posts here, but really i'm not developer and don't understad very well the steps, i put my phone.apk from a Deodexed Custom Rom (GOATRIP) for galaxy note, can fix noise reduction off and send me back plz? :D:D:D

i wish write this post in galaxy note forum, that have the same error of noise reduction off, but in note really cant find the problem, only a mod for stock rom in gingebread :(, can anybody help me with this problem?
[Galaxy S II Themes and Apps] Ocean2k:
ics 4.0.3 noise reduction

just tryed with no luck, cant find the strings in the phone.odex file.

can someone make it for me please.

b.t.w i'm on stock with root

its phone.odex but rename to apk for upload

View attachment Phone.apk
[Galaxy S II Themes and Apps] inclement_weather:
Hi,

I've got a Galaxy Note on ICS with stock ROM (4.0.3) and have looked for 10 01 22 00 in phone.odex however I can't find that hex string.

I can find 2 instances of 10 01 22 10 but none of 10 01 22 00.

Can anyone let me know if the phone.odex for the Note is different and if so what string to change for this file ?

Thanks,

Inclement
[Galaxy S II Themes and Apps] alextranced:
This fix really worked well with 4.0.3 , unfortunately since I upgraded to 4.0.4 the phone app freezes using this method so I guess this doesn't work anymore. Does anyone have any ideas for 4.0.4? Thx.
[Galaxy S II Themes and Apps] alextranced:
bump
[Galaxy S II Themes and Apps] leon0602:
The only way that works to get off the damn echo!! thanks a lot :good::good::good:
[Galaxy S II Themes and Apps] gygy:
doesn't work with 4.0.4 germany ROM

Does anyone know a solution for 4.0.4 ?
[Galaxy S II Themes and Apps] gygy:
bump

bump
[AT&T Samsung Galaxy S II SGH-I777] Rodocopz:
Hi guys,

I've owned android phones since the G1, motocliq, nexus, sgs2 (intl), motodroid, all rooted, custom rom, etc etc... So when a friend asked me to unlock (for which i had to root) his i777 I thought I could handle it.

I followed the guide: http://xdaforums.com/showthread.php?t=1286220

Went into download mode (could only do it with the VOL+-USB trick) and flashed CWM on Odin. Flashed fine, no problem, rebooted and only showed SAMSUNG letters on the bootup, nothing more. Tried going into CWM Recovery, no luck, Download mode, works fine. So I went over and re-flashed it, worked, but still can't get it to boot, or Recovery to work.

So then I started trying to flash other PDA's thinking i could do it, and maybe cwm was bugged, every time I try to flash ANYTHING that's not that specific CWM it says Write error, FAILED. When i reboot, the phone is softbricked (computer-phone logo saying connect recovery on kies). After this nothing at all will flash, except that CWM, which gives me download mode again... Which doesnt matter because the softbrick screen is a download mode in itself.

Im running out of options, im not sure where I should keep looking, Heimdall, installed, tried to flash, it transfers, at 99% says error writing and cancels. Tried flashing a new .pit and repartitioning, same story, wont let me.

Any suggestions would be more than welcomed :/

Sincerely,

Rodo
[AT&T Samsung Galaxy S II SGH-I777] penguin356:
See if you can go back to out of box:

http://galaxys2root.com/att-galaxy-s2/how-to-unroot-att-galaxy-s2-sgh-i777/
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Use my return-to-stock packages from dev forum.
[AT&T Samsung Galaxy S II SGH-I777] Rodocopz:
Hi Entropy, I've tried but I can't seem to find an Odin flashable .tar, they're all CWM flashes and my CWM is screwed.

> http://xdaforums.com/showthread.php?t=1289460
[AT&T Samsung Galaxy S II SGH-I777] Rodocopz:
Oh and I tried flashing http://xdaforums.com/showthread.php?t=1286432 with heimdall too. write error