Hi all!
I get these errors compiling apk's even without changes:
Code:
invalid resource directory name: ........\res/drawable-land-xxhdpi
invalid resource directory name: ........\res/drawable-sw359dp-port-xxhdpi
etc etc etc
framework installed ok to 1.apk
twframework installed ok to 2.apk
SOLUTIONS
Problem 1: invalid resource directory name: ........\res/drawable-land-xxhdpi, etc etc
-Be sure you are using an updated aapt.
Problem 2: Errors with styles when compiling
-Thanks to user .malo2000 for his solution:
-Extract files system_bar_notification_panel_title.xml and system_bar_settings_view.xml from apk. Decompile apk without these files, make changes, compile again and then push system_bar_notification_panel_title.xml and system_bar_settings_view.xml into apk. Remember to zipalign apk when finished.
Install SystemUI.apk also from system/app/
Nd try
Nd make sure if u changed ny pngs check out is it renamed properly
Installed systemui as 127.apk but no luck, same errors.
I did not changes at the moment. Just can't get compiling again.
I tried to add ids 2 and 127 to apktool.yml and no luck.
I got similar errors for SecContacts.. Looks like there are more dependent frameworks...
Sent from my GT-I9500 using Tapatalk 2
Tried installing MMAppFramework as 127 and added to yml file and same errors....
Hi guys. I've found a solution to compile it. But there´s a problem with apktool, I think...
Renamed the directories name ending with xxhdpi to xhdpi. Compiles ok, no errors. But obviously, apps compiled with this method does not work. Tested with SamsungCamera2, black screen and then FC.
How can we deal with that? Expect a new release of apktool?
PD: issue opened.
Ok, problem solved.
I was using an outdated aapt file. For those that have this problem, check aptktool and aapt version.
Now compiling ok.
Hope this helps.
cybdani said:
Ok, problem solved.
I was using an outdated aapt file. For those that have this problem, check aptktool and aapt version.
Now compiling ok.
Hope this helps.
Click to expand...
Click to collapse
I have all updated in my apktool, also aapt (but last version is dated 23december), but i have every time the same problems to compile. I watch everytime here http://forum.xda-developers.com/showthread.php?p=28366939. You found aapt file update from another link/thread?
bluflight said:
I have all updated in my apktool, also aapt (but last version is dated 23december), but i have every time the same problems to compile. I watch everytime here http://forum.xda-developers.com/showthread.php?p=28366939. You found aapt file update from another link/thread?
Click to expand...
Click to collapse
Download from official site here https://code.google.com/p/android-apktool/downloads/detail?name=apktool1.5.2.tar.bz2&can=2&q=
Dated 2 feb 2013
cybdani said:
Download from official site here https://code.google.com/p/android-apktool/downloads/detail?name=apktool1.5.2.tar.bz2&can=2&q=
Dated 2 feb 2013
Click to expand...
Click to collapse
Thanks for the help but for me not work.. This from official site be the same i update last time. I work on S2 and i have no problems, only now with 9505 i have this problems, and i know very much people have the same issue..
bluflight said:
Thanks for the help but for me not work.. This from official site be the same i update last time. I work on S2 and i have no problems, only now with 9505 i have this problems, and i know very much people have the same issue..
Click to expand...
Click to collapse
yepp, I'm in the same boat mate
Tried wanam's apkmanager,but no success
bluflight said:
Thanks for the help but for me not work.. This from official site be the same i update last time. I work on S2 and i have no problems, only now with 9505 i have this problems, and i know very much people have the same issue..
Click to expand...
Click to collapse
I suggest you to use all files in last version from a new folder. Then reinstall framework-res, twframework and systemui.
I dont't know why is not working for you.
I've decompiled, modified and recompiled some files.
cybdani said:
I suggest you to use all files in last version from a new folder. Then reinstall framework-res, twframework and systemui.
I dont't know why is not working for you.
I've decompiled, modified and recompiled some files, including framework-res without problems.
Click to expand...
Click to collapse
i have tried the aapt + apktool files from all of the above mentioned sites and additionally tried the aapt file from the latest sdk and it still does not compile for me. would you mind posting the aapt and apktool files that you're using?
thx
hocgwai said:
i have tried the aapt + apktool files from all of the above mentioned sites and additionally tried the aapt file from the latest sdk and it still does not compile for me. would you mind posting the aapt and apktool files that you're using?
thx
Click to expand...
Click to collapse
Yes, here are attached to this post.
Using java 6 (x86) as path on win7 x64.
Hope this helps.
cybdani said:
Yes, here are attached to this post.
Using java 6 (x86) as path on win7 x64.
Hope this helps.
Click to expand...
Click to collapse
big thanks, i will give it a try and post my results
update:
still does not compile for me. still getting brut errors. here are my cmd logs if anyone can help:
C:\apktool>apk152 d framework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
C:\apktool>apk152 b framework-res framework-res.new.zip
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'default_audio_route_name_hdmi' has no default translation
in C:\apktool\framework-res\res; found: en_GB es
aapt: warning: string 'default_permission_group' has no default translation in C
:\apktool\framework-res\res; found: en_GB es
aapt: warning: string 'perms_hide' has no default translation in C:\apktool\fram
ework-res\res; found: en_GB es
aapt: warning: string 'perms_show_all' has no default translation in C:\apktool\
framework-res\res; found: en_GB es
aapt: warning: string 'securekeypad_restrict' has no default translation in C:\a
pktool\framework-res\res; found: zh_CN zh_HK
aapt: warning: string 'ss_clear_default_hint_msg' has no default translation in
C:\apktool\framework-res\res; found: zh_CN zh_HK
aapt: warning: string 'ss_clear_default_hint_msg_all' has no default translation
in C:\apktool\framework-res\res; found: zh_CN zh_HK
aapt: warning: string 'ss_clear_default_hint_msg_applicationmanager' has no defa
ult translation in C:\apktool\framework-res\res; found: zh_CN zh_HK
aapt: warning: string 'ss_clear_default_hint_msg_more' has no default translatio
n in C:\apktool\framework-res\res; found: zh_CN zh_HK
aapt: warning: string 'ss_clear_default_hint_msg_settings' has no default transl
ation in C:\apktool\framework-res\res; found: zh_CN zh_HK
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 17, --target-sdk-version, 17, -F, C:\Users\admin\AppData\Local\Temp
\APKTOOL162543892235437466.tmp, -x, -0, arsc, -S, C:\apktool\framework-res\res,
-M, C:\apktool\framework-res\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, 17, --target-sdk-version, 17, -F, C:
\Users\admin\AppData\Local\Temp\APKTOOL162543892235437466.tmp, -x, -0, arsc, -S,
C:\apktool\framework-res\res, -M, C:\apktool\framework-res\AndroidManifest.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, 17, --target-sdk-version, 17, -F, C:\Users\admin\AppData\Local\Temp\A
PKTOOL162543892235437466.tmp, -x, -0, arsc, -S, C:\apktool\framework-res\res, -M
, C:\apktool\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
C:\apktool\framework-res\res\layout\keyguard_screen_password_landscape.xml:22: e
rror: Error: No resource found that matches the given name (at 'layout' with val
ue '@layout/keyguard_transport_control').
C:\apktool\framework-res\res\layout\keyguard_screen_password_portrait.xml:22: er
ror: Error: No resource found that matches the given name (at 'layout' with valu
e '@layout/keyguard_transport_control').
C:\apktool\framework-res\res\layout\keyguard_screen_tab_unlock.xml:23: error: Er
ror: No resource found that matches the given name (at 'layout' with value '@lay
out/keyguard_transport_control').
C:\apktool\framework-res\res\layout\keyguard_screen_tab_unlock_land.xml:17: erro
r: Error: No resource found that matches the given name (at 'layout' with value
'@layout/keyguard_transport_control').
C:\apktool\framework-res\res\layout\keyguard_screen_unlock_landscape.xml:18: err
or: Error: No resource found that matches the given name (at 'layout' with value
'@layout/keyguard_transport_control').
C:\apktool\framework-res\res\layout\keyguard_screen_unlock_portrait.xml:23: erro
r: Error: No resource found that matches the given name (at 'layout' with value
'@layout/keyguard_transport_control').
C:\apktool>
hocgwai said:
big thanks, i will give it a try and post my results
update:
still does not compile for me. still getting brut errors. here are my cmd logs if anyone can help:
C:\apktool>apk152 d framework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
C:\apktool>apk152 b framework-res framework-res.new.zip
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'default_audio_route_name_hdmi' has no default translation
in C:\apktool\framework-res\res; found: en_GB es
aapt: warning: string 'default_permission_group' has no default translation in C
:\apktool\framework-res\res; found: en_GB es
aapt: warning: string 'perms_hide' has no default translation in C:\apktool\fram
ework-res\res; found: en_GB es
aapt: warning: string 'perms_show_all' has no default translation in C:\apktool\
framework-res\res; found: en_GB es
aapt: warning: string 'securekeypad_restrict' has no default translation in C:\a
pktool\framework-res\res; found: zh_CN zh_HK
aapt: warning: string 'ss_clear_default_hint_msg' has no default translation in
C:\apktool\framework-res\res; found: zh_CN zh_HK
aapt: warning: string 'ss_clear_default_hint_msg_all' has no default translation
in C:\apktool\framework-res\res; found: zh_CN zh_HK
aapt: warning: string 'ss_clear_default_hint_msg_applicationmanager' has no defa
ult translation in C:\apktool\framework-res\res; found: zh_CN zh_HK
aapt: warning: string 'ss_clear_default_hint_msg_more' has no default translatio
n in C:\apktool\framework-res\res; found: zh_CN zh_HK
aapt: warning: string 'ss_clear_default_hint_msg_settings' has no default transl
ation in C:\apktool\framework-res\res; found: zh_CN zh_HK
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 17, --target-sdk-version, 17, -F, C:\Users\admin\AppData\Local\Temp
\APKTOOL162543892235437466.tmp, -x, -0, arsc, -S, C:\apktool\framework-res\res,
-M, C:\apktool\framework-res\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, 17, --target-sdk-version, 17, -F, C:
\Users\admin\AppData\Local\Temp\APKTOOL162543892235437466.tmp, -x, -0, arsc, -S,
C:\apktool\framework-res\res, -M, C:\apktool\framework-res\AndroidManifest.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, 17, --target-sdk-version, 17, -F, C:\Users\admin\AppData\Local\Temp\A
PKTOOL162543892235437466.tmp, -x, -0, arsc, -S, C:\apktool\framework-res\res, -M
, C:\apktool\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
C:\apktool\framework-res\res\layout\keyguard_screen_password_landscape.xml:22: e
rror: Error: No resource found that matches the given name (at 'layout' with val
ue '@layout/keyguard_transport_control').
C:\apktool\framework-res\res\layout\keyguard_screen_password_portrait.xml:22: er
ror: Error: No resource found that matches the given name (at 'layout' with valu
e '@layout/keyguard_transport_control').
C:\apktool\framework-res\res\layout\keyguard_screen_tab_unlock.xml:23: error: Er
ror: No resource found that matches the given name (at 'layout' with value '@lay
out/keyguard_transport_control').
C:\apktool\framework-res\res\layout\keyguard_screen_tab_unlock_land.xml:17: erro
r: Error: No resource found that matches the given name (at 'layout' with value
'@layout/keyguard_transport_control').
C:\apktool\framework-res\res\layout\keyguard_screen_unlock_landscape.xml:18: err
or: Error: No resource found that matches the given name (at 'layout' with value
'@layout/keyguard_transport_control').
C:\apktool\framework-res\res\layout\keyguard_screen_unlock_portrait.xml:23: erro
r: Error: No resource found that matches the given name (at 'layout' with value
'@layout/keyguard_transport_control').
C:\apktool>
Click to expand...
Click to collapse
im getting the same errors when trying to Compile framework-res.apk
cybdani said:
Yes, here are attached to this post.
Using java 6 (x86) as path on win7 x64.
Hope this helps.
Click to expand...
Click to collapse
Thanks for your files....could you try decompile and compile systemui.apk? I've deodexed I9505 fw with latest kitchen with api setted on 17 and using apktool and apk manager (updated with the latest file) I can decompile but I have errors in compiling :banghead:
Inviato dal mio GT-I9505 con Tapatalk 2
.malo2000 said:
Thanks for your files....could you try decompile and compile systemui.apk? I've deodexed I9505 fw with latest kitchen with api setted on 17 and using apktool and apk manager (updated with the latest file) I can decompile but I have errors in compiling :banghead:
Inviato dal mio GT-I9505 con Tapatalk 2
Click to expand...
Click to collapse
Not tried to recompile systemui before. I have errors too compiling but different errors than first post.
This time are /@style errors.
Well, I'll take a look to resources to know more about it. These style errors are here system_bar_notification_panel_title.xml. But not defined here: styles.xml.
Seems that this is reported as issue accepted with framework-res here http://code.google.com/p/android-ap...tus Priority Milestone Owner Summary Modified
Someone have a deodexed and zipaligned rom installed (i9505)?
Please, can someone check (deodexed rom) if this apk is working or you are getting FC?
It's deodexed and zipaligned samsungcamera2.apk modified to use camera with battery at -5%
Link: https://www.box.com/s/5fpgwkgi2xwnqmgae7ga
cybdani said:
Someone have a deodexed and zipaligned rom installed?
Please, can someone check (deodexed rom) if this apk is working or you are getting FC?
It's deodexed and zipaligned samsungcamera2.apk modified to use camera with battery at -5%
Link: https://www.box.com/s/5fpgwkgi2xwnqmgae7ga
Click to expand...
Click to collapse
I run my own deodexed slim rom on my 9500.
Full battery right now so cant test at low 5% tho
Related
hi devs,
is would like to modify an apk! after some google-work, i found apktool to decompile & to compile the modded! but without success!
what i have done? (OS=linux)
download (aapt,apktool,apktool.jar) to /usr/local/bin
adb pull /system/app/DeskClock.apk /home/htc/
cd /home/htc/
apktool d DeskClock.apk ./out
change the /res/values-de/strings.xml and save
apktool b -f -d out (compile the folder to new apk)
adb shell & cd /system/app & mv DeskClock.apk DeskClock.old & ^ctrl+D
adb push /home/htc/out/dist/DeskClock.apk /system/app/
ok, in my opinion that should be all, but it doesn't work!
i cant see the Clock App on my Droid.
Can anybody say me, were is my misstake?
I'm not very talented in Linux, but your steps seem to be right. I always used Windows at work, so I do only know the apk took for Win XP
But did you check if the recompiled file has the same size as the original one?
Apktool ERROR
Hey I'm trying to use apktool to recompile my SystemUI.apk but anytime i run apktool b SystemUI the following error pops up
C:\Windows\system32>cd C:\Windows
C:\Windows>apktool if C:\Windows\framework-res.apk
I: Framework installed to: C:\Users\Mama\apktool\framework\1.apk
C:\Windows>apktool if C:\Windows\SystemUI.apk
I: Framework installed to: C:\Users\Mama\apktool\framework\127.apk
C:\Windows>apktool d SystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Mama\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
C:\Windows>apktool b SystemUI
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\Windows\SystemUI\res\values\styles.xml:3: error: Error retrieving parent for
item: No resource found that matches the given name '@*android:style/TextAppeara
nce.StatusBar'.
C:\Windows\SystemUI\res\values\styles.xml:8: error: Error retrieving parent for
item: No resource found that matches the given name '@*android:style/TextAppeara
nce.Large'.
C:\Windows\SystemUI\res\values\styles.xml:11: error: Error retrieving parent for
item: No resource found that matches the given name '@*android:style/Widget.But
ton'.
C:\Windows\SystemUI\res\values\styles.xml:16: error: Error retrieving parent for
item: No resource found that matches the given name '@*android:style/TextAppear
ance.StatusBar'.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-ver
sion, 10, -F, C:\Users\Mama\AppData\Local\Temp\APKTOOL1762758136473137198.tmp, -
I, C:\Users\Mama\apktool\framework\1.apk, -S, C:\Windows\SystemUI\res, -M, C:\Wi
ndows\SystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:255)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
at brut.androlib.Androlib.buildResources(Androlib.java:269)
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 10, --target-sdk-version, 10, -F, C:\Users\Mama\AppData\Local\Temp\AP
KTOOL1762758136473137198.tmp, -I, C:\Users\Mama\apktool\framework\1.apk, -S, C:\
Windows\SystemUI\res, -M, C:\Windows\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:253)
... 6 more
C:\Windows>
I know that some of the .xml file might be wrong but i tried just decompiling and recompiling the SystemUI.apk and the same error appear...
Is there something im doing wrong??
Please help!!!!!!
maybe posting in the thread for apktool might get you help faster
and nice revive of a 10 month old dead thread
[HOW-TO][29/MAR] How to setup APKTool & Decompile, Recomile, Sign, and Zipalign APKs
Decompile, Recompile, Sign and Zipalign APKs
Since there aren't many tutorials out there on how to decompile, recompile, sign and zipalign the framework-res.apk, or other APK files, I decided to create one myself
Decompiling, editing, recompiling and signing It can yield a number of results, for example, you can edit the values, add custom images, fix some issues, or just go on an adventure
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[WHAT YOU NEED]
1) A computer
2) The APK you want to edit
3) Latest Java Development Kit (JDK) (Download and Install with default settings http://www.java.com/en/download/index.jsp)
4) Some resource files, which I have bundled into on convenient zip, found here.
5) The Framework-res.apk from /system/framework
- In the case of it being an APK from an HTC based ROM, you will also need the com.htc,resources.apk, found in the same directory
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[STEPS]
- Initial Setup
- First download the zip from above, and extract the files, into C:\Android\APK
- Then, install the JDK from the link above, to the default location
- Then, go to Start, search for 'Environment,' and choose 'Edit Environment Variables for your Account.'
- Now, edit 'PATH,' and 'CLASSPATH.' (If you don't have them, just add them, and name them PATH and CLASSPATH)
- - For PATH, give this as the Variable Value: "C:\Program Files\Java\jdkXXX\bin;" (Without Quotes)(XXX is the JDK version you have)
- - For CLASSPATH, give this as the Variable Value: "C:\Program Files\Java\jdkXXX\jre\lib;" (Without Quotes)(XXX is the JDK version you have)
- Install the Framework:
- Now, move the framework-res.apk, and com.htc.resources.apk (If HTC), to C:\Android\APK
- Press shift, and right click in the folder, and open a command prompt window from the dropdown
- - Type in: "Apktool if framework-res.apk" (Without Quotes) And Press Enter
- - If it is an HTC ROM, Type in: "Apktool if com.htc.resources.apk" (Without Quotes) And Press Enter
- If this goes successfully, you can remove these two APKs from the folder
* NOTE: Everything above was ONE TIME ONLY *
- Decompiling the APK
- Now, copy the APK that you want to decmopile, to C:\Android\APK
- Open a command prompt window there
- Type in "Apktool d xxx.apk" (Without Quotes, and replace xxx with the APK name)
- Once this is done successfully, you will have a folder with the APK name in C:\Android\APK
- You can now make any edits you like
- Recompiling the APK
- Once you're done editing, go back to C:\Android\APK
- Open a command prompt window, and type in "Apktool b xxx"
(Without Quotes, and xxx is the name of the folder where the APK was extracted)
- Once this is done, the new APK can be found in C:\Android\APK\xxx\dist (xxx is name of folder where you extracted the APK)
- Signing, and Zipaligning
- Now, there are two ways to do this.
- - Either you install DSIXDA's kitchen, from here, and use that to Sign, and Zipalign
- - Or, you send me the APK, and I'll do it for you
* NOTE: Always Sign, THEN Zipalign *
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
[CREDITS]
1• Mwilky for teaching me all this
2• Floatshow for initial recompiling instructions
3• Fisha21 for helping out
And how about to recompile it back ?
What are the steps ?
Sent from my HOX
1immortal said:
And how about to recompile it back ?
What are the steps ?
Sent from my HOX
Click to expand...
Click to collapse
Hmm, for that, we have to use 'aapt.exe' I will post a tutorial for it soon
download it here meanwhile
1immortal said:
And how about to recompile it back ?
What are the steps ?
Sent from my HOX
Click to expand...
Click to collapse
Added recompiling steps
Sent from my HTC One X using xda premium
Nice guide! Thanks OP!
Mr.Mefisto said:
Nice guide! Thanks OP!
Click to expand...
Click to collapse
No problemo
Sent from my HTC One X using xda premium
Nice guide! Question is do you have to sign system APKs? (Such as framework-rés.apk or SystemUI.apk)
Sent from my HTC One X using xda premium
Yes we do, use SignAPK
Sent from my HTC One X using xda premium
when I'm trying to recompile, I get this:
Code:
D:\Decompiling>java -jar apktool.jar b framework-res framework-res.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
D:\Decompiling\framework-res\res\values\layouts.xml:3: error: Found tag layout w
here item is expected
D:\Decompiling\framework-res\res\values\raws.xml:3: error: Found tag raw where i
tem is expected
D:\Decompiling\framework-res\res\values\public.xml:6943: error: Public symbol la
yout/htc_list_item_2text_2stamp declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6944: error: Public symbol la
yout/htc_list_item_2text_bright declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6945: error: Public symbol la
yout/htc_list_item_image_2text_image_bright declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6946: error: Public symbol la
yout/htc_list_item_imageicon_2text_2stamp declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6947: error: Public symbol la
yout/htc_list_item_imageicon_text declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6948: error: Public symbol la
yout/htc_list_item_separator declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6949: error: Public symbol la
yout/keyguard_screen_device_unlock declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6950: error: Public symbol la
yout/pin_keyboard declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:7151: error: Public symbol ra
w/fallbackring_htc declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\WiZARD\AppData\Local\Temp\
APKTOOL1215629564114721126.tmp, -x, -S, D:\Decompiling\framework-res\res, -M, D:
\Decompiling\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a: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:\U
sers\WiZARD\AppData\Local\Temp\APKTOOL1215629564114721126.tmp, -x, -S, D:\Decomp
iling\framework-res\res, -M, D:\Decompiling\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
what should I do?
WiZARD7 said:
when I'm trying to recompile, I get this:
Code:
D:\Decompiling>java -jar apktool.jar b framework-res framework-res.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
D:\Decompiling\framework-res\res\values\layouts.xml:3: error: Found tag layout w
here item is expected
D:\Decompiling\framework-res\res\values\raws.xml:3: error: Found tag raw where i
tem is expected
D:\Decompiling\framework-res\res\values\public.xml:6943: error: Public symbol la
yout/htc_list_item_2text_2stamp declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6944: error: Public symbol la
yout/htc_list_item_2text_bright declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6945: error: Public symbol la
yout/htc_list_item_image_2text_image_bright declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6946: error: Public symbol la
yout/htc_list_item_imageicon_2text_2stamp declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6947: error: Public symbol la
yout/htc_list_item_imageicon_text declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6948: error: Public symbol la
yout/htc_list_item_separator declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6949: error: Public symbol la
yout/keyguard_screen_device_unlock declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6950: error: Public symbol la
yout/pin_keyboard declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:7151: error: Public symbol ra
w/fallbackring_htc declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\WiZARD\AppData\Local\Temp\
APKTOOL1215629564114721126.tmp, -x, -S, D:\Decompiling\framework-res\res, -M, D:
\Decompiling\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a: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:\U
sers\WiZARD\AppData\Local\Temp\APKTOOL1215629564114721126.tmp, -x, -S, D:\Decomp
iling\framework-res\res, -M, D:\Decompiling\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
what should I do?
Click to expand...
Click to collapse
Reading that, I seriously have no idea :S Im no expert, just know basics, so I wrote this tutorial. Try Google? Really sorry :/
Sent from my HTC One X using xda premium
There is a problem with older versions of APKtool, in that they break the formatting of some of the XML tags in framework-res.apk, which is why your recompiling fails.
Check this thread for how to fix it: http://forum.xda-developers.com/showthread.php?t=1601511
However, I think the newest version of apktool.jar fixes this for us. You can download this version at ibotpeaches' thread:
http://forum.xda-developers.com/showthread.php?p=28366939
As well as the newest version of apktool.jar, you also need the updated aapt.exe, which can you grab here:
http://forum.xda-developers.com/showpost.php?p=29533731&postcount=157
WiZARD7 said:
when I'm trying to recompile, I get this:
Code:
D:\Decompiling>java -jar apktool.jar b framework-res framework-res.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
D:\Decompiling\framework-res\res\values\layouts.xml:3: error: Found tag layout w
here item is expected
D:\Decompiling\framework-res\res\values\raws.xml:3: error: Found tag raw where i
tem is expected
D:\Decompiling\framework-res\res\values\public.xml:6943: error: Public symbol la
yout/htc_list_item_2text_2stamp declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6944: error: Public symbol la
yout/htc_list_item_2text_bright declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6945: error: Public symbol la
yout/htc_list_item_image_2text_image_bright declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6946: error: Public symbol la
yout/htc_list_item_imageicon_2text_2stamp declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6947: error: Public symbol la
yout/htc_list_item_imageicon_text declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6948: error: Public symbol la
yout/htc_list_item_separator declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6949: error: Public symbol la
yout/keyguard_screen_device_unlock declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:6950: error: Public symbol la
yout/pin_keyboard declared here is not defined.
D:\Decompiling\framework-res\res\values\public.xml:7151: error: Public symbol ra
w/fallbackring_htc declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\WiZARD\AppData\Local\Temp\
APKTOOL1215629564114721126.tmp, -x, -S, D:\Decompiling\framework-res\res, -M, D:
\Decompiling\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a: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:\U
sers\WiZARD\AppData\Local\Temp\APKTOOL1215629564114721126.tmp, -x, -S, D:\Decomp
iling\framework-res\res, -M, D:\Decompiling\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
what should I do?
Click to expand...
Click to collapse
fisha21 said:
There is a problem with older versions of APKtool, in that they break the formatting of some of the XML tags in framework-res.apk, which is why your recompiling fails.
Check this thread for how to fix it: http://forum.xda-developers.com/showthread.php?t=1601511
However, I think the newest version of apktool.jar fixes this for us. You can download this version at ibotpeaches' thread:
http://forum.xda-developers.com/showthread.php?p=28366939
As well as the newest version of apktool.jar, you also need the updated aapt.exe, which can you grab here:
http://forum.xda-developers.com/showpost.php?p=29533731&postcount=157
Click to expand...
Click to collapse
Thanks! Added to OP
Sent from my HTC One X using xda premium
Hi Guys,
m on IceColdJelly 0.8.2 and want to disable the 180° roating. So I decompile the framework-res.apk. Than i set in bools.xml (res\values\bools.xml) name="config_allowAllRotations">true< to false. And than I want to recompile it but look at this.
I try to fix with this. I cant find anims.xml, layout.xml & raws.xml in "framework-res\res\values"
*$M3RT$* said:
Hi Guys,
m on IceColdJelly 0.8.2 and want to disable the 180° roating. So I decompile the framework-res.apk. Than i set in bools.xml (res\values\bools.xml) name="config_allowAllRotations">true< to false. And than I want to recompile it but look at this.
I try to fix with this. I cant find anims.xml, layout.xml & raws.xml in "framework-res\res\values"
Click to expand...
Click to collapse
Follow this guide. It's working for me to 100% on JB roms.
icke said:
Follow this guide. It's working for me to 100% on JB roms.
Click to expand...
Click to collapse
Added to OP
Sent from my HTC One X using xda premium
thanks now its work. But I have 2 new Questions .
1. Why the stock framework-res.apk is 12mb big and my recompiled & signed framework-res.apk 9-10mb? its the same with 1 different (name="config_allowAllRotations">true< to false) [recompiled apk = ~10mb, stock apk = ~12mb]
2. I delete the framework-res.apk from the Rom and insert the recompiled one. And the Rom dont boot >.<. I have sign it.
*$M3RT$* said:
thanks now its work. But I have 2 new Questions .
1. Why the stock framework-res.apk is 12mb big and my recompiled & signed framework-res.apk 9-10mb? its the same with 1 different (name="config_allowAllRotations">true< to false) [recompiled apk = ~10mb, stock apk = ~12mb]
2. I delete the framework-res.apk from the Rom and insert the recompiled one. And the Rom dont boot >.<. I have sign it.
Click to expand...
Click to collapse
Dont know about question 1
Answer#2 copy it to system/framework, but you have to change the permissions too. Go into recovery, advanced, fix permissions, and then boot )
If you have more questions, just post here
Sent from my HTC One X using xda premium
Also, if you cant copy it to /system/framework, then just boot into recovery, and go to mounts and storage, and mount system. Then connect to a computer, and type in the following adb commands
Adb remount
Press enter.
Adb push framework-res.apk /system/framework
Press enter.
Then fix permissions
Ps, for the adb commands to work, the framework-res.apk needs to be in the folder with the adb and fastboot files on the computer
Sent from my HTC One X using xda premium
How i make a flashable .zip
*$M3RT$* said:
How i make a flashable .zip
Click to expand...
Click to collapse
You need a metainf folder with installation instructions, which i dont know xD why do u need a zip anyways/
Sent from my HTC One X using xda premium
I can decompile fine but even unedited it won't build.
I'm using apktool.
Is there any framework I could me missing for that?
Code:
E:\Cellphone\root\apktool>apktool.bat b ./framework-res-bac
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
E:\Cellphone\root\apktool\.\framework-res-bac\res\layout\keyguard_screen_passwor
d_landscape.xml:22: error: Error: No resource found that matches the given name
(at 'layout' with value '@layout/keyguard_transport_control').
E:\Cellphone\root\apktool\.\framework-res-bac\res\layout\keyguard_screen_passwor
d_portrait.xml:22: error: Error: No resource found that matches the given name (
at 'layout' with value '@layout/keyguard_transport_control').
E:\Cellphone\root\apktool\.\framework-res-bac\res\layout\keyguard_screen_tab_unl
ock.xml:23: error: Error: No resource found that matches the given name (at 'lay
out' with value '@layout/keyguard_transport_control').
E:\Cellphone\root\apktool\.\framework-res-bac\res\layout\keyguard_screen_tab_unl
ock_land.xml:17: error: Error: No resource found that matches the given name (at
'layout' with value '@layout/keyguard_transport_control').
E:\Cellphone\root\apktool\.\framework-res-bac\res\layout\keyguard_screen_unlock_
landscape.xml:18: error: Error: No resource found that matches the given name (a
t 'layout' with value '@layout/keyguard_transport_control').
E:\Cellphone\root\apktool\.\framework-res-bac\res\layout\keyguard_screen_unlock_
portrait.xml:23: error: Error: No resource found that matches the given name (at
'layout' with value '@layout/keyguard_transport_control').
Exception in thread "main" aapt: warning: string 'default_audio_route_name_hdmi'
has no default translation in E:\Cellphone\root\apktool\.\framework-res-bac\res
; found: en_GB es
aapt: warning: string 'default_permission_group' has no default translation in E
:\Cellphone\root\apktool\.\framework-res-bac\res; found: en_GB es
aapt: warning: string 'perms_hide' has no default translation in E:\Cellphone\ro
ot\apktool\.\framework-res-bac\res; found: en_GB es
aapt: warning: string 'perms_show_all' has no default translation in E:\Cellphon
e\root\apktool\.\framework-res-bac\res; found: en_GB es
aapt: warning: string 'securekeypad_restrict' has no default translation in E:\C
ellphone\root\apktool\.\framework-res-bac\res; found: zh_CN
aapt: warning: string 'ss_clear_default_hint_msg' has no default translation in
E:\Cellphone\root\apktool\.\framework-res-bac\res; found: zh_CN
aapt: warning: string 'ss_clear_default_hint_msg_all' has no default translation
in E:\Cellphone\root\apktool\.\framework-res-bac\res; found: zh_CN
aapt: warning: string 'ss_clear_default_hint_msg_applicationmanager' has no defa
ult translation in E:\Cellphone\root\apktool\.\framework-res-bac\res; found: zh_
CN
aapt: warning: string 'ss_clear_default_hint_msg_more' has no default translatio
n in E:\Cellphone\root\apktool\.\framework-res-bac\res; found: zh_CN
aapt: warning: string 'ss_clear_default_hint_msg_settings' has no default transl
ation in E:\Cellphone\root\apktool\.\framework-res-bac\res; found: zh_CN
brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.Br
utException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-s
dk-version, 17, -F, C:\Users\XXXXXX\AppData\Local\Temp\APKTOOL7010540710286080272.
tmp, -x, -0, arsc, -S, E:\Cellphone\root\apktool\.\framework-res-bac\res, -M, E:
\Cellphone\root\apktool\.\framework-res-bac\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, 17, --target-sdk-version, 17, -F, C:
\Users\XXXXXX\AppData\Local\Temp\APKTOOL7010540710286080272.tmp, -x, -0, arsc, -S,
E:\Cellphone\root\apktool\.\framework-res-bac\res, -M, E:\Cellphone\root\apktoo
l\.\framework-res-bac\AndroidManifest.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, 17, --target-sdk-version, 17, -F, C:\Users\XXXXXX\AppData\Local\Temp\AP
KTOOL7010540710286080272.tmp, -x, -0, arsc, -S, E:\Cellphone\root\apktool\.\fram
ework-res-bac\res, -M, E:\Cellphone\root\apktool\.\framework-res-bac\AndroidMani
fest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 6 more
E:\Cellphone\root\apktool>
Anyone?
Bump?
Sent from my Microwave using xda-developers app
While using apktool to recompile the contacts apk, SecContacts_OSup.apk, I am getting the following error in cmd. This is unedited folder, and trying to compile it right after de-compilation. But still getting error.
I have tried different aapt, different apktool.jar, both java 6 and 7 and such but to no avail.
D:\apktool\112233>apktool b 11 wert.apk
I: Using Apktool 2.0.0-Beta9 on 11
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
D:\apktool\112233\11\res\layout\photo_selector_view_popup.xml:9: error: Error: No resource found tha
t matches the given name (at 'layout' with value '@layout/photo_updates_header').
aapt: warning: string 'remove_from_namecard_list_popup_title' has no default translation in D:\apkto
ol\112233\11\res; found: zh_SG
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.co
mmon.BrutException: could not exec command: [C:\Users\Keshav\AppData\Local\Temp\brut_util_Jar_7378085
831899028208.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk-version, 19, --ve
rsion-code, 19, --version-name, 4.4.2-I9505XXUFNB8, -F, C:\Users\Keshav\AppData\Local\Temp\APKTOOL365
2482745200459136.tmp, -0, arsc, -I, C:\Users\Keshav\apktool\framework\1.apk, -I, C:\Users\Keshav\apkto
ol\framework\2.apk, -S, D:\apktool\112233\11\res, -M, D:\apktool\112233\11\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:435)
at brut.androlib.Androlib.buildResources(Androlib.java:363)
at brut.androlib.Androlib.build(Androlib.java:286)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:236)
at brut.apktool.Main.main(Main.java:88)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [C:\U
sers\Keshav\AppData\Local\Temp\brut_util_Jar_7378085831899028208.tmp, p, --forced-package-id, 127, --
min-sdk-version, 19, --target-sdk-version, 19, --version-code, 19, --version-name, 4.4.2-I9505XXUFNB
8, -F, C:\Users\Keshav\AppData\Local\Temp\APKTOOL3652482745200459136.tmp, -0, arsc, -I, C:\Users\Kesh
av\apktool\framework\1.apk, -I, C:\Users\Keshav\apktool\framework\2.apk, -S, D:\apktool\112233\11\res
,-M, D:\apktool\112233\11\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:470)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:416)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Keshav\AppData\Local\Temp\bru
t_util_Jar_7378085831899028208.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk
-version, 19, --version-code, 19, --version-name, 4.4.2-I9505XXUFNB8, -F, C:\Users\Keshav\AppData\Loc
al\Temp\APKTOOL3652482745200459136.tmp, -0, arsc, -I, C:\Users\Keshav\apktool\framework\1.apk, -I, C:
\Users\Keshav\apktool\framework\2.apk, -S, D:\apktool\112233\11\res, -M, D:\apktool\112233\11\Android
Manifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:464)
... 6 more
Click to expand...
Click to collapse
If I import this raw project into Eclipse I get these 5 errors:
Description Resource Path Location Type
error: Error: No resource found that matches the given name: attr 'android:actionBarNonEmbeded'. styles.xml /DialtactsActivity/res/values-sw360dp-xxhdpi line 10 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:actionBarNonEmbeded'. styles.xml /DialtactsActivity/res/values line 10 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:searchViewTextField'. styles.xml /DialtactsActivity/res/values line 95 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:actionBarNonEmbeded'. styles.xml /DialtactsActivity/res/values line 661 Android AAPT Problem
error: Error: No resource found that matches the given name: attr 'android:searchViewTextField'. styles.xml /DialtactsActivity/res/values-sw360dp-xxhdpi line 63 Android AAPT Problem
Click to expand...
Click to collapse
Although not the right thing to do, I can remove the line with 'android:actionBarNonEmbeded' in them in Eclipse and there is no problem after deleting those 3 lines. But can't simply delete lines with 'android:searchViewTextField' as it throws up too many other errors, mostly same for other attrs.
I have surfed tons of pages at stackoverflow, xda and some other sites... but couldn't crack a solution. Can't add a simple + to @drawable either, obviously.
Reply by connor.tumbleson here on code.google.com might be answer but I couldn't figure out what to do.
url - code.google.com/p/android-apktool/issues/detail?id=441#c20
So, uh, pls help!
Note: Of course, I'm installing the framreworks first (framework-res.apk, twframework-res.apk and systemUI.apk). And have tried apkMultiTool v3.4 and some other apktool based solutions too. Nothing helped.
keshav13 said:
While using apktool to recompile the contacts apk, SecContacts_OSup.apk, I am getting the following error in cmd
Click to expand...
Click to collapse
look in \res\layout\photo_selector_vie w_popup.xml line 9, u must remove all references to photo_updates_header, common problem, sometimes system apk have been done badly ha ha ha
try this and report
worked but didn't work!
_alex74_ said:
look in \res\layout\photo_selector_vie w_popup.xml line 9, u must remove all references to photo_updates_header, common problem, sometimes system apk have been done badly ha ha ha
try this and report
Click to expand...
Click to collapse
First of all, thansk for the tip!
I removed the layout portion of that line that actually made reference to photo_updates_header file. So, that actually didn't got me those error, but it didn;t build an APK file despite showing exactly that in cmd. Here's what cmd says:
D:\apktool>apktool b c1 111.apk
I: Using Apktool 2.0.0-Beta9 on c1
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'remove_from_namecard_list_popup_title' has no default translation in D:\apkto
ol\c1\res; found: zh_SG
I: Building apk file...
I: Copying unknown files/dir...
There is no APK file built, tho. Which is bad, and surprising. What do you suggest?
[I'm using apktool 2.0 beta9, and have Java 7 installed on Win8.1.]
Edit:
Is there a way how I should remove the reference to photo_updates_header file? Should I just delete the whole of line 9 that is making the reference?
keshav13 said:
First of all, thansk for the tip!
Is there a way how I should remove the reference to photo_updates_header file? Should I just delete the whole of line 9 that is making the reference?
Click to expand...
Click to collapse
as posted apk must be builded in dist folder of your decompiled apk , no errors that says different.
that reference is about missing traslation, just warning u can keep it(no harm in apk compiling) or add a line like this:
<string name="photo_updates_header">photo updates header</string>
Click to expand...
Click to collapse
in res/values/strings.xml on bottom of all strings
lemme know
Nope :/
_alex74_ said:
as posted apk must be builded in dist folder of your decompiled apk , no errors that says different.
that reference is about missing traslation, just warning u can keep it(no harm in apk compiling) or add a line like this:
in res/values/strings.xml on bottom of all strings
lemme know
Click to expand...
Click to collapse
Hi _alex74_,
Adding the line <string name="photo_updates_header">photo updates header</string> didn't work. Very sad.
Please suggest something else.
Can you reproduce the problem at your end? Can you recompile it or not even when it's untouched?
Here's the link to contacts APK that's been torturing me: __www24.zippyshare.com/v/59685951/file.html__
Thanks a lot!
I am trying to decompile an LG app that is called LgNfc.apk, as the name says it's for the NFC control.. I want to hide the N icon when NFC is on, so I need to decompile this APK.
It is dependand from another APK that is called com.lge.apk so I did link to use that APK when decompiling (apktool if com.lge.apk)
The APK will decompile but the real problem is that it gives me a warning message, so if I decompile and try to recompile again (without touching the code) it gives me an error, so recompilation can't be done.
Here is what I get:
C:\Users\Feche\Desktop\apktool>apktool d nfc.apk
I: Using Apktool 2.0.0 on nfc.apk
I: Loading resource table...
I: Decoding Shared Library (com.lge), pkgId: 2
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Feche\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=
theme, value=0x01030594
I: Loading resource table from file: C:\Users\Feche\apktool\framework\2.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
testI: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
Click to expand...
Click to collapse
As you can see, it throws an decode attr value warning, I don't know what it's causing that.. here is the error when I want to recompile:
C:\Users\Feche\Desktop\apktool>apktool b C:\Users\Feche\Desktop\apktool\nfc
I: Using Apktool 2.0.0
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
C:\Users\Feche\Desktop\apktool\nfc\AndroidManifest.xml:40: error: Error: No reso
urce type specified (at 'theme' with value '@16975252').
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [C:\Users\Feche\
AppData\Local\Temp\brut_util_Jar_8175709690237026012.tmp, p, --shared-lib, --min
-sdk-version, 21, --target-sdk-version, 21, --rename-manifest-package, com.andro
id.nfc, --version-code, 21, --version-name, 5.0-1431077049, -F, C:\Users\Feche\A
ppData\Local\Temp\APKTOOL561295787776399176.tmp, -0, arsc, -I, C:\Users\Feche\ap
ktool\framework\1.apk, -I, C:\Users\Feche\apktool\framework\2.apk, -S, C:\Users\
Feche\Desktop\apktool\nfc\res, -M, C:\Users\Feche\Desktop\apktool\nfc\AndroidMan
ifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:458)
at brut.androlib.Androlib.buildResources(Androlib.java:396)
at brut.androlib.Androlib.build(Androlib.java:285)
at brut.androlib.Androlib.build(Androlib.java:256)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not
exec command: [C:\Users\Feche\AppData\Local\Temp\brut_util_Jar_8175709690237026
012.tmp, p, --shared-lib, --min-sdk-version, 21, --target-sdk-version, 21, --ren
ame-manifest-package, com.android.nfc, --version-code, 21, --version-name, 5.0-1
431077049, -F, C:\Users\Feche\AppData\Local\Temp\APKTOOL561295787776399176.tmp,
-0, arsc, -I, C:\Users\Feche\apktool\framework\1.apk, -I, C:\Users\Feche\apktool
\framework\2.apk, -S, C:\Users\Feche\Desktop\apktool\nfc\res, -M, C:\Users\Feche
\Desktop\apktool\nfc\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:419)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:444)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [C:\Users\Feche\Ap
pData\Local\Temp\brut_util_Jar_8175709690237026012.tmp, p, --shared-lib, --min-s
dk-version, 21, --target-sdk-version, 21, --rename-manifest-package, com.android
.nfc, --version-code, 21, --version-name, 5.0-1431077049, -F, C:\Users\Feche\App
Data\Local\Temp\APKTOOL561295787776399176.tmp, -0, arsc, -I, C:\Users\Feche\apkt
ool\framework\1.apk, -I, C:\Users\Feche\apktool\framework\2.apk, -S, C:\Users\Fe
che\Desktop\apktool\nfc\res, -M, C:\Users\Feche\Desktop\apktool\nfc\AndroidManif
est.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:413)
... 6 more
Click to expand...
Click to collapse
Any ideas why is this happening? Thanks :cyclops:
Have you installed the frameworks before decompiling?
Vivek_Neel said:
Have you installed the frameworks before decompiling?
Click to expand...
Click to collapse
Oops I did it last night, it was late and I didn't check if the framework was installed, indeed was that, thank you!
The only problem is that if I decompile and recompile again without touching the code, I get no errors but NFC won't start (it doesn't work), any ideas? I tried signing the APK but no success
Bump!
Bump
Bump