View stunning SlideShares in full-screen with the new iOS app!Introducing SlideShare for AndroidExplore all your favorite topics in the SlideShare appGet the SlideShare app to Save for Later — even offline
View stunning SlideShares in full-screen with the new Android app!View stunning SlideShares in full-screen with the new iOS app!
System architecture - Bionic libc■ Fast, optimized for ARM■ Lightweight (200 ko), half the size of glibc■ No C++ Exceptions■ No Standard Template Library■ New pthreads implementation [does not support pthread_cancel()]■ Can be exploited directly through NDK (native development kit)BSD licencehttps://github.com/android/platform_bionic
System architecture -Media FrameworkBased on OpenCORE and Stagefright (2.2+).
System architecture -Media Framework - Base support■ Audio codecs: AAC, MP3, AMR, PCM, MIDI, Ogg Vorbis, FLAC (3.1+)■ Image codecs: JPEG, GIF, BMP, PNG, WebP (4.0+)■ Video codecs: H.263, H.264, MPEG-4 SP, VP8 (2.3.3+)■ Containers: 3GPP, MPEG-4, Matroska (.mkv) (4.0+)■ Manufacturers may add more codecs. Italic = patent-free
System architecture - Runtime■ Android uses only the Java language, not the Java platform.■ Dalvik Virtual Machine developed by Google.■ Uses minimal memory.■ Java bytecode is converted to smaller Dalvik bytecode at build time (.dex files).■ Uses Just-In-Time compilation since Android 2.2 for better performance.■ Standard library is based on Apache Harmony open source implementation.
Android Open Source Project(AOSP)source.android.com
Android Open Source Project(AOSP)Almost... fully open:■ Google publishes source code when they decide it.■ No real interaction with Google teams.■ Not everything is open source: ○ Proprietary binary drivers ○ Google Apps: Google Maps, Gmail, Google Contacts/Calendar/Bookmarks Sync, Google Talk, Play Store (Android Market), Youtube, Weather widget, Text-To-Speech, Voice Search.
The SDKiPhone / iPad■ Hardware: Mac (with latest Mac OS X)■ IDE: XCode (free)■ Language: Objective-C.Windows Phone 7 / Windows 8■ Hardware: PC with Microsoft Windows■ IDE: Microsoft Visual Studio (free)■ Language: C#, Visual Basic.
The SDKAndroid■ Hardware: Any x86■ IDE: Eclipse, Netbeans, IntelliJ IDEA■ Language: Java.
Android apps: the building blocksActivities: screens with a life cycle.
Android apps: the building blocksFragments: portions of screens with a lifecycle.
Android apps: the building blocks■ Background services.■ Intents: IPC mechanism between Activities and/or Services. Action + Data ○ Action: View, Edit, Dial, ..., custom actions ○ Data: URL scheme or any MIME type.■ Everything in the system use intents and is interchangeable.
Android apps: the building blocksSpecial apps:■ Live wallpapers■ Widgets
DiversityDevelopment challenges:■ Write fast high-level code or use NDK■ Support multiple devices types ○ Phones ○ Tablets ○ Google TVs■ Support multiple Android versions.
Diversity - Android versionsUse features of newer Android versionswhile staying compatible with older runtimes:Isolate special functionality in separate classes.MyInterface implementation;if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.FROYO) implementation = new FroYoImplementation();else implementation = new CompatibleImplementation();
The upgrade problemManufacturers provide custom user interfaces. Sony Ericsson HTC Sense Timescape Samsung TouchWiz
The upgrade problem■ Updating the custom user interface to a new Android version requires a lot of work.■ Manufacturers focus on selling you their latest hardware, not providing support for older hardware.■ On Android, upgrades usually depend on carriers. (The Proximus case)■ Many manufacturers dont do OTA updates.■ Average official support time: ○ 3 years for Apple ○ <= 2 years for most Android phones.
The upgrade solution:Installing community ROMsWhy hack ?■ Give choice to the user.■ Remove bloatware.■ Provide longer term support and upgrades.Custom ROMs:Complete firmware (OS, UI, base applications)created by the community.
Hacking - Custom ROMsDifferent kinds of custom ROMs:■ Modified original vendor versions■ Ported from another device (experimental)■ Build from source (AOSP)Hack challenges■ Locked hardware (HTC S-ON).■ Binary drivers: Radio (Wifi - Bluetooth - GPS), Graphics, NFC, sometimes accelerometers.
Hacking basics - 2. Root access■ Root access allows to perform restricted operations like: ○ writing files on system partition ○ flashing a custom recovery directly from Android OS.■ It requires: ○ Patching or replacing the kernel ○ - or - ○ Use phone-specific kernel exploits (mainly through ADB).
Recap: How to change your ROM1. Go to a forum / wiki and learn the procedure2. Use: a. fastboot b. the vendor flash tool c. a root hack to install a custom recovery on your phone.3. Download a custom ROM as zip file and place it to your SD card/internal storage.4. Reboot your phone in custom recovery and install the ROM. Reboot. Done.