Firmware sideloading on PT2 and slots

I uploaded my first custom firmware to my PT2 by sending it on to my phone. A tap on the file automatically opened the Pebble app and started the installation process. All worked fine.

The next time I wanted to upload an image I again tapped the file, the app opened but failed this time with an error message

Failed to parse manifest

In the adb log I saw this:

07-15 16:58:42.584  3850  3850 D WatchFirmwareSideload: doFirmwareUpdate: /data/user/0/coredevices.coreapp/cache/temp.pbz
07-15 16:58:42.586  3850 19371 D PermissionRequester: missingPermissions: []
07-15 16:58:42.586  3850  4576 W FWUpdate-PebbleBleIdentifier(macAddress=D9:F5:0A:D5:0B:B0): Failed to find manifest for slot 1
07-15 16:58:42.586  3850  4576 W FWUpdate-PebbleBleIdentifier(macAddress=D9:F5:0A:D5:0B:B0): java.lang.IllegalStateException: No manifest for slot 1
07-15 16:58:42.586  3850  4576 W FWUpdate-PebbleBleIdentifier(macAddress=D9:F5:0A:D5:0B:B0): 	at w9.g.u(r8-map-id-08a132af6abef3830f1052b1f67443b6119497069b44d78d7e8fada65b166eda:157)
07-15 16:58:42.586  3850  4576 W FWUpdate-PebbleBleIdentifier(macAddress=D9:F5:0A:D5:0B:B0): 	at androidx.lifecycle.n0.s(r8-map-id-08a132af6abef3830f1052b1f67443b6119497069b44d78d7e8fada65b166eda:73)
07-15 16:58:42.586  3850  4576 W FWUpdate-PebbleBleIdentifier(macAddress=D9:F5:0A:D5:0B:B0): 	at androidx.lifecycle.n0.invokeSuspend(r8-map-id-08a132af6abef3830f1052b1f67443b6119497069b44d78d7e8fada65b166eda:102)
07-15 16:58:42.586  3850  4576 W FWUpdate-PebbleBleIdentifier(macAddress=D9:F5:0A:D5:0B:B0): 	at gt.a.resumeWith(r8-map-id-08a132af6abef3830f1052b1f67443b6119497069b44d78d7e8fada65b166eda:9)
07-15 16:58:42.586  3850  4576 W FWUpdate-PebbleBleIdentifier(macAddress=D9:F5:0A:D5:0B:B0): 	at yw.p0.run(r8-map-id-08a132af6abef3830f1052b1f67443b6119497069b44d78d7e8fada65b166eda:115)
07-15 16:58:42.586  3850  4576 W FWUpdate-PebbleBleIdentifier(macAddress=D9:F5:0A:D5:0B:B0): 	at gx.a.run(r8-map-id-08a132af6abef3830f1052b1f67443b6119497069b44d78d7e8fada65b166eda:118)

I let Claude investigate this and it came to this conclusion:

./waf bundle / ./pbl bundle in PebbleOS always builds a single-slot bundle — a root-level manifest.json declaring exactly one slot (whichever was set via --slot at configure time, default 0).

[…]

This is undocumented anywhere public (not in PebbleOS’s own build docs, not in forums) — only traceable via the mobile app’s own git history (coredevices/mobileapp, commits d0dc1dc2 “Fat pbz
support for obelix” and ad75fa1a “Allow single slot pbz file”).

The fix: build a “fat pbz”

The mobile app supports a dual-manifest zip format — slot0/manifest.json and slot1/manifest.json as separate entries — so it can pick whichever slot matches regardless of the watch’s current
state. PebbleOS’s own tooling has no command to produce this directly; you build both slots separately (–slot=0 and --slot=1) and repackage by hand into one zip with slot0//slot1/ prefixes.

I let it build that “fat” pbz and it really works.

My real question: Is this really undocumented or are we doing something wrong? I use Building firmware — PebbleOS 0.1.0 documentation as a guide and can’t find any mention of this. Is this hidden behind some config option we are missing?

Hi there, thanks for posting!

While fat .pbz’s aren’t built by default, you can successfully sideload slot0/slot1 firmware by first entering PRF on your watch (QR code screen), then sideloading the firmware. You can enter PRF by holding Back + Up + Select on your watch until you see it reboot.

You’re right, though, this is probably something we should add to the documentation :slightly_smiling_face:

Good to know. Thanks for you reply!