[Q] Decompiling/Compiling LPQ (4.0.3) ICS apk Error - Galaxy S II Q&A, Help & Troubleshooting

Hey guys, I need some help here.
I can decompile apks fine, got past the bad magic value error, ICS APKs decompile with no problems at all.
When I make changes... better yet, even when I don't change a thing and go to compile the project, I get an error like this:
Code:
--------------------------------------------------------------------------
|03/15/2012 Thu -- 16:10:40.42|
--------------------------------------------------------------------------
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
Could Not Find D:\Android\APKMod\place-apk-here-for-modding\../place-apk-here-for-modding/signedPhone.apk
Could Not Find D:\Android\APKMod\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedPhone.apk
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Loading resource table from file: C:\Users\YG007\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\YG007\apktool\framework\2.apk
I: Loaded.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
I: Framework installed to: C:\Users\YG007\apktool\framework\2.apk
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Loaded.
I: Loading resource table from file: C:\Users\YG007\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\YG007\apktool\framework\2.apk
I: Loaded.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
D:\Android\APKMod\other\..\projects\Phone.apk\res\layout\pref_dialog_editpin.xml:2: error: Error: Resource is not public. (at 'id' with value '@android:id/edittext_container').
aapt: warning: string 'contactsFavoritesLabel' has no default translation in D:\Android\APKMod\other\..\projects\Phone.apk\res; found: bg cs da de el en_US es es_ES et fi fr ga hr hu is it kk ko lt lv mk nb nl pl pt ro ru sk sl sr sv tr uk
aapt: warning: string 'contactsIconLabel' has no default translation in D:\Android\APKMod\other\..\projects\Phone.apk\res; found: bg cs da de el en_US es es_ES et fi fr ga hr hu is it kk ko lt lv mk nb nl pl pt ro ru sk sl sr sv tr uk
aapt: warning: string 'dialerIconLabel' has no default translation in D:\Android\APKMod\other\..\projects\Phone.apk\res; found: bg cs da de el en_US es es_ES et fi fr ga hr hu is it kk ko lt lv mk nb nl pl pt ro ru sk sl sr sv tr uk
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\YG007\AppData\Local\Temp\APKTOOL4181477595211452909.tmp, -I, C:\Users\YG007\apktool\framework\1.apk, -I, C:\Users\YG007\apktool\framework\2.apk, -S, D:\Android\APKMod\other\..\projects\Phone.apk\res, -M, D:\Android\APKMod\other\..\projects\Phone.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\YG007\AppData\Local\Temp\APKTOOL4181477595211452909.tmp, -I, C:\Users\YG007\apktool\framework\1.apk, -I, C:\Users\YG007\apktool\framework\2.apk, -S, D:\Android\APKMod\other\..\projects\Phone.apk\res, -M, D:\Android\APKMod\other\..\projects\Phone.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
I'm using the LPQ rom, stock, deodexed.
1.apk was pulled from framework-res.apk from the LPQ ROM.
2.apk was pulled from twframework-res.apk from the LPQ ROM.
I've used the search function to find a solution, but I couldn't so I'm posting here.
Anyone know whats going on? Any solutions??

Related

[Q] MIUI port help needed from devs

Please Refer the below link first to know what procedure i have followed.
http://forum.xda-developers.com/showthread.php?t=1479493
After running make command to make a ported zip file, got this error. Please tell me what about the error is and how can i fix that.
Code:
cp /home/jayasimha/thepatcher/miui/system/framework/framework-miui-res.apk .build/ZIP/system/framework/framework-miui-res.apk
build .build/framework-res.apk...
--------------------------------------------
cp -r framework-res .build
/home/jayasimha/thepatcher/tools/apktool b .build/framework-res .build/framework-res.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'wifi_available' has no default translation in /home/jayasimha/thepatcher/i9100G/.build/framework-res/res; found: ms
aapt: warning: string 'wifi_available_detailed' has no default translation in /home/jayasimha/thepatcher/i9100G/.build/framework-res/res; found: ms
I: Building apk file...
cp apks-unsinged to zip dirs
cp .build/framework-res.apk .build/ZIP/system/framework/framework-res.apk
build .build/MIUISystemUI.apk...
--------------------------------------------
cp -r SystemUI .build
/home/jayasimha/thepatcher/tools/apktool b .build/SystemUI .build/MIUISystemUI.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
res/drawable-hdpi/status_bar_background.png:0: error: Resource entry status_bar_background is already defined.
res/drawable-hdpi/status_bar_background.9.png:0: Originally defined here.
/home/jayasimha/thepatcher/i9100G/.build/SystemUI/res/values/styles.xml:3: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Holo.Light.Panel'.
/home/jayasimha/thepatcher/i9100G/.build/SystemUI/res/values/styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Theme.Holo.Light.Panel'.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2651416676899838457.tmp, -I, /home/jayasimha/apktool/framework/1.apk, -S, /home/jayasimha/thepatcher/i9100G/.build/SystemUI/res, -M, /home/jayasimha/thepatcher/i9100G/.build/SystemUI/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL2651416676899838457.tmp, -I, /home/jayasimha/apktool/framework/1.apk, -S, /home/jayasimha/thepatcher/i9100G/.build/SystemUI/res, -M, /home/jayasimha/thepatcher/i9100G/.build/SystemUI/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
make: *** [.build/MIUISystemUI.apk] Error 1

