Download: http://gg.gg/ms8wk


I spent quite sometime figuring how to set up adb on Mac, so I figure writing how to set it up might be useful to some people. Adb is the command line tool to install and run android apps on your p.
*Brew Install Adb Tools
*Adb Drivers Mac
*Adb Tools Download Homebrew Machine
*Install Adb Homebrew
*Adb Tools Download Homebrew Macro
Many aspects of Firefox OS development require installation of ADB, the Android Debug Bridge, and the Fastboot tool. This article explains how to do that, and shares some common useful ADB commands.Installing ADB and fastboot
You can download and install adb and fastboot as part of the Android SDK package, for Mac, Linux or Windows — visit the Get the Android SDK page.
Newer Linux distributions have adb already in their repositories. For Ubuntu 12.10 and later, run the following command:
On Fedora 22/23/24:
Or on OSX using Homebrew:
If your distribution does not have packages for adb available (e.g. Ubuntu 12.04 or Fedora 17/18), you’ll need to install the Android SDK starter package for your platform (you’ll want the ADT Bundle, not the SDK Tools Only option). Then run their package manager, $SDK_HOME/tools/android, and use the GUI to install ’Android SDK Platform-tools’.
Find out where adb is installed (usually in usr/bin, possibly additionally inside adt/platform-tools, depending on how you installed it). Be sure to add this directory to your PATH. This can be done by adding the lineBrew Install Adb Tools
replacing $SDK_HOME with the location of the android sdk, to your ~/.bashrc or equivalent.Troubleshooting
This section contains some troubleshooting tips.General
In general if you find that your Firefox OS device is not being recognised by adb devices or WebIDE or whatever, you are advised to try unplugging and replugging the USB cable, turning Debugging via USB off and on again (make sure it was on in the first place), and also trying adb kill-server/adb start-server to restart the adb server if all else fails.adb still doesn’t recognise the device — udev issues
Linux has the extra setup step in that you need to configure the udev rule for your phone before it will be recognised.
On top of this, some devices may require extra work. The Flame device has specific issues because it has a modeswitch rule that renders it invisible to adb devices (see the solution.)
General advice for all devices is to check your device’s USB vendor ID by running the lsusb command with your phone plugged in, and search your Linux distribution’s udev rules (typically under /lib/udev) for the id. If it is listed, then you need to make sure the Android udev rules file (look for 51_android.rules in the udev rules directory) is processed last to override the pre-configured rules that might stop the device working. This can be done by renaming said file to a higher number than the other files start with (as the files are run alphabetically), for example 99_android.rules. At this point, restart the system and try again.64-bit install ’File not found’ error
If you’re using a 64-bit install, and you get a ’File not found’ error when running ’adb’ even though the file is present, you’ll need to install 32-bit compatibility libraries. To do this with apt:
If your device cannot be found when running ’adb devices’, click here to follow steps to fix it.Common ADB commands
The following sections explain some common, useful adb commands.Restarting the b2g process
b2g is the equivalent of a XULRunner application running on the phone atop an Android-based kernel. Sometimes you may want to restart it; this is a way to reset the application environment without rebooting the entire device. You can do this by entering the following on your terminal while your device is connected to your computer (or while running the debugger):Enabling port forwarding for debugging
To simply enable port forwarding (for example if you are using the App Manager to debug apps on a Firefox OS device), enter the following command into your terminal:Adb Drivers Mac
You’ll need to do this every time the phone is restarted or unplugged then re-plugged. You can change the socket number if required.Forwarding ports to a local machineAdb Tools Download Homebrew Machine
To forward ports to a local machine, you will need to download the netcat and ssh binaries, and run the following commands:
This will forward port 9999 on the device to the host’s port 8000.Install Adb Homebrew
Alternatively you can use an ssh server (dropbear and host_key) directly on the device, using the following commands:Adb Tools Download Homebrew Macro
Further resources:
*dropbear patch to disable the crash from missing environment variables and hard code authetication sucess.



Download: http://gg.gg/ms8wk

コメント

最新の日記 一覧

<<  2025年7月  >>
293012345
6789101112
13141516171819
20212223242526
272829303112

お気に入り日記の更新

テーマ別日記一覧

まだテーマがありません

この日記について

日記内を検索