LightBlog

mardi 6 avril 2021

Google is developing parts of Android in Rust to improve security

Android as a complete OS solution involves a lot of moving parts. Very broadly speaking, these parts are the app ecosystem and then the OS itself. As a developer, your programming language of choice varies depending on what part of Android you are working on. For app developers, Java and Kotlin are popular options. For developers working on the OS and the lower levels within it, C and C++ have been popular choices so far. Today, Google is adding a third option for OS developers, as the Android Open Source Project now supports the Rust programming language for developing the OS itself.

Limitations of C and C++

Lower levels of the Android OS require systems programming languages like C and C++. These languages provide developers with control and predictability, which is important when accessing low-level system resources and hardware.

Unfortunately, C and C++ fail to provide memory safety guarantees, making them prone to bugs and security vulnerabilities. The developer is responsible for managing memory lifetime on these languages, but in complex and multi-threaded codebases, that is easier said than done.

C and C++ together constitute tens of millions of lines of code on the Android platform. These memory safety bugs become the most difficult-to-address source of incorrectness of code, representing ~70% of Android’s high severity security vulnerabilities. Merely fixing these bugs becomes insufficient to deal with the issue, and a better approach would be to prevent them in the first place.

The lack of memory safety guarantees forces developers to run Android processes within tightly constrained and unprivileged sandboxes. But sandboxes are expensive on resources, consuming additional overhead and introducing latency. Sandboxing also doesn’t eliminate the code’s vulnerabilities entirely, and its efficacy is reduced because of high bug density, further allowing attackers to chain multiple vulnerabilities.

Another limitation, though not unique to C and C++ but applicable to all memory safety issues, is that the erroneous state must actually be triggered in instrumented code in order to be detected. So even if your code has excellent testing, the actual bug may stay undetected. And when bugs are found, getting them fixed is another task, involving a long and costly process that may not always lead to a correct fix. Thus, bug detection becomes unreliable, and bug prevention is the better approach to take in light of these limitations.

This is where the switch to a memory-safe language like Rust comes into the picture.

Rust and its benefits

Rust provides memory safety guarantees by using a combination of compile-time checks to enforce object lifetime/ownership, and runtime checks to ensure that memory accesses are valid. This safety is achieved while providing equivalent performance to C and C++. Rust also reduces the need for sandboxing, allowing developers more overhead room to introduce new features that are safer and lighter on resources.

While Rust does indeed have its benefits, it’s not feasible to switch the entire Android OS to Rust overnight. And that might not even be needed, as most of Android’s memory bugs occur in new or recently modified code, with about 50% being less than a year old. Google believes that its memory-safe language efforts are best focused on new developments rather than rewriting mature C and C++ code.

Rust also focuses on preventing bugs rather than leaning heavily on the detection of bugs, resulting in improved correctness of code. It has several key features, such as memory safety, data concurrency, more expressive type systems, immutable references and variables by default, safer integer handling, better error handling in standard libraries, and much more.

What does the switch to Rust mean for Android?

Google says that it has been adding Rust support to the Android Open Source Project for the past 18 months. But adding a new language to the Android platform is an enormous undertaking. Some toolchains and dependencies need to be maintained, test infrastructure and tooling must be updated, and developers need to be trained.

Google has a few early adopter projects that they will be sharing in the coming months. But even so, it is being made clear that scaling Rust support to more of the OS is a multi-year project.

From what we can see, Google is already using Rust at a few places. Android’s new Bluetooth stack rewrite code-named “Gabeldorsche” is being written in Rust. Work started on Gabeldorsche around the time of Android 11 but is still not in use yet. Android’s Keystore 2.0 module is written in Rust, and so is the userspace portion of binder, Android’s IPC driver. While not related to Android, Fuchsia‘s new netstack is also being written in Rust.

For app developers, the switch changes nothing about how you, as an app developer, write apps or how the framework APIs work. This switch only affects how the OS is written. According to a member of the Android Developer Relations team, Google also does not plan to release a Rust NDK at the moment. The supported languages for app development will continue to be Kotlin, Java, C, and C++.

The post Google is developing parts of Android in Rust to improve security appeared first on xda-developers.



from xda-developers https://ift.tt/3wA0eSO
via IFTTT

E3 2021 will go virtual, Nintendo and Xbox to attend

The Entertainment Software Association (ESA) on Tuesday announced this year’s E3 will go forward — but as an all-virtual event due to the pandemic. This will be the second year in a row E3, which will take place June 12 through June 15, has been forced to go digital.

Despite the event taking place online, there’s some cause for celebration. E3 2021 will be entirely free, so anyone can follow along as companies announce new software. Speaking of which, some of the industry’s biggest players will be in attendance, including Nintendo, Xbox, Capcom, Konami, Ubisoft, Take-Two Interactive, Warner Bros. Games, and more.

There are a few notable absences from the list, including EA and Sony, the latter of which may decide to hold its own digital presentation. Sony typically livestreams its “State of Play” announcements throughout the year, although it’s unclear if the company has anything planned for the summer. Other companies such as Square Enix, Sega, Activision Blizzard, and Bandai Namco are also absent from the list of E3 2021 attendees.

““We are evolving this year’s E3 into a more inclusive event, but will still look to excite the fans with major reveals and insider opportunities that make this event the indispensable center stage for video games,” said Stanley Pierre-Louis, President & CEO of the ESA.

With the PlayStation 5 and Xbox Series X|S now on the market, we may get a glimpse at some new and in-development next generation games. The pandemic has certainly taken its toll on the gaming industry by pushing back a lot of releases, but hopefully this year’s show will give fans more clarity over when to expect new titles to be released.

Nintendo is expected to unveil a Nintendo Switch Pro for release this holiday season, but it’s unclear if the company will use E3 as the platform to announce it. Chances are low we’ll see an announcement in June, but one could hope. Like Sony, Nintendo likes to hold its own digital events, but we’ll keep our eyes out anyway.

“The ESA looks forward to coming back together to celebrate E3 2022 in person, in the meantime see you online this June!,” the ESA said.

The post E3 2021 will go virtual, Nintendo and Xbox to attend appeared first on xda-developers.



from xda-developers https://ift.tt/3uosEgX
via IFTTT

Google Podcasts tests letting you personalize episode recommendations

Back in the day, Google Podcasts service used to be part of the Google Play Music app. However, in 2018, Google branched out the service as a standalone app — and even brought a basic desktop interface later down the road. The Google Podcasts is one of the best podcast apps out there, and for good reason. It’s free, has a simple, intuitive UI, and a vast library. And being a Google service, it also keeps getting features and new tricks from time to time. Late last year, the app gained support for subscribing to private podcasts by RSS feed. And now, the app is testing a new change that will help Google provide more personalized podcast recommendations.

As spotted by our Editor in Chief, Mishaal Rahman, and first uncovered by 9to5Google, Google Podcasts is testing a new “heart” button in the player UI. When tapped, it brings up a dialog to let you choose whether to “Show more like this,” “Show fewer like this,” “Block show from recommendations.”

Google Podcasts heart button

When you tap the first option, the app will try to show “more episodes like this in your recommendations. “ Tapping the second (Thumbs down) option will tell the algorithm to recommend fewer episodes like that. Meanwhile, the third option will let users completely block a show from their recommendations.

Also, in Settings, there’s a new “More, less, & blocked shows” menu under the “Explore” category that will let you see what shows or episodes you’ve added to the list.

The ability to fine-tune show and episode recommendations has not yet widely rolled out in Google Podcasts for users. At the time of writing this, it wasn’t available on the Google Podcasts app v12.12.9.23 on my phone. We’ll keep an eye out and let you know when the feature starts rolling out for more Android users.

Google Podcasts: Discover free & trending podcasts (Free, Google Play) →

The post Google Podcasts tests letting you personalize episode recommendations appeared first on xda-developers.



from xda-developers https://ift.tt/2R2UqB6
via IFTTT

HP Chromebook 11a with MediaTek MT8183 launches in India, focusing on student needs

HP is introducing a new budget Chromebook in India today called the HP Chromebook 11a. Powered by MediaTek’s MT8183 octa-core processor, the new HP Chromebook 11a is made for students allowing them to stay connected, be it at home or in the classroom. As the coronavirus pandemic continues to affect schools and other educational institutions, HP hopes it can help by offering digital learning solutions.

HP Chromebook 11a product image

