Mike Szczys · May 5, 2013 at 10:00 pm

Decompile, Recompile, and Sign APKs by Example

Last month, we saw a new tool that made it painless to edit the contents of Classes.dex. If you were drawn in by that prospect but couldn’t quite get the pieces to work, I think you’ll appreciate following the example that XDA Recognized Themer/Contributor Rizal Lovins put together. He takes one step back to look at the bigger picture, giving a start-to-finish walkthrough for decompiling, editing, recompiling, and signing an APK file. The necessary tools are pretty much the same (Windows, Java, Android SDK, Apktool, and a text editor) so that you may pick up where you left off with your smali and Baksmali editing experiments.

To use Apktool to decompile an APK, you need to also have the support packages it uses (ie: framework-res.apk). After issuing a few commands, Apktool will spit out the files hidden within and it’s time to start editing. Rizal then goes on to show how to package everything back up and resign the edited app. Check out the original thread for full details.

The biggest benefit of publishing guides like this one is that the community can learn and improve upon them. XDA Recognized Themer Ibanez7 did just that. His thread, which mentions Rizal’s work as a reference, demonstrates how to use the same techniques to change the font color and edit the activity title bar of an app.

 

 


_________
Want something on the XDA Portal? Send us a tip!

Mike Szczys

szczys is an editor on XDA-Developers, the largest community for Android users. Mike Szczys is a professional musician but spends all his free time working with hobby electronics. As Contributing Editor for Hackaday.com he became interested in Android as some of the early hardware hacks started popping up on the Internet. What followed was a gradually rising addiction to all things Android. View szczys's posts and articles here.
Mathew Brack · May 28, 2015 at 09:59 pm · 1 comment

I/O Summary: How Android M Handles Power And Charging

In the spirit of improving the core Android experience, Google is changing Android M to be smarter about managing power. Their new Doze feature comprises of two primary roles which allow Android to use motion detection in order to predict activity, and go into deep sleep at the right time based on accelerometer readings.   In order to extend your screen off battery life, Android M will now monitor your activity levels and if it detects that your device has...

XDA NEWS
Mario Tomás Serrafero · May 28, 2015 at 09:51 pm · 1 comment

I/O Summary: Google Photos App

At I/O 2015, Google tackled the information problem in mobile once more, this time through pictures: “how incredible is it that we all have a camera in our pockets at any moment? (...) These moments tell your story (...)[but] taking more pictures and videos makes it harder to relieve memories due to the sheer volume”. This is why they are revamping Google Photos and centering it around 3 big ideas:   Creating a home for all photos and videos that is...

XDA NEWS
Mario Tomás Serrafero · May 28, 2015 at 09:26 pm · 2 comments

I/O Summary: Development, Play Store, The Next Billion

VP of Engineering Jen Fitzpatrick began talking about what Google is doing to help “the next billion” come online. More and more people are getting their first smartphone, and for many people this first phone will be their first computer.   The majority of the next billion will be Android users and they “want to remove the barriers of smartphone adoption”. While there are huge displays of phones on sale, not all are able to run the latest and greatest...

XDA NEWS
Share This