yashsingh1/xdaforums huggingface dataset:
[Android Themes] starbucks2010:
Hello,

I'm on a custom deodex N ROM and I was trying just to decompile/recompile SecGalery2015.apk. The process goes ok but the app it FC 4-5 secs after I open the gallery. In the logcat I see:

03-01 17:59:14.254: E/AndroidRuntime(21078): FATAL EXCEPTION: main

03-01 17:59:14.254: E/AndroidRuntime(21078): Process: com.sec.android.gallery3d, PID: 21078

03-01 17:59:14.254: E/AndroidRuntime(21078): android.content.res.Resources$NotFoundException: File res/raw/gallerychoice.ogg from drawable resource ID #0x7f090000

03-01 17:59:14.254: E/AndroidRuntime(21078): at android.content.res.ResourcesImpl.openRawResourceFd(ResourcesImpl.java:303)

03-01 17:59:14.254: E/AndroidRuntime(21078): at android.content.res.Resources.openRawResourceFd(Resources.java:2136)

03-01 17:59:14.254: E/AndroidRuntime(21078): at android.media.SoundPool.load(SoundPool.java:248)

03-01 17:59:14.254: E/AndroidRuntime(21078): at com.sec.samsung.gallery.view.utils.SoundUtils.soundSet(SoundUtils.java)

03-01 17:59:14.254: E/AndroidRuntime(21078): at com.sec.android.gallery3d.app.AbstractGalleryActivity.getSoundUtils(AbstractGalleryActivity.java)

03-01 17:59:14.254: E/AndroidRuntime(21078): at com.sec.samsung.gallery.view.albumview.AlbumViewState$24.onGLIdle(AlbumViewState.java)

03-01 17:59:14.254: E/AndroidRuntime(21078): at com.sec.samsung.gallery.controller.GLIdleTimerCmd.handleMsgRunListener(GLIdleTimerCmd.java)

03-01 17:59:14.254: E/AndroidRuntime(21078): at com.sec.samsung.gallery.controller.GLIdleTimerCmd.access$000(GLIdleTimerCmd.java)

03-01 17:59:14.254: E/AndroidRuntime(21078): at com.sec.samsung.gallery.controller.GLIdleTimerCmd$1.handleMessage(GLIdleTimerCmd.java)

03-01 17:59:14.254: E/AndroidRuntime(21078): at android.os.Handler.dispatchMessage(Handler.java:102)

03-01 17:59:14.254: E/AndroidRuntime(21078): at android.os.Looper.loop(Looper.java:154)

03-01 17:59:14.254: E/AndroidRuntime(21078): at android.app.ActivityThread.main(ActivityThread.java:6688)

03-01 17:59:14.254: E/AndroidRuntime(21078): at java.lang.reflect.Method.invoke(Native Method)

03-01 17:59:14.254: E/AndroidRuntime(21078): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)

03-01 17:59:14.254: E/AndroidRuntime(21078): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)

03-01 17:59:14.254: E/AndroidRuntime(21078): Caused by: java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed

03-01 17:59:14.254: E/AndroidRuntime(21078): at android.content.res.AssetManager.openNonAssetFdNative(Native Method)

03-01 17:59:14.254: E/AndroidRuntime(21078): at android.content.res.AssetManager.openNonAssetFd(AssetManager.java:534)

03-01 17:59:14.254: E/AndroidRuntime(21078): at android.content.res.ResourcesImpl.openRawResourceFd(ResourcesImpl.java:301)

03-01 17:59:14.254: E/AndroidRuntime(21078): ... 14 more

The res/raw/gallerychoice.ogg is in the right place.

Do you have any idea what's wrong?

Thank you in advance.
[Android Themes] tdunham:
Starbuck does it happen with no changes to the app also?

Just basic decompile then recompile.
[Android Themes] Thebear j koss:
[MENTION=2707699]starbucks2010[/MENTION] after trying what [MENTION=1042140]tdunham[/MENTION] says, try overwriting raw folder from original into the new apk. Samsung always has stupid issues with their sounds, especially their email app.

