Skip to content

Decrypt `update.upx` the encrypted ROM update package released by Onyx Boox, so as to get the zip format update package which can be read by Recovery directly

License

phhusson/decryptBooxUpdateUpx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 

Repository files navigation

decrypt Boox Update Upx

Have been tested only in these Boox ereaders. If you found it available for any other Boox ereader, please submit an issue or pull request, with the strings following.

Note1: There is also another method to fetch decrypted update.zip from @shunf4.

Note2: There is a way to get downloading url of latest firmware.

Any other issue and pull request is also welcomed!

The detail of algorithm (Simplified Chinese)

How to run?

Python3 should be installed to run the script, and pycryptodomex a dependency of the script should also be installed:

(BTW: in some environments, the following pip and python should be replaced with pip3 and python3)

pip install pycryptodomex

You can run the application by putting update.upx file in the project directory and running

python DeBooxUpx.py <device model> [input file name]

<device model> is required, [input file name] is optional.
For list of currently supported models please refer to the table.

API

There is a python class DeBooxUpx in DeBooxUpx.py to decrypt update.upx, and dict boox_strings where there are known strings.

Following is a example to use this class to decrypt the update.upx of Boox Nove Pro:

from DeBooxUpx import DeBooxUpx, boox_strings
model = 'NovaPro'
updateUpxPath = 'update.upx'
decryptedPath = 'update.zip'

decrypter = DeBooxUpx(**boox_strings[model])
print('When updating, the device decrypt update package into', decrypter.path)
decrypter.deUpx(updateUpxPath, decryptedPath)

Or for manually setting strings:

from DeBooxUpx import DeBooxUpx

MODEL = "NovaPro" 
STRING_7F00500 = "j857wYAQcWZgvIEQ/tcQqzxreUJgFHwJl6D2TN9BuSkQ" 
STRING_7F00501 = "+soGw/YVdGIRJiAs5SMmv1ihW37H1Fa9+/1w2Vgt14Ag" 
STRING_7F00502 = "lpsj9NJ8Kzv8jHb+OO8A5lxC+9Zhl243bFmDZYaF" 
updateUpxPath = 'update.upx'
decryptedPath = 'update.zip'

decrypter = DeBooxUpx(MODEL, STRING_7F00500, STRING_7F00501, STRING_7F00502)
print('When updating, the device decrypt update package into', decrypter.path)
decrypter.deUpx(updateUpxPath, decryptedPath)

The strings

MOD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1+jxTFOred3te4z9 zEf3SZ8TOADA8QuwOHicGLrrc4EA7sffKfc01TlUfe/q pmXVBMt5EllxXhD9L6/NWH/pTZXRURP6QLsrNlx6
Poke3 Poke3 lU95mOkt0cGucrsrIdAWuYnoJEnTTfIvu/QNUlcmI42A kjl4lOMqobWYQyqX4KzBGYS8Q0OwPSfqwf29ymkypULP iW9b2bszjJhv3puv87HNQXLW3Fb5uQVhWnnKU4nV

Some or all of the firmwares for the Onyx readers sold in Russia don't use the same strings with their international versions!

How to get the strings

MODEL string is the model name, exactly the output of getprop ro.product.model and/or value of ro.product.model in the file /system/build.prop.

Other strings can be got in following steps:

  1. Get /system/app/OnyxOtaService/OnyxOtaService.apk

    USB Debugging (adb) is one of the the available ways:

    1. Turn on adb in Settings -> Applications -> USB Debugging Mode

    2. (from @mgrub's note) Connect the ebook to computer by usb, run

      adb wait-for-device
      adb shell 'pm list packages -f | grep ota'

      And then the path of ota package will be showed. For example, the following output is in Nova Pro:

      package:/system/app/OnyxOtaService/OnyxOtaService.apk=com.onyx.android.onyxotaservice
      

      So in this case the path is /system/app/OnyxOtaService/OnyxOtaService.apk.

      In the following steps, we assume that the path is /system/app/OnyxOtaService/OnyxOtaService.apk.

    3. Run the following command

      adb pull /system/app/OnyxOtaService/OnyxOtaService.apk .

    Now the apk is got.

  2. Get the strings from apk

    1. Use Apktool to decode the apk:
      apktool d OnyxOtaService.apk
    2. Now the strings should be in ./OnyxOtaService/res/values/strings.xml, for example the NovaPro one:
      <?xml version="1.0" encoding="utf-8"?>
      <resources>
          <string name="settings">j857wYAQcWZgvIEQ/tcQqzxreUJgFHwJl6D2TN9BuSkQ</string>
          <string name="upgrade">+soGw/YVdGIRJiAs5SMmv1ihW37H1Fa9+/1w2Vgt14Ag</string>
          <string name="local">lpsj9NJ8Kzv8jHb+OO8A5lxC+9Zhl243bFmDZYaF</string>
          
      </resources>

    settings is STRING_7F00500, upgrade is STRING_7F00501, and local is STRING_7F00502

About

Decrypt `update.upx` the encrypted ROM update package released by Onyx Boox, so as to get the zip format update package which can be read by Recovery directly

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%