help on feralap room (error log updated )

hii guys
im trying to **** a new battery + icons on kitchen but im facing a problem only on feralab framework.apk file
i'v tried other rooms framework and it work fine
the error on post 2
any body have an idea ??
Error log: UOT-02-28-16-26-2-SHTF.txt
Decompiling framework-res.apk UOT-02-28-16-26-2
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
Decompiling SystemUI.apk UOT-02-28-16-26-2
I: Framework installed to: /root/apktool/framework/1.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: /root/apktool/framework/1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
Compiling framework-res.apk UOT-02-28-16-26-2
W: Could not find sources
I: Building resources...
/home/mendoza/port5/data/working_dir/UOT-02-28-16-26-2/fw_dec/res/values-hdpi/drawables.xml:3: error: Resource entry battery_low_battery is already defined.
res/drawable-hdpi/battery_low_battery.png:0: Originally defined here.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL441865134536758008.tmp, -x, -S, /home/mendoza/port5/data/working_dir/UOT-02-28-16-26-2/fw_dec/res, -M, /home/mendoza/port5/data/working_dir/UOT-02-28-16-26-2/fw_dec/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL441865134536758008.tmp, -x, -S, /home/mendoza/port5/data/working_dir/UOT-02-28-16-26-2/fw_dec/res, -M, /home/mendoza/port5/data/working_dir/UOT-02-28-16-26-2/fw_dec/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191
I'm facing the exact same problem trying to cook a battery-mod (Version N, Blue numbers).
used amend scripting and patch9 autofix and uploaded framework-res.apk and systemUI.apk from feralabs zip. Please help !
Using:
Feralab rom 10.3
unlocked bootloader
i think thread can be closed as we're all on v11 now

Help with apk tool

hi, im using xperia sola...... i have to correct the framework-res.apk file as per this thread..... after doing so,
when compiling the framework-res.apk filr gives me this error
PHP:
C:\Apktool>java -jar apktool.jar if framework-res.apk
I: Framework installed to: C:\Users\Pulak\apktool\framework\1.apk
C:\Apktool>java -jar apktool.jar if systemui.apk
I: Framework installed to: C:\Users\Pulak\apktool\framework\127.apk
C:\Apktool>java -jar apktool.jar d framework-res.apk frameres
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Loading resource table from file: C:\Users\Pulak\apktool\framework\2.apk
I: Loaded.
I: Done.
I: Copying assets and libs...
C:\Apktool>java -jar apktool.jar b frameres NEWframework-res.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'BaMmi' has no default translation in C:\Apktool\frameres\
res; found: ar bg ca cs da de el en_GB es es_US et fa fi fr hi hr hu in it iw ko
lt lv ms nb nl pl pt pt_PT ro ru sk sl sr sv th tl tr uk vi zh_CN zh_TW
I: Building apk file...
C:\Apktool>java -jar apktool.jar b frameres NEWframework-res.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building apk file...
C:\Apktool>
whats with the : cannot find source and aapt warning???? i thought i will not get any error at all..
and i have to use another apk as using the framework res.apk only will give me error.... i used SemcGenericUxpRes.apk... is it the right one?? or i need the systemui.apk???
please help and point me to the right direction...

Decompile/Recompile Problem

