yashsingh1/xdaforums huggingface dataset:
[Magisk] TataFionPatte:
[MENTION=1620550]fOmey[/MENTION]

Hi,

I have an error "Target JAR must be deodexed" when I try to patch ADB.

Xiaomi Redmi Note 5

Model: M1803E7SG

Stock rom: MIUI Global 10.0.6.0

Android 8.1.0

Magisk v18

Windows 10, 32 bits

Logs:

fOmey @ XDA
Patcher Version: 0.0.4.0
==> Binary download complete
==> Unpacked binarys.
==> Detected Java: 1.8.0_201
pull: building file list...
adb: warning: stat failed for path /system/framework/miuisdk.jar: No such file or directory
adb: warning: stat failed for path /system/framework/miuisystem.jar: No such file or directory
/system/framework/: 512 files pulled. 10.8 MB/s (380166737 bytes in 33.619s)
==> Dumped framework
!!! ERROR: L'exécutable spécifié n'est pas une application valide pour cette plateforme de système d'exploitation.
I: Using Apktool 2.3.4 on services.jar
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
!!! ERROR: Target JAR must be deodexed.

Already tried with recovery TWRP and mount System and same result.

Thanks for help.
[Magisk] Playersidhu:
Help for Pocophone F1

Can u please help me and tell me how you patched it for poco f1 please
[Magisk] JudgeJustice:
I have a SM-J727P Samsung Gal. J7 for Sprint/ Virgin Mobile i was wondering anyone has a .Jar file or know how to Deodexing my service file. With the Smali patcher i get Framework not found Error both with phone on and in TWRP mode. i copied my Service jar file to pc so i can send the file to be worked on.
[Magisk] ptballer:
Hi Fomey. Thx for file. Will try on the tablet this arvo
[Magisk] nutzlos:
Hi friends,

I moved services.jar to /system/framework/ and unistalled magisk completely. This works with Pogo on Samsung Lineagos systems.

I have not deleted services.odex/.vdex as I dont see them in /system/framework/, I guess this is because I use a custom ROM.

If I use a stock rom I imagine that I need to delete the services.odex in /system/framework/ as it belongs to the original services.jar - and then I copy the smali-generated services.jar to /system/framework.

Is this correct?

Thanks

Ar.
[Magisk] fOmey:
This is the real error:

!!! ERROR: L'exécutable spécifié n'est pas une application valide pour cette plateforme de système d'exploitation.

Translate: The specified executable is not a valid application for this operating system platform.

I replied to your last message with a test package, have you tried it?

https://xdaforums.com/showpost.php?p=78892130&postcount=2259
[Magisk] YukiTheGreat:
Hi there. First of all thank you so much for developing this program, I see it has helped so many people.

I'm here to ask a question/rant a little about my device. For some reason, I can't use smali whatsoever.

Here is what I have tried so far on Android 7.1.1 with Samsung Tablet A 8" 2017 model (SM-T380NZSEXAC) with Magisk v.18.1 and various versions of Smali Patcher (up to 0.0.3.8):

1. (With magisk installed) Installing smali magisk module with magisk --> bootloop

2. (With magisk installed) Installing smali magisk module with twrp recovery --> bootloop, Getting smali magisk module in the twrp recovery mode and then flashing it with twrp: bootloop

3. (With magisk installed), copying /system/framework/services.jar to /sdcard/Download and then copying services.jar to Pc, browse on Smali for services.jar, click Patch Jar --> deodex issue --> FulmicsDeodexer with smali.jar and baksmali.jar --> stuck at 57 or 59/71 and no more progress.

4. (WITHOUT magisk installed) running smali as admin to later install it with twrp: Smali says magisk module failed to download (Smali 0.0.3.8).

I also had help from a reddit user and flashed disable DM-verity, Tab_A_oreo_forced+encryption_disabler_test and Tab_A_oreo_forced+encryption_disabler, Patched_boot.image.tar and others.

