mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-22 01:16:14 +00:00
add compatibility with mypeugeot 1.26.2
This commit is contained in:
@@ -31,7 +31,7 @@ We need to get credentials from the MyPeugeot app. You have two solutions :
|
||||
|
||||
To do that you can follow this guide: https://forum.xda-developers.com/android/software-hacking/guide-how-to-enable-adb-backup-app-t3495117
|
||||
The original app can be downloaded [here](https://apkpure.com/fr/mypeugeot-app/com.psa.mym.mypeugeot) for example.
|
||||
You should download Mypeugeot 1.25.2, higher versions doesn't seems to work
|
||||
I tested Mypeugeot version 1.25.2 and 1.26.2.
|
||||
|
||||
1.2 Uninstall the original app
|
||||
|
||||
|
||||
+13
-1
@@ -8,6 +8,7 @@ from MyPSACC import MyPSACC
|
||||
from sys import argv
|
||||
import tarfile
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
|
||||
def getxmlvalue(root, name):
|
||||
@@ -56,7 +57,18 @@ else:
|
||||
#get remote token
|
||||
root = ET.parse("HUTokenManager.xml").getroot()
|
||||
remote_enc = root[0].text
|
||||
remote_refresh_token = json.loads(base64.b64decode(remote_enc))["refresh_token"]
|
||||
remote_dec = json.loads(base64.b64decode(remote_enc))
|
||||
try:
|
||||
if "refresh_token" in remote_dec:
|
||||
remote_refresh_token = remote_dec["refresh_token"]
|
||||
else:
|
||||
remote_refresh_token = next(iter(remote_dec.values()))["refresh_token"]
|
||||
# Mypeugeot >= 1.26
|
||||
except:
|
||||
traceback.print_exc()
|
||||
print(remote_dec)
|
||||
|
||||
|
||||
|
||||
client_email = input("mypeugeot email: ")
|
||||
client_paswword = input("mypeugeot password: ")
|
||||
|
||||
Reference in New Issue
Block a user