yashsingh1/xdaforums huggingface dataset:
[Android Themes] koekoek91:
[MENTION=4315551]Ticklefish[/MENTION]

I tried again to deodex my Sony Xperia Z5 Nougat ROM, using TMA 14.4.

I think there were less errors this time, but flashing it through TWRP still results in either bootloop or just hangs on the Sony (white bootlogo).

Added the history.txt
[Android Themes] josephnero:
[MENTION=4315551]Ticklefish[/MENTION]

actually I should thank you mate. :)

[MENTION=5096181]Hamidreza2010[/MENTION]

yep.flashed with no problems.everything is working

[MENTION=7328701]koekoek91[/MENTION]

are you using the twrp from rootkernel?that's the culprit here
[Android Themes] MarcTremonti:
alright thank you.

i tried it with 3MinitBattery. but when it comes to deodexing my OPSystemUI.apk to get the smali folder i am getting problems again with TMA.:crying:

after the deodexed zip is created i copied the OPSystemUI.apk out of it and decompiled it, but it was the same as before without any smali folder, which should be there after deodexing right?

am i doing something completely wrong here?
[Android Themes] koekoek91:
I don't think thats the TWRP im using, but im not 100% sure.

I've been using the same TWRP for quite a while now so I dont really remember where I originally got it from.
[Android Themes] Ticklefish:
There are less errors, yes. But there are still errors and those could be why your rom isn't deodexing. Some you can cope with, it's just a case of manually deleting the relevant APK folder from your collection and installing it from Google Play when everything's done. There's a SemcCalendar app that's not deodexing, for example,

The biggest issue though is this error here:

01-04-2017@1708 --- Processing "_WorkArea1\_deodex\framework\arm64\boot-framework.oat"
Exception in thread "main" org.jf.util.ExceptionWithContext: Exception occurred while writing code_item for method Landroid/accessibilityservice/AccessibilityServiceInfo;-><init>(Landroid/content/pm/ResolveInfo;Landroid/content/Context;)V
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:824)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:267)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:245)
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 0x52
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1076)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:820)
... 5 more
Caused by: org.jf.util.ExceptionWithContext: Unsigned short value out of range: 68696
at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:338)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1048)
... 6 more

Here we can see that TMA is unable to deodex "boot-framework.oat". This seems to be to due to an "Unsigned short value out of range". Doing a quick bit of Googling tells me that baksmali throws up this error when an OAT file has too many methods in it. If I remember correctly, boot-framework.oat has smali files for two classes.dex files. TMA should be able to detect that and deal with it accordingly. Strange that it doesn't. It did when I tried it with the files kindly shared by josephnero.

Are you able to share your files please? I think I need to take a look and see what's going on.

Nope. You're doing everything right. Your rom is Android 7.1 but TMA seems to think it's Lollipop for some reason. Because of that it's trying to use the Lollipop method to deodex the rom and the whole thing fails.

I'll update the code now to fix this and I should be able to upload a corrected version in a few minutes. Sorry about that. :(
[Android Themes] josephnero:
try using this one and report back buddy.remember to put the zip in internal storage

https://xdaforums.com/crossdevice-dev/sony/twrp-3-1-0-z5-z5c-z5p-t3571050
[Android Themes] koekoek91:
Okay im uploading the App/Framework/Priv-App/Buildprop files + the TMA created deodexed zip (which fails to boot) right now.

Noob question maybe.... how can I recognize which APK's TMA is not able to deodex? So how can I know which folders I should delete?
[Android Themes] Ticklefish:
I've uploaded a corrected version just now. This should now recognise 7.1. roms as Nougat and try to deodex them the right way.

Thank you, I really do appreciate it. It's very handy to be able to test code on files from different people.

I'll work on TMA reporting the errors as it should tell you straight away if it can't deodex something but, if in doubt, just look through the history.txt. That will tell you what you need to know.

As for the folders, if you can't deodex Photos.apk (for example) you could delete the Photos folder from the app folder in the work area. That way TMA will just ignore it and you can install it from Google Play.

However this should not be needed in your case. I suspect your issues are all the same - TMA is not detecting those different classes.dex files. If I can fix that, all your files should deodex. :D
[Android Themes] koekoek91:
I see... I haven't tried putting the zip in internal storage.

Thanks... ill try again using that TWRP, and flashing from internal storage instead of external.

Will report back soon.

Here are my files: https://drive.google.com/open?id=0B1-5Lr_Sntl5bWJKaVktdHMxYlk

https://drive.google.com/open?id=0B1-5Lr_Sntl5LXdlT01kbVJEQXc

Going through the whole history.txt is kind of a hassle, but ill have a look through it when I get the time to do so.

I can imagine it must be a hassle for you too to be able to fix everyone's problems :silly:

As always appreciate your time and work mate, and I hope you will manage to fix these problems.

In the meantime I will be trying [MENTION=3844251]josephnero[/MENTION] 's suggestions, I have little confidence it will work out but its worth a shot :p

Will report back later.
[Android Themes] koekoek91:
Just tried with this recovery, and put it on internal storage, but still ending up in a bootloop when flashing.
[Android Themes] josephnero:
[MENTION=7328701]koekoek91[/MENTION]

damn.sorry to hear that mate.as you see it was the problem in my case

some users have issues including my self after flash zip the system hang on white sony logo

while flashing the rom using rootkernel that included recovery on the boot kernel (boot partition) so you will need to flash this rom using recovery partition (fota kernel) in order to flash the rom correctly

https://xdaforums.com/z5-compact/development/rom-stock-z5c32-3-0-376r2dau-t3570248
[Android Themes] Ticklefish:
Thank you for your files. I tried them on the version I uploaded yesterday and they all deodexed without any error at all. TMA was able to detect that some of the APK and JAR files contained more than one classes.dex and processed them correctly.

Can you download TMA again and try it again please? It worked on my PC so should on yours.

I'll attach my history.txt so you can see what a successful deodex looks like.
[Android Themes] koekoek91:
Sounds promising mate.

You mean just download again from the first post where it says 14.4.0?
[Android Themes] Ticklefish:
Yup. :)
[Android Themes] koekoek91:
Alright, will go straight at it and let you know if it worked this time A.S.A.P :)

---------- Post added at 15:28 ---------- Previous post was at 14:29 ----------

@Ticklefish

I must be doing something wrong I guess.

I don't know why else it would work for you and not for me.

Have a look at pretty much the end of my history.txt, starting from boot-framework.oat things go south lol :(

What could I possibly be doing wrong?

Also if its not to much to ask, maybe you could share the zip that you created with my files so I can see if it boots?

I still want to be able to do it myself and for TMA to work correctly for me, but im at a loss, tried so many times :p

Thank you for your great support though :)
[Android Themes] Ticklefish:
I'm not sure what's happening here. TMA is able to cope with the various files in your rom with multiple classes.dex in them alright..

02-04-2017@1447 --- Processing "_WorkArea1\_deodex\app\com.sonymobile.support\oat\arm64\com.sonymobile.support.odex"
02-04-2017@1447 --- Extracting From "/system/app/com.sonymobile.support/com.sonymobile.support.apk"

..but it falls over when trying to process your boot-framework.oat.

02-04-2017@1503 --- Processing "_WorkArea1\_deodex\framework\arm64\boot-framework.oat"
Exception in thread "main" org.jf.util.ExceptionWithContext: Exception occurred while writing code_item for method Landroid/accessibilityservice/AccessibilityServiceInfo;-><init>(Landroid/content/pm/ResolveInfo;Landroid/content/Context;)V
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:824)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:267)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:245)
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 0x52
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1076)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:820)
... 5 more
Caused by: org.jf.util.ExceptionWithContext: Unsigned short value out of range: 68696
at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:338)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1048)
... 6 more