HP Chromebook 11a: Specifications

Specification HP Chromebook 11a
Dimensions & Weight
  • 285×192.8×16.8 mm
  • 1.05 kgs
Display
  • 11.6-inch HD (1366 x 768) IPS touchsreen
  • 220-nits brightness
Processor MediaTek MT8183 octa-core processor
GPU ARM Mali-G72
RAM & Storage
  • 4GB RAM
  • 64GB storage (MicroSD card slot)
Battery & Charger 37Whr (16 hours claimed)
I/O
  • USB Type-A
  • USB Type-C
  • 3.5mm headphone/microphone combo jack
Connectivity
  • Wi-Fi 5
  • Bluetooth 5.0
OS Chrome OS
Other Features 100GB Google Drive storage

The new Chromebook 11a comes in a small package with an 11.6-inch HD (1,366×768 pixels) IPS touchscreen display and a vibrant Indigo Blue color scheme that extends from the lid to the keyboard. Weighing at just 1.05kgs, it is also said to be easy for carrying around and an ideal choice for early learners, especially students from class 2 to 7. As mentioned, the laptop is powered by the MediaTek MT8183 octa-core processor, 4GB RAM, 64GB of storage, and 100GB of cloud storage with Google One. The laptop also offers support for expandable storage, so you can add up to 256GB of additional storage using a microSD card.

HP Chromebook 11a product image

HP claims that the 37Whr battery should last up to 16 hours while connectivity options include Bluetooth 5.0, Wi-Fi 5,  a USB Type-A port, a USB Type-C port, and a 3.5mm audio jack. Other features include HP’s True Vision HD webcam, built-in Google Assistant support, and a one-year Google One subscription.

Mr. Vickram Bedi, Senior Director, Personal Systems, HP India Market said, “With the rapidly evolving education landscape in the country, it is imperative that we arm students and educators with the right tools and technology for remote and hybrid learning environments. We are thrilled to introduce the HP Chromebook 11a, which is an ideal mix of power and mobility provided by the MediaTek MT8183 Octa-core processor that will elevate their learning experience and improve productivity in a whole new manner”.

Pricing and Availability

The HP Chromebook 11a is priced in India at ₹21,999 (~$300) and will be sold exclusively through Flipkart. If you are looking for a Chromebook, make sure you go through our list of the best Chromebooks to buy in 2021.

The post HP Chromebook 11a with MediaTek MT8183 launches in India, focusing on student needs appeared first on xda-developers.



from xda-developers https://ift.tt/3cQHU07
via IFTTT

Developers can now publish Android Auto apps for charging, navigation, and parking to Google Play

In August last year, Google announced that it had started working with developers to bring a host of third-party navigation, parking, and electric vehicle charging apps to Android Auto. A few months after the announcement, Google released the Android for Cars App Library in beta to allow third-party app developers to design, develop, and test their apps on the Android Auto platform. The company then started allowing developers to publish apps built using this library late last year, and Sygic was one of the first to take advantage of this.

Earlier this year, Google announced that it was working on migrating the Android for Cars App Library to Android Jetpack. The company also started allowing developers to publish apps built using the library on open testing tracks. The library became available on Jetpack early last month, and the company is now finally letting developers publish their navigation, parking, and charging apps on Google Play.

Android Auto third-party apps

Third-party apps running on the Jetpack library (clockwise from upper left): T map, Chargepoint, Sygic, Plugshare, AmiGO, 2GIS, A Better Route Planner, and Flitsmeister (Image: Google)

In a recent blog post on the matter, Google’s Eric Bahna wrote, “Today, we’re thrilled to announce that you can publish your Android Auto navigation, parking, and charging apps to production! We’ve been hard at work stabilizing the library, Android Auto, and the publishing process to reach this milestone. Publishing to production enables drivers to use your Android Auto app on their car screen without needing to sign up for a beta program.”

To publish your Android Auto app on Google Play, you’ll need to:

At the moment, developers can only publish navigation, parking, and charging apps on Google Play. But we expect Google to expand to more categories in the near future. We’ll let you know as soon as that happens.

The post Developers can now publish Android Auto apps for charging, navigation, and parking to Google Play appeared first on xda-developers.



from xda-developers https://ift.tt/3ms1ind
via IFTTT