I have been trying for so long yet I am stuck with compiling apk. I am using autoapk tool. Whenever I try to recompile I have problem.
Log when decompiling
[*] C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI.apk
decompiling C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI.apk...
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Documents and Settings\USER\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
Click to expand...
Click to collapse
Recompiling log
[*] C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI
recompiling C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI...
I: Smaling...
I: Building resources...
invalid resource directory name: C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI\res/drawable-sw600dp-mdpi
invalid resource directory name: C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI\res/layout-sw600dp
invalid resource directory name: C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI\res/values-sw600dp
invalid resource directory name: C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI\res/values-sw600dp-port
invalid resource directory name: C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI\res/values-sw720dp
invalid resource directory name: C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI\res/values-sw720dp-port
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\USER\LOCALS~1\Temp\APKTOOL138857358957302105.tmp, -I, C:\Documents and Settings\USER\apktool\framework\1.apk, -S, C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI\res, -M, C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\USER\LOCALS~1\Temp\APKTOOL138857358957302105.tmp, -I, C:\Documents and Settings\USER\apktool\framework\1.apk, -S, C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI\res, -M, C:\xdaAutoAPKTool_V3.0.2\_INPUT_APK\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Unable to open '_INPUT_APK\SystemUI\dist\SystemUI.apk' as zip archive
The system cannot find the drive specified.
Click to expand...
Click to collapse
I have latest jdk & jre installed. I use xp sp3. Someone please help & tell what I am doing wrong. I chose version 1.4.1 before decompiling in auto apktool. I tried alot of roms even tried deodexed rom.I tried systemUi,framework-res. Please tell me if there is any pre-requsite files I need before compiling & what to do?Please dont ask me to use other tool because I have tried all compiling tools
You said I should help you. I would try it on linux if I were you.
You can PM me and I will try it on my machine to decompile, make the changes and recompile it for you. Just send me a download link and instructions
Hmm..looks like you need to use the latest apktool and aapt files. 1.4.1 is very old now.
Try Tickle My Android 4.3. That uses the very latest versions.
Sent from my SK17i using xda premium

[Q] Having problems when I compile with APKTOOL

Hi! As the title says, I'm having problems when i compile with APKTOOL. The apk in matter is SecSettings.apk. My phone is a Samsung Galaxy Note GT-N7000 running Jelly Bean Touchwiz and i have both framework-res.apk and twframework.res installed in APKTOOL. But it's not the only apk (SecSettings) which i have problems: If i try to recompile framework-res again i have a close-to-same error and the folder "dist" with the modded apk is not created. I'm attaching the error in CMD. Hope you guys can help me!
Code:
C:\Users\Julian\Desktop\ordenar\APKTOOL>apktool d SecSettings.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Julian\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
C:\Users\Julian\Desktop\ordenar\APKTOOL>apktool b SecSettings
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\Users\Julian\Desktop\ordenar\APKTOOL\SecSettings\res\xml\device_info_settings
.xml:3: error: Error parsing XML: not well-formed (invalid token)
aapt: warning: string 'lgt_service_global_auto_roaming_call_customcenter_summary
_nocall' has no default translation in C:\Users\Julian\Desktop\ordenar\APKTOOL\S
ecSettings\res; found: de es_ES fr it pl ru
aapt: warning: string 'onscreen_keypad' has no default translation in C:\Users\J
ulian\Desktop\ordenar\APKTOOL\SecSettings\res; found: az bg ca cs da de el en_US
es_ES es_US et eu fi fr ga gl hr hu hy is it ka kk ko lt lv mk nb nl pl pt_BR p
t_PT ro ru sk sl sr sv tr uk uz
aapt: warning: string 'wifi_scc_diff_notification_dialog_msg' has no default tra
nslation in C:\Users\Julian\Desktop\ordenar\APKTOOL\SecSettings\res; found: az b
g ca cs da de el en_US es_ES es_US et eu fi fr ga gl hr hu hy is it ka kk lt lv
mk nb nl pl pt_BR pt_PT ro ru sk sl sr sv tr uk uz
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\Julian\AppData\Local\Tem
p\APKTOOL2031307369933499447.tmp, -0, arsc, -I, C:\Users\Julian\apktool\framewor
k\1.apk, -S, C:\Users\Julian\Desktop\ordenar\APKTOOL\SecSettings\res, -M, C:\Use
rs\Julian\Desktop\ordenar\APKTOOL\SecSettings\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:358)
at brut.androlib.Androlib.buildResources(Androlib.java:283)
at brut.androlib.Androlib.build(Androlib.java:206)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:
\Users\Julian\AppData\Local\Temp\APKTOOL2031307369933499447.tmp, -0, arsc, -I, C
:\Users\Julian\apktool\framework\1.apk, -S, C:\Users\Julian\Desktop\ordenar\APKT
OOL\SecSettings\res, -M, C:\Users\Julian\Desktop\ordenar\APKTOOL\SecSettings\And
roidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 16, --target-sdk-version, 16, -F, C:\Users\Julian\AppData\Local\Temp\
APKTOOL2031307369933499447.tmp, -0, arsc, -I, C:\Users\Julian\apktool\framework\
1.apk, -S, C:\Users\Julian\Desktop\ordenar\APKTOOL\SecSettings\res, -M, C:\Users
\Julian\Desktop\ordenar\APKTOOL\SecSettings\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
Try this
Code:
apktool b -f -d SecSettings
Sent from my GT-I9500 using Tapatalk

Categories

Resources