This is a different error from before and I haven't been able to find out much about it. Nor have I been able to find out why I didn't get this error using the exact same tool on the exact same files.

I did wonder if it's something to do with your version of Java but you're running a more recent version than I am so I don't think that's the issue.

I'll post on baksmali.com about it to see if the dev can shed any light on the issue.

Meanwhile, I am more than happy to share the ZIP I made with you. It's uploading to Mediafire now.

It is quite big though, and my internet isn't superfast, so it's debatable whether it'll upload in time. Keep your fingers crossed!
[Android Themes] koekoek91:
Well... the errors are getting less, so im sure we'll get there :p

It just strikes me that for you it completed without a single error and for me it doesn't.

Oh well...

From my end.... I could try it with different firmware (there's a new update from Sony for the Z5) to see if it makes any difference, but I doubt it will.

In the meantime I would be very happy to try and flash the zip created by you :)

Take your time mate, im not in any rush hehe :good:
[Android Themes] Ticklefish:
It is a puzzle. I'd understand if the error message said something about the amount of memory you had or something else that could be different between your PC and mine. Strange..

I've created an issue here: https://github.com/JesusFreke/smali/issues/506

Let's see what the dev thinks. It might be that I'm just missing something obvious.

Mediafire currently says it's uploaded 27% and there's 70 minutes left. I'm here for another 60 and I don't mind staying late for a moment or two.
[Android Themes] koekoek91:
Alright thanks mate.

I'll be happy to donate you a couple of beers once this gets sorted out, for all your efforts :highfive:

It would be neat for me to be able to deodex using TMA without problems myself.

If the upload doesn't finish before you need to go, tomorrow there's another day ;)

Can't wait to try it out though, but there are more important things sometimes.

Fingers crossed I guess, and keep me updated about the issue you've created with the dev on github :)
[Android Themes] Ticklefish:
I could upload it tomorrow, yes. But I'm an impatient fool. :D

No beers needed but I'm always grateful if people put a banner for TMA in their signature.....;)
[Android Themes] koekoek91:
Could you help me in the right direction how I can do that?

And would I still be able to keep my current device status in my signature like I have now?

Im starting to feel bad here... asking you so many questions LOL :silly:
[Android Themes] Ticklefish:
It's not a problem. :)

Click on the cog-shaped icon at the top of the screen and that takes you to the User Control Panel. One of the options on the left side is an option to edit your signature.

And you can have whatever you like in your signature.
[Android Themes] koekoek91:
I had come this far myself...

The only thing I dont know is where to get the banner and how to add it?

Do you mean just the image that is at the very top of the first post?

I can save it to my PC but its not moving anymore when im opening it on my PC :laugh:
[Android Themes] Ticklefish:
The banners are at the bottom of the OP. There's a few different sizes to choose from.
[Android Themes] koekoek91:
Okay, im starting to feel like a total noob here lol...

I found the banners, and trying to enter the link of one of the banners location into the field but its giving me an ''invalid file'' error when uploading.

I notice on the bottom of the screen under signature editing permissions it says: ''Can upload Animated GIF for Signature No''.

Im guessing this might have something to do with it? :silly:
[Android Themes] jot.pixel:
Such an esssential de/recompiling tool
[Android Themes] Ticklefish:
You can't upload an animated GIF directly, no. It needs to be hosted somewhere. I have all the images I use for xda hosted on imgur.

Here's the flashable ZIP for you: http://www.mediafire.com/file/2tqgde0dbb57u50/tma_Deodex-02-04-2017@1144.zip

Make sure you make a backup before you use it!

Thanks! Always good to have nice feedback! :highfive:
[Android Themes] koekoek91:
Thanks mate, ill charge up my phone and run a backup and then flash the zip.

Will let you know if it booted ;)

Ill also have a look again to try to add a banner for you in my signature.
[Android Themes] koekoek91:
[MENTION=4315551]Ticklefish[/MENTION]

