FORUMS
Remove All Ads from XDA

[MODULE] Smali Patcher 2.4

3,645 posts
Thanks Meter: 4,620
 
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.


GPS SPOOFERS / FUSEDLOCATION / RUBBERBANDING NOTICE ::
FusedLocation API GPS spoofers are NOT compatible with the mock location patch.. you have to be using a traditional GPS spoofer!

In saying that location updates from a traditional GPS spoofer should be fed into fusedlocation API.. in the rare case that your location is rubber banding between two points refer to the FAQ in post 2 of this thread. If the rubber banding persists after following the solutions in the FAQ flash the "FusedLocationPatch.zip" attached to this post.

The "FusedLocationPatch" forces the fusedlocation API to use the GPS location - removing the opportunity of any rubber banding to occur, I have not been able to test as I don't have any rubber banding issues but I'm confident it should work.


BACKGROUND ::
Last night I thought I would hop on Pokemon GO for the first time in a good few months to check out the new changes, was instantly reminded how keen you have to be to play this game being forced to run around in the streets and what not. So naturally I wanted to mock my location so I could be a lazy ass and play while sitting on the couch.

After some quick poking around, I have indeed been able to get mock mock locations working.. however I have modified a file in the framework directory to do so, so device compatibility could be limited. I own a Galaxy S6 running nougat and it works fine for me.. I cant say the same for you tho !

So I had the idea of creating this patcher, Here is what it does:
  1. Decompiles JAR file.
  2. Patch the nessisary files.
  3. Recompile JAR file.
  4. Download's the latest magisk module template from github.
  5. Generate a magisk module .zip for you to flash in recovery !

What does this all mean ? Well we are patching files natively found on your device.. Meaning there shouldn't be a single device which is not compatible with the module, because the module is being tailored specifically for your device using the patcher !


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.


REQUIREMENTS ::

INSTRUCTIONS (ADB METHOD/AUTOMATED - RECOMMENDED!):
  1. Backup device.
  2. Enable USB debugging in developer settings on your device and connect via USB to your PC.
  3. Authorize USB debugging connection on your device.
  4. Run "SmaliPatcher.exe", First startup will download the latest necessary binary's.
  5. Select your desired patches.
  6. Hit "Patch JAR".. yes without browsing for a .jar file.. this will enter "adb mode".
  7. Once the process has completed, magisk module will be generated in the same directory as "SmaliPatcher.exe".
  8. Install module.

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!



INSTRUCTIONS (ALTERNATIVE METHOD) ::
  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.


CHANGELOG ::

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 the 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!
Attached Files
File Type: apk [email protected] - [Click for QR Code] (5.91 MB, 37144 views)
File Type: zip [email protected] - [Click for QR Code] (674.7 KB, 21730 views)
File Type: zip FusedLocationPatchModule-0.0.0.1-fOmey_XDA.zip - [Click for QR Code] (12.2 KB, 5728 views)
The Following 101 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: 4,620
 
Donate to Me
More

FAQ


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 ::
  • Set device only in location method settings (Settings -> Location -> Location method).
  • Disable improve location accuracy settings (Settings -> Location -> Improve accuracy).
  • If you plan to play Pokemon GO also disable Google location history (Settings -> Location -> Google location history).


INVALID OR CORRUPT JAR FILE BIN ::
  • Delete the "bin" directory and restart the patcher to re-download the binary files.


HOW DO I CLEAR MOCK LOCATION WHILE USING YOUR GPS SPOOFER ::
  • Exit the app by pressing the "back" key, this will trigger a clean up which will remove any mock locations.
The Following 11 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: 4,620
 
Donate to Me
More
Reserved 3
The Following 8 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: 4,620
 
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 5 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: 129
 
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 3 Users Say Thank You to michel sedgh For This Useful Post: [ View ] Gift michel sedgh 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: 54
 
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
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