Forked from jk2K/extract_realm_database_android.sh
Last active
April 11, 2017 16:28
-
-
Save wilomgfx/da3b1fe3d814c9a07fac2fd26c9de1a0 to your computer and use it in GitHub Desktop.
Revisions
-
wilomgfx revised this gist
Apr 11, 2017 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ #!/bin/bash ADB_PATH="/Users/${USER}/Library/Android/sdk/platform-tools" PACKAGE_NAME="com.yourcompany.app" DB_NAME="default.realm" DESTINATION_PATH="/Users/${USER}/Downloads/${DB_NAME}" NOT_PRESENT="List of devices attached" ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'` if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then -
tavori revised this gist
Feb 13, 2017 . 1 changed file with 7 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,13 @@ #!/bin/bash ADB_PATH="/Users/lee/Library/Android/sdk/platform-tools" PACKAGE_NAME="com.yourcompany.app" DB_NAME="default.realm" DESTINATION_PATH="/Users/lee/Downloads/${DB_NAME}" NOT_PRESENT="List of devices attached" ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'` if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then echo "Make sure a device is connected" else ${ADB_PATH}/adb exec-out run-as ${PACKAGE_NAME} cat files/${DB_NAME} > ${DESTINATION_PATH} echo "Database exported to ${DESTINATION_PATH}" fi -
medyo revised this gist
Feb 14, 2016 . No changes.There are no files selected for viewing
-
medyo created this gist
Feb 5, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ #!/bin/sh ADB_PATH="/Users/medyo/Library/Android/sdk/platform-tools" PACKAGE_NAME="com.mobiacube.elbotola.debug" DB_NAME="default.realm" DESTINATION_PATH="/Users/Medyo/Desktop/" NOT_PRESENT="List of devices attached" ADB_FOUND=`${ADB_PATH}/adb devices | tail -2 | head -1 | cut -f 1 | sed 's/ *$//g'` if [[ ${ADB_FOUND} == ${NOT_PRESENT} ]]; then echo "Make sure a device is connected" else ${ADB_PATH}/adb shell " run-as ${PACKAGE_NAME} cp /data/data/${PACKAGE_NAME}/files/${DB_NAME} /sdcard/ exit " ${ADB_PATH}/adb pull "/sdcard/${DB_NAME}" "${DESTINATION_PATH}" echo "Database exported to ${DESTINATION_PATH}${DB_NAME}" fi