dimanche 22 juillet 2018

Today is the last day to request a bootloader unlock code for Huawei/Honor devices

Chinese technology giant Huawei and its sub-brand Honor have been slowly garnering more respect among the Android enthusiast community in the past year. With timely software updates, commitments to supporting custom development, and widespread Project Treble adoption for all devices they have updated to Android Oreo, it’s not hard to see why Huawei and Honor smartphones were starting to become more popular on our forums. Unfortunately, the company had a sudden change of heart. Two months ago, the company announced that they will stop providing bootloader unlock codes. If you want to unlock the bootloader of your Huawei or Honor device, today is the last day to request a code.

While unlocking the bootloader on a Huawei or Honor device isn’t as simple as on Google or OnePlus devices, it’s not a difficult process. On Huawei and Honor devices, you need to acquire a bootloader unlock code if you want to be able to unlock the bootloader. The page to request a code requires you to fill in details about your device and sign in with your Huawei account, but it’s a fairly simple form to fill out. Getting the bootloader unlock code is usually instant, too, unlike Xiaomi devices where you have to wait 360 hours.

Unlocking the bootloader opens up the ability to gain root access with Magisk or SuperSU, install a custom recovery like TWRP to make backups, flash custom ROMs such as LineageOS, Resurrection Remix, or CarbonROM, flash custom kernels, or flash modifications like ARISE and the Xposed Framework. We’ve shown how flashing an AOSP ROM can result in huge performance improvements on budget Honor devices like the Honor 9 Lite without sacrificing camera quality thanks to mods like the Huawei P20 camera port. None of this would be possible without an unlockable bootloader, which is why it’s a huge blow to the community for the unlock codes to no longer be obtainable.

We have reached out to our contacts at Honor and Huawei and have not heard any news that the company will provide bootloader unlock codes in the future. The company’s reason for ending the program is it provides a “better user experience and avoids issues caused by ROM flashing.” We don’t agree with this reason because the company already makes you jump through hoops to unlock the bootloader. Furthermore, it’s entirely opt-in, so users who experience problems have only themselves to blame if something goes wrong. It certainly doesn’t help that Huawei and Honor stopped providing firmware for local upgrades, either, as their eRecovery tool often fails to restore devices when it’s accessed outside of China.

If you would like to unlock the bootloader on your Huawei or Honor device, you need to register for an unlock code immediately. You don’t necessarily have to unlock the bootloader now, but if you don’t get the code now you’ll never have that option in the future. So go grab that code now and save it somewhere in case you decide to make the plunge. If you do decide to unlock the bootloader, be sure to check out the XDA forum for your device to stay up to date on the latest developments.

Request bootloader unlock code on Huawei or Honor devices

from xda-developers https://ift.tt/2uHWHnc

samedi 21 juillet 2018

Oppo F9 and Oppo F9 Pro receive Bluetooth certification, may launch soon

Oppo F9

Oppo is one of the world’s largest smartphone vendors. The company is placed in fourth place in the Indian smartphone market. Although Oppo returned to the flagship smartphone space with the launch of the Oppo Find X, the company is more widely known for its F mid-range series (in international markets) and R upper mid-range/flagship series (in China). The Oppo F7, launched in March, was Oppo’s first phone with a display notch, and it was powered by the MediaTek Helio P60 SoC. It was followed by the launch of the online-only Realme 1, which shared most specifications with the F7, but managed to be significantly cheaper. Now, the Oppo F9 and the Oppo F9 Pro have received Bluetooth certification, indicating that they may launch soon.

Oppo typically refreshes its mid-range phones every six months, so it’s fair to expect the Oppo F9 to launch in late August/September. DealNTech was able to find an alleged-to-be official company teaser for the Oppo F9. The teaser shows a render of the back of the smartphone, and we can observe a dual rear camera placed on the top left. In contrast, the Oppo F7 had a single 16MP rear camera.

Oppo F9 Oppo F9 Pro Bluetooth CertificationThe Bluetooth certification of the Oppo F9 reveals that the phone will have Bluetooth 4.2 with model number CPH 1823, CPH 1825, and CPH 1881. The CPH 1823 is speculated by DealNTech to be the Oppo F9 while the other two will be variants having different memory configurations. Notably, the Bluetooth certification listing shows that the Oppo F9/F9 Pro has the same Bluetooth module as the Oppo F7, Oppo F7, Oppo R15, and the Realme 1. This means that the phone will likely be powered by the same MediaTek Helio P60 SoC (MT6771).

The Oppo F9 will likely be launched internationally just like its predecessor. In India, the Oppo F7 was launched for ₹21,990 ($320), but is now available for ₹19,990 ($291). It’s probable to expect its successor to be launched at a similar price. We expect to learn more about the Oppo F9 in the coming weeks.

Via: DealNTech

from xda-developers https://ift.tt/2zZMJTf

Meizu 16 and Meizu 16 Plus receive 3C certification

Meizu Logo

