|
|
| Line 1: |
Line 1: |
| Packaged App installation requires adding additional certificates to the phone because the app package is only signed for public installation after it is approved via the Reviewer Tools. When an app is installed via the Reviewer Tools prior to approval it is signed with a separate, Reviewer only, certificate which does not come installed on the device by default.
| | #REDIRECT Marketplace/Reviewers/Apps/Guide/Setup |
| | |
| The phone needs to be rooted for pushing these certificates to work. You can test this by typing 'adb root' after installing the Android SDK (if it says it can't be run in production builds then certificate installation isn't going to work). Rooting your phone is outside of the scope of this page but you may be able to find instructions on the internet, and is obviously taken at your own risk, etc, etc. Geeksphone Keon and Peak devices are typically rooted by default, operator provided devices are typically not.
| |
| | |
| The scripts are available in the [https://github.com/briansmith/marketplace-certs Marketplace Certs repository]. There is a detailed [https://github.com/briansmith/marketplace-certs/blob/master/README.txt readme] available though in short the procedure for installing reviewer certs is below:
| |
| | |
| == Full Procedure ==
| |
| | |
| # git clone (or manually download) [https://github.com/briansmith/marketplace-certs Marketplace Certs repository] | |
| ## git clone git://github.com/briansmith/marketplace-certs.git
| |
| # Install the [http://developer.android.com/sdk/index.html Android SDK] (for ADB mainly) and make sure $ADT/sdk/platform-tools is on your path
| |
| ## or [https://code.google.com/p/texasice-cream-sandwich-mirror/downloads/detail?name=adb_fastboot.zip&can=2&q=fastboot get ADB and Fastboot only]. You will need to rename or create links so 'adb' resolves to the executable on your platform.
| |
| # Install NSS Tools
| |
| ## Debian/Ubuntu: sudo apt-get install libnss3-tools
| |
| ## Fedora : su -c "yum install nss-tools"
| |
| ## openSUSE : sudo zypper install mozilla-nss-tools
| |
| ## Mac OS (with Homebrew) :
| |
| ### brew install nss
| |
| ### ln -s /usr/local/Cellar/nss/3.14.1/bin/certutil /usr/local/bin/certutil
| |
| ### # or put the whole folder in your path by adding this line to your .bash_profile with :
| |
| ### echo "export PATH=$PATH:/usr/local/Cellar/nss/3.14.1/bin/" >> ~/.bash_profile
| |
| ### source ~/.bash_profile
| |
| ## Windows:
| |
| ### hg clone https://hg.mozilla.org/projects/nspr
| |
| ### hg clone https://hg.mozilla.org/projects/nss
| |
| ### cd nss
| |
| ### OS_TARGET=WIN95 make nss_build_all
| |
| ### cd ..
| |
| ### export NSS=$PWD/dist/WIN954.0_DBG.OBJ
| |
| ### # NSS/bin must be ahead of the rest of the path because NSS and Windows both have tools called "certutil".
| |
| ### export PATH=$NSS/bin:$NSS/lib:$PATH
| |
| # To build the new certs:
| |
| ## rm -Rf certdb.tmp
| |
| ## ./new_certdb.sh certdb.tmp
| |
| ## ./add_or_replace_root_cert.sh certdb.tmp root-ca-reviewers-marketplace
| |
| # if you want -dev support too do:
| |
| ## ./add_or_replace_root_cert.sh certdb.tmp marketplace-dev-public-root
| |
| ## ./add_or_replace_root_cert.sh certdb.tmp marketplace-dev-reviewers-root
| |
| ## ./change_trusted_servers.sh ''full_unagi'' "https://marketplace-dev.allizom.org,https://marketplace.firefox.com"
| |
| # And finally:
| |
| ## ./push_certdb.sh ''full_unagi'' certdb.tmp
| |
| | |
| | |
| ''Note: For Keon phones, you need replace full_unagi with full_keon. If you have a different FirefoxOS phone, do 'adb devices' and replace full_unagi with whatever device name is given there.''
| |
| | |
| == Quick Procedure ==
| |
| | |
| If you can't get the full procedure above to work, or are just plain lazy you can cheat with some preprepared certs. This quick procedure will only let you install apps from the reviewer pages on [https://marketplace.firefox.com/ production marketplace].
| |
| | |
| # [[Media:Reviewer_certs.zip|Download]] the zip containing the patched certs and extract the contents somewhere
| |
| # Install the [http://developer.android.com/sdk/index.html Android SDK] (for ADB mainly) and make sure $ADT/sdk/platform-tools is on your path
| |
| ## or [https://code.google.com/p/texasice-cream-sandwich-mirror/downloads/detail?name=adb_fastboot.zip&can=2&q=fastboot get ADB and Fastboot only]. You will need to rename or create links so 'adb' resolves to the executable on your platform.
| |
| # ./push_certdb.sh ''full_unagi'' certdb.tmp
| |
| | |
| | |
| ''Note: For Keon phones, you need replace full_unagi with full_keon. if you have a different FirefoxOS phone, do 'adb devices' and replace full_unagi with whatever device name is given there.''
| |
| | |
| == Using certs on B2G 2.0...==
| |
| In B2G 2.0 you don't need to install the certs. Use adb, open a shell and type the following commands:
| |
| #stop b2g
| |
| #cd /data/b2g/mozilla/*.default/
| |
| #echo 'user_pref("dom.mozApps.use_reviewer_certs", true);' >> prefs.js
| |
| #start b2g
| |