yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] ale5000:
[MENTION=7441667]AnonVendetta[/MENTION]: My tool will use directly plain smali/baksmali (which is the most compatible).

The author update it frequently and fix deodexing problems so I think it will work.

If you want to be sure, post a copy of your ROM so I can test it.
[Miscellaneous Android Development] AnonVendetta:
Well, I think my phone is looking for boot.oat and boot.art, or something inside them. I have no way to prove my suspicion. I doubt a smali/baksmali approach would be able to do anything about this. smali/baksmaki may be the most compatible, but does it have the highest success rate?

My stock ROM's system partition is up to 4GB in size, I think it would be better to just provide a zipped copy of the framework folder.
[Miscellaneous Android Development] ale5000:
[MENTION=7441667]AnonVendetta[/MENTION]: The latest version of smali/baksmali should succeed with any file, a zipped copy of the framework folder should be enough for testing I think.
[Miscellaneous Android Development] AnonVendetta:
It may succeed in deodexing my framework, but if I can't boot then Tingle is useless.

Here's the zip:

https://mega.co.nz/#!9thmGTob!05VgyXlKYaNedUdnrNnNuYREp2md_pWzj-cKaqlRYCA

MD5: 0702ab17b88d4f5ddd80b27492865030
[Miscellaneous Android Development] AnonVendetta:
[MENTION=5627087]ale5000[/MENTION]: Anything new? I think if I can get a fully deodexed and bootable system then patching with Tingle shouldn't be an issue. Do you know of any Marshmallow-compatible automated deodexers that use the smali/baksmali approach?

I'm not sure, but I think if I deodex the contents of /system/framework, then I will also need to deodex everything in/system/app and /system/priv-app, because the frameworks those apps depend on will be invalidated as a result. I would rather do it all-or-nothing anyway.

Thanks again!
[Miscellaneous Android Development] ale5000:
[MENTION=7441667]AnonVendetta[/MENTION]: Sorry, I had not time yet to test the files.

Probably I will test them tonight.
[Miscellaneous Android Development] ale5000:
[MENTION=4336485]alezardstar[/MENTION]: Sorry the documentation of Tingle isn't complete yet but on linux you need to install p7zip-full.

About the other problem I don't have the things at hand now but I will reply later.
[Miscellaneous Android Development] ale5000:
[MENTION=4336485]alezardstar[/MENTION]: I think you have an Android build with adb locked so it cannot be rooted.

I was working on a work-around but it isn't yet functional.

The only way currently is to remount the system partition as read-write manually before running the script

or using it when the phone is in the recovery.
[Miscellaneous Android Development] Primokorn:
Solved. Signature spoofing was already enabled into the custom ROM.

Don't need Tingle with Tugapower ROM FYI.

I'm using Tugapower ROM on my OP3T which includes MagiskSU.

How can I enable adb root access since there's no line in the dev options to do it?

*** Decompressing framework...
DEBUG: Decompressing framework.jar
*** Disassembling classes...
DEBUG: Disassembling framework/classes.dex
*** Patching...
*** Detected: Android 7.x / Android 6.0.x / CyanogenMod 13-14
*** Patching succeeded.
*** Reassembling classes...
DEBUG: Assembling out/classes.dex
*** Recompressing framework...
DEBUG: Compressing framework.jar
*** Copying the patched file to the output folder...
*** Rooting adbd...
DEBUG: adbd cannot run as root in production builds
*** Unlocked ADB: False
*** Remounting /system...
Traceback (most recent call last):
File "main.py", line 522, in <module>
enable_device_writing(chosen_one)
File "main.py", line 221, in enable_device_writing
remount_check = subprocess.check_output([DEPS_PATH["adb"], "-s", chosen_device, "shell", "su -c 'mount -o remount,rw /system && mount' | grep /system"]).decode("utf-8") # Untested
File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/bin/adb', '-s', '634a235', 'shell', "su -c 'mount -o remount,rw /system && mount' | grep /system"]' returned non-zero exit status 1.
[Miscellaneous Android Development] ale5000:
[MENTION=4958579]Primokorn[/MENTION]

You stumbled in the parts of the code that I haven't yet had time to implement/fix:

1) Detection for built-in support of signature spoofing

2) Workaround for locked adb

3) You also have another error but it isn't important since it is in a part of code that I need to rewrite
[Miscellaneous Android Development] Primokorn:
I guess it doesn't work with Dirty Unicorns:

python main.py
MENU

1 - Patch file from a device (adb)
2 - Patch file from the input folder

> 1

*** OS: Linux 4.9.9-1-MANJARO (linux)
*** Mode: 1
*** Working dir: /tmp/Tingle-y6pgevs4
*** Selected device: 634a235
*** Pulling framework from device...
Traceback (most recent call last):
File "main.py", line 396, in <module>
brew_input_file(mode, chosen_one)
File "main.py", line 263, in brew_input_file
output = subprocess.check_output([DEPS_PATH["adb"], "-s", chosen_one, "pull", "/system/framework/framework.jar", "."], stderr=subprocess.STDOUT)
File "/usr/lib/python3.6/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/usr/lib/python3.6/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/bin/adb', '-s', '634a235', 'pull', '/system/framework/framework.jar', '.']' returned non-zero exit status 1.
[Miscellaneous Android Development] Shadow53:
Double check that /system is mounted in TWRP before you run Tingle. I get that same error if I'm in TWRP and don't manually mount /system.
[Miscellaneous Android Development] Primokorn:
I ran this command from the homescreen. Anyway I switched back to RR.

EDIT [MENTION=7126506]Shadow53[/MENTION] I forgot that DU is odexed since Nougat... That's why it doesn't work.
[Miscellaneous Android Development] stickt73:
I got the signature spoofing to work on CitrusCAF ROM using option 3. Took a long time though. Thought I had done something wrong. Great work!!!
[Miscellaneous Android Development] JanJabko:
Works like a charm on Resurrection Remix NougatSamsung Galaxy S4 i9505 from Kubuntu Yakkety. Thanks!
[Miscellaneous Android Development] :
Getting bootloop on Citrus CAF 7.1.1 Redmi Note 3 Pro. Patched using 1st option, everything was fine while executing script. Anything else I can do?
[Miscellaneous Android Development] xk0niR:
Is this working with LineageOS 14.1?

Tingle returns a successfull patch (I am patching while in Recovery) but after rebooting microG still shows me that there is no spoofing support.

Any idea what I am doing wrong?
[Miscellaneous Android Development] pupsidze:
Is your ROM deodexed?
[Miscellaneous Android Development] xk0niR:
I solved it now using haystack way. :highfive:

Thanks for your fast reply anyway!
[Miscellaneous Android Development] josehbermudez:
Hi [MENTION=5627087]ale5000[/MENTION], thanks so much for your guidance to a solution.

Finally a helping hand deodexed Hardlight's OS2SD CM11 (Optimus One, LG-P500H) for me and later I patched with your Tingle (quick and flawlessly) from ADB using WiFi as my usb port is broken. My goal was always to install microG. Now is running.

So happy :) with the result.... Thanks again :good:
[Miscellaneous Android Development] Nosepull:
I try to use Tingle on Galaxy S7 unofficial ROMs.

https://xdaforums.com/galaxy-s7/development/rom-resurrection-remix-os-nougat-5-8-t3529388

The ROM seems to be deodexed. There are no .odex files, desktop deodex-tools claim it is deodexed, etc.

However, Tingle always fails after accessing framework.jar with the error that no .dex file is found. .dex, not .odex!

What am I doing wrong?
[Miscellaneous Android Development] Primokorn:
Did you enable root for apps and adb and usb debugging?

That's weird. RR should be deodexed you're right. Since it's an unofficial build you may want to ask the dev to support signature spoofing.
[Miscellaneous Android Development] Nosepull:
Tingle works for other ROMs on this device, SuperMan and AOSP extended. So yes, the RR and LineageOS builds seem to be odexed, which is unusual.
[Miscellaneous Android Development] kevinkvothe:
I have the same error with the same situation, and not only in RR, but OctOs, and there is no .odex file and desktop deodex-tools says is deodexed too.
[Miscellaneous Android Development] Nosepull:
Well, I found it out: Seemingly "odex" means not only that there are .odex files (which is what most sources claim is the way to recognize odexed ROMs). At least in Nougat, the /system drawer contains an arm(64) subfolder with .oat files. These contain the odex data. So in my case the ROM was odexed, I just didn't recognize it. I used a current deodex tool from this site to deodex the ROM. Took ages, but provided me with a patchable ROM.
[Miscellaneous Android Development] justmix4:
Thank you for this great tool, now I can use microG with my favorite ROM. :)
[Miscellaneous Android Development] budbay:
Would you please share what tool you used, it seems most nougat ROMs for my device are odexed. I am looking to try and deodex and use tingle. Thanks.
[Miscellaneous Android Development] Nosepull:
https://xdaforums.com/android/software-hacking/tooll-03-12-fulmics-deodexer-1-0-t3512081

