Wednesday, December 2, 2015

Open-source community

Android has an active community of developers and enthusiasts who use the Android Open Source Project (AOSP) source code to develop and distribute their own modified versions of the operating system.[142] These community-developed releases often bring new features and updates to devices faster than through the official manufacturer/carrier channels, with a comparable level of quality;[19] provide continued support for older devices that no longer receive official updates; or bring Android to devices that were officially released running other operating systems, such as the HP TouchPad. Community releases often come pre-rooted and contain modifications not provided by the original vendor, such as the ability to overclock or over/undervolt the device's processor.[143] CyanogenMod is the most widely used community firmware,[144] and acts as a foundation for numerous others. There have also been attempts with varying degrees of success to port Android to iPhones, notably the iDroid Project.[145] Historically, device manufacturers and mobile carriers have typically been unsupportive of third-party firmware development. Manufacturers express concern about improper functioning of devices running unofficial software and the support costs resulting from this.[146] Moreover, modified firmwares such as CyanogenMod sometimes offer features, such as tethering, for which carriers would otherwise charge a premium. As a result, technical obstacles including locked bootloaders and restricted access to root permissions are common in many devices. However, as community-developed software has grown more popular, and following a statement by the Librarian of Congress in the United States that permits the "jailbreaking" of mobile devices,[147] manufacturers and carriers have softened their position regarding third party development, with some, including HTC,[146] Motorola,[148] Samsung[149][150] and Sony,[151] providing support and encouraging development. As a result of this, over time the need to circumvent hardware restrictions to install unofficial firmware has lessened as an increasing number of devices are shipped with unlocked or unlockable bootloaders, similar to Nexus series of phones, although usually requiring that users waive their devices' warranties to do so.[146] However, despite manufacturer acceptance, some carriers in the US still require that phones are locked down, frustrating developers and customers.[152]

Android's Default User Interface

Android's default user interface is based on direct manipulation,[48] using touch inputs that loosely correspond to real-world actions, like swiping, tapping, pinching, and reverse pinching to manipulate on-screen objects, along with a virtual keyboard.[48] Game controllers and full size physical keyboards are supported via Bluetooth.[49] The response to user input is designed to be immediate and provides a fluid touch interface, often using the vibration capabilities of the device to provide haptic feedback to the user. Internal hardware, such as accelerometers, gyroscopes and proximity sensors[50] are used by some applications to respond to additional user actions, for example adjusting the screen from portrait to landscape depending on how the device is oriented, or allowing the user to steer a vehicle in a racing game by rotating the device, simulating control of a steering wheel.[51]
Android devices boot to the homescreen, the primary navigation and information "hub" on Android devices that is analogous to the desktop found on personal computers. (Android also runs on regular personal computers, as described below). Android homescreens are typically made up of app icons and widgets; app icons launch the associated app, whereas widgets display live, auto-updating content, such as the weather forecast, the user's email inbox, or a news ticker directly on the homescreen.[52] A homescreen may be made up of several pages, between which the user can swipe back and forth, though Android's homescreen interface is heavily customisable, allowing users to adjust the look and feel of the devices to their tastes.[53] Third-party apps available on Google Play and other app stores can extensively re-theme the homescreen, and even mimic the look of other operating systems, such as Windows Phone.[54] Most manufacturers, and some wireless carriers, customise the look and feel of their Android devices to differentiate themselves from their competitors.[55] Applications that handle interactions with the homescreen are called "launchers" because they, among other purposes, launch the applications installed on a device.
Along the top of the screen is a status bar, showing information about the device and its connectivity. This status bar can be "pulled" down to reveal a notification screen where apps display important information or updates, such as a newly received email or SMS text, in a way that does not immediately interrupt or inconvenience the user.[56] Notifications are persistent until read (by tapping, which opens the relevant app) or dismissed by sliding it off the screen. Beginning on Android 4.1, "expanded notifications" can display expanded details or additional functionality; for instance, a music player can display playback controls, and a "missed call" notification provides buttons for calling back or sending the caller an SMS message.[57]
Android provides the ability to run applications that change the default launcher, and hence the appearance and externally visible behaviour of Android. These appearance changes include a multi-page dock or no dock, and many more changes to fundamental features of the user interface.[58]

Tuesday, December 1, 2015

Android Security and Privacy

Permissions are used to control a particular application's access to system functions.
Android applications run in a sandbox, an isolated area of the system that does not have access to the rest of the system's resources, unless access permissions are explicitly granted by the user when the application is installed. Before installing an application, Play Store displays all required permissions: a game may need to enable vibration or save data to an SD card, for example, but should not need to read SMS messages or access the phonebook. After reviewing these permissions, the user can choose to accept or refuse them, installing the application only if they accept.[153] The sandboxing and permissions system lessens the impact of vulnerabilities and bugs in applications, but developer confusion and limited documentation has resulted in applications routinely requesting unnecessary permissions, reducing its effectiveness.[154] Google has now pushed an update to Android Verify Apps feature, which will now run in background to detect malicious processes and crack them down.[155]
In Android 6.0 Marshmallow, the permissions system was changed to allow the user to control an application's permissions individually, to block applications if desired from having access to the device's contacts, calendar, phone, sensors, SMS, location, microphone and camera.[156] Full permission control is only possible with root access to the device.[157]
Research from security company Trend Micro lists premium service abuse as the most common type of Android malware, where text messages are sent from infected phones to premium-rate telephone numbers without the consent or even knowledge of the user.[158] Other malware displays unwanted and intrusive adverts on the device, or sends personal information to unauthorised third parties.[158] Security threats on Android are reportedly growing exponentially; however, Google engineers have argued that the malware and virus threat on Android is being exaggerated by security companies for commercial reasons,[159][160] and have accused the security industry of playing on fears to sell virus protection software to users.[159] Google maintains that dangerous malware is actually extremely rare,[160] and a survey conducted by F-Secure showed that only 0.5% of Android malware reported had come from the Google Play store.[161]
Google uses Google Bouncer malware scanner to watch over and scan applications available in the Google Play Store.[162] It is intended to flag up suspicious apps and warn users of any potential threat with an application before they download it.[163] Android version 4.2 Jelly Bean was released in 2012 with enhanced security features, including a malware scanner built into the system, which works in combination with Google Play but can scan apps installed from third party sources as well, and an alert system which notifies the user when an app tries to send a premium-rate text message, blocking the message unless the user explicitly authorises it.[164] Several security firms, such as Lookout Mobile Security,[165] AVG Technologies,[166] and McAfee,[167] have released antivirus software for Android devices. This software is ineffective as sandboxing also applies to such applications, limiting their ability to scan the deeper system for threats.[168][169]
Android's fragmentation is a problem for security, since patches to bugs found in the core operating system often do not reach users of older and lower-price devices.[170][171] One set of researchers say that the failure of vendors to support older devices with patches and updates leaves more than eighty-seven percent of active devices vulnerable.[172][173] However, the open-source nature of Android allows security contractors to take existing devices and adapt them for highly secure uses. For example, Samsung has worked with General Dynamics through their Open Kernel Labs acquisition to rebuild Jelly Bean on top of their hardened microvisor for the "Knox" project.[174][175]
Android smartphones have the ability to report the location of Wi-Fi access points, encountered as phone users move around, to build databases containing the physical locations of hundreds of millions of such access points. These databases form electronic maps to locate smartphones, allowing them to run apps like Foursquare, Google Latitude, Facebook Places, and to deliver location-based ads.[176] Third party monitoring software such as TaintDroid,[177] an academic research-funded project, can, in some cases, detect when personal information is being sent from applications to remote servers.[178] In August 2013, Google released Android Device Manager (ADM), a component that allows users to remotely track, locate, and wipe their Android device through a web interface.[108][179] In December 2013, Google released ADM as an Android application on the Google Play store, where it is available to devices running Android version 2.2 and higher.[180][181]
As part of the broader 2013 mass surveillance disclosures it was revealed in September 2013 that the American and British intelligence agencies, the National Security Agency (NSA) and Government Communications Headquarters (GCHQ), respectively, have access to the user data on iPhone, BlackBerry, and Android devices. They are reportedly able to read almost all smartphone information, including SMS, location, emails, and notes.[182] (See also WARRIOR PRIDE.) In January 2014, further reports revealed the intelligence agencies' capabilities to intercept the personal information transmitted across the Internet by social networks and other popular applications such as Angry Birds, which collect personal information of their users for advertising and other commercial reasons. GCHQ has, according to The Guardian, a wiki-style guide of different apps and advertising networks, and the different data that can be siphoned from each.[183] Later that week, the Finnish Angry Birds developer Rovio announced that it was reconsidering its relationships with its advertising platforms in the light of these revelations, and called upon the wider industry to do the same.[184]
The documents revealed a further effort by the intelligence agencies to intercept Google Maps searches and queries submitted from Android and other smartphones to collect location information in bulk.[183] The NSA and GCHQ insist their activities are in compliance with all relevant domestic and international laws, although the Guardian stated "the latest disclosures could also add to mounting public concern about how the technology sector collects and uses information, especially for those outside the US, who enjoy fewer privacy protections than Americans."[183]

