You've already forked ReZygisk
mirror of
https://github.com/PerformanC/ReZygisk.git
synced 2025-09-06 06:37:01 +00:00
upload zygiskd debug symbols
This commit is contained in:
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@@ -87,3 +87,15 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: ${{ steps.prepareArtifact.outputs.debugName }}
|
name: ${{ steps.prepareArtifact.outputs.debugName }}
|
||||||
path: "./zksu-debug/*"
|
path: "./zksu-debug/*"
|
||||||
|
|
||||||
|
- name: Upload release symbols
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ steps.prepareArtifact.outputs.releaseName }}-symbols
|
||||||
|
path: "zygiskd/build/symbols/release"
|
||||||
|
|
||||||
|
- name: Upload debug symbols
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ steps.prepareArtifact.outputs.debugName }}-symbols
|
||||||
|
path: "zygiskd/build/symbols/release"
|
||||||
|
|||||||
@@ -31,19 +31,23 @@ cargo {
|
|||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
task<Task>("buildAndStrip") {
|
task<Task>("buildAndStrip") {
|
||||||
dependsOn(":zygiskd:cargoBuild")
|
dependsOn(":zygiskd:cargoBuild")
|
||||||
|
val isDebug = gradle.startParameter.taskNames.any { it.toLowerCase().contains("debug") }
|
||||||
doLast {
|
doLast {
|
||||||
val dir = File(buildDir, "rustJniLibs/android")
|
val dir = File(buildDir, "rustJniLibs/android")
|
||||||
val prebuilt = File(android.ndkDirectory, "toolchains/llvm/prebuilt").listFiles()!!.first()
|
val prebuilt = File(android.ndkDirectory, "toolchains/llvm/prebuilt").listFiles()!!.first()
|
||||||
val binDir = File(prebuilt, "bin")
|
val binDir = File(prebuilt, "bin")
|
||||||
println("binDir $binDir")
|
val symbolDir = File(buildDir, "symbols/${if (isDebug) "debug" else "release"}")
|
||||||
|
symbolDir.mkdirs()
|
||||||
val suffix = if (prebuilt.name.contains("windows")) ".exe" else ""
|
val suffix = if (prebuilt.name.contains("windows")) ".exe" else ""
|
||||||
val strip = File(binDir, "llvm-strip$suffix")
|
val strip = File(binDir, "llvm-strip$suffix")
|
||||||
val objcopy = File(binDir, "llvm-objcopy$suffix")
|
val objcopy = File(binDir, "llvm-objcopy$suffix")
|
||||||
dir.listFiles()!!.forEach {
|
dir.listFiles()!!.forEach {
|
||||||
if (!it.isDirectory) return@forEach
|
if (!it.isDirectory) return@forEach
|
||||||
|
val symbolPath = File(symbolDir, "${it.name}/zygiskd.debug")
|
||||||
|
symbolPath.parentFile.mkdirs()
|
||||||
exec {
|
exec {
|
||||||
workingDir = it
|
workingDir = it
|
||||||
commandLine(objcopy, "--only-keep-debug", "zygiskd", "zygiskd.debug")
|
commandLine(objcopy, "--only-keep-debug", "zygiskd", symbolPath)
|
||||||
}
|
}
|
||||||
exec {
|
exec {
|
||||||
workingDir = it
|
workingDir = it
|
||||||
@@ -51,7 +55,7 @@ afterEvaluate {
|
|||||||
}
|
}
|
||||||
exec {
|
exec {
|
||||||
workingDir = it
|
workingDir = it
|
||||||
commandLine(objcopy, "--add-gnu-debuglink", "zygiskd.debug", "zygiskd")
|
commandLine(objcopy, "--add-gnu-debuglink", symbolPath, "zygiskd")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user