Works for me to apply Tingle and use MicroG. I'm still looking for a Linux solution, however.
[Miscellaneous Android Development] cescof:
galaxy S2 lineage 14.1

windows error 2 : file not found

what to do?
[Miscellaneous Android Development] Tosgaba:
[Solved]

Hi,

When I enter the below command I get synthax error.

What I'm doing wrong could you please help.

Thanks in advance

Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)]

on win32

Type "help", "copyright", "credits" or "license" for more information.

>>> C:\Tingle\main.py

File "<stdin>", line 1

C:\Tingle\main.py

^

SyntaxError: unexpected character after line continuation character

>>>

After researching Ubuntu forums, I learned that I must run the command from regular cmd.

Here is the proper command and corresponding output of process:

Microsoft Windows [Version 6.1.7601]

Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\PanzerWaffe>C:\Tingle\main.py

MENU

1 - Patch file from a device (adb)

2 - Patch file from the input folder

> 2

*** OS: Windows 7 (win32)

*** Mode: 2

*** Working dir: C:\Users\PanzerWaffe\AppData\Local\Temp\Tingle-bu2m3w2i

*** Decompressing framework...

DEBUG: Decompressing framework.jar

*** Disassembling classes...

DEBUG: Disassembling framework/classes.dex

*** Patching...

*** Detected: Android 7.x / Android 6.0.x / CyanogenMod 13-14

*** Patching succeeded.

*** Reassembling classes...

DEBUG: Assembling out/classes.dex

*** Recompressing framework...

DEBUG: Compressing framework.jar

*** Copying the patched file to the output folder...

*** All done! :)

Your original file is present at C:\Tingle\output\Manual\framework.jar.backup

If your device bootloop, please run this command on the pc when the connected de

vice is inside recovery:

adb push "C:\Tingle\output\Manual\framework.jar.backup" /system/framework/framew

ork.jar
[Miscellaneous Android Development] ale5000:
Probably you have used it in recovery without mounting the system partition.

I need more info to help you.

Also it would be nice if you can re-try with the latest version of Tingle.
[Miscellaneous Android Development] cescof:
i mounted system and then also data, but nothing.

however, i exported framework file in the input directory of tingle, and it worked.

Now i can use Galaxy S2 with Los 14.1 at great speed and performances thanks to microg (google play services is a boulder)
[Miscellaneous Android Development] ale5000:
Could you please send me the "full" log?

It is hard to fix the problem without all info.
[Miscellaneous Android Development] ale5000:
I broke it when I have updated smali/baksmali, now it should works again, please re-try.
[Miscellaneous Android Development] zeeBomb:
Tingle aint working for me...but I got winrar tho. Do I need 7-zip? I tried with 1 but I get my device can't be found?

Edit: Nevermind don't need it. My device's ROM have location spoofing. Woo!
[Miscellaneous Android Development] ale5000:
Hi,

first try to uninstall and reinstall "Signature Spoofing checker" to be sure.

Then there are a few possibilities that prevent it from working:

- You have magisk or xposed installed;

- Or you ROM was odexed and you haven't deodexed it correctly;

- Or your ROM was already supporting signature spoofing but the option was hidden and disabled by default so mostly unnoticed.

