Before requesting a new feature, please confirm the following:
I have read the wiki, and I didn't find a solution to my problem / an answer to my question.
I have searched the issues, and I didn't find a solution to my problem / an answer to my question.
If you upload an image or other content, please make sure you have read and understood the github policies and terms of services
Your issue is:
I am out of my depth, so excuse me if this seems an unreasonable question to ask or if this is the wrong place to ask just delete this. I've searched for hours and tried a lot of commands, I am trying to obtain my MB4 auth key, I've searched and searched but the terminal command keeps failing. There is a screenshot in one of the other issues of someone extracting their auth key, and as far as I can tell, I am doing it exactly as they were only with my DB name, and it's failing
What I'm doing.
at which point I get the response
system/bin/sh: sqlite3: not found
If I only type "sqlite3" and hit enter the response is:
SQLite version 3.29.0 2019-07-10 17:32:03
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite>
If I then try to enter the command from the wiki with my database name, I just continually get the response
...>
If I try to enter the command without typing su, I get
Error: Unable to open database
Is there something else I need to download? Any help would be super appreciated. I really don't want to have to use the anonymous random Chinese app to get my auth key.
Your wearable device is:
Mi Band 4
Phone is:
Moto g6, Android Pie, Magisk 19.3
@Pg214
I would not use termux since it is more than a terminal, it is more like a linux userspace tool distribution.
I would connect the phone with usb and use adb shell, then type su and do your sqlite3 stuff.
There are many other ways of obtaining the key. You could use adb root, then adb pull to get the file and open it with sqlitebrowser on a linux desktop etc.
But if you insist: while not (yet) being root, and SQLite still working, run which sqlite3. This will give you the full path. Then, when being root, use that full path instead of just sqlite3.
And of course you cannot open the database without being root (or com.xiaomi.hm.health, which owns it). That's the idea behind "sandboxing" and Linux permissions. Otherwise apps could steal other apps' data ad libitum, which nobody (except the hackers and data collectors) would want.
So, as your question is rather about "Linux basics" than something specific to Gadgetbridge, I'm closing this issue. Hope our answers solved it anyway 馃槈
Most helpful comment
@Pg214
I would not use termux since it is more than a terminal, it is more like a linux userspace tool distribution.
I would connect the phone with usb and use adb shell, then type su and do your sqlite3 stuff.
There are many other ways of obtaining the key. You could use adb root, then adb pull to get the file and open it with sqlitebrowser on a linux desktop etc.