Get all your news in one place.
100’s of premium titles.
One app.
Start reading
Android Central
Android Central
Technology
Mishaal Rahman

Google should bring Samsung’s Maintenance Mode to Pixel phones

Maintenance Mode on a Samsung Galaxy Tab S8 Ultra

It’ll happen to all of us eventually, no matter how careful you are. Maybe you drop your phone and its screen cracks, you accidentally spill a drink on it and it won’t charge anymore, or maybe you didn’t do anything to directly cause the hardware defect and you’re just unlucky. Whatever the case, you’ll need to get your phone fixed, which you can either do yourself or through a repair center.

Most people in this situation would take their phone to their nearest authorized repair center or mail it in if there isn’t a repair location nearby, but on top of temporarily losing access to their phone, they would also have to deal with the inconvenience of backing up their data and factory resetting their device before sending it off. That’s unless they’re comfortable with a total stranger having access to all their personal data, which describes absolutely nobody.

To save their users from having to reset their devices, Samsung announced a feature last year called Maintenance Mode that protects the user’s private data while their device is being repaired. While the device is in Maintenance Mode, the people repairing it only have access to preinstalled apps. Any changes that are made while the device is in Maintenance Mode are lost when it’s turned off, which can only be done by the user unlocking their device. That way, the user just needs to put their device into Maintenance Mode before handing it off, the repair center can do whatever they need to do while it’s in their hands, and the user can just exit Maintenance Mode when they get their device back. It’s a win-win for everyone.

 Maintenance Mode in One UI 5. (Image credit: Samsung)

Unfortunately, not every phone has access to a feature like Maintenance Mode on Samsung devices. Google’s Pixel phones, for example, don’t have such a feature, which is why Google tells its customers to factory reset their devices before sending them in for repair. Google has done a great job at making their devices more repairable, but most folks won’t have the know-how to fix a phone like the Pixel Fold. The launch of the Pixel Fold will truly test Google’s after-sales support services, which is why I think Google needs to make the repair experience as painless as possible for users. 

To start with, Google should copy Samsung’s Maintenance Mode feature so Pixel users can have peace of mind about the safety of their personal data during the repair process. Fortunately, Android already provides an excellent tool that the Pixel team can leverage if they wanted to make such a feature. Here’s what they’d need to do.

How Google could bring Maintenance Mode to Pixel 

You might be thinking, “Can’t Google just use Guest Mode or add another user?” If you were, you’d be partially correct. While it’s true that a secondary user can’t access data from the primary user without their PIN/password, the secondary user will still need the primary user’s PIN/password in order to access the device after booting it up. That means the device would need to be powered on when it’s sent for repair, and the people working on the device wouldn’t be able to power off the device at any time while working on it.

 Android requires the primary user to enter their PIN/password after booting up. Other users are inaccessible until they do so. (Image credit: Mishaal Rahman)

I don’t know the exact reason why Android requires the primary user to enter their PIN/password before any other user can log in, but it may be due to the fact that the primary user is also the “system” user which is “always running even when other users are in the foreground.” If Android requires the “system” user to always be running, then it makes sense that it has to be unlocked before any others can start. 

Whatever the reason, this behavior seems to be intentional, as it happens not only on Pixel phones but also on Samsung and other OEM devices. That’s why I think Samsung’s Maintenance Mode isn’t just simply creating a guest user as some think, as I noticed while testing it myself that it involves rebooting the device to activate. I’m not exactly sure how Samsung implemented Maintenance Mode, but I do know that Google and other OEMs can replicate it by leveraging Android’s Dynamic System Updates (DSU) feature.

Google introduced DSU in Android 10 to make it easier to test Generic System Images (GSIs). GSIs are vanilla builds of Android compiled straight from the Android Open Source Project (AOSP). They’re mainly used by OEMs for compatibility testing, but they can also be used by developers to test their apps on a clean build of Android running on physical hardware. The benefit of using DSU to install a GSI versus just flashing the GSI manually is that DSU doesn’t overwrite the original installation. Instead, DSU creates new system and data images that Android mounts instead of the originals.

 “DSU Loader” in Developer Options leverages DSU to boot a Google-provided GSI. (Image credit: Mishaal Rahman)

DSU was designed to use any system image it’s given, and the device would boot that image so long as it passes verified boot (or the bootloader is unlocked). It makes sense that DSU requires a system image to be supplied since it’s designed to test GSIs and GSIs aren’t shipped on retail devices. But what if DSU let you skip supplying a system image and instead used the existing system partition plus a new data image? That would effectively simulate a factory reset but without actually deleting any of the user’s data, which is exactly what we’d want to happen when entering the Pixel’s hypothetical Maintenance Mode. 

While the Pixel’s Maintenance Mode is purely a hypothetical idea at the moment, using DSU to simulate a factory reset is not. This is a capability that DSU will introduce in Android 14 alongside other improvements, like the ability to reboot immediately after installation, the ability to persist the install across reboots, the ability to hide the default notification so a custom one can be shown, the ability to change the strings used for the dialog that prompts the user for their credentials, and the ability to lock the device into DSU mode.

Combined, these improvements should make it possible for Google (and any other OEM) to replicate Samsung’s Maintenance Mode. To demonstrate, I made a quick video that shows me tapping a button called “Maintenance Mode” on my Pixel which triggers DSU to simulate a factory reset. The main thing that’s missing from this demo is an app that explains to the user what Maintenance Mode is, provides a button to enter it, and swaps the DSU-provided notification with a custom one telling the user they’re in Maintenance Mode. In addition, there’s currently no way to exit this pseudo Maintenance Mode by entering the primary user’s credentials.

You may have also noticed (or just read the video’s description) that I cut out some parts of the video. To be specific, I cut out a few seconds where my device shows the orange/bootloader unlocked state during the boot process, as an unlocked bootloader should not be necessary for this to work. I also cut out the part where I went through the Setup Wizard after my device booted up, and that’s because it’s actually possible to skip the Setup Wizard by setting the system property ro.setupwizard.mode to “DISABLED”. This could be done by creating an init script — a script that runs during startup — which sets this property when Android enters “Maintenance Mode.” 

As for how Android would know it’s in Maintenance Mode, that could be done by setting another system property called “ro.gsid.dsu_slot” to something like “maintenancemode”. Appending “.lock” to “maintenancemode” would make it so “only authorized users” can exit provided, again, that the primary user’s credentials are passed along.

If Google or any other OEM were to copy Samsung’s Maintenance Mode, that’s how I could see it happening. Samsung’s implementation could already be using a forked version of DSU that does everything I described, but I don’t know how theirs works under-the-hood. I also don’t know if Google is or isn’t already working on this feature, because there’s no direct evidence that suggests they are. I have my suspicions, but without solid evidence, we’ll just have to wait to find out what Google’s planning. Maintenance Mode would be a great feature for Google to announce alongside the Pixel 8 series later this year, so I hope the company has some surprises in store for us.

Sign up to read this article
Read news from 100’s of titles, curated specifically for you.
Already a member? Sign in here
Related Stories
Top stories on inkl right now
One subscription that gives you access to news from hundreds of sites
Already a member? Sign in here
Our Picks
Fourteen days free
Download the app
One app. One membership.
100+ trusted global sources.