SMALI PATCHER [MAGISK MODULE]

xda/fOmey

SMALI PATCHER

Smali patcher is an application that pulls the android framework from your device, applies what is considered useful patches to the sourced files and then finally generates a magisk module applying the patches system-lessly.

The unique thing about Smali Patcher is it sources the framework files from your device, in an attempt to provide maximum compatibility across the entire android device family. The project has evolved over time, originating from very humble roots.

PATCHES:

  • Mock locations – Hide mock locations status, allowing apps like Pokemon GO to treat them as genuine location updates.
  • Secure flag – Allow screenshots/screensharing in secure apps.
  • Signature verification – Disable signature verification allowing modification/execution of signed system apps.
  • Signature spoofing – Enable signature spoofing app permission.
  • Recovery reboot – Reboot directly back into recovery from the power menu.
  • Samsung Knox – Bypass Samsung Knox trip protection, only confirmed working for secure folder.
  • High volume warning – Disable high volume popup dialog.

NOTES:

  • CERTAIN PATCHES WILL NOT WORK WITH ANDROID 10, ANDROID 10 SUPPORT IS CONSIDERED ALPHA.
  • YOU ARE REQUIRED TO HAVE A DEVICE CONNECTED TO YOUR PC IF YOU USE THIS METHOD.. THE PATCHER WILL NOT PROGRESS OTHERWISE.
  • An ADB DEVICE IS REQUIRED TO EXTRACT CDEX FILES.. IF YOU’RE PARANOID/ SAVY ENOUGH, YOU CAN USE A ANDROID EMULATOR.

GPS SPOOFERS / FUSEDLOCATION / RUBBERBANDING NOTICE:

FusedLocation API GPS spoofers are NOT compatible with the mock location patch.. your required to use a traditional GPS spoofer! Spoofed location updates will be fed into fused location, all the same, meaning you don’t need to disable the service.. which means while your not spoofing you still gain the benefit of fused location which is all around more accurate location updates!

PRECAUTIONS/ TERMS OF USE:

You must back up your device prior to flashing the module, we are responsible or providing support to recover any devices stuck in bootloops.. if for whatever reason you find yourself in this situation, simply uninstall magisk and reinstall.. doing this will reset your installed modules.

REQUIREMENTS:

  • PC with at least 3GB+ of RAM.
  • .NET Framework 4.7.1 or later installed.
  • Java installed.
  • Android device running 6.0 or above.
  • Stable Internet connection.

ADB METHOD/ AUTOMATED – RECOMMENDED!

SMALI PATCHER COMPATIBLE WITH BOTH ODEX & DEODEXED ROMS! WILL AUTOMATICALLY DEODEX REQUIRED FILES IF NECESSARY.

  1. Backup device.. safety first kids.
  2. Enable USB debugging in developer settings on your device and connect via USB to your PC.
  3. Authorise USB debugging connection on your phone.. example of popup.
  4. Run “SmaliPatcher.exe”, First startup will automatically download the latest necessary binary’s.
  5. Select your desired patches.
  6. Hit “ADB PATCH” button (yes without browsing for a .jar file).
  7. Once the process has completed, SMALI PATCHER magisk module will be generated in the same directory as “SmaliPatcher.exe” named: “SmaliPatcherModule-X.X.X.X-fOmey@XDA.zip”.
  8. Install the generated magisk module either in recovery mode or from the magisk app.
  9. Enable smali patcher module in magisk manager app.

ALTERNATIVE METHOD - FOLLOW ONLY IF ADB METHOD FAILS!

  1. Backup device.
  2. Enable USB debugging in developer settings on your device and connect via USB to your PC.
  3. Authorise USB debugging connection on your phone.. example of the popup.
  4. Run “SmaliPatcher.exe”, First startup will download the latest necessary binary’s.
  5. Browse to your “/system/framework” directory. The easiest way to obtain these files is from your ROM img/zip.
  6. Select your desired patches.
  7. Hit the “PATCH” button.
  8. Once the process has completed, magisk module will be generated in the same directory as “SmaliPatcher.exe”.
  9. Install the generated magisk module either in recovery mode or from the magisk app.
  10. Enable smali patcher module in magisk.

UPDATING MODULE INSTRUCTIONS

Disable/uninstall any active smali patcher modules before generating a new one! If you generate a module with an older version active there’s a chance the outdated patches will carry over to the new module. I do my best efforts to prevent this, but it may still happen. Before reporting issues, make sure you have tried this.

FREQUENTLY ASKED QUESTIONS:

BEFORE REPORTING ANY ISSUES:
  • You have tried running the patcher as administrator.
  • You have accepted the USB debugging connection & ticked “Always allow from this computer”.
  • You have tried running the smali patcher with phone booted in recovery mode with /system mounted.

    1. HELP! I’M STUCK IN A BOOTLOOP, HOW DO I UNINSTALL:
      • Boot into TWRP
      • Advanced -> File Manager
      • Navigate to: data -> adb -> modules -> select the module directory (in this case “fomey.smalipatcher”) -> Folder icon (bottom right of screen) -> Delete
      • Alternatively, you can just uninstall/reinstall magisk to clear all your modules.

    2. MAGISK TEMPLATE DOWNLOAD FAILED:
      • Run the patcher as an administrator, may not have read/write access to drive.
      • Verify you have an active internet connection.
      • Verify the firewall is not blocking the patcher.
      • Verify your not running an outdated .NET framework.

    3. MOCK LOCATION RUBBER BANDS TO REAL LOCATION:
      • Set device only in location method settings (Settings -> Location -> Location method).
      • Disable improve location accuracy settings (Settings -> Location -> Improve accuracy).
      • If you are still experiencing rubber banding after trying everything above, try a different spoofer.

    4. INVALID OR CORRUPT JAR FILE BIN:
      • Delete the “bin” directory and restart the patcher to re-download the binary files.
      • Corruption is caused by a unreliable internet connection.

    5. HOW DO I CLEAR A MOCK LOCATION WHILE USING A GPS SPOOFER:
      • Exit the app by pressing the “back” key, you may have to press this a few times. Any good spoofer should clean up after itself, by removing any mock providers on exit.

    6. MAGISK TEMPLATE FAILED TO DOWNLOAD:
      • Make sure you’re using the LATEST release of the patcher.
      • If you are using the latest version already.. an update will be available shortly to fix this issue.

    7. UNSUPPORTED MAJOR.MINOR VERSION XX.X:
      • Use the Java Uninstall Tool to clean up out-of-date java versions and reinstall the latest java release.

    8. W: COULD NOT FIND RESOURCES:
      • This is a harmless warning, you can safely ignore it.

    9. !!! ERROR: BASE DIRECTORY NOT FOUND:
      • You did not accept the USB debugging permission popup on your phone.. the patcher can’t do anything without this permission (example of popup).
      • The permission popup should be displayed after hitting the “ADB PATCH” button.. or as soon as you connect your phone to your PC.
      • If you can’t see the permission popup: go to settings -> developer options -> revoke usb debugging authorisations.. disconnect and reconnect your phone and try again.
      • Make sure you tick “always allow from this computer”.. otherwise you may have to confirm the popup multiple times during a single patch.

    10. !!! ERROR: XYZ CLASS NOT FOUND:
      • If you are browsing for a services.jar – it’s most likely not deodexed.. try the “ADB METHOD”.
      • If you are using the “ADB METHOD” and you receive this error, post a reply to this thread including as much information as you can. Useful information: android version, patcher log and the directory named “adb” in the smali patcher folder (upload this directory to google drive).

    OFFICIAL XDA THREAD: Smali Patcher