B2G2, a brain dump about Firefox OS and Geeksphone's Peak

make reset-gaia

Last week, Nikos Roussos blogged a useful and concise walk-through on how to upgrade your Firefox OS.

The steps are pretty straightforward to follow but I'd like to clarify some points.

Here's the output of the make reset-gaia command after the v1-train git checkout from my Linux Mint distro :

make reset-gaia
adb shell stop b2g
adb shell rm -r /cache/*
adb shell rm -r /data/b2g/*
adb shell rm -r /data/local/webapps
rm failed for /data/local/webapps, No such file or directory
adb remount
remount succeeded
adb shell rm -r /system/b2g/webapps
rm -rf xulrunner-sdk
wget -c http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/2012/09/2012-09-20-03-05-43-mozilla-central/xulrunner-18.0a1.en-US.linux-i686.sdk.tar.bz2
--2013-05-20 17:06:25--  http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/2012/09/2012-09-20-03-05-43-mozilla-central/xulrunner-18.0a1.en-US.linux-i686.sdk.tar.bz2
Resolving ftp.mozilla.org (ftp.mozilla.org)... 63.245.215.46
Connecting to ftp.mozilla.org (ftp.mozilla.org)|63.245.215.46|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 395401499 (377M) [application/x-bzip2]
Saving to: `xulrunner-18.0a1.en-US.linux-i686.sdk.tar.bz2'

2013-05-20 17:15:42 (695 KB/s) - `xulrunner-18.0a1.en-US.linux-i686.sdk.tar.bz2' saved [395401499/395401499]

tar xjf xulrunner*.tar.bz2 && rm xulrunner*.tar.bz2
test -d profile || mkdir -p profile
run-js-command  applications-data
Looking for packaged app: /home/delapouite/github/mozilla/gaia/external-apps/marketplace.firefox.com/update.webapp
run-js-command  preferences
make[1]: Entering directory `/home/delapouite/github/mozilla/gaia/apps/music'
cat ../../shared/js/blobview.js js/metadata.js > js/metadata_scripts.js
make[1]: Leaving directory `/home/delapouite/github/mozilla/gaia/apps/music'
make[1]: Entering directory `/home/delapouite/github/mozilla/gaia/apps/gallery'
cat ../../shared/js/gesture_detector.js ../../shared/js/media/video_player.js ../../shared/js/media/media_frame.js js/frames.js > js/frame_scripts.js
cat ../../shared/js/blobview.js ../../shared/js/media/jpeg_metadata_parser.js ../../shared/js/media/get_video_rotation.js js/imagesize.js js/MetadataParser.js > js/metadata_scripts.js
make[1]: Leaving directory `/home/delapouite/github/mozilla/gaia/apps/gallery'
make[1]: Entering directory `/home/delapouite/github/mozilla/gaia/apps/calendar'

make[1]: Leaving directory `/home/delapouite/github/mozilla/gaia/apps/calendar'
Finished: bootstrapping test proxies/sandboxes
Finished: test ui config file: ./test_apps/test-agent/config.json
run-js-command  webapp-manifests
run-js-command  webapp-optimize
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
/apps/communications/contacts/index.html: [l10n] ##type_l10n_id# is undefined.
run-js-command  webapp-zip
run-js-command  optimize-clean
Finished: Generating extensions
python build/settings.py --console --locale en-US --homescreen app://homescreen.gaiamobile.org/manifest.webapp --ftu app://communications.gaiamobile.org/manifest.webapp --wallpaper build/wallpaper.jpg --override build/custom-settings.json --output profile/settings.json
Profile Ready: please run [b2g|firefox] -profile /home/delapouite/github/mozilla/gaia/profile
adb start-server
Stopping b2g
adb shell stop b2g
adb shell rm -r /cache/*
rm failed for /cache/*, No such file or directory
python build/install-gaia.py "adb" "/data/local"
push: profile/webapps/hoststubtest/manifest.webapp -> /data/local/webapps/hoststubtest/manifest.webapp
push: profile/webapps/testpermission.gaiamobile.org/manifest.webapp -> /data/local/webapps/testpermission.gaiamobile.org/manifest.webapp
push: profile/webapps/testpermission.gaiamobile.org/application.zip -> /data/local/webapps/testpermission.gaiamobile.org/application.zip
push: profile/webapps/twittershare.gaiamobile.org/manifest.webapp -> /data/local/webapps/twittershare.gaiamobile.org/manifest.webapp
push: profile/webapps/twittershare.gaiamobile.org/application.zip -> /data/local/webapps/twittershare.gaiamobile.org/application.zip
push: profile/webapps/homescreen.gaiamobile.org/manifest.webapp -> /data/local/webapps/homescreen.gaiamobile.org/manifest.webapp
push: profile/webapps/homescreen.gaiamobile.org/application.zip -> /data/local/webapps/homescreen.gaiamobile.org/application.zip
push: profile/webapps/test-container.gaiamobile.org/manifest.webapp -> /data/local/webapps/test-container.gaiamobile.org/manifest.webapp
push: profile/webapps/test-container.gaiamobile.org/application.zip -> /data/local/webapps/test-container.gaiamobile.org/application.zip
push: profile/webapps/communications.gaiamobile.org/manifest.webapp -> /data/local/webapps/communications.gaiamobile.org/manifest.webapp
push: profile/webapps/communications.gaiamobile.org/application.zip -> /data/local/webapps/communications.gaiamobile.org/application.zip
push: profile/webapps/settings.gaiamobile.org/manifest.webapp -> /data/local/webapps/settings.gaiamobile.org/manifest.webapp
push: profile/webapps/settings.gaiamobile.org/application.zip -> /data/local/webapps/settings.gaiamobile.org/application.zip
push: profile/webapps/test-sensors.gaiamobile.org/manifest.webapp -> /data/local/webapps/test-sensors.gaiamobile.org/manifest.webapp
push: profile/webapps/test-sensors.gaiamobile.org/application.zip -> /data/local/webapps/test-sensors.gaiamobile.org/application.zip
push: profile/webapps/camera.gaiamobile.org/manifest.webapp -> /data/local/webapps/camera.gaiamobile.org/manifest.webapp
push: profile/webapps/camera.gaiamobile.org/application.zip -> /data/local/webapps/camera.gaiamobile.org/application.zip
push: profile/webapps/cubevid.gaiamobile.org/manifest.webapp -> /data/local/webapps/cubevid.gaiamobile.org/manifest.webapp
push: profile/webapps/cubevid.gaiamobile.org/application.zip -> /data/local/webapps/cubevid.gaiamobile.org/application.zip
push: profile/webapps/mochitest/manifest.webapp -> /data/local/webapps/mochitest/manifest.webapp
push: profile/webapps/test-receiver-2.gaiamobile.org/manifest.webapp -> /data/local/webapps/test-receiver-2.gaiamobile.org/manifest.webapp
push: profile/webapps/test-receiver-2.gaiamobile.org/application.zip -> /data/local/webapps/test-receiver-2.gaiamobile.org/application.zip
push: profile/webapps/music.gaiamobile.org/manifest.webapp -> /data/local/webapps/music.gaiamobile.org/manifest.webapp
push: profile/webapps/music.gaiamobile.org/application.zip -> /data/local/webapps/music.gaiamobile.org/application.zip
push: profile/webapps/bluetooth.gaiamobile.org/manifest.webapp -> /data/local/webapps/bluetooth.gaiamobile.org/manifest.webapp
push: profile/webapps/bluetooth.gaiamobile.org/application.zip -> /data/local/webapps/bluetooth.gaiamobile.org/application.zip
push: profile/webapps/test-receiver-1.gaiamobile.org/manifest.webapp -> /data/local/webapps/test-receiver-1.gaiamobile.org/manifest.webapp
push: profile/webapps/test-receiver-1.gaiamobile.org/application.zip -> /data/local/webapps/test-receiver-1.gaiamobile.org/application.zip
push: profile/webapps/keyboard.gaiamobile.org/manifest.webapp -> /data/local/webapps/keyboard.gaiamobile.org/manifest.webapp
push: profile/webapps/keyboard.gaiamobile.org/application.zip -> /data/local/webapps/keyboard.gaiamobile.org/application.zip
push: profile/webapps/sms.gaiamobile.org/manifest.webapp -> /data/local/webapps/sms.gaiamobile.org/manifest.webapp
push: profile/webapps/sms.gaiamobile.org/application.zip -> /data/local/webapps/sms.gaiamobile.org/application.zip
push: profile/webapps/template.gaiamobile.org/manifest.webapp -> /data/local/webapps/template.gaiamobile.org/manifest.webapp
push: profile/webapps/template.gaiamobile.org/application.zip -> /data/local/webapps/template.gaiamobile.org/application.zip
push: profile/webapps/wallpaper.gaiamobile.org/manifest.webapp -> /data/local/webapps/wallpaper.gaiamobile.org/manifest.webapp
push: profile/webapps/wallpaper.gaiamobile.org/application.zip -> /data/local/webapps/wallpaper.gaiamobile.org/application.zip
push: profile/webapps/gallery.gaiamobile.org/manifest.webapp -> /data/local/webapps/gallery.gaiamobile.org/manifest.webapp
push: profile/webapps/gallery.gaiamobile.org/application.zip -> /data/local/webapps/gallery.gaiamobile.org/application.zip
push: profile/webapps/image-uploader.gaiamobile.org/manifest.webapp -> /data/local/webapps/image-uploader.gaiamobile.org/manifest.webapp
push: profile/webapps/image-uploader.gaiamobile.org/application.zip -> /data/local/webapps/image-uploader.gaiamobile.org/application.zip
push: profile/webapps/costcontrol.gaiamobile.org/manifest.webapp -> /data/local/webapps/costcontrol.gaiamobile.org/manifest.webapp
push: profile/webapps/costcontrol.gaiamobile.org/application.zip -> /data/local/webapps/costcontrol.gaiamobile.org/application.zip
push: profile/webapps/membuster.gaiamobile.org/manifest.webapp -> /data/local/webapps/membuster.gaiamobile.org/manifest.webapp
push: profile/webapps/membuster.gaiamobile.org/application.zip -> /data/local/webapps/membuster.gaiamobile.org/application.zip
push: profile/webapps/video.gaiamobile.org/manifest.webapp -> /data/local/webapps/video.gaiamobile.org/manifest.webapp
push: profile/webapps/video.gaiamobile.org/application.zip -> /data/local/webapps/video.gaiamobile.org/application.zip
push: profile/webapps/crystalskull.gaiamobile.org/manifest.webapp -> /data/local/webapps/crystalskull.gaiamobile.org/manifest.webapp
push: profile/webapps/crystalskull.gaiamobile.org/application.zip -> /data/local/webapps/crystalskull.gaiamobile.org/application.zip
push: profile/webapps/geoloc.gaiamobile.org/manifest.webapp -> /data/local/webapps/geoloc.gaiamobile.org/manifest.webapp
push: profile/webapps/geoloc.gaiamobile.org/application.zip -> /data/local/webapps/geoloc.gaiamobile.org/application.zip
push: profile/webapps/fm.gaiamobile.org/manifest.webapp -> /data/local/webapps/fm.gaiamobile.org/manifest.webapp
push: profile/webapps/fm.gaiamobile.org/application.zip -> /data/local/webapps/fm.gaiamobile.org/application.zip
push: profile/webapps/packstubtest/update.webapp -> /data/local/webapps/packstubtest/update.webapp
push: profile/webapps/packstubtest/application.zip -> /data/local/webapps/packstubtest/application.zip
push: profile/webapps/share-receiver.gaiamobile.org/manifest.webapp -> /data/local/webapps/share-receiver.gaiamobile.org/manifest.webapp
push: profile/webapps/share-receiver.gaiamobile.org/application.zip -> /data/local/webapps/share-receiver.gaiamobile.org/application.zip
push: profile/webapps/clock.gaiamobile.org/manifest.webapp -> /data/local/webapps/clock.gaiamobile.org/manifest.webapp
push: profile/webapps/clock.gaiamobile.org/application.zip -> /data/local/webapps/clock.gaiamobile.org/application.zip
push: profile/webapps/calendar.gaiamobile.org/manifest.webapp -> /data/local/webapps/calendar.gaiamobile.org/manifest.webapp
push: profile/webapps/calendar.gaiamobile.org/application.zip -> /data/local/webapps/calendar.gaiamobile.org/application.zip
push: profile/webapps/ds-test.gaiamobile.org/manifest.webapp -> /data/local/webapps/ds-test.gaiamobile.org/manifest.webapp
push: profile/webapps/ds-test.gaiamobile.org/application.zip -> /data/local/webapps/ds-test.gaiamobile.org/application.zip
push: profile/webapps/test-agent.gaiamobile.org/manifest.webapp -> /data/local/webapps/test-agent.gaiamobile.org/manifest.webapp
push: profile/webapps/test-agent.gaiamobile.org/application.zip -> /data/local/webapps/test-agent.gaiamobile.org/application.zip
push: profile/webapps/test-receiver-inline.gaiamobile.org/manifest.webapp -> /data/local/webapps/test-receiver-inline.gaiamobile.org/manifest.webapp
push: profile/webapps/test-receiver-inline.gaiamobile.org/application.zip -> /data/local/webapps/test-receiver-inline.gaiamobile.org/application.zip
push: profile/webapps/pdfjs.gaiamobile.org/manifest.webapp -> /data/local/webapps/pdfjs.gaiamobile.org/manifest.webapp
push: profile/webapps/pdfjs.gaiamobile.org/application.zip -> /data/local/webapps/pdfjs.gaiamobile.org/application.zip
push: profile/webapps/m.here.com/update.webapp -> /data/local/webapps/m.here.com/update.webapp
push: profile/webapps/m.here.com/application.zip -> /data/local/webapps/m.here.com/application.zip
push: profile/webapps/browser.gaiamobile.org/manifest.webapp -> /data/local/webapps/browser.gaiamobile.org/manifest.webapp
push: profile/webapps/browser.gaiamobile.org/application.zip -> /data/local/webapps/browser.gaiamobile.org/application.zip
push: profile/webapps/email.gaiamobile.org/manifest.webapp -> /data/local/webapps/email.gaiamobile.org/manifest.webapp
push: profile/webapps/email.gaiamobile.org/application.zip -> /data/local/webapps/email.gaiamobile.org/application.zip
push: profile/webapps/system.gaiamobile.org/manifest.webapp -> /data/local/webapps/system.gaiamobile.org/manifest.webapp
push: profile/webapps/system.gaiamobile.org/application.zip -> /data/local/webapps/system.gaiamobile.org/application.zip
push: profile/webapps/marketplace.firefox.com/update.webapp -> /data/local/webapps/marketplace.firefox.com/update.webapp
push: profile/webapps/marketplace.firefox.com/application.zip -> /data/local/webapps/marketplace.firefox.com/application.zip
push: profile/webapps/uitest.gaiamobile.org/manifest.webapp -> /data/local/webapps/uitest.gaiamobile.org/manifest.webapp
push: profile/webapps/uitest.gaiamobile.org/application.zip -> /data/local/webapps/uitest.gaiamobile.org/application.zip
push: profile/webapps/webapps.json -> /data/local/webapps/webapps.json
81 files pushed. 0 files skipped.
4670 KB/s (57608455 bytes in 12.045s)
368 KB/s (15548 bytes in 0.041s)
Installed gaia into profile/.
Starting b2g
adb shell start b2g
adb shell stop b2g
adb remount
remount succeeded
adb push profile/settings.json /system/b2g/defaults/settings.json
3289 KB/s (103923 bytes in 0.030s)
adb shell rm /system/b2g/defaults/contacts.json
rm failed for /system/b2g/defaults/contacts.json, No such file or directory
adb shell start b2g

Warning, the process is quite long, because the XUL runner has to be downloaded (377Mb).

Also be careful, the new profile wipes out your cache data! The files (images, music) on the SD Card remain hopefully untouched but all the SMS conversations and contacts are gone. Your painfully long Wi-Fi password too. Same fate for your preferences like your wallpaper background or the way you've organized your icons on the Homescreen.

Talking about that, the resolution is screwed on the Peak after this update :

gaia resolution

As stated in the README, I did another push with the HIDPI=1 flag without success for now.