Android History

Android, Inc. was founded in Palo Alto, California in October 2003 by Andy Rubin (co-founder of Danger),[24] Rich Miner (co-founder of Wildfire Communications, Inc.),[25] Nick Sears (once VP at T-Mobile),[26] and Chris White (headed design and interface development at WebTV[12]) to develop, in Rubin's words, "smarter mobile devices that are more aware of its owner's location and preferences".[12] The early intentions of the company were to develop an advanced operating system for digital cameras. Though, when it was realized that the market for the devices was not large enough, the company diverted its efforts toward producing a smartphone operating system that would rival Symbian and Microsoft Windows Mobile.[27] Despite the past accomplishments of the founders and early employees, Android Inc. operated secretly, revealing only that it was working on software for mobile phones.[12] That same year, Rubin ran out of money. Steve Perlman, a close friend of Rubin, brought him $10,000 in cash in an envelope and refused a stake in the company.[28]
In July 2005, Google acquired Android Inc. for at least $50 million, whose key employees, including Rubin, Miner and White, stayed at the company after the acquisition.[11][12] Not much was known about Android Inc. at the time, but many assumed that Google was planning to enter the mobile phone market with this move.[12] At Google, the team led by Rubin developed a mobile device platform powered by the Linux kernel. Google marketed the platform to handset makers and carriers on the promise of providing a flexible, upgradable system. Google had lined up a series of hardware component and software partners and signaled to carriers that it was open to various degrees of cooperation on their part.[29][30][31]
Speculation about Google's intention to enter the mobile communications market continued to build through December 2006.[32] An earlier prototype codenamed "Sooner" had a closer resemblance to a BlackBerry phone, with no touchscreen, and a physical, QWERTY keyboard, but was later re-engineered to support a touchscreen, to compete with other announced devices such as the 2006 LG Prada and 2007 Apple iPhone.[33][34] In September 2007, InformationWeek covered an Evalueserve study reporting that Google had filed several patent applications in the area of mobile telephony.[35][36]

Eric Schmidt, Andy Rubin and Hugo Barra at a 2012 press conference announcing Google's Nexus 7 tablet
On November 5, 2007, the Open Handset Alliance, a consortium of technology companies including Google, device manufacturers such as HTC, Sony and Samsung, wireless carriers such as Sprint Nextel and T-Mobile, and chipset makers such as Qualcomm and Texas Instruments, unveiled itself, with a goal to develop open standards for mobile devices.[13] That day, Android was unveiled as its first product, a mobile device platform built on the Linux kernel.[13][37] The first commercially available smartphone running Android was the HTC Dream, released on October 22, 2008.[38]
Since 2008, Android has seen numerous updates which have incrementally improved the operating system, adding new features and fixing bugs in previous releases. Each major release is named in alphabetical order after a dessert or sugary treat; for example, version 1.5 "Cupcake" was followed by 1.6 "Donut". In 2010, Google launched its Nexus series of devices – a line of smartphones and tablets running the Android operating system, and built by manufacturing partners. HTC collaborated with Google to release the first Nexus smartphone,[39] the Nexus One. Google has since updated the series with newer devices, such as the Nexus 5 phone (made by LG) and the Nexus 7 tablet (made by Asus). Google releases the Nexus phones and tablets to act as their flagship Android devices, demonstrating Android's latest software and hardware features. From 2013 until 2015, Google offered several Google Play Edition devices over Google Play. While not carrying the Google Nexus branding, these were Google-customized Android phones and tablets that also ran the latest version of Android, free from manufacturer or carrier modifications.
From 2010 to 2013, Hugo Barra served as product spokesperson, representing Android at press conferences and Google I/O, Google’s annual developer-focused conference. Barra's product involvement included the entire Android ecosystem of software and hardware, including Honeycomb, Ice Cream Sandwich, Jelly Bean and KitKat operating system launches, the Nexus 4 and Nexus 5 smartphones, the Nexus 7[40] and Nexus 10 tablets,[41] and other related products such as Google Now[42] and Google Voice Search, Google’s speech recognition product comparable to Apple’s Siri.[42] In 2013, Barra left the Android team for Chinese smartphone maker Xiaomi.[43] The same year, Larry Page announced in a blog post that Andy Rubin had moved from the Android division to take on new projects at Google.[44] He was replaced by Sundar Pichai who became the new head of Android and Chrome OS,[45] and, later, by Hiroshi Lockheimer when Pichai became CEO of Google.[46]
In 2014, Google launched Android One, a line of smartphones mainly targeting customers in the developing world. In May 2015, Google announced Project Brillo as a cut-down version of Android that uses its lower levels (excluding the user interface), intended for the "Internet of Things" (IoT) embedded systems.[47]

Mobile operating system

A mobile operating system (or mobile OS) is an operating system for smartphones, tablets, PDAs, or other mobile devices. While computers such as the typical laptop are mobile, the operating systems usually used on them are not considered mobile ones as they were originally designed for bigger stationary desktop computers that historically did not have or need specific "mobile" features. This distinction is getting blurred in some newer operating systems that are hybrids made for both uses.
Mobile operating systems combine features of a personal computer operating system with other features useful for mobile or handheld use; usually including, and most of the following considered essential in modern mobile systems; a touchscreen, cellular, Bluetooth, Wi-Fi, GPS mobile navigation, camera, video camera, speech recognition, voice recorder, music player, near field communication and infrared blaster.
Mobile devices with mobile communications capabilities (e.g. smartphones) contain two mobile operating systems – the main user-facing software platform is supplemented by a second low-level proprietary real-time operating system which operates the radio and other hardware. Research has shown that these low-level systems may contain a range of security vulnerabilities permitting malicious base stations to gain high levels of control over the mobile device.[1]

Machine code

Machine code or machine language is a set of instructions executed directly by a computer's central processing unit (CPU). Each instruction performs a very specific task, such as a load, a jump, or an ALU operation on a unit of data in a CPU register or memory. Every program directly executed by a CPU is made up of a series of such instructions.
Numerical machine code (i.e., not assembly code) may be regarded as the lowest-level representation of a compiled or assembled computer program or as a primitive and hardware-dependent programming language. While it is possible to write programs directly in numerical machine code, it is tedious and error prone to manage individual bits and calculate numerical addresses and constants manually. It is thus rarely done today, except for situations that require extreme optimization or debugging.
Almost all practical programs today are written in higher-level languages or assembly language and translated to executable machine code by utilities such as compilers, assemblers and linkers. Programs in interpreted languages[1] are not translated into machine code although their interpreter (which may be seen as an executor or processor) typically consists of directly executable machine code (generated from assembly or high level language source code).

Source Code

In computing, source code is any collection of computer instructions (possibly with comments) written using some human-readable computer language, usually as text. The source code of a program is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source code. The source code is often transformed by a compiler program into low-level machine code understood by the computer. The machine code might then be stored for execution at a later time. Alternatively, an interpreter can be used to analyze and perform the outcomes of the source code program directly on the fly.
Most computer applications are distributed in a form that includes executable files, but not their source code. If the source code were included, it would be useful to a user, programmer, or system administrator, who may wish to modify the program or to understand how it works.
Aside from its machine-readable forms, source code also appears in books and other media; often in the form of small code snippets, but occasionally complete code bases; a well-known case is the source code of PGP.