From MozillaWiki
Jump to: navigation, search

Set up a Fedora 14 imaging netbook for Android 2.2 Tegra 250


  • Fedora 14 netbook
  • USB port
  • SD card slot

Basic first install steps

  • Install Fedora. Create an account called mozilla.
  • Log in as an mozilla.
  • Create a base directory. I chose ~/android-tegra
  • Download the JDK
    • Run it as root; it should install the RPMs.
  • Download the Android SDK tarball.
    • I extracted this into ~/android-tegra/android-sdk-linux_86
    • run tools/android and install the Android Repository -> SDK Platform Android 2.2 and Android Repository -> Android SDK Platform-tools
  • Download the Tegra Android 2.2. The PDF is helpful; you need the RUN file.
    • I installed this into ~/android-tegra/tegra_froyo_20101105
  • sudo yum install telnet wget

Update startup scripts

Add ~/android-tegra/android-sdk-linux_86/platform-tools to your PATH in ~/.bashrc

Create SUT directory

mkdir ~/android-tegra/SUT
cd ~/android-tegra/SUT
# copy SUTAgentAndroid apk, Watcher apk, FenCP apk, FfxCP apk here.

Create a


mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4755 su
chmod 4755 reboot

Create an

#!/bin/sh -e

APK_LIST="SUTAgentAndroidBob26.apk Watcher26.apk FenCP25.apk FfxCP25.apk"

if [ $# -ne 1 ] ; then
    echo "Usage: $0 <tegra-xxx>"
    exit -1

echo $TEGRANAME | grep '^tegra-[0-9][0-9][0-9]$' > /dev/null
if [ $? -ne 0 ] ; then
    echo "$1 is not a valid tegra name!"
    exit -1

TEGRANUM=`echo $TEGRANAME | sed -e s/tegra-//`
PORT=`expr 42000 + $TEGRANUM`

if [ $TEGRANUM -gt 10 -a $TEGRANUM -le 30 ] ; then
elif [ $TEGRANUM -gt 30 -a $TEGRANUM -le 50 ] ; then
elif [ $TEGRANUM -gt 50 -a $TEGRANUM -le 70 ] ; then
elif [ $TEGRANUM -gt 70 -a $TEGRANUM -le 90 ] ; then

echo "Associating $TEGRANAME with Server $SUTSERVER Port $PORT"

cd ../SUT
sudo adb devices
adb wait-for-device
sleep 60
for apk in $APK_LIST; do
    adb install -r $apk
adb push /sdcard/
cat SUTAgent.ini.tmpl | sed -e "s/\(IPAddr *= *\).*$/\1$SUTSERVER/" | sed -e "s/\(PORT *= *\).*$/\1$PORT/" > tmpfile
adb push tmpfile /data/data/com.mozilla.SUTAgentAndroid/files/SUTAgent.ini
adb shell chmod 777 /data/data/com.mozilla.SUTAgentAndroid/files
cat watcher.ini.tmpl | sed -e "s/\(PingTarget *= *\).*$/\1$SUTSERVER/" > tmpfile
adb push tmpfile /data/data/com.mozilla.watcher/files/watcher.ini
adb shell chmod 777 /data/data/com.mozilla.watcher/files
adb shell sh /sdcard/
adb shell am start -a android.settings.APPLICATION_SETTINGS
adb shell mkdir /mnt/sdcard/tests
#adb shell setprop persist.tegra.dpy5.mode.width 1680
#adb shell setprop persist.tegra.dpy5.mode.height 1050
#adb shell setprop persist.tegra.dpy3.mode.width 1680
#adb shell setprop persist.tegra.dpy3.mode.height 1050
rm tmpfile
echo "##########"
echo "$TEGRANAME associated with server $SUTSERVER Port $PORT"
echo "Set Development -> Stay Awake on the tegra,"

Create an SUTAgent.ini.tmpl

[Registration Server]
IPAddr =
PORT = 20742
HARDWARE = Android Board

Create a watcher.ini.tmpl

// hostname or ip address of target for ping check
PingTarget =
// delay in ms. until the first check
delay = 60000
// amount of time in ms. between checks
period = 300000
// number of failures that trigger a reboot
strikes = 5

Fix perms + softlink

chmod a+rx
cd ../tegra_froyo_20101105
ln -s ../SUT/ .

Set up a Windows 7 imaging netbook for Android 2.2 Tegra 250


  • These instructions are for 32 bit Windows 7
    • it's doable with 64 bit, but no docs here
    • it's doable with linux (see above)
    • it's probably doable with other flavors of Windows, but not tested
  • USB port
  • SD card slot

Basic first install steps

  • Log in as an administrator.
  • Install Cygwin (Choose full install).
  • Create a base directory. I chose c:/android-tegra
  • Download the Android SDK zip.
    • I extracted this into c:/android-tegra/android-sdk-windows
  • Download the Tegra 250 Support pack installer. The PDF is helpful; you need the MSI.
    • I installed this into c:/android-tegra/tegra_froyo_20101105
  • Install USBDeview (search CNet for a newer or 64 bit version if necessary).
    • I extracted this into c:/android-tegra/usbdeview


ADB doesn't work out of the box for the Tegras. The first two posts here are very important.

To allow the netbook to use ADB with the Tegras:

# Create ~/.android/adb_usb.ini
cd /cygdrive/c/Documents\ and\ Settings/Mozilla\ Corporation
mkdir .android
cd .android
echo "0x955" > adb_usb.ini
# Edit android_winusb.inf
cd /cygdrive/c/android-tegra/android-sdk-windows/usb_driver
cp android_winusb.inf android_winusb.orig

Edit android_winusb.inf. For a 32 bit machine, in the [Google.NTx86] section, add the following lines:

%SingleAdbInterface% = USB_Install, USB\VID_0955&PID_7000
%CompositeAdbInterface% = USB_Install, USB\VID_0955&PID_7100&MI_01

Create startup scripts

I created a c:/android-tegra/android-tegra.bat:

@echo off
rem android imaging startup batch script

chdir c:\cygwin\bin
bash --init-file /cygdrive/c/android-tegra/

I created a c:/android-tegra/

# android imaging env

export TEGRA_DIR=/cygdrive/c/android-tegra/tegra_froyo_20101105
export PATH=/usr/local/bin:/usr/bin:/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0/:/usr/lib/lapack:$TEGRA_DIR:/cygdrive/c/android-tegra/android-sdk-windows/tools
export PS1="\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ "

(I basically did echo $PATH >> filename and echo $PS1 >> filename and edited accordingly, adding $TEGRA_DIR and the android-sdk-windows/tools directory to the PATH.)

Create shortcuts


  • Copy your Cygwin Bash Shell shortcut on the desktop.
  • Rename to android_install
  • Right click, Properties -> Shortcut
  • Change the target to c:\android-tegra\android-tegra.bat
  • Start in: c:\android-tegra

Double click, and test:

  • You should be in /cygdrive/c/android-tegra/tegra_froyo_20101105
  • which adb should give you /cygdrive/c/android-tegra/android-sdk-windows/tools/adb


  • Right click on Start -> Open Windows Explorer
  • Go to c:\android-tegra\usbdeview
  • Right click on USBDeview, Send to -> Desktop (create shortcut)
  • Rename the shortcut to USBDeview

Double click, and test:

  • USBDeview should open

Device Manager

  • Right click on Start -> Open Windows Explorer
  • Go to c:\windows\system32, scroll down
  • Right click on devmgmt, Send to -> Desktop (create shortcut)
  • Rename the shortcut to Device Manager

Double click, and test:

  • Device Manager should open

Helpful links