The Meizu 16 and the Meizu 16 Plus are scheduled to launch on August 8—a day before Samsung’s Galaxy Note 9 event. Meizu’s CEO revealed earlier that at least one variant of the Meizu 16 (probably the Meizu 16 Plus) will be powered by the flagship Qualcomm Snapdragon 845 SoC. This is interesting as it will make the phone the very first Meizu flagship to be powered by a flagship Snapdragon chipset. Up until now, Meizu has used either MediaTek SoCs or Samsung’s Exynos SoCs in its smartphones due to a lawsuit with Qualcomm. However, the lawsuit was resolved last year, which means that Meizu can now release Snapdragon-powered smartphones.

The Meizu M6s was the company’s very first smartphone with a Qualcomm chip (the Snapdragon 625). Then, the company released the Meizu 15 and the Meizu 15 Plus in April in China. The Meizu 15 is powered by the Qualcomm Snapdragon 660 SoC, while the Meizu 15 Plus is powered by the Exynos 8895 SoC, which powers the Samsung Galaxy S8, Samsung Galaxy S8+, and Samsung Galaxy Note 8.

The Meizu 15 lineup was released only three months ago, but Meizu is already preparing to launch their successors in less than a month. The phones have now received certification from 3C, a Chinese certification authority. Also, an official teaser from the company confirms the launch date, which is August 8.

Meizu’s CEO has himself revealed quite a bit of the information. Apart from the presence of the Snapdragon 845 in at least one variant of the Meizu 16 Plus, the Meizu 16 Plus will have an in-display fingerprint sensor. The regular Meizu 16, on the other hand, is expected to be powered by the mid-range Snapdragon 710 SoC. The lineup will also have small bezels without a display notch.

Via: GSMArena

from xda-developers https://ift.tt/2zZgCmS

OnePlus 6 vs. OnePlus 3 – Is it time to upgrade?

The OnePlus 6 has been in the hands of reviewers and consumers alike for over a month now. While it’s pretty clear that it’s currently one of the fastest phones around, many will be wondering whether it’s worth the upgrade. I myself came from the OnePlus 3, and I can say without a doubt that it is an upgrade (shocker!)… but is it a $529 upgrade? In this article, we’ll compare the OnePlus 3 and the OnePlus 6  so that you can decide whether you want to hold on to that OnePlus 3 for an extra while or not.

Note: Both of these devices were purchased by me. These devices were not provided by OnePlus nor XDA, and this is not a sponsored post.

Design and build quality

OnePlus 6

The best way to describe the OnePlus 6 is simply “2018.” It’s nearly entirely glass, with a notch present and a dual camera setup. An aluminum frame between the Corning Gorilla Glass 5 on the front and back creates a glass sandwich of sorts. What’s more, there are reportedly over 40 steps taken in creating the glass on this device, with different procedures taken for each color variant. For example, the company says that there are actually crushed pearls under the glass of the Silk White variant, though most certainly not the luxurious kind you’d expect to make the price shoot up beyond reach. Still, the result is definitely nice.

I personally have the Silk White variant, so while I can’t talk about other designs, the overall layout is the same. It’s got a bit of a slippery grip, but that’s no problem thanks to the included silicone case. Buttons are tactile and firm. The device’s design screams premium, and the “Designed by OnePlus” insignia on the back signals that the company knows that. Sadly, there is a lack of wireless charging, so in a way, the glass on the back is actually a downside. I personally like the glass back, but that’s up to you to decide. It’s just another place your device could theoretically shatter, so if you have butterfingers then maybe it’s best to stay away. Or just use a case.

One thing is for sure, this device does feel like a tank. The build quality is strong and the design is one of the most attractive we’ve seen from the company yet. In terms of haptics, it’s no contest – the OnePlus 6 wins hands down.

OnePlus 3

The OnePlus 3 was characterized by its graphite aluminum body and sharp edges. This was the first truly “OnePlus” design that we know today, with many elements of its design language having continued to the OnePlus 6. The chamfered edges are much sharper here than on the OnePlus 6, and it still certainly looks like a flagship. The company’s logo hasn’t moved either, and even without it, you could probably guess what company designed it. The bottom layout of the device looks exactly the same as on the OnePlus 6, with the speaker, USB-C port, and headphone jack fixed in the same spots. The buttons remain tactile even after two years, and the alert slider is as rock-solid as ever.

And speaking of wear and tear, the device is still nearly like-new. The metal is unscratched and the screen only has a few micro scratches. I never used the included screen protector, as I ordered one of the first batches of the OnePlus 3 and the included screen protector was really, really poor. The included screen protector improved in a later batch. I don’t necessarily see the OnePlus 6 lasting quite as long, and I see it falling victim to lots of scratches all over. Time will tell in that aspect.

I’m a huge fan of the aluminum frame here too, and where the chamfered edges meet the glass is my favorite aspect of it. The OnePlus 3’s design remains elegant yet somewhat bold. Even the antennae on the top and bottom look natural and thoughtfully placed. I still personally prefer the OnePlus 6, but in terms of design, some may sway to the older device.

But there is one problem, and that’s the display. I don’t necessarily dislike it, but the bezels suddenly seem a lot larger than they did back when it first launched. Obviously, that’s because of newer devices pushing the boundaries of what we once thought of as “bezel-less,” but it’s something to note. If you don’t mind the display, then you can pretty much overlook that. Talking about displays, after two years I haven’t noticed any burn-in on my screen. That’s a pretty good lifespan for an AMOLED panel, and I’d definitely feel comfortable squeezing another year out of it, if not more. Having said that, a 16:9 panel feels somewhat archaic in a sense. It’s not that there’s anything wrong with one, but an 18:9 panel just looks a whole lot nicer, in my opinion. This last point is something that one must really try and get used to in order to fully appreciate, though.


