Sr. Content Developer at Microsoft, working remotely in PA, TechBash conference organizer, former Microsoft MVP, Husband, Dad and Geek.
147610 stories
·
33 followers

Prepare your app for the resizability and orientation changes in Android 17

1 Share

Posted by Miguel Montemayor, Developer Relations Engineer, Android 


With the release of Android 16 in 2025, we shared our vision for a device ecosystem where apps adapt seamlessly to any screen—whether it’s a phone, foldable, tablet, desktop, car display, or XR. Users expect their apps to work everywhere. Whether multitasking on a tablet, unfolding a device to read comfortably, or running apps in a desktop windowing environment, users expect the UI to fill the available display space and adapt to the device posture.

We introduced significant changes to orientation and resizability APIs to facilitate adaptive behavior, while providing a temporary opt-out to help you make the transition. We’ve already seen many developers successfully adapt to this transition when targeting API level 36.

Now with the release of the Android 17 Beta, we’re moving to the next phase of our adaptive roadmap: Android 17 (API level 37) removes the developer opt-out for orientation and resizability restrictions on large screen devices (sw > 600 dp). When you target API level 37, your app must be capable of adapting to a variety of display sizes.

The behavior changes ensure that the Android ecosystem offers a consistent, high-quality experience on all device form factors.

What’s changing in Android 17

Apps targeting Android 17 must ensure their compatibility with the phase out of manifest attributes and runtime APIs introduced in Android 16. We understand for some apps this may be a big transition, so we’ve included best practices and tools for helping avoid common issues later in this blog post.

No new changes have been introduced since Android 16, but the developer opt-out is no longer possible. As a reminder: when your app is running on a large screen—where large screen means that the smaller dimension of the display is greater than or equal to 600 dp—the following manifest attributes and APIs are ignored:

Note: As previously mentioned with Android 16, these changes do not apply for screens that are smaller than sw 600 dp or apps categorized as games based on the android:appCategory flag.

Manifest attributes/APIIgnored values
screenOrientationportrait, reversePortrait, sensorPortrait, userPortrait, landscape, reverseLandscape, sensorLandscape, userLandscape
setRequestedOrientation()portrait, reversePortrait, sensorPortrait, userPortrait, landscape, reverseLandscape, sensorLandscape, userLandscape
resizeableActivityall
minAspectRatioall
maxAspectRatioall


Also, users retain control. In the aspect ratio settings, users can explicitly opt-in to using the app’s requested behavior.

Prepare your app

Apps will need to support landscape and portrait layouts for display sizes in the full range of aspect ratios in which users can choose to use apps, including resizable windows, as there will no longer be a way to restrict the aspect ratio and orientation to portrait or to landscape.

Test your app

Your first step is to test your app with these changes to make sure the app works well across display sizes.

Use Android 17 Beta 1 with the Pixel Tablet and Pixel Fold series emulators in Android Studio, and set the targetSdkPreview = “CinnamonBun”. Alternatively, you can use the app compatibility framework by enabling the UNIVERSAL_RESIZABLE_BY_DEFAULT flag if your app does not target API level 36 yet.

We have additional tools to ensure your layouts adapt correctly. You can automatically audit your UI and get suggestions to make your UI more adaptive with Compose UI Check, and simulate specific display characteristics in your tests using DeviceConfigurationOverride.

For apps that have historically restricted orientation and aspect ratio, we commonly see issues with skewed or misoriented camera previews, stretched layouts, inaccessible buttons, or loss of user state when handling configuration changes. 

Let’s take a look at some strategies for addressing these common issues.

Ensure camera compatibility

A common problem on landscape foldables or for aspect ratio calculations in scenarios like multi-window, desktop windowing, or connected displays, is when the camera preview appears stretched, rotated, or cropped.

Ensure your camera preview isn’t stretched or rotated.

This issue often happens on large screen and foldable devices because apps assume fixed relationships between camera features (like aspect ratio and sensor orientation) and device features (like device orientation and natural orientation).

To ensure your camera preview adapts correctly to any window size or orientation, consider these four solutions:

Solution 1: Jetpack CameraX (preferred) 

