FORUMS
Remove All Ads from XDA

How To Decompile / Recompile .apk Using Android Phone [ No Pc Required ]

489 posts
Thanks Meter: 1,118
 
Post Reply Email Thread
Saw many guides to Decompile-Recompile apk using PC , but this guide will teach how to Decompile-Recompile using android

Credits - Me , Apktool , and A Indonesian Group :P

Things We Need -

1. Android Smartphone ( Rooted )
2. Apktool For Android ( download below )
3. xml editing Application


Here we Go with A step by Step tutorial on How To Decompile / Recompile .apk Using Android Phone -



Step 1. First Download Apktool.zip From - Here .


Step 2. Download Xml editor from - Here



Step 3. Extract The Apktool.zip To (android phone ) Sd Card > Here . ( Extract it in Root of Sd card , not in any folder )


Step 4. Now Open Apktool Folder on Sd Card > Apktool and Install Apktool.apk from the directory .


Step 5. Copy Framework_Res.apk from your Phone root and Paste it in Sd Card > Apktool > Here ( with root explorer / es file explorer )




Step 6. Open Apktool App and Go to Sd Card > Apktool and Select Framework_Res.apk and Select import as Framework . It will start installing Framework ( need for Recompiling - Decompiling )



Step 7. Copy any .apk you want to decompile and paste it to Sd Card > Apktool > Here ( with root explorer / es file explorer )



Step 8. Now Open Apktool App , Go to Sd Card > Apktool and select the .apk you pasted in Step no. 7. Now select Decompile All ( The process will decompile the apk ).



Step 9. Now the file will be saved with the name Apkname_src ( Apkname = name of the apk you have decompiled ).



Step 10. Do all the editing you want to do with .apk file with xml editor .



Step 11. Now Open apktool app then again go to Sd Card > Apktool and select Apkname_src and select recompile .



Step 12. Now Open the orignal .Apk and Open Sd Card > Apktool > Apkname_src > Build > Apk > Here and copy all the content and paste it in The Orignal.apk and you are done



Feel free to Reply if you face any problem

Original Posted - BY ME Here
The Following 8 Users Say Thank You to vvaibhavv For This Useful Post: [ View ] Gift vvaibhavv Ad-Free
 
 
17th July 2014, 10:09 AM |#2  
F@HIM's Avatar
Senior Member
Flag Mumbai
Thanks Meter: 855
 
More
Thanks bro was waiting for this...par bhai root of your sd card folder matlab kya re??????

Always press the thanks button if helped
17th July 2014, 10:36 AM |#3  
Smile
Quote:
Originally Posted by [email protected]

Thanks bro was waiting for this...par bhai root of your sd card folder matlab kya re??????

Always press the thanks button if helped

Means not in any folder ! Just in Sdcard > here
The Following User Says Thank You to vvaibhavv For This Useful Post: [ View ] Gift vvaibhavv Ad-Free
23rd July 2014, 12:14 AM |#4  
Senior Member
Flag San Luis
Thanks Meter: 264
 
Donate to Me
More
Does this sign the apk? Or it's needed to sign in the PC?
The Following User Says Thank You to igna.98 For This Useful Post: [ View ] Gift igna.98 Ad-Free
25th July 2014, 09:03 AM |#5  
v_singh's Avatar
Senior Member
Flag Ankleshwar
Thanks Meter: 66
 
More
STEP: 12
your Step: 12 is not so clear..
please redefine it... waiting for your Reply.
25th July 2014, 09:55 AM |#6  
Question
Quote:
Originally Posted by v_singh

your Step: 12 is not so clear..
please redefine it... waiting for your Reply.

You must use any file explorer or PC for that .. Open the apk ( change made ) you have made by decompiling and then recompiling , Also open the apk that is orignal ( no change made ) . Copy paste the content of apk ( change made ) to apk ( no change made ) and you will get your final apk ..

Yes its little bit confusing
31st October 2014, 04:57 PM |#7  
Senior Member
Thanks Meter: 30
 
More
I know it's confusing but when you learn to edit the apks, it's easier to understand

Thanks for the post I'm looking for it

Enviado desde mi LG-E425g mediante Tapatalk
3rd November 2014, 06:30 PM |#8  
Junior Member
Thanks Meter: 0
 
More
Question Framework?
Can someone explain me how to get that file? "Framework_Res.apk". I searched it using Root Explorer and I got no results! Is that file in the apk I will decompile and recompile?
5th November 2014, 10:39 AM |#9  
StratOS_HTC's Avatar
Senior Member
Flag Celje
Thanks Meter: 315
 
Donate to Me
More
It's hidden in /system/framework/

Sent from my SM-G355HN using XDA Free mobile app
11th May 2015, 09:04 PM |#10  
Member
Thanks Meter: 0
 
More
I ran into an error pop up while trying to attempt this.
Everything is installed and setup properly. I copied
Adfree-com.bigtincan.android.adfree-8068-v0.8.68.apk
to the apktool directory and then went into the Apktool app.
Upon selecting decompile all it returns a failed pop up stating:
|: Baksmaling...
Can't create the output directory /apktool-techdroider/Adfree-com.bigtincan.android.adfree-8068-v0.8.68_src/smali

I click ok and back out to root explorer to see if there is a new src folder inside the apktool directory and there is not.

Not sure what I may have done wrong or what else I can possibly do using this method.

Asap responses would be extremely appreciated as I am currently in the middle of an Internship competition (lasts 4 days) and simply decompiling/recompiling and checking the resulting md5sum before/after is one of the questions.
4th September 2015, 04:31 AM |#11  
sacnotsack's Avatar
Senior Member
Thanks Meter: 133
 
More
Importing the framework gave me the following error:

ERROR: ld.so: object 'libsigchain.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libNimsWrap.so' from LD_PRELOAD cannot be preloaded: ignored.
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCD ecoder.java:56)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCD ecoder.java:40)
at brut.androlib.res.AndrolibResources.installFramewo rk(AndrolibResources.java:562)
at brut.androlib.Androlib.installFramework(Androlib.j ava:473)
at brut.apktool.Main.cmdInstallFramework(Main.java:25 0)
at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.j ava:48)
at brut.androlib.res.decoder.StringBlock.read(StringB lock.java:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage( ARSCDecoder.java:102)
at brut.androlib.res.decoder.ARSCDecoder.readTable(AR SCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCD ecoder.java:49)
... 5 more


Any ideas? I've tried importing multiple times.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes