mirror of
https://github.com/mbirth/tcl_ota_check.git
synced 2024-11-10 06:16:46 +00:00
Added latest OTA version to prds.txt, modified new OTA check to use that
version. New FULL check with AAA000 so catches all versions.
This commit is contained in:
parent
2093579207
commit
13dc245291
76
prds.txt
76
prds.txt
@ -1,38 +1,38 @@
|
|||||||
PRD-63116-001 Unlocked BBB100-1 (USA)
|
PRD-63116-001 AAO472 Unlocked BBB100-1 (USA)
|
||||||
PRD-63116-003 Bell BBB100-1
|
PRD-63116-003 AAN517 Bell BBB100-1
|
||||||
PRD-63116-005 Rogers BBB100-1
|
PRD-63116-005 AAN517 Rogers BBB100-1
|
||||||
PRD-63116-007 BBB100-1
|
PRD-63116-007 AAM625 BBB100-1
|
||||||
PRD-63116-009 BBB100-1
|
PRD-63116-009 AAN358 BBB100-1
|
||||||
PRD-63116-010 BBB100-1
|
PRD-63116-010 AAN358 BBB100-1
|
||||||
PRD-63116-013 BBB100-1
|
PRD-63116-013 AAN358 BBB100-1
|
||||||
PRD-63116-017 BBB100-1
|
PRD-63116-017 AAM481 BBB100-1
|
||||||
PRD-63116-020 BBB100-1
|
PRD-63116-020 AAN358 BBB100-1
|
||||||
PRD-63116-021 BBB100-1 (HK?)
|
PRD-63116-021 AAN358 BBB100-1 (HK?)
|
||||||
PRD-63116-023 BBB100-1
|
PRD-63116-023 AAN358 BBB100-1
|
||||||
PRD-63116-024 BBB100-1
|
PRD-63116-024 AAN358 BBB100-1
|
||||||
PRD-63116-027 BBB100-1
|
PRD-63116-027 AAN057 BBB100-1
|
||||||
PRD-63116-033 BBB100-1
|
PRD-63116-033 AAM481 BBB100-1
|
||||||
PRD-63116-036 AT&T BBB100-1
|
PRD-63116-036 AAN596 AT&T BBB100-1
|
||||||
PRD-63117-003 BBB100-2 (UK)
|
PRD-63117-003 AAM481 BBB100-2 (UK)
|
||||||
PRD-63117-011 QWERTZ BBB100-2 (Germany)
|
PRD-63117-011 AAN358 QWERTZ BBB100-2 (Germany)
|
||||||
PRD-63117-015 BBB100-2 (NL, Belgium)
|
PRD-63117-015 AAN358 BBB100-2 (NL, Belgium)
|
||||||
PRD-63117-019 BBB100-2
|
PRD-63117-019 AAN358 BBB100-2
|
||||||
PRD-63117-023 AZERTY BBB100-2 (Belgium)
|
PRD-63117-023 AAN358 AZERTY BBB100-2 (Belgium)
|
||||||
PRD-63117-025 BBB100-2
|
PRD-63117-025 AAN358 BBB100-2
|
||||||
PRD-63117-027 QWERTY BBB100-2 (UAE) https://forums.crackberry.com/showthread.php?t=1112475&p=12973537&viewfull=1#post12973537
|
PRD-63117-027 AAN358 QWERTY BBB100-2 (UAE) https://forums.crackberry.com/showthread.php?t=1112475&p=12973537&viewfull=1#post12973537
|
||||||
PRD-63117-028 BBB100-2
|
PRD-63117-028 AAN358 BBB100-2
|
||||||
PRD-63117-029 BBB100-2
|
PRD-63117-029 AAN358 BBB100-2
|
||||||
PRD-63117-034 BBB100-2
|
PRD-63117-034 AAO472 BBB100-2
|
||||||
PRD-63117-036 BBB100-2
|
PRD-63117-036 AAN358 BBB100-2
|
||||||
PRD-63117-037 BBB100-2
|
PRD-63117-037 AAN358 BBB100-2
|
||||||
PRD-63117-041 BBB100-2
|
PRD-63117-041 AAN358 BBB100-2
|
||||||
PRD-63117-042 BBB100-2
|
PRD-63117-042 AAN358 BBB100-2
|
||||||
PRD-63117-703 Prerelease BBB100-2?
|
PRD-63117-703 AAK199 Prerelease BBB100-2?
|
||||||
PRD-63117-704 Prerelease BBB100-2?
|
PRD-63117-704 AAK199 Prerelease BBB100-2?
|
||||||
PRD-63117-717 Prerelease BBB100-2?
|
PRD-63117-717 AAN358 Prerelease BBB100-2?
|
||||||
PRD-63118-001 Unlocked BBB100-3
|
PRD-63118-001 AAL093 Unlocked BBB100-3
|
||||||
PRD-63118-003 Sprint BBB100-3
|
PRD-63118-003 AAN982 Sprint BBB100-3
|
||||||
PRD-63734-001 Unlocked BBB100-4/5
|
PRD-63734-001 AAO472 Unlocked BBB100-4/5
|
||||||
PRD-63734-002 Unlocked BBB100-4/5
|
PRD-63734-002 AAO472 Unlocked BBB100-4/5
|
||||||
PRD-63763-001 Unlocked BBB100-6
|
PRD-63763-001 AAO472 Unlocked BBB100-6
|
||||||
PRD-63764-001 Unlocked BBB100-7
|
PRD-63764-001 AAN358 Unlocked BBB100-7
|
||||||
|
@ -12,20 +12,19 @@ fc = tcllib.FotaCheck()
|
|||||||
fc.serid = "3531510"
|
fc.serid = "3531510"
|
||||||
fc.fv = "AAM481"
|
fc.fv = "AAM481"
|
||||||
#fc.osvs = "7.1.1"
|
#fc.osvs = "7.1.1"
|
||||||
fc.mode = fc.MODE_FULL
|
fc.mode = fc.MODE_OTA
|
||||||
|
|
||||||
# CLTP = 10 (only show actual updates or HTTP 206) / 2010 (always show latest version for MODE_FULL)
|
# CLTP = 10 (only show actual updates or HTTP 206) / 2010 (always show latest version for MODE_FULL)
|
||||||
fc.cltp = 10
|
fc.cltp = 10
|
||||||
#fc.cltp = 2010
|
|
||||||
|
|
||||||
print("List of latest {} firmware by PRD:".format("FULL" if fc.mode == fc.MODE_FULL else "OTA (from {})".format(fc.fv)))
|
print("List of latest OTA (from {}) firmware by PRD:".format(fc.fv))
|
||||||
|
|
||||||
with open("prds.txt", "r") as afile:
|
with open("prds.txt", "r") as afile:
|
||||||
prdx = afile.read()
|
prdx = afile.read()
|
||||||
prds = list(filter(None, prdx.split("\n")))
|
prds = list(filter(None, prdx.split("\n")))
|
||||||
|
|
||||||
while len(prds) > 0:
|
while len(prds) > 0:
|
||||||
prd, model = prds[0].split(" ", 1)
|
prd, lastver, model = prds[0].split(" ", 2)
|
||||||
try:
|
try:
|
||||||
fc.reset_session()
|
fc.reset_session()
|
||||||
fc.curef = prd
|
fc.curef = prd
|
||||||
|
49
tclcheck_allfull.py
Normal file
49
tclcheck_allfull.py
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# pylint: disable=C0111,C0326
|
||||||
|
|
||||||
|
import tcllib
|
||||||
|
from requests.exceptions import RequestException, Timeout
|
||||||
|
|
||||||
|
ANSI_UP_DEL = u"\u001b[F\u001b[K"
|
||||||
|
|
||||||
|
fc = tcllib.FotaCheck()
|
||||||
|
fc.serid = "3531510"
|
||||||
|
fc.fv = "AAA000"
|
||||||
|
fc.mode = fc.MODE_FULL
|
||||||
|
|
||||||
|
# CLTP = 10 (only show actual updates or HTTP 206) / 2010 (always show latest version for MODE_FULL)
|
||||||
|
#fc.cltp = 10
|
||||||
|
fc.cltp = 2010
|
||||||
|
|
||||||
|
print("List of latest FULL firmware by PRD:")
|
||||||
|
|
||||||
|
with open("prds.txt", "r") as afile:
|
||||||
|
prdx = afile.read()
|
||||||
|
prds = list(filter(None, prdx.split("\n")))
|
||||||
|
|
||||||
|
while len(prds) > 0:
|
||||||
|
prd, lastver, model = prds[0].split(" ", 2)
|
||||||
|
try:
|
||||||
|
fc.reset_session()
|
||||||
|
fc.curef = prd
|
||||||
|
check_xml = fc.do_check()
|
||||||
|
curef, fv, tv, fw_id, fileid, fn, fsize, fhash = fc.parse_check(check_xml)
|
||||||
|
txt_tv = tv
|
||||||
|
if fc.mode == fc.MODE_OTA:
|
||||||
|
txt_tv = "{} ⇨ {}".format(fv, tv)
|
||||||
|
print("{}: {} {} ({})".format(prd, txt_tv, fhash, model))
|
||||||
|
prds.pop(0)
|
||||||
|
except Timeout as e:
|
||||||
|
print("{} failed. (Connection timed out.)".format(prd))
|
||||||
|
print(ANSI_UP_DEL, end="")
|
||||||
|
continue
|
||||||
|
except (SystemExit, RequestException) as e:
|
||||||
|
print("{} failed. ({})".format(prd, str(e)))
|
||||||
|
if e.response.status_code in [204, 404]:
|
||||||
|
# No update available or invalid request - remove from queue
|
||||||
|
prds.pop(0)
|
||||||
|
else:
|
||||||
|
print(ANSI_UP_DEL, end="")
|
||||||
|
continue
|
47
tclcheck_allota.py
Normal file
47
tclcheck_allota.py
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# pylint: disable=C0111,C0326
|
||||||
|
|
||||||
|
import tcllib
|
||||||
|
from requests.exceptions import RequestException, Timeout
|
||||||
|
|
||||||
|
ANSI_UP_DEL = u"\u001b[F\u001b[K"
|
||||||
|
|
||||||
|
fc = tcllib.FotaCheck()
|
||||||
|
fc.serid = "3531510"
|
||||||
|
#fc.osvs = "7.1.1"
|
||||||
|
fc.mode = fc.MODE_OTA
|
||||||
|
fc.cltp = 10
|
||||||
|
|
||||||
|
print("List of latest OTA firmware by PRD:".format(fc.fv))
|
||||||
|
|
||||||
|
with open("prds.txt", "r") as afile:
|
||||||
|
prdx = afile.read()
|
||||||
|
prds = list(filter(None, prdx.split("\n")))
|
||||||
|
|
||||||
|
while len(prds) > 0:
|
||||||
|
prd, lastver, model = prds[0].split(" ", 2)
|
||||||
|
try:
|
||||||
|
fc.reset_session()
|
||||||
|
fc.curef = prd
|
||||||
|
fc.fv = lastver
|
||||||
|
check_xml = fc.do_check()
|
||||||
|
curef, fv, tv, fw_id, fileid, fn, fsize, fhash = fc.parse_check(check_xml)
|
||||||
|
txt_tv = tv
|
||||||
|
if fc.mode == fc.MODE_OTA:
|
||||||
|
txt_tv = "{} ⇨ {}".format(fv, tv)
|
||||||
|
print("{}: {} {} ({})".format(prd, txt_tv, fhash, model))
|
||||||
|
prds.pop(0)
|
||||||
|
except Timeout as e:
|
||||||
|
print("{} failed. (Connection timed out.)".format(prd))
|
||||||
|
print(ANSI_UP_DEL, end="")
|
||||||
|
continue
|
||||||
|
except (SystemExit, RequestException) as e:
|
||||||
|
print("{} ({}) failed. ({})".format(prd, lastver, str(e)))
|
||||||
|
if e.response.status_code in [204, 404]:
|
||||||
|
# No update available or invalid request - remove from queue
|
||||||
|
prds.pop(0)
|
||||||
|
else:
|
||||||
|
print(ANSI_UP_DEL, end="")
|
||||||
|
continue
|
Loading…
Reference in New Issue
Block a user