The simplest and most robust solution is to use the Jetpack CameraX library. Its PreviewView UI element is designed to handle all preview complexities automatically:

  • PreviewView correctly adjusts for sensor orientation, device rotation, and scaling

  • PreviewView maintains the aspect ratio of the camera image, typically by centering and cropping (FILL_CENTER)

  • You can set the scale type to FIT_CENTER to letterbox the preview if needed

For more information, see Implement a preview in the CameraX documentation.

Solution 2: CameraViewfinder 

If you are using an existing Camera2 codebase, the CameraViewfinder library (backward compatible to API level 21) is another modern solution. It simplifies displaying the camera feed by using a TextureView or SurfaceView and applying all the necessary transformations (aspect ratio, scale, and rotation) for you.

For more information, see the Introducing Camera Viewfinder blog post and Camera preview developer guide.

Solution 3: Manual Camera2 implementation 

If you can't use CameraX or CameraViewfinder, you must manually calculate the orientation and aspect ratio and ensure the calculations are updated on each configuration change:

  • Get the camera sensor orientation (for example, 0, 90, 180, 270 degrees) from CameraCharacteristics

  • Get the device's current display rotation (for example, 0, 90, 180, 270 degrees)

  • Use the camera sensor orientation and display rotation values to determine the necessary transformations for your SurfaceView or TextureView

  • Ensure the aspect ratio of your output Surface matches the aspect ratio of the camera preview to prevent distortion

Important: Note the camera app might be running in a portion of the screen, either in multi-window or desktop windowing mode or on a connected display. For this reason, screen size should not be used to determine the dimensions of the camera viewfinder; use window metrics instead. Otherwise you risk a stretched camera preview.

For more information, see the Camera preview developer guide and Your Camera app on different form factors video.

Solution 4: Perform basic camera actions using an Intent 

If you don't need many camera features, a simple and straightforward solution is to perform basic camera actions like capturing a photo or video using the device's default camera application. In this case, you can simply use an Intent instead of integrating with a camera library, for easier maintenance and adaptability. 

For more information, see Camera intents.

Avoid stretched UI or inaccessible buttons

If your app assumes a specific device orientation or display aspect ratio, the app may run into issues when it’s now used across various orientations or window sizes.

Ensure buttons, textfields, and other elements aren’t stretched on large screens.

You may have set buttons, text fields, and cards to fillMaxWidth or match_parent. On a phone, this looks great. However, on a tablet or foldable in landscape, UI elements stretch across the entire large screen. In Jetpack Compose, you can use the widthIn modifier to set a maximum width for components to avoid stretched content:

Box(
    contentAlignment = Alignment.Center,
    modifier = Modifier.fillMaxSize()
) {
    Column(
        modifier = Modifier
            .widthIn(max = 300.dp) // Prevents stretching beyond 300dp
            .fillMaxWidth()        // Fills width up to 300dp
            .padding(16.dp)
    ) {
        // Your content
    }
}


If a user opens your app in landscape orientation on a foldable or tablet, action buttons like Save or Login at the bottom of the screen may be rendered offscreen. If the container is not scrollable, the user can be blocked from proceeding. In Jetpack Compose, you can add a verticalScroll modifier to your component:

Column(
    modifier = Modifier
        .fillMaxSize()
        .verticalScroll(rememberScrollState())
        .padding(16.dp)
)


By combining max-width constraints with vertical scrolling, you ensure your app remains functional and usable, regardless of how wide or short the app window size becomes.


See our guide on building adaptive layouts.


Preserve state with configuration changes

Removing orientation and aspect ratio restrictions means your app's window size will change much more frequently. Users may rotate their device, fold/unfold it, or resize your app dynamically in split-screen or desktop windowing modes.

By default, these configuration changes destroy and recreate your activity. If your app does not properly manage this lifecycle event, users will have a frustrating experience: scroll positions are reset to the top, half-filled forms are wiped clean, and navigation history is lost. To ensure a seamless adaptive experience, it’s critical your app preserves state through these configuration changes. With Jetpack Compose, you can opt-out of recreation, and instead allow window size changes to recompose your UI to reflect the new amount of space available.

See our guide on saving UI state.

Targeting API level 37 by August 2027

