Skip to content

Commit 7910e80

Browse files
committed
Initial commit
0 parents  commit 7910e80

30 files changed

+760
-0
lines changed

.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/workspace.xml
5+
/.idea/libraries
6+
.DS_Store
7+
/build
8+
/captures
9+
/private

.idea/.name

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/compiler.xml

+22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copyright/profiles_settings.xml

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/profiles_settings.xml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+84
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Unblock163MusicClient - Xposed
2+
3+
Xposed version of EraserKing's [Unblock163MusicClient](https://github.com/EraserKing/Unblock163MusicClient).
4+
5+
Compatible with the v3.1.4 app.
6+
7+
## Downlad
8+
No apks here. Just build it yourself.
9+
10+
## Thanks
11+
12+
Thanks EraserKing for his Original Windows version [https://github.com/EraserKing/Unblock163MusicClient]
13+
14+
Thanks yanunon for his API analysis! [https://github.com/yanunon/NeteaseCloudMusic]

app/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
apply plugin: 'com.android.application'
2+
3+
Properties props = new Properties()
4+
props.load(new FileInputStream(file("../private/signing.properties")))
5+
6+
android {
7+
compileSdkVersion 23
8+
buildToolsVersion "23.0.2"
9+
10+
signingConfigs {
11+
config {
12+
try {
13+
keyAlias props['KEY_ALIAS']
14+
keyPassword props['KEY_PASSWORD']
15+
storeFile file(props['STORE_FILE'])
16+
storePassword props['STORE_PASSWORD']
17+
}
18+
catch (ex) {
19+
throw new InvalidUserDataException(ex.message + " You should define KEY_ALIAS, KEY_PASSWORD, STORE_FILE and STORE_PASSWORD in signing.properties.")
20+
}
21+
}
22+
}
23+
24+
defaultConfig {
25+
applicationId "bin.Xposed.Unblock163MusicClient"
26+
minSdkVersion 9
27+
targetSdkVersion 23
28+
versionCode 1
29+
versionName "0.0.1"
30+
}
31+
buildTypes {
32+
release {
33+
minifyEnabled true
34+
shrinkResources true
35+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
36+
signingConfig signingConfigs.config
37+
}
38+
}
39+
}
40+
41+
dependencies {
42+
provided files('libs/XposedBridgeApi-30.jar')
43+
}

app/libs/XposedBridgeApi-30.jar

97.7 KB
Binary file not shown.

app/proguard-rules.pro

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in C:\Users\Bin\AppData\Local\Android\sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
-keep class *

app/src/main/AndroidManifest.xml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:tools="http://schemas.android.com/tools"
3+
package="bin.xposed.Unblock163MusicClient">
4+
5+
<application android:label="@string/app_name">
6+
<meta-data
7+
android:name="xposedmodule"
8+
android:value="true" />
9+
<meta-data
10+
android:name="xposeddescription"
11+
android:value="@string/xposed_description"
12+
tools:ignore="ManifestResource" />
13+
<meta-data
14+
android:name="xposedminversion"
15+
android:value="30" />
16+
</application>
17+
18+
</manifest>

app/src/main/assets/xposed_init

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bin.xposed.Unblock163MusicClient.Main
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package bin.xposed.Unblock163MusicClient;
2+
3+
import de.robv.android.xposed.IXposedHookLoadPackage;
4+
import de.robv.android.xposed.XC_MethodHook;
5+
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;
6+
7+
import static de.robv.android.xposed.XposedHelpers.findAndHookMethod;
8+
9+
public class Main implements IXposedHookLoadPackage {
10+
11+
public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
12+
13+
if (lpparam.packageName.equals("com.netease.cloudmusic")) {
14+
Utility.Init(lpparam.classLoader);
15+
16+
findAndHookMethod("com.netease.cloudmusic.utils.u", lpparam.classLoader,
17+
"i", new XC_MethodHook() {
18+
@Override
19+
protected void afterHookedMethod(MethodHookParam param) throws Exception {
20+
String full_url = (String) Utility.FIELD_utils_c.get(param.thisObject);
21+
String url = full_url.replace("http://music.163.com", "");
22+
if (url.startsWith("/eapi/batch")
23+
|| url.startsWith("/eapi/cloudsearch/pc")
24+
|| url.startsWith("/eapi/v1/artist")
25+
|| url.startsWith("/eapi/v1/album")
26+
|| url.startsWith("/eapi/v1/play/record")
27+
|| url.startsWith("/eapi/v1/search/get")
28+
|| url.startsWith("/eapi/v3/playlist/detail")
29+
|| url.startsWith("/eapi/v3/song/detail")
30+
|| url.startsWith("/eapi/v3/song/enhance/privilege")) {
31+
String modified = Utility.ModifyDetailApi((String) param.getResult());
32+
param.setResult(modified);
33+
} else if (url.startsWith("/eapi/song/enhance/player/url")) {
34+
String modified = Utility.ModifyPlayerApi(url, (String) param.getResult());
35+
param.setResult(modified);
36+
}
37+
}
38+
});
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)