Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
derik001
Old
(Last edited by derik001; 12th December 2010 at 07:01 AM.) Reason: Issue Resolved
#1  
Junior Member - OP
Thanks Meter 0
Posts: 1
Join Date: Jun 2010
Default [Q] Problems Recompiling Protips.apk

I've been a long time reader and I've learned quite a bit today on Android and its applications. I've been trying to recompile a modified Protips.apk and have it successfully run on my D1. I've been unsuccessful, and would like some pointers on where to looks next.

I'm intrigued by the modified Home Screen Tips widget as seen on Cyanogen and BuglessBeast. I figured I could do it too since it seems rather simple.

I pulled Protips.apk from my D1, archived it somewhere else, and ran apktools to decompile the app. I found that in: res/values/arrays.xml there's all the code I need to start changing text. I wanted to do something basic like Hello World as a test, so I slightly changed the first item to read Hello World! on the first line. So I edited the .xml file and considered the job done.

I recompiled my modified contents using apktools, and pushed the apk to my phone. It didn't show up in the widgets menu, so I figured I needed to sign the thing.

First I tried copying the META-INF data from the original APK into the new one, and though the you could apply the widget to the homescreen, it'd error. "Problem loading widget." Next I took the original manifest and popped it into the new APK. Same thing.

I thought I could try singing the modded APK myself. After recompiling I ran the APK through Auto-Sign. It still errors.

Someone mentioned that if you're modifying XML files, the resources.arsc file should be removed "prior to recompiling." I'm lost at this point, since when you decompile with apktools, you don't have access to that resource. If you remove it from the final apk, the app doesn't show up in the widgets menu.

I'm trying to figure out where I'm going wrong. Surely it has to be something rather simple.

------------------

Resolved

Decided to give Apk Manager a try. Decompiled the APK, edited the arrays.xml file, Compiled (deleting resources.arsc where instructed in the keep folder), signed the app, then pushed it to my phone. It works. I'll attempt the process using apktools again now that I have a working mod.
 
GrimReaper24
Old
#2  
GrimReaper24's Avatar
Retired Forum Moderator
Thanks Meter 1082
Posts: 5,516
Join Date: Feb 2011
Quote:
Originally Posted by derik001 View Post
I've been a long time reader and I've learned quite a bit today on Android and its applications. I've been trying to recompile a modified Protips.apk and have it successfully run on my D1. I've been unsuccessful, and would like some pointers on where to looks next.

I'm intrigued by the modified Home Screen Tips widget as seen on Cyanogen and BuglessBeast. I figured I could do it too since it seems rather simple.

I pulled Protips.apk from my D1, archived it somewhere else, and ran apktools to decompile the app. I found that in: res/values/arrays.xml there's all the code I need to start changing text. I wanted to do something basic like Hello World as a test, so I slightly changed the first item to read Hello World! on the first line. So I edited the .xml file and considered the job done.

I recompiled my modified contents using apktools, and pushed the apk to my phone. It didn't show up in the widgets menu, so I figured I needed to sign the thing.

First I tried copying the META-INF data from the original APK into the new one, and though the you could apply the widget to the homescreen, it'd error. "Problem loading widget." Next I took the original manifest and popped it into the new APK. Same thing.

I thought I could try singing the modded APK myself. After recompiling I ran the APK through Auto-Sign. It still errors.

Someone mentioned that if you're modifying XML files, the resources.arsc file should be removed "prior to recompiling." I'm lost at this point, since when you decompile with apktools, you don't have access to that resource. If you remove it from the final apk, the app doesn't show up in the widgets menu.

I'm trying to figure out where I'm going wrong. Surely it has to be something rather simple.

------------------

Resolved

Decided to give Apk Manager a try. Decompiled the APK, edited the arrays.xml file, Compiled (deleting resources.arsc where instructed in the keep folder), signed the app, then pushed it to my phone. It works. I'll attempt the process using apktools again now that I have a working mod.
Using apktool you must sign after other wise it won't install... I had issues using it to do a status bar mod.. Wondering if I can just sign it using that apkmanager and have it work... I used a kitchen to sign mine and it didn't sign right...
-XDA MODERATOR-
HERE TO HELP.
Drop me a thanks if you liked the help.
 
Post Reply+
Tags
apktools, modding, modifying xml, protips.apk
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...