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
S

S0ckM0nk3y

Guest
It's from a custom ROM, but author doesn't mention of the Phone.apk being modded. (S.U.R.F.A.C.E. rom)

My suggestion is take the stock apk from the rom u are modifying decompile with apk manager to do ur XML editing or whatever then compile it sign it and then use a program like 7zip to do all of ur drawable folders with pngs. There might be easier ways but that's what I do and works every time :)

Sent from my Nexus S 4G using XDA Premium App
 

rachelm920

Senior Member
Apr 12, 2011
571
230
Hartford, CT
Why are you compiling new images if I'm reading you right, most likely that's your error compile your xml changes alone then if that's successful, copy your images in

Sent from my Nexus S 4G using Tapatalk

I get like 50 errors like this one below and I didn't even edit public.xml!! Only color and drawables!!

Code:
C:\APK_Manager\other\..\projects\framework-res.apk\res\values\public.xml:2830: e
rror: Public symbol drawable/stat_sys_vp_phone_call_on_hold declared here is not
 defined.
 

.ioannis

Member
Aug 5, 2011
24
2
My suggestion is take the stock apk from the rom u are modifying decompile with apk manager to do ur XML editing or whatever then compile it sign it and then use a program like 7zip to do all of ur drawable folders with pngs. There might be easier ways but that's what I do and works every time :)

Sent from my Nexus S 4G using XDA Premium App

Extracted the apks from a STOCK firmware, I deodexed them, tried again and still nothing.

--------------------------------------------------------------------------
|Wed 08/10/2011 -- 17:53:29.92|
--------------------------------------------------------------------------
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
I: Framework installed to: C:\Users\ioannis\apktool\framework\2.apk
I: Framework installed to: C:\Users\ioannis\apktool\framework\2.apk
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Decoding resources...
I: Loading resource table from file: C:\Users\ioannis\apktool\framework\1.apk
I: Loading resource table from file: C:\Users\ioannis\apktool\framework\2.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=
id, value=0x0102021f
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x0102021f
at brut.androlib.res.data.ResPackage.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(Unknown So
urce)
at brut.androlib.res.data.value.ResReferenceValue.toResXmlFormat(Unknown
Source)
at brut.androlib.res.data.value.ResAttr.convertToResXmlFormat(Unknown So
urce)
at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknow
n Source)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
e(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unkno
wn Source)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)

at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown So
urce)
at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.decode(Unknown Source)
at brut.androlib.Androlib.decodeResourcesFull(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
--------------------------------------------------------------------------
|Wed 08/10/2011 -- 17:56:30.63|
--------------------------------------------------------------------------
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)
Could Not Find C:\apkmanager\place-apk-here-for-modding\../place-apk-here-for-mo
dding/signedPhone.apk
Could Not Find C:\apkmanager\place-apk-here-for-modding\../place-apk-here-for-mo
dding/unsignedPhone.apk
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Decoding resources...
I: Loading resource table from file: C:\Users\ioannis\apktool\framework\1.apk
I: Loading resource table from file: C:\Users\ioannis\apktool\framework\2.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=
id, value=0x0102021f
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x0102021f
at brut.androlib.res.data.ResPackage.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(Unknown So
urce)
at brut.androlib.res.data.value.ResReferenceValue.toResXmlFormat(Unknown
Source)
at brut.androlib.res.data.value.ResAttr.convertToResXmlFormat(Unknown So
urce)
at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknow
n Source)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
e(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unkno
wn Source)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)

at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown So
urce)
at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.decode(Unknown Source)
at brut.androlib.Androlib.decodeResourcesFull(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Press any key to continue . . .
 

dreamsforgotten

Senior Member
May 4, 2010
5,076
2,522
Louisiana
I get like 50 errors like this one below and I didn't even edit public.xml!! Only color and drawables!!

Code:
C:\APK_Manager\other\..\projects\framework-res.apk\res\values\public.xml:2830: e
rror: Public symbol drawable/stat_sys_vp_phone_call_on_hold declared here is not
 defined.

Your apk is getting corrupt my systemui.apk did the same I had to decompile a fresh stock framework res and paste the drawable-hdpi over my current project and all was well my guess is you have corrupted .9.pngs from the start

Sent from my Nexus S 4G using Tapatalk
 

CleveRuse

Senior Member
Apr 14, 2011
1,134
148
Imperial, PA
O
I get like 50 errors like this one below and I didn't even edit public.xml!! Only color and drawables!!

Code:
C:\APK_Manager\other\..\projects\framework-res.apk\res\values\public.xml:2830: e
rror: Public symbol drawable/stat_sys_vp_phone_call_on_hold declared here is not
 defined.

LOL ....join the club;) I'm always trying to hunt down a bad patch or 50

I've been receiving the same exact error. I have noticed that fixing one single bad .9.png can fix all 100+ ".xml......area is undefined" errors tho. Now I try to decompile, check specifically for 9patch errors, fix with another app, then re-decompile.
 
Last edited:
S

S0ckM0nk3y

Guest
Extracted the apks from a STOCK firmware, I deodexed them, tried again and still nothing.


I tried your files out and they both decompiled just fine for me. Check to make sure you have java in your path correctly and check to make sure your SDK path is set correctly as well.

Let me know. Shoot me a PM so we don't fill the thread up with the conversation.

Thanks

TPhillips/IRoNHiDE
 

moccor

Senior Member
Apr 3, 2011
346
68
I'm trying to modify the Swiftkey keyboard colors using APK Manager 4.9, I extract the apk, place my edited image inside the right folder (Droid X - HDPI), optimize tge images, zip it, and I've tried both signed and unsigned. Both cause force closures when I press a button. Can anyone help?
 

rmilanov

Senior Member
Nov 13, 2008
58
1
Chicago, IL
recompile issues

I want to slightly personalize an APK. I went and decoded it, changed a name around, and went to recompile. The new APK is a bit smaller than the original. When I installed, it would FC. I read the posts about people saying compression, etc... however, when I decompiled the recompiled one, I have about 100 fewer files than the originally decompiled apk. This leads me to believe that the compile isn't capturing all the files. Anything to check for this?
 

dreamsforgotten

Senior Member
May 4, 2010
5,076
2,522
Louisiana
I want to slightly personalize an APK. I went and decoded it, changed a name around, and went to recompile. The new APK is a bit smaller than the original. When I installed, it would FC. I read the posts about people saying compression, etc... however, when I decompiled the recompiled one, I have about 100 fewer files than the originally decompiled apk. This leads me to believe that the compile isn't capturing all the files. Anything to check for this?

What is the apk I'm guessing the decompile isn't working without errors but the recompile def should spit errors.

Sent from my Nexus S 4G using Tapatalk
 

anko184

Senior Member
Jan 29, 2009
899
199
Volos
OnePlus 8T
Google Pixel 6 Pro
Guys I'm trying to modify SystemUI.apk from new pyramid 2.3.4 rom but i got an error in compiling.

Can someone help me with it? I'm attaching my log. I'm pretty sure i have forgot something but don't know what.
 
Last edited:

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 ;)