I'm old, and old fashion, not necessarily in that order😄. I habitually do some things, unnecessarily, manually, lol!
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..
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.
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.
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?
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!
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!
|apktool, decompile, recompile, smali, xml|
|Thread Tools||Search this Thread|