Giter Club home page Giter Club logo

colornote-backup-decryptor's Introduction

ColorNote backup decryptor

ColorNote doesn’t support any kind of export (!?) and the backup format is both proprietary and encrypted using an undocumented method.

NB: If you have the app installed or have access to an android phone the alternative methods listed at the end might be simpler.

I’ve included a prebuild jar for convenience.

There is at least two versions of the backup format. I haven’t invested in figuring out a detection mechanism so trial and error is the game :)

Usage

java -jar colornote-decrypt.jar PASSWORD OFFSET < INPUT_FILE > OUTPUT_FILE

If you use oracle’s JRE (likely the case if you’re on windows) you’ll need to run the class file directly instead (send your thanks to the US for their silly encryption export restrictions… and to java for making it unbelivable hard to make a properly bundled program):

Unix:

java -cp lib/bcprov-jdk15on-154.jar:lib/bcpkix-jdk15on-154.jar:bin ColorNoteBackupDecrypt PASSWORD OFFSET < INPUT_FILE > OUTPUT_FILE

Windows: (note the different class path separators : -> ;

java -cp lib/bcprov-jdk15on-154.jar;lib/bcpkix-jdk15on-154.jar;bin ColorNoteBackupDecrypt PASSWORD OFFSET < INPUT_FILE > OUTPUT_FILE

Note: the cleanup scripts are written for linux, but this user ran them successfully using cygwin [olejorgenb#9].

The script reads from standard input and writes to standard output.

The decrypted output is json with some weird prefix and note separators (probably encoding the length of the file and individual notes). A small script attempts to clean the json.

Try both versions below. The following error message indicates that the input file uses another format version:

Exception in thread "main" java.io.IOException: javax.crypto.IllegalBlockSizeException: last block incomplete in decryption

Note: the file-extension of the backup files is sometimes .dat and sometimes .doc (might indicate the version?)

V1:

# 0000 is the default password
java -jar colornote-decrypt.jar 0000 < the-backup-file.doc | fixup-v1 > notes.json

V2:

# 0000 is the default password and 28 is a magic offset
java -jar colornote-decrypt.jar 0000 28 < the-backup-file.doc | fixup-v2 > notes.json

If the json still contains garbage, try tailing the n last lines (one note takes one line): tail -n 100 notes.json (Source)

Each fixup script is only based on a single backup file so they could be incomplete. Let me know if you have problems.

When you have the json file the next step is up to you.

Use format-notes to get a quick view of the notes or the following to get a csv format:

jq --raw-output '[.created_date, .modified_date, .title, .note] | @csv' < notes.json > notes.cvs

Alternative methods

Rooted phone

If you have root access you can get hold of the sqlite db directly: http://danyilbohdan.com/blog/colornote/

I haven’t tried it myself, but someone suggested that you could restore the backup in an emulator if you don’t have a rooted phone.

Using android’s built-in backup system to access the app-private data

Restore your encrypted backup onto a color note installation and do a full app backup using adb: (tested on v4.0.6)

adb backup -noapk com.socialnmobile.dictapps.notepad.color.note

Unpack the resulting backup.ab and you’ll have access to the colornote.db sqlite database.

(Source)

colornote-backup-decryptor's People

Contributors

olejorgenb avatar crazysqueak avatar mayank-ramnani avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.