refine build
This commit is contained in:
parent
76321821a8
commit
1845e4e5b4
18
README.md
18
README.md
|
|
@ -1,17 +1 @@
|
|||
# Readme
|
||||
LSPosed as hook framework
|
||||
|
||||
There some major change since xpatch
|
||||
|
||||
1. use LSPosed as hook framework
|
||||
1. keep loader simple, clear not nesseacry things, like bypass signature. let developer do this part
|
||||
|
||||
|
||||
`Maybe perform force push if some private data leak in project. Sorry for the confusion.`
|
||||
|
||||
# Useage
|
||||
1. You need do signature bypass by yourself
|
||||
1. Orignal signature saved to assets/original_signature_info.ini
|
||||
1. Orignal apk saved to assets/original_apk.bin
|
||||
|
||||
For example, you may need to replace signatures from getPackageInfo and redirect `/data/app/{your apk}/base.apk` to `original_apk.bin` to bypass normally signature check.
|
||||
Run `gradlew.bat build[Debug|Release]` build this project
|
||||
|
|
|
|||
|
|
@ -40,3 +40,11 @@ allprojects {
|
|||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
||||
|
||||
["Debug", "Release"].each { variant ->
|
||||
tasks.register("build$variant") {
|
||||
description("Build LSPatch with $variant")
|
||||
dependsOn tasks.getByPath(":app:copy$variant")
|
||||
dependsOn tasks.getByPath(":patch:build")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ dependencies {
|
|||
|
||||
jar {
|
||||
baseName = "mmpatch"
|
||||
destinationDirectory = new File("$rootProject.projectDir/out")
|
||||
manifest {
|
||||
attributes 'Main-Class': 'com.storm.wind.xpatch.MainCommand'
|
||||
}
|
||||
//添加将引用的jar的源码打入最终的jar
|
||||
from {
|
||||
(configurations.runtime).collect {
|
||||
it.isDirectory() ? it : zipTree(it)
|
||||
|
|
@ -30,7 +30,6 @@ jar {
|
|||
|
||||
from fileTree(dir: 'src/main', includes: ['assets/**'])
|
||||
|
||||
//排除引用的jar中的签名信息
|
||||
exclude 'META-INF/*.SF', 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.MF'
|
||||
}
|
||||
|
||||
|
|
@ -39,7 +38,6 @@ tasks.build.doLast {
|
|||
println("Try \'java -jar " + jar.archiveName + "\' find more help")
|
||||
}
|
||||
|
||||
//添加源码中引入的非代码文件,例如资源等
|
||||
sourceSets.main.resources {
|
||||
srcDirs = [
|
||||
"src/main/java",
|
||||
|
|
|
|||
Loading…
Reference in New Issue