Feb 08 2011

Dell Streak OEM Version Codes

Published by Karl Majer under Android,Mobile Devices

I’ve been doing quite a bit of work on modifying the Dell Streak for one of my clients. The problem is that while there are quite a few images out there available to download, I wasn’t able to find any key mapping OEM version to telco carrier so I could figure out which telco’s handset I was modifying. I’ve finally tracked it down and this should hopefully save others some pain:

Last 2 digits of OEM String – Carrier
00 – Unlocked
21 – O2 UK
31 – AT&T
32 – Rogers
33 – T-Mobile

Enjoy,

Karl

No responses yet

Jan 29 2011

Quick root on Nexus S

Capturing some data here so that its not lost when I go looking for it again.

I discovered quite by accident that the Clockwork recovery image allows adb to connect to it while sitting at the recovery menu. The adb shell is a root shell. You can use clockwork to mount whatever filesystems you may need to work on. This means that you can take any of the su binaries floating around the net, or even hack a bit and then build the su thats in the Android tree,  and dump it in /system/bin/su while in the recovery menu and then chmod it 4755 to suid it root.

So basically:

  • boot nexus S into fastboot with vol up and  power
  • pick recovery off the menu
  • from the recovery menu:
    • mount /system partition
  • from adb:
    • adb push /path/to/your/su/binary  /system/bin/su
    • adb shell
      • chmod 4755 /system/bin/su
  • from the recovery menu:
    • reboot device

When the handset comes back up, adb in as normal, and then issue an su command and you should be root.

>>>Karl

No responses yet

Jan 21 2011

Setting up a Android (Froyo) build environment on EC2

Published by Karl Majer under Android,Mobile Devices

I had to prep an EC2 instance for some Android handset build work I’m doing for a client. My VMs weren’t cutting it anymore. This is basically me documenting the quick and dirty steps required to prep an Ubuntu 10.04 instance on EC2 (AMI: be0ffed7).

I’m assuming you have basic knowledge of how to use EC2, but if not, in very very generalized terms (and from memory):

  • Go register for an account
  • Add EC2 to your account
  • Select the EC2 dashboard.
  • Select volumes and create an EBS volume for your build partition.
    • I used a 50G partition
  • Select AMIs and search for the particular flavor of Ubuntu you’re after
    • You may need to change the filters at the top of the results box to get it to display all of the options, I believe it defaults on just your own.
    • I used 10.04 64 bit ami, specifically ami-be0ffed7
    • Make sure its an EBS ami and not an instance image, the difference being the EBS is permanent and your changes will not be lost across reboots
  • Hit the launch button and then answer the questions about the type of machine you wish to run on.
  • You will need to create a set of keypairs used to log in to the machine once its up on the network.
  • You will also probably be asked questions about the security groups at some point during the question and answer process. 
    • All I did for my EC2 instance was add ssh so I could get into it remotely. For all I know I’ve left a truck sized security hole in the config.
  • Go back to the volumes and associate your build partition with the AMI you just built. It will ask you to assign a device path, I used /dev/sdf
  • At some point on the instances panel you will see that your instance is up and running, select the instance, select actions and pick connect. Follow the instructions and log in.
    • use the user ubuntu and not root.

By now you should be sitting at a prompt on your freshly started instance. Go ahead and label, mkfs, and mount the build volume and then cd into that partition.

I originally used the instance hosts instead of the EBS hosts, so I had to rebuild the environment every time I used the instance. I’d since figured out how to use an EBS ami but I’d done it so often that I’d written the script below to handle installing all the packages that were required. I pulled the java package from java.sun.com.

#!/bin/sh

#update the repos, I had some issues with the ec2 default ubuntu repos, this fixed it.
sudo aptitude update

# any bitness
sudo apt-get install git-core gnupg flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev

#generally useful for all
sudo apt-get install valgrind

#64bit
sudo apt-get install ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib

#java
echo “Installing already unpackaged java to /usr/local/”
sudo tar -cpvf – jdk1.5.0_22 |sudo  tar -C /usr/local -xpf -

echo “Adding export JAVA_HOME=/usr/local/jdk1.5.0_22 to your .bashrc”
echo “Adding export ANDROID_JAVA_HOME=\$JAVA_HOME to your .bashrc”

echo “export JAVA_HOME=/usr/local/jdk1.5.0_22″ >> ~/.bashrc
echo “export ANDROID_JAVA_HOME=\$JAVA_HOME ” >> ~/.bashrc

echo “Updating your path”
echo “export PATH=/build/codeaurora/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/:/usr/local/jdk1.5.0_22/bin:$PATH” >> ~/.bashrc~

Now you should be able to checkout and build whatever flavor of Android you’re working with. I used the froyo-almod from the codeaurora forums.

>>>Karl

No responses yet

Next »