yashsingh1/xdaforums huggingface dataset:
[Magisk] pandusetiawan:
Great app.

Tested and succeded on :

- J7 Prime

- J7 Pro

- SM-G532G

- SM-G570Y

- SM-G610F

- Mi 5C

- Redmi Note 3 Pro

- Redmi 3

- Redmi 5a

Problem on SM-A310F :

fOmey @ XDA
Patcher Version: 0.0.2.4
system/build.prop: 1 file pulled. 0.0 MB/s (4577 bytes in 0.265s)
* daemon not running; starting now at tcp:5037
* daemon started successfully
pull: building file list...
/system/framework/: 236 files pulled. 13.5 MB/s (241609303 bytes in 17.129s)
==> Dumped framework
==> Detected API: 24
==> Deodexed services.jar
==> Patched mock location boolean
==> Patched mock location boolean
==> Patched secure flag function
==> Patched secure flag boolean
==> Patched signature verification function
Exception in thread "main" org.jf.util.ExceptionWithContext: Exception occurred while writing code_item for method Lcom/android/internal/http/multipart/MultipartEntity;-><init>([Lcom/android/internal/http/multipart/Part;)V
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:886)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:313)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:269)
at org.jf.smali.Smali.assemble(Smali.java:131)
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:1159)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:882)
... 5 more
Caused by: org.jf.util.ExceptionWithContext: Unsigned short value out of range: 65536
at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:356)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1119)
... 6 more

==> Generated classes
I: Using Apktool 2.3.3 on services.jar
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Using Apktool 2.3.3
I: Copying tmp classes.dex file...
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
W: Could not find resources
==> Magisk template download complete
==> Generated magisk module zip file
*** Complete ***

And cause bootloop when installed.

Any solution for these SM-A310F problem?
[Magisk] cmstew:
[MENTION=7350804]pandusetiawan[/MENTION]

I would recommend trying to deodex with Fulmics Deodexer before using smali patcher.

https://xdaforums.com/android/software-hacking/tooll-03-12-fulmics-deodexer-1-0-t3512081

I was having trouble with a Samsung tablet too but when I tried Deodexing with Fulmics Deodexer first it ended up working out for me.
[Magisk] pandusetiawan:
SOLVED.

I don't really know whats happened...I just flash my A3 with an older OS, delete smali folder on my PC, re-run new smali, it runs normally&the patch are generated & stable to use. Thx for the respond... :)
[Magisk] djase:
i have patched my service.jar for disable signature but the problem with disable signature, not work when im installing apk :/

N910F Resurrection Remix 6.1.0 https://xdaforums.com/note-4/snapdragon-dev/rom-resurrection-remix-6-0-0-t3768963
[Magisk] stbt:
attached your smali module
[Magisk] djase:
HI,

i have patched my service.jar for disable signature with no errors but the problem is that after flashing SmaliPatcher-0.0.2.4-fOmey_XDA my phone is stuck in bootloop

N910F Resurrection Remix 6.1.0 https://xdaforums.com/not...6-0-0-t3768963

Cheers.
[Magisk] cognitivedissonance:
FYI this app seems to work better for me than the one attached to OP.

https://play.google.com/store/apps/details?id=com.incorporateapps.fakegps.fre

The one in the OP would get forced out of memory, but this one doesn't because it has the icon it puts in the top bar to prevent that.

I also tested this app and ended up uninstalling it quickly - it was doing this weird thing where it seemed to be reporting 2 different locations about 100 miles apart (one location was the proper place I was trying to spoof, and the other was just arbitrary.)

https://play.google.com/store/apps/details?id=com.lexa.fakegps

Also, this could be a coincidence, but I think I'm experiencing system lag / drag when I enable this module. It isn't terrible, but I've started noticing it very recently, and this module is pretty much the only thing I've changed.
[Magisk] Cerohan:
The installation was failed

Hello, I tried to install the smali patcher with only mock location enable and I could created the zip file. My issue is when I try to install the module via magisk the installation got failed message

-Creating /data/adb/magisk_merge.img with size 64M

! /data/adb/magisk_merge.img mount failed...

Failed!

! Installation failed

Can you help me? What am I doing wrong?

Thank you
[Magisk] JesterGrafix:
Hey y'all, I'm trying to use this on my Nexus 7 (WiFi version). I followed the recommended section, it appears to be working, then the patcher closes without making a ZIP file. Not sure if I'm doing something wrong. I installed Magisk thru TWRP on a freshly reset device.
[Magisk] whalesplaho:
Works for Nokia 8... :good:
[Magisk] fOmey:
Nokia allowing bootloader unlocks finally?!
[Magisk] Vuska:
any patched for OnePlus 6 OOS 5.1.11?

