Migrate Pebble To a New Android Device

I've been a die hard Pebble Smartwatch fan for years now. Since they were acquired a few years back the Pebble App has vanished from the Google App Store and I now need to extract the APK from my old Android device so I can install it on my new one.

The procedure is fairly straight-forward.


APKs to backup

To get the package names of the APKs I want to save I used Shelter. Shelter is a tool that allows you to control the 'work' mode feature of Android without agreeing to a 3rd parties terms and conditions and requiring a sign in (I'm looking at you, Knox!). A side effect of this tool is that it lists Application names along with their android package IDs, which will become important later. There are other ways to get the list of packages as well.

Looking in Shelter I see these Pebble Apps:

  • com.getpebble.android.basalt
  • com.matejdro.pebblenotificationcenter

    Looks like I can still get notification center in the app store, so one less package to extract

Prepare for Extraction

To extract APKs off of your android device you can install Android Studio to get the necessary components. For ease of installation and upgrades I recommend using the Toolbox App by JetBrains to simplify this step. Once you have android studio and the adb tool installed:

  • Enable Developer mode on your android phone (Navigate to Settings -> About Phone -> Build Number, then Tap on the Build Number seven times)

  • Plug the phone into the computer

  • Enter this command at a terminal to start a connection with your phone:

    • adb shell

  • On the phone, accept the computers signing key

    • This allows the developer tools to work their magic and let you extract an android app / APK

  • If you want to get a complete list of package names installed on your phone (without a corresponding 'friendly' app name), run: adb shell pm list packages > apks.list

Extract the APK Package

  • Before we can extract packages, we need to know where they are installed. Run this command to find where your package is installed:

    • adb shell pm path com.getpebble.android.basalt

      Important Note: This path will be different on your phone. Copy/pasting these commands directly will likely fail

  • With the install path in hand we can use adb pull to extract the package

    • adb pull /data/app/com.getpebble.android.basalt-xkWMdnJJKZaUIsN7SldD3Q==/base.apk
  • The name of the package will likely be base.apk so you may want to rename it. I renamed my package to com.getpebble.android.basalt.apk so I could easily reference it in the future

Install on the New Phone

  • Enable debug mode on the phone (see above under 'Prepare for Extraction'
  • Accept the RSA key from the computer when you plug it in
  • Run this command to install the APK:
    • adb install com.getpebble.android.basalt.apk

A Note on Pairing

If all went well you should be able to use setup Pebble on your new phone. I want to note the procedure to pair the pebble to my new android device (Android 10) since it was so long since my last hardware refresh I'd forgotten:

  • Pair the pebble with the phone using Bluetooth
  • Open the Pebble App
  • Select the type of Pebble you are pairing (original, Time, etc...)
  • Follow the prompts

One Last Note on Installing Pebble PBWs

Since Pebble as an entity is no more, the folks over at Rebble have picked up the Pebble App Store. Currently (September 2020) you can still browse/download pebble apps from the store. I like to sideload the pebble apps, but that has become more complicated as current versions of Android don't associate the .pbw file extension with the Pebble App on the smartphone.

To get around this, any PBW files you download can be coaxed into opening with the Pebble Android app by using the Dropbox File explorer. It appears to be the only file manager of good reputation that is able to do this for Android 10. If I hear of others, I'll note them here.

Here's an example of how to download a PBW directly from the Rebble/Pebble app store:

  • Visit an app page (like Pixel Miner: https://apps.rebble.io/en_US/application/539e18f21a19dec6ca0000aa)

  • Append this to the end of the URL ?dev_settings=true so it looks like this: https://apps.rebble.io/en_US/application/539e18f21a19dec6ca0000aa?dev_settings=true

  • Click the Download PBW button

  • Copy the file to your Android Device

  • Add the file to DropBox

  • Open the file within DropBox and accept the prompt to open it with the Pebble App on your phone