OnePlus 6

There should be no contest here. We already know just how much the OnePlus 6 outperforms even other flagships with the same processor. As a result, it will come as no surprise that the Qualcomm Snapdragon 845 is much, much more powerful than the Qualcomm Snapdragon 820. The Adreno 630 GPU does a great job in terms of gaming, and the OnePlus 6 is still pretty competitive in terms of smoothness. In terms of raw computational power, this is the fastest smartphone available currently, due to its copious amounts of speedy RAM, it’s top-of-the-line storage and the greatest from Qualcomm. That’s not to say the OnePlus 3 is a poor performer, but it simply can’t compete with the latest that Qualcomm has to offer. Take a look at this smoothness graph taken from a scrolling sample on the Play Store’s “Top Charts” entries.

As you can see, the OnePlus 6 is very smooth when scrolling. Minimal frame drops, great gaming performance, and fast app launches. What’s not to love?

OnePlus 3

As we’ve already said, there’s just no contest here. There is nothing wrong with the OnePlus 3 in its current state. It is still very much a top performer, and you’ll get perfectly acceptable performance. If the performance you have is enough, then you certainly don’t need to upgrade yet. Take a look at the smoothness graph of the exact same workload below.

It’s not that the OnePlus 3 is slow or that it stutters a whole lot, it’s that the OnePlus 6 is just better. The Qualcomm Snapdragon 845 is leaps and bounds ahead of the Qualcomm Snapdragon 820, and it shows. If you’re finding performance is good enough on the OnePlus 3, then you don’t have much reason to upgrade in this department. I personally am very happy with the upgrade thanks to the performance alone, but it depends entirely on what you value in a smartphone. If you don’t value gaming and you aren’t using your phone for any intensive tasks, then maybe you can hold off on the upgrade for now.

I think it goes without saying that we all expected the OnePlus 6 to best the OnePlus 3 in performance. Newsflash, 2018 flagship is faster than 2016 flagship. There’s not really a huge amount to compare here, and to spend ages talking about benchmarks in particular would be rather useless. The OnePlus 6 beats the OnePlus 3 in basically every performance metric imaginable, and that’s to be expected. As we’ve already mentioned, the OnePlus 6 fares quite a bit better in gaming. PUBG on the OnePlus 3 runs pretty terribly, but the OnePlus 6 handles it without a hitch. Having said that, you’ll have no issues with most games on the OnePlus 3.

The OnePlus 3 is still very much a powerful device and was one of the best of its time when it launched. As such, it does still best other flagship devices that launched around the same time. Even better, the OnePlus 3 boasts a large development community which has sought after squeezing every little bit of performance out of it as possible. This was one of the first devices to get a fully functioning EAS port and has pretty much all of the official ROMs you’d hope for. Development support hasn’t gotten quite off of the ground yet for the OnePlus 6, but it’s only getting started and we are doing our best to ensure that it grows.


We’re going to do things a little bit differently in this section. One side of the photos belong to the OnePlus 6, and the other belongs to the OnePlus 3. For some of the photos, it should be obvious, but that’s not the point. Some of these photos are incredibly close. Which side is which is revealed at the end, so you can scroll through these at your leisure and make up your mind as to which is better. You might be surprised.

Note that we used OxygenOS 5.1.8 for the OnePlus 6 shots. These are not the improved shots from OxygenOS 5.1.9.

Left: OnePlus 6 // Right: OnePlus 3

OnePlus has worked a lot on their cameras since the OnePlus 3. The OnePlus 5‘s slogan was “Dual camera. Clearer photos”. While that did ring true relative to previous devices released by the company, advertising the OnePlus 5 for its camera in particular felt a bit dubious. Having said that, it does show the company’s commitment to providing a great camera experience. While it’s still not up to par with the likes of the Samsung Galaxy S9 and the Huawei P20 Pro, this camera can take some seriously good shots at times. It’s not the best camera on the market, but the potential is there. That’s also not to mention that a Google Camera HDR+ port is in the works, which should improve the experience tenfold. The secondary camera here is used for depth perception and works very well in portrait mode. Slow motion is also a pretty cool feature, but often a gimmick.

As for the OnePlus 3, two years in camera hardware is a long time. What was once a decent shooter… is still a decent shooter. There’s nothing wrong with the photos it produces. Admittedly, we can see a drop off in detail in some of the photos, as images look more washed out and a lot less sharp in comparison. It can certainly still take decent shots worthy of a mid-range device today, so it still fulfils its purpose. It even bests the OnePlus 6 in some photos, particularly the last one. Having said that, it’s more or less no contest in comparison to the dual camera setup of the OnePlus 6. If you’re not hugely into photography though, it’s no big deal. This device will do you fine for basic snaps when you’re out and about. Admittedly some of the shots made it very clear which photos belong to which device. The level of detail in some of the OnePlus 6’s shots gives the game away right away.

As for the OnePlus 6, the only way from here is up. A Google Camera HDR+ port is on the way, and you can already try it out. Some of what it could do on the OnePlus 3 is incredible, and we’re sure it’ll be no different here. It just needs time to get off of the ground.

