FORUMS
Remove All Ads from XDA

[MODULE] Smali Patcher 5.8

4,015 posts
Thanks Meter: 5,138
 
By fOmey, Recognized Developer on 27th September 2017, 08:43 AM
Post Reply Email Thread

Smali Patcher





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.
  • Magisk reboot (Galaxy S10) - Reboot directly back into magisk from powermenu.
  • High volume warning - Disable high volume popup dialog.


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 fusedlocation all the same, meaning you don't need to disable the service.. which means while your not spoofing you still gain the benefit of fusedlocation which is all around more accurate location updates!



REQUIREMENTS ::

INSTRUCTIONS (ADB METHOD/AUTOMATED - RECOMMENDED):
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. Run "SmaliPatcher.exe", First startup will automatically download the latest necessary binary's.
  4. Select your desired patches.
  5. Hit "ADB PATCH" button (yes without browsing for a .jar file).
  6. Authorise USB debugging connection on your phone.. example of popup.
  7. Once the process has completed, magisk module will be generated in the same directory as "SmaliPatcher.exe" named: "[email protected]".
  8. Install the generated magisk module either in recovery mode or from the magisk app.
  9. Enable smali patcher module in magisk.



INSTRUCTIONS (ALTERNATIVE METHOD - FOLLOW ONLY IF ADB METHOD FAILS) ::
  1. Backup device.
  2. Run "SmaliPatcher.exe", First startup will download the latest necessary binary's.
  3. Select your desired patches.
  4. Select your deodexed "services.jar". Easiest way to extract this file is by pulling it from your deodexed rom .ZIP file, you can find it in "/system/framework/".
  5. Hit "Patch JAR".
  6. Once the process has completed, magisk module will be generated in the same directory as "SmaliPatcher.exe".
  7. Install module.




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

Quote:
Originally Posted by shoey63

Adb method works flawlessly on android 8.1 for Sony AOSP roms on X and XZ premium. The trick is to run the program in recovery (with system mounted obviously), to avoid permission issues.
Awesome tool!



UPDATING MODULE INSTRUCTIONS:
Disable/uninstall any active smali patcher modules before generating a new one! If you generate a module with a 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.



CHANGELOG ::

5.8
  • Check if patcher is being ran with administrator privileges, otherwise display a warning.
  • Fixed a possible false positive error during cdex extraction.

5.7
  • Error handling - verify classes.dex is found during cdex extraction.
  • Added few more status updates to assist error checking.

5.6
  • Changed binary download percentage behaviour: avoid users reporting false "stuck on XYZ percent".
  • Updated mock location patch to support android 10/Q.
  • Updated reboot behaviour patch to support android 10/Q.
  • Save/restore selected patches when browsing for a JAR.

5.5
  • Fixed force close during vdex extraction.

5.4
  • Modified secure flag patch - need testing & feedback.
  • Modified java detection to allow more runtime environments.

5.3
  • Suppress false positive "magisk download failed" errors.
  • Verify patched APK's have been generated before creating module.

5.2
  • Modified secure flag patch.
  • Added paypal donation button.

5.1
  • Removed signature verification "class not found" error report, false positive on legacy android versions.

5.0
  • Adapted backend functions to support multi-file patches.
  • Require at least one patch to be enabled before proceeding.
  • Fix download percentage status updates.
  • Popup explorer window to output directory on completion.
  • Modified signature verification patch (android P).
  • When browsing for a JAR only display compatible patches (preparation for multi-file patches, services.jar must be named "services.jar" from this point onward for verification purposes.. otherwise no patches will be displayed).
  • New patch - disable high volume warning popup.. this has annoyed me so much recently! I was only able to test this on android P, if you find the patch does not work on your device please supply a deodexed services.jar so I can investigate further.

4.9
  • Fixed a crash when applying magisk reboot patch to a already patched target.
  • Improved magisk reboot patch, removed the potential to not reboot back into magisk.
  • Redirect output for certain binary functions with working status indicators.
  • Fix mock location patch that I broke in the most stupid way possible.. if you're updating from 4.8, make sure you disable/remove any installed smali patcher magisk modules before updating.

4.8
  • Display command line window until inbuilt patcher status updates are fixed to prevent user confusion.

4.7
  • Secure flag patch update (based off 9.0).
  • Signature verification patch update (based off 9.0).

4.6
  • Dynamically calculate base directory.
  • Modify output loop to ensure all output is displayed.
  • Magisk reboot patch (Galaxy S10 only).

4.5 [UNTESTED - I OWN A S10 WHICH CURRENTLY IS NOT MAGISK COMPATIBLE.. USE AT YOUR OWN RISK]
  • Force unix config formatting.