Alright mate, im happy to report that the zip you created for me has booted succesfully, so thanks alot for that :)

Im following the conversation between you and JesusFreke on github to see if he can shed some light on the issue.

I plan to update my phone soon to the new firmware that 's been released by Sony, and it would be awesome if I could then finally deodex it myself :p

In the meantime ill try it again with the new firmware and see if it works or not.

About the banner.... I can't get it done for some reason and I feel so noob because of it :p

I've uploaded one of the banners here: https://postimg.cc/image/d5jjjtjip/0eb2dc71/

And then I try to add this url

In the Option 1 - Enter the URL to the Image on Another Website, under Signature picture, but it keeps saying ''invalid file''.

Feel so stupid lol...

Please help mate, I would love to show atleast some sort of appreciation to you :p

---------- Post added at 18:01 ---------- Previous post was at 17:57 ----------

Okay never mind.... I guess I figured it out finally hahah :)

ill add a bigger one later :)
[Android Themes] Ticklefish:
Your signature looks awesome now. :D lol

I'm glad to hear the ZIP worked. Now we just need to work out why you couldn't make it. I'm at a loss, to be honest...
[Android Themes] koekoek91:
I will try it again with the newer firmware. Im not expecting it to work but ill just keep trying whenever I have time, who knows it might just work :p

One little issue that I encountered though ( can't imagine it is causing the deodexing failure ) is that when I tried to remove the old version of TMA that didn't work.

I got the error presented as in the screenshot i've added. Some files in the deodex folder won't delete.

So what I just did is move the entire TickleMyAndroid folder to my desktop, so it wasn't in my root directory anymore, then placed the new TickleMyAndroid self extracting exe file to the my root directory and let it extract.

I still have the old files that won't delete, in the old TickleMyAndroid folder that I moved to my desktop.

I can't imagine this is the cause of the failure as I tried to deodex with a full new set of files without any old files in it.

Would be nice if I could completely remove those old files though, haven't put much time into trying to get them all deleted.

You probably encountered this before or had someone else ask about this before?
[Android Themes] Ticklefish:
Funky wallpaper... :)

I've had this happen before, yes. Some of the filenames are too long for Windows to cope with. You can either use the "Reset "Tickle My Android"" option in TMA's setting menu or use the command prompt to do it. Run "cmd.exe", enter "cd whatever-the-address-these-files-are-in", then enter "del *.*". That should delete those files without any trouble.

Why will the command prompt handle longer filenames than Windows even though it's running in Windows? I wish I knew. lol
[Android Themes] koekoek91:
Thanks, it worked :good:
[Android Themes] Er. Aditya:
hey great one again service.jar deodexed badly here's history.xml if you wana check something

device : j7 prime

6.0.1
[Android Themes] Sczar:
[MENTION=4315551]Ticklefish[/MENTION]

Thanks very much for this tool. Superb Indeed.

Ive been using it for awhile now with no issue at all except the last time I tried recompiling my framework.jar I am getting an error msg. I know I am missing something and my brain is not working right atm lol.

I tried to recompile with Original and New signature

Thanks in advance

29-03-2017@1914 --- WorkArea Set To "WorkArea1"
29-03-2017@1917 --- "_WorkArea1\framework-res.apk" installed to PC, from Quick menu

I: Framework installed to: C:\Users\Sczar\AppData\Local\apktool\framework\1.apk

29-03-2017@1917 --- "_WorkArea1\twframework-res.apk" installed to PC, from Quick menu

I: Framework installed to: C:\Users\Sczar\AppData\Local\apktool\framework\2.apk

29-03-2017@1918 --- "_WorkArea1\_in\framework.jar" sent to recompiler, from Quick menu
29-03-2017@1918 --- "_WorkArea1\_working\framework.jar" recompile failed with new signature, using "apktool_2.2.2.jar"

