Android N Testers: Here’s why your Root Apps Keep Failing
You love to live at the bleeding edge, so you hopped on board and installed Google’s new Android N preview builds. If you’re running the software as your daily driver (maybe you like things crashing and burning, who knows?) then you’ve likely noticed many of your favorite apps simply not work at all. You’ve flashed Chainfire’s SuperSU beta for Android N to alleviate some of the misery with better system control, but many root apps also break. Why? And how can they be fixed? According to Chainfire, the reason is because Google is shifting away from toolbox towards toybox (and has been since Android Marshmallow), and has now removed toolbox mount support. If you’ve had problems with root apps in the past, you’ve probably seen the word ‘toolbox’ before. If you haven’t, I’ll let Chainfire explain what it is:
The three boxes on Android are toolbox, busybox, and toybox. These boxes provide implementations for various basic unix commands – similar to those GNU Core Utils provides on various Linux distributions.
toolbox was until recently the standard Android implementation. busybox is pretty much the standard box outside of Android, GPL-licensed, and has been ported to Android by many. toybox is a BSD-licensed alternative to busybox created by a former busybox maintainer. toybox first appeared on Android in M, and is slowly replacing the toolbox implementation for various commands.
These commands are mostly used by root apps, device scripts, and adb shell / terminal emulator users.
As for why you’ve likely run into issues stemming from toolbox or busybox before, per Chainfire:
Many root apps need to execute commands provided by these boxes. While the base command is generally the same, the accepted parameters, exact working, and output, will differ between implementations, and different versions of those implementations.
Basically, since some of your root apps require one specific command that may be found in one box but another app may require another specific command found in another box, many users have had issues getting certain root apps to function properly because their box implementation doesn’t have all the right commands. This causes a headache for developers such as Chainfire who have to deal with users wondering why their app doesn’t work. Most users probably have one implementation of busybox installed, but developers can call toolbox directly rather than hoping your install has the proper commands with the proper parameters necessary for their root application to function. However, this work-around is broken in Android N. Per Chainfire:
Unfortunately, on N Preview, toybox mount has replaced toolbox mount as the default implementation, and even worse, toolbox mount has been removed, so you cannot fall back to it. While toybox mount seems to have gotten rid of its saga of segfaults, it still doesn’t actually work all that well. Not nearly as well as the toolbox implementation it has replaced, at least.
This is why your root apps on Android N are failing. Chainfire has tried to partially fix some of the broken apps that use popular forms of the mount command by applying a fix within SuperSU 2.70, however, not all apps will be fixed. If you’re an end user, there’s nothing you can do about this until the developer of your favorite app pushes an update. If you’re a developer wondering why users on Android N are having issues, you should read Chainfire’s full post to get a sense of how to fix your app.
Have you had any root apps fail while on Android N? Let everyone know in the comments below (and especially try to reach out to the developer)!