diff --git a/README.md b/README.md index 4db1feb..6401dd2 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ How-to Save the script somewhere on your system. -Once done, add a new directory in the directory where you stored the script and place the certificates in this directory which you want to add to the phone's database. For CAcert, this would be the class 3 root certificate in PEM format as found on the [CAcert website](https://www.cacert.org/index.php?id=3). +Once done, add a new directory in the directory where you stored the script and place the certificates which you want to add to the phone's database in the sub directory 'certs'. For CAcert, this would be the class 3 root certificate in PEM format as found on the [CAcert website](https://www.cacert.org/index.php?id=3). Then simply run the script. -Note: before running the script you need to enable 'Remote debugging' in the Developer settings menu and connect your phone with your PC using a USB cable (or more general: get adb working). \ No newline at end of file +Note: before running the script you need to enable 'Remote debugging' in the Developer settings menu and connect your phone with your PC using a USB cable (or more general: get adb working). diff --git a/add-certificates-to-phone.sh b/add-certificates-to-phone.sh index e32fa7c..22c8fe3 100644 --- a/add-certificates-to-phone.sh +++ b/add-certificates-to-phone.sh @@ -5,7 +5,7 @@ ROOT_DIR_DB=/data/b2g/mozilla CERT=cert9.db KEY=key4.db PKCS11=pkcs11.txt -DB_DIR=`adb shell "ls -d ${ROOT_DIR_DB}/*.default 2>/dev/null" | sed "s/default.*$/default/g"` +DB_DIR=`adb shell "ls -d ${ROOT_DIR_DB}/*.default 2>/dev/null" | sed "s/default.*$/default/g"` if [ "${DB_DIR}" = "" ]; then echo "Profile directory does not exists. Please start the b2g process at @@ -58,4 +58,4 @@ adb push ./${PKCS11} ${DB_DIR}/${PKCS11} log "starting b2g" adb shell start b2g -log "Finished." \ No newline at end of file +log "Finished."