Difference between revisions of "What's new internally in Marshmallow ?"

From eLinux.org
Jump to: navigation, search
(Created page with "Below are the initial investigation that was done to compare code inside AOSP between android-5.1.1_r18 and android-6.0.0_r1. This list by no means is the complete list as it...")
 
Line 1: Line 1:
Below are the initial investigation that was done to compare code inside AOSP between android-5.1.1_r18 and android-6.0.0_r1. This list by no means is the complete list as it only shows the most relevant changes that are exist between the 2 AOSP Android versions.
+
What's new in Marshmallow
 +
--------------------------
 +
* /developers
  
/developers
+
** build/prebuilts/androidtv/sample-inputs
 
+
** build/prebuilts/gradle
- build/prebuilts/androidtv/sample-inputs
+
** samples/android/common
- build/prebuilts/gradle
+
***  contain example for MIDI
- samples/android/common
 
* contain example for MIDI
 
 
- samples/android/admin
 
- samples/android/admin
 
* contain example for device owner and NFC
 
* contain example for device owner and NFC

Revision as of 17:36, 11 October 2015

What's new in Marshmallow


  • /developers
    • build/prebuilts/androidtv/sample-inputs
    • build/prebuilts/gradle
    • samples/android/common
      • contain example for MIDI

- samples/android/admin * contain example for device owner and NFC - samples/android/connectivity * contain interesting example for bluetooth advertisement, wifi-direct and networking - samples/android/content * contain interesting example for backup and directshare - samples/android/media * contain example for Camera and MIDI - samples/android/notification * contain example for active notification - samples/android/security * fingerprint and device security