The savage mutilation of the human race is set on course

protest&survive
[Android Themes] starbucks2010:
Yes, just a simple decompile and recompile. Not a single modification. I even tried to add in the apktool.yml file to not compress that folder but still no luck.

No luck with the replacement. There are 3 .ogg files in raw folder. When I replace them with the original ones they have the same CRC.

Thanks.
[Android Themes] Thebear j koss:
Sorry, i am out of ideas. It is 1 of the reasons why i stopped using Sammy devices, they use strange compressions, sound files that are needed across the board or their proprietary apps stop working, and their overall insistence on bloating made me give up.

The savage mutilation of the human race is set on course

protest&survive
[Android Themes] JT1510365:
Hello there everyone i am trying to add the famous gesture anywhere feature from pac rom kk 4.4 to my samsung touchwiz rom which is on 4.4.2 kk. I have been following and comparing everything to this guide which can be found here:

https://xdaforums.com/showpost.php?p=67700090&postcount=7909

I keep getting tons of errors though and i don't know what to do. I have attached the provided logs so you guys can try to help me out i really want this feature:)

View attachment 4059233

View attachment history.txt
[Android Themes] starbucks2010:
I have found the problem. Well, I have found the solution but I don't know where exactly the problem is.

I copied the TMA decompiled folder of SecGalery2015 into AdvancedApkTool v4.2.0 and I recompile it. Then I copied the recompiled apk into my phone and everything looks ok. No FC whatsoever.

So, the problem is in TMA recompilation process. Some time ago I had the same issue with Samsung contacts and the solution was also to use AdvancedApkTool.

[MENTION=4315551]Ticklefish[/MENTION] if you have some spare time to look into this issue, I will gladly provide you any necessary log file.

Best regards.
[Android Themes] svandasek:
Are we able to repack the system folder from system.new.dat with this tool? I tried to find it but only repacking into .img.... I need the system folder
[Android Themes] Tulsadiver:
On a different note, I always use a new signature on the jar files.
[Android Themes] methoddon1:
so do i but it's there ... I found a way out. just change it afterwards in windows.

Sent from Galaxy Beast A5 (aka Ferrari) Powered by MethLabRom
[Android Themes] Ticklefish:
Sorry for the delay folks. Work has been really unpleasant lately and the Fish household has lots of poorly children..

So the white icons are the same shape and size as the coloured icons you're trying to use? I suspect there must be an overlay or something similar going on that's automatically turning all the icons white. You need to disable that first.

In theory, yes. V2 signing is still a bit of a hit-and-miss process though. It should work...but it might not. Give it a try and let me know what happens.

The padlock is something that Windows does occasionally. It's nothing that Android will pay any attention to so you don't need to worry. Essentially Windows is ensuring that you're the only user on the PC who can access that file. You can get rid of it if it's an issue but it won't affect your phone at all.

This is an odd bug. I wonder if TMA's having difficulty copying over the base ZIP.. Can you share your history.txt at all?

There's something very wrong with the public.xml in this file. Are you editing it at all?

I'll look into it for you. Can you share the APK's please? I'll try them out on my setup and see if I can work out what's going on.

No, it's not really something it's designed for. Sorry.
[Android Themes] lebigmac:
Hey [MENTION=4315551]Ticklefish[/MENTION]

Thanks for looking into it. Here is the history.txt

http://paste.ubuntu.com/24111748/
[Android Themes] koekoek91:
[MENTION=4315551]Ticklefish[/MENTION]

Hey man.

I have been trying to deodex my Sony Xperia Z5 32.3.0.378 ROM.

I used TMA to pull the necessary files from my device and then started the deodex process.

It seems to have finished, but flashing it in TWRP results in a bootloop.

Can you have a look at my history.txt?

I had a look at it myself and I see there were lots of errors, but I would like to know if you can give me any advice to try to get it to work.

Thanks .
[Android Themes] Terraalpha:
Hi [MENTION=4315551]Ticklefish[/MENTION]

"4 - Recompile App (Android 7.0 +) "

It's working for me with V2 Signature.

