Skip to content

Instantly share code, notes, and snippets.

@exelix11
Created July 4, 2019 21:31
Show Gist options
  • Save exelix11/0c91f78f6a63975e86de05e53d9afdef to your computer and use it in GitHub Desktop.
Save exelix11/0c91f78f6a63975e86de05e53d9afdef to your computer and use it in GitHub Desktop.
Get yi home device id with frida
/*
LAUNCHER:
import frida
import time
device = frida.get_usb_device()
pid = device.spawn(["com.ants360.yicamera.international"])
time.sleep(1) #Without it Java.perform silently fails
session = device.attach(pid)
script = session.create_script(open("script.js").read())
script.load()
device.resume(pid)
raw_input()
*/
//Script
console.log("DeviceID finder, target version 4.0.5_20190318");
Java.perform(function x(){
var target = Java.use("com.ants360.yicamera.util.i");
target.c.implementation = function()
{
var res = this.c();
console.log("DeviceID: " + res);
return res;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment