Skip to content

Instantly share code, notes, and snippets.

@eviljeff
Created October 29, 2014 17:50
Show Gist options
  • Save eviljeff/c813d86c22aab09ee731 to your computer and use it in GitHub Desktop.
Save eviljeff/c813d86c22aab09ee731 to your computer and use it in GitHub Desktop.
quickpush.sh
#!/bin/sh
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#
# This program replaces the certificate database on a device with the contents
# of a local certificate database. Usually it is used in conjunction with the
# other scripts in this directory as described in ./README.txt.
set -e
certdbdir="certdb.tmp"
if [ ! -d "$certdbdir" ]; then
echo input certdb directory "$certdbdir" does not exist
exit 1
fi
echo "hello1"
profile=`adb shell ls data/b2g/mozilla | tr -d '\\r' | grep "\.default$"`
if [ -z "profile" ]; then
echo "No user profile found on device"
exit 1
fi
echo "hello2"
adb push "$certdbdir/cert9.db" data/b2g/mozilla/$profile/cert9.db
adb push "$certdbdir/key4.db" data/b2g/mozilla/$profile/key4.db
adb push "$certdbdir/pkcs11.txt" data/b2g/mozilla/$profile/pkcs11.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment