I get questions about that from time to time. My question is: what
for? It would be really hard to modify an app on a 4'' screen and
keyboard (or even without it). I think some of apktool functionalities
should be possible to run on a device without much effort, others
would require performance optimizations of apktool's code or even
porting it to C.
So I want to know:
* How many people actually need this?
* What for? Which functionalities are most important for you? Maybe
you need something like NinjaMorph, but with possibility to edit XML
files? And if you want to edit XMLs, there is much technical
difference between values*/*.xml and other ones. Also partial decoding
of XMLs (without attr values decoding - as AXMLPrinter2 and Root
Explorer do) is much easier than full decoding. Is this enough?
Let's talk about it :-)
--
You received this message because you are subscribed to the Google Groups "apktool" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apktool+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
I don't know neither, magic maybe? ;-) You can use unzip if you like, but still 99% of people aren't Jedi and they need apktool to do most things with apk file, so please don't post messages unrelated to the topic here. Of course you can create another topic and there we can discuss what exactly does apktool, what you can do without it and what you can't.
There aren't "plenty of java and PY decoders" because "binary XML" you are talking about isn't a specific format/standard, but some general idea. There are multiple binary XML formats, some of them are listed on the Wikipedia page linked by you. Android has its own implementation, it isn't used anywhere outside Android and I believe there are only 2 decoders of this format: Android OS itself and apktool. There is also AXMLPrinter2 that pre-dates apktool, but it doesn't decode everything, you will see some raw binary stuff and you won't be able to build it back after modifying it.
And apktool does more than XML decoding:
- resources.arsc decoding - note there are no res/values*/*.xml files in apk file - they're compiled to resources.arsc entirely. Also resources.arsc stores resources index. If you e.g. unzip apk file and add some XML or PNG files, application will ignore them, because they aren't referenced in resources.arsc. You can verify this very easily.
- 9.png files decoding - note there are no 1px black margin in 9.png files in apk. 9patch data is compiled into a binary chunk of png file, you can't modify it easily. You may also destroy it by accident: open 9.png with some image editor, save it - voila, at this point png may be already broken (depending on chosen image editor) and you won't even know about it.
- it integrates smali, introduces project-like approach and gives you quite good working-with-sources feeling. Android Studio even recognizes decoded apk as Android project, it let you use layout editor, string editor, 9patch editor, automatically attaches debugger to proper process, etc.
- it contains some additional tools, e.g. for debugging smali code
However the most important thing is: apktool makes possible to modify anything you see as normal. There are more tools to look into apk file. Regular zip let you see its contents, assets, etc. AXMLPrinter2 let you partially see contents of binary XML files. Any image editor let you see png files. But if you want to modify something then without apktool you won't be able to:
- modify res/*/*.xml files
- modify (or even see) res/values*/*.xml files
- modify 9patch information of 9.png files or e.g. resize these files
- you may get problems even when modifying pixel information of 9.png files
- you can't add, move, remove any res/* files, even res/raw* ones
Before apktool modders were opening XML files with hex editors to do very basic modifications, e.g. change margin from 5dp to 2dp or change some strings. There were many applications ported e.g. from hdpi to mdpi screens with broken all 9.png files (it results with weird looking buttons, etc.), because without apktool it was impossible to resize them properly. More advanced modifications weren't at all possible.
I have only one question to you: did you actually try to modify some apk file without apktool (with changes to XML files, not only assets and/or app code)? Or you didn't try it yourself, but you just *think" it's possible and no problem? Try it, then report back your findings :-)
And I won't talk about the need for running apktool on the Android device. As I said above I personally don't need this feature, but if there are people who would like to do that, then why would I argue with them and say it doesn't make sense?
As it stands the up coming apktool which is 2.0 will require java 1.7.x installed and will have aapt built in the question is how to get that requirement inside android os
--
Could there not be a way to include the needed binaries to run properly if ran on android is since java is not truly installed but java script is
You received this message because you are subscribed to a topic in the Google Groups "apktool" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/apktool/lSxR7Rsv8PI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to apktool+u...@googlegroups.com.