4.4 [UNTESTED - I OWN A S10 WHICH CURRENTLY IS NOT MAGISK COMPATIBLE.. USE AT YOUR OWN RISK]
  • Magisk "installation failed" fix.. (I shouldn't have been lazy and read all the module documentation.. probably could of avoided this).

4.3 [UNTESTED - I OWN A S10 WHICH CURRENTLY IS NOT MAGISK COMPATIBLE.. USE AT YOUR OWN RISK]
  • Magisk v19.0 compatible (magisk template download failed fix).

4.2 [TESTING]
  • Potential slowdown fix?

4.1
  • Allow the patcher to run without having any patches selected for testing purposes.
  • Force a single classes.dex to be generated when applying signature spoofing patch.. (potential slowdown fix?)
  • Remove irrelevant debug output.

4.0
  • Modified ADB error checking function to fix false error reports.

3.9 ::
  • ADB error checking: verify a single ADB device is connected before proceeding.
  • Added few more status updates to assist error checking.
  • Updated magisk template & URL.

3.8 [TESTING] ::
  • Potential slowdown fix?

3.7 ::
  • Modified java detection.

3.6 ::
  • Added some more error checking.

3.5 ::
  • Verify Java is installed & detected before proceeding.

3.4 ::
  • Amend legacy dummy file to generated magisk module config.sh.

3.3 ::
  • Create dummy file in magisk module (legacy devices).

3.2 ::
  • Fixed a issue calculating file paths on legacy devices.

3.1 ::
  • Added "/system/system" path to dumping functions.
  • Added output filter to avoid user confusion when spitting out harmless errors.

3.0 ::
  • Updated dependencies.
  • Reworked some core functions to attempt to fix unknown caused crash for certain users.

2.9 ::
  • Reworked some functions, made them dynamically detect file names to avoid potential issues.

2.8 ::
  • Verify dexpatcher patches are found, otherwise re-download.
  • Change patch button text to indicate patching mode.
  • Error handling - verify classes.dex is found before recompiling.
  • Error handling - verify services.jar is found before recompiling.
  • Error handling - verify input files are not dummy's.
  • Conditional dead end bug fix while patching multi-class jar's.

2.7 ::
  • Re-added signature spoofing patch.
  • Added dexpatcher as a dependency.

2.6 ::
  • Added support for Android P.
  • Modified binary download function to prevent crashes.

2.5 ::
  • Added support for multi-classes.dex.

2.4 ::
  • Improved binary download function - verify binary size, will attempt to re-download if necessary.
  • Improved binary URL grabber function - should now fetch correct address.

2.3 ::
  • Improved de/odex detection function - should now allow generating a module with no mods selected (debugging purposes)
  • Improved error checking & reports.

2.2 ::
  • Android 8.0-8.1 compatibility.

2.1 ::
  • Corrected missing variables in config.sh for magisk module (lollipop bootloop fix) - full credit to @Eng.Raman

2.0 ::
  • Prevent false "detected api" message.
  • Play's nice with android lollipop - full credit to @Eng.Raman

1.9 ::
  • Potential fix for random crash aka. dumping framework freeze/crash.

1.8 ::
  • Handle "permission denied" error when pulling build.prop.

1.7 ::
  • Improved framework base directory detection.

1.6 ::
  • Framework base directory detection.

1.5 ::
  • Improved error checking - added more debug info which hopefully will make diagnosing bugs a little easier.
  • Proper API detection using rom build.prop.
  • Improved a search function used for locating framework files.

1.4 ::
  • Improved error checking - verify's services.odex size detecting if module already active.
  • Potential fix for "magisk download failed" that certain user's are experiencing.

1.3 (BETA) ::
  • Added in ADB libary which allows us to now pull/push files to the device.
  • Added in smali & baksmali which allows us to now deodex.
  • One click function to pull all the required files from the device, deodex (if necessary), patch and finally generate a magisk module! (I plan to code in a function that pushes the module to the device upon completion in the future - fully automated baby woohoo)
If you would like to use the adb method of patching, make sure you have "USB debugging" enabled in developer options otherwise it simply won't work.. you obviously need to plug in your phone to the PC and authorize the USB connection on your device.

1.2 ::
  • Updated to Magisk v15.
  • Improved error checking & reports.

1.1 ::
  • Removed signature spoofing for the time being - causing bootloop for some users, need to rework the patch when I have time.

1.0 ::
  • Improved patching function: should now be compatible with even more unique service.jar's.
  • Improved patching function: now reports errors for each independent patch, should make diagnosing patch errors a little easier.
  • Fixed some debug code I left from previous release which may have prevented patch process from completing. (whoops.. sorry about that!)

0.9 ::
  • Added new patch: signature spoofing.

0.8 ::
  • Improved patching function.

0.7 ::
  • Merged projects together - Mock locations, secure flag & signature verification.
  • Assembly version used as module version and in generated module zip name.
  • Fixed minor bug when selecting a JAR named something other than "services.jar".

0.6 ::
  • Error handling for failed downloads of magisk module template.
  • Updated to Magisk v14.0.

0.4 / 0.5 ::
  • Potential spaces in file path error fix - unsure as I have been unable to reproduce this issue, so it's been very difficult to fix.

0.3 ::
  • Increased default Java memory heap size - fixes "out of memory" error on lowend PC's.

0.2 ::
  • Simplified patching process.
  • Fixed reboot issue with certain GPS spoofers.
  • Verify's target JAR is deodexed before proceeding with patch.

0.1 ::
  • Initial release


Cheers,

Honorable mention to @Eng.Raman, who has been kind enough to patch service.jar's for tons of users who lack the knowledge to deodex (despite my best efforts of writing out clear instructions!)... the smali patcher user base thanks you for your service!


PRECAUTIONS / TERMS OF USE ::
You must backup your device prior to flashing the module, I am not responsible or providing support to recover any devices stuck in bootloops.. if for what ever reason you find yourself in this situation, simply uninstall magisk and reinstall.. doing this will reset your installed modules.

PLEASE READ FAQ IN POST 2 & SEARCH THE THREAD BEFORE ASKING QUESTIONS, CHANCES ARE THEY HAVE BEEN ANSWERED ALREADY AND YOU CAN FIND YOUR ANSWER IMMEDIATELY.


Rather then making mirrors of the download link, please redirect traffic to this thread to ensure they are always using the latest version! Oh hi reddit.



DOWNLOAD MIRRORS
Attached Files
File Type: zip [email protected] - [Click for QR Code] (848.6 KB, 12210 views)
The Following 225 Users Say Thank You to fOmey For This Useful Post: [ View ]
 
 
27th September 2017, 08:43 AM |#2  
fOmey's Avatar
OP Recognized Developer
Flag Sydney, AUS
Thanks Meter: 5,138
 
Donate to Me
More

FAQ

HELP! I'M STUCK IN A BOOTLOOP, HOW DO I UNINSTALL ::
  1. Boot into TWRP
  2. Advanced -> File Manager
  3. 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.


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


MOCK LOCATION RUBBER BANDS TO REAL LOCATION ::

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.


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.


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


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.


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


!!! 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.


!!! 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 patcher folder (upload this directory to google drive).
The Following 37 Users Say Thank You to fOmey For This Useful Post: [ View ]
27th September 2017, 08:43 AM |#3  
fOmey's Avatar
OP Recognized Developer
Flag Sydney, AUS
Thanks Meter: 5,138
 
Donate to Me
More
Reserved 3
The Following 14 Users Say Thank You to fOmey For This Useful Post: [ View ]
27th September 2017, 10:38 PM |#4  
Member
Thanks Meter: 11
 
More
Thank you very much for your smali patcher. I am using your mock location for a while now. Will it be compatible with Android Oreo?
28th September 2017, 02:02 AM |#5  
fOmey's Avatar
OP Recognized Developer
Flag Sydney, AUS
Thanks Meter: 5,138
 
Donate to Me
More
Quote:
Originally Posted by flyfire04

Thank you very much for your smali patcher. I am using your mock location for a while now. Will it be compatible with Android Oreo?

I have not tried it with a oreo services.jar, test it out let me know how you go.. if you run into issues please upload your deodexed services.jar.
The Following 7 Users Say Thank You to fOmey For This Useful Post: [ View ]
30th September 2017, 02:03 AM |#6  
Senior Member
Flag Los Angeles
Thanks Meter: 131
 
More
Hey, could you make it just a zip that would do all the patches? I don't have a windows machine but I really want the screenshot thing I... Also I can do any testing that you want on the Oreo.
The Following 5 Users Say Thank You to michel sedgh For This Useful Post: [ View ] Gift michel sedgh Ad-Free
30th September 2017, 02:12 AM |#7  
AndresOrue's Avatar
Senior Member
Flag Rosario
Thanks Meter: 536
 
Donate to Me
More
Thank you mate!!!
The Following User Says Thank You to AndresOrue For This Useful Post: [ View ] Gift AndresOrue Ad-Free
GuestK0010
30th September 2017, 03:08 AM |#8  
Guest
Thanks Meter: 0
 
More
Awesome! Thank you!
30th September 2017, 04:01 AM |#9  
TheBuduLord's Avatar
Member
Flag Kota Bharu
Thanks Meter: 58
 
More
Hi devs, sorry for interrupt. I have some problems while patching it here. I choose all three patch and run the patcher, However it suddenly stops and saying jar is not deodexed. When im untick all 3 patch and run the patcher, it runs well until completed. The problems only happens when I choose all or either one of the patches.

Im using samsung note 4 with custom deodexed rom
30th September 2017, 05:07 AM |#10  
Senior Member
Thanks Meter: 39
 
More
Quote:
Originally Posted by TheBuduLord

Hi devs, sorry for interrupt. I have some problems while patching it here. I choose all three patch and run the patcher, However it suddenly stops and saying jar is not deodexed. When im untick all 3 patch and run the patcher, it runs well until completed. The problems only happens when I choose all or either one of the patches.

Im using samsung note 4 with custom deodexed rom

Has anyone tried this on the Google pixel XL? Also when I download it and try to open it it tells me it can not be open ed
30th September 2017, 06:01 AM |#11  
DodoGTA's Avatar
Inactive Recognized Developer
Flag The western part
Thanks Meter: 1,150
 
Donate to Me
More
@fOmey Sir, when Smali Patcher on Linux and Android devices?
The Following 3 Users Say Thank You to DodoGTA For This Useful Post: [ View ] Gift DodoGTA Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes