You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/SETUP.md
+68-1Lines changed: 68 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,14 +39,81 @@ Setup
39
39
40
40
## Android
41
41
42
+
43
+
### Capture https traffic
44
+
42
45
Only requires an Android device. Root not required, this captures the stream from the Android application to the Jinvoo/Tuya web servers. It does NOT capture between Android device and remote control device.
43
46
44
47
1) Remove registration for existing device if present
45
48
46
49
2) Install "Packet Capture" https://play.google.com/store/apps/details?id=app.greyshirts.sslcapture (follow instructions, install cert, then start capturing, its possibly to use the green triangle/play button with a "1" on it to only capture from the Jinvoo app).
47
50
48
-
3) Run Jinvoo Smart App to (re-)add device.
51
+
3) Run Jinvoo Smart App (https://play.google.com/store/apps/details?id=com.xenon.jinvoo version 1.0.3 known to work) to (re-)add device.
49
52
50
53
4) Hit stop button back in "Packet Capture" app.
51
54
52
55
5) review captured packets (first or last large one, 9Kb of 16Kb) use macOS step 11 for guide.
56
+
57
+
### Extract details from android config file
58
+
59
+
60
+
#### Smart Life App
61
+
From https://github.com/codetheweb/tuyapi/issues/5#issuecomment-352932467
62
+
63
+
If you have a rooted Android phone, you can retrieve the settings from the app (Smart Life) data storage. The keys/configured devices are located at /data/data/com.tuya.smartlife/shared_prefs/dev_data_storage.xml
64
+
65
+
There's a string in there (the only data) called "tuya_data". You need to html entity decode the string and it contains a JSON string (yes, this is slightly ridiculous). Inside the JSON string are the keys.
66
+
67
+
#### Jinvoo Smart App
68
+
69
+
The Jinvoo SMart app is similar to the Smart Life app but has a slightly different location. `/data/data/com.xenon.jinvoo/shared_prefs/gw_storage.xml`. Python script to dump out the information along with useful schema information:
70
+
71
+
#!/usr/bin/env python
72
+
# -*- coding: us-ascii -*-
73
+
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
74
+
#
75
+
76
+
import codecs
77
+
import os
78
+
import json
79
+
import xml.etree.ElementTree as ET
80
+
81
+
try:
82
+
# Python 2.6-2.7
83
+
from HTMLParser import HTMLParser
84
+
except ImportError:
85
+
# Python 3
86
+
from html.parser import HTMLParser ## FIXME use html.unescape()?
0 commit comments