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

Update life360 endpoints #7

Merged
merged 1 commit into from
Aug 1, 2023

Conversation

alexyao2015
Copy link

Fixes home-assistant/core#97470

Endpoints and client token were updated by life360. The endpoints were updated to the new ones. It seems like the user agent is now also being checked, so this is set to the life360 user agent as well. It appears from usage that the api spec is the same as before.

@robertvanlienden
Copy link

robertvanlienden commented Jul 30, 2023

LGTM 👍 . Dropped the life360 folder inside my config folder on an Docker-compose installation of HA, and this seems to work.

@pnbruckner
Copy link
Owner

How did you come up with these new values?

@alexyao2015
Copy link
Author

I used a mitm with the android app.

@pnbruckner pnbruckner merged commit 0903f2a into pnbruckner:master Aug 1, 2023
@alexyao2015 alexyao2015 deleted the fix/endpoint-update branch August 1, 2023 02:00
@fenen001
Copy link

fenen001 commented Aug 1, 2023

#robertvanlienden, how did you drop the Life360 folder. I did exactly the same, drop the Life360 folder in the config folder but not working. I have HA in a docker container on my Synology NAS. See the link for the folders.

Thank you for your help!!

Scherm­afbeelding 2023-08-01 om 16 55 36

@pnbruckner
Copy link
Owner

Note that the fix is included in HA release 2023.8.0b3. You should no longer need to copy this package's files directly to your config folder.

@ryanbuckner
Copy link

@pnbruckner - This solution worked for the Life360 plugin I've written for Indigo Domotics HA. Thanks so much for this fix. Here's my plugin if you're interested

@pnbruckner
Copy link
Owner

@ryanbuckner don't thank me, thank @alexyao2015 who came up with the solution.

@robertvanlienden
Copy link

#robertvanlienden, how did you drop the Life360 folder. I did exactly the same, drop the Life360 folder in the config folder but not working. I have HA in a docker container on my Synology NAS. See the link for the folders.

Thank you for your help!!

Scherm­afbeelding 2023-08-01 om 16 55 36

Are you sure you are using the right branch?

@fenen001
Copy link

fenen001 commented Aug 3, 2023

Hi Robert, thank you for your response. Which branch did you use? Can you share the link?
Thanks.

@pnbruckner
Copy link
Owner

Everyone, as mentioned above, the fix is in the HA 2023.8.0 release. Also, it seems the fix may no longer be required. If you can't or don't want to upgrade to HA 2023.8.0, and it seems you still need the fix, you can use the latest release of this package. You can do that by editing homeassistant/components/life360/manifest.json, or you can drop a copy of the main branch of this repo into your config folder (so that it looks like the directory listing in the comment above.)

@pnbruckner
Copy link
Owner

I used a mitm with the android app.

@alexyao2015, could you share with me the details of how you did this? I tried a couple different ways but failed miserably. I would really like to be able to do this so I can do a better job of maintaining this package and the corresponding HA integration.

@ryanbuckner
Copy link

Also, it seems the fix may no longer be required.

Can you elaborate on this?

@pnbruckner
Copy link
Owner

Can you elaborate on this?

It seems Life360 temporarily changed its API details -- specifically the URL, and possibly the token & header requirements. The "fix" updated this package to compensate for those changes. However, a day or so after that happened, it seems Life360 changed its API again so that it now seems to accept the older & newer API details. Again, this is an undocumented & unsupported API, so there's no real way to know for sure, or if it will change again suddenly and without warning. But, some people have reported that they did not make any changes to their HA install (i.e., they did not install the temporary fix, or update to 2023.8.0 which includes the same "fix"), yet their life360 entities have started working again.

@ryanbuckner
Copy link

Thanks. I've seen issues "fix themselves" before so I'm not surprised. Looks like the Life360 team develops straight into production :)

@alexyao2015
Copy link
Author

I did it using mitmproxy, frida, and this frida script https://github.com/httptoolkit/frida-android-unpinning

I used my physical rooted phone with frida. I also saw this that seems promising, but I've never tried it so YMMV.
https://github.com/freeload101/Java-Android-Magisk-Burp-Objection-Root-Emulator-Easy

@mikeage
Copy link

mikeage commented Aug 6, 2023

I did it using mitmproxy, frida, and this frida script https://github.com/httptoolkit/frida-android-unpinning

I used my physical rooted phone with frida. I also saw this that seems promising, but I've never tried it so YMMV. https://github.com/freeload101/Java-Android-Magisk-Burp-Objection-Root-Emulator-Easy

If you haven't seen it, you may want to also check out https://github.com/sensepost/objection/ . Under the hood it's frida, but it has a lot of really nice scripts built in, and can be quicker for most stuff.

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

Successfully merging this pull request may close these issues.

Life 360 Integration - Invalid Authentication with correct details
6 participants