[HOW TO] Use and install APKtool - Android Software Development

So, here i'm again porting a tutorial based on DSM_'s Tut
What do you need:
JRE (Java Runtime Environment)
Install:
Windows:
Download apktool
Download apktool-install-windows
Unpack both pakages you will get three files, copy those files to your Windows directory i.e. C:\WINDOWS
Decoding files:
Open Command. Run>cmd
Type-
Quote
apktool d file.apk [directory]
Example - apktool d D:\nfsshift.apk D:\nfsshift
Done!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
FrameworkFiles
Apktool needs the 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.
For Example, you want to decode TouchWizLauncher.apk from Android v2.2 of Galaxy 5. If you try to do that, you will get an error message:
You need to install framework in apktool Type-
apktool if [framework location]
I have the got the framework-res.apk & twframework-res.apk by extracting the ROM. You can also copy it from your phone. But take care you must copy framework.apk from that ROM in which you got the Application file.
Then try again
Now is working.
How to build decoded files:
Just type
apktool b [directory in which you have decoded the files]
Example - apktool b D:\nfsshift
Done!
You will find the apk file inside the decoded directory, like I found it in - D:\nfsshift\dist\nfsshift.apk
Now you need to sign your APK file.
How to Sign APK files:
When publishing an application or a custom rom you need to sign the .apk or .zip files with a certificate using a private key. The Android system uses the certificate to identify the author of an application and establish trust relationship between applications. The classic way of doing this was to use keytool then sign it with jarsigner. In this tutorial i’ll explain an alternative method which is relatively easy to use for most people using a tool called SignApk.jar.
First download the SignAPK tool - http://www.mediafire.com/?rw57ftajd6nm81s
Extract them to a directory you will remember. I have put them in C:\SignApk
Now just open cmd and type -
Quote
cd C:\SignApk
java -jar signapk.jar certificate.pem key.pk8 your-app.apk your-app-signed.apk
Example - java -jar signapk.jar certificate.pem key.pk8 D:\nfsshift\dist\nfsshift.apk D:\nfsshift\dist\nfsshift-signed.apk
Your APK is signed and can be installed.

●๋•ηι¢є ιηƒσ●๋•
Sent from my GT-S7500 using xda app-developers app

I know this is an old post but I need some help. I have the apktool, dex2jar and jd-gui in a folder on my Desktop
I installed the framework-res.apk and it installs into a different folder. Do I need to have the Framework folder into the same folder as the other files or will it be able to locate the framework files no matter where they are.
The reason I ask is because even though I have installed the framework, I am still getting error message when attempting apktool d filename.apk. Any ideas would be helpful, thank you

Related

[HOW TO] Decompile + Recompile SecPhone Jellybean 4.1.1 + 4.1.2

This will show you how to Decompile and Recompile SecPhone.apk (Deodexed) for Jellybean 4.1.1 and 4.1.2
Tools Needed:
This zip file: http://www.mediafire.com/?0b2ad2ow254ou3a
Java jdk and environment variables set correctly (if you don't know how, Google it)
Notepad++
7Zip
Decompile:
1. Download attached files and unzip folder to Desktop.
2. Place SecPhone.apk in Tools folder you just downloaded.
3. Hold Shift and right click inside of folder then click "Open command window here". Make sure no files are selected or it will not show.
5. Type apktool d SecPhone.apk and hit enter. This will create a folder called SecPhone.
6. You’re done you have decompiled the apk.
Recompile:
1. Hold Shift and right click inside of folder then click "Open command window here".
2. Type apktool b SecPhone nSecPhone.apk and hit enter. This will error and look something like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
3. Now look at the code. If you look you will see there are 3 errors like this: Desktop\Tools\SecPhone\res\values-es\strings.xml:195: error: (they might look slightly different with your apk).
4. The things you need to fix this are right here (values-es) refers to a folder in the apk Desktop\Tools\SecPhone\res\ and strings.xml refers to an xml file inside that folder. Also if you read the whole line you will see it is some sort of format error. So go to Desktop\Tools\SecPhone\res\values-es\strings.xml and open it with Notepad++.
5. Now refer back to the error log and you will see values-es\strings.xml:195 the 195 refers to the line in the file that is causing the error. Scroll to that line, it says something like "%1$d% del ciclotranscurrido. So what’s the error? Let’s find out. Copy the code between the "" in this case its throttle_time_frame_subtext.
6.Now go to Desktop\Tools\SecPhone\res\values\strings.xml and open that with Notepad++ and search for code you just copied throttle_time_frame_subtext and compare the two files. You can see the difference error code has this %1$d% and the correct code has %1$d٪ so correct the code and save the file. Now do this for all 3 errors.
7. Now with all errors fixed we can Recompile so type apktool b SecPhone nSecPhone.apk and press Enter. This time it will complete without errors.
8. Open original SecPhone.apk with 7zip and open new nSecPhone.apk with 7zip and copy META-INF and AndroidManifest.xml from originalapk to new apk. Rename new apk to SecPhone.apk and its ready to be flashed. Don't forget to Zipalign. DONE!
If this helps you please don't forget the thanks button
Reserved
Thanks for this mate.. I was wondering for a long time on this error
sent from here, there, somewhere!!
Thanks for your work!

Help decompile recompile apk

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
What programs do I need? Leave link. Thank you!
try VTS studio,
google it,
best android development suite
Are you trying to decompile a system app from a ROM? If yes then do this:
You need the following:
1. framework-res.apk and twframework-res.apk from the ROM which you took the apk from
2. Probably administrator privilege
You need to do the following:
1. Navigate to Desktop and look for user name folder.
Example: Desktop/Carl/
2. Navigate to user name folder and look for "framework" folder inside "apktool" folder
Example: Desktop/Carl/apktool/framework/
3. Open apktool folder and inside you will see a bunch of frameworks in .apk folder
4. Leave that folder open and take the framework-res.apk and twframework-res.apk from the ROM which you took the apk you're trying to decompile/compile
5. Rename framework-res.apk to: 1.apk and twframework-res.apk to: 2.apk
6. Copy 1.apk and 2.apk to Desktop/<username>/apktool/framework/
Example: Copy 1.apk and 2.apk to Desktop/Carl/apktool/framework/
Once you're done, close and apk tool that you're using and try decompiling/compiling again. If still the problem exist, restart your computer.
Hope this helps.
PS. Sorry for late reply, kinda busy at work.
CarlDeanCatabay said:
Are you trying to decompile a system app from a ROM? If yes then do this:
You need the following:
1. framework-res.apk and twframework-res.apk from the ROM which you took the apk from
2. Probably administrator privilege
You need to do the following:
1. Navigate to Desktop and look for user name folder.
Example: Desktop/Carl/
2. Navigate to user name folder and look for "framework" folder inside "apktool" folder
Example: Desktop/Carl/apktool/framework/
3. Open apktool folder and inside you will see a bunch of frameworks in .apk folder
4. Leave that folder open and take the framework-res.apk and twframework-res.apk from the ROM which you took the apk you're trying to decompile/compile
5. Rename framework-res.apk to: 1.apk and twframework-res.apk to: 2.apk
6. Copy 1.apk and 2.apk to Desktop/<username>/apktool/framework/
Example: Copy 1.apk and 2.apk to Desktop/Carl/apktool/framework/
Once you're done, close and apk tool that you're using and try decompiling/compiling again. If still the problem exist, restart your computer.
Hope this helps.
PS. Sorry for late reply, kinda busy at work.
Click to expand...
Click to collapse
THANKS! Carl, is sucess!
vitorhugo said:
THANKS! Carl, is sucess!
Click to expand...
Click to collapse
Place solved in title k
Sent from my Titan TV S320 using xda premium

[Tutorial] Set Default Theme When Building Rom

This tutorial is for people building roms based on CyanogenMod only !
This tutorial will explain how to use a custom CyanogenMod apk theme as the default when building roms
Things you will need
1. Java JDK and Java JRE installed
2. ApkTool - Download
3. Notepad++ - Download
4. Theme apk file
5. Your custom rom
Step 1
Download and extract apktool into a folder on the root of you drive, call the folder apk
Once extracted you you have three files like this
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Step 2
If you have already packaged your rom use something such as WinRAR to extract it to a folder.
Once extracted it should look similar to this
Step 3
In your rom folder navigate to system/framework and look for the framework-res.apk file
It should look like this
Step 4
Copy the framework file to your apktool folder
Your apk tool folder should now look like thisView attachment 2484553
Step 5
Now copy your theme into the same folder
The folder should now look like thisView attachment 2484556
Step 6
Run command prompt and enter the following commands
Code:
cd C:\apk
Code:
apktool if framework-res.apk
Code:
apktool d <whatever your theme apk is called>.apk
Your CMD windows should now look like this
Step 6
Go back to your apktool folder and now you should have a folder called <your theme name>.apk
It will look like this View attachment 2484571
Step 7
Go inside that folder and open AndroidManifest.xml with Notepad++
Step 8
Once you open this file you need to look for two strings, they should look similar to these ones
Step 9
Once you have found these strings minimize the Notepad++ window and navigate back to your rom folder
Now navigate to system and open build.prop with Notepad++ and add these two lines
Code:
persist.sys.themeId=~~~~~~
persist.sys.themePackageName=+++++++++
Replace "~~~~~" with theme id from AndriodManifest.xml
Replace "+++++" with package name from AndroidManifest.xml
Mine would look like this
Now save build.prop
Step 10
Go to your rom folder and navigate to system/app and copy your theme apk inside of this folder
Now zip your rom back up and flash it
When your rom boots you should now see you custom theme
Note
If you cant get apktool to work and it keeps saying something along the lines of "java is not an exacutable command"
Make sure you have installed the Java SDK and Java JRE and navigate to C:\Program Files (x86)\java
and you should see a folder called "jdk1.7.0_45" or "jdk" with different numbers after it
Now go to control panel and on the right hand side click "Advanced System Settings"
Then click "environment variables"
Under "system variables" create a new variable and call it JAVA_HOME
In variable value put the path of your java sdk folder so it would be
C:\Program Files (x86)\Java\jdk<what ever numbers are here on your pc>
Or 32 bit users
C:\Program Files\Java\jdk<what ever numbers are here on your pc>
Now before you save the environment variable put the path in speech marks like this
Now save and reboot
And for CM12.1 its possible? Or CM11?? I try but not work :/

APK Tool For Windows

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
APKTOOL FOR WINDOWS
First and foremost thanks to @iBotPeaches for his dedication to Apktool!
Because I can double-click more accurately than I can type, I made this up to avoid having to use command line and speed up modding the couple of apks that I try to keep up on. Maybe it'll help a few others speed up their process too.
Now, this is a Windows based GUI for Apktool. No command line needed. That said, you should be very familiar with already using Apktool via command line so you know the process that it follows and the corrective measures needed should errors pop up. You need to have the exact same setup as Apktool (Java in your environment path and current Java version AND relevant frameworks installed via apktool!! ). All that this does is provide a simple Windows style menu for the process. You can very easily update apktool.jar as @iBotPeaches updates it. Also, if you would like to add any switch to the decompile or compile command other than the typical (which is what I used) you can just modify the corresponding .bat file located in SupportFiles that APKTool For WIN calls on.
See the attached screenshots in the following post for the easy to follow layout and it's capabilities. It will install frameworks/etc, decompile, compile (with or without original manifest and meta-inf), sign (with testkey or your personal one), and display an apktool log.
As this directly uses apktool.jar, it will have the same quirks/issues such as this current one:
10/18/2016 - for apktool v2.2.1 regarding v2 signed apps - LINK​
V4 - As I was posting this, I noticed there was an update to apktool.jar (v2.2.1) which I updated the file to reflect. I modded several apps with the earlier version but only attempted two apps with the updated one (didn't see any issue with either app but I'm still on MM). I haven't looked more in depth at this V2 signed apps issue yet to see if I can modify the signing.bat to account for it (it's 230am). I will update it if there is.
V5 - (1) Updated apktool.jar to 2.2.2 if you haven't already yourself and (2) added java version info in your log file on Decompile routine to help identify a beginners issue on determining whether or not you have java installed in your path
Copy apks to the "APKs_To Decompile" folder.
Copy your framework-res, twframework-res, systemUI as needed to the folder "Frameworks".
Install frameworks.
Running the APKTool For WIN.exe select Install Frameworks
Decompile.
Select Decompile .apk
Choose your apk.
Decompiled app will be in the Decompiled folder.
Compile.
Select Compile
Choose your app to compile.
(One backup will be automatically created if there is an existing one to be safe in the decompiled app's folder)
Choose to copy the original manifest and meta-inf if desired
Compiled apk will be in the Compiled folder
Sign.
Select Sign APK
Choose the apk to sign.
Choose to sign with the testkey or with your personal key (help file is included in the zip for initial setup for using your own key)
Signed apk will be in the Signed folder
APKTool Log
If an Error message is displayed after decompiling or compiling you can check the log.
It's also beneficial to clear the log sometimes.
reserved for future use, faqs, issues
hmmm......after being away for a while i'm checking back to see if anyone had issues with trying to use this....and.......
not a single issue/question/comment with nearly 100 downloads. you guys are GOOD!!! (unless y'all think it's pointless and are being too kind to comment )
in the next few days, i'll use it a bit more in depth with the updated source and see if anything needs tweaking
Great tool !! I like it , this is solve my problems.
thank you so much , please keep it up.
Small update - V5
1. Updated to apktool 2.2.2 in case you haven't already done so yourself.
2. Added your java version info to the log generated when you run a Decompile routine to help beginners identify whether or not java is in the required path

APK Editor (Simple GUI - IDE FOR APK) Decompile apk in 5sec and Edit - x86, x64

APK EDITOR (SIMPLE AND SMALL IDE FOR APK)​
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hai.. Xda Friends and devs please take a try on this IDE for ones and say How would you feel? and this is a new try on IDE for APK with small and simple gui - it is easy to access files and quick edit behalf of using android studio and wait more than 10min on gradle building.. this is quick edit simple very easy.! ​
What is this?​
A Apk editor with simple and small GUI
No API Downloads required
No Android Studio with GBs of Download Packs
Only with less than 100MB use APK Editor
Easy to use Easy New features coming up!
What is needed to work and run?​
Java RDK or SDK
Internet for - serialization and De-serialization xml files
Apk Editor
Apk Editor -Alpha Full IDE For APK in windows Setup
------------------​
#Simple UI for editing Apk
#Easy Tasking
#Subtitute for Android Studio
#No Decompiling apk codes only Clicks
#Editing xml and java files builtin
#more coming updates
Just click and edit apk suits for apk editors
java and xml files editing...
unpack apk in 2 seconds...
no gradle no api no slow no time waste!​
Note -- (read this before Install or using)
-Must install java Run time kit
(online setup will run after install)
-Goto File > Open > Open apk for edit...
browse apk file for editing
Updates will automatically Reach you.!
Information​
Version- 1.00v alpha
APP DLL- jvm.dll
Run SDK- java SDK
IDE For- APK ONLY
API FOR- ALL Supported
Platf-m- x64 and x86 both
author main site
apkeditor blogspot
download link in attachments below===
MOD Edit:- Links Removed & Thread closed.

			
				
It's fake virus in
Nop
I doesn't have any virus bro... no virus just try .. can u send a screenshot if its there
This is no a virus
renzetti.s said:
It's fake virus in
Click to expand...
Click to collapse
it's a shortenlink redirection I you click iam not a robot its finish.
ok I will re link it in a 5 min
This
Sorry bro i have read this now
renzetti.s said:
This
Click to expand...
Click to collapse
i will re upload again a fresh exe bro
fake .. close post only virus
Looking for best hacking app for your android devices
As the name states, Apk Editor does the same job of its name. It gives you the features to Edit, make change save you customized app and if you don’t have the app you can extract form any app already install in your device.

Categories

Resources