Things You Need

PART A

(Compiling Kernel)

Code: $ sudo apt-get update

Code: $ sudo apt-get install oracle-java6-installer

Code: $ sudo apt-get install git gnupg ccache lzop flex bison gperf build-essential zip curl zlib1g-dev zlib1g-dev:i386 libc6-dev lib32bz2-1.0 lib32ncurses5-dev x11proto-core-dev libx11-dev:i386 libreadline6-dev:i386 lib32z1-dev libgl1-mesa-glx:i386 libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc libreadline6-dev lib32readline-gplv2-dev libncurses5-dev bzip2 libbz2-dev libbz2-1.0 libghc-bzlib-dev lib32bz2-dev squashfs-tools pngcrush schedtool dpkg-dev

Code: $ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so

Code: git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/

Code: # adb protocol on passion (Nexus One) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>" # fastboot protocol on passion (Nexus One) SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>" # adb protocol on crespo/crespo4g (Nexus S) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>" # fastboot protocol on crespo/crespo4g (Nexus S) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>" # adb protocol on stingray/wingray (Xoom) SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="<username>" # fastboot protocol on stingray/wingray (Xoom) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="<username>" # adb protocol on maguro/toro (Galaxy Nexus) SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="<username>" # fastboot protocol on maguro/toro (Galaxy Nexus) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="<username>" # adb protocol on panda (PandaBoard) SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="<username>" # adb protocol on panda (PandaBoard ES) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="d002", MODE="0600", OWNER="<username>" # fastboot protocol on panda (PandaBoard) SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="<username>" # usbboot protocol on panda (PandaBoard) SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="<username>" # usbboot protocol on panda (PandaBoard ES) SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="<username>" # adb protocol on grouper/tilapia (Nexus 7) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="<username>" # fastboot protocol on grouper/tilapia (Nexus 7) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="<username>" # adb protocol on manta (Nexus 10) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee2", MODE="0600", OWNER="<username>" # fastboot protocol on manta (Nexus 10) SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4ee0", MODE="0600", OWNER="<username>"

Code: gedit android-path.sh

Code: export CC=$(pwd)/arm-eabi-4.6/bin/arm-eabi- export CROSS_COMPILE=$(pwd)/arm-eabi-4.6/bin/arm-eabi- export ARCH=arm export SUBARCH=arm export PATH=$PATH:$(pwd)/andorid_boot_tools_bin

Code: $ chmod +x android-path.sh $ source android-path.sh

Code: $ git clone https://android.googlesource.com/kernel/msm.git

Code: $ cd msm/ $ git branch -a $ git checkout origin/android-msm-hammerhead-3.4-kitkat-mr2

Code: $ make hammerhead_defconfig $ make menuconfig

Code: quick look in wikidev will tell you that TP-LINK TL-WN722N uses ath9k_htc drivers Enabling ath9k drivers in kernel To enable ath9k, you must first enable mac80211 through make menuconfig when compiling your kernel. If you do not know what this means then please learn to compile kernels or rely on your Linux distribution's kernel. Below are the options you need to enable ath9k through make menuconfig. Code: Networking support ---> Wireless ---> < * > cfg80211 - wireless configuration API < * > Generic IEEE 802.11 Networking Stack (mac80211) Code: Device Drivers --->[*] Network device support ---> Wireless LAN ---> Atheros Wireless Cards ----> < * > Atheros 802.11n wireless cards support < * > Atheros HTC based wireless card support Code: CONFIG_ATH_COMMON=y CONFIG_ATH9K_HW=y CONFIG_ATH9K_COMMON=y CONFIG_ATH9K_HTC=y

Code: Device Drivers --->[*] Network device support ---> Wireless LAN ---> [*] Realtek RTL8192CU/RTL8188CU USB Wireless Network Adapter

Code: Device Drivers --->[*] Network device support ---> Wireless LAN ---> Ralink driver support ----> < * > Ralink rt27xx/rt28xx/rt30xx (USB) support --> < * > rt2800usb - Include support for rt35xx devices (EXPERIMENTAL) (NEW) < * > rt2800usb - Include support for unknown (USB) devices

Code: Networking support ---> Wireless ---> < * > Common routines for IEEE802.11 drivers < * > Generic IEEE 802.11 Networking Stack (mac80211)

Code: Code: Device Drivers --->[*] Network device support ---> Wireless LAN ---> [*] Realtek 8187 and 8187B USB support

Code: make -j4

Code: Kernel: arch/arm/boot/zImage-dtb is ready

Code: $ cd .. # if you was in msm directory $ git clone https://github.com/pbatard/bootimg-tools.git $ cd bootimg-tools/ $ make $ cd cpio/ $ gcc mkbootfs.c -o mkbootfs -I../include $ cd ../.. $ mkdir andorid_boot_tools_bin $ cd andorid_boot_tools_bin/ $ cp ../bootimg-tools/mkbootimg/mkbootimg . $ cp ../bootimg-tools/mkbootimg/unmkbootimg . $ cp ../bootimg-tools/cpio/mkbootfs . $ cd ..

Code: $ unmkbootimg -i boot_img/boot.img $ cp msm/arch/arm/boot/zImage-dtb kernel $ mkbootimg --base 0 --pagesize 2048 --kernel_offset 0x00008000 --ramdisk_offset 0x02900000 --second_offset 0x00f00000 --tags_offset 0x02700000 --cmdline 'console=ttyHSL0,115200,n8 androidboot.hardware=hammerhead user_debug=31 maxcpus=2 msm_watchdog_v2.enable=1' --kernel kernel --ramdisk ramdisk.cpio.gz -o boot.img

Code: $ adb reboot bootloader $ sudo fastboot boot boot.img

PART B

(setting up your phone)

Code: download the firmware files here 1. htc_7010.fw 2. htc_9271.fw

Code: Download the firmware files here

Code: Download the firmware files here 1. rt2870.bin

Code: hopefully nothing to do here,... if it doesnt work let me know