• Breaking News

    [Android][timeline][#f39c12]

    Friday, January 5, 2018

    Android Help The Magisk Story

    Android Help The Magisk Story


    The Magisk Story

    Posted: 05 Jan 2018 01:50 PM PST

    The last time I used reddit was posting a PSA in /r/pokemongodev, which is over a year ago. Recently I started to use this site more frequently, and I'd love to chime in and share some stories I personally found interesting. Not sure if anyone would be interested in me and the BTS of Magisk, but I'll share it anyways lol, it also helps me refresh my memory.

    Who Am I?

    I'm a 22-year-old Electrical Engineering student from National Taiwan University. You can find me under the ID topjohnwu everywhere. Behind Magisk there is no corporation, no massive development team, no professional developers, it's just me, a passionate student that happens to know some coding :D. Starting as a noob, then writing scripts, all the way to developing Magisk, I consider myself far from a pro. I'm still learning how to properly write programs in general, learning the way to manage such large scale projects, and learning how Android works as AOSP is still pretty much a mysterious box to me.

    Inspiration

    It all started from Chainfire's Marshmallow Systemless SuperSU (2015.10), at that time I was fascinated and immediately took the boot images and zips apart, becoming one of the first to port it on a non-Nexus device (M8) (2015.11). Root became systemless, but I use Xposed and that modifies system, can I fix that? I tried migrating CF's Systemless scripts for Xposed but in vain: the bind mounts happens too late. I dug into my device's init.rc and official docs to understand how init boots the system, and after tons of newbie effort I finally found out that post-fs-data is the earliest possible boot stage with /data access and happens before Zygote starts (which pretty much means everything). As a noob it took me half a year to make this concept into reality and released Systemless Xposed (2016.6). In my personal opinion it was a pretty significant breakthrough and maybe sparked excitement to many users.

    The Birth of Magisk

    Since the release of Systemless Xposed, I started to get requests from developers to help porting their mods to work systemless-ly. I turned down many devs because the mods requires adding files into the filesystem, which is impossible with only using bind mounts because mounting won't work with a non-existing "target". A workaround did come across my mind (still the very core concept of Magisk), and I shared this idea with Captain_Throwback, the first Magisk user and avid supporter since day one. He encouraged me to actually put this into practice, so I spent my summer vacation in front of my computer hacking up a complicated script to create a so-called "Systemless Interface". Along with a combination of CF's supolicy, phh's sepolicy-inject and bootimgtools for handling SELinux and boot image extraction, Magisk is finally released to the public (2016.8).

    The SafetyNet Battle

    At that time, people were complaining that rooting breaks Android Pay. I briefly looked into the issue and found out that it was actually pretty easy to trick SafetyNet at that time. I introduced an extremely primitive method to bypass the checks and bundled it with Magisk. Since then the everlasting battle between Magisk and SafetyNet has started, and the detection rules and policies gradually became more and more stricter. Additional techniques are required, more hacks are added, and some major redesigns to the whole project has been done along the way. I won't go into the details here or this post will be 3 times longer :p

    Pokemon GO Craze

    I have to thank this game for Magisk's publicity LOL. PoGO added SN checks in one of its updates, and swarms of rooted PoGO players flooded the XDA thread to bypass SafetyNet checks. This was the point when my personal project thrived with a drastically increased user base, and I started to take things seriously. Without this initial boost, I'm not sure how long it'll take for people to recognize my project :)

    The Beef: Controversy

    I asked Chainfire in the very early stages of Magisk for some help with SELinux but rejected because he wouldn't share his "intellectual properties". With no knowledge in SELinux, I decided to cut a corner in the first few releases and used SuperSU's supolicy to patch sepolicy. Due to modifications required in superuser for SafetyNet bypasses and the fact that SuperSU is closed source, there is no way to modify SuperSU and it was incompatible with my SN workarounds. To make things worse and more complicated, CF went on a vacation and I couldn't contact him for adjustments, so this made me turn to the open source phh's su and modified it to work with Magisk. Obviously once CF was back from vacation, he was very upset about me using his work to promote the open source competitor. This of course was 100% my negligent and shows my immatureness. (Chainfire's response (2016.9))

    However, I was actually also pretty pissed by the situation. Chainfire took my post-fs-data discovery and added it into SuperSU without any credit, and created an obvious competitor to Magisk's SN bypass feature, suhide, which relies on running stuffs in the post-fs-data stage. For a well experienced developer like him, my discovery might seem like nothing, but as a newcomer it actually took me months of research to figure it out. Later he also distributed my Systemless Xposed zip without my permission to promote his Xposed SN bypass capability of suhide. Ironically enough my effort ended up taken by the "big guy" for exploitation to attack me. In one of his posts he also publicly express contempt for "that sort of mod", obviously targeting Magisk, as "a few lines of script". Overall, I was wrong in the first place, CF didn't really hold me liable for the violation, and also I didn't really want to stir drama, so this was never publicly addressed until now.

    I'm not sure if there were any misunderstanding between us. I would say this was a pretty unfortunate situation from the beginning, and my immatureness is a huge part to be blamed.

    Integrating Superuser

    Very soon I spent a full month learning SELinux, getting ideas and help from phh, developing and enhancing the open source sepolicy patching tool and finally released the fully open source Magisk v7 with all previous releases removed for copyright reasons. Without knowing the secret within supolicy, I used a different approach to overcome SELinux. Due to the complications of SafetyNet hiding, treating superuser as an extension was not really that viable, so upon entering 2017, I used the whole month of the Chinese New Year Holiday to fully integrate phh's superuser and done many improvements to modernize the implementation. Magisk officially became a complete rooting solution, attracting users for the open source nature and SafetyNet hiding efforts.

    Final Words

    If you managed to stay at this point, thank you for your attention :) The rest of the pieces of Magisk's history could be found in my announcement thread, as I tend to be very chatty in all my release notes (and of course including this post :p)

    2017 was really an incredible year, I learned a lot in development, Magisk was massively and rapidly improved, and also it gained quite an impressive user base which I could never imagine. Pretty funny is that I bet very few people remember the fact that initially Magisk was only for the systemless interface and never meant to stumble upon the whole SafetyNet business, which eventually led it to become a rooting solution.

    I can't be more grateful to Android's open source community as I learned how to do Linux programming from the code of phhusson's superuser and the complete suite of the tools. I am also fortunate to have a group of passionate developers and testers across the globe willing to help me with development and sometimes guide me towards the correct direction. This is why I always keep my work open source, because I believe people should share knowledge to inspire others, just like how I am personally inspired from others to create Magisk.

    Looking forward to the future of Magisk in 2018!

    submitted by /u/topjohnwu
    [link] [comments]

    I miss the notification ticker

    Posted: 05 Jan 2018 09:14 AM PST

    Found an old phone recently and played with it a bit and the ticker was something I realized I forgot I missed. I do like the Heads up notifications but I think android should have kept both. Heads Up for more important notifications like phone calls and ticker for stuff like snapchat notifications. With their improved notification settings in Oreo I would have liked to see it be an option there too.

    submitted by /u/touchingthebutt
    [link] [comments]

    Essential rolling out January security update and fixes for the Spectre and Meltdown security flaws x-post r/essential

    Posted: 05 Jan 2018 03:24 PM PST

    Broken LG Wallet/Pay app hits Play Store, is said to only work on nonexistent G7

    Posted: 05 Jan 2018 04:30 PM PST

    PSA: The Honor 7X available for purchase in the US ($199)

    Posted: 05 Jan 2018 12:46 PM PST

    Liam Spradlin created a blob emoji wallpaper

    Posted: 05 Jan 2018 05:49 PM PST

    Snapdragon 670 Geekbench score leaked

    Posted: 05 Jan 2018 09:13 AM PST

    HTC says sorry for U11 Oreo delay in Europe

    Posted: 05 Jan 2018 05:48 AM PST

    What ever happened to the Android Motto "Better together, Not the Same."?

    Posted: 05 Jan 2018 08:09 AM PST

    October 2014, Google promoted the motto "be together, not the same" which I think is a fantastic phrase that captures the idea of Android. There were many ads playing it and even google partnered with artist to release an album called Monotune.
    Android has the ability to widely customize our devices thru many different methods. What do you guys think of the Motto? Do you think it is still applicable to Android today, as opposed to 3 years ago?

    submitted by /u/Will0w536
    [link] [comments]

    Snapdragon 625 vs Kirin 659: Battle of the mid-range heavyweights

    Posted: 05 Jan 2018 03:32 PM PST

    BRIEF-Qualcomm Comments On Security Research On Industry-Wide Processor Vulnerabilities

    Posted: 05 Jan 2018 03:21 PM PST

    Note: Nokia 6 (2018) actually has USB type-C. Still comes out with Android 7.1.1 out of the box though :(

    Posted: 05 Jan 2018 01:24 AM PST

    The "Official" post is kind of misleading people with some specs

    https://www.nokia.com/zh_int/phones/nokia-6 if you want to see the real "official" specs

    Here's the specs part from google translate:

    specification packing list

    Nokia 6 second generation

    USB-Type C charger

    Charging / data cable

    quick guide

    SIM card slot design

    Color black, silver

    Dimensions (without camera bumps) 148.8 x 75.8 x 8.15mm

    Size (with camera raised) 148.8 x 75.8 x 8.6mm Internet connection

    Data Services LTE Cat. 4, 150Mbps DL / 50Mbps UL

    WiFi 802.11 a / b / g / n

    Bluetooth 5.0

    GPS / AGPS + GLONASS + BDS + FM / RDS performance

    Operating System Version Android ™ 7.1.1 Nougat

    Run memory 4 GB LPDDR 4

    CPU Qualcomm Snapdragon 630, octa-core, 2.2GHz RAM

    Internal Memory 32/64 GB1 eMMC 5.1

    Maximum storage expansion capacity of 128 GB2 Audio

    Headphone jack type 3.5mm

    Speaker Smart single speaker

    Two microphones that support Nokia Space Audio screen

    Size and type 5.5 inch IPS LCD Full HD display

    Resolution 1920 x 1080, 16: 9

    The third generation Corning gorilla glass material camera

    Rear camera 16 million phase detection autofocus, 1.0um pixels, f2 aperture, dual LED flash

    8 megapixel front camera fixed focal length, 1.12 pixels, f2 aperture, 84 ° wide-angle Connection and sensor

    Data line type Type-C

    Sensor light environment sensor, proximity sensor, acceleration sensor, electronic compass, gyroscope, fingerprint sensor, Hall sensor Battery Life

    Battery type 3000 mAh 3

    submitted by /u/Zangetszu
    [link] [comments]

    [PSA] Phones that exclusively use Cortex-A7/A35/A53/A55 are **NOT** vulnerable to Meltdown and Spectre

    Posted: 04 Jan 2018 10:24 PM PST

    Samsung Galaxy Note 8 vs LG V30 Slow Motion Camera Test! 240fps

    Posted: 05 Jan 2018 08:28 AM PST

    How Google Home and the Google Assistant helped you get more done in 2017

    Posted: 05 Jan 2018 09:49 AM PST

    Xiaomi Mi Mix 2 vs. Mi Note 3 vs. Mi6 [Damir Franc]

    Posted: 05 Jan 2018 06:10 AM PST

    What Android Device (S) are you excited about for 2018? Why?

    Posted: 04 Jan 2018 11:04 PM PST

    Looking to see who else is excited for what Android devices are lined up for 2018. Who do you think is going to be the winner this year.

    submitted by /u/vancitymb
    [link] [comments]

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel