Commit 53e83229 authored by Thireus's avatar Thireus

Initial ironha1l rev.

parent fe6ad0fa
#***************************************************************#
#** 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 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 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 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 ..
*** 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
*
*** 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)
*** 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;
*** usbmuxd-1.0.8/daemon/device.c 2012-04-08 00:50:09.000000000 +0200
--- usbmuxd_ironha1l/daemon/device.c 2012-07-30 15:52:15.000000000 +0200
***************
*** 148,154 ****
hdrlen = sizeof(struct version_header);
break;
case MUX_PROTO_TCP:
! hdrlen = sizeof(struct tcphdr);
break;
default:
usbmuxd_log(LL_ERROR, "Invalid protocol %d for outgoing packet (dev %d hdr %p data %p len %d)", proto, dev->id, header, data, length);
--- 148,154 ----
hdrlen = sizeof(struct version_header);
break;
case MUX_PROTO_TCP:
! hdrlen = sizeof(struct tcphdr_bsd);
break;
default:
usbmuxd_log(LL_ERROR, "Invalid protocol %d for outgoing packet (dev %d hdr %p data %p len %d)", proto, dev->id, header, data, length);
***************
*** 200,206 ****
static int send_anon_rst(struct mux_device *dev, uint16_t sport, uint16_t dport, uint32_t ack)
{
! struct tcphdr th;
memset(&th, 0, sizeof(th));
th.th_sport = htons(sport);
th.th_dport = htons(dport);
--- 200,206 ----
static int send_anon_rst(struct mux_device *dev, uint16_t sport, uint16_t dport, uint32_t ack)
{
! struct tcphdr_bsd th;
memset(&th, 0, sizeof(th));
th.th_sport = htons(sport);
th.th_dport = htons(dport);
***************
*** 216,222 ****
static int send_tcp(struct mux_connection *conn, uint8_t flags, const unsigned char *data, int length)
{
! struct tcphdr th;
memset(&th, 0, sizeof(th));
th.th_sport = htons(conn->sport);
th.th_dport = htons(conn->dport);
--- 216,222 ----
static int send_tcp(struct mux_connection *conn, uint8_t flags, const unsigned char *data, int length)
{
! struct tcphdr_bsd th;
memset(&th, 0, sizeof(th));
th.th_sport = htons(conn->sport);
th.th_dport = htons(conn->dport);
***************
*** 300,306 ****
conn->tx_win = 131072;
conn->rx_recvd = 0;
conn->flags = 0;
! conn->max_payload = USB_MTU - sizeof(struct mux_header) - sizeof(struct tcphdr);
conn->ob_buf = malloc(CONN_OUTBUF_SIZE);
conn->ob_capacity = CONN_OUTBUF_SIZE;
--- 300,306 ----
conn->tx_win = 131072;
conn->rx_recvd = 0;
conn->flags = 0;
! conn->max_payload = USB_MTU - sizeof(struct mux_header) - sizeof(struct tcphdr_bsd);
conn->ob_buf = malloc(CONN_OUTBUF_SIZE);
conn->ob_capacity = CONN_OUTBUF_SIZE;
***************
*** 464,470 ****
client_device_add(&info);
}
! static void device_tcp_input(struct mux_device *dev, struct tcphdr *th, unsigned char *payload, uint32_t payload_length)
{
uint16_t sport = ntohs(th->th_dport);
uint16_t dport = ntohs(th->th_sport);
--- 464,470 ----
client_device_add(&info);
}
! static void device_tcp_input(struct mux_device *dev, struct tcphdr_bsd *th, unsigned char *payload, uint32_t payload_length)
{
uint16_t sport = ntohs(th->th_dport);
uint16_t dport = ntohs(th->th_sport);
***************
*** 603,609 ****
return;
}
! struct tcphdr *th;
unsigned char *payload;
uint32_t payload_length;
--- 603,609 ----
return;
}
! struct tcphdr_bsd *th;
unsigned char *payload;
uint32_t payload_length;
***************
*** 616,629 ****
device_version_input(dev, (struct version_header *)(mhdr+1));
break;
case MUX_PROTO_TCP:
! if(length < (sizeof(struct mux_header) + sizeof(struct tcphdr))) {
usbmuxd_log(LL_ERROR, "Incoming TCP packet is too small (%d)", length);
return;
}
! th = (struct tcphdr *)(mhdr+1);
payload = (unsigned char *)(th+1);
! payload_length = length - sizeof(struct tcphdr) - sizeof(struct mux_header);
! device_tcp_input(dev, (struct tcphdr *)(mhdr+1), payload, payload_length);
break;
default:
usbmuxd_log(LL_ERROR, "Incoming packet for device %d has unknown protocol 0x%x)", dev->id, ntohl(mhdr->protocol));
--- 616,629 ----
device_version_input(dev, (struct version_header *)(mhdr+1));
break;
case MUX_PROTO_TCP:
! if(length < (sizeof(struct mux_header) + sizeof(struct tcphdr_bsd))) {
usbmuxd_log(LL_ERROR, "Incoming TCP packet is too small (%d)", length);
return;
}
! th = (struct tcphdr_bsd *)(mhdr+1);
payload = (unsigned char *)(th+1);
! payload_length = length - sizeof(struct tcphdr_bsd) - sizeof(struct mux_header);
! device_tcp_input(dev, (struct tcphdr_bsd *)(mhdr+1), payload, payload_length);
break;
default:
usbmuxd_log(LL_ERROR, "Incoming packet for device %d has unknown protocol 0x%x)", dev->id, ntohl(mhdr->protocol));
*** usbmuxd-1.0.8/daemon/main.c 2012-04-08 00:50:09.000000000 +0200
--- usbmuxd_ironha1l/daemon/main.c 2012-07-31 10:49:02.000000000 +0200
***************
*** 47,54 ****
#include "device.h"
#include "client.h"
! static const char *socket_path = "/var/run/usbmuxd";
! static const char *lockfile = "/var/run/usbmuxd.pid";
int should_exit;
int should_discover;
--- 47,54 ----
#include "device.h"
#include "client.h"
! static const char *socket_path = "/data/local/tmp/usbmuxd";
! static const char *lockfile = "/data/local/tmp/usbmuxd.pid";
int should_exit;
int should_discover;
***************
*** 147,153 ****
sigaction(SIGUSR2, &sa, NULL);
}
! #if defined(__FreeBSD__) || defined(__APPLE__)
static int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, const sigset_t *sigmask)
{
int ready;
--- 147,153 ----
sigaction(SIGUSR2, &sa, NULL);
}
! //#if defined(__FreeBSD__) || defined(__APPLE__)
static int ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout, const sigset_t *sigmask)
{
int ready;
***************
*** 160,166 ****
return ready;
}
! #endif
int main_loop(int listenfd)
{
--- 160,166 ----
return ready;
}
! //#endif
int main_loop(int listenfd)
{
*** usbmuxd-1.0.8/libusbmuxd/libusbmuxd.c 2012-04-08 00:50:09.000000000 +0200
--- usbmuxd_ironha1l/libusbmuxd/libusbmuxd.c 2012-07-31 10:54:30.000000000 +0200
***************
*** 660,666 ****
}
#else
if (pthread_kill(devmon, 0) == 0) {
! pthread_cancel(devmon);
pthread_join(devmon, NULL);
}
#endif
--- 660,666 ----
}
#else
if (pthread_kill(devmon, 0) == 0) {
! //pthread_cancel(devmon);
pthread_join(devmon, NULL);
}
#endif
*** usbmuxd-1.0.8/libusbmuxd/usbmuxd-proto.h 2012-04-08 00:50:09.000000000 +0200
--- usbmuxd_ironha1l/libusbmuxd/usbmuxd-proto.h 2012-07-31 10:52:14.000000000 +0200
***************
*** 31,37 ****
#if defined(WIN32) || defined(__CYGWIN__)
#define USBMUXD_SOCKET_PORT 27015
#else
! #define USBMUXD_SOCKET_FILE "/var/run/usbmuxd"
#endif
#ifdef __cplusplus
--- 31,37 ----
#if defined(WIN32) || defined(__CYGWIN__)
#define USBMUXD_SOCKET_PORT 27015
#else
! #define USBMUXD_SOCKET_FILE "/data/local/tmp/usbmuxd"
#endif
#ifdef __cplusplus
Pascal CLEMENT aka Thireus
LOCAL_PATH:= $(call my-dir)
subdirs := $(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, libusb_ironha1l)) \
$(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, libironha1l)) \
$(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, applications)) \
$(addprefix $(LOCAL_PATH)/,$(addsuffix /Android.mk, usbmuxd_ironha1l))
include $(subdirs)
//***************************************************************//
//** 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.
*** usbmuxd-1.0.8/Modules/FindUSB.cmake 2012-04-08 00:50:09.000000000 +0200
--- usbmuxd_ironha1l/Modules/FindUSB.cmake 2012-07-30 17:56:20.000000000 +0200
***************
*** 10,25 ****
# Dependencies
# pkg-config + libusb fails on FreeBSD, though libusb is in base
! if(NOT(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD"))
! # Use pkg-config to get hints about paths
! libfind_pkg_check_modules(USB_PKGCONF libusb-1.0>=1.0.3)
! # We want to look for libusb-1.0
set(USB_LIBRARY_NAME usb-1.0)
! else()
! set(USB_PKGCONF_INCLUDE_DIRS /usr/include)
! set(USB_PKGCONF_LIBRARY_DIRS /usr/lib)
! set(USB_LIBRARY_NAME usb)
! endif()
# Include dir
find_path(USB_INCLUDE_DIR
--- 10,25 ----
# Dependencies
# pkg-config + libusb fails on FreeBSD, though libusb is in base
! #if(NOT(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD"))
! # # Use pkg-config to get hints about paths
! # libfind_pkg_check_modules(USB_PKGCONF libusb-1.0>=1.0.3)
! # # We want to look for libusb-1.0
! # set(USB_LIBRARY_NAME usb-1.0)
! #else()
! set(USB_PKGCONF_INCLUDE_DIRS ../../libusb_ironha1l/libusb)
! set(USB_PKGCONF_LIBRARY_DIRS ../../libusb_ironha1l/libusb/.libs)
set(USB_LIBRARY_NAME usb-1.0)
! #endif()
# Include dir
find_path(USB_INCLUDE_DIR
*** usbmuxd-1.0.8/daemon/usb-linux.c 2012-04-08 00:50:09.000000000 +0200
--- usbmuxd_ironha1l/daemon/usb-linux.c 2012-07-30 18:05:47.000000000 +0200
***************
*** 29,35 ****
#include <stdint.h>
#include <string.h>
! #include <libusb.h>
#include "usb.h"
#include "log.h"
--- 29,35 ----
#include <stdint.h>
#include <string.h>
! #include "libusb.h"
#include "usb.h"
#include "log.h"
//***************************************************************//
//** 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!**//
//***************************************************************//
*** BEFORE YOU START ***
A working Internet connexion qui required by the configure script
to fetch additionnal tools.
*** UNIX/LINUX/MacOS/FreeBSD ***
./configure
make ironha1l usbmuxd iproxy devices
Note: You can face some basic issues with libusb, especially if
libusb is already installed on the operating system. In this case
you must manually install the compiled version of libusb_ironha1l.
*** ANDROID ***
1. Put the ironha1l directory into your external/ folder of Android 4.x
WORKING_DIRECTORY source.
2. Configure ironha1l for ANDROID
./configure ANDROID
3. Compile from your Android WORKING_DIRECTORY root directory.
make ironha1l usbmuxd iproxy devices
4. Use adb of scp to upload files to a PATH bin directory of your Android
phone.
*** ADDITIONAL NOTES ****
You can also compile each tools provided by ironha1l Tool Suite separately.
For example, if you only need ironha1 but not devices:
make ironha1l
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.