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.