2016-02-25 218 views
0

最近,我从我的计算机上卸载的Android Studio和它抹去我所有的项目文件,幸运的是我还是从最近的版本有一个APK,并能够正确地反编译代码。我所有的文件都在那里,我可以通过记事本看到java类的代码,但它看起来像代码中的一些东西发生了变化。当我将项目导入Android Studio时他们会改回吗?这是我主要活动的一个例子。反编译代码更改代码

public class MainActivity 
    extends AppCompatActivity 
{ 
    private static final String TAG = MainActivity.class.getName(); 
    private static final String hasUserRatedAppKey = "hasUserRatedApp"; 
    private static final String settingsKey = "MyAppSettings"; 
    private String SENDER_ID = "993190397898"; 
    private CustomAdapter adapter; 
    Fragment fragment; 
    private DrawerLayout mDrawerLayout; 
    private ListView mDrawerList; 
    private CharSequence mDrawerTitle; 
    private ActionBarDrawerToggle mDrawerToggle; 
    private CharSequence mTitle; 
    String[] menutitles; 
    private List<RowItem> rowItems; 

    private void selectItem(int paramInt) 
    { 
    switch (paramInt) 
    { 
    } 
    for (;;) 
    { 
     this.mDrawerList.setItemChecked(paramInt, true); 
     setTitle("Converjz"); 
     this.mDrawerLayout.closeDrawer(this.mDrawerList); 
     return; 
     startActivity(new Intent(this, MainActivity.class)); 
     finish(); 
     continue; 
     startActivity(new Intent(this, Time.class)); 
     finish(); 
     continue; 
     startActivity(new Intent(this, Temperature.class)); 
     finish(); 
     continue; 
     startActivity(new Intent(this, Weight.class)); 
     finish(); 
     continue; 
     startActivity(new Intent(this, Length.class)); 
     finish(); 
     continue; 
     startActivity(new Intent(this, Money.class)); 
     finish(); 
     continue; 
     startActivity(new Intent(this, Metric.class)); 
     finish(); 
     continue; 
     startActivity(new Intent(this, Food.class)); 
     finish(); 
     continue; 
     startActivity(new Intent(this, Data.class)); 
     finish(); 
     continue; 
     startActivity(new Intent(this, Frequency.class)); 
     finish(); 
     continue; 
     startActivity(new Intent(this, Numeral.class)); 
     finish(); 
    } 
    } 

    public void onConfigurationChanged(Configuration paramConfiguration) 
    { 
    super.onConfigurationChanged(paramConfiguration); 
    this.mDrawerToggle.onConfigurationChanged(paramConfiguration); 
    } 

    protected void onCreate(Bundle paramBundle) 
    { 
    super.onCreate(paramBundle); 
    setContentView(2130968609); 
    paramBundle = ((AnalyticsTracker)getApplication()).getTracker(AnalyticsTracker.TrackerName.APP_TRACKER); 
    paramBundle.enableAdvertisingIdCollection(true); 
    paramBundle.setScreenName("Home"); 
    paramBundle.send(new HitBuilders.AppViewBuilder().build()); 
    this.menutitles = getResources().getStringArray(2131558424); 
    this.mDrawerLayout = ((DrawerLayout)findViewById(2131689566)); 
    this.mDrawerList = ((ListView)findViewById(2131689573)); 
    this.mDrawerList.setAdapter(new ArrayAdapter(this, 2130968608, 2131689522, this.menutitles)); 
    paramBundle = getTitle(); 
    this.mDrawerTitle = paramBundle; 
    this.mTitle = paramBundle; 
    this.mDrawerList.setOnItemClickListener(new DrawerItemClickListener(null)); 
    this.mDrawerToggle = new ActionBarDrawerToggle(this, this.mDrawerLayout, 2131230781, 2131230780) 
    { 
     public void onDrawerClosed(View paramAnonymousView) 
     { 
     super.onDrawerClosed(paramAnonymousView); 
     MainActivity.this.getSupportActionBar().setTitle(MainActivity.this.mTitle); 
     MainActivity.this.invalidateOptionsMenu(); 
     } 

     public void onDrawerOpened(View paramAnonymousView) 
     { 
     super.onDrawerOpened(paramAnonymousView); 
     MainActivity.this.getSupportActionBar().setTitle(MainActivity.this.mDrawerTitle); 
     MainActivity.this.invalidateOptionsMenu(); 
     } 
    }; 
    this.mDrawerLayout.setDrawerListener(this.mDrawerToggle); 
    getSupportActionBar().setDisplayHomeAsUpEnabled(true); 
    getSupportActionBar().setHomeButtonEnabled(true); 
    getResources().getConfiguration(); 
    getFragmentManager().beginTransaction().replace(16908290, new adView()); 
    ((AdView)findViewById(2131689565)).loadAd(new AdRequest.Builder().build()); 
    paramBundle = (Button)findViewById(2131689593); 
    final ObjectAnimator localObjectAnimator = ObjectAnimator.ofPropertyValuesHolder((RelativeLayout)findViewById(2131689592), new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("scaleX", new float[] { 1.2F }), PropertyValuesHolder.ofFloat("scaleY", new float[] { 1.2F }) }); 
    localObjectAnimator.setRepeatCount(-1); 
    localObjectAnimator.setRepeatMode(2); 
    paramBundle.setOnClickListener(new View.OnClickListener() 
    { 
     public void onClick(View paramAnonymousView) 
     { 
     localObjectAnimator.start(); 
     new Handler().postDelayed(new Runnable() 
     { 
      public void run() 
      { 
      Intent localIntent = new Intent(MainActivity.this, Metric.class); 
      MainActivity.this.startActivity(localIntent); 
      MainActivity.this.finish(); 
      } 
     }, 500L); 
     } 
    }); 
    paramBundle = (Button)findViewById(2131689580); 
    localObjectAnimator = ObjectAnimator.ofPropertyValuesHolder((RelativeLayout)findViewById(2131689579), new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("scaleX", new float[] { 1.2F }), PropertyValuesHolder.ofFloat("scaleY", new float[] { 1.2F }) }); 
    localObjectAnimator.setRepeatCount(-1); 
    localObjectAnimator.setRepeatMode(2); 
    paramBundle.setOnClickListener(new View.OnClickListener() 
    { 
     public void onClick(View paramAnonymousView) 
     { 
     localObjectAnimator.start(); 
     new Handler().postDelayed(new Runnable() 
     { 
      public void run() 
      { 
      Intent localIntent = new Intent(MainActivity.this, Time.class); 
      MainActivity.this.startActivity(localIntent); 
      MainActivity.this.finish(); 
      } 
     }, 500L); 
     } 
    }); 
    paramBundle = (Button)findViewById(2131689583); 
    localObjectAnimator = ObjectAnimator.ofPropertyValuesHolder((RelativeLayout)findViewById(2131689581), new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("scaleX", new float[] { 1.2F }), PropertyValuesHolder.ofFloat("scaleY", new float[] { 1.2F }) }); 
    localObjectAnimator.setRepeatCount(-1); 
    localObjectAnimator.setRepeatMode(2); 
    paramBundle.setOnClickListener(new View.OnClickListener() 
    { 
     public void onClick(View paramAnonymousView) 
     { 
     localObjectAnimator.start(); 
     new Handler().postDelayed(new Runnable() 
     { 
      public void run() 
      { 
      Intent localIntent = new Intent(MainActivity.this, Temperature.class); 
      MainActivity.this.startActivity(localIntent); 
      MainActivity.this.finish(); 
      } 
     }, 500L); 
     } 
    }); 
    paramBundle = (Button)findViewById(2131689585); 
    localObjectAnimator = ObjectAnimator.ofPropertyValuesHolder((RelativeLayout)findViewById(2131689584), new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("scaleX", new float[] { 1.2F }), PropertyValuesHolder.ofFloat("scaleY", new float[] { 1.2F }) }); 
    localObjectAnimator.setRepeatCount(-1); 
    localObjectAnimator.setRepeatMode(2); 
    paramBundle.setOnClickListener(new View.OnClickListener() 
    { 
     public void onClick(View paramAnonymousView) 
     { 
     localObjectAnimator.start(); 
     new Handler().postDelayed(new Runnable() 
     { 
      public void run() 
      { 
      Intent localIntent = new Intent(MainActivity.this, Weight.class); 
      MainActivity.this.startActivity(localIntent); 
      MainActivity.this.finish(); 
      } 
     }, 500L); 
     } 
    }); 
    paramBundle = (Button)findViewById(2131689589); 
    localObjectAnimator = ObjectAnimator.ofPropertyValuesHolder((RelativeLayout)findViewById(2131689586), new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("scaleX", new float[] { 1.2F }), PropertyValuesHolder.ofFloat("scaleY", new float[] { 1.2F }) }); 
    localObjectAnimator.setRepeatCount(-1); 
    localObjectAnimator.setRepeatMode(2); 
    paramBundle.setOnClickListener(new View.OnClickListener() 
    { 
     public void onClick(View paramAnonymousView) 
     { 
     localObjectAnimator.start(); 
     new Handler().postDelayed(new Runnable() 
     { 
      public void run() 
      { 
      Intent localIntent = new Intent(MainActivity.this, Length.class); 
      MainActivity.this.startActivity(localIntent); 
      MainActivity.this.finish(); 
      } 
     }, 500L); 
     } 
    }); 
    paramBundle = (Button)findViewById(2131689591); 
    localObjectAnimator = ObjectAnimator.ofPropertyValuesHolder((RelativeLayout)findViewById(2131689574), new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("scaleX", new float[] { 1.2F }), PropertyValuesHolder.ofFloat("scaleY", new float[] { 1.2F }) }); 
    localObjectAnimator.setRepeatCount(-1); 
    localObjectAnimator.setRepeatMode(2); 
    paramBundle.setOnClickListener(new View.OnClickListener() 
    { 
     public void onClick(View paramAnonymousView) 
     { 
     localObjectAnimator.start(); 
     new Handler().postDelayed(new Runnable() 
     { 
      public void run() 
      { 
      Intent localIntent = new Intent(MainActivity.this, Money.class); 
      MainActivity.this.startActivity(localIntent); 
      MainActivity.this.finish(); 
      } 
     }, 500L); 
     } 
    }); 
    paramBundle = (Button)findViewById(2131689597); 
    localObjectAnimator = ObjectAnimator.ofPropertyValuesHolder((RelativeLayout)findViewById(2131689596), new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("scaleX", new float[] { 1.2F }), PropertyValuesHolder.ofFloat("scaleY", new float[] { 1.2F }) }); 
    localObjectAnimator.setRepeatCount(-1); 
    localObjectAnimator.setRepeatMode(2); 
    paramBundle.setOnClickListener(new View.OnClickListener() 
    { 
     public void onClick(View paramAnonymousView) 
     { 
     localObjectAnimator.start(); 
     new Handler().postDelayed(new Runnable() 
     { 
      public void run() 
      { 
      Intent localIntent = new Intent(MainActivity.this, Food.class); 
      MainActivity.this.startActivity(localIntent); 
      MainActivity.this.finish(); 
      } 
     }, 500L); 
     } 
    }); 
    paramBundle = (Button)findViewById(2131689599); 
    localObjectAnimator = ObjectAnimator.ofPropertyValuesHolder((RelativeLayout)findViewById(2131689598), new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("scaleX", new float[] { 1.2F }), PropertyValuesHolder.ofFloat("scaleY", new float[] { 1.2F }) }); 
    localObjectAnimator.setRepeatCount(-1); 
    localObjectAnimator.setRepeatMode(2); 
    paramBundle.setOnClickListener(new View.OnClickListener() 
    { 
     public void onClick(View paramAnonymousView) 
     { 
     localObjectAnimator.start(); 
     new Handler().postDelayed(new Runnable() 
     { 
      public void run() 
      { 
      Intent localIntent = new Intent(MainActivity.this, Data.class); 
      MainActivity.this.startActivity(localIntent); 
      MainActivity.this.finish(); 
      } 
     }, 500L); 
     } 
    }); 
    paramBundle = (Button)findViewById(2131689602); 
    localObjectAnimator = ObjectAnimator.ofPropertyValuesHolder((RelativeLayout)findViewById(2131689600), new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("scaleX", new float[] { 1.2F }), PropertyValuesHolder.ofFloat("scaleY", new float[] { 1.2F }) }); 
    localObjectAnimator.setRepeatCount(-1); 
    localObjectAnimator.setRepeatMode(2); 
    paramBundle.setOnClickListener(new View.OnClickListener() 
    { 
     public void onClick(View paramAnonymousView) 
     { 
     localObjectAnimator.start(); 
     new Handler().postDelayed(new Runnable() 
     { 
      public void run() 
      { 
      Intent localIntent = new Intent(MainActivity.this, Frequency.class); 
      MainActivity.this.startActivity(localIntent); 
      MainActivity.this.finish(); 
      } 
     }, 500L); 
     } 
    }); 
    paramBundle = (Button)findViewById(2131689605); 
    localObjectAnimator = ObjectAnimator.ofPropertyValuesHolder((RelativeLayout)findViewById(2131689604), new PropertyValuesHolder[] { PropertyValuesHolder.ofFloat("scaleX", new float[] { 1.2F }), PropertyValuesHolder.ofFloat("scaleY", new float[] { 1.2F }) }); 
    localObjectAnimator.setRepeatCount(-1); 
    localObjectAnimator.setRepeatMode(2); 
    paramBundle.setOnClickListener(new View.OnClickListener() 
    { 
     public void onClick(View paramAnonymousView) 
     { 
     localObjectAnimator.start(); 
     new Handler().postDelayed(new Runnable() 
     { 
      public void run() 
      { 
      Intent localIntent = new Intent(MainActivity.this, Numeral.class); 
      MainActivity.this.startActivity(localIntent); 
      MainActivity.this.finish(); 
      } 
     }, 500L); 
     } 
    }); 
    } 

    public boolean onCreateOptionsMenu(Menu paramMenu) 
    { 
    getMenuInflater().inflate(2131755008, paramMenu); 
    return true; 
    } 

    public boolean onOptionsItemSelected(MenuItem paramMenuItem) 
    { 
    if (this.mDrawerToggle.onOptionsItemSelected(paramMenuItem)) { 
     return true; 
    } 
    switch (paramMenuItem.getItemId()) 
    { 
    } 
    for (;;) 
    { 
     return super.onOptionsItemSelected(paramMenuItem); 
     startActivity(new Intent(this, About.class)); 
     continue; 
     Object localObject = new Intent("android.intent.action.VIEW", Uri.parse("https://play.google.com/store/apps/details?id=com.TechnologyForTomorrow.Converjz")); 
     try 
     { 
     startActivity((Intent)localObject); 
     localObject = ((AnalyticsTracker)getApplication()).getTracker(AnalyticsTracker.TrackerName.APP_TRACKER); 
     ((Tracker)localObject).enableAdvertisingIdCollection(true); 
     ((Tracker)localObject).setScreenName("EULA"); 
     ((Tracker)localObject).send(new HitBuilders.AppViewBuilder().build()); 
     } 
     catch (ActivityNotFoundException localActivityNotFoundException) {} 
     continue; 
     startActivity(new Intent(this, EULA.class)); 
    } 
    } 

    protected void onPostCreate(Bundle paramBundle) 
    { 
    super.onPostCreate(paramBundle); 
    this.mDrawerToggle.syncState(); 
    } 

    public boolean onPrepareOptionsMenu(Menu paramMenu) 
    { 
    this.mDrawerLayout.isDrawerOpen(this.mDrawerList); 
    return super.onPrepareOptionsMenu(paramMenu); 
    } 

    public void setTitle(CharSequence paramCharSequence) 
    { 
    this.mTitle = paramCharSequence; 
    getSupportActionBar().setTitle(this.mTitle); 
    } 

    private class DrawerItemClickListener 
    implements AdapterView.OnItemClickListener 
    { 
    private DrawerItemClickListener() {} 

    public void onItemClick(AdapterView paramAdapterView, View paramView, int paramInt, long paramLong) 
    { 
     MainActivity.this.selectItem(paramInt); 
    } 
    } 
} 


/* Location:    C:\Noah's stuff\dex2jar-2.0\Converjz-dex2jar.jar!\course\labs\converjz\MainActivity.class 
* Java compiler version: 6 (50.0) 
* JD-Core Version:  0.7.1 
*/ 
+0

试试吧,让我们知道结果吧! – TheGreatContini

+0

我希望它可以在android studio完成安装后生效。我只是想知道是否有人需要经历和我一样的过程,并为他们工作。 –

回答

1

他们会改回来时,我导入项目回了Android工作室?

没有,因为没有 “返回”。 Android Studio不知道这不是您想要的代码。

这就是为什么,而不是反编译的APK,你应该从你的电脑的备份或从你的版本控制系统恢复项目。

你肯定欢迎找一些其他的反编译器,看看它是否让你根据自己的喜好结果更。我建议您在为您的计算机设置夜间备份方案后执行此操作。

+0

那么这里的东西,我是不是能够做到无论是前手,所以我希望事情都不可能是固定的,显然它的工作对其他的人,所以它可能为我工作 –

+0

得到这个,它的工作,机器人能够把它在编译时更改的代码返回到其原始状态。我非常感谢一切恢复正常。 –