I: Using Apktool 2.2.2
I: Smaling smali folder into classes.dex...
..\_WorkArea1\_working\framework.jar\smali\android\net\TrafficStats.smali[1039,4] There is already a label with that name.
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: android/net/TrafficStats.smali
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:75)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:59)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:36)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:404)
at brut.androlib.Androlib.buildSources(Androlib.java:335)
at brut.androlib.Androlib.build(Androlib.java:291)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:227)
at brut.apktool.Main.main(Main.java:84)

29-03-2017@1920 --- "_WorkArea1\_in\framework.jar" sent to recompiler, from Quick menu
29-03-2017@1921 --- "_WorkArea1\_working\framework.jar" recompile failed with original signature, using "apktool_2.2.2.jar"
[Android Themes] Dzepar:
[MENTION=3500850]Sczar[/MENTION]

This is your error:

I: Using Apktool 2.2.2
I: Smaling smali folder into classes.dex...
..\_WorkArea1\_working\framework.jar\smali\android\net\TrafficStats.smali[1039,4] There is already a label with that name.
Exception in thread "main"

You have added a name in TrafficStats.smali line 1039, i don't know what your doing but you need to change that name to something different. :)

Good Luck!
[Android Themes] Sczar:
Thank you Sir. I appreciate your help :good:
[Android Themes] Ticklefish:
Excellent. :D

In what way was it deodexed badly? I don't see any errors when TMA tried to process services.odex..

03-04-2017@259 --- Processing "_WorkArea1\_deodex\framework\oat\arm\secvisualeffect.odex"
[COLOR=red]03-04-2017@259 --- Processing "_WorkArea1\_deodex\framework\oat\arm\services.odex"[/COLOR]
03-04-2017@259 --- Processing "_WorkArea1\_deodex\framework\oat\arm\settings.odex"
[Android Themes] Er. Aditya:
Working deodexed size is 80mb and tma deodexed size is in kb's
[Android Themes] Ticklefish:
Hmm..can you share your files please? I'll only need your framework folder and build.prop.
[Android Themes] MarcTremonti:
- deleted -

helped myself^^
[Android Themes] Er. Aditya:
here you go sir

https://drive.google.com/open?id=0B-P3615kysZxU21VN1U3SzlwUkU
[Android Themes] koekoek91:
[MENTION=4315551]Ticklefish[/MENTION]

Today I have a day off, so I decided to try a few things while waiting, and I was bored :p

I tried deodexing new updated firmware from Sony, but again it fails at the boot-framework.oat

I also tried uninstalling Java and installed the Java version that you were using when you were able to fully deodex my files without errors, but for me it still fails at the boot-framework.oat

So the Java version isn't the problem either.

Just thought i'd let you know.

Guess ill just have to wait and see if JesusFreke knows what the problem might be.

Edit: I realized I also have a laptop and tried it on that and deodexing worked fine without without errors.

So im starting to think it is something on my desktop PC that is causing it to throw errors on my PC, since on my laptop and on your PC it worked fine?
[Android Themes] tdunham:
[MENTION=4315551]Ticklefish[/MENTION]

Ok, so I decided to play with deodexing the Nougat build that dropped last night for our Note 5.

I'm just curious why these files didn't get pulled during the initial adb pull?

I would think that the 2 step deodex process shouldn't require leaving the phone plugged in the entire time.

Needless to say, I had to start over and I'm giving it another try since it didn't look like framework deodexed completely (framework/arm folder still exists).

05-04-2017@945 --- Pulling ".sqsh" Files From "system/" To "_WorkArea1\_deodex\"
05-04-2017@945 --- Workspace Preparation Complete

adb: error: remote object 'system/odex.app.sqsh/' does not exist
adb: error: remote object 'system/odex.framework.sqsh/' does not exist
adb: error: remote object 'system/odex.priv-app.sqsh/' does not exist

Edit: Or maybe this is normal and those files don't exist on Samsung firmware?
[Android Themes] thereassaad:
Yes sir those never seen them in samsung fw while deodexing , maybe they required for sony etc but definitely not for samsung nougat ..