Did I miss anything? Do I have no choice but to upgrade to Android 8.1.0 from my current version? Any help is greatly appreciated.
[Magisk] TataFionPatte:
I managed to make it works using this method: https://www.reddit.com/r/PokemonGoS..._guide_android_root_smalli_patcher_deodexing/

Little tip to MIUI users when copying framework folder, you will have error if you try to copy miuisdk.jar and miuisystem.jar files. Just copy the whole framework folder without these two files, it will still work with no issue.

Thanks [MENTION=1620550]fOmey[/MENTION] for Smali Patcher
[Magisk] jnfr00:
I'm stuck at "Patching classes.."

fOmey @ XDA
Patcher Version: 0.0.4.0
==> Detected Java: 1.8.0_192
system/build.prop: 1 file pulled. 2.1 MB/s (4414 bytes in 0.002s)
pull: building file list...
/system/framework/: 226 files pulled. 24.3 MB/s (277957533 bytes in 10.930s)
==> Dumped framework
==> Detected API: 24
==> Deodexed services.jar
==> Patched mock location boolean
==> Patched mock location boolean
I: Using Apktool 2.3.4
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
W: Could not find resources
info: read 'tmp\dist\services.jar'
info: read 'bin\sigspoof_7.0-9.0.dex'
info: type 'com.android.server.pm.PackageManagerService': method '<init>():void': (PackageManagerService.java:28): implicit ignore of trivial default constructor
info: write 'classes'
0 error(s), 0 warning(s)
==> Merged patch: sigspoof_7.0-9.0
info: read 'tmp\dist\services.jar'
info: read 'bin\sigspoof_core.dex'
info: type 'com.android.server.pm.GeneratePackageInfoHook': method '<init>():void': (GeneratePackageInfoHook.java:35): implicit ignore of trivial default constructor
info: write 'classes'
0 error(s), 0 warning(s)
==> Merged patch: sigspoof_core

[IMG="Screen"]https://imgur.com/ObMgZBc[/IMG]

Anyone in my situation? How to solve it?

Galaxy Tab A 2016 LTE
[Magisk] petermesh:
Reboot issues for samsung s8 solved

Hi all,

My s8 plus. Stock firmware. Rooted with latest magisk.

Worked fine. Until I used smali Patcher magisk module with magisk. This caused my phone to reboot with in 5 minutes of booting.

After reading posts the solution I found was to remove services.odex and services.vdex from system/framework and replace the services.jar with the Patched one from the smali Patcher without magisk. There is no need to uninstall magisk. It works fine. Just not with the smali module.

I use the app ninja gps joystick with no options select3d for the people who play pokemon.

Exc3llent work .. keep up the great work fOmey

[MENTION=1620550]fOmey[/MENTION] also have a beer on me :)

petermesh
[Magisk] fOmey:
That's very kind of you, thank you..

You didn't miss anything, it's a issue with the module.. no one that owns the device has been willing to help me fix the issue tho unfortunately.

If you're game enough to test a few solutions, reply to this message with the generated module attached to your reply.
[Magisk] ptballer:
Yes - still in boot loops, tried flashing it after fresh OS install. tried in magisk, tried in twrp - both cause boot loops. Works on s7 edge fine though.
[Magisk] fOmey:
Very weird.. can you upload a unmodified services.jar (deodexed) or link to me the rom your using?
[Magisk] Brume_:
Greeting, I managed to patch my phone and I've followed a few different guides but smali does not work, I have a samsung galaxy s8+ enox on android 8.0, i've tried copying he files in twrp and replacing the respective ones in system framework also however Pokemon go still seems to be able to detect when I have mock locations on
[Magisk] Kimizuer:
Samsung J5 J510FN stuck on boot logo

First of all, thank you so much fOmey for this wonderful patch!

Now i have a Samsung that i'd like to patch up but it stucks always at boot...

I've formatted the phone, even restore stock rom via odin to clean all up

then i create the zip with 4.0 version of Smali with no errors.

on TWRP i overwrite the services.jar, and arm and oat folders (not 64, even though i've tried both)

chmod 755 the main services.jar and bam... stuck on loop.

What i've noticed so far is, if i patch the main services.jar, the phone works (but not patched), when i touch the ARM or OAT folders, it stucks...

Any ideas anyone?

Thank you!
[Magisk] Suryo75:
everytime i patch android 5.0,5.1,6 and 8 it gives me magisk download template failed,but it is not for android 7 it runs smooth, i have checked eveything it gives me nothing. i run with windows 7 - 32 byte. any suggestions for me ? many thanks
[Magisk] Terminator.J:
First off, thanks for this [MENTION=1620550]fOmey[/MENTION], you're a lifesaver.

Having read the instructions and followed them, things have worked well for me with versions 3.4 and 3.8 on my OnePlus6 A6003 running OOS 9.0.3 (Pie) and my wife's ZUK Z2 Pro running XenonHD (Pie but she's still running 3.4 module since I've been away from home for a week), both using Magisk 18.1. A little bit of slowdown when I have the module enabled, but oh well.

I recently re-applied the patch using version 4.0 of the patcher (making sure to disable old module and restart first), and enabled the newly-created module. I'm only using the "hiding mock location" option, and it's working fine for me (Incorporate Apps, Inc. FakeGPS Joystick & Routes Pro, with all options unchecked) with no rubberbanding when I disable high-accuracy in Google location settings.

However with the 4.0-patched module, I've noticed a couple of strange behaviors that weren't happening before: 1) when the module is enabled, my phone keeps forgetting its default launcher (Nova) and keeps either asking me to specify what launcher I want to use, or going back to OxygenOS Launcher instead when I press home, and 2) all text with apostrophes now includes a large space between the word and the apostrophe.

When I disable the module & reboot, the launcher issue disappears, but the weird text spacing before apostrophes persists (even with wiping dalvik cache in TWRP).

It wasn't doing this with the 3.x patcher modules. Any particular logs you would like me to try and capture and send to you?
[Magisk] fOmey:
What are you doing to the ARM/OAT folders? Are you overwriting them with the files in the module or deleting the files?

Nothing has really changed on the device side from those versions.. beside the magisk template being updated. The contents of the generated module is identical to version 3.4...

Take a logcat, might answer a few things for us.. your running the latest magisk?

Use the latest patcher version.
[Magisk] YukiTheGreat:
Hi f0mey Thanks for replying. I had some issues with my OS and twrp after flashing so many files to bypass the bootloop from installing Smali module. So I installed a Russian version of 7.1.1 (on SM-T380NZSEXAC) and with a recommendation from a reddit user, I installed Magisk 17.3. So with Smali 0.0.4.0 and Magisk 17.3, I was able to get a Smali magisk module. Then I flashed it with twrp --> bootloop.

A weird/interesting thing was that when I got the smali magisk module from Smali 0.0.4.0 and Magisk 17.3 (On a Russian rom), my Smali module was 7174 KB, whereas the other reddit user who was helping me, he tested with the US version of 7.1.1 and his smali module was 13,759 KB. He told me he was successful with smali on his end.

Anyway, after I got into bootloop again, he suggested that I install the US version of the 7.1.1 rom for my device and I did. Now I either have to wait 7 days for OEM unlock or install a Canadian version of 7.1.1 for my device. Anyway, I'm game to test a few solutions you recommend.

Edit: I sent the smali module to you via a private message since I couldn't post it with this message because I'm a new member for another 8 more posts.
[Magisk] maoguata:
hello to all, I have generated the module for my redmi note 4 (mido) that module would work in another redmi note 4?
[Magisk] fOmey:
OK.. that sounds like its having issues decompiling.. which would explain the bootloops.

Can you send me a link to the rom your using at the moment?

EDIT:

Definitely a issue with deodexing, your absolutely right the file size isn't the same. (I based my testing off a rom I found in the tab A section of XDA).

Could be a bug with baksmali.. it's not spitting out any errors.

If it's the same android version, it should be fine.
[Magisk] fmiqbal8:
Binary download stuck in 99%. What should i do?
[Magisk] Suryo75:
Link quote GONE, do you have it ?
[Magisk] 0ddj0b7:
You are my hero I'll be donating!

This was my First time ever rooting, also installed lineage 16 on Moto g5s plus. first magisk module I've ever installed and everything is working perfectly!! It was super easy

Many thanks I'll be donating!
[Magisk] N30Exca:
Quick question, dose this module interfere with Google maps and phone positioning at all when im not using the GPS spoffing app? I mean wil i have a clear and not altered gps signal when the spooffing app is not in use?
[Magisk] risoobeon:
It doesn't effect any of mine maps or sat nav work perfectly whilst not running spoofing app.
[Magisk] Phantom Thief:
Yes
[Magisk] yannahzinha:
Hello...can you help me? I'm trying to help a friend of mine...he has a Zenfone 2 with stock 6.0.1, magisk 18.1 installed.

He tried to make it work but keep having "!!! ERROR: Mock location class not found".

I don't know how to solve or teach him to solve it...could you provide your zip please?

The version of stock rom matters, by the way?

Thanks in advance...and sorry to ask this :((
[Magisk] jatintomar:
Deleted
[Magisk] TezzeretNL:
Magisk Module Template error.

When running that smali patcher thing i'm getting Magisk module template error, what am i doing wrong?
[Magisk] Playersidhu:
Help for pocophone f1

fOmey @ XDA

Patcher Version: 0.0.4.0

==> Detected Java: 1.8.0_202

pull: building file list...

adb: warning: stat failed for path /system/framework/miuisystem.jar: No such file or directory

adb: warning: stat failed for path /system/framework/miuisdk.jar: No such file or directory

/system/framework/: 658 files pulled. 19.4 MB/s (441492705 bytes in 21.718s)

==> Dumped framework

!!! ERROR: The specified executable is not a valid application for this OS platform.

I: Using Apktool 2.3.4 on services.jar

I: Copying assets and libs...

I: Copying unknown files...

I: Copying original files...

!!! ERROR: Target JAR must be deodexed.

I tried every method twrp, non twrp and deodexing still cant do it please help guys i want location spoofing to work only and all if possible.

i am uploading my services.jar and framework and build.prop in adb zip.

thanks in advance.

Services.jar here

drive.google.com/open?id=1zuxy6nM1hi7zL2bJqiHuizLhpAmwOCiS

firmware and build.prop

drive.google.com/open?id=1DbhglFMeA24hbCm1aKR_jiTH9Pa9It0z
[Magisk] Blissey:
Updated Smali patcher
[Magisk] GTDarthYoda:
I have an issue where after about a day of use multiple applications start crashing. System UI, Google Services, Tasker and more. Any Ideas why?

Pixel 2 XL

February Patch

Magisk 18.1

Smali Patcher 4.0

Edit:

Also do you have a link for 3.8? I don't think I had these issues on 3.8 but I don't have the patcher to test
[Magisk] aNGERY:
fOmey @ XDA

Patcher Version: 0.0.4.0

==> Detected Java: 1.8.0_201

system/build.prop: 1 file pulled. 1.2 MB/s (7585 bytes in 0.006s)

pull: building file list...

/system/framework/: 149 files pulled. 4.4 MB/s (192630881 bytes in 41.604s)

==> Dumped framework

==> Detected API: 22

Exception in thread "main" org.jf.dexlib2.DexFileFactory$UnsupportedOatVersionException: Unsupported oat version: 45

at org.jf.dexlib2.DexFileFactory.loadDexFile(DexFileFactory.java:120)

at org.jf.baksmali.DexInputCommand.loadDexFile(DexInputCommand.java:149)

at org.jf.baksmali.DisassembleCommand.run(DisassembleCommand.java:162)

at org.jf.baksmali.Main.main(Main.java:102)

==> Deodexed services.jar

!!! ERROR: Mock location class not found.

what am i missing here?
[Magisk] YukiTheGreat:
----------------------------------------------------------------------------------------------------------------------------------------------------

Hi f0mey. I've used 3 different roms so far. 1) The rom that came with the device when I first bought it 2 months ago, 2) Russian Rom from https://www.theandroidsoul.com/samsung-galaxy-tab-a-firmware/ Under Galaxy Tab A 8.0" 2017 --> SM T380 Feb 7 2018 7.1.1 Android nougat. The smali magisk module that got me into bootloop is from 1) and 2). For 1) I don't remember the file size, and for 2) My smali magisk module size was 7174 KB whereas the reddit user who was helping me had 13,759 KB for his smali magisk module with the US rom which is the link below. He says he was successful with his smali magisk module on his end.

3) A reddit user sent me a Samsung T380 US version 7.1.1 rom from https://samfrew.com/es/download/GALAXY__Tab__A__/53w8/XAR/T380DXU1ARB3/T380XAR1ARB3/ The website is in Spanish but the file is the US version. This one I need to wait 7 days for OEM unlock. The website also offers a Canadian one and I doubt that one will need to wait 7 days for OEM unlock. But I'm currently on the US one.