i dont have computer with me for this 2 months
[Magisk] whalesplaho:
Not yet bro.... Its an unofficial method n had to pay!!!

I like tha phone buh really less devs n Nokia causing dis...
[Magisk] s.i.t.h.l.o.r.d:
After updating my OnePlus 5 to OxygenOS 5.1.5, the patch to always be allowed to take screenshots still works nicely.

Thanks [MENTION=1620550]fOmey[/MENTION]
[Magisk] AvisAile:
Hello, vdex extractor is now compatible with Android pie :D
[Magisk] fOmey:
Cool! I've pushed the latest binary.. delete the "bin" folder in the SmaliPatcher directory and give it a test.
[Magisk] AvisAile:
It say me that a DLL is missing and it crash :/ (cyggcc_s-seh-1.dll), just after dumping framework

(ADB methode with google pixel)

And if I manually add the dll in the bin folder, it crash anyway ...
[Magisk] bagbag:
Also crashes for me. If I replace with old vdexExtractor.exe, it crashes after this screen (attachment), while only services.apk_classes2.dex is in bin folder.

Used on [G96XF/FD] SoLdieR9312s G96XBRH4 ROM || 7.4 | AROMA | ODEXED | Android 8.0 | BRH4 (Galaxy S9+)
[Magisk] fOmey:
Interesting, I've pushed another binary update.. give that a try & report back.
[Magisk] bagbag:
Now it completes Download a few times, with some files missing in bin and vdexExtractor.zip in tmp. Therefore it doesnt work either and hangs here (attachment).

Available files in bin are different on each start and sometimes it crashes in the bootstrapping process.

Edit: starting it a few times while deleting tmp in between seems to make it download all files, but it crashes again directly after "extracted classes.dex".
[Magisk] fOmey:
What do you mean by files are missing from the bin directory? Delete the bin directory and let the patcher re-download everything.

What files do you believe are missing?

EDIT: Do we know 100% that vdex is now compatible with P?
[Magisk] shoey63:
No we don't http://xdaforums.com/showthread.php?p=77483098
[Magisk] SMinato27:
Help

Dude, i'm getting this error:

"adb: error: failed to get feature set: no devices/emulators found

adb: error: failed to get feature set: no devices/emulators found

!!! ERROR: Framework directory not found."

How can i fix it ?

-----

i fix it but now the program are crashing all the time =/
[Magisk] cmstew:
Android P introduces a new filetype called cdex (CompactDex). Vdex extractor is now able to extract these cdex files properly (for the most part, still some bugs) but I think the problem is that they still need to be converted into the old dex filetype before we can do anything with them.

I don't think smali/baksmali support cdex files yet.

This is likely why it's still not working as intended with P.
[Magisk] bagbag:
For example the cygwin dlls were missing. I tried it again and now it downloaded everything after the first run. But still, directly after "extracted classes.dex", it just closes, with "services.apk_classes2.dex" file present in bin directory.

Thats the services.jar: https://seafile.batrick.de/f/2cf68018346247f7b0c4/
[Magisk] fOmey:
Right, thanks for taking the time and explaining that.. I'll be honest I'm a little out of the loop. I'm still on nougat unfortunately.. haha

If that's the case the patcher would need to updated to provide support.

Once we know vdex works 100% will go from there.
[Magisk] bagbag:
I don't have android P. It's 8.0.0.
[Magisk] cmstew:
haha, it's all good. I'm one of those guys that get's this awful urge to try the bleeding edge if at all possible and I can't rest until it works. You've done some incredible work here with this patcher and you should be proud, even if you're still running nougat! ;)

vdex extractor has now been updated with support for converting vdex files directly to dex files and it's now possible to manually use smali patcher for android P. I tried it out just now and was able to boot with the patch installed and spoof my location perfectly.

You still have to have vdex extractor compiled because it uses it. If you clone the vdex extractor repo you'll find it in this folder. Here is the direct github link:

https://github.com/anestisb/vdexExtractor/blob/master/tools/deodex/run.sh

As I'm mostly a linux/mac guy I couldn't tell you if it's possible to add this to your tool for automating the process but I wish you luck.

For the rest of you that feel like trying this out, you just run it like a regular shell/bash script on a mac or linux machine on your services.vdex file from Android P. One roadblock I encountered was not having wget installed on my computer. It told me it was missing, so I installed it and the rest went smoothly.
[Magisk] AvisAile:
Can you send me the doedex services.jar of the latest rom from Google pixel 1 ? I don't understand how to use Vdex Extractor ?

