apexad / eufy-robovac

NodeJS library to control Eufy RoboVac
MIT License
60 stars 17 forks source link

Updated method of getting localKey #25

Closed dansimau closed 2 years ago

dansimau commented 2 years ago

I just purchased a Robovac G30 Edge and got it running in Homebridge using this plugin. However, it was a bit of challenge. The instructions in the README did not work for me, as BlueStacks doesn't run on M1 and EufyHome 2.3.2 is no longer supported for my device.

What did not work:

What did work:

What worked for me was to spy on traffic on the latest version of the EufyHome app. One of the API responses has the device ID and localKey.

Instructions for macOS arm64:

Hope this is useful for someone.

familyofharris commented 2 years ago

hi i tried but i dont know what I'm doing with android studio?? can you help me to get it working please ? thanks steve

lvcabral commented 2 years ago

I have managed to use the old method (using the 2.4.0 APK) by creating a new account (and pairing the robot) using the old app, I suspect the creation of an account using newer apps is using a different type of ID and switching something on the backend that the old app (2.4.0) does not recognize. I created a new account with a different e-mail and it showed the local key. After that I managed to login on my iPhone with the latest app and it works. So I do recommend to keep the old app on an android device or VM.

martijnpoppen commented 2 years ago

@dansimau I use a similar approach to get the localKeys. but instead of mitmproxy I use fridump. With fridump you can dump all frida data and it will have the localKey in it.

link: https://github.com/Nightbringer21/fridump

terminal tab 1:

frida --no-pause -U -l ./frida-script.js -f com.eufylife.smarthome

terminal tab 2:

python fridump.py  -U -s com.eufylife.smarthome

cd dump

strings * | grep <insert device id>

This method also works for the new X8 robovac

apexad commented 2 years ago

looking to work on https://github.com/apexad/eufy-robovac/issues/14 soon so this issue is not important anymore.

lkucera commented 1 year ago

I have managed to use the old method (using the 2.4.0 APK) by creating a new account (and pairing the robot) using the old app, I suspect the creation of an account using newer apps is using a different type of ID and switching something on the backend that the old app (2.4.0) does not recognize. I created a new account with a different e-mail and it showed the local key. After that I managed to login on my iPhone with the latest app and it works. So I do recommend to keep the old app on an android device or VM.

unfortunately this doesn't work with some vacuum, the old App will simply not find them...