mozilla

Revision 233911 of Using the B2G emulators

  • Revision slug: Mozilla/Boot_to_Gecko/Using_the_B2G_emulators
  • Revision title: Using the B2G emulators
  • Revision id: 233911
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment first draft; page created, 324 words added

Revision Content

{{ B2GMain() }}

This article provides a brief guide to some key things you should know when using the Boot to Gecko emulators. This doesn't purport to be a complete user manual; instead, it simply tells you a few useful things that you might not learn on your own.

This guide assumes you've already built one of the emulators; if you haven't, rewind to Building and installing Boot to Gecko!

About the B2G emulators

There are two B2G emulators. The first, built by configuring for "emulator-x86" when running config.sh, is an x86 device emulator. While this is much faster than emulating the ARM processor, it's not as accurate a representation of what an actual device will work like. Configuring for "emulator" when running config.sh gets you the ARM device emulator.

Once you've selected, configured, and built an emulator, the rest works the same way from a user standpoint, so the rest of this guide is common to both.

Starting the emulator

To start the B2G emulator, type the following command:

./run-emulator.sh

This will handle all the emulator startup tasks for you. Now wait patiently while the emulator starts up and Boot to Gecko boots up on it. It can take a couple of minutes, so be patient.

When the emulator doesn't start up

Sometimes the emulator fails to start up. Welcome to the bleeding edge of technology! This usually happens because the adb server that handles interacting with the emulated device is either not running or has malfunctioned.

Look to see if adb is even running by doing:

ps aux | grep adb

If it's there, do this to kill it, because it's probably not working correctly.

adb kill-server

If it's not there, do this:

adb start-server

Then try running the emulator again. If it's still not working, time to drop in on #b2g on irc.mozilla.org for help.

Revision Source

<p>{{ B2GMain() }}</p>
<p>This article provides a brief guide to some key things you should know when using the Boot to Gecko emulators. This doesn't purport to be a complete user manual; instead, it simply tells you a few useful things that you might not learn on your own.</p>
<p>This guide assumes you've already built one of the emulators; if you haven't, rewind to <a href="/en/Mozilla/Boot_to_Gecko/Building_and_installing_Boot_to_Gecko" title="en/Mozilla/Boot_to_Gecko/Building_and_installing_Boot_to_Gecko">Building and installing Boot to Gecko</a>!</p>
<h2>About the B2G emulators</h2>
<p>There are two B2G emulators. The first, built by configuring for "emulator-x86" when running <code>config.sh</code>, is an x86 device emulator. While this is much faster than emulating the ARM processor, it's not as accurate a representation of what an actual device will work like. Configuring for "emulator" when running <code>config.sh</code> gets you the ARM device emulator.</p>
<p>Once you've selected, configured, and built an emulator, the rest works the same way from a user standpoint, so the rest of this guide is common to both.</p>
<h2>Starting the emulator</h2>
<p>To start the B2G emulator, type the following command:</p>
<pre>./run-emulator.sh
</pre>
<p>This will handle all the emulator startup tasks for you. Now wait patiently while the emulator starts up and Boot to Gecko boots up on it. It can take a couple of minutes, so be patient.</p>
<h3>When the emulator doesn't start up</h3>
<p>Sometimes the emulator fails to start up. Welcome to the bleeding edge of technology! This usually happens because the adb server that handles interacting with the emulated device is either not running or has malfunctioned.</p>
<p>Look to see if adb is even running by doing:</p>
<pre>ps aux | grep adb
</pre>
<p>If it's there, do this to kill it, because it's probably not working correctly.</p>
<pre>adb kill-server
</pre>
<p>If it's not there, do this:</p>
<pre>adb start-server
</pre>
<p>Then try running the emulator again. If it's still not working, time to drop in on <a class=" link-irc" href="irc://irc.mozilla.org/b2g" title="irc://irc.mozilla.org/b2g">#b2g</a> on irc.mozilla.org for help.</p>
Revert to this revision