These photos were taken by Demian Brunt on the OnePlus 3 using the Google Camera HDR+ Port.


Here’s an interesting observation – the speaker and headphone jack output quality are both better on the OnePlus 3 than on the OnePlus 6. The speaker on the OnePlus 6 does get louder, but I genuinely believe the OnePlus 3 has better quality coming out of it. The headphone jack volume output is also no comparison. When I got my OnePlus 6, one of the very first things I did was figure out how to increase the headphone jack’s volume. It’s that quiet.

In terms of recorded audio, however, the OnePlus 6 is miles ahead of the OnePlus 3. Capable of handling loud environments, the OnePlus 6 is in a league of its own in comparison. If you’re buying a phone purely for its audio though, I’d recommend looking elsewhere. The headphone jack quality is mediocre, the speaker isn’t great, and the mic quality still has its fair share of problems. The Honor 9 Lite still has a better microphone than the OnePlus 6. It’s still much improved over the OnePlus 3, of course, but it’s nowhere near the greatest either in the audio department.


Somewhat of an oddity, I feel that the OnePlus 6 has a better range in both Wi-Fi and mobile data. However, it has a tendency to stray towards 3G rather than 4G. I have signal in places I didn’t on the OnePlus 3, but I also find myself on 4G a lot less. It has been problematic for me as I often have to use my phone’s 4G connection at home, which I can’t really get anymore. I’ve tried forcing a 4G connection via the dialer along with constantly cycling the mobile data and it’s gotten me nowhere. It’s very strange.

Of course, it does overall beat the OnePlus 3 in connectivity as you’d expect. Like I said, it has a better range on Wi-Fi and the mobile data is overall better. There’s not a whole lot you could ask for, and I’m hopeful that the 4G issue is more of a software thing. In more population dense areas I didn’t have an issue getting a 4G connection. If you live in a town or city you should be fine with the OnePlus 6. You can check out the connectivity capabilities of both devices below.

OnePlus 6 connectivity and band support

Category Specification
Connectivity Wi-Fi: 2×2 MIMO, 802.11 a/b/g/n/ac, 2.4GHz/5GHz

Bluetooth: Bluetooth 5.0, with Qualcomm aptX & aptX HD support

NFC: Yes

Positioning: GPS, GLONASS, BeiDou, Galileo

LTE Features Supports 4xCA, 64QAM, 256QAM & 4x4MIMO.

Supports up to DL CAT16 (1Gbps)/UL CAT13 (150Mbps) depending on carrier.

LTE Bands – NA/EU FDD LTE: Band 1/2/3/4/5/7/8/12/17/18/19/20/25/26/28/29/30/32/66/71

TDD LTE: Band 34/38/39/40/41

TD-SCDMA: Band 34/39

UMTS(WCDMA): Band 1/2/4/5/8/9/19


GSM: 850/900/1800/1900 MHz

LTE Bands – CN/IN FDD LTE: Band 1/2/3/4/5/7/8/12/17/18/19/20/25/26/28/29/66

TDD LTE: Band 34/38/39/40/41

TD-SCDMA: Band 34/39

UMTS(WCDMA): Band 1/2/4/5/8/9/19


GSM: 850/900/1800/1900 MHz

OnePlus 3 connectivity and band support

Category Specification
Connectivity Wi-Fi: 802.11 a/b/g/n/ac, 2.4GHz/5GHz

Bluetooth: Bluetooth 4.2

NFC: Yes

Positioning: GPS, GLONASS, BeiDou

LTE Features Supports up to DL CAT6
LTE Bands – NA FDD LTE: Band 1/2/4/5/7/12/17/30

TDD LTE: Band 34/38/39/40/41

TD-SCDMA: Band 34/39

UMTS(WCDMA): Band 1/2/4/5/8


GSM: 850, 900, 1800, 1900 MHz

LTE Bands – EU/Asia FDD LTE: Band 1/3/5/7/8/20

TDD LTE: Band 38/40

UMTS(WCDMA): Band 1/2/5/8

GSM: 850, 900, 1800, 1900 MHz

LTE Bands – CN FDD-LTE: Bands 1/3/7

TDD-LTE: Bands 38/39/40/41

UMTS(WCDMA): Bands 1/2/5/8

TD-SCDMA: Bands 34/39


GSM: 850, 900, 1800, 1900 MHz

It’s pretty clear that OnePlus has put a lot more time into ensuring global compatibility of mobile networks on the OnePlus 6. There is a huge number of bands supported, and there are no longer issues based on where your hand may be covering the device. The OnePlus 6 has improved infinitely on the connectivity experience of the OnePlus 3.


There is absolutely no contest here either, as the OnePlus 6 beats the OnePlus 3 hands down in this department. The OnePlus 3 has a 3,000 mAh battery (3,400 mAh if you have a OnePlus 3T) while the OnePlus 6 has a 3,300 mAh battery. That doesn’t sound like such a large increase, but the actual battery improvements come from the more power efficient SoC. The Qualcomm Snapdragon 845 boasts major efficiency improvements over the Qualcomm Snapdragon 835. The 835 also boasted huge improvements over the 820, so it’s pretty clear why the battery life is immensely better. If your battery is dying quickly on the OnePlus 3, the OnePlus 6 is very much a worthy upgrade. The overall efficiency of the processor is where gains are made, and the decreased power requirements also keep thermals low. What pushed me to upgrade in the first place was my OnePlus 3’s terrible battery life. But these are all deductions you can make from looking at a spec sheet – how do they fair in real-world usage?

