[GUIDE] Apktool|Signapk: Inside & Out

thaunknownartist

RAZR Developer
Aug 12, 2011
180
326
0
Logo-1.png

Get To Know Apktool
It is a tool for reverse engineering 3rd party, closed, binary Android apps. It can decode resources to nearly original form and rebuild them after making some modifications; it makes possible to debug smali code step by step. Also it makes working with app easier because of project-like files structure and automation of some repetitive tasks like building apk, etc. It is NOT intended for piracy and other non-legal uses. It could be used for localizing, adding some features or support for custom platforms and other GOOD purposes. Just try to be fair with authors of an app, that you use and probably like.


What Do I Need To Run It?
JRE (Java Runtime Environment). Get it here


How Do I Install It?
Windows:
  1. Download package attached to Thread
  2. Unpack the package in your C:\ directory ie: C:\apktool

How Do I Decode A File?
  1. Place the apk in the same location as apktool
  2. Open Windows Command Processor.
  3. Move to the directory to where apktool is located. ie: cd C:\apktool
  4. Type in the decode command with the apk name. ie: apktool d Launcher.apk
  5. Done!

How Do I Package My Folder Up Now?
  1. Open Windows Command Processor.
  2. Move to the directory to where apktool is located. ie: cd C:\apktool
  3. Type in the build command with the apk folder directory. ie: apktool b C:\apktool\Launcher
  4. Done!

But How Do I Sign It Now?!
  1. Open Windows Command Processor.
  2. Move to the directory to where SignApk is located. ie: cd C:\signapk
  3. Type in the sign command with the apk folder directory. ie: java -jar signapk.jar certificate.pem key.pk8 C:\apktool\Launcher.apk C:\apktool\Launcher-signed.apk
  4. Done!

Remember About The Framework Files!
As you probably know, Android apps use some code and resources that are built into the Android system on your device. Apktool needs these framework files to decode and build apks. Standard framework is embedded into apktool, so you don't need to do anything for most apk files. But some manufacturers, for example Samsung, add their own framework files and use them in system apps. To use apktool against such apps, you must pull framework from a device and install/register it to apktool.
 
Last edited:
Good post. Sure some inspiring themers and devs will find this useful.

Thank you so much, I'm starting to program again so I thought I should release some guides in the forums. One day I wanna be a Diet Mod or Mod for this site. All in due time :D
 
Thank you so much, I'm starting to program again so I thought I should release some guides in the forums. One day I wanna be a Diet Mod or Mod for this site. All in due time :D

Good recommendation, if your going to do a "generalized guide" like this one I would post it up in the Hacking forums. That way all members/users across the board can benefit from it.

If its going to be device specific based guide then choose the device forum of choice.
 
Good recommendation, if your going to do a "generalized guide" like this one I would post it up in the Hacking forums. That way all members/users across the board can benefit from it.

If its going to be device specific based guide then choose the device forum of choice.

Good to know, next Guide I release that is universal, I will post into the Hacking section. This was just a write-up that I did real quick right now while I was updating my launcher. Thank you for the recommendation.
 
I have a question: how do I sign zips using signjar? I've tried using it to resign zips but it never works

Sent from my VM670 using Tapatalk 2
 
Love the tool and it has been making rebuilding my OM ROM easier, and sign all the apps with the same key: everything works. The only problem I'm having is signing the phone app, it always force closes and with the new version I always get "W: Skipping "android" package group." and fails to compile.

It is the only app that does this.
 
Love the tool and it has been making rebuilding my OM ROM easier, and sign all the apps with the same key: everything works. The only problem I'm having is signing the phone app, it always force closes and with the new version I always get "W: Skipping "android" package group." and fails to compile.

It is the only app that does this.

I don't understand what you mean? Explain
 
Okay, so I did figure it, had to use a none edited/modified Phone.apk (some how the one that I was using was corrupted) and I copied the testkey and signkey from the Android SDK and that worked.
 
If you look inside the META-INF you'll see that they are signed, plus when the phone boots up it looks for the signature a logcat showed me that.
 
For some reason I can't get apktool to work on widows! Is there a guide for dummies ( Ian serious) :) thanks
 

Trending Posts

Forum statistics

Threads
956,847
Messages
6,970,289
Members
3,163,639
Latest member
hubolt