Thank you
[Magisk] ruscle77:
Works fine on Android P.

Tested on Pixel Experience ROM for Redmi Note 3 Pro.

fOmey @ XDA

Patcher Version: 0.0.2.4

==> Binary download complete

==> Unpacked binary.

I: Using Apktool 2.3.3 on services.jar

I: Baksmaling classes.dex...

I: Copying assets and libs...

I: Copying unknown files...

I: Copying original files...

==> Patched mock location boolean

==> Patched mock location boolean

==> Patched secure flag function

I: Using Apktool 2.3.3

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

==> Magisk template download complete

==> Generated magisk module zip file

*** Complete ***

ps : =>Disable signature is not patched :confused:
[Magisk] cmstew:
PM me your services.vdex file and I'll patch it for you.

Please don't mislead people. Smali Patcher is not fully compatible with Android P yet. There are additional manual steps involved before it works. You're making it sound like it works out of the box when it doesn't.

---------- Post added at 12:50 PM ---------- Previous post was at 12:38 PM ----------

Hey all,

I'm willing to donate some of my time to help the community out a bit. If you can't figure out the extra steps to get Smali Patcher working with Android P, send me a PM with the services.vdex file from your device and let me know which patches you'd like. I'll patch it and send you a Smali Patcher Module for your device.

Type this in adb shell to find your services.vdex file:

find /system/framework/ -name services.vdex

Please note that I will not respond to PM's that don't include a link to your services.vdex file and which patches you'd like.

Disclaimer: If your phone boot loops I will not be held responsible, but it should be pretty easy to fix. Follow this guide to uninstall the module - https://xdaforums.com/showpost.php?p=72542167&postcount=242
[Magisk] el_chiefo:
Where would I find the services.vdex file? I'm adb into services/framework and i only see services.jar and a few other random ones:

127|marlin:/system/framework $ ls *.vdex

boot-android.hidl.base-V1.0-java.vdex

boot-android.hidl.manager-V1.0-java.vdex

boot-android.test.base.vdex

boot-apache-xml.vdex

boot-bouncycastle.vdex

boot-com.google.vr.platform.vdex

boot-conscrypt.vdex

boot-core-libart.vdex

boot-ext.vdex

boot-framework-oahl-backward-compatibility.vdex

boot-framework.vdex

boot-ims-common.vdex

boot-okhttp.vdex

boot-telephony-common.vdex

boot-voip-common.vdex

boot.vdex

Thanks
[Magisk] cmstew:
Type this in adb shell to find your services.vdex file:

find /system/framework/ -name services.vdex

I'll update my post with this information.
[Magisk] ruscle77:
you will find it in /system/framework/oat/arm64
[Magisk] el_chiefo:
Thank you...I really appreciate it ... I'll PM you the file.
[Magisk] cmstew:
This is probably right in most cases. I just didn't want to assume that everyones was in the same place.

No problem! :)
[Magisk] el_chiefo:
Yes, thats exactly where it was...Another question, this module that you just sent me, was it patched to include all three of the patches included? mock locations / Secure flag / Signature Verification? I just really need the Secure Flag one.
[Magisk] BadWithPhones:
Signature Verification patch does not seem to work on Pie (Pixel XL)

Secure Flag and Mock Location appear to be functioning correctly
[Magisk] cmstew:
Good question! I actually only did the mock location patch because that's all I use. I forgot that other people might use the other ones. lol I'll re-patch yours and send you the new one.

I only know for sure that the mock location patch works on Android P, so you'll have to let everyone know if the Secure flag patch works or not after you try it.
[Magisk] el_chiefo:
Perfect, no wonder the app wasn't letting me do what I needed. Yes please. Can you patch it to it be just Secure Flag, thanks.
[Magisk] ruscle77:
Same here.. Any suggestion how to patch the verification signature on pie ?

I've try using LP but it seem doesn't work either ?
[Magisk] el_chiefo:
Damn, didn't seem to work either...I'm trying to view Netflix by mirroring my screen but all i get is a black screen.
[Magisk] cmstew:
That's because I only gave you the location patch. lol. Did you want to try it with all 3?

I don't know what LP is, but if you send me a PM with your services.vdex file and indicate which patches you want, I'll make you a smali patcher module that you can try.

---------- Post added at 03:10 PM ---------- Previous post was at 03:08 PM ----------