If your app previously opted out of these changes when targeting API level 36, your app will only be impacted by the Android 17 opt-out removal after your app targets API level 37. To help you plan ahead and make the necessary adjustments to your app, here’s the timeline when these changes will take effect:


  • Android 17: Changes described above will be the baseline experience for large screen devices (smallest screen width > 600 dp) for apps that target API level 37. Developers will not have an option to opt-out.


The deadlines for targeting a specific API level are app-store specific. For Google Play, new apps and updates will be required to target API level 37, making this behavior mandatory for distribution in August 2027.

Preparing for Android 17

Refer to the Android 17 changes page for all changes impacting apps in Android 17. To test your app, download Android 17 Beta 1 and update to targetSdkPreview = “CinnamonBun” or use the app compatibility framework to enable specific changes.

The future of Android is adaptive, and we’re here to help you get there. As you prepare for Android 17, we encourage you to review our guides for building adaptive layouts and our large screen quality guidelines. These resources are designed to help you handle multiple form factors and window sizes with confidence.

Don’t wait. Start getting ready for Android 17 today!

Read the whole story
alvinashcraft
34 minutes ago
reply
Pennsylvania, USA
Share this story
Delete

The First Beta of Android 17

1 Share

Posted by Matthew McCullough, VP of Product Management, Android Developer

Today we're releasing the first beta of Android 17, continuing our work to build a platform that prioritizes privacy, security, and refined performance. This build continues our work for more adaptable Android apps, introduces significant enhancements to camera and media capabilities, new tools for optimizing connectivity, and expanded profiles for companion devices. This release also highlights a fundamental shift in the way we're bringing new releases to the developer community, from the traditional Developer Preview model to the Android Canary program.

Beyond the Developer Preview

Android has replaced the traditional "Developer Preview" with a continuous Canary channel. This new "always-on" model offers three main benefits:

  • Faster Access: Features and APIs land in Canary as soon as they pass internal testing, rather than waiting for a quarterly release.
  • Better Stability: Early "battle-testing" in Canary results in a more polished Beta experience with new APIs and behavior changes that are closer to being final.
  • Easier Testing: Canary supports OTA updates (no more manual flashing) and, as a separate update channel, more easily integrates with CI workflows and gives you the earliest window to give immediate feedback on upcoming potential changes.

The Android 17 schedule

We're going to be moving quickly from this Beta to our Platform Stability milestone, targeted for March. At this milestone, we'll deliver final SDK/NDK APIs and largely final app-facing behaviors. From that time you’ll have several months before the final release to complete your testing.


A year of releases

We plan for Android 17 to continue to get updates in a series of quarterly releases. The upcoming release in Q2 is the only one where we introduce planned app breaking behavior changes. We plan to have a minor SDK release in Q4 with additional APIs and features.


Orientation and resizability restrictions


With the release of the Android 17 Beta, we’re moving to the next phase of our adaptive roadmap: Android 17 (API level 37) removes the developer opt-out for orientation and resizability restrictions on large screen devices (sw > 600 dp).

When your app targets SDK 37, it must be ready to adapt. Users expect their apps to work everywhere—whether multitasking on a tablet, unfolding a device, or using a desktop windowing environment—and they expect the UI to fill the space and respect their device posture.

Key Changes for SDK 37

Apps targeting Android 17 must ensure compatibility with the phase-out of manifest attributes and runtime APIs introduced in Android 16. When running on a large screen (smaller dimension ≥ 600dp), the following attributes and APIs will be ignored:

Manifest attributes/APIIgnored values
screenOrientationportrait, reversePortrait, sensorPortrait, userPortrait, landscape, reverseLandscape, sensorLandscape, userLandscape
setRequestedOrientation()portrait, reversePortrait, sensorPortrait, userPortrait, landscape, reverseLandscape, sensorLandscape, userLandscape
resizeableActivityall
minAspectRatioall
maxAspectRatioall


Exemptions and User Control

These changes are specific to large screens; they do not apply to screens smaller than sw600dp (including traditional slate form factor phones). Additionally, apps categorized as games (based on the android:appCategory flag) are exempt from these restrictions.

It is also important to note that users remain in control. They can explicitly opt-in/out to using an app’s default behavior via the system's aspect ratio settings.

