[Guide] Fix USSD In CyanogenMod 12.1

Fix USSD In CM 12.1

A short and sweet guide to permanently fix USSD Bug for all networks in all CM 12.1 and CM 12.1 Based ROM For MTK.

Note : First of all Thanks to Aniruddha Adhikary for fixing USSD and Pawan Diyal

Do not copy any content, re-blog, re-post, duplicate this post and/or anything from this site at all.
This post was written by Ajit Guraya at www.mtkroms.com


Download : USSD Fix
Download : Modded APKTOOL

Steps - 
Replace file from USSD Fix (Which you downloaded) to "telephony_common.jar" of the ROM which you are using Now

- Decompile telephony_common.jar of CM 12.1/CM 12.1 Based ROM and telephony_common.jar which you just downloded
- Now open 
telephony_common.jar>com>android>internal>telephony>gsm> 
- Now delete GSMphone.smali and copy GSMPhone.smali from telephony_common which you just downloaded
- Paste GSMphones.smali in the same folder
- Recompile
- Push to /system/framework/
- Reboot to recovery
- Wipe cache and data (this is a must)

To decompile :
- Double click on Command Prompt.bat after extracting apktool you download from above
- Open telephony_common.jar (which you downloaded) using WinRAR
- Copy classes.dex and paste in apktool folder (download apktool from above)
- Use the following command to decompile it :
java -jar baksmali.jar -o classout/ classes.dex
- You will get a new folder called "classout" rename it to "classout1"
- Now open telephony_common.jar (of the ROM you are using) using WinRAR
- Copy classes.dex and paste in apktool folder (download apktool from above)
- Use the following command to decompile it :
java -jar baksmali.jar -o classout/ classes.dex
- Now follow the above Steps -
- To recompile use :
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
- You will get a new file called new-classes.dex rename it to "classes.dex" without ""
- Now open telephony_common.jar (of the ROM you are using) using WinRAR
- Delete classes.dex present there and paste the new classes.dex there
- Now follow the above Steps - once you have recompiled it.


Enjoy !
[Guide] Fix USSD In CyanogenMod 12.1 [Guide] Fix USSD In CyanogenMod 12.1 Reviewed by MTK Hacker Pro on 7:12 PM Rating: 5

27 comments:

  1. Bro .... can you tell how to fix launcher so that apps show up without reboot in cm12.1 beta 6

    ReplyDelete
  2. where i put this command.. >????????????

    ReplyDelete
  3. Sorry for asking, but where i put the command? i tried to cd on cmd to reach the folder of apktool but it doesnt work and if i use the apktool.jar the command is not valid.

    ReplyDelete
    Replies
    1. in apktool folder in am empty space press shift+right click and select open connad window here

      Delete
    2. Ok, thanks for that, but the command you say to use, the download you gave dont have a baksmali.jar , only have a aapt.exe, apktool.bat and apktool.jar . And once again, thanks for helping me

      Delete
    3. umm, I was sure I added them, but I will reupload another one with baskmali and smali

      Delete
  4. Ok, thanks so much. This ROMs and Guides are so good. You are the best :)

    ReplyDelete
  5. i think how about u make a flashable zip
    for this fix

    ReplyDelete
    Replies
    1. different CM 12.1/CM 12.1 Based ROMs (versions) have different telephony_common.jar, so if you flash telephony_common.jar of one CM in another version/cm based ROM there will be phone, network crashes

      Delete
    2. so should i try to put my stock telephony there

      Delete
    3. for your information : the post you are commenting on is a full standalone guide with the step by step process and yet you decide to ask silly questions ?

      Delete
    4. ok sry then if u don't like also thanks for ur help

      Delete
  6. i'm porting rom for my phone so i having only 2 bug headphone not detecting & ussd not working that's why i asked

    ReplyDelete
  7. Sir i encountered error in cmd " 'java' is not recognized as an internal or external command' "

    ReplyDelete
  8. Even after i applied this USSD guide still it says "Mobile network not available".
    when i tried *#*#4636#*#* it shows gsm service Emergency calls only..

    plss help.
    i m using cm 12.1 in my micromax canvas nitro a310

    ReplyDelete
    Replies
    1. use new CM 12.1 v2.2 for Nitro A310, it's in this site only

      Delete
  9. can u provide the link for the same

    ReplyDelete
    Replies
    1. http://www.mtkroms.com/2016/01/latest-stable-cyanogenmod-12.1-micromax-a311-a310.html

      Delete
    2. I tried Everything you provided same as per your guide line still my mobile network is not available..
      could not call and text any one ..
      only internet is working for few carrier.
      plss help
      i also installed cm 12.1 v 2.2 still nothing good happened

      Delete
  10. thanks, this post will be updated with the new apktool

    ReplyDelete
  11. thanks, this post will be updated with the new apktool

    ReplyDelete
  12. i tried that bt after flashing rom shows unfortunately process.android.phone stopped and also message.stopped ...help me dear

    ReplyDelete

Powered by Blogger.