modifying googlemaps.apk - Android Q&A, Help & Troubleshooting

Hi!
I want to modify some xml files in the google maps app (com.google.android.apps.maps-2.apk)
I copied the original apk from my phone, used apkmultitool to decompile it, chanched the files an recompiled it (using option 11: system apk)
after recompiling, the file size ist about 1Mb different to the original.
When i now place it on the sd card and try to install, i get message that it wasn't installed.
Do i have to deinstall the "old" app?
Do i make sth wrong?
I hope you can help me!
Thanks!

Anybody knows a solution?

Related

[Q] changing default music players look?!

hello, i wonder if someone would help me out a little bit, a few days ago i started to try modifying the default MusicPlayer.apk on my Galaxy 3.. i extracted the stuff from the .apk with winrar, edited the .png files inside the "res" folder and then repacked all the files to a .rar archive,after that renamed it to .apk and resigned it (i tried even without resigning) but the app wont start..due to this is a system app i know i cant install it from the file manager,but usually it has to begin the installation etc.. i only get something like a parsing package error..any help would be appreciated,and thanks in advance..
[sorry if my english is wrong]
Of course it won't start
In the apk there are also more folders than the res-folder, you only see them if you decompile the apk.
But you only have to decompile them if you want to edit ...9.png (eg with that) files, otherwise just extract them to edit and afterwards add them again with WinRAR or something like that
in fact i did extract all files and folders so i repacked all of them again im sure i didnt miss any files,the problem is that i dont know what else the problem could be
danke trozdem für die hilfe help is always welcome
Edit: I found out how to do it open the .apk as an archive (with winrar or something similar) extract the files you want to edit,edit them and put them into the original .apk you wanted to edit (youi open the .apk file with winrar,and drag the edited files and just drop them to the opened archive,and let them get replaced) and done!!
I edited the original MusicPlayer.apk of my Galaxy 3 so that it looks like the Xperia's one (just edited some .png files)
btw here are some screens of my work (till now), but i have so much more things to edit

[Q] ApkTool Problem, while trying to decompile apk!!

ok heres my problem, i downloaded apk multi-tool, and everything was working right, but after few days, i tried to modified this app, but whenever i apply the option "decompile" the cmd window close by itself, without saying theres an error... do you guys have any idea about whats going on???
I'm no expert, but this is how I used to decompile APKs:
1) Rename the file "ABC.apk" to "ABC.zip"
2) Open the zip file
3) Copy out the file "classes.dex"
4) Use dex2jar (search Google for some tutorials) to convert it into a jar file
5) Use jd-gui (search Google for some tutorials) to decompile the jar file
the apk tool from Google or apkmulti which one did u use sir ..??
i fixed my problem, one of them was the system variables path "C\\windows\system32" the 2nd was because there was an space in the name of the apk i was trying to decompile.. thank you for taking your time to answer...

[SOLVED] Edit .ogg in camera.apk

