Saturday, 27 February 2016

JailBreaking in iOS: Helpful for users to come out of limitations

JailBreaking

Application processor firmware modification to allow unsigned code to run (i.e. applications from outside the AppStore)


  • Similar to other OSes, the iPhone OS is loaded in stages
    • Boot ROM loads the LLB
    • LLB loads the Firmware
    • At each stage, signature checks performed to validate the next stage
  • In theory...
    • The boot ROM does not perform a signature check on the LLB
    • More recently, the LLB is subject to a buffer overflow which allows unsigned code to be loaded that can override the signature checks of all subsequent checks.

Friday, 26 February 2016

Widget: Steps to write a widget


  • Widgets are little applications which can be placed on the home screen of your Android device.
  • A widget gets its data on a periodic timetable. There are two methods to update a widget, one is based on an XML configuration file and the other is based on AlarmManager.

Steps to write a widget

  • Define a layout file for your widget. 
  • Maintain an XML file (AppWidgetProviderInfo) which describes the properties of the widget, e.g. size or fixed update frequency. 
  • Create a broadcast receiver which will be used to update the widget. This receiver extends AppWidgetProvider which provides additional lifecycle hooks for widgets. 
  • Maintain the App Widget configuration in the "AndroidManifest.xml" file. 
  • Optional, you can also specify a configuration activity which is called once when one instance of the widget is added to the homescreen.

Types of Android Applications

  1. Foreground 
  2. Background
  3. Intermittent
  4. Widget

Development Model of BlackBerry (BB)


  • BlackBerry applications are written using Java ME
    • RIM provides a JDE and Eclipse plug-in
    • Mobile Information Device Profile (MIDP)
  • Defines common interface for low level features on mobile devices
  • Users can download and run any application
  • Code signing is needed for certain functions
    • Does not guarantee correct code

File System used by Windows Phone 7 Operating System

Windows Phone 7 OS uses two file systems:

  1. IMGFS: IMGFS is intended for system files
  2. TexFAT: TexFat is an 'extended' version of FAT and can handle those files that are larger than 4GB.

For user files, Microsoft Unified Storage System

  • This system ensures that applications and users can not distinguish between files in the internal flash memory and files on a memory card.

Cross layer services by the Core service layer of iPhone OS (iOS) Architecture


  • Address Book: Contact information used by things like SMS and Phone applications
  • Core Foundation: Access to basic data structures like strings and other basic system functions
  • Core Location: Location based information (GPS access)
  • Foundation: Base for all Objective-C objects like the root NSObject class, NSString, and NSArray
  • System Configuration


Intents and Broadcast Receivers in Android

Intents
  1. Three of the four component types - activities, services, and broadcast receivers - are activated by an asynchronous message called an intent. 
  2. Intents bind individual components to each other at runtime (you can think of them as the messengers that request an action from other components), whether the component belongs to your app or another. 
  3. An intent is created with an Intent object, which defines a message to activate either a specific component or a specific type of component - an intent can be either explicit or implicit, respectively.
    • An explicit intent can be to invoke another screen when a button is pressed on the Activity (UI) in context. 
    • An implicit intent is when you create an intent and hand it off to the system to handle it. 
  4. For activities and services, an intent defines the action to perform e.g. to "view" or "send" something. An intent might convey a request for an activity to show an image or to open a web page. 
  5. For broadcast receivers, the intent simply defines the announcement being broadcast (for example, a broadcast to indicate the device battery is low includes only a known action string that indicates "battery is low").

Broadcast Receivers
  1. A broadcast receiver is a component that responds to system-wide broadcast announcements. 
  2. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. 
  3. Apps can also initiate broadcasts—for example, to let other apps know that some data has been downloaded to the device and is available for them to use. 
  4. Although broadcast receivers don't display a user interface, they may create a status bar notification to alert the user when a broadcast event occurs. 
  5. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.
  6. A broadcast receiver is implemented as a subclass of BroadcastReceiver and each broadcast is delivered as an Intent object.

Concept of Services in Android

Services in Android

  1. The invisible workers of your application. Service components run in the background, updating your data sources and visible Activities and triggering Notifications. 
  2. They’re used to perform regular processing that needs to continue even when your application’s Activities aren’t active or visible.

Effectiveness of the security model of Windows Phone 7 against threats


  1. The need for protection 
  2. Chambers
    • Trusted Computing Base (TCB)
    • Elevated Rights Chamber (ERC)
    • Standard Rights Chamber (SRC)
    • Least Privileged Chamber (LPC)
  3. Capabilities: Each application discloses its capabilities to the user, including;
    • Disclosure on the application details page in the Windows Phone Marketplace.
    • Disclosure with an explicit prompt upon application purchase, for those capabilities that have legal requirements for explicit disclosure and specific consent collection. 
    • Disclosure within the application, when the user is about to use the location capability for the first time.
  4. Sandbox
    • Every application on Windows Phone 7 runs in its own isolated chamber, and is defined by the declared capabilities that the application needs to function.
    • Applications developed by other companies that are distributed via the Windows Phone Marketplace cannot remain active in the background.
  5. Application Deployment
    • Application developers must register with Microsoft before an application can be submitted to the Marketplace Hub. 
    • All applications are code-signed by VeriSign.
    • The application development model’s use of “managed code only” in addition to the least privilege and isolation aspects of the Windows Phone OS 7.0 security model provide strong protections against security attacks

Network architecture of BlackBerry enterprise services


  1. All BlackBerry (BB) connect to (Research In Motion) RIM’s central NOC through Carrier
  2. NOC connected to all Blackberry Enterprise Server (BES) on site
  3. BES can attach to additional middleware services
  4. MDS (Mobile Data Services)















MDS (Mobile Data Services)
  • MDS focuses mainly on web and enterprise services
    • MDS is a runtime container for processing pushed data
    • Ideal for Rapid Application Development
    • Minimal coding required (sometimes none)
  • BB enterprise servers perform all the data processing and management
    • WSDL, Database, etc.
  • Can be arbitrarily complex on the backend

Java Native Interface (JNI) in Android


  1. Java Native Interface (JNI) enables programmers to write native methods to handle situations when an application cannot be written entirely in the Java programming language.
  2. It is also used to modify an existing application—written in another programming language.

Use of Cursors in Content Providers in Android

Cursors: This interface provides random read-write access to the result set returned by a database query.

Cursor Adapters: This adapter exposes data from a Cursor to a ListView Widget.

Code

public class MainActivity extends ListActivity {
/** Called when the activity is first created. */

@Override

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Uri allContacts = Uri.parse(“content://contacts/people”);
Cursor c = managedQuery(allContacts, null, null, null, null);