
DebianRunner: Running Desktop Applications on Android Smartphones Abhishek Gupta, Alejandro Rodriguez and Kurt Preston Department of Computer Science University of Illinois at Urbana-Champaign Urbana, IL 61801, USA Email: fgupta59, arodri30, [email protected] Abstract Developers are forbidden from directly accessing hardware (preventing features like tethering), compil- The Android operating system runs atop the Linux ing to assembly (limiting performance optimizations), kernel, yet lacks the ability to natively execute stan- or utilizing the many libraries supported by Linux dard Linux desktop applications. Though efforts have (preventing things like the execution of Blackberry been made to enable this functionality, all approaches apps). Furthermore, users are prevented from access- to date require a user to switch to a separate desktop ing the rich ecosystem of software already developed environment, resulting in a substantial loss of interface for the Linux kernel. The Ubuntu public repositories consistency and usability. alone contain over 27,000 packages [22], constituting This paper describes DebianRunner, an Android hundreds of millions of lines of code, refined by tens application designed to execute in a custom, root- of thousands of developers over multiple decades, none enabled Android build. It unlocks desktop Linux ca- of which can be directly used in Android [21]. To be pabilities by mounting the full Debian Linux distribu- used, these applications have to go through the com- tion into the file system, and provides a tool to sim- plicated process of porting, often needing to be com- plify the installation and execution of Linux programs pletely re-written, despite the fact that the technology from within Android. required to run them exists natively on the device. Though functional, DebianRunner suffered from poor performance as a result of limited RAM in the 1.2 Previous Approaches HTC Dream used for testing. However, more power- ful phones should be better able to exploit Debian- Attempts have been made to overcome these short- Runner's functionality, and the most of techniques comings. To address the performance limitations in- explored in this paper would be applicable to other herent to Java programs, Google has provided the rooted Android phones. NDK [3], a toolkit to enable developers to run op- timized C/C++ code for performance gains. To sim- plify the porting of embedded applications, MapuSoft 1 Introduction has released a code porting utility [20]. Most no- tably, some custom Android builds have enabled sys- 1.1 Background tem calls [27], and have been utilized to install and run alternate desktop environments in parallel with Since Android's release in October 2008, the op- Android [12]. All these approaches are useful, and ad- erating system has attracted much developer atten- dress some of concerns itemized above; however, none tion, currently supporting over 25,000 publicly re- provide users with a simple way to seamlessly inte- leased applications [4]. Android has proved a pow- grate external applications. erful, though insulating programming environment; Although Linux applications can now be run from even though Android runs on top of the Linux kernel within a parallel desktop environment, the utility of and Java runtime environment, the platform prohibits this feature is lost by its inconvenience: users must applications from interacting directly with the kernel switch to an entirely different environment to install or Java VM [26]. While these restrictions help present or run software. These desktop environments were cre- an integrated and secure environment, they also tram- ated for a completely different form factor than a cell mel the power of the underlying technologies. phone, and translate poorly onto such a small screen, 1 forcing users to pan and zoom through an oversized to execute the thousands of useful legacy applications desktop to interact with the software. No approaches originally intended for other environments. to date enable non-Android software to behave like a The rest of the paper is organized as follows: Sec- normal part of the system. tion 2 describes the design decisions we have made and the alternatives we have considered; Section 3 de- 1.3 DebianRunner scribes the results we obtained; Section 4 discusses limitations and potential extensions of our work; Sec- A number of hardware and software barriers must be tion 5 discusses related work; Section 6 concludes. overcome to support the execution of non-Android software. Importantly, a customized operating system is required that enables system calls. Furthermore, 2 Design and Implementation Android provides no built-in capability for commu- nicating with external processes, requiring all incom- 2.1 Design Overview ing data to be transmitted over network connections using protocols like VNC. Multiple nodes of integra- The integration of Linux desktop applications into An- tion must be addressed: Linux applications should droid requires work across a variety of areas: custom be installed and removed from within Android; the Android firmware must be built, system calls must be user should be not forced to interact with a differ- wrapped, Linux display configuration modified, and a ent desktop environment when using external applica- number of user interaction particularities must be ad- tions; windows should be reformatted to fit the smaller dressed. However, our implementation can be divided display. Ideally, the user is prevented from acciden- into four key areas: tally corrupting their install. All this must also be done with a minimal memory footprint due to the lim- 1. Enable Android applications to execute privileged ited RAM available on smartphones. Linux commands: Custom Android firmware was With all this in mind, we have developed Debian- used to allow Android applications to make sys- Runner, an Android application running on top of a tem calls with root privileges (discussed in sec- custom Android environment that enables improved tion 2.3). integration of externally-executed applications into the Android system. Linux desktop applications are 2. Restore full Linux capabilities: A Debian Linux launched and interacted with from within an Android image was mounted to provide functionality that application, without requiring a user to switch to a was stripped from Androids Linux install (dis- foreign desktop environment. Selecting an application cussed in section 2.4). within DebianRunner causes the application to launch 3. Provide a mechanism for graphically interacting in the background, and start streaming graphic data with applications: Linux's display settings were over a remote VNC connection. Though the user is optimized for the small screen, and graphics were actually operating on a VNC client, the impression of streamed via VNC (discussed in section 2.5). working directly on an application is maintained. This approach enables broad flexibility, enabling the 4. Integrate all user-facing components into an An- presentation of any application that can be invoked droid application: The DebianRunner applica- from system calls. Furthermore, it hides the abstrac- tion was created to allow a user to run and in- tions from the user, enabling them to treat the exter- stall Linux applications from within Android (dis- nal application more like a part of their native environ- cussed in section 2.6). ment. In effect, it dramatically expands the number of applications that an Android user can run. These components are all deployed on the same Though currently hindered by the memory lim- system, as illustrated in figure 1. itations of our test hardware, our implementation demonstrates the execution of simple graphical Linux To execute applications, DebianRunner performs applications. Applications such as gCalculator and the following main steps (indicated by the numbers gEdit can operate without any modification, and with in figure 1): the larger RAM capacity of modern phones, more complicated applications should be possible. 1. A user selects an application to launch or install Much work is still required to provide the user a from the DebianRunner Android application. completely transparent experience; however, we be- lieve that DebianRunner represents an important step 2. A JNI call is made through the NDK, invoking a forward in the use of Android phones as a platform script to install or run the application. 2 Figure 1: Deployment View 3. The script will execute the desired command consistencies in the firmware. Simply put, Android is within Debian's context (rather than Android's a little bit different from phone to phone, version to Linux). version, and consequently, a more focused approach was required. 4. A VNC server is started in Debian, formatted to fit the phone's screen. We attempted modifications to the Motorola Droid, as well as configuration of system images loaded by 5. The application is launched in Debian. the Android SDK's emulator, but ultimately decided 6. A VNC client is started by DebianRunner, and to perform our implementation on the HTC Dream the Debian application's graphics are streamed (branded in the United States as the \T-Mobile G2"). to the user. Though it provides the most flexibility, the emulated environment proved extremely slow in booting cus- The technical details of this process are described in tom images, and seemed to have enough inconsisten- further detail in the following sections. cies with phone's native capabilities that our imple- mentation might be difficult to port to actual hard-
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages12 Page
-
File Size-