unModified()

Break stuff. Now.

FirefoxOS Hacking Part 1

My adventures exploring Mozilla's web-based OS

May 8, 2015

Just when I though I had to clone back my blog and set it up again, it so happened that I have a backup on my PC. Yey! I can write a blog post! This time, it's a quick guide on setting up a FirefoxOS phone for hacking. For this post, I'll be on Windows and the victim is a Cherry Mobile Ace. So hang tight, this will be a quickie!

Setting up

Prepping Your Device

  • Disable sleep via Settings -> Display -> Screen timeout
  • Disable screen lock via Settings -> Screen lock -> Lock screen
  • In Settings -> Device Information -> More Information -> Developer Settings
    • Check "Developer Menu"
    • Set "Remote Debugging" to "ADB and Devtools"
    • Check "Console enabled"

Connecting Your Device

  • Plug in your device.

  • Press WIN + R and type cmd.

  • In the cmd, type adb devices. If your device was detected by your PC, the result should be:

    List of devices attached xxxxxxxx device

  • Open Firefox Aurora, and press SHIFT+F8 to open WebIDE

  • On WebIDE is a dropdown labelled as "Select Runtime". Click and select your phone from the list.

Creating Your First App

  • On the top left of WebIDE, go to Project -> New App.
  • Select the "Hello World App" and enter a project name.
  • Select a save location for the project.
  • Once done, you'll be presented with an IDE with files on the sidebar, and an editor.

Development Workflow

  • To run the app, just click on the "Play" button (sidewards triangle icon) on top.
  • While running, clicking on the wrench will open the very familiar Firefox Dev Tools.
  • Clicking the "Stop" (the square icon) will kill the app.

Why Another Blog Post?

Originally there was this blog post which was the only guide I found. It was misleading at first, thinking that it was just a review of the phone. At the bottom of the post was a link to the driver and setup information. Unfortunately, the driver won't install on Windows 8. I once VM'ed the setup on XP but this wasn't a healthy routine, both for development and my machine.

Up next...

Making the phone do some intensive stuff. Spoiler: I won't be rooting the devices or modifying the ROM (though I'm really itching to do so). This is so that I'm sure it would work on the devices out of the box.