[Q] Mod'ing System APKs - Nexus S Q&A, Help & Troubleshooting

Hoping someone can give me a hand here... I feel like I am missing something obvious.
I wanted to learn how to make changes to system APKs, more educational than anything else... figured I'd do something simple like edit mms_config.xml for a slightly larger width/height in Mms.apk
I downloaded APK Manager and followed the steps (I thought). I decomplied the APK, made the adjustment, and recompiled the APK... choosing 'y' when it asked if it was a system file. The new APK was created (called unsignedMms.apk, which I figured was correct since it said never to sign system apps).
I renamed the file to Mms.apk and used root explorer to copy it over to /system/app. However, upon reboot the app doesn't install, as if the file is not there (but it is there and has the proper permissions).
Anyway... feel like I am missing something obvious, but I'd appreciate some enlightenment.
Thanks in advance.

Well, the info seemed confusing so I tried signing it anyway... and then after pushing the signed APK and rebooting the app was installed. I thought finally it was fixed.... but no, lol.
The app FC'd instantly upon opening, even if data was wiped and permissions fixed. I restored the original so I'm fine... but I wish I knew what I was being stupid about, lol.

Never re sign a system app, don't push it either. Flash it in cwm, and if it boots and force closes run adb logcat to see what your exact error is.
Sent from my Nexus S 4G using Tapatalk

dreamsforgotten said:
Never re sign a system app, don't push it either. Flash it in cwm, and if it boots and force closes run adb logcat to see what your exact error is.
Sent from my Nexus S 4G using Tapatalk
Click to expand...
Click to collapse
Hrm... no dice. I took the unsigned APK I created and flashed it instead of pushing it and it acts as if it's not installed (the apk is in the right place with the right name and permissions).
I must be missing some fundamental step in the creation process.
Edit: This is the APK if that is useful in identifying my ignorance, lol.

Related

Changing Market App Icons

Hello,
I did some searching before posting this and have come up with little results that are working for me. I have been able to change my stock icon apps using the method on androidcentral (sorry, can not post links yet). However, trying the same thing with Free Market Apps, I have been unsuccessful.
I am able to get the com.*.*.apk file off of my phone, and can extract the res folder, but after editing and pushing the file back onto the phone, the application is "uninstalled." I believe that I have to sign the apk file again, which I've tried doing with no success.
What I do not understand, is the app Bettercut has the ability to change these Market App Icons, so I thought we should be able to do so as well. If anyone has any knowledge of how to do this, I would greatly appreciate it.
Thanks
Hey you
Change your graphics. Uninstall the app from your phone, put the edited .apk on your sd card and install it with astro (or another app that installs apk files). If you update from market you'll lose customizations.
Hiya.
Yeah, I tried that, but I keep getting unable to install. I do have non-market apps checked, but still no luck. I'm basically just editing the graphic from the com.*.*.apk file, opeing the com.*.*.apk file with 7zip, placing the new graphic in the res/drawable folder, closing 7zip, then I put the com.*.*.apk file onto my SD card (after uninstalling original app) then use astro to install. Doing this is not working. I thought I might have to sign the apk file, rename it or something. Not really sure at this point.
ccapasso said:
Hiya.
Yeah, I tried that, but I keep getting unable to install. I do have non-market apps checked, but still no luck. I'm basically just editing the graphic from the com.*.*.apk file, opeing the com.*.*.apk file with 7zip, placing the new graphic in the res/drawable folder, closing 7zip, then I put the com.*.*.apk file onto my SD card (after uninstalling original app) then use astro to install. Doing this is not working. I thought I might have to sign the apk file, rename it or something. Not really sure at this point.
Click to expand...
Click to collapse
I got it to work by pushing the .apks back through adb and not using a File Manager. I changed a bunch of my Market icons without any problem. No fc's or install failures.
So say for example you were to change the Market Icon for Spare Parts. I assume you did the following:
Pulled com.androidapps.spare_parts.apk from /data/app
Edited the app_icon.png file within the res/drawable folder
Uninstalled Spare Parts
Pushed com.androidapps.spare_parts.apk back to /data/app
Or did you do it differently?
Thanks again for all the help on this. Not sure exactly what is going wrong on my end.
I never uninstalled the apk. I just drug a copy of the .apk to my computer, edited the image, and then pushed it back over the original one. Im in no way any kind of expert, but it worked when I did it.
Hmm. So are you going into /data/app and pulling the com.androidapps.spare_parts.apk (for example), editing, then pushing back w/ out signing or anything? I assume you are pushing back the same file, name exactly the same and everything.
So for example you would have pulled com.androidapps.spare_parts.apk from /data/app, edited the png within the apk file, then pushed com.androidapps.spare_parts.apk back to /data/app and it worked?
No rebooting, signing or anything?
I'm using Fresh 1.1 with MCK and again, do not have SD card partitioned for apps2sd yet.
Thanks again.
Yep, that's what I did. No updating, signing, nothin. I did reboot after I was all done. And I dont mess around with that apps2sd business either. So it should be the same.
gomorrah said:
I never uninstalled the apk. I just drug a copy of the .apk to my computer, edited the image, and then pushed it back over the original one. Im in no way any kind of expert, but it worked when I did it.
Click to expand...
Click to collapse
Wow that worked pretty nicely! I was trying to change the little slide bar that moves as you change screens. I kept upzipping the file and modifying it, then rezipping and trying to reinstall. 7zip lets you modify the .apk with out opening it up...glad this subject came up and you answered this!
Ok. Step by step here is what I did just now:
1. adb pull /data/app/com.androidapps.spare_parts.apk C:\Users\Chris\Desktop
2. Used 7zip to open the apk file.
3. Moved my app_icon.png file into the res/drawable folder and overwrote the current one
4. adb push C:\Users\Chris\Desktop\com.androidapps.spare_parts.apk /data/app/
5. adb shell
6. reboot
Doing this did not work. It only made the icon on my home screen for Spare Parts go away, and the app is no longer listed as being installed. I can still see the file in my /data/app/ directory, but it is not installed or showing up anywhere.
Any ideas?
ccapasso said:
Ok. Step by step here is what I did just now:
1. adb pull /data/app/com.androidapps.spare_parts.apk C:\Users\Chris\Desktop
2. Used 7zip to open the apk file.
3. Moved my app_icon.png file into the res/drawable folder and overwrote the current one
4. adb push C:\Users\Chris\Desktop\com.androidapps.spare_parts.apk /data/app/
5. adb shell
6. reboot
Doing this did not work. It only made the icon on my home screen for Spare Parts go away, and the app is no longer listed as being installed. I can still see the file in my /data/app/ directory, but it is not installed or showing up anywhere.
Any ideas?
Click to expand...
Click to collapse
Try pulling the original icon and editing it. Just make it a solid black square. Then put it back in and push to the phone. Sounds like your new icon changes the filesize enough that it needs resigned.

