yashsingh1/xdaforums huggingface dataset:
[Magisk] theredbaron1834:
No worries. Big linux user myself, but luckily I have a win key, so always keep an install for just this type of thing. :)

And yeah, its in the play store. It has a setting to spoof wifi networks too, so high accuracy works. https://play.google.com/store/apps/details?id=com.marlon.floating.fake.location
[Magisk] Eng.Raman:
[MENTION=2684645]soraxd[/MENTION]

Deodexing the services.jar for your T-713 LineageOS 15.1 based rom ( Oreo 8.1 based system ) was done via Vdex Extractor ( using only the 3 files needed by the utility ).

The smali patcher module for it in the attach. :)
[Magisk] sopx:
8.1 step by step guide:

1. Copy

services.jar from ( /system/framework/ )

services.vdex from ( /system/framework/oat/arm64 )

boot.oat from ( /system/framework/arm64 )

from phone to linux PC

2. Complie and use vdexExtractor

(if missing sudo apt-get install git libz-dev)

git clone https://github.com/anestisb/vdexExtractor.git

cd vdexExtractor

./make.sh

(go to folder containing services.vdex)

/correct/path/to/vdexExtractor/bin/vdexExtractor -i services.vdex --ignore-crc-error

mv services.apk_classes.dex classes.dex

3. Copy classes.dex to win PC

4. Right click classes.dex and add to Zip archive and name the archive services.jar

5. Use the services.jar file with Smali Patcher to get the Magisk module
[Magisk] MeNoNoob:
Don't have my PC now, really need someone willing to help
[Magisk] deexavz:
I tried. But binary download always stuck at 23%. I closed the patcher, run it again and the patcher downloading binary again until complete. Then i tried to patch my services.jar but always error. "Invalid or corrupt jarfile bin\apktool.jar

What should i do to fix this?

Or.. can someone help me patch my services.jar?

Noob here. Sorry for my bad english. :cowboy:
[Magisk] Eng.Raman:
Confirmed bro, these steps are correct using Linux OS. :good:

I use similar steps with a windows PC only, a windows version of vdex extractor ( VdexExtractor.exe ).
[Magisk] sopx:
I didn't know a windows version existed. It makes the process a lot easier and quicker.
[Magisk] Eng.Raman:
Deodexing your 8.1 services.jar ( using vdex extractor utility ), the patched module zip in attach.
[Magisk] stbt:
Dear Bro [MENTION=5818781]Eng.Raman[/MENTION]

would you please patch my service.jar 8.1 to smali patcher module, my pc was dead

here my file: boot.oat, services.jar, services.vdex

drive.google.com/file/d/1lYd8ZgA-LCtNctirKrTyu4xFg72_vPig/view?usp=drivesdk

Thank you f0mey for nice patcher
[Magisk] fOmey:
Windows binary's available on my fork: https://github.com/fOmey/vdexExtractor

Couldn't find any available on Google unfortunately..
[Magisk] Eng.Raman:
Deodexing and generating the patched module zip for your 8.1 services.jar.
[Magisk] stbt:
work perfect on my mido 8.1 with extended rom (build 0501)

Thank you so much for your help

Thanks f0mey for smali patcher
[Magisk] Eng.Raman:
VdexExtractor.exe mainly used via a plugin named "vdex2dex" with "Batch ApkTool v3.7.0" by bursoft.

I will write a full step by step guide for deodexing 8.1 services.jar using Batch ApkTool when i have a free time.
[Magisk] fOmey:
I'm actually planning to integrate vdex into the patcher tonight.. should be a pretty painless.. hopefully !

EDIT: A write up would be good anyway, that way it's at least documented clearly somewhere beside the baksmali github page.
[Magisk] fOmey:
CHANGELOG ::

2.2 ::

Android 8.0-8.1 compatibility.
[Magisk] Eng.Raman:
Deodexing Services.jar For Android 8.1

Full Step By Step Guide​

1. Download "Batch ApkTool 3.7.0" by BurSoft from the official site or 4pad link. (Thanks:good:to burSoft for this amazing tool).

BatchApkTool370.7z ( for 64-bit Windows ).

