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

use upstream android_backup #101

Merged
merged 3 commits into from
Nov 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 0 additions & 226 deletions miio/android_backup.py

This file was deleted.

4 changes: 2 additions & 2 deletions miio/extract_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from Crypto.Cipher import AES
from pprint import pformat as pf
import attr
from .android_backup import AndroidBackup
from android_backup import AndroidBackup

logging.basicConfig(level=logging.INFO)
_LOGGER = logging.getLogger(__name__)
Expand Down Expand Up @@ -111,7 +111,7 @@ def main(backup, write_to_disk, password, dump_all, dump_raw):
reader = BackupDatabaseReader(dump_raw)
if backup.endswith(".ab"):
DBFILE = "apps/com.xiaomi.smarthome/db/miio2.db"
with AndroidBackup(backup) as f:
with AndroidBackup(backup, stream=False) as f:
tar = f.read_data(password)
try:
db = tar.extractfile(DBFILE)
Expand Down
11 changes: 9 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,15 @@
packages=["miio", "mirobo"],

python_requires='>=3.4',
install_requires=['construct', 'click', 'cryptography', 'pretty_cron',
'typing', 'zeroconf', 'pycrypto', 'attrs', 'pytz'],
install_requires=['construct',
'click',
'cryptography',
'pretty_cron',
'typing',
'zeroconf',
'pycrypto',
'attrs',
'android_backup'],

entry_points={
'console_scripts': [
Expand Down