Cause of delay for semi-tether program.

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

  1. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    For those still wondering about my program: yes. i am still working on it. HOWEVER, i've been busy writing a dynamic library for usb-2g, that lets basically anyone with even the slightest knowledge of coding at all use it.

    That will be released soon for people who wish to use it in their jailbreaking problems as it removes the need to have libusb installed., which some people need and want.

    I will compile it myself for linux and os x, and my good friend will compile the dll for windows. (this means that visual basic users can use the dll also!)

    heres just some proof. it's the header file for what i've created so far in the library.

    Code:
    /*
     *  lib2gusb.h
     *  
     *
     *  Created by John on 2/14/09.
     *  Copyright 2009 Gojohnnyboi. All rights reserved.
     *
     */
    
    #ifndef LIB2GUSB_H
    #define LIB2GUSB_H
    
    #include <usb.h>
    #include <string.h>
    #include <cstring>
    #include <cstdio>
    #include <iostream>
    
    #define DFU_2G 0x1227
    #define RECOVERY 0x1281
    #define NORMAL 0x1293
    #define APPLE 0x05AC
    
    namespace lib2gusb {
    	typedef enum {
    		iPodStatusConnectedInRecoveryMode,			// iPod is plugged in, and is in recovery mode.
    		iPodStatusConnectedInDFUMode,				// iPod is plugged in, and is in dfu mode.
    		iPodStatusConnectedInNormalMode,			// iPod is plugged in, and is in normal mode.
    		iPodStatusDisconnectedFromUSB				// iPod is not plugged in to the computer.
    	} iPodStatus;
    	
    	typedef enum {
    		iPod2GErrorTypeSuccess,						// Success. Your task was completed successfully.
    		iPod2GErrorTypeFailure,						// Failure. Your task has failed.
    		iPod2GErrorTypeConfigurationFailure,		// There was an error while configuring the usb device.
    		iPod2GErrorTypeClaimFailure,				// There was an error while claming the interface of the usb device.
    		iPod2GErrorTypeAltInterfaceFailure,			// There was an error while setting the alt interface of the usb device.
    		iPod2GErrorTypeDeviceNotFound,				// No device was found that matched the criteria for an iPod.
    		iPod2GErrorTypeUnknownFailure,				// Something failed, but the error is unamed, or unknown.
    		iPod2GErrorTypeCommandExecutionFailure,		// There was an error while attempting to execute a command in recovery mode.
    		iPod2GErrorTypeFileSendFailure,				// There was an error while sending a file in recovery/dfu mode.
    		iPod2GErrorTypeFileNotFound					// The file specified to send to the device does not exist, or was spelled incorrectly.
    	} iPod2GError;
    	
    	typedef enum {
    		iPod2GRecoveryBackgroundColorRed,			// A bright red color will be displayed on the screen of the iPod.
    		iPod2GRecoveryBackgroundColorGreen,			// A bright green color will be displayed on the screen of the iPod.
    		iPod2GRecoveryBackgroundColorYellow,		// A bright yellow color will be displayed on the screen of the iPod.
    		iPod2GRecoveryBackgroundColorBlue,			// A bright blue color will be displayed on the screen of the iPod.
    		iPod2GRecoveryBackgroundColorDefault,		// The default black color will be displayed on the screen of the iPod. Use this only if the iPod's screen is already a color, and you want it changed back.
    		iPod2GRecoveryBackgroundColorNone			// No color will be displayed on the screen of the iPod. Use this if you wish to change nothing about the color. This sends absolutely no command to change the devices screen color.
    	} iPod2GRecoveryBackgroundColor;
    	
    	static void PrintDescriptionForError(iPod2GError _error);	// Use this if you get an unexpected error while performing a task to print out a description of the error.
    		
    	typedef struct iPod2GUSBDevice {
    		struct usb_dev_handle *Device;	// The usb device that all commands and files will be sent to. This is NULL be default, and is assigned to a usb device when Connect() is called.
    		iPodStatus ConnectionStatus;	// The status (mode) of the iPod. This will be iPodStatusDisconnectedFromUSB by default, and then changed to the mode of the iPod when Connect() is called.
    	};
    
    	class RecoveryConnection {			// Use this class for communicating with an iPod in recovery mode.
    	public: 
    		RecoveryConnection();
    		~RecoveryConnection();
    		
    		iPod2GError Connect();			// Mandatory if you wish to send a command or file to the device. Call this first, and only ONCE.
    		struct iPod2GUSBDevice* _iPodTouch;	
    		
    		iPod2GError sendCommandToDevice(char* _command);	// Send a command (ex: "bgcolor 0 255 255", or "fsboot")
    		iPod2GError sendFileToDevice(char* _filename, iPod2GRecoveryBackgroundColor _colorToDisplayDuringCommandExecution, int _resetConnection);	// Send a file to the device, and execute it. Optionally change the background color displayed on the iPod's screen. Setting _resetConnection to 1 will reset it.
    	};
    	
    	class DFUConnection {				// Class used to communicate with dfu (file sending and detection are supported)
    	public:
    		DFUConnection();
    		~DFUConnection();
    		
    		iPod2GError Connect();	// Mandatory if you wish to send a file to the device. Call this first, and only ONCE.
    		struct iPod2GUSBDevice* _iPodTouch;
    		
    		iPod2GError sendFileToDevice(char* _filename, int _resetConnection);	// Send a file to the device in dfu, and optionally reset the usb connection. Same parameters apply from the recovery mode method above.
    	}; 
    };
    
    #endif /* LIB2GUSB_H */
    I'll inform you with updates about the library and the jailbreak application. (man, times like this i wish i had a blog of my own)

    -John
  2. seanG

    seanG Active Member

    Joined:
    Dec 28, 2008
    Messages:
    1,746
    Likes Received:
    14
    Device:
    iPhone 5 (Black)
    Sounds good.
  3. Ryan

    Ryan Well-Known Member

    Joined:
    Jan 19, 2008
    Messages:
    4,129
    Likes Received:
    28
    Device:
    Nexus 4
    nice, will be good, keep it up

    Please Register or Log in to view images

  4. FenrirWolf

    FenrirWolf New Member

    Joined:
    Feb 13, 2009
    Messages:
    81
    Likes Received:
    0
    Device:
    4G iPod touch
    No LibUSB required? Awesome.
  5. aaqq1

    aaqq1 New Member

    Joined:
    Sep 28, 2008
    Messages:
    13
    Likes Received:
    0
  6. Brewstermax

    Brewstermax New Member

    Joined:
    Sep 14, 2008
    Messages:
    1,593
    Likes Received:
    0
    Device:
    iPhone 3GS (Black)
    Is there anyway that you can make your OP thinner. I have to scroll over double to read it all, and Quick Reply. Thanks. Minor complaint.

    Please Register or Log in to view images

  7. gojohnnyboi

    gojohnnyboi Well-Known Member

    Joined:
    Jan 25, 2008
    Messages:
    3,339
    Likes Received:
    55
    haha sorry, that's how the header is =p

Share This Page