Thanks [emoji106]
[Android Themes] starbucks2010:
Here is the link.

https://www.dropbox.com/s/jle177aluv3d47w/SecGallery2015.rar?dl=0

Thank you for taking your time to look at it.
[Android Themes] Ticklefish:
Weird..xda is cutting the quote short... :confused:

Anyway, I can see the issue here.

875 The system cannot find the path specified.
876 0 file(s) copied.

TMA basically copies a default ZIP file to your intended destination and then adds the deodexed files to it. If the file doesn't copy over, a new ZIP is created instead. That's why it doesn't have the META-INF folder - the default ZIP isn't being copied for some reason. I'll have a look at the original code and see if I can work out why.

Thanks for sharing!
[Android Themes] Ticklefish:
All these 'Could Not Decode' lines point to a framework apk not being installed. The tool simply doesn't have enough information to decompile your app fully. And because it's not decompiled fully, it won't recompile fully. And it won't work on your phone.

framework-res.apk isn't the only resource file you might need to install. Have a look in your system/app and system/framework folders for any file with 'res' in the name. If you find it, pull it and install it.

Then try decompiling the file again.

By the way, thanks for using the logfile option! It's good to see that it's actually useful. :)
[Android Themes] kcls:
Huh, I always thought it was oblyvthe framework that needed to be installed. I'll look again when I get home for more Res files. And no problem!

Tapatalk² from my Optimus V
[Android Themes] Ticklefish:
Oh, there are lots of different resource apps that need to be installed, depending on the rom. framework-res.apk always needs to be installed though.
[Android Themes] Jamieb88:
Was so important you said it 3 times haha
[Android Themes] ikunalgautam:
got this problem while decompiling ??????

Exception in thread "main" java.lang.UnsupportedCl

assVersionError: Bad version number in .class file

at java.lang.ClassLoader.defineClass1(Nati

ve Method)

at java.lang.ClassLoader.defineClass(Unkno

wn Source)

at java.security.SecureClassLoader.defineC

lass(Unknown Source)

at java.net.URLClassLoader.defineClass(Unk

nown Source)

at java.net.URLClassLoader.access$100(Unkn

own Source)

at java.net.URLClassLoader$1.run(Unknown S

ource)

at java.security.AccessController.doPrivil

eged(Native Method)

at java.net.URLClassLoader.findClass(Unkno

wn Source)

at java.lang.ClassLoader.loadClass(Unknown

Source)

at sun.misc.Launcher$AppClassLoader.loadCl

ass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown

Source)

at java.lang.ClassLoader.loadClassInternal

(Unknown Source)

Press any key to continue . . .

please help !!!!!!!!!!!!!!!!!
[Android Themes] Ticklefish:
I suspect this might be an issue with your java. I'd check you've got the latest version installed if I were you.
[Android Themes] Ticklefish:
There are times that I really dislike the xda app....lol
[Android Themes] Kamy:
Recompiling error!

OK. I solved my decompiling problem, but then I faced another problem as I tried to recompile SystemUI.apk in which battery icons are. Would u please help me?

I am using xperia Neo V, android version: 4.0.4, build no.:4.1.B.0.587 and rooted

The error is:

Recompiling:

I: Smaling...

I: Building resources...

c:\TickleMyAndroid\_working\SystemUI.apk\res\value

s\arrays.xml:27: error: Found tag reference-array

where item is expected

c:\TickleMyAndroid\_working\SystemUI.apk\res\value

s\public.xml:792: error: Public symbol array/shutd

own_reboot_actions declared here is not defined.

c:\TickleMyAndroid\_working\SystemUI.apk\res\value

s\public.xml:791: error: Public symbol array/shutd

own_reboot_options declared here is not defined.

Exception in thread "main" brut.androlib.AndrolibE

xception: brut.common.BrutException: could not exe

c command: [aapt, p, --min-sdk-version, 15, --targ

et-sdk-version, 15, -F, C:\Users\Kamran\AppData\Lo

cal\Temp\APKTOOL7106142744986535133.tmp, -I, C:\Us

ers\Kamran\apktool\framework\1.apk, -S, c:\TickleM

yAndroid\_working\SystemUI.apk\res, -M, c:\TickleM

yAndroid\_working\SystemUI.apk\AndroidManifest.xml

]

