Apk Manager 4.9 - Makes Modifying Ur Apk A Breeze (Windows/Linux)

Do you find the latest beta functional ?

  • Yes

    Votes: 1,105 74.6%
  • No

    Votes: 376 25.4%

  • Total voters
    1,481
Search This thread

HewGBalls

Senior Member
Nov 16, 2010
105
36
APK Manager 4.9

I'm trying to decompile option #9, Settings.apk file from a deodexed Froyo DK28 ROM. Not themed or anything. I have used the framework-res.apk and twframework-res.apk from this ROM and had great success decompiling and recompiling with no errors.


When I go to option #9 to decompile Settings.apk I get the following.
--------------------------------------------------------------------------
|Sat 02/05/2011 -- 12:24:51.61|
--------------------------------------------------------------------------
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
Could Not Find C:\apk_Manager\place-apk-here-for-modding\../place-apk-here-for-modding/signedSettings.apk
Could Not Find C:\apk_Manager\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSettings.apk
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Decoding resources...
I: Loading resource table from file: C:\Users\Donna\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x02070015
W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x0207000e
W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x0207000f
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x0106003b
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x0106003b
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x02050000
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColorHint, value=0x02050001
W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x0207000f


What would I be doing wrong in this situation? I read over some of the other posts concerning Settings.apk and tried changing the Max Memory Size and also tried Option #10 and dragged my framework-res.apk and twframework-res.apk in and still no luck.

Very simple mod I am trying to accomplish to the Settings.apk by "ticking" a checkbox located in one of your setting options. Default setting is a unchecked/unticked option and I want to change it to checked/ticked for the user(s).

Thanks.

Make sure there is only 1 apk file in place-apk-here-for-modding folder when decompiling.
 

HewGBalls

Senior Member
Nov 16, 2010
105
36
I have a question for the linux users,

All my folders created by the script seem to need root access, is this normal or did I mess up something?

thanks

Try the following steps:

1) extract apk_manager and copy it to your home directory
2) in terminal cd apk_manager_linux_4.7
2) chmod a+x Script.sh
3) ./Script.sh

Make sure you are not in sudo or su.
 

Westi01

Senior Member
Apr 1, 2010
426
98
Thanks mate!
When I am starting script.bat it says that ADB was not found. in which folder does it have to be placed to run correctly ?
 

scuba_d

Senior Member
Oct 21, 2010
80
8
generation x 2.0 theme modification

I want to edit the /system/app/DialerTabActivity.apk file, more specifically one file inside of that after the decompile. its in the /res/values/strings.xml. I am just trying to correct some spelling in it just to see if I can do it, that way I am more confident with moding or making my own theme. Here is the log error i get but it still decompiles and then I make my changes to the xml file and compile and then sign and then install to phone through adb. it never installs on the phone is part of the problem the problem I am worried about is from the log it looks like some files will be messed up when I recompile it. Let me know your thoughts. The Dialer apk is from the title theme. Thanks for the help, here is the log.

java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
Could Not Find C:\Documents and Settings\Extension201\Desktop\redsn0w-win_0.8\ap
k_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedDia
lerTabActivity.apk
Could Not Find C:\Documents and Settings\Extension201\Desktop\redsn0w-win_0.8\ap
k_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedD
ialerTabActivity.apk
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: C:\Documents and Settings\Extension201\apkt
ool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textColor, value=0x0205009a
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_tab_selected_bar_left.9.png
". Renaming it to *.png.
W: Could not decode attr value, using undecoded value instead: ns=android, name=
textColor, value=0x0205009a
W: Cant find 9patch chunk in file: "drawable-hdpi/tw_tab_selected_bar_right.9.pn
g". Renaming it to *.png.
W: Could not decode attr value, using undecoded value instead: ns=android, name=
color, value=0x02050097
Press any key to continue . . .
 

Daneshm90

Retired Recognized Developer
Jun 1, 2009
3,332
662
please do not sign and publish app with this script

this uses testkeys google has stopped accepting them
 
When trying to decompile "settings.apk" i get errors

Code:
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
'adb' is not recognized as an internal or external command,
operable program or batch file.
Could Not Find C:\encrypt\place-apk-here-for-modding\../place-apk-here-for-modding/signedSettings.apk
Could Not Find C:\encrypt\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSettings.apk
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: C:\Users\bro\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x02070015
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColor, value=0x02050000
W: Could not decode attr value, using undecoded value instead: ns=android, name=textColorHint, value=0x02050001
W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x0207000e
W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x0207000f
W: Could not decode attr value, using undecoded value instead: ns=android, name=textAppearance, value=0x0207000f

I actually solved the problem by using the dependency option.
Now how to encrypt this file back ? It's a stock samsung file (settings.apk), do i need some special certificate ? Or can i use any certificate ?
 
Last edited:

evasilisin

Senior Member
Dec 26, 2009
278
109
Pittsburgh
Failing to edit Settings.apk

I tried decompiling and then editing xml file and then recompiling what am i doing wrong. im getting errors on decompile and recompile, and it wont even push adb
 

Daneshm90

Retired Recognized Developer
Jun 1, 2009
3,332
662
So now it is not possible anymore or is there another way to sign a edited apk file ?

Oh no you misunderstood.

What im referring to is you cannot upload apps you have modified with this script to the market because google will not allow it anymore. Those are signed with testkeys. If you want to upload anything produced by this script, you need to replace the testkey's with private keys generated by android sdk.
 
  • Like
Reactions: live4rock81

naboleo

Senior Member
Aug 4, 2006
462
80
- I put my apk in place-apk-here-for-modding
- open script.bat
- option 9 (decompile)
- go to folder projects
- go to script.bat window
- option 11 (compile)
- say yes for first and second option
- go to folder project
- enter in keep directory
- delete resources.arsc file
- go to script.bat windows
- option 12 (sign)
- option 13 (install app)

Ok i'm a bit confused here as i was supposed to apply the correct workaround.
I followed these above steps (with keep folder) and without modifying anything...
And it produces the logcat error regarding "valid layout" !
I'm just basicaly decompiling/compiling the apk, so wasn't I supposed to have in any case a working application deleting the ressource.arcs only ?
 

live4rock81

Senior Member
Nov 17, 2010
75
1
Aldie
Google Pixel 4 XL
Please Help

What am I doing wrong?

I am simply trying to replace a png file inside of the drawable-hdpi folder.

I first select option 9 to decompile the apk(Gmail.apk), which produces a folder labeled "out".

I then replace the original png with my modified version within the drawable-hdpi folder located in the out folder.

After that I select option 11 to recompile and I receive the following error....

--------------------------------------------------------------------------
|Tue 02/15/2011 -- 21:45:56.14|
--------------------------------------------------------------------------
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
Could Not Find E:\Documents and Settings\Nathan\Desktop\place-apk-here-for-modding\../place-apk-here-for-modding/repackaged.apk
Could Not Find E:\Documents and Settings\Nathan\Desktop\place-apk-here-for-modding\../place-apk-here-for-modding/repackaged-signed.apk
Could Not Find E:\Documents and Settings\Nathan\Desktop\place-apk-here-for-modding\../place-apk-here-for-modding/repackaged-unsigned.apk
The system cannot find the file specified.
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: E:\Documents and Settings\Nathan\apktool\framework\1.apk
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
E:\Documents and Settings\Nathan\Desktop\other\..\out\smali\com\google\common\base\Functions.smali[0,0] null
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: java.io.FileInputStream@1f899e9
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.buildFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.Androlib.buildSourcesSmali(Unknown Source)
at brut.androlib.Androlib.buildSources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
 

fernando sor

Inactive Recognized Themer
Sep 7, 2010
9,744
5,640
12
north of the wall
What am I doing wrong?

I am simply trying to replace a png file inside of the drawable-hdpi folder.

I first select option 9 to decompile the apk(Gmail.apk), which produces a folder labeled "out".

I then replace the original png with my modified version within the drawable-hdpi folder located in the out folder.

After that I select option 11 to recompile and I receive the following error....

--------------------------------------------------------------------------
|Tue 02/15/2011 -- 21:45:56.14|
--------------------------------------------------------------------------
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
Could Not Find E:\Documents and Settings\Nathan\Desktop\place-apk-here-for-modding\../place-apk-here-for-modding/repackaged.apk
Could Not Find E:\Documents and Settings\Nathan\Desktop\place-apk-here-for-modding\../place-apk-here-for-modding/repackaged-signed.apk
Could Not Find E:\Documents and Settings\Nathan\Desktop\place-apk-here-for-modding\../place-apk-here-for-modding/repackaged-unsigned.apk
The system cannot find the file specified.
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: E:\Documents and Settings\Nathan\apktool\framework\1.apk
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
E:\Documents and Settings\Nathan\Desktop\other\..\out\smali\com\google\common\base\Functions.smali[0,0] null
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: java.io.FileInputStream@1f899e9
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.buildFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.Androlib.buildSourcesSmali(Unknown Source)
at brut.androlib.Androlib.buildSources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)

Just drop it in. no need to decompile for an image

Badseeds custom y'all
 
  • Like
Reactions: live4rock81

steelbreeze

Senior Member
Sep 23, 2010
65
3
Mumbai
Hey guys. Need some help here.

Hey guyz, I was just going through this thread to change my battery icon. I followed everything, but when I try to build the apk, it gives me numerous errors saying "Public symbol xxxx declared here is not defined". I don't understand what to do. Can you please help?


Oops my bad. I'm so frustrated that I don't know what I am doing. BTW here are the files. Battery icons that I'm trying to add, the log of the original framework-res.apk file which I decompiled and re-compiled without making any changes and my original framework-res.apk. Hope someone can help me.
 

Attachments

  • framework-res.apk
    3.3 MB · Views: 9
  • log.zip
    11.2 KB · Views: 4
Last edited:

XsceneXhippieX

Senior Member
Oct 17, 2010
1,056
125
I have a question about this program involving the framework-res.apk, if i extracted it, and have the code for cyanogen mod's cmparts (to add only the cmsettings menu to the settings screen) would i just add the script i downloaded to the already existing xml files and such, and after i get it compiled into the .apk would it be signed correctly to install back to a rom with the cmparts working?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 219
    So i have written a simple script to ease the process of editing apks. Got a lot of downloads so thought its in demand :rolleyes:

    Whether you're doing basic image editing or editing the smali or xml files, on average u have to use (Brut.all or JF's smali/baksmali) awesome tool to extract the apk, edit it, then sign the apk and then adb push/install it. This process is quite tiresome if you are testing a method that needs fine tweaking.

    This script should make the process a LOT smoother.
    Theres an option of compiling/signing/installing all in one step :)

    Thanks:
    Goes to Brut.all for his awesome tool.
    Goes to JF for ofcourse, smali/baksmali
    Goes to farmatito for porting this script to linux

    Features:
    - Extract, Zip apk's.
    - Optimize pngs (ignores .9.pngs)
    - Zipalign apks
    - Sign apks
    - Push to specific location on phone
    - Incorporates brut.all's apktool
    - Pull apk from phone into modding environment.
    - Batch optimize apk (Zipalign,optipng,or both)
    - Quick sign an apk (Batch mode supported)
    - Batch Ogg optimization
    - Compression level selector (monitor status above menu)
    - Batch install apk from script (option 16)
    - Logging on/off has been removed. Instead a log.txt is created which logs the activities of the script organized using time/date headers
    - User can change the max java heap size (only use if certain large apks get stuck when decompiling/compiling apks) (Option 19)
    - Improved syntax of questions/answers
    - Error detection. Checks if error occured anytime u perform a task, and reports it
    - Read log (Option 20)
    - U can now set this script as ur default application for apks. When u do, if u double click any apk it will install it for u.
    - Supports batch installation, so if u drag multiple apks into the script (not while its running) it will install them all for u. U can ofcourse drag a single apk as well
    - Added framework dependent decompiling (For non propietary rom apks). (Option 10). Checks whether the dependee apk u selected is correct.
    - Allows multiple projects to be modified, switch to and from.
    - Allows to modify system apk's using apktool but ensures maximum compatibility in terms of signature / manifest.xml
    - Stuff i forgot i guess :p

    Instructions (Windows):
    - Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
    - Run script
    - Minimize the script
    - Edit files inside the project folder
    - Maximize the script

    Instructions (Linux):
    - Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
    - Open terminal and change-directory to apkmanager (Easiest way is to type "cd ")
    - Chmod 755 Script.sh
    - Chmod 755 all files apps inside other folder (thanks for the tip bkmo ;) )
    - Run script by typing ./Script.sh
    - Minimize the script
    - Edit files inside the out folder
    - Maximize the script

    Requirements:
    Java
    Adb

    Future Improvements:
    - Manage multiple simultaneous apk edits (choose which apk to extract/build)
    - Option to optimize the apks
    - Option to adb push to user defined location
    - Other stuff i dont know yet




    Got problems ?

    1. Make sure your path has no spaces
    2. Your filename has no wierd characters
    3. Java/adb are in your path
    4. It's not a proprietary rom's apk (aka Sense,Motorola,Samsung) (If u are, then use option 11 and drag the required framework, eg com.htc.resources, twframework-res...etc)
    5. It's not a themed apk (if it is, expect .9 png errors, use as close to stock as possible)
    6. Look at the log to know whats happening
    7. If all else fails, post as much info as possible and we will try to assist you.

    MOD EDIT:
    New DL link from this post
    http://apkmultitool.com
    18
    Hi Download link dont work is there anything you can do to upload some other website or mirrior plzzz.:confused:

    New website http://apkmultitool.com
    7
    No lol i have windows 7, java is just not in ur path.

    Right click my computer, click properties, advanced settings, environment variables, in bottom window scroll to PATH click and edit it, at the end add ;<path to ur bin folder of java>

    so mine looks like
    c:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Droid Explorer\SDK\tools;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files (x86)\QuickTime\QTSystem\
    4
    For people having the:


    The program sox is missing or is not in your PATH,
    please install it or fix your PATH variable

    problem on linux, here's the fix:

    open Ubuntu Software Center and search "sox" without the quotes

    install it

    problem solved. If OP wants to update, it'll help a LOT of people out ;)