Jump to content


[Tools] Apktool Old And New


  • Please log in to reply
27 replies to this topic

#1 Guest_BDH_*

Guest_BDH_*
  • Guests

Posted 24 June 2012 - 11:25 PM

I do NOT take credit for making these tools obviously, just bringing them here so it's easier for everyone to find and use.

What we have here is 2 different apktools.

The Original Version, and the ICS Version. The ICS version can be used for every single apk in ICS ROMs EXCEPT SystemUI.apk

To successfully decompile and recompile the SystemUI, you need to use the Original version to decompile, once it's decompiled, copy the SystemUI folder, and the framework-res.apk over to the ICS version. Then build the apk.

Basic apktool use and commands

Download both apktool versions and EXTRACT them to the desktop

First thing you're going to want to do is grab the framework-res.apk located in /system/framework and grab the SystemUI.apk located in /system/app

Place both of these files inside the Original apktool

Press and hold "shift key" on the keyboard, and right click the apktool folder, then select "open command window here."

In the command window that pops up, type the following command:

Please Login or Register to see this Hidden Content


This will install the framework-res as the dependancy file.

In that same window, now type the following command:

Please Login or Register to see this Hidden Content


*the file names ARE case sensitive. Make sure you type the file name EXACTLY how it is.

Wait for it to decompile the SystemUI. Once it is finished, you will now have inside the apktool folder, another folder named SystemUI. You can now begin making all your edits.

After all your edits are done. Copy the following files, over to the extracted ICSapktool folder:

SystemUI folder
framework-res.apk

Once those files are copied over, open another command window from the ICS Apktool folder.

In that command window, type the following command:

Please Login or Register to see this Hidden Content


Again this will install the framework-res.apk as the dependancy file.

After that command, type this command:

Please Login or Register to see this Hidden Content


*DO NOT add the ".apk" at the end.

Now go into the ICS Apktool folder, and you will have a folder named "dist," in this folder is your newly compiled APK.

Download Original Apktool:

Please Login or Register to see this Hidden Content



Download ICS Apktool:

Please Login or Register to see this Hidden Content



Post any questions you have and myself or someone else will try to answer them. Please keep it on topic, any comment not on topic or a question, will be deleted.

TIPS:
Other system apps may require you to Decompile with the Original Apktool, then Recompile with the ICS Apktool. Some may require you to use the Original Apktool for both decompiling and recompiling. Just gotta play around with it.

Edited by spc_hicks09, 03 July 2012 - 10:13 AM.

  • andlaw, DSGMach1, XCellFoneSalesRep and 4 others like this

#2 andlaw

andlaw

    BW ftw!! !!!!!

  • Developer
  • 2,463 posts
  • LocationOH-I-O
  • Current Device(s):Nexus 6

Posted 25 June 2012 - 02:00 AM

looks good!

"A truly blacked out experience"

Posted Image

[XT912 |[(BLACKWIDOWICS 214)] | [(BLACKWIDOWICS AOKP/CM9)] | [(BLACKWIDOWJB AOKP/CM10/CNA)] | [(wWIDOWICS 214)] | |[(BLACKWIDOWHDish)]| XT912]

[XT926 |[(BLACKWIDOWHD|wWIDOWHD)]| XT926]


#3 superrelaxx

superrelaxx

    Droid Master

  • Superuser
  • 921 posts
  • Twitter:jasNwa
  • LocationSeattle, Washington

Posted 25 June 2012 - 03:10 PM

I'll give it a go but not sure which folder within SystemUI/res I should be altering. For instance, if I wanted to change the battery notification color, where should I start?

Thanks for posting. Looks complicated!

#4 andlaw

andlaw

    BW ftw!! !!!!!

  • Developer
  • 2,463 posts
  • LocationOH-I-O
  • Current Device(s):Nexus 6

Posted 25 June 2012 - 03:16 PM

I'll give it a go but not sure which folder within SystemUI/res I should be altering. For instance, if I wanted to change the battery notification color, where should I start?

Thanks for posting. Looks complicated!


you will be editing from the res/drawable-hdpi folder.. and not too sure what you mean by the color of the battery notifications?

"A truly blacked out experience"

Posted Image

[XT912 |[(BLACKWIDOWICS 214)] | [(BLACKWIDOWICS AOKP/CM9)] | [(BLACKWIDOWJB AOKP/CM10/CNA)] | [(wWIDOWICS 214)] | |[(BLACKWIDOWHDish)]| XT912]