at brut.androlib.res.AndrolibResources.aap

tPackage(AndrolibResources.java:255)

at brut.androlib.Androlib.buildResourcesFu

ll(Androlib.java:324)

at brut.androlib.Androlib.buildResources(A

ndrolib.java:269)

at brut.androlib.Androlib.build(Androlib.j

ava:192)

at brut.androlib.Androlib.build(Androlib.j

ava:174)

at brut.apktool.Main.cmdBuild(Main.java:18

8)

at brut.apktool.Main.main(Main.java:70)

Caused by: brut.common.BrutException: could not ex

ec command: [aapt, p, --min-sdk-version, 15, --tar

get-sdk-version, 15, -F, C:\Users\Kamran\AppData\L

ocal\Temp\APKTOOL7106142744986535133.tmp, -I, C:\U

sers\Kamran\apktool\framework\1.apk, -S, c:\Tickle

MyAndroid\_working\SystemUI.apk\res, -M, c:\Tickle

MyAndroid\_working\SystemUI.apk\AndroidManifest.xm

l]

at brut.util.OS.exec(OS.java:83)

at brut.androlib.res.AndrolibResources.aap

tPackage(AndrolibResources.java:253)

... 6 more

Press any key to continue . . .
[Android Themes] Ticklefish:
Did you have a look on line 27 of arrays.xml and lines 792 and 791 of public.xml to see what the problem is?
[Android Themes] AmmarGitham:
When it says that the public symbol declared is not defined , it means that the id or string is there in the public.xml but is not there in the ids.xml or string.xml .
[Android Themes] Kamy:
Recompiling error!

come on! I am not a developer. just very junior one trying to change only my battery icon :D
[Android Themes] Ticklefish:
Don't worry, we were all junior at some point. Heck, I only discovered xda because I was tearing my hair out trying to find out how to change my battery icon. lol

The error messages that the de/recompiling part of TMA generates can be quite long and confusing but they do make sense. And they often say what's actually going wrong.

public.xml is a big file with hexadecimal references for all your icons, strings and other stuff. According to your error message, there are arrays referenced in there which don't properly exist.

Which ties in with the first error message (always try to fix the top one first). Something is wrong with line 27 of your arrays.xml and that's causing all your other problems.

There are two ways to fix this -

If you haven't already, make sure you've installed every resource file before you decompile anything. Looks like you're on Timescape ICS, so pull and install SemcGenericUxpRes.apk and framework-res.apk before you decompile SystemUI.apk.

This might fix the problem. If not then please share your decompiled arrays.xml here and I can have a look and see what's going on. It may just be that Sony made a slight error in the code and it's getting TMA upset.
[Android Themes] Kamy:
Recompiling error!

here we are. the same problem

I: Smaling...

I: Building resources...

c:\TickleMyAndroid\_working\SystemUI.apk\res\value

s\arrays.xml:27: error: Found tag reference-array

where item is expected

c:\TickleMyAndroid\_working\SystemUI.apk\res\value

s\public.xml:792: error: Public symbol array/shutd

own_reboot_actions declared here is not defined.

c:\TickleMyAndroid\_working\SystemUI.apk\res\value

s\public.xml:791: error: Public symbol array/shutd

own_reboot_options declared here is not defined.

Exception in thread "main" brut.androlib.AndrolibE

xception: brut.common.BrutException: could not exe

c command: [aapt, p, --min-sdk-version, 15, --targ

et-sdk-version, 15, -F, C:\Users\Kamran\AppData\Lo

cal\Temp\APKTOOL8984017325759217674.tmp, -I, C:\Us

ers\Kamran\apktool\framework\1.apk, -S, c:\TickleM

yAndroid\_working\SystemUI.apk\res, -M, c:\TickleM

yAndroid\_working\SystemUI.apk\AndroidManifest.xml

]