Sorry it doesn't work for ya. :(
[Magisk] fOmey:
I've upgraded the binarys yet again with the latest vdexextractor, unsure if smalipatcher will magically be compatible with P (not likely).. feel free to test and report back.
[Magisk] cmstew:
Hey,

Got bad news for ya. I downloaded fresh binaries and it still doesn't work. :(

Let me think on it. I might be able to create some sort of a web tool that would allow people to upload their services.vdex and have them converted to services.jar files that Smali Patcher can actually work with. Then it would work as is.
[Magisk] fOmey:
Yeah unfortunately the conversion script dependency isn't compatible with windows.. maybe a tool compatible with windows will crop up or a alternative method will be merged into vdex in the future.

Anyone that is interested you can follow along: here.
[Magisk] BadWithPhones:
AFAIK vdexextractor (in windows) can't convert .cdex into a file that the patcher wants

EDIT: also the signature verification patch does not seem to work
[Magisk] fOmey:
Give this release a try & report back:

CHANGELOG ::

2.5 ::

Added support for multi-classes.dex.

Also, can someone please link me to a android P rom/framework folder that is causing crashes?
[Magisk] iamelton:
i used this patcher (v1.2) to generate a module on magisk 15, running with no problem, since long ago..

now that magisk 17.1 is available, i plan to upgrade my magisk installation..

so, will my current module continue to work under magisk 17, or do i have to re-generate a new module using the latest v2.5 patcher?
[Magisk] bagbag:
First run: crashes while extracting (while doing 2 downloads again).

Second run: crashes after extracting second dex file.
[Magisk] fOmey:
Not sure bud.. crashing while extracting binarys sounds like a corrupt download to me.

If it's crashing it the tool probably hasn't cleaned up after itself, check the tmp folder and try open the zip files manually.

If you have trouble opening them, this confirms my suspicions of corrupt binary downloads.
[Magisk] Stillhard:
Broken

FYI: Download's broken with 401 Gone now... please re-up ;)
[Magisk] s.i.t.h.l.o.r.d:
Works fine for me, please re-try.
[Magisk] Shalarion:
I have been able to successfully use vdexextractor, and the cdexconverter on my framework folder for my Pixel 2 running Android P, but I dont know where to go from there. I would like to learn how to do this myself, and was wondering if someone could point me in the right direction.

So far I have:

1) Ran the patcher to pull my framework folder.

2) Used Windows 10 to install Windows Subsystem for Linux, and Ubuntu

3) Cloned vdexextractor in Ubuntu bash

4) Compiled vdexextractor

5) Ran the compiled binary on framework folder

6) Ran the run.sh script in the tools/deodex folder on my framework folder

This leaves me with a folder of folders with files named folders_name_here-classes.dex, and I have no idea what to do with them.
[Magisk] UnexpectedGuy:
fOmey @ XDA
Patcher Version: 0.0.2.5
I: Using Apktool 2.3.4 on services.jar
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
!!! ERROR: Secure flag class not found.

I only check Secure Flag 'cause just to need that, and then the annoying error log appear. I've done deodex the framework of my phone with FulmicsDeodexer then set up smali and baksmali with version 2.2.2 on both in settings and after it's finished the process just to make sure I've extract the service.jar and it's included META-INF and classes.dex which mean it's deodexed, am I right? And then when I opened the latest Smali app and then browse for my deodexed service.jar and click on that "Patch Jar" it appear an error. Please whoever help me to success to do this process I hope they have a really nice day.
[Magisk] fOmey:
Rename that file to classes.dex, open services.apk with a zip utility and add classes.dex to the root directory.

Upload your services.jar and I'll take a look.
[Magisk] cmstew:
You failed to mention what your end goal is, but since you're posting in this forum I'm going to assume you're trying to use smali Patcher.

If that's the case, you need to find the file named services-classes.dex. Rename it to classes.dex. zip it. Change the name to services.jar. and then run smali Patcher on it.
[Magisk] fOmey:
Can someone upload a services.vdex from P?
[Magisk] cmstew:
I'll PM you.
[Magisk] Shalarion:
You are correct, that was my end goal. This worked wonderfully. Thank you.
[Magisk] wiky1405:
link smali patcher is broken?
[Magisk] UnexpectedGuy:
Here it is

View attachment services.jar

Fyi, my device is Xiaomi Redmi 4A running MIUI 8.5.1.0. In case if you need the file I'm using here it is:

View attachment baksmali-2.2.2.jar

View attachment smali-2.2.2.jar

View attachment universal-safetynet-fix-v2-beta-5.zip

View attachment FulmicsDeodexer_1.6_TUTORIAL-NGOPREX.zip

