FraMeQ 发表于 2016-9-2 11:58

[Android]如何去定位你的关键点

对于安卓,大多数人只会用一些jd-gui 反编译成java文件,其实还有很多神器 jeb ida 配合shi't用效果更佳

不废话,进入正题
悬赏https://www.52hb.com/thread-27590-1-1.html
一步一步如何定位到关键点


首先通过mainfest.xml文件定位到acitivity
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="gh.myiptv.com" platformBuildVersionCode="21" platformBuildVersionName="APKTOOL">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.READ_LOGS"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
    <instrumentation android:label="Test tv APP" android:name="android.test.InstrumentationTestRunner" android:targetPackage="com.example.myta"/>
    <application android:allowBackup="true" android:debuggable="true" android:icon="@drawable/ic_launcher" android:label="高清影音" android:name="com.android.common.MyApplication">
      <uses-library android:name="android.test.runner"/>
      <activity android:label="高清影音" android:name="com.example.myta.MainActivity" android:theme="@android:style/Theme.NoTitleBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
      </activity>
      <activity android:label="@string/app_name" android:name="com.example.myta.PreferencesActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar"/>
      <activity android:launchMode="singleTask" android:name="com.example.myta.PlayerActivity" android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
      <activity android:launchMode="singleTask" android:name="com.example.myta.DefPlayerActivity" android:screenOrientation="landscape" android:theme="@android:style/Theme.NoTitleBar.Fullscreen"/>
      <activity android:name="com.example.myta.DetailActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar"/>
      <activity android:name="com.example.myta.EpgActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar"/>
      <activity android:name="com.example.myta.PlaybackEpgActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.NoTitleBar"/>
    </application>
</manifest>

package="gh.myiptv.com"android:name="com.example.myta.MainActivity"

在com/example/myta/Mainactivity 下,我们先看看源码
源码就不附上来了

分析源码
第一个
查看OnCreate方法 其中创建线程调用initdata()方法
      new Thread(new Runnable() {
            public void run() {
                MainActivity.this.initData();
            }
      }).start();

定位到关键方法 Mainactivity.initdata()

private void initData() {
      int v8 = 2;
      InputStream v2 = null;
      String v4 = null;
      if(MainActivity.CHANNEL_FORMAT == 1) {
            v4 = "live.xml";
      }
      else if(MainActivity.CHANNEL_FORMAT == v8) {
            v4 = "logo/VL.png";
      }

      try {
            switch(MainActivity.CHANNEL_SOURCE) {
                case 1: {
                  Log.e("MainActivity", "read xml from internal!");
                  v2 = this.getResources().getAssets().open(v4);
                  break;
                }
                case 2: {
                  Log.e("MainActivity", "read xml from external!");
                  if(Environment.getExternalStorageState().equals("mounted")) {
                        FileInputStream v2_1 = new FileInputStream(new File("/mnt/sdcard/", v4));
                        goto label_9;
                  }

                  this.mHandler.sendEmptyMessage(1);
                  break;
                }
                case 3: {
                  Log.e("MainActivity", "read xml from network!");
                  v2 = HttpUtil.getHttpInstream(MainActivity.networkChannelUrl);
                  break;
                }
            }

      label_9:
            if(MainActivity.CHANNEL_FORMAT == 1) {
                this.channelList = ReadP2PXml.getChannelList(v2);
            }
            else if(MainActivity.CHANNEL_FORMAT == v8) {
                this.channelList = ReadForceTxt.getChannelList(v2);
            }

            if(this.channelList != null) {
                this.mHandler.sendEmptyMessage(0);
                return;
            }

            this.mHandler.sendEmptyMessage(1);
      }
      catch(Exception v0) {
            this.mHandler.sendEmptyMessage(1);
            v0.printStackTrace();
      }
    }
**** Hidden Message *****
写的不是很详细,欢迎大牛小菜交流移动端{:5_188:}

x无与锋比x 发表于 2016-9-4 09:14

看看是什么,,

LeiSir 发表于 2016-9-4 10:23

学习下,谢谢分享。

仔仔同学 发表于 2016-9-4 12:39

{:5_117:}这是好贴,有前景,来支持个

官理猿 发表于 2016-9-4 13:36

2个帖子都是一样的么

Dalivk 发表于 2016-9-4 14:16

好久没接触来,前来看看

pnccm 发表于 2016-9-4 22:13

看看.现在都加固不好搞

璀璨刀光 发表于 2016-9-5 08:07

看一看~~~ 谢谢~~~

hyeh612 发表于 2016-9-6 18:56

分享精神,是最值得尊敬的!

chuyin7m 发表于 2016-9-6 20:01

最近在学安卓逆向,回复看看
页: [1] 2 3 4 5 6 7 8 9
查看完整版本: [Android]如何去定位你的关键点