jerdog · Nov 7, 2012 at 08:30 am

Chainfire Drops Some Superuser Knowledge

When you say “superuser” some might make the mental jump to an image of Superman flying around with a computer strapped to his back and a keyboard in hand to ward off the hacking attempts of mere mortals; others might jump to an image of Wonder Dog helping Wendy and Marvin fight the super villains; and still others will wonder if you’re referring to the latest culinary creation down at the corner of 8th & Sixth in NYC. Regardless, it evokes imagery that requires context to decipher what it is you’re discussing.

In the context of Android, Superuser has become synonymous with the Superuser app created by XDA Recognized Developer ChainsDD that grants you (and applications) root privileges by allowing you to accept the request or not. His app and process for obtaining root were the only options on the block for a long time, until XDA Elite Recognized Developer Chainfire sought a different solution to requesting and granting root privilege requests. The result of that endeavor was SuperSU, which has increasingly become a mainstay and is being included in more and more new custom ROM development these days.

Back in July Chainfire started a discussion on Google+ about his investigations on how developers were using root privileges, and had this to say about what he had begun to find:

Since I started writing SuperSU, I have investigated and reverse engineered a large number of apps that had problems with SuperSU, Superuser, or both. Aside from a few bugs in SuperSU (yes, they do happen), by far most problems were one of these two:

(1) Improper code calling “su”. I’ve seen a lot of weird Java code to execute commands as root – some you would not believe!
(2) Calling “su” from the main UI thread. “su” can be a blocking call. There is no excuse to run it from your main thread. EVER.

Even though #1 is not insignificant, #2 here is by far the most likely reason of crashes of a rooted app !

He then promised that he would have more to share after his holiday, and the Big Android BBQ is where he first teased us with his findings. He presented information about the correct (and incorrect) ways for an application to request root privileges and then promised that he would release his full article along with sample code. Now, he has. You can visit the original thread for more information or read the article on his website.


_________
Want something on the XDA Portal? Send us a tip!

jerdog

jerdog is an editor on XDA-Developers, the largest community for Android users. Jeremy has been an XDA member since 2007, and has been involved in technology in one way or another, dating back to when he was 8 years old and was given his first PC in 1984 - which promptly got formatted. It was a match made in the stars, and he never looked back. He has owned, to date, over 60 mobile devices over the last 15 years and mobile technology just clicks with him. In addition to being a News Editor and OEM Relations Manager, he is a Senior Moderator and member of the Developer and Moderator Committees at XDA. View jerdog's posts and articles here.
Brian Young · Aug 2, 2015 at 09:05 pm · 1 comment

Galaxy S6 & Edge get €100 Price Cut—New Models Incoming

Samsung has dropped the price of both the Galaxy S6 and S6 Edge by €100, making the current retail price of these phones €599 and €699, respectively. Though no new prices have been announced stateside, a cut is expected soon. (more…)

XDA NEWS
Mario Tomás Serrafero · Aug 2, 2015 at 11:33 am · 1 comment

Sunday Debate: How Can We Get a No-Compromise Phone?

Join us in a fun Sunday Debate on Compromises. Come with your opinions and feel free to read some of our thoughts, then pick your side or play devil’s advocate to get your voice heard and engage in friendly discussion. You can read our food-for-thought or jump straight into the fray below!     Getting an upgrade is a big deal to us power users: it’s our little Android Christmas, where after a long time (for plenty of us, at least)...

XDA NEWS
Mario Tomás Serrafero · Aug 1, 2015 at 03:54 pm · 2 comments

PSA: You Can Optimize Your Note 4’s Recents Menu & RAM

The Note 4 never had the fastest Recents Menu, and despite its 3GB of RAM, its app-holding capabilities only got worse on Lollipop. The infamous RAM bug that plagued the S6 is indeed an annoyance on the Note 4's 5.0.X ROMs. Rumors of an update to fix all of this were confirmed with the first reports of the 5.1.1 update for the Russian Note 4, which seemingly improved the Recents Menu and RAM management. But it'll be a long time...

XDA NEWS