BatchApkTool370_32bit_and_XP.7z ( for 32-bit Windows and Windows XP ).

2. Download the plugin named vdex2dex which will be used with Batch ApkTool ( vdex2dex1.0.2.zip )

(alternative 4pda link ).

3. Extract Batch ApkTool to any where on your PC then extract and move vdex2dex plugin folder to

( X:\BatchApkTool\bin\plugins\ ).

4. Go to ( X:\BatchApkTool\_system\ ) and create 4 empty folders named "framework", "arm64", "oat" and another "arm64" arranged as follows:

( X:\BatchApkTool\_system\framework ).

( X:\BatchApkTool\_system\framework\arm64 ).

( X:\BatchApkTool\_system\framework\oat\arm64 ).

5. Copy the following 3 files from your phone to the PC:

"services.jar" from ( /system/framework/ ) to ( X:\BatchApkTool\_system\framework ).

"boot.oat" from ( /system/framework/arm64 ) to ( X:\BatchApkTool\_system\framework\arm64 ).

"services.vdex" from ( /system/framework/oat/arm64 ) to ( X:\BatchApkTool\_system\framework\oat\arm64 ).

6. Run Batch ApkTool and select your language then hit the no. "7" plugins.

7. Hit the no. next to vdex2dex then will tell you to press any key to continue and after a few seconds will see "Done", now press any key to return to the main menu and exit.

8. Now you have a deodexd services.jar created in ( X:\BatchApkTool\_system\framework\ ) move or copy it to the smali patcher tool folder and generate the magisk module zip.

9. Done.
[Magisk] oreo27:
Thanks for the tutorial! Just a quick question. I tried running the Patcher on my services.jar extracted from my stock ROM. It produced the Magisk Module which I then extracted and placed in my personal module. Everything seems to be working fine. Do I need to follow this procedure or is this for manually doing what the Patcher is?
[Magisk] fOmey:
This is a guide for manually deodexing, the patcher as of 2.2 can now deodex 8.0-8.1.
[Magisk] kontini:
I'm unable to download it
[Magisk] oreo27:
Thanks! Any apps that you know of that I can use to test my new services.jar out?
[Magisk] Eng.Raman:
Google drive link added to vdex2dex in the main post. :)
[Magisk] AvisAile:
doesn't work with android P :(
[Magisk] s.i.t.h.l.o.r.d:
Trying to get rid of the secure flag did not work for me with your latest release.

My phone: OnePlus 5, OxygenOS 5.1.1 (=Android 8.1, patch level 1st April 2018)

- ran patcher v2.2, no issues

- selected module in Magisk 16.3 and error message "! This zip is not a Magisk Module!"
[Magisk] fOmey:
That's interesting, because I was able to install your module just fine.

Try removing it from your phone and re-transferring it.. might be a corrupted transfer.
[Magisk] Eng.Raman:
Vdex Extractor for now doesn't support android P, it will be supported when the 2nd preview released.

anestisb ( the creator of vdex extractor tool ) commented 21 days ago on github " I'll wait for the second preview release (I'm guessing it will be announced around June) to ensure that this is the locked version from libart to ship with Android P and then I'll add support. "
[Magisk] s.i.t.h.l.o.r.d:
Weirdly enough, it now works for me. After transferring the zip archive to my phone four times , it finally was excepted by Magisk.

Thank you very much for your great work for this powerful tool.
[Magisk] ChuckHL:
Need help, I tried both ways, with vdexExtractor for linux and with Batch ApkTool 3.7.0 for Windows. I have succeeded in creating the services.jar file. When using the services.jar file on Smali Patcher 2.2, the app crashes. I get the Smali Patcher has stopped working message. I tried it for OP5 and OP3 both in LineageOS 15.1.

Regards
[Magisk] Eng.Raman:
Make sure you are installing the latest java jre and microsoft .net framework on your PC.
[Magisk] fOmey:
Mate you don't need to use vdex extractor or batch apktool anymore..

Follow the instructions for the ADB method on the OP.
[Magisk] zasukey:
Hey..

Question about module somehow they see i use fake gps? Or its iv calc?
[Magisk] ChuckHL:
Thanks for the solution.