at brut.androlib.res.AndrolibResources.aap

tPackage(AndrolibResources.java:255)

at brut.androlib.Androlib.buildResourcesFu

ll(Androlib.java:324)

at brut.androlib.Androlib.buildResources(A

ndrolib.java:269)

at brut.androlib.Androlib.build(Androlib.j

ava:192)

at brut.androlib.Androlib.build(Androlib.j

ava:174)

at brut.apktool.Main.cmdBuild(Main.java:18

8)

at brut.apktool.Main.main(Main.java:70)

Caused by: brut.common.BrutException: could not ex

ec command: [aapt, p, --min-sdk-version, 15, --tar

get-sdk-version, 15, -F, C:\Users\Kamran\AppData\L

ocal\Temp\APKTOOL8984017325759217674.tmp, -I, C:\U

sers\Kamran\apktool\framework\1.apk, -S, c:\Tickle

MyAndroid\_working\SystemUI.apk\res, -M, c:\Tickle

MyAndroid\_working\SystemUI.apk\AndroidManifest.xm

l]

at brut.util.OS.exec(OS.java:83)

at brut.androlib.res.AndrolibResources.aap

tPackage(AndrolibResources.java:253)

... 6 more

Press any key to continue . . .

Here are my files:

View attachment framework-res.7z

View attachment SemcGenericUxpRes.7z

View attachment SystemUI.7z
[Android Themes] Ticklefish:
Thanks for your files. I'll download them and try them on my setup as soon as I can. :)
[Android Themes] Kamy:
Thanks a lot.
[Android Themes] Ticklefish:
Where did these files come from? They're can't be stock..

Whoever put this rom together appears to have declared two different arrays with the same name.

Your arrays.xml says this:

and your public.xml says this:

I've no idea what the difference between a reference-array and a string-array is in Android but I'm pretty sure that two different arrays can't have the same name. And that's what's trying to happen here.

I'd be tempted to remove the three reference-array lines, since that's what the compiler was complaining about. This should make it compile but it could stop you from being able to reboot the phone.

It's worth having asking whoever you got these files from to take a look at this issue. The files have been modded and they should know how.
[Android Themes] MR.Volkf:
can you tell me more specific to install the battery icon,wifi,signal for my galaxy s,i can't found mount the /system and tickle always said "your phone is offline" or "can't find phone" :(
[Android Themes] Ticklefish:
If TMA can't find your phone, it could be that you don't have the right drivers installed on your PC. You've got a Samsung phone, so you need to ensure you have the latest version of Kies installed. And check that you have 'USB Debugging' activated on your phone.

If you don't have any luck, you can do this the slow way by copying the relevant files onto the sdcard and then copying them from that into the '_in' folder.

This will alter the permissions for those files so be sure to use the zip making option when you've finished modding.
[Android Themes] Ticklefish:
And now xda will let me quote your post in full. Weird.

Anyway, I've been thinking about this and I think I know the answer. TMA was trying to create a ZIP in c:\temp. Did you have a folder called "temp" on your c:\ drive before that? If you didn't, TMA wouldn't have been able to copy the default ZIP to it..but would have created the folder when it tried to update the ZIP with your files. That would explain why what happened happened.

Provided this is what's going on, I can make TMA put flashable ZIP files in the "ticklemyandroid" folder by default. Then, if users don't change the ZIP file destination, it will always work.
[Android Themes] bdorr1105:
Probably a good idea, then it is all in one place by default. I never had an issue, but it makes sense to do it that way anyway
[Android Themes] Ticklefish:
There are a lot of errors, yes. I need to look at TMA's code to see how it can detect these and tell you about it.

In the meantime, you can delete some of the APK's that are causing problems and just install them from Google Play later. APK's like the calendar and photo apps for instance.

My concern though is those files that are causing this sort of error message:

Error occurred while disassembling class Lcom.sonymobile.nfc.ConstConfig; - skipping class
java.io.IOException: The file or directory is corrupted and unreadable

There's not much I can do with something like this, if the file's corrupted. I'd possibly suggest seeing if there are any other stock roms available that you could download and use instead.

It's rude of me to ask but could you possibly share your framework, app and priv-app folders please? It'd be really useful in updating the code so these errors are detected.
[Android Themes] koekoek91:
Thanks for your response.

I will post the folders you're asking for later today. In the meantime I can try your suggestions.

What I hear from other Xperia Z5 users is that on Nougat so far.. it's really difficult to accomplish to create a custom deodexed ROM.

So it would be amazing for us Xperia users if TMA would be able to accomplish it.

Alot of Xperia Z5 users are really eagerly waiting for a custom nougat ROM (SlimX and ROMX) to be specific, but the creator has stated hes having a hard time getting Nougat succesfully deodexed.

Would be awesome if you could try to help us in this :)

I'll get back to you later.

Thanks mate :good:
[Android Themes] Ticklefish:
Thanks. Can you share your framework files as well please? I'll need them to decompile this.
[Android Themes] Ticklefish:
TMA uses the latest smali.jar and baksmail.jar files to deodex with. The trouble is that Nougat is still so new that there's going to be some files they struggle with. Until [MENTION=1299419]JesusFreke[/MENTION] is able to update the tools, TMA won't be able to deodex those files.

The latest smali and baksmail are available here: https://bitbucket.org/JesusFreke/smali/downloads/

TMA uses 2.2b4 for both.

I always keep my eye out for new solutions or tools to deodex with so if something comes up I'll be sure to let everybody know!
[Android Themes] koekoek91:
I understand ;)

I'll try some of your suggestions in the meantime.

Anyway, here are the folders you asked for ;)

https://drive.google.com/open?id=0B1-5Lr_Sntl5TWhTQmNnOU9rQ0E
[Android Themes] starbucks2010:
Here is the link.

Thank you.
[Android Themes] lebigmac:
Hi. I don't think I had the C:\temp before attempting to tickle my android. I might've started TMA as admin though. . . not sure.

I thought about it and maybe the first time it didn't work because there was an empty space in the path to TickleMyAndroid. For instance C:\New Folder\TickleMyAndroid

Maybe that somehow messed it up. Or the path was simply too long. . .

I tried it again by copying TickleMyAndroid folder to C:\TickleMyAndroid and this time the .zip file creation was successful.

Then I flashed it onto my Xperia XZ (F8331 - running Nougat) and everything went fine. No errors inside TWRP.

The problem now is my phone doesn't boot up. It always gets stuck at the X of the Xperia boot animation then it freezes. After a few seconds the phone reboots and this happens over and over.

The phone gets really hot during this bootloop. So I force power off by pressing Volume up and Power button until it vibrates 3 times.

How can I restore my original odex files? Is it as simple as copying back the original folders/files to their original location? system/app, system/priv-app, system/framework, system/build-prop

I checked C:\TickleMyAndroid\_WorkArea1\_deodex\ and my original dex files are not there anymore. Did TMA delete them after the .zip creation? I hope I made a backup somewhere. . .

Here is my history.txt in case you want to take a peek (had to edit it a bit so it wouldn't exceed the upload size limit).

Thanks for the help.
[Android Themes] Ticklefish:
You can do that, sure. You just need to make sure the permissions are right.

Or flash the nandroid backup, if you made one before flashing.
[Android Themes] lebigmac:
Unfortunately I didn't create a nandroid backup. I only backed up the non-deodexed files.

What permissions should the non-deodexed folders/files have? Can you please give me an example of what chmod command I should use? Thanks.

Is there a way to set the permissions on a folder and all of its contents with one single chmod command?
[Android Themes] haifish9999:
You can't do it with 1 command line of Chmod,coz the permission for folder (755) and all stuff inside (644) are different.
[Android Themes] lebigmac:
OK no problem. I did come across an old nandroid backup that I just flashed. Everything back to normal. Thanks.

I wonder what the problem was with the deodexed .zip file. . .
[Android Themes] Hamidreza2010:
Your right

I have this problem with z5 deodexing

i think tma cant full deodex sony android N fw in (b64bit fw )

just i think