The OnePlus 6 has been one of the best devices I’ve ever used in terms of battery life. Yesterday, I took it off the charger at 11 am, used it for about 8 hours of SOT and put it back on the charger at 3 am. It had about 6% left, but that’s not the point. My OnePlus 3 would have died about three times at that stage, basically tethering it to a charger. The battery has certainly degraded, but if you’re looking to upgrade then yours probably has too. EX Kernel Manager shows my battery drainage to be about 14-16% an hour, while on the OnePlus 3 it sat around 25%. Here are some battery stats from my OnePlus 6. I used a lot of Snapchat, Instagram, Facebook Messenger, and Reddit. Oh, and I played about half an hour of PUBG too. I also had Always On Display enabled (via magisk), which drains the battery a good bit as well.

This battery life is much improved over the OnePlus 3 for my usage, and I even had a poor signal as well. If you find your battery stats looking worse than this with lighter usage, then maybe you should consider an upgrade. OnePlus 3 devices bought at launch will begin to suffer heavy battery degradation very soon, so I’m sure many owners are starting to notice it. The battery life in the screenshots above aren’t even considered that good either.

Should I upgrade?

Overall, I personally recommend upgrading if you can afford it. While other devices may offer slightly better value for money (looking at Xiaomi), the quality user experience provided by OxygenOS and the openness of OnePlus devices, in general, are what draw me in. Couple that with a beautiful design, good camera, and great processing power, and I feel that you can’t go wrong with updating. Nearly every aspect of the phone has been improved upon majorly.

Another reason why I feel that the OnePlus 6 is a worthy upgrade is that it’s a great all-rounder. You can pick up an Honor View 10 for a similar price, but then you can’t unlock the bootloader. If you wanted to go for something a little more mainstream, the Samsung Galaxy S9 can also be bought for around the same price. There are issues with that too though, such as Knox. Not only that, but international variants use Exynos processors which measurably perform below the Snapdragon 845. The OnePlus 6 is a great all around device. It’s up to you whether you want to upgrade. Is performance adequate for your needs? Does the battery last? If you found any of our criticism of the OnePlus 3 as a flagship in 2018 disagreeable, then maybe you don’t need to upgrade quite yet.

If you’re looking for a 2018 version of the OnePlus flagship from 2016, then look no further than the OnePlus 6.

from xda-developers https://ift.tt/2uEJdZw

Samsung Wireless Charger Duo charges both the Galaxy Note 9 & Galaxy Watch

samsung galaxy note 9

Samsung introduced wireless charging to its smartphones starting with the Samsung Galaxy S6 in 2015. Since then, the company has opted to stick with the feature in its newer phones even though other device makers such as Google have dropped it. Wireless charging still isn’t a widespread feature in Android smartphones, although we are starting to see more and more premium smartphones come with support for the feature. Samsung was the first to promote fast wireless charging starting with the Samsung Galaxy Note 5/Galaxy S6 Edge+. Now, Roland Quandt from WinFuture has leaked the Samsung Wireless Charger Duo, which charges both the upcoming Samsung Galaxy Note 9 as well as the Samsung Galaxy Watch.

The Samsung Wireless Charger Duo can also charge two phones at the same time. The text on the charger’s box states that the charger can handle dual fast wireless charging, meaning that it can charge both the Samsung Galaxy Note 9 and the Samsung Galaxy S9 at fast wireless speeds at the same time, for example. Naturally it is compatible with Qi certified products, which is one of the two common industry standards for wireless charging (the other being PMA).

The charger’s box doesn’t specifically mention anything about charging speeds, but a previous report did state that the Note 9 may have faster wireless charging. The Samsung Wireless Charger Duo will be promoted as an accessory for the Galaxy Note 9.

With respect to pricing, Mobilefun states that the charger will cost £55 in the UK. As of now, this is only an estimate, and it’s likely that the pricing will be confirmed only at the Galaxy Note 9 launch event, which will take place on August 9. We know quite a lot about the Galaxy Note 9 already: it will be powered by the Exynos 9810 for international markets and the Qualcomm Snapdragon 845 for select markets such as the US and China, it will have an improved camera, a new S Pen, and a new layout for the dual camera module and the rear fingerprint sensor. It may be powered by a 4,000mAh battery.

The Samsung Galaxy Watch will launch alongside the Galaxy Note 9 and will be powered by Tizen 4.0. It will be the successor of the Samsung Gear S3, and it will be released next month.

from xda-developers https://ift.tt/2LyIAuo

How A/B Partitions and Seamless Updates Affect Custom Development on XDA

a/b seamless updates