If my smali issues were caused by deodexing, how can I bypass this? I downloaded baksmali 2.2.6.jar and smali 2.2.6.jar from https://bitbucket.org/JesusFreke/smali/downloads/ and fulmics deodexer from https://xdaforums.com/android/software-hacking/tooll-03-12-fulmics-deodexer-1-0-t3512081

Also from XDA forum, which rom did you use?
[Magisk] fOmey:
You might rubber band between the spoofed location and your real location. Which is a ban risk..

Yes you can use the patcher over a patched jar.
[Magisk] sekk:
it stops dumping framework everytime

i am using latest smali patcher, and everytime i use it, it just stops dumping the services framework. It reaches X % and just stop there... ive already deleted the whole folder, tried again and again and nothing changes, only the percentage changes...
[Magisk] sobirin90:
Actually, I was wondering, where exactly the settings for the Google history settings. Because I never get rubber band. It is very stable..

I also used real location sometimes because I used Google maps too. I don't think I turn off any Google history settings.
[Magisk] Playersidhu:
Please guys help Yesterday I got my phone formatted in doing so.
[Magisk] Kimizuer:
Hi mate,

thanks for your reply, and sorry my delay.

I'm overwriting the files with the ones generated by the module manually

I've even tried select only "mock locations" to avoid other problems patching... ( "Mock Locations" only checkmark)

The phone doesn't have any ARM/OAT 64bits folder so i'm using the normal folder files.

this is what im doing on TWRP:

from module zip:

\system\framework\services.jar (copy file)

to

\system\framework\ (paste file slide)

from module zip:

\system\framework\arm\services.odex (copy file)

to

\system\framework\arm\ (paste file slide)

from module zip:

\system\framework\oat\arm\services.odex (copy file)

to

\system\framework\oat\arm\ (paste file slide)

to finish:

\system\framework\services.jar (chmod 775)

and reboot

With this done i get stuck on the Samsung boot logo...

If i put back the original services.jar, it works again (even with ARM/OAT files replaced)

this procedure worked on other phones with all 4 patches selected on the patcher

but its not working on this samsung, not even with the "mock location" patch selected only.

Im using the 0.0.4.0 patcher, with success, no errors

What am i doing wrong?

Thanks for your help mate
[Magisk] jvaz87:
Could anyone convert to me the module created for the version of magisk v16? my magisk is v16 I can not use v17 or v18 my phone is a mi8se, I need the smali module converted to install in my magisk v16 I am attaching the module so that someone can be graciously converted to me

EDIT:

I have attached a module(app_systemizer) for the magisk v16 that I have already used to use base

