ale5000-git / tingle

Tingle - Android patcher
http://forum.xda-developers.com/showthread.php?t=3438764
GNU General Public License v3.0
160 stars 11 forks source link

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 16: ordinal not in range(128) #33

Closed breversa closed 7 years ago

breversa commented 7 years ago

Hi,

Coming from https://github.com/microg/android_packages_apps_UnifiedNlp/issues/133, I wanted to give the unofficial microG installer a try (from https://forum.xda-developers.com/android/development/microg-unofficial-installer-t3432360).

Since I'm using LineageOS 14.1, I first need to add signature spoofing, so i came here to try Tingle.

I downloaded the current version, but here's the output : `python main.py MENU 1 - Patch file from a device (adb) 2 - Patch file from the input folder

1 OS: Linux 4.10.0-22-generic (linux) Mode: 1 Working dir: /tmp/Tingle-sCi2uB Selected device: ???????????? Traceback (most recent call last): File "main.py", line 402, in OUTPUT_PATH = os.path.join(SCRIPT_DIR, "output", SELECTED_DEVICE) File "/usr/lib/python2.7/posixpath.py", line 73, in join path += '/' + b UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 16: ordinal not in range(128)`

That must be some kind of UTF-8 encoding issue, right ?

ale5000-git commented 7 years ago

@breversa: Probably.

ale5000-git commented 7 years ago

Please try the latest version, it should fix the problem.

breversa commented 7 years ago

Getting closer :

$ sudo python main.py
MENU

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

> 1

 *** OS: Linux 4.10.0-22-generic (linux)
 *** Mode: 1
 *** Working dir: /tmp/Tingle-tlh737
 *** Selected device: LGH81563e0706b
Traceback (most recent call last):
  File "main.py", line 404, in <module>
    OUTPUT_PATH = os.path.join(SCRIPT_DIR, "output", SELECTED_DEVICE)
  File "/usr/lib/python2.7/posixpath.py", line 73, in join
    path += '/' + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 16: ordinal not in range(128)
ale5000-git commented 7 years ago

@breversa: Please try the latest version and report back :)

breversa commented 7 years ago

Yes, I will try this week-end. Thank you ! :)

Le 24 juin 2017 13:34, "ale5000" notifications@github.com a écrit :

@breversa https://github.com/breversa: Please try the latest version and report back :)

It would be nice to get a feedback also if it is working correctly since I want to be completely sure it is fixed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ale5000-git/tingle/issues/33#issuecomment-310833386, or mute the thread https://github.com/notifications/unsubscribe-auth/AB-a7KhWsP61jcXvG1IABQT8wA-Snjenks5sHPQ0gaJpZM4N9fnX .

breversa commented 7 years ago

It works ! :D

$ sudo python main.py 
MENU

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

> 1

 *** OS: Linux 4.10.0-24-generic (linux)
 *** Mode: 1
 *** Working dir: /tmp/Tingle-AM5WAn
 *** Selected device: LGH81563e0706b
 *** Pulling framework from device...
      DEBUG: 4643 KB/s (6590396 bytes in 1.386s)
 *** 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: restarting adbd as root
 *** Unlocked ADB: True
 *** Remounting /system...
      DEBUG: remount succeeded
 *** Pushing changes to the device...
      DEBUG: 7663 KB/s (6493638 bytes in 0.827s)
 *** All done! :)

Your original file is present at /home/…/Tingle/tingle-master/output/LGH81563e0706b/framework.jar.backup

If your device bootloop, please run this command on the pc when the connected device is inside recovery:
adb push "/home/…/Tingle/tingle-master/output/LGH81563e0706b/framework.jar.backup" /system/framework/framework.jar
ale5000-git commented 7 years ago

Good :)