Updates to configuration changes
To improve app compatibility and help minimize interrupted video playback, dropped input, and other types of disruptive state loss, we are updating the default behavior for Activity recreation. Starting with Android 17, the system will no longer restart activities by default for specific configuration changes that typically do not require a UI recreation, including CONFIG_KEYBOARD, CONFIG_KEYBOARD_HIDDEN, CONFIG_NAVIGATION, CONFIG_UI_MODE (when only UI_MODE_TYPE_DESK is changed), CONFIG_TOUCHSCREEN, and CONFIG_COLOR_MODE. Instead, running activities will simply receive these updates via onConfigurationChanged. If your application relies on a full restart to reload resources for these changes, you must now explicitly opt-in using the new android:recreateOnConfigChanges manifest attribute, which allows you to specify which configuration changes should trigger a complete activity lifecycle (from stop, to destroy and creation again), together with the related constants mcc, mnc, and the new ones keyboard, keyboardHidden, navigation, touchscreen and colorMode.

Prepare Your App

We’ve released tools and documentation to make it easy for you. Our focused blog post has more guidance, with strategies to address common issues. Apps will need to support landscape and portrait layouts for window sizes across the full range of aspect ratios, as restricting orientation or aspect ratio will no longer be an option. We recommend testing your app using the Android 17 Beta 1 with Pixel Tablet or Pixel Fold emulators (configured to targetSdkPreview = "CinnamonBun") or by using the app compatibility framework to enable UNIVERSAL_RESIZABLE_BY_DEFAULT on Android 16 devices.


Performance

Lock-free MessageQueue


In Android 17, apps targeting SDK 37 or higher will receive a new implementation of android.os.MessageQueue where the implementation is lock-free. The new implementation improves performance and reduces missed frames, but may break clients that reflect on MessageQueue private fields and methods.

Generational garbage collection


Android 17 introduces generational garbage collection to ART's Concurrent Mark-Compact collector. This optimization introduces more frequent, less resource-intensive young-generation collections alongside full-heap collections. aiming to reduce overall garbage collection CPU cost and time duration. ART improvements are also available to over a billion devices running Android 12 (API level 31) and higher through Google Play System updates.

Static final fields now truly final

Starting from Android 17 apps targeting Android 17 or later won’t be able to modify “static final” fields, allowing the runtime to apply performance optimizations more aggressively. An attempt to do so via reflection (and deep reflection) will always lead to IllegalAccessException being thrown. Modifying them via JNI’s SetStatic<Type>Field methods family will immediately crash the application.

Custom Notification View Restrictions

To reduce memory usage we are restricting the size of custom notification views. This update closes a loophole that allows apps to bypass existing limits using URIs. This behavior is gated by the target SDK version and takes effect for apps targeting API 37 and higher.

New performance debugging ProfilingManager triggers

We’ve introduced several new system triggers to ProfilingManager to help you collect in-depth data to debug performance issues. These triggers are TRIGGER_TYPE_COLD_START, TRIGGER_TYPE_OOM, and TRIGGER_TYPE_KILL_EXCESSIVE_CPU_USAGE.


To understand how to set up the new system triggers, check out the trigger-based profiling and retrieve and analyze profiling data documentation.


Media and Camera

Android 17 brings professional-grade tools to media and camera apps, with features like seamless transitions and standardized loudness.

Dynamic Camera Session Updates

We have introduced updateOutputConfigurations() to CameraCaptureSession. This allows you to dynamically attach and detach output surfaces without the need to reconfigure the entire camera capture session. This change enables seamless transitions between camera use cases and modes (such as shooting still images vs shooting videos) without the memory cost and code complexity of configuring and holding onto all camera output surfaces that your app might need during camera start up. This helps to eliminate user-visible glitches or freezes during operation.

fun updateCameraSession(session: CameraCaptureSession, newOutputConfigs:  List<OutputConfiguration>)) {
    // Dynamically update the session without closing and reopening
    try {
        
        // Update the output configurations
        session.updateOutputConfigurations(newOutputConfigs)
    } catch (e: CameraAccessException) {
        // Handle error
    }
}

Logical multi-camera device metadata