When Android Nougat released, it had us talking about all kinds of new features. We got a newly updated user interface for starters along with long-awaited multiwindow capabilities and Vulkan Graphics API support. But one under-the-hood addition flew over the heads of most users. Android Nougat introduced “Seamless Updates” on devices that support A/B partitions. The vast majority of existing Android devices (excluding the new Google Pixel and Google Pixel XL) did not have A/B partitions at the time and thus couldn’t take advantage of seamless updates. The basic premise of this feature is that the device has a second set of the system, boot, vendor, and other important partitions, and when you get an OTA update the update happens in the background while the second set of partitions are patched which lets you reboot into an updated software build seamlessly. If an update fails, you’ll be kicked back to a working build, meaning companies will have fewer headaches to deal with and consumers are better protected.

Supporting seamless updates is not a requirement for any new Android device, unlike Project Treble. As such, the vast majority of new Android devices don’t support the feature. We’ve been keeping a list of all the supported devices so far, and it’s clear that this feature is not widely supported. That’s a shame because A/B partitions bring a lot of benefits for both regular users and power-users alike. However, the feature has a bit of a bad reputation in the enthusiast community because it’s perceived to make Android development and flashing custom modifications more difficult. This is not actually the case, so we wanted to demystify seamless updates and explain how A/B partitions affect custom development on XDA.

Many thanks to XDA Senior Member npjohnson, a contributor to LineageOS and maintainer of the Motorola Moto Z2 Force, who helped us fact check this article.

Partitions on an Android device

A partition is simply a discrete section on the phone’s internal storage where data is kept. What kind of data is kept on each partition depends on the hardware, operating system, and many other factors. The bootloader will have one, the system (Android OS) will have one, the user data will have one… and so on and so forth. When you see people talk about “/system” and “/cache”, they’re referring to the given names for those partitions. The OnePlus 6, for example, has 72 partitions. That sounds like a lot, but the OnePlus 6 is one of the devices that supports seamless updates which means many of these partitions are simply duplicates of each other.

Partial output of the partitions on the OnePlus 6. Some A/B partitions are underlined for demonstration purposes.

There are a lot of partitions on a device that you will never have to worry about as a user. Many of these partitions are never modified when flashing custom ROMs, kernels, recoveries, or modifications like Magisk or Xposed. A lot of these partitions will either be unused for our purposes or are too dangerous to touch unless you know what you’re doing (XLOADER and OEMINFO on Huawei/Honor devices come to mind.) For the vast majority of Android users, the partitions that we mostly deal with are system, boot, recovery, userdata and more recently vendor and vbmeta. Here’s a brief explanation of the purpose of each partition:

  • system – holds the Android OS, system libraries, system apps, and other system media like bootanimations, stock wallpapers, ringtones, etc.
  • boot – holds the kernel, ramdisk, and on A/B devices also the recovery as well
  • recovery – holds the recovery, where TWRP is most commonly flashed on A-only devices (A/B devices don’t have a dedicated recovery partition)
  • userdata – holds all of your app, system, and internal storage data
  • vendor – holds platform and device-specific HALs, the files necessary for the Android OS to communicate with the underlying hardware
  • vbmeta – the partition for Android Verified Boot 2.0 which verifies the integrity of the boot process

Device OEMs can change their partition schemes to use whatever layout they want. For instance, Huawei splits the boot partition into ramdisk_recovery and kernel. There are also a lot of extra partitions that may contain other system apps such as cust, product, and oem, and while these are safe to modify, it’s generally not recommended if you want to make it easier on yourself to return to stock. So where do A/B partitions play a role?

The A/B Partition Scheme

How updates work on devices with seamless updates

The very simple image I made below illustrates how an update is handled on a device with A/B partition support. The partition that is illustrated is the system partition, though other partitions such as boot and vendor may also be updated with any given OTA update from an OEM. This update process happens with not only major Android version updates but also security patch updates.

  1. We start with two system partitions, system_a and system_b, both on the same version of Android.
  2. Assuming that system_a is active, the OTA update will patch system_b, the inactive partition, in the background.
  3. system_a is set to inactive and system_b then becomes active once the user reboots.
  4. The now-inactive partition, system_a, will be updated when the next OTA update rolls out.

What are the benefits of this update process?

  1. If an update fails, the device will roll back to the working build on the other slot.
  2. Your data is kept perfectly intact, even if the update is borked, as there is only one partition (userdata) which houses your data.
  3. Update streaming: If your data partition is full, then the update can be downloaded and streamed to the inactive slot. It’s a pretty neat feature and means that you don’t have to waste any temporary storage on your updates. That’s why there’s no cache partition on A/B devices as they’re no longer needed.

What impact does the A/B partitioning scheme have on the storage of a device?

Does the fact that seamless updates result in a bunch of duplicated partitions mean you’re losing a bunch of storage space? Not at all. Google says that devices with seamless update support should only be down about a few hundred Megabytes thanks to removing the /cache and /recovery partitions. Removing both balances the cost of adding a second set of partitions. According to Google, the Pixel’s A/B system image is half the size of the A-only system image. Most of the additional storage usage actually comes from the addition of a second vendor partition. That makes sense as the vendor partition houses all of the proprietary binaries used by OEMs (part of Project Treble), so it’s expected to take up quite a bit of space. While Google doesn’t recommend having A/B partitioning on devices with 4GB of storage (as it’s nearly 10% of total available storage), they do recommend it on devices with 8GB and higher.

Here’s a breakdown of the storage space used on a Google Pixel with and without A/B partitions.

