Adapting Android Devices for Multi-Hop Communication in Infrastructureless Ad-Hoc Networks
Total Page:16
File Type:pdf, Size:1020Kb
Calhoun: The NPS Institutional Archive DSpace Repository Theses and Dissertations 1. Thesis and Dissertation Collection, all items 2018-09 ADAPTING ANDROID DEVICES FOR MULTI-HOP COMMUNICATION IN INFRASTRUCTURELESS AD-HOC NETWORKS Nyberg, Claes Monterey, CA; Naval Postgraduate School http://hdl.handle.net/10945/60444 Downloaded from NPS Archive: Calhoun NAVAL POSTGRADUATE SCHOOL MONTEREY, CALIFORNIA THESIS ADAPTING ANDROID DEVICES FOR MULTI-HOP COMMUNICATION IN INFRASTRUCTURELESS AD-HOC NETWORKS by Claes Nyberg September 2018 Thesis Advisor: Gurminder Singh Co-Advisor: John H. Gibson Approved for public release. Distribution is unlimited. Reissued 3/14/2019 with correction to student’s professional affiliation. THIS PAGE INTENTIONALLY LEFT BLANK Form Approved OMB REPORT DOCUMENTATION PAGE No. 0704-0188 Public reporting burden for this collection of information is estimated to average 1 hour per response, including the time for reviewing instruction, searching existing data sources, gathering and maintaining the data needed, and completing and reviewing the collection of information. Send comments regarding this burden estimate or any other aspect of this collection of information, including suggestions for reducing this burden, to Washington headquarters Services, Directorate for Information Operations and Reports, 1215 Jefferson Davis Highway, Suite 1204, Arlington, VA 22202-4302, and to the Office of Management and Budget, Paperwork Reduction Project (0704-0188) Washington, DC 20503. 1. AGENCY USE ONLY 2. REPORT DATE 3. REPORT TYPE AND DATES COVERED (Leave blank) September 2018 Master's thesis 4. TITLE AND SUBTITLE 5. FUNDING NUMBERS ADAPTING ANDROID DEVICES FOR MULTI-HOP COMMUNICATION IN INFRASTRUCTURELESS AD-HOC NETWORKS 6. AUTHOR(S) Claes Nyberg 7. PERFORMING ORGANIZATION NAME(S) AND ADDRESS(ES) 8. PERFORMING Naval Postgraduate School ORGANIZATION REPORT Monterey, CA 93943-5000 NUMBER 9. SPONSORING / MONITORING AGENCY NAME(S) AND 10. SPONSORING / ADDRESS(ES) MONITORING AGENCY N/A REPORT NUMBER 11. SUPPLEMENTARY NOTES The views expressed in this thesis are those of the author and do not reflect the official policy or position of the Department of Defense or the U.S. Government. 12a. DISTRIBUTION / AVAILABILITY STATEMENT 12b. DISTRIBUTION CODE Approved for public release. Distribution is unlimited. A 13. ABSTRACT (maximum 200 words) Affordable, lightweight, and energy-efficient commercial off-the-shelf (COTS) mobile devices provide a tactical and economical advantage for both military personnel and civilian organizations operating in environments with degraded or no communications infrastructure. Since COTS mobile devices today require an existing and stable infrastructure for communicating reliably “out of the box,” this research explores how devices running the Android operating system can be modified and extended to support multi-hop communication in ad-hoc networks lacking infrastructure such as a server and satellite, or cellular or Wi-Fi connectivity. We show that the previously available wireless ad-hoc mode can be enabled on select Android devices regardless of their version, and provide the design and implementation of the tools necessary to distinguish those devices as well as configure the wireless interface. Furthermore, we provide a list of Android devices already screened by the designed tool and explain how to leverage the enabled ad-hoc mode to design and implement a portable, adaptable, and usable chat protocol with multi-hop capability that does not require a server. Finally, we test and evaluate our implementation, which can be easily installed for communication among multiple mobile Android devices that randomly join or leave the network in environments lacking infrastructure. 14. SUBJECT TERMS 15. NUMBER OF Android, IBSS, multi-hop, ad-hoc,wireless, infrastructureless PAGES 111 16. PRICE CODE 17. SECURITY 18. SECURITY 19. SECURITY 20. LIMITATION OF CLASSIFICATION OF CLASSIFICATION OF THIS CLASSIFICATION OF ABSTRACT REPORT PAGE ABSTRACT Unclassified Unclassified Unclassified UU NSN 7540-01-280-5500 Standard Form 298 (Rev. 2-89) Prescribed by ANSI Std. 239-18 i THIS PAGE INTENTIONALLY LEFT BLANK ii Approved for public release. Distribution is unlimited. ADAPTING ANDROID DEVICES FOR MULTI-HOP COMMUNICATION IN INFRASTRUCTURELESS AD-HOC NETWORKS Claes Nyberg Civilian, Ministry of Defense, Sweden MS, University of Gothenburg, 2004 Submitted in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE IN COMPUTER SCIENCE from the NAVAL POSTGRADUATE SCHOOL September 2018 Approved by: Gurminder Singh Advisor John H. Gibson Co-Advisor Peter J. Denning Chair, Department of Computer Science iii THIS PAGE INTENTIONALLY LEFT BLANK iv ABSTRACT Affordable, lightweight, and energy-efficient commercial off-the-shelf (COTS) mobile devices provide a tactical and economical advantage for both military personnel and civilian organizations operating in environments with degraded or no communications infrastructure. Since COTS mobile devices today require an existing and stable infrastructure for communicating reliably “out of the box,” this research explores how devices running the Android operating system can be modified and extended to support multi-hop communication in ad-hoc networks lacking infrastructure such as a server and satellite, or cellular or Wi-Fi connectivity. We show that the previously available wireless ad-hoc mode can be enabled on select Android devices regardless of their version, and provide the design and implementation of the tools necessary to distinguish those devices as well as configure the wireless interface. Furthermore, we provide a list of Android devices already screened by the designed tool and explain how to leverage the enabled ad-hoc mode to design and implement a portable, adaptable, and usable chat protocol with multi-hop capability that does not require a server. Finally, we test and evaluate our implementation, which can be easily installed for communication among multiple mobile Android devices that randomly join or leave the network in environments lacking infrastructure. v THIS PAGE INTENTIONALLY LEFT BLANK vi TABLE OF CONTENTS I. INTRODUCTION ........................................................................................ 1 A. PROBLEM STATEMENT ................................................................ 1 B. MOTIVATION AND RELEVANCE TO THE U.S. DEPARTMENT OF DEFENSE ........................................................ 1 C. SCOPE AND BOUNDARY ............................................................. 2 D. THESIS ORGANIZATION AND OVERVIEW .................................. 2 II. BACKGROUND ......................................................................................... 5 A. AD-HOC NETWORK OVERVIEW .................................................. 5 1. Wi-Fi Ad-Hoc Mode ............................................................. 6 2. Wi-Fi Direct .......................................................................... 8 3. Wi-Fi Direct on Android Devices ..................................... 12 B. THE ANDROID OPERATING SYSTEM ........................................ 12 1. Building Custom Firmware from AOSP .......................... 13 2. Building a Custom Kernel ................................................ 17 3. Gaining Root Privileges on Android Devices ................. 22 C. WIRELESS CHIPSETS ................................................................. 31 1. Overview of Wireless Chipsets ........................................ 31 2. Broadcom Wireless Chipset ............................................ 33 D. MANET RELATED PREVIOUS WORK ........................................ 40 1. AdHocDroid ....................................................................... 40 2. Thinktube........................................................................... 41 3. FireChat ............................................................................. 41 4. Wi-Fi Direct Modifications ................................................ 42 5. BLESSED with Opportunistic Beacons .......................... 43 6. 802.11s: The WLAN Mesh Standard ................................ 43 E. SUMMARY .................................................................................... 45 III. DESIGN AND IMPLEMENTATION ......................................................... 47 A. ANDROID FIRMWARE SCANNERS ............................................ 47 1. Firmware Scanner Design ................................................ 47 2. OTA Update Package Scanner ........................................ 50 3. Google Proprietary Drivers Package Scanner ............... 50 4. Google Factory Firmware Package Scanner .................. 51 B. AN EXAMPLE APPLICATION: IBSS CHAT ................................ 51 1. Design Goals ..................................................................... 51 2. Wireless Interface Configuration ..................................... 54 vii 3. Serverless Chat with Multi-Hop Capability ..................... 56 C. SUMMARY .................................................................................... 63 IV. TESTING AND EVALUATION ................................................................. 65 A. SCANNING ANDROID FIRMWARE PACKAGES ........................ 65 1. Downloading and Processing Firmware Packages ....... 65 2. Evaluation.......................................................................... 65 B. IBSS CHAT APPLICATION .......................................................... 67 1. Testing ..............................................................................