Score B (46)
Google rolling out Android 18 Beta 1 for Pixel - 9to5Google
1 天前4 viewsSource: 9to5google.com
With Android 17 QPR2 launching on Pixel last month and 17 QPR3 currently being tested, Google today is rolling out Android 18 Beta 1. This release is coming much earlier, with Android 17 Beta 1 dropping this February. Given the Android Canary channel, the next major version of Google’s OS is debuting as a Beta today. The Android 18 Beta program is planned to run on a biweekly update cadence in parallel with the conclusion of the Android 17 QPR3 Beta program. Expect biweekly OTA updates with new features, APIs, and stability fixes “as soon as they pass internal validation, rather than waiting for larger monthly milestones.” Google is targeting February for the Platform Stability milestone with “final SDK/NDK APIs and largely final app-facing behaviors.” Advertisement - scroll for more content From that time you’ll have several months before the final release to complete your testing. We plan for Android 18 to continue to get updates in a series of quarterly releases, with the upcoming release in Q2 being the only one where we introduce planned app breaking behavior changes. Android 18 (API level 38) “extends the platform’s memory management foundation, expands Android Runtime (ART) concurrency and verification improvements, adds customization and format conversion capabilities to Photo Picker, introduces AppSearch and system I/O APIs, and strengthens privacy and adaptive UI support.” Memory and performance Soft memory limits for background services : Android 18 rolls out per-process soft memory limits in stages across Beta builds when an app process runs a background service with no visible UI. Limits are scaled by service role and device RAM. Crossing a soft limit doesn’t terminate an app on its own; instead, the kernel evicts cold file-backed pages from RAM and compresses idle private heap pages into swap (zRAM). Covered roles : Applies to most foreground service types (such as dataSync , mediaPlayback , location , connectedDevice , and specialUse ) and persistent system-bound services such as NotificationListenerService . When a process holds multiple active roles, the most generous limit applies. Exemptions : Processes displaying visible UI (including split-screen and Picture-in-Picture), along with real-time capture and communication service types ( camera , microphone , and phoneCall ), remain exempt. Developer actions : If your background service experiences memory pressure, decode bitmaps to display sizes, release hidden UI caches in Activity.onStop ( TRIM_MEMORY_UI_HIDDEN isn’t dispatched while an active foreground or system-bound service keeps your process running), and call Service.stopSelf when background work finishes. Move large downloads to WorkManager or user-initiated data transfer jobs , and consider isolating long-lived UI-free services in a lightweight worker process . Testing and related tools : Inspect active limits with adb shell am memory-limiter status and adb shell dumpsys meminfo PACKAGE_NAME , or test deterministically with adb shell am memory-limiter manual -p PID SIZE_MB . These soft limits build on App Memory Budgets ( MemoryBudgetManager and PackageManager.getMemoryBudgets ), ApplicationExitInfo reasons ( REASON_MEMORY_LIMITER , REASON_ANOMALY , and getAnrInfo ), ProfilingManager triggers ( TRIGGER_TYPE_OOM and TRIGGER_TYPE_ANOMALY ), Jetpack MemorySnapshot , and in-process memory-safe software audio decoders ( MediaCodecInfo.SECURITY_MODEL_MEMORY_SAFE ). For more information, see Elevated process memory limits and App memory budgets . Time-based garbage collection triggering by default in ART : ART enables time-based garbage collection triggering by default on Android 18, adapting concurrent GC cadence to both allocation rate and elapsed time since the previous collection, including reclaiming unused heap memory once an app becomes idle. No code changes are required, but keep two behaviors in mind when profiling: Avoid manual idle System.gc calls, because ART’s time-based collector automatically reclaims unreachable allocations at lower CPU overhead. Don’t use Runtime.totalMemory to predict GC timing. It reports the heap growth limit, while live allocation footprint is reflected by totalMemory() - freeMemory() ( Runtime.freeMemory ) and Heap Alloc in dumpsys meminfo . Core runtime and app compatibility Lock-free MessageQueue for all apps : The legacy monitor-locked implementation is removed so android.os.MessageQueue runs lock-free for every app regardless of targetSdkVersion , alongside fast-path consumer and wakeup optimizations. Apps targeting API level 36 or lower and SDKs that use unsupported reflection to inspect private MessageQueue fields (such as mMessages ) receive null on Android 18. Migrate custom main-thread watchdogs and frame monitors to public Looper logging or ProfilingManager , and update UI testing libraries such as Espresso and Robolectric. Sealed class verification in ART : ART enforces OpenJDK 17 sealed class and interface restrictions at class-load time, and SDK JARs are built for Java language version 17. When loading a class or interface, ART verifies that a sealed class isn’t also marked final , that any direct subclass or subinterface is listed in the supertype’s permitted subclasses, that a sealed supertype is defined by the same ClassLoader as its permitted subtype, and that subtypes in a different package are declared public . Classes that fail these checks are rejected with a VerifyError . Recompile dependent modules together and verify tooling if your app dynamically loads DEX code, uses custom ClassLoader implementations, instruments bytecode, or generates subclasses of sealed types at runtime. Disallowing synchronization on value-based classes : ART no longer permits monitor synchronization (such as synchronized blocks) on instances of value-based classes for apps running on and targeting Android 18 (API level 38) or higher. Replace value-based lock objects (such as Integer or Boolean ) with instances of a non-value class such as Object . You can detect explicit synchronization attempts on a release APK by running dex2oat in an adb shell session and checking adb logcat . For more information, see OpenJDK 25 APIs . Deprecation of dynamic permission tree APIs : PackageManager.addPermission , addPermissionAsync , and removePermission are deprecated and slated to become no-ops in a future release. Declare permissions statically in AndroidManifest.xml instead. Media and Photo Picker Customizable navigation in the Embedded Photo Picker : Added APIs in android.widget.photopicker give host apps finer control over Embedded Photo Picker sessions: Programmatic and restricted tab navigation : Use EmbeddedPhotoPickerFeatureInfo.Builder.setAllowedNavigationTabs with NavigationTabConstants ( NAV_TAB_PHOTOS , NAV_TAB_COLLECTIONS , and NAV_TAB_SEARCH ) to control accessible tabs, navigate to an allowed tab with EmbeddedPhotoPickerSession.navigateTo , and listen for completion in EmbeddedPhotoPickerClient.onNavigationCompleted . Expanded-mode bar visibility : Control whether the navigation bar or search bar appears in expanded mode using setNavigationBarVisibleInExpandedMode and setSearchBarVisibleInExpandedMode on EmbeddedPhotoPickerUiCustomizationParams.Builder . Inline camera tile and search status callbacks : Enable an inline camera button tile in the media grid with setCameraButtonEnabled to handle capture flows in onCameraButtonClicked , and opt into search availability updates with setSearchStatusEventsEnabled and onSearchStatusChanged . On-the-fly HEIF to JPEG conversion in Photo Picker : When a user previews a HEIF or HEIC photo in Photo Picker , a Use supported format option in the preview menu converts selected images to JPEG on the fly in a temporary system cache without altering the original gallery items. Converted copies preserve key EXIF metadata (and location when shared) and return a standard JPEG URI with no code changes required. Because conversion is user-selected per photo and falls back to the original file if it times out, continue handling HEIF and HEIC inputs where supported. On-device search and system I/O AppSearch pre-quantized embedding vectors : In android.app.appsearch , EmbeddingVector.QuantizedData and EmbeddingVector.getQuantizedData let AppSearch apps index and retrieve pre-quantized byte-level embeddings alongside their scale and minValue parameters, reducing memory and IPC overhead for on-device semantic search workloads. AppSearch multi-signer PackageIdentifier : A PackageIdentifier(String, List<byte[]>) constructor and getMultiSignerSha256Certificates let you grant schema visibility to apps simultaneously signed by multiple active certificates under AND-logic, such as multi-certificate Progressive Web Apps (PWAs). File access hints with Os.posix_fadvise : Android 18 exposes Os.posix_fadvise and OsConstants ( POSIX_FADV_NORMAL , POSIX_FADV_SEQUENTIAL , POSIX_FADV_RANDOM , POSIX_FADV_WILLNEED , POSIX_FADV_DONTNEED , and POSIX_FADV_NOREUSE ) to managed code. Apps that manage large media files, databases, or on-device ML model weights can declare expected file access patterns and advise the kernel when pages are no longer needed without custom JNI wrappers. Privacy and security Restrict implicit URI grants : Starting in Android 18, the system no longer automatically adds implicit URI grants for ACTION_SEND and ACTION_SEND_MULTIPLE intents (content URIs in EXTRA_STREAM ) or ACTION_IMAGE_CAPTURE and related capture intents ( EXTRA_OUTPUT ) when the sending app targets Android 18 (API level 38) or higher. Beta 1 doesn’t enforce the restriction yet. To find affected intents, turn on detectImplicitUriPermissionGrant in StrictMode (available since Android 17) or search Logcat for Please set the grant explicitly in the app . Add Intent.FLAG_GRANT_READ_URI_PERMISSION to send intents and both FLAG_GRANT_READ_URI_PERMISSION and FLAG_GRANT_WRITE_URI_PERMISSION to capture intents, and handle missing grants if your app receives these intents. For more information, see Restrict implicit URI grants . Rust PNG codec in Skia : Android’s graphics stack uses a Rust PNG implementation in Skia in place of the previous C++ libpng library when decoding and encoding PNGs and PNG-embedded ICO files. This drop-in replacement preserves pixel and feature parity—including NinePatch assets, gainmaps, and HDR metadata—while hardening apps against memory-corruption vulnerabilities when rendering untrusted image data. Adaptive UI, form factors, and system integration Standardized default system font customization : Device manufacturers can customize the default system typeface through a standardized platform mechanism so generic font families such as sans-serif dynamically map to the configured font across System UI and apps. Build flexible text layouts rather than hardcoding fixed container heights, strict line counts, or layout calculations tailored to Roboto glyph metrics. Desktop windowing rotation continuity : Rotating a device during a desktop windowing session (such as on a tablet or a phone connected to an external display) proportionally repositions freeform windows within visible bounds and preserves left and right tiled split layouts. Hardware input keycodes : The input framework adds mappings for new hardware keys, including the USB HID Contextual Assistance specification. Verify that custom hardware keyboard handlers handle newly introduced keycodes gracefully. Manage Health Connect permissions in-app : Apps can launch HealthConnectManager.ACTION_SHOW_HEALTH_PERMISSIONS (optionally passing Intent.EXTRA_PACKAGE_NAME ) to send users to the Health Connect permission settings page. When EXTRA_PACKAGE_NAME is provided for an app that already has at least one granted health permission, it navigates directly to that app’s permission screen; otherwise, it opens the Connected apps list. On-device Web App Installer enabled by default : The system Web App Installer service is enabled by default (removing the previous Developer options toggle), letting browsers package and install Progressive Web Apps as standalone Trusted Web Activities on the device. Known issues in Beta 1 App builds will fail against the beta 38 SDK with build tools 38.0.0 rc1. The workaround is to use an older version of the build tools (such as 37.0.2). The Microsoft Teams onboarding flow is currently broken. The welcome screen freezes after tapping “Get started”. Leave feedback with the Android Beta Feedback app on Pixel devices. Access it from the drawer or Quick Settings to file bugs in the Google issue tracker. There’s also the Android Beta community on Reddit . DP21.261120.006 The OTA and build images are not fully available yet, but it’s already hitting the Android Flash Tool . The internal codename for this release is “ daifuku ,” a Japanese “small round mochi stuffed with a sweet filling.” flash.android.com/preview/daifuku-beta1 Android 18 Beta 1 system images are available for the Pixel 7, Pixel 7 Pro, Pixel 7a, Pixel Tablet, Pixel Fold, Pixel 8, Pixel 8 Pro, Pixel 8a, Pixel 9, Pixel 9 Pro, Pixel 9 Pro XL, Pixel 9 Pro Fold, Pixel 9a, Pixel 10, Pixel 10 Pro, Pixel 10 Pro XL, Pixel 10 Pro Fold, Pixel 10a, Pixel 11, Pixel 11 Pro, Pixel 11 Pro XL, and Pixel 11 Pro Fold, as well as the Android Emulator. You can easily join via the Android Beta Program to get an on-device OTA. If your device runs Android 17 QPR3 Beta and you want to receive the stable Android 17 QPR3 release without wiping data, don’t install the Android 18 Beta 1 update. Instead, opt out on the Android Beta program site, ignore the downgrade OTA update, and wait for the stable Android 17 QPR3 release. To report issues or share feedback on Beta 1, see Feedback and issues . FTC: We use income earning auto affiliate links. More. You’re reading 9to5Google — experts who break news about Google and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Google on Twitter , Facebook , and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories , reviews , how-tos , and subscribe to our YouTube channel
Read the full original article:
9to5google.com