cis 632/eec 687 mobile computing cis 632/eec 687 mobile...
TRANSCRIPT
SRUTHI KADAVERU
SUBHASREE KIRANMAYEENEELA
CIS 632/EEC 687
MOBILE COMPUTING
REPORT ON
CIS 632/EEC 687
Mobile Computing
Report on
Sruthi Kadaveru (2657464)
Subhasree Neela (2657462)
SMART PC
A SMART PC
INDEX:
CONTENTS PAGE NO
1. ABSTRACT 01
2. GOAL 01
3. INTRODUCTION 01
3.1 MIXING ANDROID AND LINUX 02
3.2 WHY ANDROID? 03
3.3 DEBIAN NO ROOT 03
4. IMPLEMENTATION 04
4.1 TARGET PLATFORM: SAMSUNG GALAXY S3 04
4.2 TOOLS REQUIRED 04
4.3 SETTING UP 05
5. OUR EXPERIMENTS 06
5.1 DEVELOPING AN INTERACTIVE GAME APPLICATION
USING AN IDE
06
5.2 DEVELOPING A DYNAMIC WEBSITE 07
6. COMMANDS USED 13
7. INFERENCE 13
8. ISSUES FACED 13
9. FUTURE WORK 14
10. CONCLUSIONS 14
11. REFERENCES 15
1 SMART PC
1. ABSTRACT
Android operating system runs on the top of Linux kernel yet lacks the potential to execute
standard Linux desktop applications. Despite the fact that efforts have been made to enable this
functionality, any approach to deal with this requires a client to change to a separate desktop
environment, bringing about a considerable loss of interface consistency and ease of use.
In this project we use Debian No Root, an Android application intended to execute in a
specially, no root Android construct. It opens desktop Linux abilities by mounting the Debian
Linux distribution into the file framework and gives a tool to streamline the establishment and
execution of Linux programs within Android. Using this Debian OS application, the project mainly
portrays the capabilities of a smartphone as the replacement of a desktop.
2. GOAL
We use smartphones for many things like browsing, playing music, games etc but when it
comes to development or any complex application, smartphone doesn’t support this feature with
its native capabilities. On the other hand, programming or developing an application can be done
comfortably in a PC. The idea of Smart PC is to convert a smart phone into a PC. The concept of
SMART PC holds good when we can demonstrate the unique desktop specific application even on
a smartphone. Our main goal for this project is to demonstrate the development of an application
and how well is the performance on a smartphone.
3. INTRODUCTION
3.1. BACKGROUND
Our old smartphone can be of incredible use than placing it into a garbage can. Strikingly, we
can transform our phone into a mini-PC or media streamer when we have the USB On The Go
Support (OTG) and a Mobile High-Definition Link (MHL) compatible port. There's a huge amount
of additional functionality hiding under its hood. We would have never thought of utilizing a
smartphone with broken screen however better believe it for this we can even utilize a damaged
phone.
Mobile phones have made an amazing progress, from being only a basic remote audio
transmitting/receiving gadget and a short message exchanger, they can now be utilized as a basic
PC as a replacement of desktop.
The smartphones we utilize today are only a little, small scale desktop PC in our pocket. It
includes a display, processor, storage, memory, graphics card, power source, audio and wireless
systems administration. Well our desktop PC has precisely the same, despite the fact that in an
alternate form. The processors and display screens in today's cell phone are exceptionally
2 SMART PC
indistinguishable to a regular desktop PC. On the off chance that we have an Android smartphone,
we can simply connect to an active USB center, interface a console (keyboard), mouse and a
display and can be utilized as a normal desktop PC.
3.2. MIXING ANDROID AND LINUX
We know that, Android OS is the most widely deployed and common version of Linux OS.
Expanding Android platform without any extensive and major modifications of the underlying
framework to handle desktop tasks can bring out many new opportunities. In order to achieve this
the Linux Applications needs to be ported to Android. The issues related to package management
must be resolved by giving access to Linux repositories. Then we can finally get an optimal
mixture of Android and Linux for use in non-mobile applications.
Though Android is built on top of Linux Kernel, Linux and Android look at things differently.
Linux Android
In theory, we can use the Android framework and get the UX. But it is very difficult as android
is a tightly-coupled architecture.
For Android to function, the elements need to be kept intact. While these restrictions help
present an integrated and secure environment, they also obstacle the power of the underlying
technologies.
Developers are forbidden from directly accessing hardware (preventing features like tethering),
compiling to assembly (limiting performance optimizations), or utilizing the libraries
supported by Linux.
In addition to that, users are prevented from accessing the software already developed for the
Linux kernel.
The Ubuntu public repositories alone contain over thousands of packages, constituting millions
of lines of code, refined by thousands of developers over multiple decades, but none of these
can be directly used in Android.
Applications
Application Framework
HALs, flingers, etc.
Init
Linux Kernel
Bootloader
Apps OS
ServicOS utilities,
runtime,etc.OS Libraries
Linux Kernel
Bootloader
3 SMART PC
To be used, these applications have to go through a complicated process of porting, often need
to be completely re-written, despite the fact that the technology required to run them exists
natively on the device.
3.3. WHY ANDROID?
Motorola made attempts on this technology back in 2011 with its Webtop programming and
Lapdock equipment, however their efforts died within 18 months. Microsoft struck on a
comparative thought with its Continuum feature for Windows 10 Mobile smartphones, yet the
Microsoft's declining mobile fortunes didn’t look good for its future. We can forget Apple taking
a stab at something this radical, as well, so it's left to Android to get a move on. Moreover, system
calls have been enabled on some custom Android builds and have been used to install and run
desktop environments in parallel with Android.
Briefly about Android
Android is known for its ease of use and is open source.
Android is a mobile operating system built on Linux Kernel.
It is a software containing operating system as well as middleware and key applications.
Java programming language is used for writing the android application.
It is easily available as open source for developers to create applications which can be further
used for publishing as a part of android market.
Android depends on Linux version 2.6 for core system services, for example, security, memory
3.4. DEBIAN NO ROOT
Various hardware and programming boundaries must be overcome to support the execution of
non-Android software. To enable system calls, the most important aspect is to have a customized
working framework. Besides, communication with external processes i.e., transmitting all the
incoming data over network connections using any protocol is not a built-in feature in
Android. For this process, many nodes must be addressed to be integrated. The installation and
removal of any Linux application must be done from within Android; when using external
applications, the users should not be compelled to interact with a different desktop environment;
as mobile device has a smaller display, windows must be reformatted to fit in these screens without
losing the resolution or clarity. Ideally, the users are prevented from coincidentally corrupting the
install. All this must be likewise being finished with a minimal memory because of the constraint
on the RAM accessible on smartphones.
Considering all this, an Android application running on the top of a custom Android
environment that empowers enhanced integration of externally executed application in the system
is needed. Debian No Root is an Android application that addresses these problems and enables
the users to install and interact with Linux desktop functions without requiring the user to root
their device or change to an external desktop environment.
4 SMART PC
Debian No Root is not a complete version of Debian OS; it is a compatibility layer which
allows the users to run Debian desktop application. Many Linux based applications can be installed
on this app and use it just like a desktop. As it does not require rooting the device it works fine
with any stock ROM. This app requires 900 MB space on the internal memory (cannot be installed
on SD card) to be installed. This app works on Android version from 2.3 but not yet supported on
versions 5 and above (apt-get and dpkg does not work). For higher versions of Android, GNURoot
Debian may be used.
Debian No Root doesn’t have any contents at first, which means no programs are pre-installed,
so we need to install all by ourselves. Debian version needs to be updated periodically, so to make
sure the version of Debian is up to data, type apt-get update into the root terminal. Updating the
version will install the core crucial system and security packages. After updating is done, we can
start installing some basic applications using the terminal like-
· LibreOffice suite similar to MS Office: apt-get install libreoffice
· GIMP which is an Image-editing software: apt-get install gimp
· Iceweasel web browser (based on Firefox): apt-get install iceweasel
4. IMPLEMENTATION
4.1. TARGET PLATFORM: SAMSUNG GALAXY S3
Android OS is slightly different from phone to phone, version to version. Thus, more
focused approach is required to work with specific phone. We have used Samsung Galaxy S3 to
implement the Smart PC technology. It provided flexibility and the emulated environment was
loaded in a reasonable time. Performance was good, just bit slow some times. The phone’s native
capabilities were consistent and the implementation was not hard at all.
· Android version of Samsung Galaxy S3 is 4.3 which supports the Debian No Root app
· The CPU of the Samsung Galaxy S3 is Quad-Core with 1.4 GHz Cortex-A9
· With an internal memory of 16GB along with 4GB RAM
4.2. TOOLS REQUIRED
Before we get started, we will need the following:
A relatively new smartphone/tablet
A TV or monitor
Keyboard (Bluetooth/USB)
Mouse (Bluetooth/USB)
5 SMART PC
The concept of Smart PC starts with two main things, USB OTG support and MHL ports. The
MHL port’s main functionality is to add HDMI output capabilities (with 1080p and 7.1-channel
digital multi-channel audio support) to the phone’s USB port along
with functionality to remotely control the phone. The USB OTG
port is the one we use to charge our smartphone. The ability to
connect and work with a number of different USB peripherals, like
storage and input devices is given by the USB OTG support. We
can connect to an external screen i.e., a display and peripherals like
a keyboard or mouse by combining smartphone with MHL along
with USB OTG support. We can even use wireless/Bluetooth
keyboards and mouse as well, if they use standard USB HID
(human interface device) drivers
4.3. SETTING UP
The first thing to do is to download Debian No Root app from Google Play Store. Once the
app is installed we will need to grant it some permissions to access app usage data (to manage
running apps in the task bar) as well as the access to notifications, so that we can manage these
directly from the external display.
The next step is to set up screen and peripherals. The OS suggests using a display with a
minimum resolution of 1080p and can be used either as a dedicated computer monitor or hook it
up to television. Then we need to connect a mouse and keyboard. Connecting Bluetooth-enabled
wireless devices makes everything a lot easier by simply following the normal pairing setup.
We can even connect a USB mouse or keyboard to your smartphone or tablet using a USB
OTG as mentioned in earlier section unless we are using an OTG hub, we will be able to connect
Bluetooth Mouse MHL Cable with HDMI and USB Audio Cable with
HDMI/VGA port
Bluetooth Keyboard Samsung S3 Android
Smartphone
6 SMART PC
only one of these peripherals at any time and it also mean we won’t be able to charge smartphone
at the same time.
5. OUR EXPERIMENTS
5.1 Developing an interactive game application using an IDE:
ECLIPSE [IDE]:
Eclipse is a multi-language software development environment. It is written mostly in Java. It can
be used to develop applications in Java and, other programming languages including Ada, C, C++,
and much more. Development environments include the Eclipse Java development tools (JDT) for
Java and Scala.
We have developed an interactive game application using Java on Eclipse IDE. The title of the
game being “CODE BREAKER”.
AIM of the game – A random four-digit code with non-repeated digits is generated by the
system and player/user should guess the code within limited number of attempts.
Ducks – It represents number of correct digits, placed in correct location.
Chicks – It represents number of correct digits, but placed in wrong location.
7 SMART PC
5.2 Developing a Dynamic Website:
Initially for developing a website we focused on using PHP scripts as an alternative for JSPs as
there was so ECLIPSE EE for writing JSP scripts. Though PHP is popular now-a-days, JSP is
more powerful than PHP since it doesn’t provide access to all the JAVA libraries like JSP, it is
limited only to PHP libraries.
Even without a proper IDE, Debian OS allows developers to write JSP and HTML files in the
terminal using “nano” editor. As we were more comfortable with JAVA than PHP scripting, we
shifted to JSPs relying on the nano feature. Though it was less interactive compared to IDE, it
helped us succeed in creating JSP files.
For developing our dynamic website, we used the following:
5.2.1 ROLE OF STUDENT INFORMATION RETRIEVAL WEBSITE:
We have designed and developed a website “Student Information Retrieval” which will provide
detailed information of different projects under Mobile Computing Course, along with student
information.
Figure [1] – Login Page Figure [2] – Home Page
Tomcat7 Which acts as Server
MySQL Which is our backend database
JSP Java Server Pages which provides the communication between server and
database
HTML Serves as User Interface
CSS Cascading Style Sheets – adds style to the pages
11 SMART PC
MySQL Database:
Figure [6] – Starting MySQL Figure [7] – Studentdb Tables
Figure [8] – Student Table
12 SMART PC
5.2.2 Detailed Description of website functionalities
1. Login Page: This page allows students to login to the website using their CSU ID and
password same as our campus net or blackboard.
2. Home Page: This page provides link to different pages like ‘view by student page’, view
by ID page’, ‘add student page’, ‘logout’.
3. View Students by Project: This page will allow students to view information about
students working on different projects in mobile computing course.
4. View Students by ID: This page will allow students to view projects done by a students
under mobile computing course using their ID.
5. Add Students: Using this functionality, students are allowed to add themselves to their
projects by providing detailed information like their name, CSU ID, gender, project they
belong to, year of enrollment, email address, address. For building this page we have used
CSS and html 5. Whenever
6. Logout: This page will allow students to logout from the website.
5.2.3 More about JSP’s:
Java Server Pages (JSP) is a technology that helps software developers create dynamically generated web
pages based on HTML, XML, or other document types. It uses the Java programming language. JSP pages
use several delimiters for scripting functions. The most basic is <% ... %>, which encloses a JSP scriptlet.
A scriptlet is a fragment of Java code that is run when the user requests the page. Java code is not required
to be complete or self-contained within a single scriptlet block.
Before running the website there are few steps which have to be completed first:
We have to start tomcat and mysql first using the command –
Deploy the project by copying project folder under webapps in tomcat7 folder. Project folder
includes html, jsp, css, image.
/etc/init.d/tomcat7 start
service mysql start, mysql -u root -p, mysql
13 SMART PC
6. COMMANDS USED
7. INFERENCE
ADVANTAGES
On the positive side this offers a simple, relatively economical and straight-forward
way of turning an old smartphone into something useful. It is not a replacement for a fully-
fledged PC, but if we need something for word processing, photo editing or
developing/running small Linux/Windows based applications, then Debian OS is certainly
an affordable option than buying a new PC provided we already have the required
equipment. Moreover, for those who can’t afford a PC but still want a desktop, smart pc
technology would be very useful.
Navigating the interface with a mouse and keyboard feels very normal and while the
software is still a hitch, performance on the smartphone is not a big issue.
DISADVANTAGES
On the negative side, the interface is still very buggy and limited in what it allows
us to do. As the concept of smart pc is still evolving there are limited features available.
The inability to open non-Debian apps and the need for better keyboard shortcuts to help
navigating the interface will help improve the usability of smart pc immensely.
8. ISSUES FACED
Since the Debian OS doesn’t come with any of the built-in softwares, biggest hurdle was
to install all the necessary softwares needed for developing or running applications for
testing. The basic features like text editors, audio/video compatibility tools, picture viewers
are missing and need to be installed.
Tomcat7 apt-get install apache2
MySQL apt-get install mysql-server
Java apt-get install openjdk-java7-jdk openjdk-java7-jre openjdk-java7-lib
Eclipse apt-get install eclipse eclipse-jdt
FireFox apt-get install iceweasel
Word apt-get install abiword
14 SMART PC
As this Debian OS works on a mobile, the version of the OS is still the underlying mobile
OS. With this scenario, if we try to download any software and try to run the executable
file, it cannot be run on this Smart PC due to mismatch with underlying OS versions.
To overcome the problem of running .exe files in Debian OS, a tool called as ‘Wine’ or
‘winehq’ is given by the server. But this tool doesn’t work for every .exe file execution.
As this Debian mobile version is not yet fully constructed OS, it allows very few packages
for downloading, which restricts the users.
Limited RAM storage, disk space and CPU are always constraints compared to
desktops/laptops.
Programming on this mobile Debian OS was always challenging because of limited
programming environment.
Working with Tomcat is always troublesome. We faced issues while starting tomcat.
9. FUTURE WORK
In this project, we mainly focused on the demonstration of one of the desktop specific feature
i.e., programming/development of applications. Programming being our main aspect, we could
successfully demonstrate how well a smart pc can be used to replace a desktop in this scenario
using different ways like coding using terminal, developing an interactive game using java with
the help of an IDE and also designing and developing a dynamic website. This approach helped
us demonstrate the extent to which a smart pc can be used over computers.
As part of our future work, we would like to extend our scope by working with different mobile
OS versions. Also explore other desktop unique features.
10. CONCLUSIONS
Turning a mobile phone into a Smart PC not only allows users to view videos, play music,
internet browsing, editing documents, but it can also be used by developers same as traditional
desktops, for programming and developing different applications.
Working on Debian mobile OS on smartphone is much like desktop Linux version. Even
though downloading different tools and software was little problematic because of the limited
availability, we can overcome this with the availability of better OS. As this is a new
concept/technology the OS applications are not much available. It’s still work-in progress.
Increased processing power, better battery life, vastly improved networking speeds on mobile
devices, are the demands with which accelerate the shift from desktops to Smart PC.
Beyond shadow of doubt, Smart PC can be a better replacement to traditional desktops for low
cost.
15 SMART PC
11. REFERENCES
[1] Christina Bonnington.(02.10.15).In Less Than Two Years, A Smartphone Could Be Your
Only Computer
[2] Deccan Chronicle. How to use a smartphone as a desktop PC. Published Mar 7,2016
[3] How to turn an Android smartphone into a PC. http://www.trustedreviews.com/how-tos/how-
to-turn-your-android-smartphone-into-a-pc#FKrM1pEuZAdp0KEL.99
[4] Dan Lohrmann. Will a Smartphone Replace Your PC? APRIL 24, 2016
[5] https://github.com/pelya/commandergenius/tree/sdl_android/project/jni/application/xserver-
debian
[6] https://www.androidpit.com/turn-your-android-device-into-a-linux-pc-without-rooting
[7] http://www.engineersgarage.com/articles/what-is-android-introduction