View attachment SmaliPatcher-0.0.2.5-fOmey_XDA.zip

Edit:

Almost forgot, when I finished deodexing my framework it ask "Would you like to delete all odex/oat files?" then I just leave it and continue to smali.
[Magisk] fOmey:
Any reason why your not following the instructions in the original post?
[Magisk] JimZiii:
i really need some help. i'm on a Honor 8 with android 8.0

i first tried extracting and deodexing services.jar like i did a while back on 7.0 but i had some issues extracting system.img.

so i found something called simg2img which converted it to ext4 and simg2img also came with an app called ext2explorer in which i could extract the framework folder.

i then ran it through fulmics deodexer and used that services.jar file, i no longer got an error that the file was odexed but none of the patches worked

all i got was ERROR: [name of patch] class not found.

so i tried the automated adb method but that doesn't work either, it starts dumping the framework but it stops randomly, sometimes at 20-something %, sometimes 40 and sometimes 60-something.

one time it went to 100% but then turned into "dumping framework: ?"

every time i start the adb method i also get this

adb: error: failed to copy 'system/build.prop' to 'adb\build.prop': remote open failed: Permission denied
* daemon not running; starting now at tcp:5037
* daemon started successfully
pull: building file list...
[Magisk] cmstew:
Hey all,

Here's a little web tool I made for the community. It's just a fancy shell for vdex extractor so that you don't need a linux machine to use it.

http://vdex2dex.com/
[Magisk] UnexpectedGuy:
I've tried the ADB Method and still same result.

fOmey @ XDA
Patcher Version: 0.0.2.5
system/build.prop: 1 file pulled.
pull: building file list...
adb: error: failed to copy '/system/framework/miuisdk.jar' to 'adb\framework\miuisdk.jar': remote No such file or directory
==> Dumped framework
==> Detected API: 23
I: Using Apktool 2.3.4 on services.jar
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
!!! ERROR: Secure flag class not found.

And I've tried the alternative method and still end with "Error: Secure flag class not found." any other solution?
[Magisk] JimZiii:
i finally got it working but as long as the patch is active every time install a location spoofer, yours included, i get a warning notification saying its not compatible with my system version and giving me the option to uninstall. it only shows up when its installed and if i disable the mod there's no warning.

anyone else having this issue?
[Magisk] fOmey:
I just checked the services.jar you uploaded and it's not being deodexed correctly.

You need to read up on deodexing MIUI, for whatever reason both the patcher & what ever tool you used is having problems deodexing.

On another note I've started working on cdex conversion... I've attached a beta release if anyone is on P and would like to test.
[Magisk] BadWithPhones:
Pixel XL On Pie

Hangs at Dumping Framework 39%

fOmey @ XDA
Patcher Version: 0.0.2.6
==> Binary download complete
==> Binary download complete
==> Unpacked binarys.
==> Binary download complete
adb: error: failed to copy 'system/build.prop' to 'adb\build.prop': remote open failed: Permission denied
* daemon not running; starting now at tcp:5037
* daemon started successfully
pull: building file list...

tried again dumped fine but errored here:

fOmey @ XDA
Patcher Version: 0.0.2.6
adb: error: failed to copy 'system/build.prop' to 'adb\build.prop': remote open failed: Permission denied
* daemon not running; starting now at tcp:5037
* daemon started successfully
pull: building file list...
/system/framework/: 362 files pulled. 36.2 MB/s (278991921 bytes in 7.348s)
==> Dumped framework
[INFO] Processing 1 file(s) from bin\services.vdex
[INFO] 1 out of 1 Vdex files have been processed
[INFO] 1 Dex files have been extracted in total
[INFO] Extracted Dex files are available in 'bin'
bin\compact_dex_converter: 1 file pushed. 32.6 MB/s (5087392 bytes in 0.149s)
bin\classes.cdex: 1 file pushed. 53.1 MB/s (9513440 bytes in 0.171s)
Opened '/data/local/tmp/classes.cdex', DEX version '001'
/data/local/tmp/classes.cdex.new: 1 file pulled. 87.1 MB/s (9955928 bytes in 0.109s)
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.
[Magisk] fOmey:
Awesome dude, looks like for the most part it's working...

Can you please tell me if classes.cdex.new or classes.dex is in the "bin" folder?
[Magisk] BadWithPhones:
classes.cdex is in \bin

classes.cdex.new is in a new folder in \bin named classes.cdex
[Magisk] fOmey:
Cool, give this a try:
[Magisk] BadWithPhones:
just terminates now after making a classes.cdex and classes.cdex.new in \bin