Fix binary patch (#2096)
This commit is contained in:
parent
ce02b75a4c
commit
205138f638
|
|
@ -1,9 +1,7 @@
|
||||||
project(dex2oat)
|
project(dex2oat)
|
||||||
cmake_minimum_required(VERSION 3.4.1)
|
cmake_minimum_required(VERSION 3.4.1)
|
||||||
|
|
||||||
add_library(dex2oat SHARED dex2oat.c)
|
add_executable(dex2oat dex2oat.c)
|
||||||
|
|
||||||
target_link_options(dex2oat PRIVATE "-fPIE")
|
|
||||||
|
|
||||||
target_link_libraries(dex2oat log)
|
target_link_libraries(dex2oat log)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ fun afterEval() = android.applicationVariants.forEach { variant ->
|
||||||
"assemble$variantCapped",
|
"assemble$variantCapped",
|
||||||
":app:package$buildTypeCapped",
|
":app:package$buildTypeCapped",
|
||||||
":daemon:package$buildTypeCapped",
|
":daemon:package$buildTypeCapped",
|
||||||
":dex2oat:strip${buildTypeCapped}DebugSymbols"
|
":dex2oat:merge${buildTypeCapped}NativeLibs"
|
||||||
)
|
)
|
||||||
into(magiskDir)
|
into(magiskDir)
|
||||||
from("${rootProject.projectDir}/README.md")
|
from("${rootProject.projectDir}/README.md")
|
||||||
|
|
@ -204,9 +204,8 @@ fun afterEval() = android.applicationVariants.forEach { variant ->
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
into("bin") {
|
into("bin") {
|
||||||
from("${project(":dex2oat").buildDir}/intermediates/stripped_native_libs/$buildTypeLowered/out/lib") {
|
from("${project(":dex2oat").buildDir}/intermediates/cmake/$buildTypeLowered/obj") {
|
||||||
include("**/libdex2oat.so")
|
include("**/dex2oat")
|
||||||
rename { n -> n.replace("libdex2oat.so", "dex2oat") }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
val dexOutPath = if (buildTypeLowered == "release")
|
val dexOutPath = if (buildTypeLowered == "release")
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ if [ "$API" -ge 29 ]; then
|
||||||
while [ -d "/dev/$DEV_PATH" ]; do
|
while [ -d "/dev/$DEV_PATH" ]; do
|
||||||
DEV_PATH=$(tr -dc 'a-f0-9' < /dev/urandom | head -c 16)
|
DEV_PATH=$(tr -dc 'a-f0-9' < /dev/urandom | head -c 16)
|
||||||
done
|
done
|
||||||
sed -i "s/placeholder_\/dev\/................/placeholder_\/dev\/$DEV_PATH/" "$MODPATH/libdaemon.so"
|
sed -i "s/placeholder_\/dev\/................/placeholder_\/dev\/$DEV_PATH/g" "$MODPATH/daemon.apk"
|
||||||
sed -i "s/placeholder_\/dev\/................/placeholder_\/dev\/$DEV_PATH/" "$MODPATH/bin/dex2oat32"
|
sed -i "s/placeholder_\/dev\/................/placeholder_\/dev\/$DEV_PATH/" "$MODPATH/bin/dex2oat32"
|
||||||
sed -i "s/placeholder_\/dev\/................/placeholder_\/dev\/$DEV_PATH/" "$MODPATH/bin/dex2oat64"
|
sed -i "s/placeholder_\/dev\/................/placeholder_\/dev\/$DEV_PATH/" "$MODPATH/bin/dex2oat64"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue