Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Initial ironha1l rev.
- Loading branch information
Thireus
committed
Oct 10, 2012
1 parent
fe6ad0f
commit 53e8322
Showing
36 changed files
with
3,089 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#***************************************************************# | ||
#** This file is part of ironha1l Tool Suite. **# | ||
#** ironha1l, a DFU injector tool for iDevices. **# | ||
#** **# | ||
#** ********************************************************* **# | ||
#** --------------- Updated: Oct-10-2012 -------------------- **# | ||
#** ********************************************************* **# | ||
#** **# | ||
#** Author: Pascal CLEMENT aka Thireus <ironha1l@thireus.com> **# | ||
#** **# | ||
#** http://ironha1l.thireus.com **# | ||
#** http://blog.thireus.com **# | ||
#** **# | ||
#** ironha1l Tool Suite, **# | ||
#** Copyright © 2012 Thireus. **# | ||
#***************************************************************# | ||
#**PLEASE REFER TO THE README FILE FOR ADDITIONAL INFORMATION!**# | ||
#***************************************************************# | ||
|
||
LOCAL_PATH:= $(call my-dir) | ||
|
||
subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, libusb)) | ||
include $(subdirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#***************************************************************# | ||
#** This file is part of ironha1l Tool Suite. **# | ||
#** ironha1l, a DFU injector tool for iDevices. **# | ||
#** **# | ||
#** ********************************************************* **# | ||
#** --------------- Updated: Oct-10-2012 -------------------- **# | ||
#** ********************************************************* **# | ||
#** **# | ||
#** Author: Pascal CLEMENT aka Thireus <ironha1l@thireus.com> **# | ||
#** **# | ||
#** http://ironha1l.thireus.com **# | ||
#** http://blog.thireus.com **# | ||
#** **# | ||
#** ironha1l Tool Suite, **# | ||
#** Copyright © 2012 Thireus. **# | ||
#***************************************************************# | ||
#**PLEASE REFER TO THE README FILE FOR ADDITIONAL INFORMATION!**# | ||
#***************************************************************# | ||
|
||
LOCAL_PATH:= $(call my-dir) | ||
include $(CLEAR_VARS) | ||
|
||
LOCAL_CFLAGS := -Dlibusbmuxd_EXPORTS -DHAVE_INOTIFY -O2 -fPIC -Wall -lpthread | ||
|
||
LOCAL_SRC_FILES:= \ | ||
libusbmuxd/libusbmuxd.c \ | ||
libusbmuxd/sock_stuff.c \ | ||
common/utils.c | ||
|
||
LOCAL_C_INCLUDES += \ | ||
external/ironha1l/usbmuxd_ironha1l/common | ||
|
||
LOCAL_SHARED_LIBRARIES := libc | ||
LOCAL_STATIC_LIBRARIES := libusb_ironha1l | ||
|
||
LOCAL_MODULE_TAGS := optional | ||
LOCAL_MODULE:= libusbmuxd | ||
|
||
include $(BUILD_STATIC_LIBRARY) | ||
|
||
|
||
include $(CLEAR_VARS) | ||
|
||
LOCAL_CFLAGS := -DUSBMUXD_DAEMON -DUSBMUXD_VERSION=\"1.0.8_ironha1l\" -O2 -Wall | ||
|
||
LOCAL_SRC_FILES:= \ | ||
daemon/main.c \ | ||
daemon/usb-linux.c \ | ||
daemon/log.c \ | ||
common/utils.c \ | ||
daemon/device.c \ | ||
daemon/client.c | ||
|
||
LOCAL_C_INCLUDES += \ | ||
external/ironha1l/usbmuxd_ironha1l/common \ | ||
external/ironha1l/usbmuxd_ironha1l/daemon \ | ||
external/ironha1l/usbmuxd_ironha1l/libusbmuxd \ | ||
external/ironha1l/libusb_ironha1l/libusb | ||
|
||
LOCAL_SHARED_LIBRARIES := libc | ||
LOCAL_STATIC_LIBRARIES := libusbmuxd libusb_ironha1l | ||
|
||
LOCAL_MODULE_TAGS := optional | ||
LOCAL_MODULE:= usbmuxd | ||
|
||
include $(BUILD_EXECUTABLE) | ||
|
||
|
||
include $(CLEAR_VARS) | ||
|
||
LOCAL_CFLAGS := -O2 -Wall -rdynamic | ||
|
||
LOCAL_SRC_FILES:= \ | ||
tools/iproxy.c | ||
|
||
LOCAL_C_INCLUDES += \ | ||
external/ironha1l/usbmuxd_ironha1l/libusbmuxd | ||
|
||
LOCAL_SHARED_LIBRARIES := libc | ||
LOCAL_STATIC_LIBRARIES := libusbmuxd | ||
|
||
LOCAL_MODULE_TAGS := optional | ||
LOCAL_MODULE:= iproxy | ||
|
||
include $(BUILD_EXECUTABLE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#***************************************************************# | ||
#** This file is part of ironha1l Tool Suite. **# | ||
#** ironha1l, a DFU injector tool for iDevices. **# | ||
#** **# | ||
#** ********************************************************* **# | ||
#** --------------- Updated: Oct-10-2012 -------------------- **# | ||
#** ********************************************************* **# | ||
#** **# | ||
#** Author: Pascal CLEMENT aka Thireus <ironha1l@thireus.com> **# | ||
#** **# | ||
#** http://ironha1l.thireus.com **# | ||
#** http://blog.thireus.com **# | ||
#** **# | ||
#** ironha1l Tool Suite, **# | ||
#** Copyright © 2012 Thireus. **# | ||
#***************************************************************# | ||
#**PLEASE REFER TO THE README FILE FOR ADDITIONAL INFORMATION!**# | ||
#***************************************************************# | ||
|
||
LOCAL_PATH:= $(call my-dir) | ||
include $(CLEAR_VARS) | ||
|
||
LOCAL_SRC_FILES:= \ | ||
core.c \ | ||
descriptor.c \ | ||
io.c \ | ||
sync.c \ | ||
os/linux_usbfs.c \ | ||
os/threads_posix.c | ||
|
||
LOCAL_C_INCLUDES += \ | ||
external/ironha1l/libusb_ironha1l \ | ||
external/ironha1l/libusb_ironha1l/libusb \ | ||
external/ironha1l/libusb_ironha1l/libusb/os | ||
|
||
LOCAL_MODULE_TAGS := optional | ||
LOCAL_MODULE:= libusb_ironha1l | ||
|
||
include $(BUILD_STATIC_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
//***************************************************************// | ||
//** This file is part of ironha1l Tool Suite. **// | ||
//** ironha1l, a DFU injector tool for iDevices. **// | ||
//** **// | ||
//** ********************************************************* **// | ||
//** --------------- Updated: Oct-10-2012 -------------------- **// | ||
//** ********************************************************* **// | ||
//** **// | ||
//** Author: Pascal CLEMENT aka Thireus <ironha1l@thireus.com> **// | ||
//** **// | ||
//** http://ironha1l.thireus.com **// | ||
//** http://blog.thireus.com **// | ||
//** **// | ||
//** ironha1l Tool Suite, **// | ||
//** Copyright © 2012 Thireus. **// | ||
//***************************************************************// | ||
//**PLEASE REFER TO THE README FILE FOR ADDITIONAL INFORMATION!**// | ||
//***************************************************************// | ||
|
||
*** FOR YOUR INFORMATION *** | ||
|
||
THIS FILE IS FOR INFORMATION PURPOSE ONLY. | ||
|
||
*** ABOUT THIS DIRECTORY *** | ||
|
||
ALL FILES LOCATED IN THIS DIRECTORY ARE PART OF ironha1l Tool Suite. | ||
|
||
These files and patches are required for the ironha1l ANROID version. | ||
|
||
*** NOTES *** | ||
|
||
http://android.serverbox.ch/?p=151 | ||
|
||
RUN: | ||
|
||
cd external/libusb/ | ||
./configure --host=arm-linux --disable-timerfd | ||
|
||
MacOS X: | ||
|
||
Error: /opt/local/include/dlfcn.h:41:32: error: AvailabilityMacros.h: No such file or directory | ||
|
||
sudo ln -s /usr/include/AvailabilityMacros.h /opt/local/include/. | ||
|
||
----- libusb 1.0.3+ specific errors: | ||
|
||
Problem: undefined reference to ‘TIMESPEC_TO_TIMEVAL’ | ||
|
||
Solution: add in libusb-1.0.*/libusb/io.c | ||
|
||
#ifndef TIMESPEC_TO_TIMEVAL | ||
#define TIMESPEC_TO_TIMEVAL(tv, ts) \ | ||
do { \ | ||
(tv)->tv_sec = (ts)->tv_sec; \ | ||
(tv)->tv_usec = (ts)->tv_nsec / 1000; \ | ||
} while(0) | ||
#endif /* end of TIMESPEC_TO_TIMEVAL */ | ||
|
||
|
||
----- libusb 1.0.9 specific errors: | ||
|
||
Problem: error: 'LIBUSB_DESCRIBE' undeclared here (not in a function) | ||
|
||
Solution: add in external/libusb-1.0.9/libusb/core.c | ||
|
||
#define LIBUSB_DESCRIBE "" | ||
|
||
|
||
Problem: error: undefined reference to 'usbi_mutex_init_recursive' | ||
|
||
Solution: | ||
|
||
nano external/libusb-1.0.9/libusb/Android.mk | ||
ADD in LOCAL_SRC_FILES: os/threads_posix.c | ||
|
||
|
||
USBMUXD: | ||
|
||
mkdir build | ||
cd build | ||
cmake -DCMAKE_SYSTEM_NAME=Linux .. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
*** libusb-1.0.9/libusb/io.c 2012-04-20 08:44:27.000000000 +0200 | ||
--- libusb_ironha1l/libusb/io.c 2012-07-18 15:37:48.000000000 +0200 | ||
*************** | ||
*** 36,41 **** | ||
--- 36,49 ---- | ||
|
||
#include "libusbi.h" | ||
|
||
+ #ifndef TIMESPEC_TO_TIMEVAL | ||
+ #define TIMESPEC_TO_TIMEVAL(tv, ts) \ | ||
+ do { \ | ||
+ (tv)->tv_sec = (ts)->tv_sec; \ | ||
+ (tv)->tv_usec = (ts)->tv_nsec / 1000; \ | ||
+ } while(0) | ||
+ #endif /* end of TIMESPEC_TO_TIMEVAL */ | ||
+ | ||
/** | ||
* \page io Synchronous and asynchronous device I/O | ||
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
*** libusb-1.0.9/libusb/core.c 2012-04-20 08:44:27.000000000 +0200 | ||
--- libusb_ironha1l/libusb/core.c 2012-07-18 15:38:09.000000000 +0200 | ||
*************** | ||
*** 33,38 **** | ||
--- 33,40 ---- | ||
|
||
#include "libusbi.h" | ||
|
||
+ #define LIBUSB_DESCRIBE "" | ||
+ | ||
#if defined(OS_LINUX) | ||
const struct usbi_os_backend * const usbi_backend = &linux_usbfs_backend; | ||
#elif defined(OS_DARWIN) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
*** usbmuxd-1.0.8/daemon/client.h 2012-04-08 00:50:09.000000000 +0200 | ||
--- usbmuxd_ironha1l/daemon/client.h 2012-07-31 10:43:36.000000000 +0200 | ||
*************** | ||
*** 25,30 **** | ||
--- 25,67 ---- | ||
#include <stdint.h> | ||
#include "usbmuxd-proto.h" | ||
|
||
+ #include <endian.h> | ||
+ | ||
+ typedef u_int32_t tcp_seq; | ||
+ | ||
+ /* | ||
+ * TCP header. | ||
+ * Per RFC 793, September, 1981. | ||
+ */ | ||
+ struct tcphdr_bsd { | ||
+ u_short th_sport; /* source port */ | ||
+ u_short th_dport; /* destination port */ | ||
+ tcp_seq th_seq; /* sequence number */ | ||
+ tcp_seq th_ack; /* acknowledgement number */ | ||
+ #if __BYTE_ORDER == __LITTLE_ENDIAN | ||
+ u_int th_x2:4, /* (unused) */ | ||
+ th_off:4; /* data offset */ | ||
+ #endif | ||
+ #if __BYTE_ORDER == __BIG_ENDIAN | ||
+ u_int th_off:4, /* data offset */ | ||
+ th_x2:4; /* (unused) */ | ||
+ #endif | ||
+ u_char th_flags; | ||
+ #define TH_FIN 0x01 | ||
+ #define TH_SYN 0x02 | ||
+ #define TH_RST 0x04 | ||
+ #define TH_PUSH 0x08 | ||
+ #define TH_ACK 0x10 | ||
+ #define TH_URG 0x20 | ||
+ #define TH_ECE 0x40 | ||
+ #define TH_CWR 0x80 | ||
+ #define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG|TH_ECE|TH_CWR) | ||
+ | ||
+ u_short th_win; /* window */ | ||
+ u_short th_sum; /* checksum */ | ||
+ u_short th_urp; /* urgent pointer */ | ||
+ }; | ||
+ | ||
struct device_info; | ||
struct mux_client; | ||
|
Oops, something went wrong.