[MENTION=6138728]Spartacus500[/MENTION]

help me again please

[MENTION=5818781]Eng.Raman[/MENTION]

help me please
[Magisk] lordlord6:
Xiaomi mi max 2

fOmey can you help me?

I have uploaded on page 214.
[Magisk] jhonathantanada:
The tutorial is perfect. Only that i could play pokémon go only for a few hours soon after i had to leave the game, when i came back it started to give location.
[Magisk] @alissa@:
Having the same issue. Solved by using custom rom below for my J5 2016. It work perfect.. :o

https://xdaforums.com/galaxy-j5/sam...her-development/rom-odyssey-note8-v1-t3744713
[Magisk] fOmey:
That's your problem, the only file you want to overwrite using the generated magisk module files is the JAR.

The ODEX files are now merged into the JAR, so you need to delete them from /system/framework. The ODEX files included in the module are actually blank dummy files, magisk interprets this as a safe way to "delete" them.
[Magisk] yohanid:
ERROR: Framework directory not found, what should i do?
[Magisk] MisledMew:
Running the app as admin?
[Magisk] jvaz87:
edit: solved!
[Magisk] leuofiridia:
Any chance of providing used commands for someone (like me) to make a linux/mac port
[Magisk] Kimizuer:
Thanks mate, i will do this if patch doesn't work on original rom with the help of fOmey! (+1 thanks for you!)

Thanks for your reply again mate! you rock!

Ok so, after refreshing the phone up with odin, i tried to run the patch again, only overwriting the .jar file on /framework/ and then chmod775 and reboot

still stuck...

there are no .odex files on /framework/ by default

there are only .odex files on ARM and OAT folders (even trying to delete them as a crazy move, doesn't work)

any ideas mate?
[Magisk] Jok3r10:
For anyone encountering the issue of "ERROR: Target JAR must be deodexed." I had the same issue and fixed it by simply updating Java on my computer. So give that a try and see if it works.
[Magisk] benny670:
RE: Lollipop compatibility?

Hi f0mey,

Yes, that's correct. First off I load my real location on maps. I enable mock location, and maps will still show my real location until I activate a GPS mocking app. I've tried several mock GPS apps which all provide a correct mock location on google maps and pokemon go, while they are running. When the mock apps are closed however, the real GPS doesn't resume, even after mock location option is disabled. Google maps locate button is left with a '?' and prompts "To continue, turn on device location" (it already is), and pokemon go shows "Error 11: GPS signal not found" until the phone is restarted, and then the real location returns.

The issue is that while mocking on Android 5.1, apps like pokemon appear to see that the Mock Location option is enabled, and refuse to allow gameplay accordingly (Error 12: Failed to detect location). I can move around streets on the in-game map using joystick but no game content appears.

The main difference I can see in 5.1 is that the "Allow mock locations" in developer options is a simple on/off option, whereas I believe 6.0+ option is to select a "Mock location app" instead... not sure if this could be a cause of the issue?

I also noticed that the location icon does not show in the top status bar while mock locations are running.. This leads me to another thought - when an app begins to mock location is it perhaps intentional in 5.1 that something causes the real GPS to stop while mocking, until phone restarts? Something that could be detected by other apps, similar to the way Pokemon GO detects when 'Fused Location service' is disabled (this throws an immediate error 12 also). Fused Location is enabled on my phone, even when this error is showing.

I realise this issue may be beyond the bounds of your app, or that patching mock location alone might not be enough to successfully hide mock locations from apps on lollipop, but if you have any ideas to try to fix it would be greatly appreciated!

Thanks,

benny
[Magisk] fOmey:
Have you tested using the module to make sure it boots normally?
[Magisk] maoguata:
Hello everyone .. I need help .. I am doing the process and I get the following error: !!!Error:No ADB devices found.. I have the USB debugging enabled and the drivers installed.

Is a Redmi note 6 pro.

Thank you in advance for your help