Wednesday, April 3, 2019

A Remote Desktop Application For Android

A distant Desk pass by lotion For mechanical manThe aim of this project is to develop a simple-to- consumption outback(a) backcloth employment which enables practice sessionrs to impertinent view contents of their backdrop and view, create, edit and delete lodge cabinets and leaflets contradictoryly. The operation runs on a airable turn (such(prenominal) as a cell-phone or birth control pill) which fully supports the mechanical man diligent political program and is equipped with features like WiFi, touch filmdom, document editor etc. An important death of this endeavour is to maintain the finishing commitr-friendly and easy-to-use.The industriousness uses the same communications protocol as Microsoft Windows for agitate sharing. Thus, implementing and using the use in a field of study environment where each user has entreeion to specific consigns and brochures makes sense. This as come up enables true mobility and control oer the user-account i n a university or office bushelting.In conclusion, the application whole caboodle perfectly when the tar furbish up remote machine is in the same network as the mobile doodad. For accessing a domain shargon, the whatchamac onlyum pauperizations to be connected to the domain via VPN (Virtual Private Network). The application is expect to work in the same fashion with a VPN like it does over an actual network.Chapter 1Introduction1.1 MotivationIn computing, the term remote backdrop refers to softwargon or an operating organisation characteristic which wholeows applications, a lot including graphical applications, to be run remotely on a horde while being dis biddinged local anaestheticly (1). In practise, the term remote desktop has a very broad meaning which could pertain to all of the specific uses of this feature. Also, each implementation of programs that enable remote access is different as the services supplyd by each of them vary.Applications of remote desktop ar many and depend on the setting in which it is employ. An important use is in the domain environment where a central boniface machine (or base of waiters) controls all the separate(a) knobs that ar connected to it. In such a situation, certain programs which need a lot of re offsets argon run on the emcee and are accessed by the knob computers via remote sharing. This approach eliminates the need for multiple licenses or expensive lymph node machines. Network administrators back end as sound use remote desktop to maintain and when bringd, troubleshoot a remote client machine. This reduces the need for a heroic number of technical support provide (2).Remote desktop in addition serves as a handy return for the end-user. It allows an employee to work from home by making forthcoming the same set of software and settings which are provided at office. A student brush off access all their important files and documents stored at the university computer without being p hysically give in anywhere near the campus. A novice user can get help with installation of particular software remotely from an expert (3).To use remote desktop, one needs specialised software. Though there are a plethora of remote desktop clients easy for the desktop on all major operating systems, the options for mobile curriculums are kind of scarce. This is majorly due(p) to a variety of operating systems in use and restricted re ascendants available in mobile devices. In addition to it, the few usable solutions are both quite expensive or are no yearlong supported. This prompted me to ride up the challenge of ontogeny a practical, easy-to-use remote desktop application for the ultra-portable platform which needs no technical know-how to setup and run.Chapter 2Literature Survey2.1 The android PlatformToday, there go a number of operating platforms for mobile devices. A majority of them are patented and are adopted by a handful of device manufacturers. Thus, developin g for such platforms would provide little in way of commercial take account to the application. Also, it ordain be available to only a small role of smartphone users. Porting the app to other mobile platforms is also non an alternative as this would require drastic interpolates in its law which would require surplus man hours.An expulsion to the above mentioned problem is the Android platform for mobile devices. Android is a software stack for mobile devices that includes an operating system, middleware1and key applications (4). Android was originated by a group of companies known as the Open Handset Alliance, lead by Google. Today, many more companies which involve cellular service providers, OEMs and developers contribute invested in Android and hold adopted it for their products (5). As can be seen from the following figure, the computer architecture of the platform is no different from traditional PC architectures. bet 1 The Android Architecture (Source Wikimedia Comm ons)The lowest layer of the architecture consists of the Linux kernel which has all the drivers needed to communicate with the hardware. This layer is also called the computer hardware abstraction layer. The layer above it has humanoid core libraries written in C/C++. It also has the Dalvik virtual Machine which provides inter-process abstraction. On top of the libraries is the API2layer which enables component re-use and better application design. The topmost layer has all core applications which ship with the OS.An important attribute of the Android platform is that it is open-source. Thus, its source code is easyly available which enables developers to use readily available genus Apis for developing robust applications quickly. Also, as the system requirements of Android are quite less, it is suitable for mid-range to ultra-high-end devices. As a number, Android can be seen in mobile phones, e-readers, PDAs and even netbooks (6). There is also an active developers community fo r Android which provides support via e-mail and web forums. Thus, it is not hard to see wherefore Android provides an ideal platform for application development. bod 2 A typical home-screen for Android devices (Source developers.android.com)The screenshot above shows a home screen of an android device. This device is a mobile phone and thus has applications such as contacts, phone and messaging on the home screen. A variety of tablet computers, electronic book readers and netbook computers also use android and have impressions relevant apps on the home screen. The white bar on the top is the observance bar which works the same way as the notification neighborhood in Microsoft windows. It demonstrations battery level, signal strength, time and current network connection.2.2 Android Application basicsApplications for the android platform are written in the JAVA programming language. For deploying an application to a device, the java code is graduation compiled and past bundled into an android package which is in the .apk format. The latter operation is with by the Android Asset Packaging Tool or aapt.In Android, every application runs in its own Linux process. Android branchs the process when any of the applications code needs to be executed, and shuts down the process when its no perennial needed and system resources are required by other applications. to each one process has its own virtual machine (VM), so application code runs in isolation from the code of all other applications. No other application is aware close to the existence of the other. By default, each application is assigned a unique Linux user ID. Permissions are set so that the applications files are visible only to that user and only to the application itself.2.3 Application componentsA unique feature of the android platform is that each application can use a feature provided by about other application without having to actually implement it. This encourages code-reuse and saves pr ecious man hours spent in development.Unlike applications on most other systems, Android applications dont have a single entry point for everything in the application (no main() function, for example). earlier, they have innate components that the system can instantiate and run as needed. There are four types of components2.3.1 ActivitiesAn application is a visual re fork overation for any business that application intends to fulfil. For example, an activity could be a arguing of images in a gallery, a menu with settings for the user or a telephone directory with contacts.An activity can spawn another activity whenever an event occurs. In the phonebook activity, when a user clicks on a contact, another activity is created which allows the user to either call or send a text essence to that contact.Each activity has a view associated with it. This view provides visual fractions such as text fields, buttons, checkboxes etc. These elements readiness have some listeners associate d with them which buy the farm an action when acted with.2.3.2 ServicesA service might not be visible to a user but it runs indefinitely in the earth and could be apply by an activity. For example, a service might play background music as the user attends to other matters, or it might fetch data over the network or calculate something and provide the result to activities that need it.A prime example is a media fake seting songs from a play list. The player application would probably have one or more activities that allow the user to strike songs and start playing them. However, the music playback itself would not be handled by an activity because users will expect the music to observe playing even after they abjure the player and begin something different. To keep the music going, the media player activity could start a service to run in the background. The system would accordingly keep the music playback service running even after the activity that started it leaves the screen. ilk activities and the other components, services run in the main thread of the application process. So that they wont block other components or the user interface, they ofttimes spawn another thread for time-consuming tasks (like music playback).2.3.4 Broadcast receiversA computer program receiver is a component that does nothing but receives and reacts to pass on announcements. These announcements can be anything that are meant to inform user about happening of an event such as email arrival, low battery indication, change of track in the music player and so on. Applications can also initiate broadcasts for example, to let other applications know that some data has been downloaded to the device and is available for them to use.An application can have any number of broadcast receivers to respond to any announcements it considers important.Broadcast receivers do not display a user interface. However, they may start an activity in repartee to the knowledge they receive, or they may use the Notification Manager to alert the user. Notifications can get the users attention in various ways flashing the backlight, vibrating the device, playing a sound, and so on. They typically place a persistent icon in the status bar, which users can open to get the message.2.3.5 Content providersA content provider makes a specific set of the applications data available to other applications. They basically provide for interprocess communication. The content provider extends the ContentProvider base discriminate to implement a standard set of methods that enable other applications to echo and store data of the type it controls. However, applications do not call these methods directly. Rather they use a ContentResolver object and call its methods instead. A ContentResolver can ripple to any content provider to manage communication with processes.Whenever theres a take that should be handled by a particular component, Android makes sure that the application proce ss of the component is running, starting it if necessary, and that an appropriate lawsuit of the component is available, creating the instance if it is necessary.2.4 A typical Android project directory structure figure of speech 1 shows the directory structure of an android project named filegetter. Here, the first cusp src holds the java source files for the project. These files contain actual java code which is written by the developers. In this case, the source files are held in a package named hardik.test.browse. The package helps to keep the source files together allowing easy access to data and variable inwardly the project. render 3 Directory structure of an Android projectThe next folder is gen which consists of auto generated java files. These files are generated when the project is build/compiled. Information about variables, strings and layouts are stored in these files.Android 1.6 is the build of the android platform against which the application is being created. Thi s is important as each build has some special classes which may not be present tense in an earlier one. Referenced Libraries consists of list of all third party or orthogonal libraries used for our project. In our case, it will consist of the JCIFS library (explained later).The assests folder in generally unused and it may hold required files if needed.The res folder has drawable, layout and values subfolders. Drawable consists of icons and other graphical elements of the application and is divided into three subfolders agree to resolution of indicate device. The layout folder holds .xml layout files which decide elements like button, text box, list etc. for the application. The values folder is used for providing id for different components of the application.The AndroidManifest.xml is an important element of an android project. In this file, all the activities and services of the application are described. opposite elements such as application permissions for the application are also described.Finally, the default.properties file has an entry for the build of target devices for which the application is being developed.2.5 Android in the MarketAccording to a May report by securities industry research group NDP, the Android operating system performed quite well in the first quarter (Q1) of 2010, moving past Apple to take the number-two position among smartphone operating systems. NPDs wireless market research reveals that ground on unit sales to consumers last quarter the Android operating system moved into second position at 28% behind explore In Motions Blackberry OS (36%) and ahead of Apples OS (21%) (7).These figures indicate a rise in popularity in the android platform. Also a large range of available handsets means that consumers will be able to choose according to their needs and budgets. This increase in market share also means that more developers will be willing to develop for Android making it a competitive, mainstream product.2.6 Remote se tting Implementation receivedly, there exist a variety of applications for PC which use either proprietary or generic/open-source protocols for remote desktop implementation. All of these applications are based on the host-client model where the server side of the software operates on the target machine and the client application is run on the remote innkeeper. either of the machines may function as client or server provided both of them are equipped with required software. soma 4 Implementation of a traditional client-server model (Source acm.org)Various protocols can be used for remote access. Each of these provides a specific set of functionalities that may be super acid to another protocol or unique to that particular protocol.Listed below are some of the protocols used for remote access and file sharing. These are widely used in several desktop clients in the market today.2.6.1 RDP (Remote Desktop communications protocol)It is a proprietary protocol developed by Microsoft which provides remote display and input capabilities over network connections for windows-based applications running on a server (8). The RDP is encapsulated within the TCP layer and uses separate virtual channels for carrying data, licensing breeding, encrypted information and so on. All versions of windows after windows XP support Remote Desktop via RDP. alone only the professional and ultimate versions come with the Remote Desktop master of ceremonies program which enables a user to share their screen (9).2.6.2 RFB (Remote Framebuffer) ProtocolRFB is a simple protocol for remote access to graphical user interfaces. Because it works at the framebuffer level it is applicable to all windowing systems and applications, including Linux, Windows and Macintosh. It is primarily used by the VNC (Virtual Network Computing) software and its derivatives. By default, it uses TCP port 5900 for the client and port 5500 for the server (10).2.6.3 SMB (Server Message Block)The Server Message Bl ock (SMB) Protocol is a network file sharing protocol which allows a client application in a network to read and write files on and point services from the server on the same network. The SMB protocol requires a plug away and encrypted authentication method and is thus more secure than other file sharing methods. Microsoft provides an SMB client and server with its Windows operating system. For Linux based systems, a service called Samba is freely available for using the protocol (11).Chapter 3 formulaOne of the major hurdles faced in designing a remote access client is to decide upon the protocol to be used. out of the available ones mentioned before, the RDP and SMB protocols allow screen-capturing of the remote machine onto the client device. This allows the user to interact with the desktop in real-time. Both these protocols have been implemented successfully in a variety of programs for all three popular (Windows, Mac OS and Linux) desktop platforms. Upon deciding the proje ct, the intent was to use one of these protocols for the application. But the following difficulties were experienced during the development phase.3.1 RDP and RFB Implementation issues3.1.1 Absence of library classesWhile implementing either RDP or RFB, one can use the Robot class present in Java which can mimic the mouse, simulate keyboard interactions and capture the screen of a remote host over the network (12). This class is unfortunately absent in android and thus cannot be used. This makes it difficult to perform the above mentioned functions in android as no alternative classes exist.Current RFB and RDP implementations on Android have made use of similar projects on the desktop environment by forking3the source code from these projects. These existent projects use external libraries without proper documentation and at times are written in a non-java programming language. Thus, comprehending the original code and then forking it would take a lot more time than the projects du ration.3.1.2 film for server side installationBoth the protocols (RFB and RDP) required a server side program running on the target machine. This program is bundled with server editions of most operating systems but require purchase on all other editions. Also, there may be compatibility issues if the server is running a RDP implementation and the device has a client using the RFB protocol. This will result into failed communication amongst the server and the client.Due to the aforementioned issues, remote access will be implemented by using the SMB protocol.3.2 Benefits of the SMB protocolAn compound version of the SMB called CIFS4(Common Internet File Sharing) has been in place since Windows 2000 and it provides a host of features when compared to other such protocols (13).3.2.1 Greater accessibilityThe SMB protocol for resource sharing has been used by Microsoft for their operating systems since Windows 95. In a domain environment, SMB is used to provide access to relevant res ources to every user. In Linux too, a free utility called Samba which uses the SMB protocol, comes with most distributions. Thus, out-of-box functionality can be provided to any client requiring remote access.3.2.2 Added warranterCIFS provides flexibility to allow anonymous win overs as well as secure, manifestd access to resources. Policies can also be intimately managed and changed whenever required3.2.3 Support for slow connectionAccess to shared resources and take of resources is also supported on slower connections. Thus, using a 3G or EDGE connection from a device will not be an issue while accessing remote files.3.2.4 Performance and scalability CIFS servers are highly combine with the operating system. Thus they function as part of the OS and not third party programs. This guarantees maximum system performance at all times (13).3.3 SMB Authentication MethodAuthentication over SMB occurs mainly through the NTLM (NT Lan Manager) that works on systems using windows and o n Linux/Unix distributions via the Samba server (14). NTLM is a challenge-response authentication protocol which uses three messages to authenticate a client in a connection oriented environment, and a fourth additional message if integrity is desired (15). The following figure shows exchange of messages between the client and server during authentication.Figure 5 Message sequence to authenticate an SMB sessionAs seen in the above figure, the client negotiates protocol-specific options using the SMB_COM_NEGOTIATE bespeak and the server replies with similar response messages as shown by (1) and (2) respectively. The client then sends an SMB_COM_SESSION_SETUP_ANDX request message. In cases where NTLM authentication is negotiated, within this message an NTLMNEGOTIATE_MESSAGE is embedded.The server responds with an SMB_COM_SESSION_SETUP_ANDX response message within which an NTLM CHALLENGE_MESSAGE is embedded. The message includes an 8-byte random number, called a challenge that the ser ver generates and sends in the ServerChallenge field of the message.The client then extracts the ServerChallenge field from the NTLM CHALLENGE_MESSAGE and sends an NTLM AUTHENTICATE_MESSAGE to the server (embedded in an SMB_COM_SESSION_SETUP_ANDX request message).If the challenge and the response prove that the client knows the users password, the authentication succeeds and the clients security context is now lay downed on the server. To acknowledge this, the server sends a success message embedded in an SMB_COM_SESSION_SETUP_ANDX response message.3.4 SMB Packet commutingThe following lists an example of a packet exchange between a client and a server via the SMB protocol (16).The client and the server establish a NetBIOS5connection.The client and server negotiate the Microsoft SMB Protocol dialect.The client logs on to the server.The client connects to a share on the server.The client opens a file on the share.The client reads from the fileThe connection being full-duplex, file transfer can occur from both ends.Chapter 4Implementation4.1 FlowchartIn any application, the flow diagram is an important figure that helps one go steady the interactions a user might have with the application and the possible outcomes of these interactions.Figure 6 Flowchart4.2 UML Use Case diagramUse cases are used to identify and partition system functionality. They separate the system into actors and use cases. Actors represent roles that can are played by users of the system. Those users can be humans, other computers, pieces of hardware, or even other software systems. The only step is that they must be external to the part of the system being partitioned into use cases. These actors can interact with the system in a variety of ways which create various outputs. The outputs may be for the users or for other components of the system.Figure 7 Use casesThe figure above shows a users interaction with the application. The user can access the Remote resources provided they are lo gged in to the remote share. Similarly, they can download a file to the local resources only if the file is present in the remote share.Chapter 5Results5.1 Experimental SetupFor evaluating the results, the application was used on an android handset with Android platform version 2.2. The remote server was a laptop running windows 7. Files and folders were shared using the SMB protocol with mandatory authentication to all shared resources. The target machine and the mobile device were both connected to the same wireless network.5.2 Application ScreenshotsFigure 8 On Start-upAs seen above, the user is presented with a tabbed view with local file system selected. Different icons are used for various datatypes.Figure 9 Local Photo folderSeen above is the photo folder located on the memory card of the device. The two green arrows on the top represent up and back buttons which are used for navigation.Figure 10 Login screenLogin screen on clicking the Remote tab.Figure 11 Unsuccessful login (pop-up appears)Figure 12 Remote downloadDownloading remote file to memory card on click.Figure 13 Operations on remote fileBibliography1. Remote Desktop Software. Wikipedia. Online Cited 25 June 2010. http//en.wikipedia.org/wiki/Remote_desktop_software.2. Remote desktop. TopBits technical school Community. Online Cited 25 June 2010. http//www.topbits.com/remote-desktop.html.3. 5 Best Remote Desktop and administration application. TechieZone. Online Cited 25 June 2010. http//techiezone.in/reviews/5-best-remote-desktop-and-administration-application/.4. About the Android Open Source Project. Android. Online Cited 26 June 2010. http//source.android.com/about/index.html.5. doctrine and Goals. Android. Online Cited 26 June 2010. http//source.android.com/about/philosophy.html.6. List of Android Devices. Wikipedia. Online Cited 26 July 2010. http//en.wikipedia.org/wiki/List_of_Android_devices.7. Android shakes up U.S. smartphone market. NDP. Online Cited 7 July 2010. http//www.npd.com/p ress/releases/press_100510.html.8. MSDN Remote Desktop Protocol. MSDN. Online Cited 4 July 2010. http//msdn.microsoft.com/en-us/library/aa383015.aspx.9. arrest the Remote Desktop Protocol (RDP). Microsoft Support. Online Cited 5 July 2010. http//support.microsoft.com/default.aspx?scid=kbEN-USq186607.10. Richardson, Tristan. The RFB Protocol Version 3.8 (2009-11-24). RealVNC. Online Cited 10 July 2010. http//www.realvnc.com/docs/rfbproto.pdf.11. Server Message Block Protocol. Search Networking. Online Cited 25 July 2010. http//searchnetworking.techtarget.com/sDefinition/0,,sid7_gci214214,00.html.12. Java Remote Desktop Administration. The Code Project. Online Cited 21 July 2010. http//www.codeproject.com/KB/IP/RemoteAdminJava.aspx.13. CIFS. Protocol Base. Online Cited 20 July 2010. http//www.protocolbase.net/protocols/protocol_CIFS.php.14. Integrating additional services. Samba.org. Online Cited 2 August 2010. http//www. trip the light fantastic toe.org/samba/docs/man/Samba-Guide/D omApps.html.15. Microsoft NTLM. MSDN (Microsoft Developers Network). Online Cited 5 August 2010. http//msdn.microsoft.com/en-us/library/aa378749(VS.85).aspx.16. Microsoft SMB protocol packet exchange scenario. Microsoft Developers Network (MSDN). Online Cited 10 August 2010. http//msdn.microsoft.com/en-us/library/aa365236(v=VS.85).aspx.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.