FORUMS
Remove All Ads from XDA

[TOOL] Tickle My Android - Decompile & Recompile With Ease

6,661 posts
Thanks Meter: 8,474
 
By Ticklefish, Recognized Themer on 3rd May 2012, 04:15 PM
Post Reply Email Thread
Announcement from Ticklefish: Version 16.1 Now Available!
9th September 2019, 05:36 PM |#7831  
Tulsadiver's Avatar
Recognized Contributor
Thanks Meter: 4,306
 
Donate to Me
More
Quote:
Originally Posted by Ticklefish

Damn...you're faster at replying than I am!

Dragging and dropping from one ZIP to another shouldn't be needed now. This is to keep the META-INF folder untouched and keep some of the other files at the same compression ratio - all of which V16 can do.

You da Man, Ticklefish!

I'm old, and old fashion, not necessarily in that order😄. I habitually do some things, unnecessarily, manually, lol!
The Following 2 Users Say Thank You to Tulsadiver For This Useful Post: [ View ] Gift Tulsadiver Ad-Free
9th September 2019, 06:32 PM |#7832  
Junior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by Ticklefish

So when you say you're using an "original" APK, I assume that this is one that you've made yourself? In that case I do have to ask the obvious question..does the APK install before you try decompiling it? (I mean no insult by that, it's just one of those questions I have to ask.)

I made an app a few years ago that was a basic 'Hello World' thing, following directions on Google's developers website. It was incredibly simple but I could de/recompile it without any trouble installing it.

In your situation, I can think of two likely solutions. First, is your APK signed using the V2 method (https://source.android.com/security/apksigning/v2)? If so, decompiling and recompiling it will break that key.
Failing that, did you install any framework files before you decompiled? It's possible your recompiled file is missing essential resources.

PS: Thank you! That's kind of you to say. I was looking at becoming a software engineer before my career took a massive change. I've forgotten pretty much every bit of C++ I learned but I like to think I can still design a good program..

Hi Ticklefish,

I've tried a handful of different apks mostly from apkpure.com. One well-known app that I tried to decompile/recompile was Speedtest by Ookla_v4.4.17_apkpure.com.apk. I did rename the file to speedtest.apk as either Windows or the script doesn't seem to like spaces very much. I'm not sure how to tell if an apk is signed using the V2 method but I will read that link you provided.

This apk will install fine prior to decompiling, but once decompiled and recompiled, no go. I haven't installed any frameworks files at all. I followed your original guide and took note that framework files were mostly required when modding system-related files and apps and that the framework directory is the least used of the four of the WorkArea structure. I may be misinterpreting this as this thread does have ~800 pages that I haven't been able to read through yet

---------- Post added at 11:32 AM ---------- Previous post was at 11:28 AM ----------

Quote:
Originally Posted by Tulsadiver

I'm not familiar necessarily with Samsung anymore but you are probably going to have to install it via a magisk module.

You may be able to copy it to system but what you have to do is use the original apk as the one used to copy to your system. Unzip both the original and the recompiled apk. Copy the modded portion from the recompiled apk to the original. Zip the original one back up and install it. Since you didn't actually change anything, just pick anything.

Thanks for the reply Tulsadiver. I haven't heard of magisk so I'll read up on that. I've been able to transfer over other people's modded apks using either adb or Google Drive fairly easily and they do install on the Samsung without intervention.
The Following User Says Thank You to n0c7 For This Useful Post: [ View ] Gift n0c7 Ad-Free
9th September 2019, 07:37 PM |#7833  
Tulsadiver's Avatar
Recognized Contributor
Thanks Meter: 4,306
 
Donate to Me
More
Quote:
Originally Posted by n0c7


Thanks for the reply Tulsadiver. I haven't heard of magisk so I'll read up on that. I've been able to transfer over other people's modded apks using either adb or Google Drive fairly easily and they do install on the Samsung without intervention.

I mis-read. I thought you were modding a Samsung system app and replacing it.
The Following User Says Thank You to Tulsadiver For This Useful Post: [ View ] Gift Tulsadiver Ad-Free
10th September 2019, 06:18 PM |#7834  
porkyhontas's Avatar
Recognized Themer
Flag Tampa, Florida
Thanks Meter: 3,316
 
Donate to Me
More
Quote:
Originally Posted by Ticklefish

Damn...you're faster at replying than I am!

Dragging and dropping from one ZIP to another shouldn't be needed now. This is to keep the META-INF folder untouched and keep some of the other files at the same compression ratio - all of which V16 can do.

Dragging and dropping system apps is needed on Samsung devices starting around Nougat. Data apps such as Dropbox, Facebook and Pandora can be signed with a new signature and will install.

Sent from my Note 9 using AnaKonda Tapatalk
The Following 2 Users Say Thank You to porkyhontas For This Useful Post: [ View ] Gift porkyhontas Ad-Free
10th September 2019, 06:54 PM |#7835  
Junior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by porkyhontas

Dragging and dropping system apps is needed on Samsung devices starting around Nougat. Data apps such as Dropbox, Facebook and Pandora can be signed with a new signature and will install.

Sent from my Note 9 using AnaKonda Tapatalk

What do you recommend for this? Samsung Flow?
10th September 2019, 11:19 PM |#7836  
Junior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by n0c7

What do you recommend for this? Samsung Flow?

I downloaded the latest Samsung Flow for Windows 10 and tried dragging and dropping a recompiled apk. Still the same issue - immediately says "App not installed." I think I may be misunderstanding dragging and dropping as you mentioned zip files? Was this an older technique?
11th September 2019, 08:49 AM |#7837  
Junior Member
Flag Kaliningrad
Thanks Meter: 4
 
More
Hello, what about mac(osx) version?
11th September 2019, 02:59 PM |#7838  
Quote:
Originally Posted by Tulsadiver

You da Man, Ticklefish!

I'm old, and old fashion, not necessarily in that order. I habitually do some things, unnecessarily, manually, lol!

Ah well, I'm old, old-fashioned but incredibly childish. And I'm forever doing unnecessary things!

Quote:
Originally Posted by n0c7

Hi Ticklefish,

I've tried a handful of different apks mostly from apkpure.com. One well-known app that I tried to decompile/recompile was Speedtest by Ookla_v4.4.17_apkpure.com.apk. I did rename the file to speedtest.apk as either Windows or the script doesn't seem to like spaces very much. I'm not sure how to tell if an apk is signed using the V2 method but I will read that link you provided.

This apk will install fine prior to decompiling, but once decompiled and recompiled, no go. I haven't installed any frameworks files at all. I followed your original guide and took note that framework files were mostly required when modding system-related files and apps and that the framework directory is the least used of the four of the WorkArea structure. I may be misinterpreting this as this thread does have ~800 pages that I haven't been able to read through yet

---------- Post added at 11:32 AM ---------- Previous post was at 11:28 AM ----------



Thanks for the reply Tulsadiver. I haven't heard of magisk so I'll read up on that. I've been able to transfer over other people's modded apks using either adb or Google Drive fairly easily and they do install on the Samsung without intervention.

Framework files, or framework APK files, are files that contain resources that are used by other APK files in the rom. The main one is "framework-res.apk" but some developers like to add their own to the mix as well. Framework files have, or should have otherwise it gets confusing, "res" in their filename.

Framework files need to be installed (via TMA, not your phone) before you decompile your APK. This will ensure that the resources in them will become available. This might be what's happening with your file. A few posts ago I shared a framework-res.apk from an Android 10 AOSP rom. Try installing that then decompiling and recompiling your file. If you still don't have any luck, could you share the file here please? I can give it a try and see what I can come up with.

Quote:
Originally Posted by porkyhontas

Dragging and dropping system apps is needed on Samsung devices starting around Nougat. Data apps such as Dropbox, Facebook and Pandora can be signed with a new signature and will install.

Sent from my Note 9 using AnaKonda Tapatalk

Interesting. Using the "Copy Original "AndroidManifest.xml" And "META-INF" Folder" option should negate the need for that. If that's not doing the trick there must be something else in the APK that is being affected in the recompile process.
Could you share a system APK please? (And the framework files as well!) I'll see if I can spot what's happening. If I can then I can adjust TMA so dragging and dropping isn't needed.

Quote:
Originally Posted by n0c7

I downloaded the latest Samsung Flow for Windows 10 and tried dragging and dropping a recompiled apk. Still the same issue - immediately says "App not installed." I think I may be misunderstanding dragging and dropping as you mentioned zip files? Was this an older technique?

Dragging and dropping here refers to a process done after recompiling. Essentially you'd open both the original and recompiled APK in 7zip or similar. Then you'd drag the changed files (like the "\res" folder, for instance) from the new APK into the old one. This ensures that the other files aren't touched.
Mainly this ensures that the META-INF folder isn't changed. This holds the key that the file is signed with and has to stay exactly the same (even down to the compression rate) or the new APK won't be installed. Apktool removes the need for this with the option I mentioned above but it seems that dragging and dropping might still be needed for Samsung.

Not the first time that Samsung has caused trouble, to be honest. Long-term subscribers of this thread may remember a few instances in the past where that company has given me a headache or two. Great hardware but not very friendly modder-friendly!

Quote:
Originally Posted by ooleynich

Hello, what about mac(osx) version?

I've spent about 30 minutes using MacOS in total in my entire life, and I don't have a Mac to play with, so I won't be able to make a TMA version anytime soon. It's the same reason that there isn't a Linux version.
I'm more than happy to help if somebody wants to put one together though.
12th September 2019, 04:58 PM |#7839  
I've just uploaded V16.1 to the Downloads tab.

This has a few bug fixes, a fixed "Pull File From Any Location" option, a snapshot apktool version (thanks go to @Tulsadiver), another language (thanks to @FunSucker) and I'm trying something new..
The new version contains both the 32bit and 64 bit versions. There's a batch file ("Tickle My Android.bat") which will work out which version applies to you and puts into the main folder.

Check it out and let me know how it goes!
The Following 3 Users Say Thank You to Ticklefish For This Useful Post: [ View ] Gift Ticklefish Ad-Free
12th September 2019, 06:22 PM |#7840  
Bradco's Avatar
Senior Member
Flag Limoges
Thanks Meter: 111
 
More
Quote:
Originally Posted by Ticklefish

I've just uploaded V16.1 to the Downloads tab.

This has a few bug fixes, a fixed "Pull File From Any Location" option, a snapshot apktool version (thanks go to @Tulsadiver), another language (thanks to @FunSucker) and I'm trying something new..
The new version contains both the 32bit and 64 bit versions. There's a batch file ("Tickle My Android.bat") which will work out which version applies to you and puts into the main folder.

Check it out and let me know how it goes!

Little question how to update ?
13th September 2019, 01:12 AM |#7841  
Junior Member
Thanks Meter: 4
 
More
Quote:
Originally Posted by Ticklefish

Framework files, or framework APK files, are files that contain resources that are used by other APK files in the rom. The main one is "framework-res.apk" but some developers like to add their own to the mix as well. Framework files have, or should have otherwise it gets confusing, "res" in their filename.

Framework files need to be installed (via TMA, not your phone) before you decompile your APK. This will ensure that the resources in them will become available. This might be what's happening with your file. A few posts ago I shared a framework-res.apk from an Android 10 AOSP rom. Try installing that then decompiling and recompiling your file. If you still don't have any luck, could you share the file here please? I can give it a try and see what I can come up with.

Dragging and dropping here refers to a process done after recompiling. Essentially you'd open both the original and recompiled APK in 7zip or similar. Then you'd drag the changed files (like the "\res" folder, for instance) from the new APK into the old one. This ensures that the other files aren't touched.
Mainly this ensures that the META-INF folder isn't changed. This holds the key that the file is signed with and has to stay exactly the same (even down to the compression rate) or the new APK won't be installed. Apktool removes the need for this with the option I mentioned above but it seems that dragging and dropping might still be needed for Samsung.

Not the first time that Samsung has caused trouble, to be honest. Long-term subscribers of this thread may remember a few instances in the past where that company has given me a headache or two. Great hardware but not very friendly modder-friendly!

Ok. I downloaded the framework-res.apk file and installed it in TMA. No difference in results. I tried decompiling with Standard options, and recompiling with both Standard options and various Advanced options.

I've attached an apk of Speedtest that installs fine before decompiling/recompiling. Try this one and see how it goes! Thanks Ticklefish!
Attached Files
File Type: apk Speedtest by Ookla_v4.4.17_apkpure.com.apk - [Click for QR Code] (13.87 MB, 26 views)
Post Reply Subscribe to Thread

Tags
apktool, decompile, recompile, smali, xml

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes