diff --git a/decrypt_db.sh b/decrypt_db.sh
index fed9737..fd3cd9a 100755
--- a/decrypt_db.sh
+++ b/decrypt_db.sh
@@ -25,14 +25,15 @@ fi
KEY=$(echo -n "$imei$uin" | $MD5SUM | cut -b 1-7)
echo "KEY: $KEY"
+uname | grep Darwin > /dev/null || os=linux && os=darwin
uname -m | grep x86_64 > /dev/null || version=32bit && version=64bit
-echo "Use $version sqlcipher."
+echo "Use $version sqlcipher of $os."
echo "Dump decrypted database... "
echo "Don't worry about libcrypt.so version warning."
-SQLCIPHER=./sqlcipher/$version
+SQLCIPHER=./sqlcipher/$os/$version
export LD_LIBRARY_PATH=$SQLCIPHER
$SQLCIPHER/sqlcipher $MSGDB << EOF
PRAGMA key='$KEY';
diff --git a/sqlcipher/darwin/64bit/.libs/libsqlite3.0.dylib b/sqlcipher/darwin/64bit/.libs/libsqlite3.0.dylib
new file mode 100755
index 0000000..a417892
Binary files /dev/null and b/sqlcipher/darwin/64bit/.libs/libsqlite3.0.dylib differ
diff --git a/sqlcipher/darwin/64bit/.libs/libsqlite3.0.dylib.dSYM/Contents/Info.plist b/sqlcipher/darwin/64bit/.libs/libsqlite3.0.dylib.dSYM/Contents/Info.plist
new file mode 100644
index 0000000..bcb0773
--- /dev/null
+++ b/sqlcipher/darwin/64bit/.libs/libsqlite3.0.dylib.dSYM/Contents/Info.plist
@@ -0,0 +1,20 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleIdentifier
+ com.apple.xcode.dsym.libsqlite3.0.dylib
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ dSYM
+ CFBundleSignature
+ ????
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1
+
+
diff --git a/sqlcipher/darwin/64bit/.libs/libsqlite3.0.dylib.dSYM/Contents/Resources/DWARF/libsqlite3.0.dylib b/sqlcipher/darwin/64bit/.libs/libsqlite3.0.dylib.dSYM/Contents/Resources/DWARF/libsqlite3.0.dylib
new file mode 100644
index 0000000..2dd31cf
Binary files /dev/null and b/sqlcipher/darwin/64bit/.libs/libsqlite3.0.dylib.dSYM/Contents/Resources/DWARF/libsqlite3.0.dylib differ
diff --git a/sqlcipher/darwin/64bit/.libs/libsqlite3.a b/sqlcipher/darwin/64bit/.libs/libsqlite3.a
new file mode 100644
index 0000000..29f32a7
Binary files /dev/null and b/sqlcipher/darwin/64bit/.libs/libsqlite3.a differ
diff --git a/sqlcipher/darwin/64bit/.libs/libsqlite3.dylib b/sqlcipher/darwin/64bit/.libs/libsqlite3.dylib
new file mode 100755
index 0000000..a417892
Binary files /dev/null and b/sqlcipher/darwin/64bit/.libs/libsqlite3.dylib differ
diff --git a/sqlcipher/darwin/64bit/.libs/libsqlite3.la b/sqlcipher/darwin/64bit/.libs/libsqlite3.la
new file mode 100644
index 0000000..28589d3
--- /dev/null
+++ b/sqlcipher/darwin/64bit/.libs/libsqlite3.la
@@ -0,0 +1,41 @@
+# libsqlite3.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.6
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='libsqlite3.0.dylib'
+
+# Names of this library.
+library_names='libsqlite3.0.dylib libsqlite3.dylib'
+
+# The name of the static archive.
+old_library='libsqlite3.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lcrypto'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libsqlite3.
+current=8
+age=8
+revision=6
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib'
diff --git a/sqlcipher/darwin/64bit/.libs/libsqlite3.lai b/sqlcipher/darwin/64bit/.libs/libsqlite3.lai
new file mode 100644
index 0000000..a403829
--- /dev/null
+++ b/sqlcipher/darwin/64bit/.libs/libsqlite3.lai
@@ -0,0 +1,41 @@
+# libsqlite3.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.6
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='libsqlite3.0.dylib'
+
+# Names of this library.
+library_names='libsqlite3.0.dylib libsqlite3.dylib'
+
+# The name of the static archive.
+old_library='libsqlite3.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' -lcrypto'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libsqlite3.
+current=8
+age=8
+revision=6
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/usr/local/lib'
diff --git a/sqlcipher/darwin/64bit/.libs/libtclsqlite3.a b/sqlcipher/darwin/64bit/.libs/libtclsqlite3.a
new file mode 100644
index 0000000..cd08770
Binary files /dev/null and b/sqlcipher/darwin/64bit/.libs/libtclsqlite3.a differ
diff --git a/sqlcipher/darwin/64bit/.libs/libtclsqlite3.dylib b/sqlcipher/darwin/64bit/.libs/libtclsqlite3.dylib
new file mode 100755
index 0000000..6bb350a
Binary files /dev/null and b/sqlcipher/darwin/64bit/.libs/libtclsqlite3.dylib differ
diff --git a/sqlcipher/darwin/64bit/.libs/libtclsqlite3.dylib.dSYM/Contents/Info.plist b/sqlcipher/darwin/64bit/.libs/libtclsqlite3.dylib.dSYM/Contents/Info.plist
new file mode 100644
index 0000000..21ed79d
--- /dev/null
+++ b/sqlcipher/darwin/64bit/.libs/libtclsqlite3.dylib.dSYM/Contents/Info.plist
@@ -0,0 +1,20 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ English
+ CFBundleIdentifier
+ com.apple.xcode.dsym.libtclsqlite3.dylib
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundlePackageType
+ dSYM
+ CFBundleSignature
+ ????
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1
+
+
diff --git a/sqlcipher/darwin/64bit/.libs/libtclsqlite3.dylib.dSYM/Contents/Resources/DWARF/libtclsqlite3.dylib b/sqlcipher/darwin/64bit/.libs/libtclsqlite3.dylib.dSYM/Contents/Resources/DWARF/libtclsqlite3.dylib
new file mode 100644
index 0000000..dd01e56
Binary files /dev/null and b/sqlcipher/darwin/64bit/.libs/libtclsqlite3.dylib.dSYM/Contents/Resources/DWARF/libtclsqlite3.dylib differ
diff --git a/sqlcipher/darwin/64bit/.libs/libtclsqlite3.la b/sqlcipher/darwin/64bit/.libs/libtclsqlite3.la
new file mode 100644
index 0000000..4794e65
--- /dev/null
+++ b/sqlcipher/darwin/64bit/.libs/libtclsqlite3.la
@@ -0,0 +1,42 @@
+# libtclsqlite3.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.6
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='libtclsqlite3.dylib'
+
+# Names of this library.
+library_names='libtclsqlite3.dylib libtclsqlite3.dylib'
+
+# The name of the static archive.
+old_library='libtclsqlite3.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' /Users/vuryleo/Projects/sqlcipher/libsqlite3.la -lcrypto -L/System/Library/Frameworks/Tcl.framework/Versions/8.5 -ltclstub8.5'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libtclsqlite3.
+current=8
+age=8
+revision=6
+
+# Is this an already installed library?
+installed=no
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/sqlite3'
+relink_command=""
diff --git a/sqlcipher/darwin/64bit/.libs/libtclsqlite3.lai b/sqlcipher/darwin/64bit/.libs/libtclsqlite3.lai
new file mode 100644
index 0000000..158bf8a
--- /dev/null
+++ b/sqlcipher/darwin/64bit/.libs/libtclsqlite3.lai
@@ -0,0 +1,41 @@
+# libtclsqlite3.la - a libtool library file
+# Generated by ltmain.sh (GNU libtool) 2.2.6
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='libtclsqlite3.dylib'
+
+# Names of this library.
+library_names='libtclsqlite3.dylib libtclsqlite3.dylib'
+
+# The name of the static archive.
+old_library='libtclsqlite3.a'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags=''
+
+# Libraries that this one depends upon.
+dependency_libs=' /usr/local/lib/libsqlite3.la -lcrypto -L/System/Library/Frameworks/Tcl.framework/Versions/8.5 -ltclstub8.5'
+
+# Names of additional weak libraries provided by this library
+weak_library_names=''
+
+# Version information for libtclsqlite3.
+current=8
+age=8
+revision=6
+
+# Is this an already installed library?
+installed=yes
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=no
+
+# Files to dlopen/dlpreopen
+dlopen=''
+dlpreopen=''
+
+# Directory that this library needs to be installed in:
+libdir='/System/Library/Frameworks/Tcl.framework/Versions/8.5/Resources/Scripts/sqlite3'
diff --git a/sqlcipher/darwin/64bit/.libs/sqlite3 b/sqlcipher/darwin/64bit/.libs/sqlite3
new file mode 100755
index 0000000..6edeab1
Binary files /dev/null and b/sqlcipher/darwin/64bit/.libs/sqlite3 differ
diff --git a/sqlcipher/darwin/64bit/.libs/sqlite3.o b/sqlcipher/darwin/64bit/.libs/sqlite3.o
new file mode 100644
index 0000000..a080eef
Binary files /dev/null and b/sqlcipher/darwin/64bit/.libs/sqlite3.o differ
diff --git a/sqlcipher/darwin/64bit/.libs/tclsqlite.o b/sqlcipher/darwin/64bit/.libs/tclsqlite.o
new file mode 100644
index 0000000..52b876a
Binary files /dev/null and b/sqlcipher/darwin/64bit/.libs/tclsqlite.o differ
diff --git a/sqlcipher/darwin/64bit/sqlcipher b/sqlcipher/darwin/64bit/sqlcipher
new file mode 100755
index 0000000..8546113
--- /dev/null
+++ b/sqlcipher/darwin/64bit/sqlcipher
@@ -0,0 +1,130 @@
+#! /bin/sh
+
+# sqlite3 - temporary wrapper script for .libs/sqlite3
+# Generated by ltmain.sh (GNU libtool) 2.2.6
+#
+# The sqlite3 program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='/opt/local/bin/gsed -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=""
+
+# This environment variable determines our operation mode.
+if test "$libtool_install_magic" = "%%%MAGIC variable%%%"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='2.2.6'
+ notinst_deplibs=' libsqlite3.la'
+else
+ # When we are sourced in execute mode, $file and $ECHO are already set.
+ if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
+ ECHO="/bin/echo"
+ file="$0"
+ # Make sure echo works.
+ if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+ # Yippee, $ECHO works!
+ :
+ else
+ # Restart under the correct shell, and then maybe $ECHO will work.
+ exec /bin/sh "$0" --no-reexec ${1+"$@"}
+ fi
+ fi
+
+ # Find the directory that this script lives in.
+ thisdir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "x$thisdir" = "x$file" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=`ls -ld "$file" | /opt/local/bin/gsed -n 's/.*-> //p'`
+ while test -n "$file"; do
+ destdir=`$ECHO "X$file" | $Xsed -e 's%/[^/]*$%%'`
+
+ # If there was a directory component, then change thisdir.
+ if test "x$destdir" != "x$file"; then
+ case "$destdir" in
+ [\\/]* | [A-Za-z]:[\\/]*) thisdir="$destdir" ;;
+ *) thisdir="$thisdir/$destdir" ;;
+ esac
+ fi
+
+ file=`$ECHO "X$file" | $Xsed -e 's%^.*/%%'`
+ file=`ls -ld "$thisdir/$file" | /opt/local/bin/gsed -n 's/.*-> //p'`
+ done
+
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=no
+ if test "$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR" = "yes"; then
+ # special case for '.'
+ if test "$thisdir" = "."; then
+ thisdir=`pwd`
+ fi
+ # remove .libs from thisdir
+ case "$thisdir" in
+ *[\\/].libs ) thisdir=`$ECHO "X$thisdir" | $Xsed -e 's%[\\/][^\\/]*$%%'` ;;
+ .libs ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=`cd "$thisdir" && pwd`
+ test -n "$absdir" && thisdir="$absdir"
+
+ program='sqlite3'
+ progdir="$thisdir/.libs"
+
+
+ if test -f "$progdir/$program"; then
+ # Add our own library path to DYLD_LIBRARY_PATH
+ DYLD_LIBRARY_PATH="/Users/vuryleo/Projects/sqlcipher/.libs:$DYLD_LIBRARY_PATH"
+
+ # Some systems cannot cope with colon-terminated DYLD_LIBRARY_PATH
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ DYLD_LIBRARY_PATH=`$ECHO "X$DYLD_LIBRARY_PATH" | $Xsed -e 's/::*$//'`
+
+ export DYLD_LIBRARY_PATH
+
+ if test "$libtool_execute_magic" != "%%%MAGIC variable%%%"; then
+ # Run the actual program with our arguments.
+
+ exec "$progdir/$program" ${1+"$@"}
+
+ $ECHO "$0: cannot exec $program $*" 1>&2
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ $ECHO "$0: error: \`$progdir/$program' does not exist" 1>&2
+ $ECHO "This script is just a wrapper for $program." 1>&2
+ /bin/echo "See the libtool documentation for more information." 1>&2
+ exit 1
+ fi
+fi
diff --git a/sqlcipher/32bit/libsqlcipher.so.0 b/sqlcipher/linux/32bit/libsqlcipher.so.0
similarity index 100%
rename from sqlcipher/32bit/libsqlcipher.so.0
rename to sqlcipher/linux/32bit/libsqlcipher.so.0
diff --git a/sqlcipher/32bit/sqlcipher b/sqlcipher/linux/32bit/sqlcipher
similarity index 100%
rename from sqlcipher/32bit/sqlcipher
rename to sqlcipher/linux/32bit/sqlcipher
diff --git a/sqlcipher/64bit/libsqlcipher.so.0 b/sqlcipher/linux/64bit/libsqlcipher.so.0
similarity index 100%
rename from sqlcipher/64bit/libsqlcipher.so.0
rename to sqlcipher/linux/64bit/libsqlcipher.so.0
diff --git a/sqlcipher/64bit/sqlcipher b/sqlcipher/linux/64bit/sqlcipher
similarity index 100%
rename from sqlcipher/64bit/sqlcipher
rename to sqlcipher/linux/64bit/sqlcipher