[XT926 |[(BLACKWIDOWHD|wWIDOWHD)]| XT926]


#5 superrelaxx

superrelaxx

    Droid Master

  • Superuser
  • 921 posts
  • Twitter:jasNwa
  • LocationSeattle, Washington

Posted 25 June 2012 - 03:43 PM

you will be editing from the /drawable-hdpi folder.. and not too sure what you mean by the color of the battery notifications?


Thanks. On Arctic, the battery circle it's blue with white lettering. This could be changed in the above folder. Correct?

#6 andlaw

andlaw

    BW ftw!! !!!!!

  • Developer
  • 2,463 posts
  • LocationOH-I-O
  • Current Device(s):Nexus 6

Posted 25 June 2012 - 03:44 PM

Thanks. On Arctic, the battery circle it's blue with white lettering. This could be changed in the above folder. Correct?


yup! ;)

"A truly blacked out experience"

Posted Image

[XT912 |[(BLACKWIDOWICS 214)] | [(BLACKWIDOWICS AOKP/CM9)] | [(BLACKWIDOWJB AOKP/CM10/CNA)] | [(wWIDOWICS 214)] | |[(BLACKWIDOWHDish)]| XT912]

[XT926 |[(BLACKWIDOWHD|wWIDOWHD)]| XT926]


#7 superrelaxx

superrelaxx

    Droid Master

  • Superuser
  • 921 posts
  • Twitter:jasNwa
  • LocationSeattle, Washington

Posted 25 June 2012 - 03:53 PM

yup!


Thanks!

#8 tucstwo

tucstwo

    www.drdevs.com

  • Administrator
  • 14,435 posts
  • Twitter:tucstwo
  • Google+:tucstwo@gmail.com
  • LocationNJ
  • Current Device(s):LG G3 VS985, Nexus 7 (flo)

Posted 25 June 2012 - 06:07 PM

While spectating, I am still trying to figure out what this does. On with the discussion.

Visit DRDevs.com hosting site for all official Droidrzr.com ROMs, Apps, GApps and other mods/files!!
Please PM me if you need help!
I will be hosting AOSP-Based ROM GApps packages!
Download the most Up-to-Date GApps Packages for AOSP ROMs from me here!


#9 superrelaxx

superrelaxx

    Droid Master

  • Superuser
  • 921 posts
  • Twitter:jasNwa
  • LocationSeattle, Washington

Posted 25 June 2012 - 06:10 PM

While spectating, I am still trying to figure out what this does. On with the discussion.


This is used for theming. I have new respect for these guys as it takes FOREVER!

#10 Guest_BDH_*

Guest_BDH_*
  • Guests

Posted 25 June 2012 - 06:11 PM

While spectating, I am still trying to figure out what this does. On with the discussion.


Lol it's for themeing so you can successfully decompile and recompile apks. Older tools don't work for ICS apps.

Sent from my XT912 using Tapatalk 2

#11 DSGMach1

DSGMach1

    Themer

  • Superuser
  • 264 posts
  • LocationGriffin, GA

Posted 27 June 2012 - 02:25 PM

Is systemui the only apk that you have to use the "apktool if framework-res.apk" command for?

Thanks for taking the time to write this up.

#12 andlaw

andlaw

    BW ftw!! !!!!!

  • Developer
  • 2,463 posts
  • LocationOH-I-O
  • Current Device(s):Nexus 6

Posted 27 June 2012 - 02:26 PM

Is systemui the only apk that you have to use the "apktool if framework-res.apk" command for?

Thanks for taking the time to write this up.


no you will need to do this command whenever your working on a different rom that has a different framework-res.apk

"A truly blacked out experience"

Posted Image

[XT912 |[(BLACKWIDOWICS 214)] | [(BLACKWIDOWICS AOKP/CM9)] | [(BLACKWIDOWJB AOKP/CM10/CNA)] | [(wWIDOWICS 214)] | |[(BLACKWIDOWHDish)]| XT912]

[XT926 |[(BLACKWIDOWHD|wWIDOWHD)]| XT926]


#13 DSGMach1

DSGMach1

    Themer

  • Superuser
  • 264 posts
  • LocationGriffin, GA

Posted 27 June 2012 - 03:08 PM

SystemUI went fine and decompiling framework-res went fine as well. I made my edits then tried to recompile and it says:

