Thursday, October 6, 2011

Friday, April 1, 2011

Universal binaries - running the same executable on mac and linux

I've updated the sbf_flash download so that the same executable will run on either Mac or Linux. This isn't nearly as easy as you'd think, given that the two platforms use completely incompatible executable formats; Mac uses a mach-o while Linux uses ELF.

Keep reading for an explanation of how I pulled it off.

Friday, March 11, 2011

Fun with a capital C

void test1(char *pkt, char *cmd, char *arg, ...)
{
 char *fmt;
 va_list ap;
 va_start(ap, arg);
 *pkt = START;
 *(pkt += vsprintf(cmd = ++pkt, fmt = cmd, ap)) = SEP;
 for (char *ptr = strchr(fmt, '%'); ptr++; ptr = strchr(ptr, '%'))
  (void)((*ptr == '%' && ptr++) || va_arg(ap, void *));
 *(pkt += vsprintf(arg = ++pkt, fmt = arg, ap)) = END;
 va_end(ap);
}

Saturday, February 26, 2011

sbf_flash updates

(You're viewing an archived post, click here for the latest)

sbf_flash has been updated; there's now a mac os x port, in addition, support has been added for the Defy, Charm and possibly the Atrix.
sbf_flash [options] [sbf file]
    -f               - force; attempt to continue on error
    -v               - verbose output (of CDT)
    -r               - read CDT information from the phone
    -x               - extract sbf file
    -d               - download cg from phone
    --cgname [file]  - upload/download cgname
                       matches any cgname shown with -r
                       optional file arg for contents
Examples

sbf_flash file.sbf
upload file.sbf

sbf_flash -v -r
display detailed CDT information

sbf_flash -r --boot file.sbf
sbf_flash -r --boot boot.img file.sbf
upload boot, optionally using boot.img as the contents

sbf_flash -r -d --boot
sbf_flash -r -d --boot boot.img
download boot, if boot.img isn't specified it will be
saved using the cgname ("boot") as the filename

Download
(* updated Atrix support; many thanks to irc user relaxed)

Tuesday, August 31, 2010

Clearly you have no idea what an eFuse is.

Ever since the custom recovery images started showing up for the DroidX, people have been declaring the eFuse as officially broken.

Well, no, it isn't, and it's not really all that likely that it ever will be. Let me explain. (You might want to grab some coffee, this could take awhile)

Tuesday, July 20, 2010

New sbf_flash features

(You're viewing an archived post, click here for the latest)

The sbf_flash link has been updated; the new version adds a few interesting new features.

Saturday, May 29, 2010

Droid rooting and security.

When the Droid was first rooted it as done through by exploiting the update process and the update.zip files it used. It should come as no surprise that the root immediately followed the 2.0.1 OTA update, that was really the last piece of the puzzle.

Monday, May 17, 2010

Introduction to Droid hacking.

One of the more interesting topics with embedded systems is where to store the data; it's important to understand that often there is no concept of a partition table. To understand what I mean by that it helps to look at the way the Droid boots up.

Sunday, May 9, 2010

sbf_flash

(You're viewing an archived post, click here for the latest)

Linux util for flashing sbf files; sbf_flash

The usage is pretty straight forward, simply connect the phone and run:
chmod +x sbf_flash
./sbf_flash filename.sbf

Monday, February 8, 2010