Check that you aren't one of these cases.
[Miscellaneous Android Development] ale5000:
The fact that you have patched it before uninstalling Xposed may have caused problems, if you can, try to format the /system partition (you don't need to wipe data, just system), mount the system partion in the recovery settings if it isn't already mounted, flash the ROM again and then patch it with Tingle.

After that wipe cache and dalvik/ART cache and restart the phone.

Then after you have checked that everything is working including signature spoofing you can install Xposed again.

If you haven't deodexed the ROM before then it is already deodexed since otherwise Tingle will tell you.

If there is then it is probably in developer settings but it depend from the ROM.
[Miscellaneous Android Development] raptorddd:
where can i find instructions or what is needed.?
[Miscellaneous Android Development] ale5000:
Here.

If you scroll down the page you will find all the instructions.
[Miscellaneous Android Development] raptorddd:
thank you:good:
[Miscellaneous Android Development] raptorddd:
okey i knew i would need help with this.. i tried but no succsess cause theres a part i cant understand..

i have minimal adb fastboot. java and python 3.6

i have never enter adb to get logcat or do anything besides unlock dvice.

so how do i enter adb mode.

i tried adb fastboot

and got error see picture.

now MTP reboots when i select it on home screen.

other way to inject manually but i ould love to learn adb thing its necessary like when i wanted to get log of bootloop

what am i doing wrong.?
[Miscellaneous Android Development] ale5000:
This has nothing to do with Tingle.

What has to do logcat with fastboot?

I don't quite understand what you want to do.

Please explain exactly what you want to obtain.
[Miscellaneous Android Development] raptorddd:
i used option 2 manually and it worked. i needed framework.jar and also build.prop file in input folder..

well i wanted to inject to rom using your method explained on github. instead of manually.

am just saying i have search and i do not understand and i want to learn to use ADB.

am saying this is important using ADB as sometimes you need to get logcat from bootloooping software. or other things.

i have tried many times to get ADB to work. i just dont know how.

i said i have used adb and fastboot to unlock phone.. but never used ADB like for injecting spoofing, push files ect.

if am using minimal adb fastboot

how do i get ADB to connect to phone.? i want to learn. i ve search and also look at videos but i quite dont understand or theres something wrong am doing.

so to have my phone communicate in ADB what i do.? if you could please teach me.

cause when i run tingle i get adb missing executable error
[Miscellaneous Android Development] ale5000:
Tingle execute all the commands automatically, to use it you don't have to use adb directly because Tingle do it.

If Tingle do not see adb it is because you haven't added the folder where adb reside to the PATH environment variable of Windows.

To check it, just run adb without be in the "Minimal ADB and Fastboot" folder, if it doesn't work then the adb folder isn't in the path environment variable.

The adb installer should have done it or you can do it manually.
[Miscellaneous Android Development] AnonVendetta:
I've found that you can run the Tingle patch on Android, no PC required, by using an app called QPython3. QPython may also work. You can get either from Play Store or GitHub, or a direct APK download by searching Google.

Steps for success:

1. Install app, go to its' settings, enable root, then go back to the main screen and open a root console. Then open your root management app and check that root was granted. Now go your Settings app and force stop QP3. Next download the Tingle patch zip from GitHub (if you don't see the link then tell your browser to open the Desktop version of the page, then click "Clone or download"). Now open the zip and copy the *contents* of the " tingle-master" folder (not the folder itself) to QP3's "scripts3" folder (located in your internal storage). Next copy your ROM's framework.jar and build.prop to the "input" folder (must already be deodexed). Then open QP3, tap the yellow/green snake icon, select "run script" then "main.py". Choose option 2 (patch from input folder) then sit back and wait. I don't know how long it will take, could be anywhere from a few mins up to an hour. Depends on CPU speed. Don't mess with your device while it's running. If success doesn't come within an hour then you can assume the patch is hung. I've done this at least a dozen time and it worked most of the times. I tested with Nougat ROMs like EmotionOS, LineageOS, AOSP, CM14.1, Resurrection Remix, etc.

I'm not sure whether Tingle needs to run as root/admin, but in all my tests the patch would hang forever at "assembling out/classes.dex" if QP3 didn't request root.

There is also a Magisk module called NanoMod that claims to have a framework.jar patcher that can enable sig spoofing, but I haven't tried it, Magisk has given me much trouble overall so I refuse to use it. I prefer using the non-Magisk version of Phh's Superuser.

If you want to use Xposed on Nougat then you can try the PurifyOS or BlackSoul versions (the former is preferred but both are relatively unstable). Then just install DVDAndroid's Xposed Installer, afterwards install FakeGApps v1.1 and enable the module then reboot. You can see that sig spoofing is enabled in MicroG without a patched framework.jar. One advantage of this is that the module itself doesn't modify the system partition and it works with odexed ROMs (but installing Xposed itself will modify system unless you can get the Magisk version of Xposed working).

A last tip, install the MicroG GMS and GSF APKs to /system/priv-app if you are using Nougat, or else they will not work. The DroidGuard APK must also go there if you want to pass SafetyNet. This requires no root and no Xposed, Busybox. SELinux permissive, etc, basically anything that would flag SafetyNet. Or else you can use Magisk and hide root.

Hope this helped someone!
[Miscellaneous Android Development] ale5000:
[MENTION=7441667]AnonVendetta[/MENTION]: When running inside Android you can use also option 3 to avoid using the input folder an get the file to patch directly from the phone.

It is unlikley that it will hung but on old phones it may take up to 3 hours (tested).

PS: It still need to be improved but I didn't have time yet.
[Miscellaneous Android Development] digitman xxx:
[MENTION=5627087]ale5000[/MENTION] decided to use this patch for first time, is it possible to patch unrooted phone by Tingle.

