[Q] Modifying APK question - Android Q&A, Help & Troubleshooting

I have attempted numerous times to change the Online, Offline, Away, and Busy presence files in the Google Talk app. This images are located in the assets folder. Although I replace them, recompile and resign, my modified images do not show. I still see the original images. If I view the contents of the APK, they are there in the assets folder. Am I missing something?

Related

Compile HTC.Resources

I am trying to add some .9 files and soem xml files to the drawable, drawable-hpdi folders respectivly, and i get compiles issues. What's the trick to this? I compile all day long with other apk's.
I get a ton of these:
ERROR: Failure processing PNG image D:\APK Manager 4.9\other\..\projects\com.htc.resources.apk\res\drawable-hdpi\appwidget_inner_focus_c.9.png
libpng error: Read Error
i believe you need to add the edited .9 files in after you compile. switch apk to zip and do it that way and then sign. atleast that is how i always have done it. compile with altered .9's always failed on me too.
RafficaX said:
i believe you need to add the edited .9 files in after you compile. switch apk to zip and do it that way and then sign. atleast that is how i always have done it. compile with altered .9's always failed on me too.
Click to expand...
Click to collapse
Thanx for answering.. But a bit fuzzy..
I actually have xml's to add to the drawable-hpdi and standard .png's not .9's to add to the drawable
I tried to just copy them over to the compiled version of the apk..
what do you mean switch apk to zip?
rename it to zip after you compile it, so this way you can open in winrar or 7zip and just drop those png's in the folders they need to be in. then rename name the zip to apk and sign it. the xml's can be in there when you compile it. they wont cause an issue.
like i said every time i made xml and png edits i had to do it this way to work right.
If you use 7zip there is no need to rename the file to .zip
Just right click on the file and choose 7zip - open archive.
Sent from my B.A.M.F. Thunderbolt
okay someone earlier in an email said never sign a htc.resources file.
Seems there could be several ways.
1. Open resources file with 7zip
2. copy png's to drawable folder
3. copy xml's to drawable-hdpi folder
then what?
thats it. bc its still an apk file through 7 zip. load it on your phone. i make sure it copies over the signature when it re compiles though. watch the output to make sure it did.
RafficaX said:
thats it. bc its still an apk file through 7 zip. load it on your phone. i make sure it copies over the signature when it re compiles though. watch the output to make sure it did.
Click to expand...
Click to collapse
Sorry being dense or just not getting it. You said re-compiles. If you are just opening the com.htc.resources with 7zip and copying files into it, how are you re-comiling?
The bits and pieces are confusing. PM me the exact steps to replacing png and xml in the resources file?
Dont you have to Zip align it? Or zip it? So it can be flashed from recovery?

[Q] Where are file extensions such as ".mp4" and ".mp3" located in an .apk?

[Q] Where are file extensions such as ".mp4" and ".mp3" located in an .apk?
I know it might be hard to understand the way I try to explain this conundrum but I've been up all night trying to figure this stuff out myself to no avail. I'm trying to rip the assets from a particular game/application (SONIC CD), and after decompiling it's contents via apktool, I'm greeted with pretty much nothing but .smali files. However, opening some of these reveal paths that are non-existent and files that cannot be found in any of the folders extracted. Pretty much all of them are scripts aside from the icons (.pngs) and a couple .xmls. Opening up "VideoActivity.smali" in the soniccd folder shows that they exist within the data I've ripped but I cannot find them.
Can anyone lend me a hand here? :fingers-crossed:

[Q] Unable to re-compile (using autoapktool / apktool)

** I dont have enough posts yet so cannot start thread in the correct section, so posted it below here in general **
I have all the content ready to add to an app and been searching for the right template and came across an app that has the look and feel I want.
I used autoapktool2.0.0 and it dissasembles the app fine so you can access the xml and other files. I am also able to edit a test apk and recompile and sign it with the above software fine. It creates 2 different folders one build which has a created classes file and one called dist that has the completed recompiled apk
however, when i try one specific apk I am able to decompile it fine, but when it comes to recompiling it after making a tiny test edit it will not do it.
I creates the classes file fine but it does not recompile the whole source files into an apk, so the dist folder is not created.
Why will it not recompile the whole thing?, is there something I am doing wrong or is the thing protected?
can someone test it for me using same methods I done and see what their result is?
(no errors were given when recompiling, it acted as if it was complete but it was not, as no apk created)

[Q] Eclipse Exports Incomplete APK Files

It's been a while since I last did any Android development, but it used to work fine. Now I haven't changed anything I can remember on my computer since then, but suddenly eclipse has stopped exporting Android .apk files correctly. I still have one of the old files that was exported correctly, but now when I export a file (even if it's just a blank new project) it is missing all resources and the AndroidManifest file. I have tried deleting and reinstalling eclipse and the Android SDK, but this hasn't helped.
If I change the APK to .zip and open it, the files I have now are classes.dex, and a folder called META-INF with CERT.RSA, CERT.SF, and MANIFEST.MF inside. If I do the same with my old .apk, I have these as well as resources.arsc, AndroidManifest.XML, a res folder, and an assets folder.
Any advice would be appreciated, as I've been staring at this trying to fix it for a few days now. Thanks!

Help Decompiling/Recompiling Stock/System App with APK+ODEX

I've got a specialized Android box running 8.1. I also have a full system image for the machine.
Within the image is a custom app that I'd like to modify. I'm able to pull the APK and ODEX/VDEX files from the priv-app folder. I'm also able to deodex to get all of the smali files, and recreate the classes.dex.
This is about as far as I've gotten. I should also say I've never done this, so may not have all the necessary tools. At this point, I'm simply trying to create a new and functional full APK that can be installed on another machine.
For anyone following....
Once you've got your dex files, add it/them to the apk package. Install Visual Studio Code (the free general use version of Visual Studio). Then install the APKLab extension. With VS open, CTRL-Shift-P to bring up the command menu, where APKLab: Open an APK should be at the top. Select it, then choose the APK to open, along with the desired options. These are what I generally choose:
-decompile_java (much easier to read the java than smali code, although it cannot be edited)
-force-manifest
-no-debug-info
-deobf
-show-bad-code
*unselect only-main-classes
Make any edits within the smali. In the left side Explorer menu, right click apktool.yml and select APKLab: Prepare for HTTPS Inspection. When complete, right click apktool.yml and select APKLab: Rebuild the APK. Your newly compiled APK will be placed in the "dist" folder.

Categories

Resources