C:\Users\Lee\Desktop\ICS APK tool>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...

C:\Users\Lee\Desktop\ICS APK tool>


Is it normal for it to say W: Could not find resources or am I missing a step somewhere? This is for Nitro's Eclipse ICS rom. Below is everything I typed in if that helps.


C:\Users\Lee\Desktop\ICS APK tool>apktool if framework-res.apk
I: Framework installed to: C:\Users\Lee\apktool\framework\1.apk

C:\Users\Lee\Desktop\ICS APK tool>apktool b SystemUI
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...

C:\Users\Lee\Desktop\ICS APK tool>apktool if framework-res.apk
I: Framework installed to: C:\Users\Lee\apktool\framework\1.apk

C:\Users\Lee\Desktop\ICS APK tool>apktool d framework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...

C:\Users\Lee\Desktop\ICS APK tool>apktool if framework-res.apk
I: Framework installed to: C:\Users\Lee\apktool\framework\1.apk

C:\Users\Lee\Desktop\ICS APK tool>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...

C:\Users\Lee\Desktop\ICS APK tool>



#14 Guest_BDH_*

Guest_BDH_*
  • Guests

Posted 27 June 2012 - 03:12 PM

SystemUI went fine and decompiling framework-res went fine as well. I made my edits then tried to recompile and it says:

C:\Users\Lee\Desktop\ICS APK tool>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...

C:\Users\Lee\Desktop\ICS APK tool>


Is it normal for it to say W: Could not find resources or am I missing a step somewhere? This is for Nitro's Eclipse ICS rom. Below is everything I typed in if that helps.


As long as it builds the apk then everything is good. I've seen that myself quite a few times so yes it's normal.

#15 andlaw

andlaw

    BW ftw!! !!!!!

  • Developer
  • 2,463 posts
  • LocationOH-I-O
  • Current Device(s):Nexus 6

Posted 27 June 2012 - 03:14 PM

Is it normal for it to say W: Could not find resources or am I missing a step somewhere? This is for Nitro's Eclipse ICS rom. Below is everything I typed in if that helps.


everything looks normal~ now its just time to open the dist folder and open the .apk with 7zip and drag-n-drop the folders containing your edits into your original apk file. B)

"A truly blacked out experience"

Posted Image

[XT912 |[(BLACKWIDOWICS 214)] | [(BLACKWIDOWICS AOKP/CM9)] | [(BLACKWIDOWJB AOKP/CM10/CNA)] | [(wWIDOWICS 214)] | |[(BLACKWIDOWHDish)]| XT912]

[XT926 |[(BLACKWIDOWHD|wWIDOWHD)]| XT926]


#16 DSGMach1

DSGMach1

    Themer

  • Superuser
  • 264 posts
  • LocationGriffin, GA

Posted 27 June 2012 - 03:16 PM

As long as it builds the apk then everything is good. I've seen that myself quite a few times so yes it's normal.


Good to know. Thanks for the quick response.

#17 Guest_BDH_*

Guest_BDH_*
  • Guests

Posted 27 June 2012 - 03:21 PM

Good to know. Thanks for the quick response.


Not a problem!

#18 DSGMach1

DSGMach1

    Themer

  • Superuser
  • 264 posts
  • LocationGriffin, GA

Posted 27 June 2012 - 06:25 PM

Flashed with partial success lol. All of my changes stuck with the exception of one thing. I was trying to change the color of the clock on the status bar and I can only assume that I changed the wrong xml.

In SystemUI\res\values\styles.xml I changed this:

<style name="TextAppearance.StatusBar.Clock" parent="@android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">16.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">#0FE200</item>



The clock is still the ICS blue however. Any ideas on that?

#19 Guest_BDH_*

Guest_BDH_*
  • Guests

Posted 27 June 2012 - 06:40 PM

Flashed with partial success lol. All of my changes stuck with the exception of one thing. I was trying to change the color of the clock on the status bar and I can only assume that I changed the wrong xml.
The clock is still the ICS blue however. Any ideas on that?


Are you wiping cache and dalvik every time you check your changes?

#20 Instien

Instien

    n00b

  • Members
  • Pip
  • 9 posts

Posted 27 June 2012 - 06:59 PM

I could be wrong, but if your actually trying to change the color of the battery indicator in the status bar, you will have to change the images themselves for the battery. There are plenty to change if thats the case. Have fun! I may be wrong about what your trying to accomplish though.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users