i read github description and already download Python( first time using), 7-Zip, Java and ADB but still couldn't get the idea.

any tutorial (step by step guide) here i googled about tingle tutorial and how it worked but found nothing, but already learned a little info about python.

guys any chance here to get signature spoofing by tingle.? as ale5000 have no time right now.
[Miscellaneous Android Development] ale5000:
The instructions are here (scroll down the page).

If you have problem with the steps described, please tell me at which step you have problems.

The dependencies depend from the OS (on Windows you don't need 7-Zip since it is already included in Tingle).

To patch the phone while it is active you need root (on custom ROMs isn't necessary to have full root, only ADB root is needed) but if you use Tingle while it is in the recovery it may work also in other conditions.

If you have a cutom recovery it should always work, instead if you have a stock recovery I'm not sure but it may work.
[Miscellaneous Android Development] digitman xxx:
ok bro for the github page already got all it's description and steps, except step no. (5)Now, on the computer, run python main.py (or python3 main.py). i'm not understand what does it mean run here( as i told in above post i'm very new in python) anyway i just click on main.py file in extracted tingle-master folder that's all got a window with 2 options as described select "1" automatic got error (attached) then try with "2" manual got error (attached too).

OS: Win 7 32-bit

Python: 2.7.13

Custom Rom: RR 6.0.1 mm ADB root only

Custom Recovery: TWRP 3.0.0

Edit: already enabled Android debugging and give access to ADB root
[Miscellaneous Android Development] ale5000:
A double click on main.py is also fine.

For the other error you must install adb on the pc.
[Miscellaneous Android Development] digitman xxx:
:) ok already download ADB platform zip and so on but let me search more then comeback n feedback maybe somthing goes wrong in my ADB setup.
[Miscellaneous Android Development] digitman xxx:
ok bro, got where the issue now and solved it, let me briefly define the issue and solution may help some others.

issue:

got

Error: Missing executable => adb
Error Code: 65

issue description:

although already install ADB & can access the device and send ADB commands, but Tingle couldn't run when double click;) main.py in tingle-master extracted folder giving error above.

Solution

: Add a folder of ADB platform-tools to Windows’ system PATH

Solution benefits:

beside solve this error (as many of you know) you should now be accessible from any command prompt, no need to specify its directory. or open command prompt inside platform-tools folder itself.

[MENTION=5627087]ale5000[/MENTION] Unfortunately faced a new Error (attached) something related to No dex file or the rom is odexed. so how to solve this.
[Miscellaneous Android Development] ale5000:
Unfortunately this problem is currently not solvable directly for odexed ROMs.

The current workaround is to deodex the entire ROM with a tool like Universal Deodexer.

In the future I will make it simpler.
[Miscellaneous Android Development] digitman xxx:
for the tool you mentioned i am not sure if it supports android mm also it's thread looks outdated (no response from OP), is NanoMod-patcher also support only deodexed rom? is it ....OMG
[Miscellaneous Android Development] ale5000:
I don't know, I never had time to try it.

I have many things to do before.
[Miscellaneous Android Development] digitman xxx:
Never mind, already test it and yes patched my odexed rom, by the way working good with your microG unofficial installer
[Miscellaneous Android Development] osilvab:
Im trying to patch for lineage 14.1 on fairphone2 but tingle is not able to get the framework:

MENU

1 - Patch file from a device (adb)
2 - Patch file from the input folder

> 1

*** OS: Windows 10 (win32)
*** Python: 2.7.13 (32 bit)
*** Mode: 1
*** Working dir: c:\users\osilv\appdata\local\temp\Tingle-kqrlil
*** Selected device: f580b700
*** Automounting /system...
Traceback (most recent call last):
File "C:\Users\osilv\Desktop\ADB\main.py", line 437, in <module>
brew_input_file(mode, SELECTED_DEVICE)
File "C:\Users\osilv\Desktop\ADB\main.py", line 281, in brew_input_file
adb_automount_if_needed(chosen_one, "/system")
File "C:\Users\osilv\Desktop\ADB\main.py", line 195, in adb_automount_if_needed
output = subprocess.check_output([DEPS_PATH["adb"], "-s", chosen_device, "shell", "case $(mount) in *' "+partition+" '*) ;; *) mount -v '"+partition+"';; esac"]).decode("utf-8")
File "C:\Python27\lib\subprocess.py", line 212, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "C:\Python27\lib\subprocess.py", line 390, in __init__
errread, errwrite)
File "C:\Python27\lib\subprocess.py", line 640, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified