Project Report Final
Project Report Final
MUHAMMAD ASAD
MM-BSCS-199-016
SIBGHA BATOOL
MM-BSCS-199-048
BACHELOR OF SCIENCE
IN
COMPUTER SCIENCE
i
DEVELOPMENT OF REMOTE ACCESS TOOL IN JAVA
FOR ACCESSING ANDROID DEVICE VIA SHORT
MESSAGING SERVICE
MUHAMMAD ASAD
MM-BSCS-199-016
SIBGHA BATOOL
MM-BSCS-199-048
BACHELOR OF SCIENCE
IN
COMPUTER SCIENCE
ii
DECLARATION
I hereby declare that the contents of the project report, “Development of Remote
Access Tool in Java for Accessing Android via Short Messaging Service”
are product of my own research and no part has been copied from any published
source (except the references, standard mathematical of genetic models/
equations/ formulae/ protocols etc.). I further declare that this work has not been
submitted for award of any other diploma/degree in any other institute/university.
The Institute may take action if the information provided is found incorrect at any
stage.
_______________
Muhammad Asad
_______________
Sibgha Batool
iii
CERTIFICATE BY THE PROJECT SUPERVISOR
This is to certify that the final year project of BS(CS) RAD (Remotely access Android
Device) was developed by Muhammad Asad and Sibgha Batool supervised by Mr.
Faheem Khan and that in his opinion it is fully adequate, for the degree of BS Computer
Science.
Internal Examiner
Name: _____________________
Signature: __________________
External Examiner
Name: _____________________
Signature: ___________________
iv
PLAGIARISM UNDERTAKING
I solemnly declare that the research work presented in project report titled,
“Development of Remote Access Tool in Java for Accessing Android Device via
Short Messaging Service” is exclusively and solely my research work without any
significant contribution from any other person. Any small contribution, wherever
taken, has been duly acknowledged. I apprehend the zero-tolerance policy of the
HEC and TIMES Institute, Multan, towards Plagiarism. So, we as an author of this
project report state that no portion of my project report has been plagiarized and
that every material used from any source has been properly acknowledged, cited,
and referenced. I agree to that if I am found guilty of plagiarism in the above titled
project report, even after the award of BS degree, the Institution has the right to
cancel my degree. The Higher Education Commission of Pakistan and the TIMES
Institute, Multan, have the right to publish my name on the HEC/Institution website
for submitting a plagiarized project report.
_________________
Muhammad Asad
_________________
Sibgha Batool
_________________
Date
v
vi
The Controller of Examinations
Times Institute,
Multan.
We hereby certify that the contents and form of thesis submitted by Muhammad
Asad (MM-BSCS-199-016) and Sibgha Batool (MM-BSCS-199-048) has been
found satisfactory for the evaluation in the format approved by the Times
Institute. It is therefore recommended that further necessary action may kindly be
taken for the final award of the degree of BS.
(Computer Science).
Board of Examiners
External Examiner: _______________
Name
Designation
Affiliation
Supervisor: _______________
Name
Designation
Affiliation
Co-Supervisor: ________________
Name
Designation
Affiliation
vii
ACKNOWLEDGMENT
We are gratified to Almighty Allah (S.W.T) who is the most Beneficent and most
We would like to express our gratitude to our Supervisor Mr. Faheem Khan for
his guidance and support, and his continuous encouragement throughout the
project.
We are very thankful to Mr. Asim Ali Rao for his worthy discussions, reassurance
and for keen interest in our project, and correcting us during the various phase of
the project.
We are thankful to Mr. Arsalan Iftikhar for his encouragement, healthy comments,
We are also thankful to our worthy Chairman, Mr. Muhammad Sarfraz Muzaffar
and Executive director Ms. Warda Naseem for providing and maintaining
Last but not the least, we would express our sincere thanks to parents and
viii
Abstract
ix
Table of Contents
Abstract ix
CHAPTER-1 1
INTRODUCTION 1
1.1 Introduction 2
1.2 Background 3
1.3 Problem Statement 4
1.4 Purpose 4
1.5 Scope 4
1.6 Objective 5
1.7 Intended Audience 6
CHAPTER-2 7
SOFTWARE REQUIREMENT AND SPECIFICATION 7
2.1 Overall Description 8
2.1.1 Product Perspectives 8
2.1.2 Product Features 8
2.1.2.1 Modules Name and Description 9
2.1.4 Assumption and Dependency 10
2.1.4.1 Assumptions 10
2.1.4.2 Dependencies 10
2.2 System Features 10
2.2.1 System Feature 10
2.2.1.1 Response Sequence 11
2.2.2 Functional Requirements 11
2.3 External Interface Requirements 11
2.3.1 User Interfaces 11
2.3.2 Hardware Interfaces 12
2.3.3 Software Interfaces 12
2.3.4 Communications Interfaces 12
2.4 Other Nonfunctional Requirements 12
2.4.1 Performance Requirements 12
2.4.2 Safety Requirements 13
2.4.3 Security Requirements 13
x
2.4.4 Software Quality Attributes 13
2.4.4.1 Availability: 13
2.4.4.2 Security: 13
2.4.4.3 Reliability: 14
2.4.4.4 Compatibility: 14
CHAPTER-3 15
ANALYSIS (USE CASE MODEL) 15
3.1Identifying Actors and Use Cases 12
3.1.1 Android Device Owner: 12
3.1.2 Remote User: 12
3.2 Use Case Diagram 12
3.2.1 Android Device Owner: 12
3.3 Describe the Events Flow for Use Case 14
3.3.1 Android Device Owner: 14
3.3.2 Remote User: 15
CHAPTER-4 16
DESIGN 16
4.1Architecture Diagram 17
4.1.1 Four+1 View Model 17
4.2 ERD with Data Dictionary 19
4.2.1 Entity 20
4.2.2 Attribute 20
4.2.3 Relationship 20
4.3 Data Flow Diagram (Level 0, Level 1 and Level 2) 22
4.3.1 Level 0: 24
4.3.2 Level 1: 25
4.3.3 Level 2: 26
4.3.3.1 Android User 26
4.3.3.2 Remote User: 27
4.4 Class Diagram 29
4.5 Object Diagram 32
4.5.1 Notations Used in Object Diagrams – 32
4.5.1.1. Objects: 32
4.5.1.2. Links: 32
xi
4.6 Sequence Diagram 33
4.6.1 Android User: 35
4.6.2 Remote User: 36
4.7.1 Android User: 39
4.7.2 Remote User 40
4.8 Collaboration Diagram 40
Notations of a Collaboration Diagram 41
4.8.1 Android User: 43
4.8.2 Remote User: 44
4.9 State Transition Diagram 44
Notations of a State Transition Diagram 45
4.9.1 Android User: 46
4.9.2 Remote User: 47
CHAPTER 5 18
IMPLEMENTATION 18
5.1 Component Diagram 19
5. 2 Deployment Diagram 20
5.2.1. The Purpose of Deployment Diagram 21
CHAPTER-6 23
TESTING (SOFTWARE QUALITY ATTRIBUTES) 23
6.1Test Case Specification 70
6.2 Black Box Test Cases: 70
6.2.1 Boundary Value Analysis 71
6.2.1.1 SMS Receiver Test Case: 71
6.2.1.1.1 Start: 72
6.2.1.1.2 Stop: 72
6.2.2 Equivalence Class Partitioning 72
6.2.2.1 Test Case: 73
6.2.3 State Transition Testing 73
6.2.4 Decision Table Testing 75
6.2.5 Graph Based Testing 76
6.3 White Box Testing: 77
6.3.1 Statement Coverage 78
6.3.2 Branch Coverage 78
xii
6.3.3 Path Coverage 79
CHAPTER-7 80
TOOLS AND TECHNOLOGIES 80
7.1Programming Languages 77
7.2 Operating Environment 77
7.4 TOOLS AND TECHNIQUES: 77
7.4.1 BACK END: - 77
7.4.1.1 JAVA: 77
7.4.1.2 XML: Error! Bookmark not defined.
7.4.1.3 Android: 77
7.4.1.3.1 Activity: 78
7.4.1.3.2 Service 78
7.4.1.3.3 Content Providers 78
7.4.1.3.4 Broadcast Receivers 79
7.4.1.4 Android Studio: 80
7.4.1.5 SMS 80
7.4.1.6 GPS 80
7.4.1.7 Wi-Fi 81
7.4.1.8 Bluetooth 81
7.4.1.9 Regular Expression 81
7.4.2 FRONT END: - 82
7.4.2.1 XML: 82
7.4.2.2 Java: 83
Appendix A: User documentation 84
7.5 Appendix A 84
7.5.1 User documentation 84
7.5.2 USER MANUAL 84
References 14
xiii
CHAPTER-1
INTRODUCTION
1
1.1 Introduction
Smartphones have become an indispensable part of our lives, impacting various
aspects of our daily routines. From basic tasks to complex activities, our
dependence on smartphones is undeniable. However, along with this reliance
comes a prevalent fear known as nomophobia, or the fear of being without a mobile
phone. This phobia is experienced by many individuals who feel a sense of unease
or anxiety when they misplace their smartphones, even for a brief moment.
In the fast-paced nature of our professional lives, it is common for us to
inadvertently leave our smartphones behind in various locations such as offices,
colleges, outdoors, or even at home. Compounding the issue, these misplaced
phones are often disconnected from the internet, making it challenging to track
their whereabouts. The fear of someone else finding the phone and potentially
misusing the personal data, contacts, or messages stored within it amplifies the
anxiety associated with losing a smartphone.
To address this problem, there is a need for a tool that can access and control key
functionalities of an Android smartphone remotely. Such control over the phone's
settings could prove instrumental in locating the device by enabling features like
activating the sound profile to ring the phone, retrieving its geo-location, or
establishing an internet connection, among other actions.
One potential solution to this problem is the development of an Android application
that grants users remote access to their misplaced smartphones, allowing them to
perform specific changes or actions on the device using SMS (Short Message
Service). This application would require users to send SMS commands from any
phone. By leveraging SMS, the application can establish a remote connection with
the lost Android smartphone, even in the absence of an internet connection.
This project introduces the tool for remotely accessing an Android smartphone via
SMS, which can be sent from any trusted mobile phone worldwide. The idea entails
designing an Android-based application that facilitates a secure and controlled
remote access between the user and their smartphone. Through this application,
users would be able to control essential settings of their Android devices, thereby
providing a reliable and secure environment for remote access.
2
1.2 Background
Back in the old days we were not able to know the whereabouts of our android
devices. As a result, there was an immense need for a tool that can tell us about
the location of our device. Since then, many android apps have been developed.
In 2008, Life360 made its debut on Google Play. Life360 Inc., an American
information technology company headquartered in San Francisco, California,
offers location-based services worldwide, specializing in sharing and notifications
for consumers. Their flagship product, also named Life360, is a family social
networking application launched in 2008. The primary purpose of the app is to
facilitate the sharing of location among friends and family members. According to
Bloomberg Businessweek, Life360 is considered a "family-oriented private social
network." Unlike other platforms like Find My Friends and LinkedIn, Life360
focuses exclusively on connecting families rather than peer groups or professional
networks. Among its key features are location sharing, group messaging, and the
option to request roadside assistance. Through the app, users can instantly view
the whereabouts of other members within their circles and have the flexibility to
choose when and with whom to share their location information.
In 2009, the development of "Where's My Droid" took place. This app was
specifically created to assist users in locating their misplaced phones and is
available for free. Unlike the conventional method of calling the lost phone,
Where's My Droid offers more comprehensive features. Calling the phone may not
be effective if it is set to vibrate mode or located far away from your hearing range.
To overcome these limitations, the app utilizes a different approach. Users can
send a text containing a secret "attention" word or phrase to their phone. This
action triggers the app's find-me mode, causing the phone to switch from vibrate
to ringer mode, increase the volume, and ring for a duration of 30 seconds. This
innovative approach increases the chances of finding the lost phone even in
situations where calling would be ineffective.
In 2010, spy was launched. In 2011, AirDroid was built. In 2013, Google
Find My Device was released. All these apps were helpful but there were some
3
limitations. Some worked only when there was an internet connection, others
required the phone to be logged in to a Google account.
1.4 Purpose
This Android app serves the primary purpose of offering users a convenient
and efficient method to manage their Android devices using SMS commands,
eliminating the necessity for an internet connection. The app aims to simplify the
process of managing various device functions remotely, allowing users to perform
tasks such as adjusting volume levels, checking battery status, controlling
connectivity options, and modifying display settings through simple SMS
interactions. By offering this functionality, the app seeks to empower users with
greater flexibility and control over their Android devices, enabling them to
customize and manage their device settings conveniently, even in situations where
internet access may be limited or unavailable. The purpose of the app is to
enhance user experience, streamline device management, and provide a reliable
solution for controlling Android devices through SMS communication.
1.5 Scope
The main scope of the project is to build an app that will allow android users
to remotely access some features of smartphones without an internet connection.
These features include:
1. accessing the location of the device
2. Playing sound on the remote device for a specified time.
3. Getting audio volume of different audio types (ring, music, alarm,
notification, system, phone call).
4
4. Setting the audio volume of different audio types (ring, music, alarm,
notification, system, phone call).
5. Checking whether the Wi-Fi is enabled or disabled.
6. Checking whether the Bluetooth is enabled or disabled.
7. Enabling and disabling Bluetooth.
8. checking the device battery level
9. checking whether the device is charging or not.
10. getting brightness level of device
11. setting brightness level of device
12. getting display off timeout.
13. setting display off timeout
14. turning off display
15. checking whether the Wi-Fi hotspot is enabled of disabled.
16. Enabling or disabling the Wi-Fi hotspot. (API Level 29)
1.6 Objective
● To build an Android app to provide users with a simple and reliable method
of controlling their devices using SMS commands, even without an internet
connection.
● Enabling users to send specific SMS commands to their devices from a
designated mobile number, to remotely control various device functions.
● The app seeks to streamline tasks such as adjusting audio volume,
checking device status, managing connectivity options, and controlling
display settings. With an intuitive user interface and efficient command
validation,
● To enhance user convenience, allowing them to interact with their Android
devices effortlessly via SMS communication.
● To offer a practical and accessible solution for users to manage and control
their Android devices remotely, providing them with greater flexibility and
ease of use in their daily device interactions.
5
1.7 Intended Audience
The intended audience for this Android app includes Android device users
who seek a convenient and efficient way to control their devices using SMS
commands. This app caters to individuals who may have limited or no access to
an internet connection but still want to manage and manipulate various functions
of their Android devices remotely. It is designed for users who prefer the simplicity
of SMS communication and desire the ability to perform actions such as adjusting
volume levels, checking battery status, controlling Wi-Fi and Bluetooth
connectivity, and managing device settings through a straightforward and
accessible interface. The app aims to provide a seamless and intuitive user
experience for Android users, empowering them with convenient control over their
devices via SMS interactions.
6
CHAPTER-2
SOFTWARE REQUIREMENT AND SPECIFICATION
7
2.1 Overall Description
2.1.1 Product Perspectives
This project introduces the tool for remotely accessing an Android smartphone via
SMS, which can be sent from any trusted mobile phone worldwide. The idea entails
designing an Android-based application that facilitates a secure and controlled
remote access between the user and their smartphone. Through this application,
users would be able to control essential settings of their Android devices, thereby
providing a reliable and secure environment for remote access.
2.1.2 Product Features
The project specifies an app that will allow android users to remotely access some
features of smartphones without an internet connection.
The features of Application include:
1. Accessing the location of the device
2. Playing sound on the remote device for a specified time.
3. Getting audio volume of different audio types (ring, music, alarm,
notification, system, phone call).
4. Setting the audio volume of different audio types (ring, music, alarm,
notification, system, phone call).
5. Checking whether the Wi-Fi is enabled or disabled.
6. Checking whether the Bluetooth is enabled or disabled.
7. Enabling and disabling Bluetooth.
8. Checking the device battery level
9. Checking whether the device is charging or not.
10. Getting brightness level of device
11. Setting brightness level of device
12. Getting display off timeout.
13. Setting display off timeout
14. Turning off display
15. Checking whether the Wi-Fi hotspot is enabled of disabled.
16. Enabling or disabling the Wi-Fi hotspot. (API Level 29)
8
2.1.2.1 Modules Name and Description
Audio
Manage volume of ringtone, music and more.
Battery
Get the level of the device's battery and check if it is charging.
Bluetooth
Turn Bluetooth on and off, Check if Bluetooth is enabled.
Display
Manage the display’s brightness and state (on or off). Set time, after which
the display is turned off when the user is not interacting with the phone.
Grant Phone Remotely
Grant a phone number access remotely. The phone number sending the
grant command will be added to the list of granted phones for the specified module
(or all modules when using the all keyword). If access is no longer necessary
afterwards, you can remove the phone number from the list of granted phones in
the relevant module(s).
Location
Get location of the device.
Play Sound
Play ringtone for a specific duration.
Wi-Fi
Change the state of Wi-Fi on or off. Check if Wi-Fi is enabled.
Wi-Fi Hotspot
Turn hotspot on and off. Check if hotspot is enabled. The hotspot must be
pre-configured in the system.
9
2.1.4 Assumption and Dependency
2.1.4.1 Assumptions
● The coding should be error free.
● The application must be user friendly so that it is easy for the user to use it.
● Valid information of the user must be stored in the app that is used to
operate the app.
● Users should have their correct phone numbers and grant passwords to
remotely access and do action.
2.1.4.2 Dependencies
● The specific operating system which is an Android and Android level 4.0
and above is required on which the app will run.
● On the basis of listing requirements specification, the app will be developed
and run.
● The user should completely understand the app.
● Any update regarding the app, and any other update is to be stored to the
database and the data entered should be correct.
10
● Maintain student admission.
● Save the time and cost.
● Reduce manpower.
● To manage the college records efficiently.
● To provide data security as it ensures that students & staff member’s
personal data remain protected from unauthorized access.
GUI is one of the most important and easy to use for any user to interact
with any kind of device application, because this helps to manage or control the
system easily by using some icons and some other buttons. A first-time user of the
11
app should see the help tour dialogue box. If the user is not a first-time user, should
be able to see the main screen of the app which contains different modules like
audio, location, display, etc.
We use Java for writing the code for the project. Java and XML for creating
the menus, main screen and other designs. Android studio was used to code the
app.
This product requires a GSM connection that covers the entire world,
enabling users to interact with Android devices. The app utilizes the SMPP (Short
Message Peer-to-Peer) protocol to provide facility of sending and receiving of SMS
messages. This ensures seamless communication between the user and their
Android devices, regardless of their location.
The technology is suitable for quick responses. This project will be operated
entirely offline. In approximately 2-3 seconds, the user will be able to receive
responses to their queries. It maintains all records regarding commands and
12
responses in the app and shows them in the notification panel. The project involves
retrieving information from the android device via a GSM connection through SMS.
The user should not disclose its Grant Password. The user should only add
the phone numbers of trusted contacts. The app does not store any information of
the user online; all the data is stored in the phone.
Phone numbers that are registered in the app by the user will be able to
interact with Android devices by sending valid commands. Will be able to send
SMS to Android users having the app. The app is fully secured. No one can access
anyone’s android device through this app if he does not know the Grant Password.
Device owners will have access to the save mobile numbers. Only the app user
will have the rights for modifications such as changing the phone number of trusted
contacts. Access to the various subsystems will be accessed by the user.
2.4.4.1 Availability:
2.4.4.2 Security:
13
3. Each module has its own list with its own granted phone numbers.
4. The remote user has limited access, which is granted by the app’s user.
5. No one can access the user's device through the App unless they are an
authentic individual.
2.4.4.3 Reliability:
One of the key features of our project is its ability to continuously share
information over SMS for extended periods. Despite this continuous operation, the
app consumes a minimal amount of battery. In fact, extensive testing has shown
that the app only utilizes 1% of the battery while operating for a duration of 4 days.
This energy efficiency ensures that users can rely on the app for extended periods
without significant battery drain.
2.4.4.4 Compatibility:
14
CHAPTER-3
ANALYSIS (USE CASE MODEL)
15
3.1 Identifying Actors and Use Cases
The remote user will be able to communicate with the device by using any SMS
client app through SMTP. Many features are available on the dashboard, including:
12
Figure 3.1 Android Device Owner
Explanation:
A user is the owner of the device on an android device who has complete and
unlimited access to the app and its modules, create, delete, and edit phone
numbers. An Android user can make changes to the app, such as:
13
3.2.2 Remote User
Explanation:
The Remote user will send SMS from his android device. The SMS will consist
of the commands. The valid commands will be accepted by the SMS receiver
and in return it will give a response back. Remote user will send the commands
related to:
The following are some of the activities controlled by the owner of android
device:
14
1. Add/remove phone numbers.
3. Enable/disable modules.
15
CHAPTER-4
DESIGN
16
4.1 Architecture Diagram
Philippe Kruchten is credited with creating the 4+1 View Model, which is a
comprehensive approach to explaining the structure of a software system through
the utilization of multiple concurrent views. This model considers various system
features and concerns, presenting a holistic picture of the system's architecture.
17
It provides four important views:
The 4+1 view model can be expanded by adding a further view known as a
use case view for application system end-users. As a "plus one" view, or 4+1 view
model, it is connected with the previous four views and is used to explain the design
of the application. The application architecture using five concurrent views (4+1)
models is shown in the following diagram.
18
Send
Commands
Ma Get
Android nag App Info Remote
User e User
Dat
Hardware
Enable/Disable
Android User
Enable/Disable Adding/Removing
SMS
Receiver
Modules Phone
Numbers
19
4.2.1 Entity
For example:
4.2.2 Attribute
In ER diagrams, attributes are essential for defining the structure and properties
of entities, contributing to a comprehensive representation of the data model. They
help to identify and categorize the data, allowing for a more meaningful understanding
of the system's information.
For example:
If we have an entity called "Person," some of its attributes could include "Name,"
"Age," "Address," and "Email." These attributes provide specific details about each
person entity in the system.
4.2.3 Relationship
20
For example:
Use Sen
s d
RAD App
SMS Phone
receiver numbers
Modules
21
4.3 Data Flow Diagram (Level 0, Level 1 and Level 2)
A data flow diagram shows how data moves through a process or system. It
displays data inputs, outputs, storage locations, and pathways between each
destination using preset symbols such as rectangles, circles, and arrows as well as
brief text labels. A data flow diagram (DFD) is a common visual representation of how
information flows through a system. The right amount of the system demand can be
graphically represented by a neat and clear DFD. Either manually, mechanically, or
both can carry it out.
Circle (Bubble): It represents a process that changes data inputs into data outputs.
Curved Line (Data Flow): It shows the movement of data into or out of a process.
Parallel Lines (Data Store): It indicates a location for storing data items, which can
be accessed by different processes at different times.
Source or Sink: It represents an external entity that acts as the source of system
inputs or the sink of system outputs.
DFDs can be used to demonstrate how information enters and exits a system, how
data is modified, and where information is saved. The primary goal of a DFD is to
outline the boundaries and scope of a system, and it serves as a communication tool
between system analysts and various stakeholders during system redesign.
Data Flow Diagrams (DFDs) can be used to represent any level of abstraction
for a system or software. They provide a structured and hierarchical approach to
analyzing and understanding the information flow and functional aspects of a system.
DFDs are divided into different levels, denoted by numbers 0, 1, 2, and so on,
indicating the level of detail and complexity.
22
Zero-level DFD
The initial level of the Data Flow Diagram (DFD) is called the context diagram
or Zero-level DFD. In this diagram, the complete software system is represented by a
single bubble, providing an overview of the system's functionalities and interactions
with external entities. The input data and output data are depicted with incoming and
outgoing arrows, showing the data flows between the system and its external
environment. The system is then decomposed into more detailed processes or
bubbles in the 1-level DFD, where each bubble represents a major function or
process. This decomposition can continue further into the 2-level DFD, breaking down
each process into more detailed sub-processes or tasks. This iterative process can
be repeated as necessary to achieve a comprehensive understanding of the system.
It is important to maintain consistency in the number of outputs and inputs between
the different levels, a concept known as "leveling," which helps ensure a thorough
documentation of the system's design and information flow. The context diagram for
the outcome management system is an example of the Zero-level DFD.
One-level DFD
At this level, the context diagram is decomposed into more detailed processes
or bubbles, breaking down the major functions of the system into their sub-functions.
The 1-level DFD focuses on the primary processes and their interactions, showing
how data flows between them and the external entities.
Two-Level DFD
Further decomposition of the 1-level DFD leads to the 2-level DFD, which
provides even more detailed information about the processes and data flows. This
process of decomposition can be continued to achieve finer granularity and a deeper
understanding of the system's inner workings. There can be additional levels beyond
2-level DFDs if needed, depending on the complexity and requirements of the system.
23
4.3.1 Level 0:
Location
Android
SMS
Receiver User
Play
Grant
Sound
Phone
Remotely
Remote Remotely
User Access Audio
Device
Wi-Fi
Wi-
Hotspot
Fi___33
Display
Battery
Bluetooth
24
4.3.2 Level 1:
SMS Receiver
Audio
Android
User
Bluetooth
Remotely
Access Display
Device
(RAD)
Grant Remote Access
Remote Location
User
Play sound.
Wi-Fi
Wi-Fi Hotspot
25
4.3.3 Level 2:
Manage
Grant
Android Open Password
Check
User the App
Module
Enable
Modules
Disable
Modules
Start SMS
Receiver Manage
Module
Manage
Phone
Numbers
Manage
Device
Permissions
26
4.3.3.2 Remote User:
Open
Remote any SMS Receive
User Client Response
App
Send
Commands
27
4.4 Class Diagram
● They are the only UML that can correctly show various aspects of the
Object-Oriented Programming’s concept.
● They facilitate quicker and more efficient design and analysis of
applications.
● Class diagrams serve as the foundation for deployment and component
diagrams.
In a class diagram, each class is shown by using a rectangle that is divided into
three sections: name, attributes, and operations. Three types of modifiers are used to
determine the visibility of attributes and operations:
29
● "+" denotes public accessibility (accessible to everyone).
● "#" represents protected visibility (accessible to the same class and
derived classes).
● "-" signifies private visibility (accessible only within the class).
Efficiently making or editing the model can be achieved using several diagram
components, including:
● Interface
● Relationships (such as inheritance, association, and generalization)
● Class (with name, attributes, and methods)
● Associations (bidirectional and unidirectional)
● Objects
30
Figure 4.7 Class Diagram
31
4.5 Object Diagram
It shows specific instances of a system at a given point in time. Its main purpose
is to depict the behavior of the real system accurately, showing the system in a static
state. The object diagram displays instances in the system and the relationships
between them, offering insights into the system's behavior when objects are
instantiated.
4.5.1.1. Objects:
4.5.1.2. Links:
Links in a diagram act as metaphors for relationships. The end of each link
represents the total number of users involved. When a connection exists between two
classifiers, it is referred to as an association. The relationship between two objects is
32
described by a “link”. In graphical representation, a straight line is used to depict the
connection between two items.
A: android_user R: remote_user
33
various components of the system in a chronological manner. In order to understand
the requirements of both existing and new systems, they are used for documentation
by software developers. Sequence diagrams help in visualizing the flow of
communication and behavior among different elements of the system, making them
valuable tools for system design and analysis.
Actors – Theses are external entities that interact with the system being
modeled. They represent specific roles or users that communicate with the system's
objects but are considered external to the system's boundaries. Actors are depicted
as stick figures and are located outside the boundary of the system on the diagram.
Actors play a crucial role in illustrating the system's interactions with external
entities, helping to clarify the system's boundaries and the communication between
the system and its users or external components. They provide a way to identify the
external actors involved in the system's processes and highlight the interactions
between these actors and the system's objects.
34
To name a lifeline according to the UML standard, the format used is "Class
Name: Instance Name." This notation helps in identifying the class to which the lifeline
belongs and the specific instance or object it represents. By using lifelines, the
sequence diagram showcases the different entities and their interactions in a
chronological order, enabling a clear visualization of the sequence of events in the
system's processes.
35
4.6.2 Remote User:
36
that are available and also illustrates the flow of control during the execution of the
activity.
The steps taken in a use case for the execution are also represented through
these diagrams. They are versatile and can model both sequential and concurrent
activities, making them suitable for visualizing workflows. These diagrams focus on
the flow and order of activities, allowing us to explain and depict the events leading up
to specific outcomes.
Overall, an activity diagram is a powerful tool for representing the control flow
and decision points in the execution of activities, providing valuable insights into the
system's behavior and processes.
1. Initial State - The initial state represents the starting condition before an activity
takes place.
In the absence of nested activities, a process can have only one initial state. It
is depicted by a black-filled circle, symbolizing the state of an object upon its
creation. The Initial State in the UML Activity Diagram serves as both the entry
point and the first Activity State.
37
diagram. They visually depict the transitions from one activity state to another
within the system.
These flows illustrate the sequence of actions or activities and the control logic
that governs the flow of the process. By connecting the activity states with these
flows,
The diagram shows the progression of the system's behavior from one state to
another, offering a clear visualization of the process's execution and control
flow.
38
4.7.1 Android User:
39
4.7.2 Remote User
40
and functions of each object and demonstrate the dynamic behavior within a particular
use case.
42
4.8.1 Android User:
43
4.8.2 Remote User:
It displays all the potential states of an entity and the occasions when those
states can change (transitions), along with the conditions required for a transition to
occur. It is also known as a state diagram.
The state diagram is a behavioral diagram used to depict the status of a system
or its components at specific points in time. It uses state transitions to illustrate the
behavior of the system or component. State chart diagrams and State machines are
the terms used interchangeably with state diagrams.
44
In essence, a state diagram represents how a class or entity behaves
dynamically over time in response to changing external stimuli. Typically, state
diagrams are preferred for modeling classes with three or more distinct states. These
diagrams are useful for understanding and visualizing the dynamic behavior of a
system or component, especially when it involves complex states and state
transitions.
45
4.9.1 Android User:
Start
Main Activity
View Modules and Settings
SMS Receiver
Start SMS Receiver
Modules
Manage Modules
Phone Numbers
Manage Phone Numbers
Exit
46
4.9.2 Remote User:
Start
SMS app
Sends Commands
SMS Receiver
Command to app
Modules
Valid Command
Execution
Execute the syntax
Exit
47
CHAPTER 5
IMPLEMENTATION
18
5.1 Component Diagram
a) A component
19
b) A node
5. 2 Deployment Diagram
20
describe the software and hardware components of a system.
It visually presents the hardware components that will be used to properly run the
application. It provides a static view of the system's deployment, showing the
nodes and the connections between them.
1. Show the hardware topology of the system: The deployment diagram provides
a visual representation of the physical arrangement and configuration of
21
hardware components in the system. It allows stakeholders to understand the
distribution of hardware nodes and their interconnections.
22
CHAPTER-6
TESTING (SOFTWARE QUALITY ATTRIBUTES)
23
6.1 Test Case Specification
The entire system has been tested, and every part functions both successfully
on its own and as a whole. The app is running without encountering any errors.
The primary focus of this testing method is on the output and input of software.
Testers design test cases based on the expected inputs and expected outputs as
defined in the software requirements. They do not consider how the software
achieves its functionality but rather validate whether it behaves correctly based on
the specified requirements.
70
Figure 6.1 Black Box Testing
BVA (Boundary Value Analysis) is a black box testing method used to detect
errors that may occur at the edges of an input node. Test cases are designed to
assess the software's behavior when inputs are at the lower and upper boundaries,
as well as just outside those limits. The goal is to identify potential issues related to
handling boundary conditions and ensure the software's reliability and accuracy. BVA
focuses on critical points near the boundaries where errors are more likely to occur,
rather than within the valid range of inputs.
SMS Receiver can be turned off and on by tapping on the start and stop
button.
Start = Starts the SMS receiver service. Starts the time and displays for how
long the SMS Receiver is working. Timer starts from zero and goes on until
stopped. The button changes to a stop sign.
Stop = Stops the SMS receiver service. Stops the timer and displays “not
running”. Timer goes back to zero. The button changes to a stop sign.
71
6.2.1.1.1 Start:
Table 6 Email
6.2.1.1.2 Stop:
Table 6.1 Password
Receiver service
Changes Starts
stopped
72
6.2.2.1 Test Case:
Example:
1>=255
1 256 (Valid)
(Invalid) (Invalid)
73
S3
Send
Command
S1
Reject
Valid
Command
S2 S4
Valid Execution
Phone Successfu
Number l
74
6.2.4 Decision Table Testing
It is a software testing method that is used to test the behavior of a system for
various inputs given to the system. Decision Table Testing follows a systematic
approach of documenting the different input combinations and their output in a tabular
form.
Phone Expected
Scenario Command Module Results
Number Outcome
Will not
Remote Not
Incorrect off execute no response
access Registered
command
Will not
Not
Incorrect on execute no response
Registered
command
Will not
Incorrect Registered off execute no response
command
Will not
Incorrect Registered on execute no response
command
Will not
Not Execution
Correct off execute
Registered Failed
command
75
execute Failed
command
Example:
1. Remote user writes the SMS with the correct syntax and sends it from a valid
phone number that is registered in the app.
2. System check validation whether the command is correct or not correct.
3. Verification by module the phone number is stored in the module.
4. Final success/failure of the command execution.
76
Remote
User Tries Command Phone Command
to Send Verificatio Verificatio Execution
Command n n Success
s
Accessing the
App Phone No
Registered
Invalid Command
Reject
It is a form of testing in which the person who is testing completely aware of the
system's internal structure. The tester chooses the input for which the methods in the
code will be applied, and then determines the proper results. Information about the
system and how it is used is critical. From the end to the preceding amount, this is
done and checked for each field entry (Database). It is completed at the planning
stage. There are necessary improvements made to ensure that the modules in the
system perform efficiently in terms of the expected module departure.
All of the choices were thoroughly examined. The White Box exam is more
user-friendly and focuses on the system's details. This method is named after the
software system's resemblance to a white / visible box in the eyes of the tester; within
which one can clearly see.
77
6.3.1 Statement Coverage
It is a white box testing method that aims to execute all the lines in the source
code at least once. It is the measure of the percentage of code lines that have been
executed during testing. The goal is to ensure that every line of code is exercised
during the testing process.
271
Statement Coverage = × 100
271
78
for verifying code correctness and improving the application's reliability. However, it
should be complemented with other testing techniques for comprehensive test
coverage.
It is a testing methodology in which test cases are created to execute all linearly
independent paths in the program at least once. A linearly independent path is defined
based on the control flow graph of the application.
79
CHAPTER-7
TOOLS AND TECHNOLOGIES
80
7.1 Programming Languages
Java, XML
7.4.1.1 JAVA:
7.4.1.2 Android:
7.4.1.2.1 Activity:
7.4.1.2.2 Service
Content providers in Android offer a mechanism for sharing data among different
applications. The data that can be shared includes files, SQLite databases, or any
other data stored in a persistent location accessible by an application. To implement
a content provider, developers create a subclass of the Content Provider class. This
78
subclass defines the supported data format and provides a set of methods that allow
other applications to query or modify the data.
When an application needs to access the data provided by a content provider, it does
not directly call the content provider's methods. Instead, it uses an object called
Content Resolver to communicate with the content provider. The Content Resolver
acts as an intermediary and facilitates inter-process communication (IPC) while
sharing data with the content provider. This way, the Content Resolver collaborates
with the Content Provider to manage the sharing of data among different applications.
While broadcast receivers do not have a user interface, they can create status bar
notifications to alert the user when a broadcast event occurs. However, their main
purpose is often to act as a "gateway" to other components and perform minimal
tasks.
For activities and services, an intent defines the action to perform and may include the
URI of the data to act upon. In the case of broadcast receivers, the intent simply
specifies the announcement being broadcast. However, content providers are not
79
activated by intents. Instead, they are activated when targeted by a request from a
Content Resolver.
7.4.1.4 SMS
7.4.1.5 GPS
The Global Positioning System (GPS) is a utility owned by the U.S. that offers
positioning, navigation, and timing (PNT) services to users. This system is composed
80
of three segments: the space segment, the control segment, and the user segment.
The user segment includes GPS receiver equipment, which receives signals from the
GPS satellites and utilizes the transmitted data to calculate the user's three-
dimensional position and time. By combining signals from multiple satellites, GPS
receivers can accurately determine the user's location, making it a valuable tool for
navigation and various applications.
7.4.1.6 Wi-Fi
7.4.1.7 Bluetooth
Bluetooth is a wireless technology that enables data sharing over short
distances without the need for wires. It uses radio frequencies to establish connections
between devices and allows them to communicate and exchange data. Bluetooth is
commonly used in mobile devices to share files, connect with other Bluetooth-enabled
devices such as headphones or speakers, and facilitate data transfer between devices
in a convenient and cable-free manner.
Regular expressions have a rich history in computer science, showcasing how sound
theoretical concepts can lead to effective programs. Originally developed as a simple
computational model by theorists, Ken Thompson introduced them to programmers
through his implementation of the text editor QED for CTSS.
7.4.2.1 XML:
XML is a markup language used for structuring and organizing data, including
the representation of hierarchical data and metadata.
In the context of Android app development, XML is commonly used for defining
the layout and structure of user interfaces through XML layout files. These XML files
describe the arrangement and properties of UI elements (views) within an activity or
82
fragment. XML is used as a declarative markup language to define the visual
hierarchy, attributes, and properties of UI elements.
While XML is not a programming language itself, it plays a crucial role in front-
end development for Android apps by providing a descriptive way to define the user
interface and its properties. The XML layout files are then inflated and rendered by the
Android framework at runtime to create the actual user interface.
7.4.2.2 Java:
83
Appendix A: User documentation
7.5 Appendix A
RAD or Remotely Access Device is an android application that allows the user to
remotely access and control android devices using SMS.
Home Screen is the main screen that welcomes the user. It shows all the
functionalities the app provides and interface to configure each functionality.
At the top of the screen there is a button to the right of the “Sms Receiver”, which
enables or disables the SMS Receiver service for the app. Once the SMS Receiver
is started you will be able to control the Android device remotely through SMS.
Turning on the SMS Receiver also enables a timer that shows for how long the
SMS Receiver has been working.
To the right corner of the app there appears the three vertical dots icon for options.
It allows the user to make configurations to the app, inspect the RAD’s history by
looking at logs and check for dangerous behavior. Help tour will guide you about
the app and how it works. You can also learn how to control the Android device by
sending the commands through SMS.
84
Figure 7.1 Home Screen
2
7.5.2.2 SMS Receiver
The receiver is listening for incoming text messages and executing the received
commands. It can be started and stopped manually by clicking the right next to it.
Below the SMS Receiver there is the list of all available modules that the RAD
provides. The User can configure each module separately. It can enable and
disable modules of its choice. Each module allows the user to add, remove or edit
the phone numbers.
3
7.5.2.3 Modules
The control functions are grouped into modules. Each module contains one or
multiple commands (e.g., enable hotspot, disable hotspot). All the enabled
modules are represented with a green tick and disabled modules are represented
with a gray dash.
4
7.5.2.4 Audio Module
The audio module works with the audio of the android phone. It manages the
volume of the ringtone, music and more.
5
7.5.2.5 Battery Module
This module allows the user to get the battery percentage of the device and check
whether it is charging or not.
6
7.5.2.6 Bluetooth Module
Bluetooth Module allows the user to turn Bluetooth ON and OFF of the remote
android device.
7
7.5.2.7 Display Module
It is used to manage the display’s brightness and state ON or OFF. It is also used
to set the time after which the display will be turned off when the user is not
interacting with the device.
8
7.5.2.8 Grant Phone Remotely Module
It grants a phone number access to the device remotely. The phone number
sending the grant command will be added to the list of granted phones for the
specified module (or all modules when using the all keyword). If access is no longer
necessary afterwards, the android user can remove the phone number from the
list of granted phones in the relevant module(s).
9
7.5.2.9 Location Module
10
7.5.2.10 Play Sound Module
11
7.5.2.11 Wi-Fi Module
It is used to turn Wi-Fi ON and OFF and to know whether the Wi-Fi is turned ON
or OFF.
12
7.5.2.12 Wi-Fi Hotspot Module
It is used to turn Wi-Fi Hotspot ON and OFF and to know whether the Wi-Fi Hotspot
is turned ON or OFF. The hotspot must be pre-configured in the system settings.
13
References
1. Advanced Wireless Planet, SMS Text Mode. Accessed 27.04.2014.
http://www.gsm-modem.de/sms-text-mode.html/
2. Advanced Wireless Planet, SMS PDU Mode. Accessed 27.04.2014.
http://www.gsm-modem.de/sms-pdu-mode.html/
3. ARC Electronics, RS232 Tutorial on Data Interface and cables. Accessed
21.02.2014. http://www.arcelect.com/rs232.htm/
4. DS18S20 Datasheet.
http://www.maximintegrated.com/en/products/analog/sensors-and-
sensorinterface/DS18S20.html
5. 4G Americas, GSM Global System for Mobile Communications. Accessed
22.03.2014.
http://www.4gamericas.org/index.cfm?fuseaction=page§ionid=242
6. GSM Intelligence, Definitive data and analysis for the mobile industry.
Accessed 22.03.2014. https://gsmaintelligence.com/
7. GSM 07.07 document.
http://www.etsi.org/deliver/etsi_gts/07/0707/05.00.00_60/gsmts_0707v050000p.p
df
8. MZ2P10AE Datasheet.
http://www.carlogavazzisales.com/pdfs/switchingprod/Mz2p10ae.pdf
9. Osborne, A. 1980. An Introduction to Microcomputers. Volume 1: Basic
Concepts (2nd Ed.). Berkeley, California: Osborne-McGraw Hill
10. Jianye Liu, Jiankun Yu. Research on Development of Android Applications
11. OL. Google Android Developers, Android Developer Guide,
http://developer.android.com/guide/topics/fundamentals.html
12. Haruo Hosoya, Benjamin Pierce, Regular Expression Pattern Matching for
XML
13. Russ Cox, Regular Expression Matching Can Be simple and Fast (but is slow
in Java, Perl, PHP, Python, Ruby,)
14. Extensible markup language (XMLTM). http://w3.org/XML/
14
15. XML Schema Part 0: Primer, W3C Working Draft.
http://www.w3.org/TR/xmlschema-0/ , 2000
16. Nils Klarlund, Anders M¢ller, and Michael I. Schwartzbach. DSD: A schema
language for XML. http://www.brics.dk/DSD/
17. RELAX (REgular LAnguage description for XML). http://www.xml.gr.jp/relax/
18. https://www.java.com/en/download/help/whatis_java.html
15