Get rid of config.cpp
This commit is contained in:
parent
45f0962d59
commit
67e3460d7a
|
|
@ -20,4 +20,5 @@
|
||||||
MODDIR=${0%/*}
|
MODDIR=${0%/*}
|
||||||
|
|
||||||
rm -f "/data/local/tmp/daemon.apk"
|
rm -f "/data/local/tmp/daemon.apk"
|
||||||
|
cd "$MODDIR"
|
||||||
unshare -m sh -c "$MODDIR/daemon &"
|
unshare -m sh -c "$MODDIR/daemon &"
|
||||||
|
|
|
||||||
|
|
@ -18,5 +18,6 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
MODDIR=${0%/*}
|
MODDIR=${0%/*}
|
||||||
|
cd "$MODDIR"
|
||||||
# post-fs-data.sh may be blocked by other modules. retry to start this
|
# post-fs-data.sh may be blocked by other modules. retry to start this
|
||||||
unshare -m "$MODDIR/daemon" --from-service "$@"&
|
unshare -m "$MODDIR/daemon" --from-service "$@"&
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,11 @@ LOCAL_PATH := $(call my-dir)
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
LOCAL_MODULE := daemon
|
LOCAL_MODULE := daemon
|
||||||
LOCAL_C_INCLUDES := ../core/src/main/cpp/main/include/
|
LOCAL_C_INCLUDES := ../core/src/main/cpp/main/include/
|
||||||
LOCAL_SRC_FILES := logcat.cpp obfuscation.cpp ../../../../core/src/main/cpp/main/api/config.cpp
|
LOCAL_SRC_FILES := logcat.cpp obfuscation.cpp
|
||||||
LOCAL_STATIC_LIBRARIES := cxx dex_builder
|
LOCAL_STATIC_LIBRARIES := cxx dex_builder
|
||||||
LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
|
LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
|
||||||
LOCAL_LDLIBS := -llog -landroid
|
LOCAL_LDLIBS := -llog -landroid
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
include $(BUILD_SHARED_LIBRARY)
|
||||||
|
|
||||||
include ../core/src/main/cpp/external/DexBuilder/Android.mk
|
include ../core/src/main/cpp/external/DexBuilder/Android.mk
|
||||||
$(call import-module,prefab/cxx)
|
$(call import-module,prefab/cxx)
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include "slicer/reader.h"
|
#include "slicer/reader.h"
|
||||||
#include "slicer/writer.h"
|
#include "slicer/writer.h"
|
||||||
#include "config.h"
|
|
||||||
#include "obfuscation.h"
|
#include "obfuscation.h"
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
|
|
@ -136,7 +135,7 @@ Java_org_lsposed_lspd_service_ObfuscationManager_preloadDex(JNIEnv *, jclass ) {
|
||||||
using namespace std::string_literals;
|
using namespace std::string_literals;
|
||||||
std::lock_guard lg(dex_lock);
|
std::lock_guard lg(dex_lock);
|
||||||
if (lspdDex != -1) return lspdDex;
|
if (lspdDex != -1) return lspdDex;
|
||||||
std::string dex_path = "/data/adb/modules/"s + lspd::moduleName + "/" + lspd::kDexPath;
|
std::string dex_path = "framework/lspd.dex";
|
||||||
|
|
||||||
std::unique_ptr<FILE, decltype(&fclose)> f{fopen(dex_path.data(), "rb"), &fclose};
|
std::unique_ptr<FILE, decltype(&fclose)> f{fopen(dex_path.data(), "rb"), &fclose};
|
||||||
|
|
||||||
|
|
@ -145,7 +144,7 @@ Java_org_lsposed_lspd_service_ObfuscationManager_preloadDex(JNIEnv *, jclass ) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
fseek(f.get(), 0, SEEK_END);
|
fseek(f.get(), 0, SEEK_END);
|
||||||
auto size = ftell(f.get());
|
size_t size = ftell(f.get());
|
||||||
rewind(f.get());
|
rewind(f.get());
|
||||||
|
|
||||||
LOGD("Loaded %s with size %zu", dex_path.data(), size);
|
LOGD("Loaded %s with size %zu", dex_path.data(), size);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue