hi,
i have patched the codes all around my code and also changed the application folder structure for my new packge from: com.appName.App
to: com.NewappName.App
so i have added in the "packageInfo" inside of the "apktool.yml"
packageInfo:
cur_package: com.NewappName.App
orig_package: com.NewappName.App
after creating an APK file i now again "decompile" the new generated APK and i see that the ApkTool 2.0.2 still created the folder structure of the old "\com\appName\App" and didn't updated it to a new
"\com\NewappName\App"
am i missing something ?
The functionality in apktool.yml is used for handling
Rewrite the manifest so that its package name is the package name
given here. Relative class names (for example .Foo) will be
changed to absolute names with the old package so that the code
does not need to change.
Since some applications are built with this, we identify this so we can rebuild using the same parameter. This functionality is not meant for what you are attempting to do.
If you want to blanket change the package name you will have to:
apktool.yml (like you did)AndroidManifest.xml package name to the new value.old/foo/bar to new/foo/bar) in terms of the directories*.smali files with the old package name Lold/foo/bar and replace with Lnew/foo/bar.@iBotPeaches Thank you for this step-by-step guide on changing the package name.
However, it seems a bit outdated. Thereby I have several questions I would like to ask:
cur_package and orig_package references in the source code.unknown/ directory.smali/ directory.*.xml files as in step 4?@qminds, @iBotPeaches had provided a great guide that's not necessarily outdated as much as it being a more of a "General Guide" in nature.
There's so many variables to consider now days with Apps that either requires additional steps (and such) as well as many of them have one or more forms of security features that makes it extremely difficult and, in most of those cases, impossible to do without the Source Code.
I've learned allot, regarding various topics, to include changing the package name. This involved ALLOT of research, reading, trial & error, etc...
The following link is to unique guide that is very helpful in what your trying to do...
https://forum.xda-developers.com/showthread.php?t=2760965
... which is the best way I can personally help you in this topic. I may understand much of this, but I really don't do it very much at all myself.
I wish you the best of luck! :-)
~Ibuprophen
@Ibuprophen Thanks for your feedback.
The linked website describes the same aciton sequence as provided by @iBotPeaches.
I understand that there are different security tricks in applications used to prevent from changing the package name. However, both of these guides are dated 2014-2015, therefore some steps seem be outdated according to the current Apktool source code (e.g., see the step 1 in my message) and its updated decoding techniques.
That is why I'm humbly asking @iBotPeaches for brief clarifications on this topic.