Forgot I recently reinstalled my OS due to a bug and did not reinstalled Java.

It is working now.

Really appreciated.
[Magisk] Eng.Raman:
Your gps spoofing app detected by Pokemon GO, try to sysemize it systemlessly using the magisk module Terminal App Systemizer.
[Magisk] zasukey:
I already had that done to use gps spoofer so that's not the problem
[Magisk] Eng.Raman:
Then try to hide it in magisk manager may works for you.
[Magisk] zasukey:
Okey its not about fake gps i think. I deleted it and still getting this warning i will try to clear phone from "dangerous" apps.

I recovered stock image and got it again so its shadowban prob have to wait till its gone then test other gps apps.But i still kinda think its from IV calc cuz they ban for it now ;/
[Magisk] michaelcssirait:
Sir.

I has tested make service.jar using smali 2.2 on MiA1 8.0 and working fine. But when i am using application like PoGo, spoof location detected.

What can i do sir?
[Magisk] zasukey:
xxx

---------- Post added at 12:33 PM ---------- Previous post was at 12:32 PM ----------

Try "Fake Gps Go" download it from somewhere u can't find it in google play then move it to system app priv with terminal systemizer & emulator. Should work its only one gps that acutally worked for me.
[Magisk] ellenth:
smali patcher doesn't work anymore

hi

just tried in on the latest firmware for my s8 (g950fxxu1crd7) But it doesn't work anymore. Can get the patcher to work (As always) But installation stops after a while with my phone going off. I have reverted back to G950FXXU1CRC7.

Don't know why it doest work anymore
[Magisk] Firmino1919:
I've tried your application very well for fake location. but after I try to stop and return to the starting location can not stop. can you give me a way to start the starting location

GPSSpoofer-0.2-fOmey@XDA.apk
[Magisk] Atexrudess:
Would it work on lollipop..?
[Magisk] fOmey:
Exit the app by pressing the back key, It will clean up after itself.

Yes it does.
[Magisk] Atexrudess:
There is no classes.dex file on service.jar after i deodex it. Could you please help me..?
[Magisk] zasukey:
So why i can't install this apk?
[Magisk] Atexrudess:
https://drive.google.com/file/d/1U4JVIsP3XohK4TORpVh25rtWO_1OKQ7a/view?usp=drivesdk

Always read as undeodexed jar. Please help me. Thank you so much.
[Magisk] michaelcssirait:
!!! ERROR: Secure flag class not found.

What wrong sir?:confused:

I try on Samsung J570Y/DS and Samsung G532G/DS

Thank you
[Magisk] fOmey:
Follow "adb method" in original post.

No idea ? How about maybe providing some type of logs so we can see what the problem is ?

Follow "adb method" in original post.

The patcher isnt finding the classes for secure flags, if you have no interest in using this patch disable it and the patcher will work fine.
[Magisk] Atexrudess:
I really2 can't do it. I am very new at this. :crying:
[Magisk] michaelcssirait:
Finally i just tick option the "Mock Location" only and flash it use twrp.

Boot loop on Samsung G570Y/DS

How can i make this tool work fine for my phone?

:(
[Magisk] Atexrudess:
I've done adb method but the result says error mock location class not found. Please tell me what should i do..?

---------- Post added at 03:18 AM ---------- Previous post was at 02:28 AM ----------

I've done adb method but the result says error : mock location class not found. Please help me what should i do..? Thank you sir.
[Magisk] fOmey:
Upload your deodexed services.jar ill take a look.. or upload the entire framework directory.. whatever is easier for you.

What android version are you guys running on your phone?
[Magisk] Atexrudess:
Here it is sir https://drive.google.com/file/d/1VRNQ73vl9LluqDMCO4f6A2ZkmpDjE71G/view?usp=drivesdk

Thanks for your kindness. and my device is running at lollipop 5.0.2
[Magisk] fOmey:
That's not deodexed friend.. that's your problem.
[Magisk] Atexrudess:
Please would you help me how to deodex it,i've tried with the fulmics deodexer but it doesn't work.

---------- Post added at 01:15 AM ---------- Previous post was at 01:09 AM ----------

Dear Eng.Raman would you please help me to patch this https://drive.google.com/file/d/1VRNQ73vl9LluqDMCO4f6A2ZkmpDjE71G/view?usp=drivesdk

Thank you.
[Magisk] Eng.Raman:
Fulmics deodexer doesn't work with lollipop.

For lollipop ( 5.0/5.1 ) use LBD2.5 to deodex it then use the smali patcher tool to patch and generate your module zip.
[Magisk] Atexrudess:
Solved. I replaced the ROM with the compatible ones. Thanks to all of you guys. May god bless you always.
[Magisk] erwanPutra:
hey guys, i want to ask, is it work with oreo rom? im using redmi 4x with nitrogen os, btw thanks
[Magisk] Eng.Raman:
Yes bro it does, read the change log in the 1st page.
[Magisk] AvisAile:
So, it's possible to doeodexe android P dp2 ?
[Magisk] Eng.Raman:
Yes it will most likely be supported when released, already answered in post #1090. :)
[Magisk] Fikrisyihab:
Help me. this does not work on custom rom MiracleDroid 8.1 Treble for Markw (redmi4prime) , and always bootloop after install this module, is there any solution?

Sorry my english:(
[Magisk] abdat:
Please help me make smalipatcher for xiaomi mia1 custom ROM viper I don't have a computer please someone help.

Cant post link [drive.google[dot]com/file/d/1L4HkuoUmNZ4eTDONYTVumpQvCtY2O6Fn/view?usp=drivesdk]
[Magisk] Eng.Raman:
Okay bro, your patched module zip in the attach.
[Magisk] abdat:
Thank you so much for the help

The patch mock location and signature verification is not working please help what should I do to make it work
[Magisk] nuv:
Hey [MENTION=1620550]fOmey[/MENTION],

thanks for your work.

--------------------

Confirming successful .zip build with

- SmaliPatcher-2.2-fOmey@XDA.zip (checked options: mock locations and secure flag disable) and builtin adb method

for

- Magisk 16.4 beta

- Android 8.1.0 Oreo on BQ Aquaris X Pro

Could test the secure flag option: successful for a banking app which closes itself without SmaliPatcher.

--------------------

Got a question regarding extracting services.jar, deodexing and so on (just out of interest; as stated above, the adb method of SmaliPatcher worked for me).

Before Oreo, I followed these steps:

On a linux machine:

unzip 1.6.0_20180130-1827-bardockpro-user-1379-Fastboot-FW.zip
simg2img system.img system.img.raw
sudo mount -t ext4 -o loop system.img.raw /mnt
7z a -t7z -mx9 -mmt=4 1.6.0_system-framework_extractedFromImg.7z /mnt/framework /mnt/build.prop

On a windows machine:

- FulmicsDeodexer_1.6 with smali-2.2.2.jar + baksmali-2.2.2.jar

- extracted 1.6.0_system-framework_extractedFromImg.7z from the steps above

- deodexed the system/framework directory as well as the build.prop with fulmics

- gave the resulting services.jar to SmaliPatcher

DONE

As far as I understand now, with Oreo, Fulmics can't be used because the file structure has changed and there is a new type of files (vdex in addition to dex) which isn't supported by Fulmics (or smali/baksmali) yet.

Am I right so far?

Which manual steps would be nescessary to deodex my services.jar by hand?
[Magisk] Eng.Raman:
Zip and upload the 3 files required for manual deodexing 8.1 services.jar mentioned in my post #1081 and i will get it try.
[Magisk] fOmey:
You need to extract classes.dex from the vdex file, I have window binary's on my fork otherwise you can build for linux: https://github.com/fOmey/vdexExtractor
[Magisk] nuv:
Ah, ok. :good: Will take a look soon.

I just have seen eng.ramans post #1081.
[Magisk] Azha03:
I can't install GPSSpoofer-0.2-fOmey@XDA.apk

I'm use Samsung J320G lollipop
[Magisk] fOmey:
Most likely because I have set the minimum target framework to nougat..
[Magisk] Azha03:
Can you made for lollipop? :D
[Magisk] fOmey:
I'm sure there is a reason why I did that.. but I'll take a look when I get home from work.
[Magisk] herishinobi:
Dear [MENTION=4888656]eng.[/MENTION] Rahman. I have tried many times patch the service jar, i used different pc also and it says

"Error : Magisk module template download failed" all the time. I dont know what went wrong, i'm desperate now.

Could you please patch it for me. Thank you

Please forgive my poor english

https://drive.google.com/file/d/1IhRk1BvWhJPclhYn9Ju301EaG_A-7dum/view?usp=drivesdk
[Magisk] Eng.Raman:
I think this error indicates the missing or installation of an older version of the microsoft .net framework. Make sure v4.7.1 or later installed.

Your smali patched module in the attach.
[Magisk] herishinobi:
Thanks a million Eng. Raman
[Magisk] baloo30310:
Hi @ Eng.Raman!

And thanks for the tool I used for the deodexation OK

I decompile the sec settinc of my Note 8 made the modification for my infon in the system and at the recompilation I have an error.

An idea ?
[Magisk] Eng.Raman:
Hello bro. :good:

May be wrong changes you made in the styles.xml caused this error.

You can get more help from the developer of the Batch ApkTool ( BurSoft ) in the 4pda forum. :)
[Magisk] Eaberyy:
S8+

Tried on s8+ oreo unfortunely it does not work. Had to revert to nougat. Really hoped it worked on oreo but besides that great tool. Thanks
[Magisk] Eng.Raman:
Bro, it works perfectly on oreo ( 8.0/8.1 ).

What error message do you encounter?
[Magisk] Eaberyy:
I'm prety sure it works great on oreo. Maybe its something with my phone. If i try installing the module through magisk manager my phone does not reboot, it shows as installed correctry but after reboot my phone it wont get past the samsung logo screen. And trying to flash it through twrp it doesnt even give me an error. It stays on a line that says sonething like found "data/magisc. Something " and then it completly crashes and turns the phone off.

Are you using an s8?
[Magisk] Eng.Raman:
May be something went wrong with your smali module zip or conflicting with other apps on your phone. ( e.g: LP ).

Untick Signature verification in the smali patcher tool and generate new module zip then flash it and report.

No i don't use s8, my phone is zenfone 3.
[Magisk] JustBrian:
HI. I have a Sony Xperia X f5121 on 7.0 which is boot looping. Any idea why?

I installed SP on a Moto G4+ without any issues.
[Magisk] fOmey:
Post your original & modified services.jar.. or just the modified if your using adb method.
[Magisk] hhwong:
Hmm......i am not sure why the patch isnt working.

it worked in 7.1.2, but after 8.0-8.1, the disable flagsecure just doesnt work anymore, i cant take screenshot in some apps still.

any other work around?
[Magisk] fOmey:
They might of introduced something new.. upload your deodexed services.jar.
[Magisk] JustBrian:
Are there instructions somewhere on how to do this?

I noticed magisk has the 'preserve force encryption' checked on my Xperia x, stock N, versus my Moto G running Lineage OS. Do you think Sony encryption interferes with Smalli install?

I Ended up flashing Lineage OS on my Xperia and got Smalli to load.
[Magisk] djloko28:
Hi, I've been trying to install the new version but after install I got stuck on the samsung logo and then a have to restore the phone. does anyone know how to bypass this "bootloop"

im on Oreo 8.0. Galaxy S8.

Thnaks
[Magisk] fOmey:
Does your notification light turn on while booting ?
[Magisk] smohanv:
Just a question, OP says that signature spoofing is removed. I do not have enough details if my Custom ROM (AOSP Extended) has Signature Spoofing enabled. So, I want to do it myselff.

Can I still do signature spoofing with the smali version 2.2.

Thanks
[Magisk] sib0lis:
Hi @ fOmey and @ Eng.Raman...

Would you mind patching my service jar, please?

I cant get one coz lack of old pc.... lol
[Magisk] Escape86:
[MENTION=1620550]fOmey[/MENTION] i use rom miuipro oreo in xiaomi mi5 but when i want to make a module smali patcher from rom it always appear error with description target jar must be deodexed
[Magisk] fOmey:
I wouldnt recommend it, there are alternative methods to enable signature spoofing tho.. Check out nanodroid: https://xdaforums.com/apps/magisk/module-nanomod-5-0-20170405-microg-t3584928

Are you following the ADB method instructions ?
[Magisk] shoey63:
Make sure all the required files have been pulled into the bin folder before running the tool, or you will get that error message.
[Magisk] sib0lis:
here it is.. :)

https://drive.google.com/open?id=1LTML4cQru6znThSN_6x1P19-5gB_49mD
[Magisk] Escape86:
Yes, I following the ADB method instructions, rom that I use is deodex but why still appear error like that ?

---------- Post added at 01:21 PM ---------- Previous post was at 01:16 PM ----------

all files have been downloaded perfectly, even in the tool has been shown idle writing ... which means it is ready to use
[Magisk] Eng.Raman:
Your smali patched module.
[Magisk] dissidius:
if wanting to disable flag_secure on a specific app what do i need to do?

i mean which smali file do i need to edit because i decompiled an app and i can't seem to find the right file to edit

is it doable? can anyone help?

thanks
[Magisk] sib0lis:
awesome... thanks alot bro [MENTION=5818781]Eng.Raman[/MENTION] :good::good:
[Magisk] sleepybear0815:
Hello, I'm trying to use this on my Huawei P20 Pro so I'll be able to install unsigned apks. I do everything like in the "ADB method" but after i install the module ...i can't install unsiged apks. Does anyone has a fix for this or encountered the same issue?
[Magisk] langithitam:
Hy [MENTION=1620550]fOmey[/MENTION] & [MENTION=5818781]Eng.Raman[/MENTION]

I've tried deodex some of samsung phone running MM & N, it succed. But it always fbootlop when run it in magisk module. Any hint?
[Magisk] Eng.Raman:
Read and try my answer in post #1145 then report.
[Magisk] langithitam:
I've read your post