Default launcher, and app removal...

Just a few quick questions that I had trouble finding answers to.
1. Easy way to set the default launcher to launcher.apk, even if rosie is removed it still shows up after flashing rom?...
2. When I unzip a rom, remove apk's, resign, and flash, many of the apk's I had removed still show up. Rosie, sprint nfl, default music, htc contacts, etc. Anyone know why this is? Tried with several different roms and wiped excessively. Still seem to be several app's I cannot remove without adb'ing after flash...
Thanks in advance
Make sure you Wipe Data/Factory Reset from the Recovery image before flashing
mrinehart93 said:
Make sure you Wipe Data/Factory Reset from the Recovery image before flashing
Click to expand...
Click to collapse
Turdburglar said:
Tried with several different roms and wiped excessively. Still seem to be several app's I cannot remove without adb'ing after flash...
Click to expand...
Click to collapse
10charsssssssssssssssss
Aah sorry I missed that. It could be that the apps you're attempting to remove that are being left-over are in /system/app... because wiping Data doesn't remove them from there.
mrinehart93 said:
Aah sorry I missed that. It could be that the apps you're attempting to remove that are being left-over are in /system/app... because wiping Data doesn't remove them from there.
Click to expand...
Click to collapse
Thanks, strange, shouldn't it format system/app on flash? Anyone tell me how I might accomplish that?
Actually now that I think about it, even if I adb rm, and flash a rom with the apk's removed, they still show up.
Wow... I have no idea then Nevermind, scratch that! DO you have an ext partition or Apps2SD installed? That would be the culprit!!!!!
mrinehart93 said:
Wow... I have no idea then Nevermind, scratch that! DO you have an ext partition or Apps2SD installed? That would be the culprit!!!!!
Click to expand...
Click to collapse
nope, weird right? think I got sprint nfl out by default finally. Still got Rosie, music, people...
default im won't go away either, or weather.
Screw it, i'll just make a .bat, what a pain...
Well I think I found my problem, not sure how to fix it tho if anyone can lead me in the right direction. I've been using fresh pre-kitchen to sign zips. Seems no matter what I put in the update-script before I sign it with pre-kitchen this is all I have in there afterword...
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
So obviously it's not formatting system. or doing anything but copying "system". I can also try to edit/replace the update-script after I sign the zip but that gives me a "E:/Wrong Digest .../update-script E:Verification failed" error when I attempt to flash.
All I'm trying to do is add a data folder to damagecontrol2.07.2, remove some apps, rosie, add a new taskbar, and lockscreen.
Is there any better easy way to do this, update-script is killing me.....
Suppose I could try to sign it manually, but I'm a noob and lazy I guess, easy and quick is good. Anyone else having this sort of problem with pre-kitchen?
I already got damagecontrol running on my phone with all the things I want using a .bat, just trying to figure out how to put it all in a rom I can flash and be done with it in the future.... Thanks for any help.
I find the easiest way to sign update.zip's is to find the script somewhere around here (I have no idea... I found it like 4 months ago) that adds "Sign Zip" to your right-click context menu. If you do that, then all you have to do is pull the META-INF folder from the ROM you're basing it off of, put that next to System and boot.img in the same directory, highlight them all, zip them, and then right click and sign the zip. That's how I do stuff, and it works perfectly every time.
mrinehart93 said:
I find the easiest way to sign update.zip's is to find the script somewhere around here (I have no idea... I found it like 4 months ago) that adds "Sign Zip" to your right-click context menu. If you do that, then all you have to do is pull the META-INF folder from the ROM you're basing it off of, put that next to System and boot.img in the same directory, highlight them all, zip them, and then right click and sign the zip. That's how I do stuff, and it works perfectly every time.
Click to expand...
Click to collapse
thanks, I'll take a look around for it.
No problem. If it helps, I'm pretty sure I found the script on a Droid forum. I'd help you look for it, but I have homework to do that involves Shakespearian soliloguy's... and Shakespeare is not one of my forte's.
Found one for linux here...
http://forum.xda-developers.com/showthread.php?t=538020
to bad I'm on windows at the moment, might be about time to go back to ubuntu anyway.
Anyone got one for windows for sh..s and giggles?
ahhh well I've been using winzip to zip the files, seems others have been having problems also, supposedly 7-zip works better? I'll post results in case anyone else has similar issues.
Nice! found the windows script for right click also incase anyone wants it.
http://forum.xda-developers.com/showthread.php?p=6232592
Yep problem was winzip. works like a charm when zipped with 7zip... tried zips from both winzip and 7zip with pre-kitchen and the script, update-script in the winzip'd files is always bare. odd. Thanks for pointing me to the script mrinehart, doesn't get easier than that.
No problem! Glad you were able to find it and get everything working

[Q] Extracting and Amending apps .png file - Need some help please

Hi All -
Firstly.. Please don't burn me for being thick!..
I've been trying to see how much I can get out of my phone since I got it, without having to root and mess about "under the hood" of the apps I've installed..
But now I'm getting curious and for my first attempt at this I will remain "unrooted"..
I've got ADW and I want to amend some of the .png files - so I tried extracing the app from the phone, openned the APK using winzip and amended some of the .png files.. I've uninstalled ADW from the phone and then tried to reinstall the updated version which I've put back onto my SD card - but it says "Cannot install ADW on this phone".....
I've had a search around XDA but can't find anything that helps..
If there is already a thread that talks me through this please point me in the right direction, otherwise if someone could explain to me if I'm missing a step I'd appreciate it!..
Cheers!
Alan.
EDIT - Ok - It's solved... I downloaded the SignApk app off t'internet signed the new APK that I'd created and then sent it back to my phone - which worked.. finally solved.
Thanks for all who helped me..
Solution is - YOU HAVE TO SIGN the Apk if it's NOT a system APK..
if i read correct you have extracted the apk ? If yes it won't install unless you sign it. All you have to know about signing is here .
Or you can just open the archive with 7zip or whatever you want and drag the files there and it will work just fine.(Haven't checked though but it was pointed out here ) .
Hi - Thanks for this...
By Extracted... What I did was I used astro to back it up to the SD card then bluetoothed it to my laptop - opened the APK using Winzip and edited some of the png's within the archive.. then I saved it, bluetoothed it back to my SD card and tried to reinstall it from there..
that's I got the message "can't install ADW on this phone" message...
?? Perhaps I need to extract it differently? or would I need to re-sign it first?
Thanks again.
Use 7zip instead and right click the apk and hit open archive instead of extract. Then drop the files u edited into the correct folder. It should install...
Hope it helps.
currently stuck with this aswell, ive just opened the archive and stuck in the edited images. cannot intall on this phone error afterwards
my post on it the now http://forum.xda-developers.com/showthread.php?t=779702&page=3
yours worked lol need to read into signapk a bit more i think lol only few imaged need sorted, the google search widget seems to be a bit crazy
very old version aswell cant get my backed up settings etc doesnt have many options at all will use the 1.1.3 i had earlier when i get home
Check out the hacks and mods thread. It covers how to do this.
Btw I'm not flaming (in any sense of the term. )
Drag n drop works for system apps but for apps like the ones in market ul need to remove meta inf folder, sign the apk file n all should be well. although I think because the certificates have been changed you won't be able to update it via market. I've done quite a bit of editing..
Sent from my rooted 026 X10i using swype via Xda
Mobzter said:
Drag n drop works for system apps but for apps like the ones in market ul need to remove meta inf folder, sign the apk file n all should be well. although I think because the certificates have been changed you won't be able to update it via market. I've done quite a bit of editing..
Sent from my rooted 026 X10i using swype via Xda
Click to expand...
Click to collapse
Thanks Mobzter - you can ignore my question in the other thread now!!!.. you've answered it here!
Cheers.
Mobzter said:
Drag n drop works for system apps but for apps like the ones in market ul need to remove meta inf folder, sign the apk file n all should be well. although I think because the certificates have been changed you won't be able to update it via market. I've done quite a bit of editing..
Sent from my rooted 026 X10i using swype via Xda
Click to expand...
Click to collapse
My mistake sorry. :-(
I'll forgive you graviel!! just don't do it again!! ;-)
Lol I was jus saying.. hell im not even saying that im right but from personal experience aswel as what I've read over time thats my conclusion! wish I learnt this **** before I got a job lol
Sent from my rooted 026 X10i using swype via Xda

[Q] Unable to install soft keyboard

I have the TnT and Android keyboard.
Tried to install a couple. They show up in the Settings. Tapping the checkbox gave the Attention warning. Clicking on OK. But the checkbox remains unchecked.
In one of the case, when I click on "Enable", it says
"Sorry your device can't perform this action. Please send report to developer".
Am I missing something?
Lots of threads out there on this. Fix involves copying the apk from the data/apps folder to the system/apps folder I believe.
Sent from my Droid using XDA Premium App
Would you mind telling me which keywords to search?
Thanks
I posted a how to video on my blog for this issue. http://www.androidappgeek.com/2011/04/gtablet-tutorial-enabling-third-party.html
Checked my device. The apk's are already in /system/app, not /data/app. I did not move things around.
What else is missing?
Thanks!
The keyboard I installed is Multiling Gingerbread Keyboard. I saw the file in /system/app.
Now I've uninstalled it but could not find a link to download the apk file. So I installed it again.
This time, the same problem. However, I can't find the Multiling file in either /data/app or /system/app.
Where is the file now?
Thanks!
Hmmm...I'm not sure how it would already have been in system/app. I found it it in the market like normal and moved from data/app to the system like i showed in the video. Worked perfectly on my end. Do you not have access to the market?
Sent from my GTablet-TnT-Lite using Tapatalk
Yes I do. Most apps from Market installs and runs just fine.

[Q] Renaming apks - not holding new name?!

Hey guys,
I still rename my bloat, I know, you probably see this as lame, but maybe someone has the answer anyway.
In system/app, the Motorola Migrate apk (fswriter.apk) can be renamed using root and Root Explorer, but after a minute or so, or a reboot, the apk returns to the original name (I usually add .old to the end). Just about all of the other apks I rename in that folder retain .old in the name even after a reboot. The entire contents of system/vendor/app does this. I can rename the apks, refresh and see they are still renamed, and then a minute later, or a reboot later, they drop the .old or .delete extension.
For now, I disabled the ones that appear in the app drawer, but maybe someone who is curious enough knows the answer.
Thanks,
Jason
JaBr1884 said:
Hey guys,
I still rename my bloat, I know, you probably see this as lame, but maybe someone has the answer anyway.
In system/app, the Motorola Migrate apk (fswriter.apk) can be renamed using root and Root Explorer, but after a minute or so, or a reboot, the apk returns to the original name (I usually add .old to the end). Just about all of the other apks I rename in that folder retain .old in the name even after a reboot. The entire contents of system/vendor/app does this. I can rename the apks, refresh and see they are still renamed, and then a minute later, or a reboot later, they drop the .old or .delete extension.
For now, I disabled the ones that appear in the app drawer, but maybe someone who is curious enough knows the answer.
Thanks,
Jason
Click to expand...
Click to collapse
are you rebooting into R/W mode aka recovery mode? For this line of Droids, after rooting, in order for you remove or change anything within the system you need to reboot into "recovery" and i use the quotations is because in all androids in the past (at least the ones i have had) recovery is TWRP or CWM but with our phones recovery is the OS but the OS is R/W...so make sure you are rooted and then you can either use an app like Rom Toolbox for example, use the rebooter option within and in that menu select Reboot Recovery, it'll reboot into the OS but rewritable once you are booted that way you can add and remove system apps as well as make any name changes to the system files and whatnot...hope this helps
Holo reboot in play store works great for rebooting into recovery or just a normal reboot!
Sent from my XT1080 using xda app-developers app

Categories

Resources