2

I recently decompiled a apk. I extracted the source code. But when i try to run it in Eclipse, I m getting Label Missing Error. Here is my code snippet: (Errors are written as comments)

private void changeRadioComponentEnabled(Context paramContext, String paramString, boolean paramBoolean1, boolean paramBoolean2)
  {
    ContentResolver localContentResolver = paramContext.getContentResolver();
    int i;
    boolean bool;
    if (paramBoolean1)
    {
      i = 0;
      Settings.System.putInt(localContentResolver, "airplane_mode_on", i);
      Settings.System.putString(paramContext.getContentResolver(), "airplane_mode_radios", paramString);
      Intent localIntent = new Intent("android.intent.action.AIRPLANE_MODE");
      bool = false;
     if (!paramBoolean1)
        break label92;     //The label92 is missing

         label52: localIntent.putExtra("state", bool);
      paramContext.sendBroadcast(localIntent);
      if (!paramBoolean2)
        break label98;     //The label92 is missing      
      Settings.System.putString(paramContext.getContentResolver(), "airplane_mode_radios", "cell,bluetooth,wifi,nfc");
    }
    label92: label98: 
    while (paramString.indexOf("cell") != 0)
    {
      return;
      i = 1;               //Unreachable Code
      break;
      bool = true;
      break label52;
    }

    Settings.System.putString(paramContext.getContentResolver(), "airplane_mode_radios", "cell");
  }

How can I resolve this issue? Is it the Decompiler problem which has messed up with the code? I referred different solutions in the website but no luck.

Thanks and Regards

trueblue
  • 306
  • 1
  • 5
  • 17
  • What is the reason of Down-Voting?? – trueblue Sep 23 '13 at 09:33
  • 1
    You are asking for someone to divine the original source code based on nothing but the invalid output from a decompiler. You are doomed. – Mike Strobel Sep 26 '13 at 14:05
  • That's fine @MikeStrobel. Its your thinking. I corrected the error by myself. I was looking for some decompiling issues. Was checking if anyone else got their Decompiler generated wrong Labels. – trueblue Sep 27 '13 at 12:14
  • 1
    have you corrected those errors? if yes so please share your knowledge here for visitors & learners,because i think decompilation is the part of programming – Sun Oct 08 '13 at 12:36
  • Yes @AbrahimNeil. The problem was with the jd-gui.exe program. Whenever I tried to decompile the classes and tried to Save all sources, some unknown labels used to appear in the code. But before saving, i observed that such labels were not there in the code which is displayed in the jd-gui. So instead of Save all sources option, i just went for copying and pasting the code from jd-gui to a text file and saving as .java. It was very strange and silly. – trueblue Oct 10 '13 at 05:45
  • @trueblue i have also tried with jdgui but it still does not show proper labels – Maverick Mar 16 '14 at 10:32

0 Answers0