[Release] 2GStatus tool ~ Determine status of the 2G.

Discussion in 'iPod touch 2G Jailbreak: redsn0w, 24kpwn, etc.' started by gojohnnyboi, Feb 7, 2009.

  1. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    This started as an example for people to learn, however a lot of people wanted to have a release of it, so here ya go!

    For windows users: I've compiled 2GStatus for windows also, and you DO NOT need libusb =]

    Basically, this tells you if your iPod is disconnected, in recovery, in dfu/wtf, or in normal booted mode.

    The binaries are uploaded. you may download them here:

    OS X Intel - http://gojohnnyboi.googlecode.com/files/2GStatus-OSX-Intel.zip

    Windows - http://gojohnnyboi.googlecode.com/files/2GStatus-Windows.exe.zip

    Please Register or Log in to view images




    Thanks guys!
    -John
  2. mmitt

    mmitt New Member

    Joined:
    Sep 12, 2008
    Messages:
    1,214
    Likes Received:
    0
    Device:
    iPod touch
    Very nice. good job!
  3. Bi0hAzArD

    Bi0hAzArD Member

    Joined:
    Dec 9, 2008
    Messages:
    289
    Likes Received:
    0
    wooo! no libusb! will this turn into a way to patch the ipod or will it always need libusb (to patch)?
  4. crizh4x

    crizh4x Active Member

    Joined:
    Sep 19, 2007
    Messages:
    4,474
    Likes Received:
    17
    Device:
    2G iPod touch
    This is paving the way to a beautiful redTool update. As I said on IM, muchas gracias!!
  5. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    it just means you dont need libusb installed to run the program. this means i can compile redj0hnny this way also. it's done by statically linking libusb into the binary.
  6. jfb392

    jfb392 New Member

    Joined:
    Oct 20, 2007
    Messages:
    2,512
    Likes Received:
    21
    Device:
    iPod touch
    libusb is statically compiled, so there's no dependency on it.

    Johnny, how do you go about statically compiling something?
    I thought of doing the same thing with iRecovery a few days ago, but I didn't have any idea how to do it.
    Also, I assume the library on your Google Code won't play nice with Windows?
  7. andydam123

    andydam123 Member

    Joined:
    Aug 11, 2008
    Messages:
    447
    Likes Received:
    0
    This is awesome! Thanks.
  8. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    you are correct. what is standard for both operating systems is a dynamic library, a seperately compiled code file, that you link against (dylib or dll, depending on os), and then is dependant on that file for running.

    if you compile the library statically though (takes a bit more work), you wind up with a library that gets compiled into the binary. static libraries are .a

    some installations/compilations of libusb actually give you the static library pre-compiled, however i just compiled the source so that i knew it was done right =p
  9. jfb392

    jfb392 New Member

    Joined:
    Oct 20, 2007
    Messages:
    2,512
    Likes Received:
    21
    Device:
    iPod touch
    Yeah, I've compiled libraries before (when compiling XPwn).
    It uses CMake though, and I've lost the makefiles that it outputs, so I don't remember how to statically link something.
    Is your makefile on Google Code correct where it simply includes the project's directory as a library location, then links libusb_static.a?
    I assume the static compilation comes from the library itself, not a compiler flag (I don't know much about compiling though), so I'll go ahead and compile libusb statically.
  10. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    i can supply you with the libusb_static.a library for both windows and os x if you want.

    and as for compiler flags, "-L." just includes the current directory for libraries, and "-l${LIBNAME}", in this case "-lusb_static" will link against that library.

Share This Page