/development - samples/ReceiveShareDemo /external - androidplot * contain sample plotting app /frameworks - data-binding * new feature - base/cmds/hid * USB based hid tool ? - base/cmds/sm * related to mount and disk - base/cmds/telecom * telecom related too ? * base/packages/StatementService -- new app that allow to check an apk from a website (used also inside PackageManagerService) * base/packages/SystemUI * new Assist functionality added * tuner view * base/media * MIDI server and service * /packages -- Bluetooth MIDI service * base/wifi * WiFi passpoint implementation (http://www.wi-fi.org/discover-wi-fi/wi-fi-certified-passpoint) * frequency are split into it's own /** * AP Channel bandwidth is 20 MHZ */ public static final int CHANNEL_WIDTH_20MHZ = 0; /** * AP Channel bandwidth is 40 MHZ */ public static final int CHANNEL_WIDTH_40MHZ = 1; /** * AP Channel bandwidth is 80 MHZ */ public static final int CHANNEL_WIDTH_80MHZ = 2; /** * AP Channel bandwidth is 160 MHZ */ public static final int CHANNEL_WIDTH_160MHZ = 3; /** * AP Channel bandwidth is 160 MHZ, but 80MHZ + 80MHZ */ public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4; * base/tools * aapt2 available * base/telephony * carrier configuration manager * modem activity information available * voicemail has got it's own class, does this mean we can save voicemail in a contentprovider ? * lots of changes to video calling capability * base/services * voice assistant has got it's own service * USB has few new manager classes - MIDI, ALSA Audio, USB Port (control the properties of physical USB ports via the "/sys/class/dual_role_usb") interface. At the moment USB C provide the capability to switch between USB charging and data direction. For non USB C the kernel driver must be modified or changed * alarm is now also using /sys/class/rtc * Fingerprint and Midi native service implementation * GPS has batching data * GNSS capability is provided for GPS (if feature available) * detecting any kind of motion movement class provided (AnyMotionDetector) * Token based (time expired) authentication provided * debugging flag configuration for ActivityManagerService has been moved to a separate class * new class to track the amount of time a user spent on an app (AppTimeTracker) * volume service as the volume UI changed in M * network diagnostic class provided to enable network checking (at the moment used in the dump() method) * substantial changes on the notification framework * DefaultPermissionGrantPolicy.java contain the default permission for the system * PackageDexOptimizer - Helper class for running dexopt command on packages. * timezone can be updated automatically * GraphicsStatsService useful for stats graphics ashmem /hardware * new .so FM library from Mediatek * libbt-vendor.so source for Marvell Bluetooth * usbcamera HAL is provided (created under camera.usb.default.so) all we need to do is enable Camera drivers in Kernel * radio HAL (created under radio.fm.default.so) is provided * interesting input subsystem (created under input.evdev.default.so) --> not very sure what this is for but seems like USB related input * Intel provide hwcompose for merrifield and moorefield. There is a simple example of how to use hwcompose intel/img/hwcomposer/merrifield/test/nv12_ved_test.cpp

/libcore * tzdata for time zone manipulation * inside support/ folder there is a test for testing TLS * Netlink socket communication possible internally via Java layer

/ndk * docs/ directory contain a comprehensive NDK development guide

/packages * CarrierConfig app to configure carrier configuration (NEW !) * ExactCalculator * lots of small changes here and there for the different built-in app * Mms has been renamed to Messaging * experimental/ contains few sample app - permission and printing * providers - provide new provider ==> BookmarkProvider and CallLogProvider * Telecomm app inside services/ now has a test app that is very useful for testing purpose

/system * bt/ bluedroid implementation * base/ libbase * fingerprintd/ daemon for fingerprint * gatekeeperd/ daemon for gatekeeper * new init commands - writepid <file...> - bootchart_init - class_reset <serviceclass> - copy <src> <dst> - load_all_props - load_persist_props - loglevel <level> - mount_all <fstab> - powerctl - restart <service> - rmdir <path> - rm <path> - swapon_all <fstab> - verity_load_state - verity_update_state <mount_point>


For quicker turnaround when working on init itself, use:

mm -j m ramdisk-nodeps m bootimage-nodeps adb reboot bootloader fastboot boot $ANDROID_PRODUCT_OUT/boot.img

Alternatively, use the emulator:

emulator -partition-size 1024 -verbose -show-kernel -no-window

You might want to call klog_set_level(6) after the klog_init() call so you see the kernel logging in dmesg (or the emulator output). * extras/ - slideshow app used in verity on verity-logging exec u:r:slideshow:s0 -- /sbin/slideshow warning/verity_red_1 warning/verity_red_2 - perfprofd - collects system-wide profiles * gatekeeper/ * vold/ a number of new class and modification for external storage and security

Tech Notes

- /storage/emulated/legacy has been removed completely - Nice to see drm_gralloc, drm_hwcompose, libdrm included (inside external/) - Interesing google-breakpad - Jetty is included the question is why ? - mockftpserver ? ftp server what for ? - v8 JS engine is included - IpReachabilityMonitor.java is an interesting class as it allows app to be notified when an IP connection is lost - android/os/storage has new API to detect new storage device that has come online - IDeviceIdleController interesting interface. The implementation is inside DeviceIdleController.java - BatteryManager.java added new state public static final String ACTION_CHARGING = "android.os.action.CHARGING"; public static final String ACTION_DISCHARGING = "android.os.action.DISCHARGING"; - new method to create a unique filename is provided inside android/os/FileUtils - Interesting new feature inside android/os/INetworkManagementService /** * Enables unidirectional packet forwarding from {@code fromIface} to * {@code toIface}. */ void startInterfaceForwarding(String fromIface, String toIface);

/** * Disables unidirectional packet forwarding from {@code fromIface} to * {@code toIface}. */ void stopInterfaceForwarding(String fromIface, String toIface); - new feature inside android/os/IPowerManager.aidl

   * boolean isDeviceIdleMode();
   * boolean isScreenBrightnessBoosted();

- new feature inside android/os/IProcessInfoService.aidl

   void getProcessStatesFromPids(in int[] pids, out int[] states);

- android/os/MessageQueue.java provide new API that allows to tap into the queuing to know whether it is idle and also parcel event handler - android/os/PowerManagerInternal.java public abstract void setDeviceIdleMode(boolean enabled); public abstract void setDeviceIdleWhitelist(int[] appids); public abstract void setDeviceIdleTempWhitelist(int[] appids); public abstract void updateUidProcState(int uid, int procState); public abstract void uidGone(int uid); - new zygote parameter --mount-external-write --mount-external-read --mount-external-default --generate-debug-info --enable-jit - interesting new feature inside android/os/StrictMode.java (strict mode inside Settings) - detectCleartextNetwork() - penaltyDeathOnCleartextNetwork() --> VERY interesting (Crashes the whole process when cleartext network traffic is detected) - plenty of changes inside android/os/storage/StorageManager because of the addition of adding external storage feature - new intent inside android/provider/AlarmClock - ACTION_DISMISS_ALARM - ACTION_SNOOZE_ALARM - EXTRA_ALARM_SEARCH_MODE - new security keymaster API inside android/security/keymaster - new deep linking inside android/service/chooser - new interface for communication with GateKeeper android/service/gatekeeper - new camera API service/media/CameraPrewarmService - interesting notification API android/service/notification/ZenModeConfig - hypenation word UI android/text/Hyphenator - cool class * android/util/KeyValueListParser.java

- new display density for different kind of display android/util/DisplayMetrics - DENSITY_360 , DENSITY_420 - new animation class android/view/animation/ClipRectLRAnimation, android/view/animation/ClipRectTBAnimation, android/view/animation/TranslateXAnimation, android/view/animation/TranslateYAnimation - android/view/IWindowManager * requestAssistScreenshot - different key events for different function android/view/KeyEvent.java

    /** Key code constant: Navigate to previous key.
    * Goes backward by one item in an ordered collection of items. */
   public static final int KEYCODE_NAVIGATE_PREVIOUS = 260;
   /** Key code constant: Navigate to next key.
    * Advances to the next item in an ordered collection of items. */
   public static final int KEYCODE_NAVIGATE_NEXT   = 261;
   /** Key code constant: Navigate in key.
    * Activates the item that currently has focus or expands to the next level of a navigation
    * hierarchy. */
   public static final int KEYCODE_NAVIGATE_IN     = 262;
   /** Key code constant: Navigate out key.
    * Backs out one level of a navigation hierarchy or collapses the item that currently has
    * focus. */
   public static final int KEYCODE_NAVIGATE_OUT    = 263;
   /** Key code constant: Skip forward media key. */
   public static final int KEYCODE_MEDIA_SKIP_FORWARD = 272;
   /** Key code constant: Skip backward media key. */
   public static final int KEYCODE_MEDIA_SKIP_BACKWARD = 273;
   /** Key code constant: Step forward media key.
    * Steps media forward, one frame at a time. */
   public static final int KEYCODE_MEDIA_STEP_FORWARD = 274;
   /** Key code constant: Step backward media key.
    * Steps media backward, one frame at a time. */
   public static final int KEYCODE_MEDIA_STEP_BACKWARD = 275;

- android/view/SearchEvent - ALSA specific helper file com/android/internal/alsa - com/android/internal/app/AssistUtils - interesting to investigate more about this - com/android/internal/app/DumpHeapActivity - This activity is displayed when the system has collected a heap dump from a large process and the user has selected to share it. - new packages * com/android/internal/logging * com/android/internal/midi