i dont have LP

I've deodex using fullmic

I've Untick Signature verification in smali patcher.

There is loop in smali patcher please check my pic

==> Generated classes

Input file (adb\framework\services.jar) was not found or was not readable.

==> Patched mock location boolean

==> Patched mock location boolean

==> Patched secure flag function

==> Patched secure flag boolean

Exception in thread "main" org.jf.util.ExceptionWithContext: Exception occurred while writing code_item for method Lcom/android/server/ConnectivityService$-void__init__android_content_Context_context_android_os_INetworkManagementService_netManager_android_net_INetworkStatsService_statsService_android_net_INetworkPolicyManager_policyManager_android_net_metrics_IpConnectivityLog_logger_LambdaImpl0;-><init>(Lcom/android/server/ConnectivityService;)V

at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:825)

at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:268)

at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:246)

at org.jf.smali.Smali.assemble(Smali.java:130)

at org.jf.smali.AssembleCommand.run(AssembleCommand.java:96)

at org.jf.smali.Main.main(Main.java:99)

Caused by: org.jf.util.ExceptionWithContext: Error while writing instruction at code offset 0x0

at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1098)

at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:821)

... 5 more

Caused by: org.jf.util.ExceptionWithContext: Unsigned short value out of range: 70286

at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)

at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:348)

at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1058)

... 6 more
[Magisk] fOmey:
Follow ADB method on the original post...

Re-run the tool and post the entire output here, also upload your services.jar... cant help you further without these.
[Magisk] langithitam:
android 7, samsung j5 pro j530y
[Magisk] Eng.Raman:
Deleted
[Magisk] Eng.Raman:
Yes, you will get bootloop because there are no patched services.jar in your uploaded module zip. This means you are not successfully generated the module zip using the adb method.
[Magisk] Eng.Raman:
May be you doesn't successfully deodexed the services.jar ( as you mentioned before you used fulmics first then the smali tool and this means you followed the alternative method not adb ).

Delete your installed smali module first to get rid of a bootloop and try the ADB method it is an automated one for deodexing and generating the patched module zip.

If you still have the same error then zip and upload your framework directory.
[Magisk] fOmey:
Please just post the output of the patcher... I'll be the judge if their is any errors.. :laugh:

Good advice.