5,600,335 Members 35,063 Now Online
XDA Developers Android and Mobile Development Forum

APK Edit v0.4, allows you to edit your apk file

Tip us?
 
Anoniem100
Old
(Last edited by Anoniem100; 20th March 2012 at 06:58 PM.) Reason: New version
#1  
Anoniem100's Avatar
Recognized Developer - OP
Thanks Meter 251
Posts: 124
Join Date: Sep 2010

 
DONATE TO ME
Default APK Edit v0.4, allows you to edit your apk file





The download is based on old source code, I don't have that source anymore due to a hard-disk failure.
I'm rebuilding the application as a open source project.

Source code C# version (Windows)
Source code Java version (Windows / Mac OS / Linux)

With this little program you can simply change icons of your android application.
It even lets you change the applications name.
But wait mike..... there's more.....
It even lets you edit the text used in applications.

Sounds to good to be true...
Well... to be honest.... it is.
But I've come a long way from that initial question to the final answer.
My conclusion so far, it works for most of my applications.
It probably will work on most of yours as well.

(Caution: when overwriting an existing application you will loose your associated data!!!)

Special thanks goes out to:
Brut.all for creating Apktool, the backbone of this little project.

Requirements:
Java & .Net Framework 3.5 (Why build on one platform if you can build on two? I know, I know....)
For installing system apps - S-OFF

Nice to know:
Clicking on the [Icons:] tag in the General tab will open a browser window and search for icons in "Google images".
Donations will be "forwarded" to fellow developers like Brutt.all and others, reinforcing the greatness of today's world.

How the magic works:
When opening an APK file it first tries to decompile it using APK Tool (with the version selected in the settings tab)
If decompile failed, because of a missing framework file, it tries to find this file on your phone.
Most of the times it will find what its looking for, pull it off your phone and tries to recompile the whole thing again.
If somehow it cannot find the required framework file, it will provide you a list of possible files on your phone. You can then choose the correct file yourself.
Assuming this process finishes without any problem you now can edit the apk file.
When you press Apply it will recompile the apk and then sign the newly compiled file.
- System APK files (APK files that needed an additional framework file) will get a copy of the original signature.
- Other APK files will get a brand new signature.
When you Click the phone animation it will push the APK to your phone
- System APK files will be pushed to /system/app (ADB PUSH)
- Other APK files will be installed the normal way (ADB INSTALL)
If install failed due to some signature failure it will do some additional fancy tricks and try it again.

Upcoming features:
New option in settings tab -> Only allow one instance of APK Edit to open at once.
New option in settings tab -> Add/remove APK file association to registry.
New option on startup -> Option to open up a "Phone Explorer", lets you edit APK files directly from phone.

Known issues:
CarHomeGoogle.apk - Doesn't save changes
Quickoffice.apk - Doesn't show up after installing

Version history:
Code:
0.4e - Minor update
Added: Some more debug logging on startup of the application.
Fixed: Version number in settings tab now shows correct version.

0.4d - Minor update
Fixed: Fixed startup crash if some APK properties are empty (like screensize/densities/locales), like in Settings.apk.
Fixed: A little bug in the fancy install mechanism, mainly experienced when installing system apk's

0.4c - Minor update
Fixed: Compatibility issue with Windows XP, causing program to crash on startup.

0.4b - Minor update
Fixed: Error extracting signature.
Changed: Extended logging.

0.4a - Minor update
Changed: Logging is enabled by default.
Added: Some debug messages for when opening of apk goes wrong.

0.4 - Major rewrite
Did a major rewrite of the code.
Added: Option to choose APK tool version
Added: Logging feature
Added: Auto retrieve required dependency files from phone if needed (for editing system apps)
Added: Details panel, shows information about the package.
Added: Restore original file link, for when thing's get really messed up.
Added: Donate button, for those who wanna celebrate with me.
Fixed: Some annoying issues (APKtool Issue 100) / (XLargeScreens bug)
Removed: QR Code installation support
Removed: AdbWireless installation support

0.3 - Update
Added: Language support.
Added: Installation method (USB Cable).

0.2 - Minor update
Added: Save confirmation dialog (as req by droidzone)
Changed: Recreated the loading animation so that it theme's better with the rest of the application.

0.1 - Initial release
For the record... only use on you're own apk files, otherwise it's not that legal I think.
The Following 179 Users Say Thank You to Anoniem100 For This Useful Post: [ Click to Expand ]
 
Droidzone
Old
(Last edited by Droidzone; 28th December 2010 at 02:43 PM.)
#2  
Droidzone's Avatar
Recognized Developer
Thanks Meter 2163
Posts: 5,466
Join Date: Sep 2010
Location: Kerala

 
DONATE TO ME
Looks nice..

I got an error on one apk though..There seems to be an unhandled exception when the filename contains special characters..

Other than that, the program looks and works awesome..Will comment in detail after I decompile something major..

Thanks//

One question:
The program shows smali files below the main prog, and on selecting the folder it opens in explorer. Would changing the smali be updated in the main prog on clicking Apply? Also a dialog to say that the file has been saved with changes, would be nice.

The Following 7 Users Say Thank You to Droidzone For This Useful Post: [ Click to Expand ]
 
Anoniem100
Old
#3  
Anoniem100's Avatar
Recognized Developer - OP
Thanks Meter 251
Posts: 124
Join Date: Sep 2010

 
DONATE TO ME
Tnx for the input, will look into the filename handling!
In the background it recompiles the whole thing, so changes to the smali code should be included in the application if you press apply.

About that dialog.... it's being grown in its incubator now..
Think it will hatch tomorrow
The Following 5 Users Say Thank You to Anoniem100 For This Useful Post: [ Click to Expand ]
 
Droidzone
Old
#4  
Droidzone's Avatar
Recognized Developer
Thanks Meter 2163
Posts: 5,466
Join Date: Sep 2010
Location: Kerala

 
DONATE TO ME
Quote:
Originally Posted by Anoniem100 View Post
Tnx for the input, will look into the filename handling!
In the background it recompiles the whole thing, so changes to the smali code should be included in the application if you press apply.

About that dialog.... it's being grown in its incubator now..
Think it will hatch tomorrow
Excellent! Thanks again, will pop in later to get the revisions

 
Anoniem100
Old
#5  
Anoniem100's Avatar
Recognized Developer - OP
Thanks Meter 251
Posts: 124
Join Date: Sep 2010

 
DONATE TO ME
droidzone, tried out some weird combinations for the filenames but couldn't simulate your problem. Could you give an example?
The Following 4 Users Say Thank You to Anoniem100 For This Useful Post: [ Click to Expand ]
 
MadMax
Old
#6  
MadMax's Avatar
Senior Member
Thanks Meter 890
Posts: 371
Join Date: Oct 2010
Location: Edmonton

 
DONATE TO ME
When i try to open it, Windows 7 says it has stop working???
 
Droidzone
Old
(Last edited by Droidzone; 29th December 2010 at 08:39 AM.)
#7  
Droidzone's Avatar
Recognized Developer
Thanks Meter 2163
Posts: 5,466
Join Date: Sep 2010
Location: Kerala

 
DONATE TO ME
Quote:
Originally Posted by Anoniem100 View Post
droidzone, tried out some weird combinations for the filenames but couldn't simulate your problem. Could you give an example?
I can do better.
My filename is Sample of Filename★(1.1).apk
Maybe the★ character is doing it

I've attached screenshots of the error.(Exception1.jpg)

Error Handle: The directory name C:\Users\Kpcc\AppData\Local\Temp\Sample of Filename?(1.1) is invalid.
I'm also attaching a text file with the actual error code given in the exception>Details. ( exception error text.txt)
The blanked out part is my actual username. Just an alphanumeric. Let it be Kpcc.

Edit: Got one more exception. This occured after inputting the ip of my phone in adb wireless and pressing enter. (Exception2.jpg, Exception2.txt)
Attached Thumbnails
Click image for larger version

Name:	exception1.jpg
Views:	11652
Size:	76.8 KB
ID:	475562   Click image for larger version

Name:	exception2.jpg
Views:	7316
Size:	75.5 KB
ID:	475563  
Attached Files
File Type: txt exception error text.txt - [Click for QR Code] (4.0 KB, 814 views)
File Type: txt exception2.txt - [Click for QR Code] (3.1 KB, 325 views)

The Following User Says Thank You to Droidzone For This Useful Post: [ Click to Expand ]
 
Droidzone
Old
(Last edited by Droidzone; 29th December 2010 at 08:42 AM.)
#8  
Droidzone's Avatar
Recognized Developer
Thanks Meter 2163
Posts: 5,466
Join Date: Sep 2010
Location: Kerala

 
DONATE TO ME
Quote:
Originally Posted by max63094 View Post
When i try to open it, Windows 7 says it has stop working???
Maybe a missing .NET framework? The filename handle is the only error I'm getting in Win 7 Ultimate 64bit. And the filename I used is of course not "normal"..

By the way, a few more items on my wishlist:

1. Advanced Search (and replace?) for strings, with ability to use F3 for finding the next instance
2. Sorting the strings/variables in alphabetical and order of occurence, and another coloumn in the content tab with the name of the smali file in which the string appears.
3. Ability to Save As, without modding the source file.
4. Adb push via cable
5. Listing all the smalis in a tab, and ability to manual edit each one individually (Opening up Notepad would be fine. Maybe a Shell "Start file.txt"?)

Just a few wishes which would make it a powerful tool..

 
Anoniem100
Old
#9  
Anoniem100's Avatar
Recognized Developer - OP
Thanks Meter 251
Posts: 124
Join Date: Sep 2010

 
DONATE TO ME
@max63094 Hmmm, what could go wrong... think droidzone is onto somthing with his comment about .net framework.
I used the .Net Framework 3.5 to create the whole thing.
You can download this for free at Microsoft

@droidzone, tnx again for the input and will work on the file issue, nice wishlist btw!!
Stuff I get exited about :)
I'm afraid I can't promise you all the requested features, have to check the required ammount of effort for some of them.
Have to balance my time, you know how it is whahaha

Sorting alphabetical shouldn't be that big a problem, as for the save as and adb push via cable.
Will work on those first!
The Following 2 Users Say Thank You to Anoniem100 For This Useful Post: [ Click to Expand ]
 
Droidzone
Old
#10  
Droidzone's Avatar
Recognized Developer
Thanks Meter 2163
Posts: 5,466
Join Date: Sep 2010
Location: Kerala

 
DONATE TO ME
Quote:
Originally Posted by Anoniem100 View Post
@max63094 Hmmm, what could go wrong... think droidzone is onto somthing with his comment about .net framework.
I used the .Net Framework 3.5 to create the whole thing.
You can download this for free at Microsoft

@droidzone, tnx again for the input and will work on the file issue, nice wishlist btw!!
Stuff I get exited about :)
I'm afraid I can't promise you all the requested features, have to check the required ammount of effort for some of them.
Have to balance my time, you know how it is whahaha

Sorting alphabetical shouldn't be that big a problem, as for the save as and adb push via cable.
Will work on those first!
Of course..I know how even the tiniest of things can go wrong in an effort which involves file i/o..I'm rather amazed that your Version 0.2 is so finished! A month ago, I was working on a Gui File Explorer for Android, with Adb and Fastboot commands..However time didnt allow me to complete it..

Have you used apk manager? That's what I use when it comes to decompiling apks. Of course once it decompiles, all the rest of functions has to be done by hand. If you havent, check it out. It's the only other program which comes close to a gui. That uses batch commands of course.


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes