Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

teaching how to transfer to emulator #548

Open
Laranjo1 opened this issue Sep 13, 2024 · 3 comments
Open

teaching how to transfer to emulator #548

Laranjo1 opened this issue Sep 13, 2024 · 3 comments

Comments

@Laranjo1
Copy link

Laranjo1 commented Sep 13, 2024

First, install frida-tools:

pip install frida-tools

After installing frida-tools, go to this GitHub page:
frida-server-x86
Locate and download:
frida-server-16.5.1-android-x86.xz

Then, download this emulator (I’ve only tested with this one):
LDPLAYER 5 x86

After this, you're almost set up!
Run the following commands:

npm init -y
npm i -D @types/node @types/frida-gum typescript frida-compile frida-il2cpp-bridge

Add this to the package.json file generated by npm init:

"scripts": {
    "spawn": "frida -U -f com.CrystalDev.DragonCrystalArena --realm emulated -l dist/agent.js",
    "watch": "frida-compile src/index.ts -o dist/agent.js -w",
    "build": "frida-compile src/index.ts -o dist/agent.js -c"
},

Note: My build script doesn't work, I’m not sure why. Any suggestions would be appreciated!

Next, create the following folder and file structure:

src
     └── index.ts
dist
     └── agent.js

Setting up the LDPlayer Emulator:

  1. Open the directory where LDPlayer4 is installed.
  2. Execute the following commands:
adb devices
adb push <local path to frida-server-16.5.1-android-x86> "data/local/tmp"
adb shell "chmod 777 data/local/tmp/frida-server-16.5.1-android-x86"
adb shell "data/local/tmp/frida-server-16.5.1-android-x86" &

To run the program:

  1. Open a terminal in the project directory and run:

    npm run watch
  2. Open a second terminal and run:

    npm run spawn
  3. Make any change to the code (I usually leave a comment for this).

Ignore the two errors that may appear, and your Frida setup should be operational!

@namtacs
Copy link

namtacs commented Sep 20, 2024

This is the same as following the official guide https://frida.re/docs/android/ and using files from the wiki. The emulator makes no difference in setup from a normal device apart from the need of --realm emulated to attach to the emulated ARM realm (libhoudini).

@Laranjo1
Copy link
Author

"And what about Android 9.0 (64-bit)? Can it be used? I tried, but I still couldn't find libil2cpp."

For emulators I think only can x86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Laranjo1 @namtacs and others