Case study
cbyge: reconstructing the C by GE smart-bulb cloud protocol
Reimplements the cloud control path of the C by GE (now Cync) smart-bulb app as a Go library and a small self-hosted web app. The author reports decompiling the Android app with Apktool, finding its JSON HTTP API for login and device lists and a separate raw TCP protocol to the vendor's server, then working out that protocol's type-and-length message framing and packet encodings from proxied traffic and the Smali code. The resulting API lists devices, reads their status and sets power, brightness, color tone and RGB color.
- Targets
- App · Protocol
- Category
- Independent reconstruction cases
- Relationship
- Independent reconstruction project
- Sources reviewed
Requirements & limits
- Reviewed at the 2021-11-09 main commit; there are no releases. The README states that the code was not informed by a protocol specification and may stop working or fail on some networks and devices. Only the author's own lightbulbs were examined, so the outlets, sensors and switches the same app controls were not reverse-engineered.
- Requires the user's own C by GE or Cync account with devices already set up in the official app; newer accounts need the email two-factor login, which the web app or the login_2fa command performs. Control goes through the vendor's cloud rather than local Bluetooth or LAN. The Android app, traffic captures and account data are not in the repository; the README quotes only short Smali excerpts and one status packet from the author's devices.
- Builds with Go; go.mod declares Go 1.14 and two small dependencies. The server directory serves a browser front end and a JSON API protected by an optional web password, and the repository also keeps the small TCP and HTTP logging proxies used during the investigation.
- There are no tests or CI. The README reports that others have used the API successfully in some cases and that the author found it faster and more reliable than the official app.
- BSD-2-Clause, copyright 2021 Alexander Nichol. This is an independent client, not recovered vendor source; the vendor's apps, services and trademarks keep their own rights.
About this entry
The description was reviewed against primary sources.
Primary sources
- README.md GitHub · unixpickle/cbyge · Revision 459be53
- controller.go GitHub · unixpickle/cbyge · Revision 459be53
- packet.go GitHub · unixpickle/cbyge · Revision 459be53
- login.go GitHub · unixpickle/cbyge · Revision 459be53
- server/main.go GitHub · unixpickle/cbyge · Revision 459be53
- proxy GitHub · unixpickle/cbyge · Revision 459be53
- go.mod GitHub · unixpickle/cbyge · Revision 459be53
- LICENSE GitHub · unixpickle/cbyge · Revision 459be53
More in Apps
- Clickwill: reconstructing iPod library database editing · Case study
- Spark Mail: rehosting the Windows desktop app on Linux with Wine shims · Case study
- OpenTracks: a UWP port of OpenTracks7 BETA1 · Case study
- RTO eChalan: investigating a BankBot Android APK · Case study
- AOL 7.0 Retro Server: reconstructing the P3 server session · Case study
- SteelSeries Overlay Hook: mapping and hooking the GameOverlay swapchain · Case study