[Q] APKtool - Build error! Pls help! - Galaxy S III Q&A, Help & Troubleshooting

Hey guys
I tried to build a new Settings.apk for my Rom, but the problem is I can´t build the app after changing the xml files!
I added a Screenshot and YES, I have Frameworks and SystemUl installed!
Thx!

Read the line under 'building resources'
You don't have an Id for the mentioned thing in settingsheader.xml

you need to create an entry in res\values\ids.xml for advanced_settings

DSA said:
Read the line under 'building resources'
You don't have an Id for the mentioned thing in settingsheader.xml
Click to expand...
Click to collapse
Oke, sry, I forgot to tell! This is not true. I copied everything correct! Even if I decompile and build it without changing anything, I get this errors!

Then its not decompiling properly
What apktool and aapt are you using?
Is your SDK updated?
Also try asking in the apktool thread over in the android section... likely to get more responses :highfive:
Eta:
That's the only issue that apktool has, have you decompiled it, added the Id entry then immediately recompiled?

DSA said:
Then its not decompiling properly
What apktool and aapt are you using?
Is your SDK updated?
Also try asking in the apktool thread over in the android section... likely to get more responses :highfive:
Eta:
That's the only issue that apktool has, have you decompiled it, added the Id entry then immediately recompiled?
Click to expand...
Click to collapse
SDK is up to date.
Downloaded new APKTool from website and now I only got the translation error :/

Those translations are warnings not errors...should be ok

iWilliBlecha said:
SDK is up to date.
Downloaded new APKTool from website and now I only got the translation error :/
Click to expand...
Click to collapse
They're just warnings. Shouldn't be anything to worry about

Oke, thank you guys

iWilliBlecha said:
Hey guys
I tried to build a new Settings.apk for my Rom, but the problem is I can´t build the app after changing the xml files!
I added a Screenshot and YES, I have Frameworks and SystemUl installed!
Thx!
Click to expand...
Click to collapse
Can You Teach Me How To Use ApkTool

Related

Can´t recompile framework-res.apk Help please.

Hello,
i have a problem recompiling framework-res.apk.
I can flawlessly decompile and change any other apk (also system apks).
Decompiling the framework-res.apk goes flawlessly as well...
But when i try to recompile apktool tells me
could not find sources
checking whether resources has changed
building ressourced
Click to expand...
Click to collapse
then it gives and incredible long error message that something is wrong in values/plurals (I have not even touched it!!) and some other **** that may be wrong..
Even if I don´t change anything I get this message..
First of all:
- i have installed the framework (java -jar apktool.jar if framework-res.apk)
- i have updated to the latest aapt.exe
- i am using apktool 1.4.8 but it also happens with all other versions (I tried it)
I don´t know what´s wrong since I can flawlessly change any other apks that way as i told..
I hope you can help me!
Thanks in advance!
Use apkmanager is best...... to install framework, put it in others folder use "apktool if framework-res.apk" cmd..... as ur error says, u r not installed framework correctly i think..... try this....
Sent from my Micromax A60 using xda premium
Well... apkmanager is like an automatic Version of apktool...
So I will get same Error...
Can´t anyone help me? Has no one ever discovered this Problem before?...
Can you post the long error message to track the issue copy it to paste bin or something
Sent from my GT-N7000 using xda premium
spartanier7 said:
Hello,
i have a problem recompiling framework-res.apk.
I can flawlessly decompile and change any other apk (also system apks).
Decompiling the framework-res.apk goes flawlessly as well...
But when i try to recompile apktool tells me
then it gives and incredible long error message that something is wrong in values/plurals (I have not even touched it!!) and some other **** that may be wrong..
Even if I don´t change anything I get this message..
First of all:
- i have installed the framework (java -jar apktool.jar if framework-res.apk)
- i have updated to the latest aapt.exe
- i am using apktool 1.4.8 but it also happens with all other versions (I tried it)
I don´t know what´s wrong since I can flawlessly change any other apks that way as i told..
I hope you can help me!
Thanks in advance!
Click to expand...
Click to collapse
same problem!
Try THIS and report back.
Well thanks
That ICS Apktool worked. Allthough i was editing a JB apk...
Thanks anyway I hop it will remain working Otherwise I´ll report on that here.
Thanks again. You saved my ass.
The funny thing is that SystemUI is not recompilable with that apktool. But it works fine with my old one..
It seems that it only works for framework-res.apk...
isn´t that strange somehow?
spartanier7 said:
isn´t that strange somehow?
Click to expand...
Click to collapse
It is a pain in the ass, try this one for it which is what I use for my SystemUI and other problem APKs, but keep the two separate, so have the first in it's own folder and this in it's own folder...

[Q] How to decompile JB Apk?

Hi guys.
I have Apk Manager.
And, most of apks don't decompile.
I guess this is due to Api level.
Is there any way to increase the api level in apk manager?
Or is there a mod of apk manager that works with JB.
Please reply asap
masterex567 said:
Hi guys.
I have Apk Manager.
And, most of apks don't decompile.
I guess this is due to Api level.
Is there any way to increase the api level in apk manager?
Or is there a mod of apk manager that works with JB.
Please reply asap
Click to expand...
Click to collapse
Get dsixda's kitchen, it now supports the I9300
Search for my thread on how to theme jb.
Sent from my GT-I9300 using Tapatalk 2
Kangburra said:
Get dsixda's kitchen, it now supports the I9300
Click to expand...
Click to collapse
Dsixda kitchen cannot be used to decompile apks.
Phone_Guru said:
Search for my thread on how to theme jb.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
link please.
Plus. I'm not really talking about theming.
For all general Apks.
Like SecPhone, SecLauncher, SecGallery, SecContacts etc.
Not theming, just xml modding.
 nice querry man
Sent from my GT-I9300 using xda premium
Use the apktool by ibotpeeches..from here
Apart from SecPhone.apk never had any trouble in decompiling recompiling JB apks..
zoot1 said:
Use the apktool by ibotpeeches..from here
Apart from SecPhone.apk never had any trouble in decompiling recompiling JB apks..
Click to expand...
Click to collapse
Ok.
Any way of changing API level in apk manager?
masterex567 said:
Ok.
Any way of changing API level in apk manager?
Click to expand...
Click to collapse
I don't know much about apk manager but in apktools you can change the api level by -a command..it is generally used while deodexing ..
however, api level will not give you troubles if you use the latest apktool..it included all the magic numbers to work with JB apps..
zoot1 said:
I don't know much about apk manager but in apktools you can change the api level by -a command..it is generally used while deodexing ..
however, api level will not give you troubles if you use the latest apktool..it included all the magic numbers to work with JB apps..
Click to expand...
Click to collapse
Ok.
So i've downloaded the apktool.jar version 1.5.0
alongside the new aapt.exe
Should i use the old apktool.bat to work with this one?
masterex567 said:
Ok.
So i've downloaded the apktool.jar version 1.5.0
alongside the new aapt.exe
Should i use the old apktool.bat to work with this one?
Click to expand...
Click to collapse
Follow the below steps:
Place both Apktool and aapt.exe in the windows directory
have java installed (you might already have it)
right click inside the windows directory, in any clean space, choose open command prompt here
use:
Code:
java -jar apktool.jar d your <apkpath> <destinationfolderpath>
to decompile and
Code:
java -jar apktool.jar b <yourdestinationfolderpath> <yourfinalapkpath>
to recompile the final apk...just drag and drop the folders/apks to cmd, it will add the path
drag and drop the android.manifest.xml and meta-inf files from the original apk to the final apk after you are done..open both the files with 7zip/winrar
masterex567 said:
Dsixda kitchen cannot be used to decompile apks.
Click to expand...
Click to collapse
Funny it works for me.
Kangburra said:
Funny it works for me.
Click to expand...
Click to collapse
?
I thought dsixda kitchen could only deodex and sign apk.
There's no option of decompiling.
Is there?
Or give me the option number..
masterex567 said:
?
I thought dsixda kitchen could only deodex and sign apk.
There's no option of decompiling.
Is there?
Or give me the option number..
Click to expand...
Click to collapse
From the main menu
0 - Advanced options
18 - Plugin Scripts
5 - Decompile & Compile Deodexed File
This is version 2.06 (current).
When it has finished the decompile make the changes then press enter and it will recompile the apk.
Kangburra said:
From the main menu
0 - Advanced options
18 - Plugin Scripts
5 - Decompile & Compile Deodexed File
This is version 2.06 (current).
When it has finished the decompile make the changes then press enter and it will recompile the apk.
Click to expand...
Click to collapse
Ok.
Got it.
Just that my plugin scripts is at 24.
Hit that button for you.

[HELP]Compile error in APK Multi Tool

Hi guys
I was being decompiling my settings.apk
And after compiling i was edit XML Files there
And after editing i compile it
And theres a error that it said go to option 21 to take a log but its only a compression level for apks i think its should 24
But can someone help me fix this?
I was only creating a rom but this only compiling made the day long to post it here
Thanks for help
Sent from my GT-S5300 Rooted w/Remix v2 Rom using XDA-Developers App
Iam Filipino
LOG
Check you log file to find out error and fix it. You can find the log in the root folder of APK Multi Tool, named 'APK-Multi-Tool'. Open with Notepad (Notepad++ is recommended). Figure out the errors and try to fix them.
rhar**** said:
Check you log file to find out error and fix it. You can find the log in the root folder of APK Multi Tool, named 'APK-Multi-Tool'. Open with Notepad (Notepad++ is recommended). Figure out the errors and try to fix them.
Click to expand...
Click to collapse
i have same problem
but what should i do ? delete some strings ?
janreytuazon15 said:
Hi guys
I was being decompiling my settings.apk
And after compiling i was edit XML Files there
And after editing i compile it
And theres a error that it said go to option 21 to take a log but its only a compression level for apks i think its should 24
But can someone help me fix this?
I was only creating a rom but this only compiling made the day long to post it here
Thanks for help
Sent from my GT-S5300 Rooted w/Remix v2 Rom using XDA-Developers App
Iam Filipino
Click to expand...
Click to collapse
Kevalvino said:
i have same problem
but what should i do ? delete some strings ?
Click to expand...
Click to collapse
It could be an outdated aapt file. For those that have this problem,check the aptktool and aapt version.Make sure your apk's are also deodexed.Heres the latest version of apktool.... https://code.google.com/p/android-apktool/downloads/list
Apktool has to be able to support every generation APK, and that is becoming quite difficult to do. Especially with the new restrictions of aapt in every latest version.
Off the top of my head there is 2 major changes in newer aapt.
1) Implicit parent now requires a parent.
If you had
Code:
<style name="Door.Knob.Color"> ... </style>
You need
Code:
<style name="Door.Knob"></style>
<style name="Door"><style>
Even if they are NULL styles.
2) Android styles are enforced private.
So if you are extending some styles which HTC & Samsung are doing, then on newer aapt it fails to build. The obvious question is "well lets just use old aapt". Then my obvious answer is this (via Google)
Thanks, it's help me out