Partition Sizes A/B A-only
Bootloader 50MB*2 50MB
Boot 32MB*2 32MB
Recovery 0 32MB
Cache 0 100MB
Radio 70MB*2 70MB
Vendor 300MB*2 300MB
System 2048MB*2 4096MB
Total 5000MB 4680MB

What happened to the recovery partition?

The underlying Linux kernel on Android devices is what lets Android recognize and use the hardware properly on a smartphone. On A-only Android devices, you generally have two versions of the kernel: One is packed inside of the recovery partition while the other is in the boot partition. On A/B devices supporting seamless updates, the recovery is now inside of the boot image along with the kernel. The recovery’s main function was to install updates, but since that’s handled by the system itself (update_engine) while Android is booted up the dedicated recovery partition is no longer needed.

To install a custom recovery on A/B devices, we thus need to modify the boot partition and replace the stock recovery with our own. This is why to install TWRP you need to use a fastboot command to boot a custom boot image first and then flash the TWRP installation script, as fastboot can’t patch partitions—only flash over them entirely. You could technically pre-patch your existing boot image with TWRP and then flash it via fastboot, but that’s more trouble than it’s worth. The TWRP installer script patches both the boot_a and boot_b partitions to install TWRP.

Fun fact: The Android update_engine which handles seamless updates is basically ripped straight from Chrome OS. Only recently were strings containing “Chrome OS” removed from update_engine’s log to avoid confusion for anyone who happens to check logcat.

Does my Android smartphone support A/B partitions for seamless updates?

While we keep a list of all devices that support it, you can also easily check yourself.

How do seamless updates affect custom development?

User Perception of A/B Partitions

Deemed a hindrance to custom software development by many users, seamless updates are actually a boon to developers. The reason that A/B devices are perceived to have poor development support comes down to the price of the first A/B devices. After all, the Google Pixel devices were some of the first to support seamless updates and compared to the Nexus smartphones of yesteryear they were relatively expensive. Furthermore, thanks to the myriad of improvements Google has been making to the Android OS which has made custom ROMs and modifications less popular on Google devices, the Google Pixel smartphones didn’t take off on our forums nearly as well as the Nexus smartphones. A combination of external factors led to a decrease in custom development on the Google Pixel smartphones, though most users chose to blame A/B partition support instead. Compare the availability of custom development on devices like the Google Pixel with devices like the Xiaomi Mi A1 on our forums.

In addition, a lack of understanding of how A/B partitions changed the way users need to install custom ROMs, kernels, recoveries, and modifications led to A/B partition support being unpopular. With the recovery now living inside of the boot image, flashing modifications in the wrong order such as Magisk or Xposed can cause conflicts and can lead to a bootloop. What order you flash these mods in can be important, though in the case of custom ROMs you shouldn’t need to worry about what slot you’re flashing to. Contrary to common belief, the installation script for most custom ROMs does not flash to both slots. You mostly don’t need to worry about that as you shouldn’t need to be swapping slots manually.

How Developers View A/B Partitions

When building a ROM, developers can make use of both partitions to test separate builds. If one doesn’t work, they can just revert back to the working partition and rebuild their ROM. Developers can also test for regressions by simply installing an update, switching the active partition, and comparing the two without having to wipe data. Here’s how the LineageOS team views A/B partition support:

“Many around the Android community have bashed A/B as being ‘hard to support’ and ‘not developer friendly’, when in fact, properly implemented it is easier to support and just as developer friendly.” – jrizzoli, LineageOS Changelog 19

The initial difficulty with A/B support for developers came from modifying their existing tools to support these devices. The developer of Magisk, topjohnwu, added official support for the Google Pixel a year after it was released—not because it was difficult, but rather because it took him a year to actually obtain the device to work on. TWRP support came pretty quickly on A/B devices after the lead developer, Dees_Troy, took a crack at it. LineageOS 15.1 now supports A/B devices after volunteers found time to fix their addon.d script.

How to update an A/B device that has a custom recovery, kernel, or other mods

Custom ROMs

Flashing updates on a device with a custom ROM means that you’ll have to be wary of which slot you’re flashing too, right? Not quite. TWRP will actually handle a lot of that for you, and it defaults to the inactive slot for flashing a custom ROM. If your active slot is A and you flash a custom ROM, you’re actually flashing to slot B. When you reboot, the active slot is now B. Developers can modify the installation script and flash to both slots to make it easier on the end user, although most custom ROM installation scripts currently only flash to a single slot. Lastly, custom ROMs can implement an A/B updater in their ROM so that users don’t even need to mess with manually flashing updates—the latest LineageOS 15.1 includes a Lineage Updater tool, and XDA Senior Member USA-RedDragon made a generic A/B updater that other developers can use.

Stock ROMs

But isn’t it problematic if your device is running the stock ROM with various modifications and you want to install an update without losing all of these mods? It can be if you don’t know the right steps to install an update. On the OnePlus 6, for example, you can’t flash an incremental OTA on your modified device because the incremental OTA will attempt to patch your modified boot image. Thus, you’ll likely end up with a bootloop, and that’s why you have to flash the full ROM update to completely overwrite your modified boot image. Here are the general steps you need to take to install an OxygenOS update on your OnePlus 6 while still retaining TWRP, Magisk, and optionally a custom kernel.

  1. Downloaded the latest full ROM zip
  2. Flash the full ROM zip in recovery
  3. (Optional) Flash custom kernel
  4. Flash TWRP installer
  5. Reboot straight back to recovery
  6. Flash Magisk