When working with logical cameras that combine multiple physical camera sensors, you can now request additional metadata from all active physical cameras involved in a capture, not just the primary one. Previously, you had to implement workarounds, sometimes allocating unnecessary physical streams, to obtain metadata from secondary active cameras (e.g., during a lens switch for zoom where a follower camera is active). This feature introduces a new key, LOGICAL_MULTI_CAMERA_ADDITIONAL_RESULTS, in CaptureRequest and CaptureResult. By setting this key to ON in your CaptureRequest, the TotalCaptureResult will include metadata from these additional active physical cameras. You can access this comprehensive metadata using TotalCaptureResult.getPhysicalCameraTotalResults() to get more detailed information that may enable you to optimize resource usage in your camera applications.

Versatile Video Coding (VVC) Support

Android 17 adds support for the Versatile Video Coding (VVC) standard. This includes defining the video/vvc MIME type in MediaFormat, adding new VVC profiles in MediaCodecInfo, and integrating support into MediaExtractor. This feature will be coming to devices with hardware decode support and capable drivers.

Constant Quality for Video Recording

We have added setVideoEncodingQuality() to MediaRecorder. This allows you to configure a constant quality (CQ) mode for video encoders, giving you finer control over video quality beyond simple bitrate settings.

Background Audio Hardening

Starting in Android 17, the audio framework will enforce restrictions on background audio interactions including audio playback, audio focus requests, and volume change APIs to ensure that these changes are started intentionally by the user. 

If the app tries to call audio APIs while the application is not in a valid lifecycle, the audio playback and volume change APIs will fail silently without an exception thrown or failure message provided. The audio focus API will fail with the result code AUDIOFOCUS_REQUEST_FAILED.

Privacy and Security

Deprecation of Cleartext Traffic Attribute

The android:usesCleartextTraffic attribute is now deprecated. If your app targets (Android 17) or higher and relies on usesCleartextTraffic="true" without a corresponding Network Security Configuration, it will default to disallowing cleartext traffic. You are encouraged to migrate to Network Security Configuration files for granular control.

HPKE Hybrid Cryptography

We are introducing a public Service Provider Interface (SPI) for an implementation of HPKE hybrid cryptography, enabling secure communication using a combination of public key and symmetric encryption (AEAD).

Connectivity and Telecom

Enhanced VoIP Call History

We are introducing user preference management for app VoIP call history integration. This includes support for caller and participant avatar URIs in the system dialer, enabling granular user control over call log privacy and enriching the visual display of integrated VoIP call logs.

Wi-Fi Ranging and Proximity

Wi-Fi Ranging has been enhanced with new Proximity Detection capabilities, supporting continuous ranging and secure peer-to-peer discovery. Updates to Wi-Fi Aware ranging include new APIs for peer handles and PMKID caching for 11az secure ranging.

Developer Productivity and Tools

Updates for companion device apps

We have introduced two new profiles to the CompanionDeviceManager to improve device distinction and permission handling:

  • Medical Devices: This profile allows medical device mobile applications to request all necessary permissions with a single tap, simplifying the setup process.

  • Fitness Trackers: The DEVICE_PROFILE_FITNESS_TRACKER profile allows companion apps to explicitly indicate they are managing a fitness tracker. This ensures accurate user experiences with distinct icons while reusing existing watch role permissions.

Also, the CompanionDeviceManager now offers a unified dialog for device association and Nearby permission requests. You can leverage the new setExtraPermissions method in AssociationRequest.Builder to bundle nearby permission prompts within the existing association flow, reducing the number of dialogs presented to the user.

Get started with Android 17


You can enroll any supported Pixel device to get this and future Android Beta updates over-the-air. If you don’t have a Pixel device, you can use the 64-bit system images with the Android Emulator in Android Studio.

If you are currently in the Android Beta program, you will be offered an over-the-air update to Beta 1.

If you have Android 26Q1 Beta and would like to take the final stable release of 26Q1 and exit Beta, you need to ignore the over-the-air update to 26Q2 Beta 1 and wait for the release of 26Q1.

We're looking for your feedback so please report issues and submit feature requests on the feedback page. The earlier we get your feedback, the more we can include in our work on the final release.

For the best development experience with Android 17, we recommend that you use the latest preview of Android Studio (Panda). Once you’re set up, here are some of the things you should do:

  • Compile against the new SDK, test in CI environments, and report any issues in our tracker on the feedback page.

  • Test your current app for compatibility, learn whether your app is affected by changes in Android 17, and install your app onto a device or emulator running Android 17 and extensively test it.

We’ll update the preview/beta system images and SDK regularly throughout the Android 17 release cycle. Once you’ve installed a beta build, you’ll automatically get future updates over-the-air for all later previews and Betas.

For complete information, visit the Android 17 developer site.


Join the conversation

As we move toward Platform Stability and the final stable release of Android 17 later this year, your feedback remains our most valuable asset. Whether you’re an early adopter on   the Canary channel or an app developer testing on Beta 1, consider joining our communities and filing feedback. We’re listening.

Read the whole story
alvinashcraft
34 minutes ago
reply
Pennsylvania, USA
Share this story
Delete

Mastering Squad: Ralph Loops, GitHub Issues & Upgrades

1 Share
From: Fritz's Tech Tips and Chatter
Duration: 6:34
Views: 20

Take your AI Dev Team to the next level with this advanced deep dive into Squad, the open‑source AI agent framework created by Brady Gaster. In this follow‑up to my “Introducing Your AI Dev Team” video, we explore how to use Ralph loops, GitHub Issues, Milestones, and upgrade workflows to automate even more of your development process.

In this video, I walk through real examples of how Squad’s agents can coordinate tasks, track work, and streamline project management directly from your terminal using the GitHub Copilot CLI and GitHub issues. You’ll see how Ralph loops integrate into your workflow to manage workflow and processing, and how to upgrade an existing Squad install without breaking your setup.

If you’re ready to move beyond the basics and unlock the full power of AI‑driven development, this video shows you exactly how to do it.

🔗 Squad on GitHub: https://github.com/bradygaster/squad
🔗 Demo Code Repository: https://github.com/csharpfritz/MyFirstTextGame

More Squad tutorials, Copilot CLI workflows, and AI‑powered dev tools are coming—subscribe so you don’t miss the next part of the series.

Read the whole story
alvinashcraft
34 minutes ago
reply
Pennsylvania, USA
Share this story
Delete

Report: Bill Gates-backed Breakthrough Energy keeps scaling back its climate initiatives

1 Share

Bill Gates-backed Breakthrough Energy, headquartered in Seattle, is reducing its operations even more. The organization has decided against pursuing additional capital for Catalyst, its initiative that funds ready-to-scale climate technology projects, Axios reported Friday.

  • Catalyst raised an initial fund of $1.5 billion.
  • Breakthrough Energy Ventures, a broader climate investment vehicle launched by Gates in 2015 with a who’s who of tech and business leaders, has raised three funds totaling approximately $3 billion.
  • Breakthrough, which served as an umbrella organization, began significantly cutting staff and programming shortly after President Trump returned to office last year.
  • Gates in October posted a memo on his personal blog making clear his philanthropic focus is on global health and downplaying climate threats.

Read the whole story
alvinashcraft
1 hour ago
reply
Pennsylvania, USA
Share this story
Delete

0.0.410-1

1 Share

Added

  • Show IDE file selection indicator in the status bar when connected to an IDE
  • Add repo-level settings to disable individual validation tools
  • ACP server supports loading existing sessions
  • Page Up/Page Down keyboard scrolling in alt-screen mode
  • Add Ctrl+Z suspend/resume support on Unix platforms
  • Support tilde (~) expansion in MCP server cwd configuration
  • Support ctrl+n and ctrl+p as arrow key alternatives
  • Exit CLI with ctrl+d on empty prompt

Improved

  • Shell mode removed from Shift+Tab cycle, accessed only via !
  • Improve /tasks dialog with consistent icons and typography
  • Exit from alt-screen no longer replays full session history
  • MCP server errors and loading issues surface in timeline
  • Reduce input jitter with frame coalescing and smoother alt-screen animations
  • Extend skill name validation to support underscores, dots, and spaces; make name and description optional in skill frontmatter with sensible fallbacks

Fixed

  • Fix unknown option '--no-warnings' error
  • Shift+Enter inserts newlines in terminals with kitty keyboard protocol
  • MCP server list selection adjusts correctly after deletion
Read the whole story
alvinashcraft
1 hour ago
reply
Pennsylvania, USA
Share this story
Delete

Go 1.26.0-1 Microsoft build now available

1 Share

A new release of the Microsoft build of Go is now available for download. For more information about this release and the changes included, see the table below:

Microsoft Release Upstream Tag
v1.26.0-1 go1.26.0 release notes

As of this release, Go 1.24 is no longer supported, per the Go release policy.

Changes in the Microsoft build of Go 1.26

The 1.26.0-1 release is a major version update, and it includes a few experimental features we are eager to get feedback on. Specifically, if you get a chance, please try to:

  • Disable cgo and use the GOEXPERIMENT ms_nocgo_opensslcrypto.
  • Use the Microsoft build of Go version rather than the upstream version in your programs. Our version is formatted in a way that we expect to be parsed correctly by existing tools, but let us know if this causes any problems. To do this:
    • Use -ldflags="-ms_upstreamversion=0" in your go build command. When you run go version <your-program>, you should see our toolset’s version.
    • Add ms_version=1 to the GODEBUG environment variable at runtime or configure this setting in your go.mod for compile time. This configures runtime.Version() to return the Microsoft build of Go version string.

As always, please let us know if you encounter a problem or have a question by filing an issue. If you have access to Microsoft internal sites, you can alternatively use one of the channels listed in our internal support documentation such as the Golang Friends group in Teams.

The following is a summary of the Microsoft build of Go 1.26 release notes, emphasizing important changes. To see the canonical release notes doc, visit the full go1.26 release notes Markdown file.

Toolchain

The GOCACHE environment variable now defaults to os.UserCacheDir()/ms-go-build instead of os.UserCacheDir()/go-build. This change removes the possibility of encountering cache conflicts between the Microsoft build of Go and other Go toolchains installed on the same machine.

The buildinfo embedded at build time now includes Microsoft-specific version information in a new microsoft_toolset_version setting. This allows all binaries built by the Microsoft build of Go to be easily identified, including the toolset’s binaries themselves. Along the same lines, we introduced a new GODEBUG runtime setting called ms_version and build-time linker flag -ms_upstreamversion that allow you to use the Microsoft-specific version string in your programs. For more information, see the Additional Features document.

Systemcrypto

Configuration

You can disable systemcrypto at build time by setting the environment variable MS_GO_NOSYSTEMCRYPTO to 1. It’s now the recommended method for disabling systemcrypto when necessary. This feature was backported to 1.25.2-1, so it’s now available in all supported versions of the Microsoft build of Go.

Backends

Windows

Setting the FIPS preference to enabled will no longer cause a panic when the Windows FIPS policy is disabled. The underlying crypto primitives on Windows are always FIPS compliant regardless of FIPS policy, so the panic is unnecessary and has been removed for compatibility with more scenarios.

OpenSSL

Linux binaries compliant with Microsoft internal cryptography policies can now be built without using cgo by setting GOEXPERIMENT=ms_nocgo_opensslcrypto. 🎉 This much-anticipated feature removes a significant limitation the Microsoft internal cryptography policies have historically placed on compliant Go programs. For more information, see No-cgo OpenSSL Backend.

Improved support for the Fedora OpenSSL FIPS provider. See golang-fips/openssl#266.

Darwin

The macOS crypto backend is no longer in preview and is now fully supported. It is enabled by default for builds targeting macOS.

Unlike preview versions of macOS backend support, using this backend doesn’t require cgo.

Supported algorithms

The systemcrypto backends now support many new cryptographic algorithms, curves, key sizes, and TLS groups and suites. See the full go1.26 release notes Markdown file for the list.

TLS settings

The TLS curves X25519 and X25519MLKEM768 can be disabled using the GODEBUG setting ms_tlsx25519=0. This setting may help comply with certain cryptographic policies.

The TLS default settings are now aligned with Microsoft TLS internal policies. This behavior can be disabled using the GODEBUG setting ms_tlsprofile=off. The changes from standard Go TLS default settings are:

  • TLS cipher suites using AES-256 are now preferred over those using AES-128.
  • TLS cipher suites using CHACHA20_POLY1305 are no longer preferred over AES-GCM cipher suites when the client or server supports hardware acceleration for AES.
  • TLS groups supported by the systemcrypto backends are now preferred over those that are not.

The post Go 1.26.0-1 Microsoft build now available appeared first on Microsoft for Go Developers.

Read the whole story
alvinashcraft
1 hour ago
reply
Pennsylvania, USA
Share this story
Delete
Next Page of Stories