recompile apk

can you help me to recompile phone.apk with one change.
garik345 said:
can you help me to recompile phone.apk with one change.
Click to expand...
Click to collapse
Not really re-compiling, but have you tried xposed framework yet?
chicguy said:
Not really re-compiling, but have you tried xposed framework yet?
Click to expand...
Click to collapse
No, xposed framework bad to use with miui based rom.
garik345 said:
No, xposed framework bad to use with miui based rom.
Click to expand...
Click to collapse
So what do you want to do? de-compile Phone.apk, edit some files, then re-compile it? With apktool, right?
artit said:
So what do you want to do? de-compile Phone.apk, edit some files, then re-compile it? With apktool, right?
Click to expand...
Click to collapse
right, but when i want to do re-compile i get error.
i also take error when re-compile without changes.
garik345 said:
right, but when i want to do re-compile i get error.
i also take error when re-compile without changes.
Click to expand...
Click to collapse
Yes, I got that error when I try to pack Setting.apk. It's because MIUI apk use some directory notation that not standard to apktool.
Ex. values-hugeui
I solve this by changing values-hugeui to values-xxhdpi (or maybe values-xhdpi, don't know that hugeui means exactly). If values-xxhdpi exists, you can try to merge all files and config in it.
garik345 said:
right, but when i want to do re-compile i get error.
i also take error when re-compile without changes.
Click to expand...
Click to collapse
May I correct my wrong answer, MIUI use its own apktool & aapt. So to rebuild MIUI apk you should add ~/path/to//miui/tools to your $PATH environment and it should be at the start of $PATH to override other apktool & aapt.

[GUIDE]How to recompile LGSettings.apk and LGeasySettings.apk

Hi there,
I have been struggling for long time with decompiling and resompiling LGsettings.apk for my Android L theme. Here is the solution:
LGSettings.apk
Look for /res/layout/dialog_title_secondlines.xml. In the 4. line change
Code:
@*com.lge.internal:style/DialogWindowTitle.Holo.Light
to
Code:
"@com.lge:style/DialogWindowTitle.Holo.Light"
Then look for /res/xml/preference_widget_checkbox.xml. In the second line change:
Code:
"@*com.lge.internal:style/Widget.Holo.Light.CompoundButton.CheckBox'
to
Code:
"@com.lge:style/Widget.Holo.Light.CompoundButton.CheckBox"
Source
Check res/values/arrays.xml if you an find "<" here. If yes replace all with "<". Save and close, try to recompile.
Source.
LGEasySettings.apk
Do the same changes. In this case I did not have "<"-s in the arrays.xml.
Update: unfortunately the Settings app crashes after successful recompiling.
Hit the thanks button if it helped.
Kickoff said:
Code:
"@*com.lge.internal:style/Widget.Holo.Light.CompoundButton.CheckBox'
to
Code:
"@com.lge:style/Widget.Holo.Light.CompoundButton.CheckBox"
.
Click to expand...
Click to collapse
This line has already been changed in V10L
So for the news
I have the wrong references in 10L. The same with the settings apk from your Rom. ?
Just finishing compiling, send testers and I take relationships
Beta9 or RC2 apktool?
Ok, Cloudyfa gave a hint. Just made the changes as described above, recompiled the apk and replaced within the zip the original files that were touched. No crash anymore, it works.
@Kickoff. Which apktool do you recommend using? I'm currently using Beta9
seanskiT! said:
@Kickoff. Which apktool do you recommend using? I'm currently using Beta9
Click to expand...
Click to collapse
I was using RC2, then compiled the tool based on the actual sources. Still waiting for RC3.
Update: unfortunately the Settings app crashes after successful recompiling.
what it mean bro?
Kickoff said:
Ok, Cloudyfa gave a hint. Just made the changes as described above, recompiled the apk and replaced within the zip the original files that were touched. No crash anymore, it works.
Click to expand...
Click to collapse
Which Zip are you reffering to?? After recompiling the apk did you unzip the file then replced it or used the VR theme??
Azharkanorwala said:
Which Zip are you reffering to?? After recompiling the apk did you unzip the file then replced it or used the VR theme??
Click to expand...
Click to collapse
Sorry, within the apk not zip.

Categories

Resources