On the Google Pixel devices, you can flash the factory image without wiping data, then boot TWRP, install TWRP via the install script, then install Magisk.

Extracting an update to flash individual partition images

Update files for many A/B devices are a little different compared to A-only devices. They’re no longer just a zip file containing lots of images (excluding Google and Razer’s factory images), instead, they’re in the form of a payload.bin file. You can extract this file and flash each part manually, but it requires a special tool to do so. If you’re interested in learning how to do so on the OnePlus 6, Xiaomi Mi A1, and many other A/B devices, read on.

Setting up to extract payload.bin

  1. Make you sure you have Python 3.6 installed.
  2. Download payload_dumper.py and update_metadata_pb2.py here.
  3. Extract your OTA zip and place payload.bin in the same folder as these files.
  4. Open PowerShell, Command Prompt, or Terminal depending on your OS.
  5. Enter the following command: python -m pip install protobuf
  6. When that’s finished, enter this command: python payload_dumper.py payload.bin
  7. This will start to extract the images within the payload.bin file to the current folder you are in.

You can flash each of these images separately now via fastboot if you wish. The next section shows you how to do that.

Using fastboot to flash images on a device that supports seamless updates

There are a number of commands that are exclusive to A/B partition system devices. You can change your active slot and flash to specific slots. If you have a Project Treble-compatible device and want to learn how to flash Generic System Images, you should be familiar with these commands. Take a look at the table below.

Fastboot commands Command
Get current active slot fastboot getvar all | grep “current-slot”

If you’re on a Windows PC, the “grep” command won’t work.

Set other slot as active fastboot set_active other
Set specified slot as active fastboot set_active $


fastboot –set-active=_$slot

where $ is either a or b

Flash image to the specified partition in the current slot fastboot flash partition partition.img
Flash image to the specified partition in the specified slot fastboot flash partition_a partition.img

fastboot flash partition_b partition.img

(Note: On A/B devices, you can either specify a partition in a particular slot to flash to or you can leave out the slot suffix and it’ll flash to the current active slot. For example, you can replace “partition” in the flash command with “system”, “system_a”, or “system_b.”)

On Windows PCs, you can’t use grep, so just remove that part and look for “current-slot”.

A Word on Project Treble and Seamless Updates

A common misconception is that having Project Treble support and A/B partition support are related to one another, but that’s not actually the case. Having one does not imply the other. The Motorola Moto Z2 Force uses an A/B partitioning scheme but doesn’t support Treble. On the other hand, the Honor 9 Lite supports Project Treble, yet is an A-only device.

The Honor 9 Lite supports Project Treble but does not support Seamless Updates

Frequently Asked Questions/Summary

  • What are the benefits of A/B partitioning?
    • A/B partitioning allows you to update your Android smartphone while using it, simply rebooting when you’re ready to boot into the new version. It also acts as protection against bricks—if the update goes wrong you’ll go back to the working install.
  • Does having A/B partitioning hinder development?
    • While it did take developers a bit of time to adapt, the answer is pretty much no. In fact, it can help developers as they can dual boot their custom ROM with the old version and a new testing version to check for regressions.
  • How do A/B partitions affect mods such as custom kernels, Magisk, or Xposed?
    • You have to be careful when installing them, but there are currently no issues. Magisk officially supports devices with seamless updates, and so long as you flash things in the right order you should have no problems. Make sure to flash the custom kernel before flashing your other mods, and you should be good to go.
  • Can I flash two different ROMs on each partition and dual boot?
    • In theory, yes. Problems arise because of the shared data partition though, so it’s not recommended.
  • Does having an A/B partition scheme mean that I have reduced storage?
    • Nope! Google says that devices which support seamless updates only sacrifice a few hundred Megabytes of storage to support it. The benefits outweigh that cost.
  • My device supports A/B partitions, does that mean I can make use of a Project Treble Generic System Image?
    • Not necessarily. Project Treble and A/B support are unrelated. The Motorola Moto Z2 Force doesn’t support Project Treble, yet it supports the A/B partition scheme.
  • My device supports Project Treble, does that mean I have an A/B partition scheme?
    • This is not always the case. The Honor 9 Lite is a prime example as it supports Project Treble yet does not have an A/B partition scheme.
  • Why do I need to boot TWRP with fastboot first and then flash it?
    • This is because of how fastboot works and the fact that the recovery partition no longer exists. Recovery is placed inside of the boot partition, so we have to modify both boot_a and boot_b. You can’t patch a partition in fastboot, only flash over it. You could, in theory, make a prepatched boot image and then flash that instead.
  • Are there any dangers with A/B partitions? How does rollback protection affect things?
    • Google has tried their hardest to make this not an issue, but in the case of the Motorola Moto Z2 Force, there were known cases of a device reactivating the older slot after upgrading to Android Oreo. This meant that rollback protection kicked in, and device owners could only rescue their smartphone with EDL recovery. Google says that rollback protection only kicks in after first boot though, so the slot needs to be fully functioning after an update before you can no longer downgrade.

from xda-developers https://ift.tt/2JF6wa9