1. 07 Mar, 2019 3 commits
  2. 06 Mar, 2019 8 commits
    • topjohnwu's avatar
      Make zygote notifier more reliable · 82c864d5
      topjohnwu authored
      82c864d5
    • topjohnwu's avatar
      Make db settings constructor more readable · 6226f875
      topjohnwu authored
      6226f875
    • topjohnwu's avatar
      Modernize database code (again) · 370015a8
      topjohnwu authored
      370015a8
    • topjohnwu's avatar
      Add MicroG DroidGuardHelper as target · 6597b7ad
      topjohnwu authored
      MicroG uses a different package to handle DroidGuard service (SafetyNet),
      but still uses the same com.google.android.gms.unstable process name.
      Thanks to the changes in 4e53ebfe, we can target both official GMS
      and MicroG SafetyNet services at the same time.
      6597b7ad
    • topjohnwu's avatar
      Use both package name and process name as key · 4e53ebfe
      topjohnwu authored
      Different packages could potentially use the same process name,
      and they shouldn't conflict with each other.
      4e53ebfe
    • topjohnwu's avatar
      Make parse prop file a util function · 04ef1e64
      topjohnwu authored
      04ef1e64
    • topjohnwu's avatar
      Switch to Zygote ptrace-ing · b278d07b
      topjohnwu authored
      No matter if we use the old, buggy, error prone am_proc_start monitoring,
      or the new APK inotify method, both methods rely on MagiskHide 'reacting'
      fast enough to hijack the process before any detection has been done.
      
      However, this is not reliable and practical. There are apps that utilize
      native libraries to start detects and register SIGCONT signal handlers
      to mitigate all existing MagiskHide process monitoring mechanism. So
      our only solution is to hijack an app BEFORE it is started.
      
      All Android apps' process is forked from zygote, so it is easily the
      target to be monitored. All forks will be notified, and subsequent
      thread spawning (Android apps are heaviliy multithreaded) from children
      are also closely monitored to find the earliest possible point to
      identify what the process will eventually be (before am_proc_bound).
      
      ptrace is extremely complicated and very difficult to get right. The
      current code is heaviliy tested on a stock Android 9.0 Pixel system,
      so in theory it should work fine on most devices, but more tests and
      potentially fixes are expected to follow this commit.
      b278d07b
    • topjohnwu's avatar
      Add zygote server notifier · 6c389607
      topjohnwu authored
      6c389607
  3. 05 Mar, 2019 1 commit
  4. 03 Mar, 2019 2 commits
  5. 02 Mar, 2019 4 commits
  6. 01 Mar, 2019 4 commits
    • topjohnwu's avatar
      Limit process name match to cmdline only · b51feffe
      topjohnwu authored
      We are only interested in Zygote forked processed
      b51feffe
    • topjohnwu's avatar
      Application Component Granularity MagiskHide · b1afd554
      topjohnwu authored
      Before switching to the new MagiskHide implementation (APK inotify),
      logcat parsing provides us lots of information to target a process.
      We were targeting components so that apps with multi-processes
      can still be hidden properly.
      
      After switching to the new implementation, our granularity is limited
      to the UID of the process. This is especially dangerous since Android
      allow apps signed with the same signature to share UIDs, and many system
      apps utilize this for elevated permissions for some services.
      
      This commit introduces process name matching. We could not blanketly
      target an UID, so the workaround is to verify its process name before
      unmounting.
      
      The tricky thing is that any app developer is allowed to name the
      process of its component to whatever they want; there is no 'one
      rule to catch them all' to target a specific package. As a result,
      Magisk Manager is updated to scan through all components of all apps,
      and show different processes of the same app, each as a separate
      hide target in the list.
      
      The hide target database also has to be updated accordingly.
      Each hide target is now a <package name, process name> pair. The
      magiskhide CLI and Magisk Manager is updated to support this new
      target format.
      b1afd554
    • topjohnwu's avatar
      Upgrade dependencies · 885e3c57
      topjohnwu authored
      885e3c57
    • topjohnwu's avatar
      Only load config prop when needed · 05dd5f33
      topjohnwu authored
      Close #922
      05dd5f33
  7. 28 Feb, 2019 2 commits
  8. 27 Feb, 2019 5 commits
  9. 26 Feb, 2019 8 commits
  10. 25 Feb, 2019 3 commits
    • topjohnwu's avatar
      Introduce /data mirror · 8032bd0b
      topjohnwu authored
      Since we switched to imageless Magisk, module files are directly
      stored in /data. However, /data is mounted with nosuid, which also
      prevents SELinux typetransition to work (auto transition from one
      domain to another when executing files with specific context).
      This could cause serious issues when we are replacing system critical
      components (e.g. app_process for Xposed), because most of them
      are daemons that run in special process domains.
      
      This commit introduced /data mirror. Using similar mirroring technique
      we used for system and vendor, we mount another mirror that mounts
      /data without nosuid flag. All module files are then mounted from this
      mirror mountpoint instead of directly from /data.
      
      Close #1080
      8032bd0b
    • topjohnwu's avatar
      Always clone attribute from existing files to module files · 0c227f29
      topjohnwu authored
      This makes sure no weird permission/SELinux issues shall happen
      0c227f29
    • topjohnwu's avatar
      Some code adjustments · c9fa8118
      topjohnwu authored
      c9fa8118