Skip to content

Commit

Permalink
support arm arch
Browse files Browse the repository at this point in the history
  • Loading branch information
hackcatml committed Nov 26, 2023
1 parent 924f657 commit 7f07563
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions module/src/main/cpp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@ void injection_thread(const char* target_package_name, int time_to_sleep) {

std::string gadget_path = std::string("/data/data/") +
std::string(target_package_name) +
#ifdef __aarch64__
std::string("/frida-gadget-16.1.7-android-arm64.so");
#else // arm
std::string("/frida-gadget-16.1.7-android-arm.so");
#endif

std::ifstream file(gadget_path);
if (file) {
LOGD("gadget is ready to load from %s", gadget_path.c_str());
Expand Down Expand Up @@ -94,7 +99,11 @@ class MyModule : public zygisk::ModuleBase {
const char* time_to_sleep = readFileContents(file_path_to_read);
_time_to_sleep = std::stoi(time_to_sleep);

#ifdef __aarch64__
std::string frida_gadget_path = module_dir + std::string("/frida-gadget-16.1.7-android-arm64.so");
#else // arm
std::string frida_gadget_path = module_dir + std::string("/frida-gadget-16.1.7-android-arm.so");
#endif

int fd = _api->connectCompanion();
// send the length of the string first
Expand Down
Binary file not shown.

0 comments on commit 7f07563

Please sign in to comment.