The best Ethernet adapters for your Dell XPS laptop: Anker, Belkin, and more!

Dell’s lineup of XPS laptops are some of the best portable PCs you can buy, with sleek designs, great keyboards, and excellent performance. However, the transition to USB Type-C means you’ll need adapters to use most types of connections, including wired internet. Dell certainly isn’t alone here — most of the best laptops around need at least one dongle to get connected over Ethernet.

In this guide, we’ll go over some of the best Ethernet adapters for Dell XPS laptops. Thanks to the versatility of USB, anything you buy should work perfectly with Ryzen laptops, 5G laptops, and just about any other PC. These adapters can also work with many Android devices, and if you have something with Android 11, you can tether the device’s internet connection over Ethernet with the right adapter.

    Dell USB-C Mobile Adapter

    More than just Ethernet

    This official adapter from Dell costs a bit more than other options, but it does much more than just Ethernet. It has connections for HDMI, DisplayPort, USB Type-A, USB Type-C, and VGA, and all it requires is a single Type-C connection on your laptop.

    The cheap option

    This is one of the cheaper adapters that supports both USB Type-C and full gigabit Ethernet. It's a great option if you just need a stable Ethernet connection and nothing extra.
    Anker USB-C to Ethernet Adapter

    Simple, but good

    This is another adapter that just handles Ethernet, and nothing else. It has a metallic finish that matches some Dell XPS laptops, and supports Gigabit.
    Insignia USB Type-A to Ethernet Adapter

    For older XPS laptops

    If your Dell XPS doesn't have a Type-C port, this Gigabit Ethernet adapter will work just fine.
    j5create USB Type-C Hub

    Ethernet with extras

    Here's another Type-C hub. In addition to Gigabit Ethernet, it has two USB 3.0 ports and HDMI.
    Belkin USB Type-C Hub

    The ultimate hub

    This Type-C hub has two USB Type-A ports, Gigabit Ethernet, a pass-through Type-C connector, 4K@30Hz HDMI, and an SD card slot.

If you only need Ethernet connectivity and nothing else, a simple adapter like the above Insignia and Xcellon options are the most cost-effective. However, if you’re constantly running into other cables you can’t directly plug into your Dell XPS, a hub with multiple types of ports might be a better option. Hubs also have the advantage of only taking up one Type-C port, leaving the others free for charging for connecting other accessories.

The post The best Ethernet adapters for your Dell XPS laptop: Anker, Belkin, and more! appeared first on xda-developers.



from xda-developers https://ift.tt/3moIs0b
via IFTTT

Google Assistant’s new Driving Mode expands outside of the US

Google is expanding the long-awaited Assistant Driving Mode to more markets. The feature first started seeding to Android users in October last year. However, at the time, it was limited to the US market only. But that finally seems to be changing as Google is seemingly making the feature available in more countries.

As spotted by Android Police, Google’s support page no longer states that the Assistant Driving Mode is “only available in English in the US.” Instead, the page now mentions, “Some features aren’t available in all languages or countries.” This means the feature is no longer US-exclusive and is likely available in multiple markets — although the page fails to explicitly state which countries. Android Police was able to confirm that the feature is available in the UK at least.

Originally announced at Google I/O 2019, the Assistant Driving Mode is seen as a replacement for the Android Auto app. Like Android Auto, the Assistant Driving Mode allows users to make and receive calls, listen to music, send/receive messages, and so on while driving. The Assistant-powered driving mode is superior in that it lets you do all the above things hands-free using voice commands. That means you don’t have to touch your phone and can stay focused on driving.

In the Google Maps app, you can navigate to Settings > Navigation Settings > Google Assistant settings to see if the Assistant Driving Mode is available for you. If the feature has rolled out on your device, you should see the new Driving mode page open up on the next screen. It should look something like this:

Google Assistant Driving Mode

It wasn’t available on any of my Android phones running the latest version of Google Maps and Google app here in India. If you live outside the US and have received the new driving mode in the Google Maps app, let us know in the comments section below.

Google Maps - Navigate & Explore (Free, Google Play) →

Google (Free, Google Play) →

The post Google Assistant’s new Driving Mode expands outside of the US appeared first on xda-developers.



from xda-developers https://ift.tt/3mvHCPy
via IFTTT