对于安卓,大多数人只会用一些jd-gui 反编译成java文件,其实还有很多神器 jeb ida 配合shi't用效果更佳
不废话,进入正题
悬赏https://www.52hb.com/thread-27590-1-1.html
一步一步如何定位到关键点
首先通过mainfest.xml文件定位到acitivity
[C] 纯文本查看 复制代码 <?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()方法
[Java] 纯文本查看 复制代码 new Thread(new Runnable() {
public void run() {
MainActivity.this.initData();
}
}).start();
定位到关键方法 Mainactivity.initdata()
[Java] 纯文本查看 复制代码 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();
}
}
写的不是很详细,欢迎大牛小菜交流移动端
|