I have a rooted Galaxy M Style phone with stock Gingerbread 2.3.4 firmware. I am trying to customize my stock camera app, but am not sure what I'm doing wrong. I plan to replace the autofocus_ok.ogg with a different tune from my phone. I checked the properties of the autofocus_ok.ogg and saw it's a mono, 44100hz, and 96 bitrate file. The tune that I have has the same properties. So this is what I have done so far:
I backed up camera.apk to /system/app/camera.apk.bak and the camera.odex to /system/app/camera.odex.bak. I left a copy of camera.odex in /system/data. I copied the camera.apk to my memory card and placed the file on my computer. I renamed the file to a .rar. I then deleted the autofocus_ok.ogg and placed the tune that I wanted in that directory. Then I renamed it to autofocus_ok.ogg. I renamed the file back to .apk and transferred the file back to the memory card, then over to /system/app. The camera app will not install/not showing up on my phone. I am transferring the files through root explorer on my phone.
I worked with the original apk file again with apktool. I was able to decompile and replaced and renamed the files that I needed again. I compiled the file and transferred the file to /system/app again, but the apk will still not install. I checked the complied apk file and noticed that the file didn't have the META-INF folder, so I copied that over to. Tried to install it again by copying the file to /system/app, but it still won't show up on my phone. Is there anyway for me to change the autofocus_ok.ogg without a custom rom?
Thanks.
ImAhNoBoDy said:
I have a rooted Galaxy M Style phone with stock Gingerbread 2.3.4 firmware. I am trying to customize my stock camera app, but am not sure what I'm doing wrong. I plan to replace the autofocus_ok.ogg with a different tune from my phone. I checked the properties of the autofocus_ok.ogg and saw it's a mono, 44100hz, and 96 bitrate file. The tune that I have has the same properties. So this is what I have done so far:
I backed up camera.apk to /system/app/camera.apk.bak and the camera.odex to /system/app/camera.odex.bak. I left a copy of camera.odex in /system/data. I copied the camera.apk to my memory card and placed the file on my computer. I renamed the file to a .rar. I then deleted the autofocus_ok.ogg and placed the tune that I wanted in that directory. Then I renamed it to autofocus_ok.ogg. I renamed the file back to .apk and transferred the file back to the memory card, then over to /system/app. The camera app will not install/not showing up on my phone. I am transferring the files through root explorer on my phone.
I worked with the original apk file again with apktool. I was able to decompile and replaced and renamed the files that I needed again. I compiled the file and transferred the file to /system/app again, but the apk will still not install. I checked the complied apk file and noticed that the file didn't have the META-INF folder, so I copied that over to. Tried to install it again by copying the file to /system/app, but it still won't show up on my phone. Is there anyway for me to change the autofocus_ok.ogg without a custom rom?
Thanks.
Click to expand...
Click to collapse
erm... is the permissions set correctly rw-r--r-- ?
MoonBlade said:
erm... is the permissions set correctly rw-r--r-- ?
Click to expand...
Click to collapse
Yup, permissions were set correctly like rw-r--r--. Owner is root:root. Those are the permission that I set on the apk file like they were on the original file. I just realized that the compiled apk's from apktools doesn't show up on my phone. The apk that I created by opening up winrar and just replacing the .ogg files do show up, but I get the error "The application Camera (process com.sec.android.app.camera) has stopped unexpectedly. Please try again."
Anything else I can try or a thread to refer to?
ImAhNoBoDy said:
Yup, permissions were set correctly like rw-r--r--. Owner is root:root. Those are the permission that I set on the apk file like they were on the original file. I just realized that the compiled apk's from apktools doesn't show up on my phone. The apk that I created by opening up winrar and just replacing the .ogg files do show up, but I get the error "The application Camera (process com.sec.android.app.camera) has stopped unexpectedly. Please try again."
Anything else I can try or a thread to refer to?
Click to expand...
Click to collapse
why dont you try to push the modified apk manually using root explorer or so instead of pushing via adb ..
after decompiling apk and modifying it, compile it into some folder and then copy it into you sd card then use root explorer and manually push(copy) the apk into system/app .. give proper permissions and then reboot your phone..
Here are some guides to use apktool
http://forum.xda-developers.com/showthread.php?t=1891686
http://forum.xda-developers.com/showthread.php?t=1989533
MoonBlade said:
why dont you try to push the modified apk manually using root explorer or so instead of pushing via adb ..
after decompiling apk and modifying it, compile it into some folder and then copy it into you sd card then use root explorer and manually push(copy) the apk into system/app .. give proper permissions and then reboot your phone..
Here are some guides to use apktool
http://forum.xda-developers.com/showthread.php?t=1891686
http://forum.xda-developers.com/showthread.php?t=1989533
Click to expand...
Click to collapse
I have been pushing the modified apk through root explorer all this time. I don't even have adb install, haha. The procedure you explained have been the way I have been doing it the whole time, lol. I read the threads you posted and the procedure is the same as I've been doing it, except for the second thread. I can't grab the apktool from 4shared because I don't have an account. I am using the latest apktool 1.5.2. Also, I didn't understand what PulseDroid was talking when he said "We are NOT done just yet, we cannot use the new apk's... we have to take what we did and add it back to the original apk file to keep proper signature use something like 7zip, take the 'resources.arcs' file and any other xml files you edited out of the "-new" apk and copy them into Original apk". So I'm suppose to replace the resources.arcs and the .ogg files that I created from the new apk to the old apk? I didn't mess with any xml file.
Anyways, is there anything else I can try?
EDIT: ........I feel so embarrassed. I checked out this thread http://forum.xda-developers.com/showthread.php?t=2378177 and saw this post "Drag your replacement files into WinRAR and (here's the important part) in the Compression Method drop-down choose "Store"." All this time I have been compressing the file as "Normal" in Winrar, instead of "Store".
All in all, I did not need apktool at all. I used the original apk and opened it up in Winrar. I deleted the files that I wanted to replaced and put in the files that I wanted. Each time I put something in the file in Winrar I get a prompt for compression and instead of "Normal" compression just use "Store". It was that simple.
This helped me, thank you!

[Q] How to edit graphics in a Non-System Android App?

I wanted to change the graphics of a certain app to my liking. But I guess it can't be achieved in the non-system apps at least not by me. I tried the apktool to decompress it and then edit the the files I needed to, but it won't compile back?! Can anyone tell me what is going wrong. I have attached the whole screenshot of what error my apktool is showing me.
Also in the build folder I'm only getting classes.dex file and nothing more.

[Q] How should I de/recompile a system app? What did I do wrong?

Hi,
So the situations is like this:
Just got a new LG Nexus 4, NFC enabled, GREAT!!!!
But then I start using it, and the NFC sound (everytime the phone reads a nfc-tag it makes an sound) annoys me beyond belief.
So I start looking around, it seems there's no solution, except recompiling the app.
So I learn how to compile an app (noob here), using this guide: http://forum.xda-developers.com/showthread.php?t=1860115
I'm up to the point where my apk is decompiled, and I have modified the sound files, located in my decompiled files folder respectively at res/raw/start.ogg & res/raw/end.ogg.
I modded the files using audacity, lowering the volume to zero, used them to replace the original .ogg files. The file size is a bit smaller as the original ones (1Kb difference).
Next I use the recompile command: apktool b decompiled_apk_folder_with_modified_files modded_apk_file.apk
So now I have the new nfc apk file, called NfcNci.apk, with which I replace the original file in /system/app.
Next up I reboot my phone into recovery, wipe all cache and dalvik cache, and reboot again.
First thing that pops up on my screen is a force-close message, saying that the nfc-service force closed.
Anyone who can tell me what I did wrong? Or how I can fix this?
Attached are: my decompiled-files-folder (compressed to zip)
the original NfcNci.apk file
my modded NfcNci.apk file which causes the FC's.
Any help will be greatly appreciated!!!!
S.
Looks like you're still on 4.2
The latest NfcNci.apk has some more files.
And your apk is missing the META-INF folder.
I guess that this is the problem.
But you should use "adb logcat" to ensure we're on the right track.
Micky
1 thing i would recomend is not using the actual apk you just built. instead, open your new apk with a file manager such as 7zip and remove your newly compiled files out of it, then put them into the original apk from your rom using 7zip as well! thus keeping the apk's original signature
try to copy the least amount of files from one to another, so to be safe only pull out your new .ogg files, then put them into your original apk! hope this helps
ldrifta said:
1 thing i would recomend is not using the actual apk you just built. instead, open your new apk with a file manager such as 7zip and remove your newly compiled files out of it, then put them into the original apk from your rom using 7zip as well! thus keeping the apk's original signature
try to copy the least amount of files from one to another, so to be safe only pull out your new .ogg files, then put them into your original apk! hope this helps
Click to expand...
Click to collapse
Hi, I tried this, installed 7zip, and double clicked the original apk, I opende the res/raw/ directory, and only copied the files I was using: start.ogg & end.ogg. Then I close 7zip, and send the file to my phone. But as soon as I it them to /system/apps on my phone, and reboot to recovery, wiping the dalvik cache. I get FC's on reboot (NFC-service has FC'd).
Any reasons for this?
Thanks for the help, both of you!
BTW: I'm on Android 4.3 JB

Categories

Resources