Hou do I recompile Semcgenericuxpres.apk - Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A

Hi..
I've been searching for this for a long time now, and i cant find a solution..
How do I recompile this apk??? Semcgenericuxpres.apk..
Its been so long searching that I can actually type the entire name now...
Decompiling is ok, but while recompiling, it says, aapt.exe has stopped working..
This happens for all ICS frameworks..
Please give me a solution to this.. I really wana mod the pngs!

plz guys, any..any ideas?
JJdoctor, sirkay, arcatarc? anybody? enlighten me plz..

Tan9890 said:
plz guys, any..any ideas?
JJdoctor, sirkay, arcatarc? anybody? enlighten me plz..
Click to expand...
Click to collapse
use xDAAutotool, Install framework first (framework-res.apk of the same version)... some apks wont recompile if framework is not installed... and for some u have to install another framework which should be Semcgenericuxpres.apk...
and next time provide a logcat of error if u r using

You don 't need to recompile it:simply modify. png and replace with winrar(i think it only contain graphic resources)
...hehehe:you want make a theme right?
Inviato dal mio ST18i

jjdoctor said:
use xDAAutotool, Install framework first (framework-res.apk of the same version)... some apks wont recompile if framework is not installed... and for some u have to install another framework which should be Semcgenericuxpres.apk...
and next time provide a logcat of error if u r using
Click to expand...
Click to collapse
...jj, how much millisecond before me you have answered??
Inviato dal mio ST18i

Haha, arcatarc you guesed it right.. I want to mod the pngs...
However, the zipped file dosent work directly.. must be a compression issue... as the images inside are much more compressed..
however, i've attached the error screenshot.
and here's the log..
apkt2 folder contains apktool 1.4.2
apkt3 folder contains apktool 1.4.3...
C:\AndroDev\fwdere>java -jar apkt3\apktool.jar if framework-res.apk
I: Framework installed to: C:\Users\Tanuj\apktool\framework\1.apk
C:\AndroDev\fwdere>java -jar apkt3\apktool.jar if SemcGenericUxpRes.apk
I: Framework installed to: C:\Users\Tanuj\apktool\framework\2.apk
C:\AndroDev\fwdere>java -jar apkt2\apktool.bat d -f SemcGenericUxpRes.apk SemcGe
nericUxpRes
Error: Invalid or corrupt jarfile apkt2\apktool.bat
C:\AndroDev\fwdere>java -jar apkt2\apktool.jar d -f SemcGenericUxpRes.apk SemcGe
nericUxpRes
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Tanuj\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\AndroDev\fwdere>java -jar apkt3\apktool.jar d -f SemcGenericUxpRes SemcGeneri
cUxpRes.apk
Input file (SemcGenericUxpRes) was not found or was not readable.
C:\AndroDev\fwdere>java -jar apkt3\apktool.jar b -f SemcGenericUxpRes SemcGeneri
cUxpRes.apk
I: Smaling...
I: Building resources...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Tanuj\AppData\Local\Temp\A
PKTOOL8012574018097594409.tmp, -x, -I, C:\Users\Tanuj\apktool\framework\1.apk, -
S, C:\AndroDev\fwdere\SemcGenericUxpRes\res, -M, C:\AndroDev\fwdere\SemcGenericU
xpRes\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\Tanuj\AppData\Local\Temp\APKTOOL8012574018097594409.tmp, -x, -I, C:\Users\T
anuj\apktool\framework\1.apk, -S, C:\AndroDev\fwdere\SemcGenericUxpRes\res, -M,
C:\AndroDev\fwdere\SemcGenericUxpRes\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
JJ, when u recompile this apk, which version of apktool do u use? 1.4.3 and 1.4.2 both cause the aapt.exe to crash...

Ok, now understand what is your problem:when you add file in the apk with winrar use no compression, or better recreate the apk as zip archive without compression, i use this metod, then is better if you zipalign it.
Inviato dal mio ST18i

oh!! i've made this zip now.. I'll put it in my phone and report back..
Earlier what happened was, the original png was 1.44kB.. after modification it became around 25kB... so when i put in the apk, it didnt work... I noticed that now however, that apktool dosent actually compress images..as i used to think earlier..

ok.. the pngs are working.. however there are problems..
settings crashes... and the pngs lose their .9 data... they appear stretched and the black lines determining the 9 patch data also appears there..
Any way to retain the 9 patch info?

if you wanna edit .9.png you need to extract it, decompile it using 9patch first. then you can edit it and recompile back.
information about .9patch http://code.google.com/p/android-apktool/wiki/9PatchImages

SemcGenericUxpRes.apk recompile
Can someone please help me out on this issue? Please go to the below link for my question.
http://forum.xda-developers.com/showthread.php?p=30690702#post30690702
After asking the question to Q&A forum i saw this thread, so thought of linking.
-Muthu

Help plz!
Here is the problem....
Does any one know the trick for recompiling SemcGenericUxpRes.apk [4.1.B.0.587]?
I used apktool to decompile this apk and edited styles.xml and dimen.xml to sync some of the styles to framework-res.apk.
but when tried recompiling it failed saying "aapt" stoped working. i thought it could be due to corrupted *9*.png files.
but it doesnt seems to be as i included those *9*.png files part of another apk and just re-compiled, it worked.
then i deleted public.xml file from values folder and attempted an recompile, it worked.
but the signed apk from apktool didnt work, when it was loaded back. i do not know what do to after this.
if someone has an answer please help me out.
-Muthu

I've worked out a workaround for this..Its kinda funny..
If u wana edit any xml file, just edit it and put in in another apk. Any apk file that succesfully decompiles and recompiles..
There's a problem with semcgenericuxpres.apk, and it does not recompile with this aapt.exe..
so, u just add your modded xml from semcgenericuxpres to any other recompilable apk..
Recompile that other apk
and now open that apk with winrar
extract your compiled xml from that apk
Add it to the original semcgenericuxpres.
It works..

@Tan9890, Thanks for replying...as the view count growing up without replies . Do you any option for editing styles.xml?

Related

[Q] Having trouble compiling SystemUI.apk

So I'm in the process of porting a theme (for IE20) and I'm making good progress, however I can't seem to get the SystemUI.apk to compile correctly even without changing anything. (using APK manager 5.0.2)
I actually updated it from v5 to see if it would help but I keep getting the same error
Here's the log:
Code:
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
Could Not Find C:\Users\Jon\Desktop\Theming\Apk_Manager_5.0.2\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk
Could Not Find C:\Users\Jon\Desktop\Theming\Apk_Manager_5.0.2\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Jon\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
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...
C:\Users\Jon\Desktop\Theming\Apk_Manager_5.0.2\other\..\projects\SystemUI.apk\res\layout\status_bar_expanded.xml:12: error: Error: No resource found that matches the given name (at 'layout' with value '@touchwiz:layout/quick_panel_call').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Jon\AppData\Local\Temp\APKTOOL5747871947045013646.tmp, -I, C:\Users\Jon\apktool\framework\1.apk, -S, C:\Users\Jon\Desktop\Theming\Apk_Manager_5.0.2\other\..\projects\SystemUI.apk\res, -M, C:\Users\Jon\Desktop\Theming\Apk_Manager_5.0.2\other\..\projects\SystemUI.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:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Jon\AppData\Local\Temp\APKTOOL5747871947045013646.tmp, -I, C:\Users\Jon\apktool\framework\1.apk, -S, C:\Users\Jon\Desktop\Theming\Apk_Manager_5.0.2\other\..\projects\SystemUI.apk\res, -M, C:\Users\Jon\Desktop\Theming\Apk_Manager_5.0.2\other\..\projects\SystemUI.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
From reading the log I would say I just have to decompile with dependencies (the twframework-res.apk if I'm not mistaken?) but that doesn't seem to work.
And if it makes a difference, when I install the frameworks they get installed to C:\Users\Jon\apktool\framework no matter what, whether I install them via apk manager or cmd, then again I might just be using the wrong command.
Basically the product .apk is 12.4 KBs when it should be around 300 KBs.
Any help is appreciated!
Decompile systemUI.apk using framework-res.apk as a dependency. Not twframework.
good day.
chopper the dog said:
Decompile systemUI.apk using framework-res.apk as a dependency. Not twframework.
good day.
Click to expand...
Click to collapse
That came up with the same error, log is exactly the same so I won't bother posting it.
EDIT:
When I try to use framework-res.apk as a dependency I get the error: "Sorry thats not the dependee apk, try again"
However if I use twframework it decompiles but I get the error when I compile it.
So your steps are.
1.add systemUI.apk to place here to be modded folder.
2.option 10 in the apk mgr script
3when prompted (simply drag the framework-res.apk from you framework folder in to the apk mgr script window)
4.enter
5.make edits to apk
6.option 11 to compile.
7.is this a system apk (Y)
8.Would you like to copy over any bla bla bla to reduce errors? (Y)
9.go to keep folder and delete resources.arc if you made any xml edits
10.go to drawable hdpi in keep folder and delete any images that you edited.
11. enter in script to continue/finish compiling.
good day.
---------- Post added at 04:45 PM ---------- Previous post was at 04:38 PM ----------
ok just saw your edited post. TBH I've used all those steps above to theme aosp. My only theming of touch wiz I did was eclair/froyo which did not include systemUI so it make sense with needing twframe.
good day.
chopper the dog said:
So your steps are.
1.add systemUI.apk to place here to be modded folder.
2.option 10 in the apk mgr script
3when prompted (simply drag the framework-res.apk from you framework folder in to the apk mgr script window)
4.enter
5.make edits to apk
6.option 11 to compile.
7.is this a system apk (Y)
8.Would you like to copy over any bla bla bla to reduce errors? (Y)
9.go to keep folder and delete resources.arc if you made any xml edits
10.go to drawable hdpi in keep folder and delete any images that you edited.
11. enter in script to continue/finish compiling.
good day.
Click to expand...
Click to collapse
That's exactly what I would do if I didn't get errors first.
The first error is when I drag over framework-res.apk "Sorry thats not the dependee apk, try again"
Now if i drag in the twframework-res.apk I can get to #6 in your guide and I get the error "An Error Occured, Please Check The Log"
Press any key to continue . . .
Then I proceed to steps #7, 8, 9,10,11.
Now I have an apk that is 269 KBs, compared to the stock SystemUI.apk which is 308 KBs.
One minute, going to push this to my phone and see what happens.
Okay that seems to have given me a fully intact SystemUI.apk.
I guess I was just getting paranoid with the smaller size and the error.
So instead of saying no to
Code:
8.Would you like to copy over any bla bla bla to reduce errors? (Y)
like I did with the other .apk files I said yes and that's what made it work.
Thank you!
Okay so that didn't work after all. Apparently that works fine if I don't change anything, but once I did my xml edits I had problems.
It seems the files I delete in the keep folder don't get compiled in resulting SystemUI.apk. This also explains why the file size is smaller.
Everything leads back to the error in the log but...I don't know what to do next...Here's a log following chopper's steps precisely aside from using twframework-res.apk instead of framework-res.apk.
Code:
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
I: Framework installed to: C:\Users\Jon\apktool\framework\2.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Jon\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
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...
C:\Users\Jon\Desktop\Theming\Apk_Manager_5.0.2\other\..\projects\SystemUI.apk\res\layout\status_bar_expanded.xml:12: error: Error: No resource found that matches the given name (at 'layout' with value '@touchwiz:layout/quick_panel_call').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Jon\AppData\Local\Temp\APKTOOL8422748642562834993.tmp, -I, C:\Users\Jon\apktool\framework\1.apk, -S, C:\Users\Jon\Desktop\Theming\Apk_Manager_5.0.2\other\..\projects\SystemUI.apk\res, -M, C:\Users\Jon\Desktop\Theming\Apk_Manager_5.0.2\other\..\projects\SystemUI.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:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Jon\AppData\Local\Temp\APKTOOL8422748642562834993.tmp, -I, C:\Users\Jon\apktool\framework\1.apk, -S, C:\Users\Jon\Desktop\Theming\Apk_Manager_5.0.2\other\..\projects\SystemUI.apk\res, -M, C:\Users\Jon\Desktop\Theming\Apk_Manager_5.0.2\other\..\projects\SystemUI.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
The system cannot find the file specified.
The directory is not empty.
EDIT: Downloaded the original version 4.9 and everything works swimmingly now.

[Q] Compile/Decompile using apktool or APK Multi Tool

Hi everyone,
I'm trying desperately to edit some files inside SystemUI.apk and framework-res.apk but I'm having some troubles...
I wanted to post in the specific thread of the program : http://forum.xda-developers.com/showthread.php?t=1310151 but I'm not allowed to, because it's my first post here.
First I used only apktool, I managed to decompile my 2 files with no problems, I replaced a few *.png files and tried to recompile it but I'm getting errors... (I only manage to recompile the files if I don't edit a thing)
Then I tried APK Multi Tool, I achieved to decompile my 2 files (with the option 9 in the program), but I can't recompile them after editing my files. So I decided to make a test, I tried to decompile and recompile (I hit 9 then 11 in the choice case) them WITHOUT changing a thing and I get errors anyway...
If I use the choice 1 (only extract the apk), do my editing and then zip the project (with the choice 3), directories are wrong inside the new *.apk, I get "projects\SystemUI.apk\(res or smali, etc...)" so the *.apk result is not usable
Here is the log file when I try to recompile WITHOUT changes :
Code:
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\David\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
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...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\David\AppData\Local\Temp\APKTOOL8476784424403325139.tmp, -I, C:\Users\David\apktool\framework\1.apk, -S, C:\Users\David\Downloads\APK Multi Tool\projects\SystemUI.apk\res, -M, C:\Users\David\Downloads\APK Multi Tool\projects\SystemUI.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\David\AppData\Local\Temp\APKTOOL8476784424403325139.tmp, -I, C:\Users\David\apktool\framework\1.apk, -S, C:\Users\David\Downloads\APK Multi Tool\projects\SystemUI.apk\res, -M, C:\Users\David\Downloads\APK Multi Tool\projects\SystemUI.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:87)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2, Le fichier spécifié est introuvable
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at brut.util.OS.exec(OS.java:78)
... 7 more
Caused by: java.io.IOException: CreateProcess error=2, Le fichier spécifié est introuvable
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
... 11 more
Thanks in advance if you can help me
I managed to recompile my edited files with apktool by placing classes.dex and resources.arsc in the folder oh the extracted archives.
I signed my SystemUI.apk and framework-res.apk with signapk.jar but my ROM still won't boot...
I'm getting the same error
I've emailed the dev. Will let you know if I get a response.
Can you try removing the spaces in the folder name ? "APK Multi Tool" ?
My Windows user name has spaces in it, I was just wondering if that could be an issue.
Just a hunch since spaces can sometimes cause problems.
Let me know if that works !
---------- Post added at 08:10 AM ---------- Previous post was at 07:46 AM ----------
Well ignore my previous post. I created a new user and tried to compile. Still getting the same error
Funny, i'm having the EXACT same thing happen to me.
I used to use linux and I know that when I was originally installing it(on linux) it wouldn't run without a file called "aapt". I had to download and insert the file with the others in a specific area.
Unfortunately I had to wipe linux and reinstall win7 for school purposes. So now here I am trying to test everything on windows, which is a blur to me since I haven't used it in so long.
In the error log we are getting, it's mentioning something about "aapt", and when I go searching for it in the APK-multi tool folders, it's nowhere to be found. This file may be what's causing the issue of de/recompiling.
EDIT: I figured it out, well kinda. I uninstalled version 1.0.2, and downloaded and installed version 1.0.0 of apk multi tool from his website. Tested again and this time everything went ok. there must be some sort of bug in the newest one.
Try this, it will work
Place apk in modding folder
Hit #1to extract apk
go to project folder and make your mods
now hit #3 to zip apk
then hit #1 to retain system signature for system files (system.ui, framework.res etc...)
go into modding folder and get the new unsigned apk and rename it to what it was before
place in sd card or use adb to push to where ever it needs to go
this works everytime for me, never had problems hope this helps
that works for editing images only...but I want to edit some .xml files, and when I extract I don't get them
thats where we need decompile/compile
Im getting this same issue..
I have the same issue every apk creates with a project/*.*.apk
Anyone fix it?
Ok so dropped back to version 1.0.1 and it works
when I hit option 3 in 1.0.1 I see
compressing res\
But in version 1.0.2 I see
compressing project\FILESNAME.apk\res\
Hope that helps
Test This
Do you Have instaled Android SDK Tools?
You Have Downloaded de Google Api 15 for Android SDK Tools or others Api for your version of Android?
Andersondj said:
Do you Have instaled Android SDK Tools?
You Have Downloaded de Google Api 15 for Android SDK Tools or others Api for your version of Android?
Click to expand...
Click to collapse
Andersondj, thanks for your reply.
Maybe it will solve my problem, coz i had installed API 14 (4.0) and now i`ll try install API 15.
Thanks bro, and see you on BrasilDroid.
Which version of Android are you on? Apktool doesn't work too well with ICS.
still no luck
Ticklefish said:
Which version of Android are you on? Apktool doesn't work too well with ICS.
Click to expand...
Click to collapse
i hv every method but still its not recompiling
Dygreg said:
Here is the log file when I try to recompile WITHOUT changes :
Code:
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\David\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
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...
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\David\AppData\Local\Temp\APKTOOL8476784424403325139.tmp, -I, C:\Users\David\apktool\framework\1.apk, -S, [B][COLOR="Red"]C:\Users\David\Downloads\APK Multi Tool\projects\SystemUI.apk\res[/COLOR], -M[/B], C:\Users\David\Downloads\APK Multi Tool\projects\SystemUI.apk\AndroidManifest.xml][/QUOTE]
See point 1, spaces in paths have given me issues before and spent ages trying everything before finally realizing it's how I'd named the folder. If that doesn't work, assuming you've installed all the necessary resource apks I'm not sure what to suggest. apktool never gave me issues [user=4315551]@Ticklefish[/user]?
[QUOTE="raziel23x, post: 18558251, member: 2968938"][B][COLOR=Red]Got problems ?[/COLOR][/B]
[B]1. [COLOR="Red"]Make sure your path has no spaces[/COLOR]
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.[/B]
[/QUOTE]
Click to expand...
Click to collapse
Guys, need your help!, while compiling an APK, what I get in the keep folder is the four files
1. Meta-inf
2. res
3. AndroidManifest
4. resources.arsc
what files do I need to remove before compiling?

[DEV QUESTION] Modify deskop number in Home.apk

Hi, I want modify the number of deskop on my Ray ...
In the Home.apk, this line in the R$integer.smali file :
".field public static final number_of_desktop_panes:I = 0x7f09000a"
But I don't understand this integer format ? and How can I modify this ?? (and it's possible ?)
Or another way to modify the number of desktop ??
Thanks for your dev answers !
u have to unpack Home.apk via APK tool, then find in res/values/integers.xml.
there u will see Number of desktop panes=5 , Modify to whichever number u like...
Then repack, re-sign, zipalign apk..
jjdoctor said:
u have to unpack Home.apk via APK tool, then find in res/values/integers.xml.
there u will see Number of desktop panes=5 , Modify to whichever number u like...
Then repack, re-sign, zipalign apk..
Click to expand...
Click to collapse
Thanks for your reply but I already unpack Home.apk (ics final version) with apktool and I don't have integers.xml !!
In the values folder, Only 4 xml files : array, colors, ids, styles ...
EDIT : Sorry jjdoctor I think I have a problem with my framework-res , because now when I try to unpack I have some warn ... and if I retry I don't have same file and my unpack directory ... SORRY
Ok I re-pull my framework-res and my SemcGenericUxpRes and retry the unpack ...
All fine, I have now the integers.xml ! thanks jjdoctor
please modify 3 desktop for me...
i try to decompile home.apk but error
thx
Have you unpack with : apktool if SemcGenericUxpRes.apk ??
Before your home.apk
I can give you my 3 desktop home.apk but I use this mod : http://forum.xda-developers.com/showthread.php?t=1534903 (ICS final) ,and the framework-res is modded !!
Sent from my ST18i using XDA
mickfo said:
Have you unpack with : apktool if SemcGenericUxpRes.apk ??
Before your home.apk
I can give you my 3 desktop home.apk but I use this mod : http://forum.xda-developers.com/showthread.php?t=1534903 (ICS final) ,and the framework-res is modded !!
Sent from my ST18i using XDA
Click to expand...
Click to collapse
no problem
i use this mod from hansip too
can't wait your 3 desktop home
thx
Here my home.apk with only 3 deskop...
I don't do a CWM update.zip but you can replace in /system/app your home.apk with my home.apk via es explorer (right rw-r-r)
Empty all your deskop before replace... and you must use this mod : http://forum.xda-developers.com/show....php?t=1534903 (ICS final)
Thank you very much...
It works... I use ROICS V5_Rev1
Thx for your help
Sent from my ST18i using XDA
mickfo said:
Ok I re-pull my framework-res and my SemcGenericUxpRes and retry the unpack ...
All fine, I have now the integers.xml ! thanks jjdoctor
Click to expand...
Click to collapse
could you please explain how to do this? i got same error here
I pull my framework-res.apk and my SemcGenericUxpRes.apk in /system/framework and my Home.apk in /system/app
I unpack with :
apktool if framework-res.apk
apktool if SemcGenericUxpRes.apk
And :
apktool d Home.apk
Mod you want
mickfo said:
I pull my framework-res.apk and my SemcGenericUxpRes.apk in /system/framework and my Home.apk in /system/app
I unpack with :
apktool if framework-res.apk
apktool if SemcGenericUxpRes.apk
And :
apktool d Home.apk
Mod you want
Click to expand...
Click to collapse
what's the different between "apktool if" and "apktool d". are you using the tool from here http://apkmultitool.com ?
---------- Post added at 06:43 AM ---------- Previous post was at 06:26 AM ----------
hafatih27 said:
what's the different between "apktool if" and "apktool d". are you using the tool from here http://apkmultitool.com ?
Click to expand...
Click to collapse
ok i got the tool and already got it installed. but as newbie, i wanna ask where to place those apk files for decompiling?
---------- Post added at 06:56 AM ---------- Previous post was at 06:43 AM ----------
ok guys, finally i did it!
(just point the direction using cd command in cmd before apktool, am i right?)
i succeeded installing framework and semc, also succeeded decompile home.apk. but i failed compiling it. the terminal said there were errors but i dont recognize it. even if i compile directly after decompiling without editing any file. please help
Code:
H:\apps\android\apktool>apktool if framework-res.apk
I: Framework installed to: C:\Users\haf.001\apktool\framework\1.apk
H:\apps\android\apktool>apktool if SemcGenericUxpRes.apk
I: Framework installed to: C:\Users\haf.001\apktool\framework\2.apk
H:\apps\android\apktool>apktool d Home.apk
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\haf.001\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\haf.001\apktool\framework\2.apk
I: Loaded.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
H:\apps\android\apktool>cd Home
H:\apps\android\apktool\Home>apktool b
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
H:\apps\android\apktool\Home\.\res\values\styles.xml:4: error: Error retrieving
parent for item: No resource found that matches the given name 'Layout'.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\haf.001\AppData\Local\Temp
\APKTOOL3404838517631333886.tmp, -I, C:\Users\haf.001\apktool\framework\1.apk, -
I, C:\Users\haf.001\apktool\framework\2.apk, -S, H:\apps\android\apktool\Home\.\
res, -M, H:\apps\android\apktool\Home\.\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\haf.001\AppData\Local\Temp\APKTOOL3404838517631333886.tmp, -I, C:\Users\haf
.001\apktool\framework\1.apk, -I, C:\Users\haf.001\apktool\framework\2.apk, -S,
H:\apps\android\apktool\Home\.\res, -M, H:\apps\android\apktool\Home\.\AndroidMa
nifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
The error is "BrutException: could not exec command: [aapt, p, ..."
Your PATH variable is correct?? have you add in your PATH : H:\apps\android\apktool\ ??
mickfo said:
The error is "BrutException: could not exec command: [aapt, p, ..."
Your PATH variable is correct?? have you add in your PATH : H:\apps\android\apktool\ ??
Click to expand...
Click to collapse
still the same...
Code:
C:\Users\haf.001\apktool>apktool if framework-res.apk
I: Framework installed to: C:\Users\haf.001\apktool\framework\1.apk
C:\Users\haf.001\apktool>apktool if SemcGenericUxpRes.apk
I: Framework installed to: C:\Users\haf.001\apktool\framework\2.apk
C:\Users\haf.001\apktool>apktool d Home.apk
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\haf.001\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\haf.001\apktool\framework\2.apk
I: Loaded.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\Users\haf.001\apktool>apktool b C:\Users\haf.001\apktool\Home
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\Users\haf.001\apktool\Home\res\values\styles.xml:4: error: Error retrieving p
arent for item: No resource found that matches the given name 'Layout'.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\haf.001\AppData\Local\Temp
\APKTOOL4121807731103563189.tmp, -I, C:\Users\haf.001\apktool\framework\1.apk, -
I, C:\Users\haf.001\apktool\framework\2.apk, -S, C:\Users\haf.001\apktool\Home\r
es, -M, C:\Users\haf.001\apktool\Home\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\haf.001\AppData\Local\Temp\APKTOOL4121807731103563189.tmp, -I, C:\Users\haf
.001\apktool\framework\1.apk, -I, C:\Users\haf.001\apktool\framework\2.apk, -S,
C:\Users\haf.001\apktool\Home\res, -M, C:\Users\haf.001\apktool\Home\AndroidMani
fest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Under linux, I use the last version of apktools, and I've replaced the aapt binary (in the apktools dir) with the last aapt of android-sdk (in platforms-tools)
Sent from my ST18i using XDA
hafatih27 said:
i succeeded installing framework and semc, also succeeded decompile home.apk. but i failed compiling it. the terminal said there were errors but i dont recognize it. even if i compile directly after decompiling without editing any file. please help
Code:
H:\apps\android\apktool>apktool if framework-res.apk
I: Framework installed to: C:\Users\haf.001\apktool\framework\1.apk
H:\apps\android\apktool>apktool if SemcGenericUxpRes.apk
I: Framework installed to: C:\Users\haf.001\apktool\framework\2.apk
H:\apps\android\apktool>apktool d Home.apk
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\haf.001\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\haf.001\apktool\framework\2.apk
I: Loaded.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
H:\apps\android\apktool>cd Home
H:\apps\android\apktool\Home>apktool b
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
[B]H:\apps\android\apktool\Home\.\res\values\styles.xml:4: error: Error retrieving
parent for item: No resource found that matches the given name 'Layout'.[/B]
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\haf.001\AppData\Local\Temp
\APKTOOL3404838517631333886.tmp, -I, C:\Users\haf.001\apktool\framework\1.apk, -
I, C:\Users\haf.001\apktool\framework\2.apk, -S, H:\apps\android\apktool\Home\.\
res, -M, H:\apps\android\apktool\Home\.\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\haf.001\AppData\Local\Temp\APKTOOL3404838517631333886.tmp, -I, C:\Users\haf
.001\apktool\framework\1.apk, -I, C:\Users\haf.001\apktool\framework\2.apk, -S,
H:\apps\android\apktool\Home\.\res, -M, H:\apps\android\apktool\Home\.\AndroidMa
nifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Click to expand...
Click to collapse
It clearly states the error that when u open styles.xml there is something that u added or modified in 4th line(styles.xml:4: ) that has no resources added in public.xml and strings.xml..
Dont add new things or dont rename anything in xmls coz then u have to change it in public.xml and strings.xml and if its linked to more xmls..
For newbies, u should only change values like numbers in dimens.xml and integers.xml.. dont rename files..
H:\apps\android\apktool\Home\.\res\values\styles.xml:4: error: Error retrieving
parent for item: No resource found that matches the given name 'Layout'.
Click to expand...
Click to collapse
U just added a line in styles.xml but didnt add its value in strings.xml and public.xml...
mickfo said:
Under linux, I use the last version of apktools, and I've replaced the aapt binary (in the apktools dir) with the last aapt of android-sdk (in platforms-tools)
Sent from my ST18i using XDA
Click to expand...
Click to collapse
then i try the same (copying aapt.exe from platform-tools) in windows but still no effect. maybe i'll try using linux. could you attach the aapt for linux here? (i dont plan to install sdk on linux)
---------- Post added at 05:03 AM ---------- Previous post was at 04:51 AM ----------
jjdoctor said:
It clearly states the error that when u open styles.xml there is something that u added or modified in 4th line(styles.xml:4: ) that has no resources added in public.xml and strings.xml..
Dont add new things or dont rename anything in xmls coz then u have to change it in public.xml and strings.xml and if its linked to more xmls..
For newbies, u should only change values like numbers in dimens.xml and integers.xml.. dont rename files..
U just added a line in styles.xml but didnt add its value in strings.xml and public.xml...
Click to expand...
Click to collapse
sorry doctor, but i dont think so. i really just decompiled Home.apk (installing framework before ofcourse) and directly recompiled it again without even open Home folder to see integer.xml and friends.
i've tried in myfriend's pc (also windows) and the screen also told me the same error. but when i tried to modify another app, it just finished like a charm.
mickfo said:
Here my home.apk with only 3 deskop...
I don't do a CWM update.zip but you can replace in /system/app your home.apk with my home.apk via es explorer (right rw-r-r)
Empty all your deskop before replace... and you must use this mod : http://forum.xda-developers.com/show....php?t=1534903 (ICS final)
Click to expand...
Click to collapse
Great work... I have one simple request. There is litlle bug wit this mod because we can't add , for example photo/gallery widget because it is active on 4th desktop... 4th and 5th desktop are now hidden and you can swipe to them as they are active but hidden. Just suggestion to completeley remove them if it is possible of course

Problems with de/compiling sysui apk - center clock wanted

hi,
I decompiled systemui.apk without any problem, edited the tw_status_bar.xml (for center clock) and compiled the file and the no translation files found problem appeared.
The compiled apk has about 500kb less than the original one. After signing the file, the new compiled file has 100kb more.. so it is 1400 (new) to 1800kb (original)..
Flashing the new file brought a blank black screen.
So I took the new compiled tw_status_bar.xml and replaced it with the one in the old original systemui.apk. Maybe this works fine. But: No, it did not. Also blank screen..
I have installed the framework-res.apk and the tw-framework-res.apk.
Could someone help me please?
We need this for a theme.
Best Regards
You must have done something wrong when compiling
What tool u are using
And what steps u did?
Sent from my GT-I9100 using xda app-developers app
I used apktool.
-> java -jar apktool.jar if framework-res.apk (and tw-framework)
-> java -jar apktool.jar d systemui.apk
-> edit
-> java -jar apktool.jar b SystemUI
Did it with the several apktool.jar files. (151, akptool-for-3.2, ... lot of files)
My SystemUI.apk was befor decompiling 1,92MB after 1,79MB. I work with wanam ics apk manager and everything works fine. I dont sing apk.
No need to sign system apks if you did so.
Try taking META-INF folder and AndroidManifest.xml from old (the working one) apk, and place it in your modified apk (use winrar or something, dont decompile).
Thank you guys,
we will give it a try now and hope that it does its job fine.
I use wanam now
Some ROMs have settings for that. There you can set the clock to center. Maybe I should look how they did this.. So we can give to the users the posibillity to change the clocks position.. Like PA did.. Or is this too much work? Deodex and editing the systemui.apk and compile it? Or are there any other files to edit for this? Maybe someone knows this?
Gesendet von meinem Galaxy Nexus mit Tapatalk 2
Hi,
I want to center the clock in my status bar on XXLSC JB (ThaiDai)
I decompile SystemUI.apk with apktool without problem.
I change the file tw_status_bar.xml.
I can not recompile SystemUI.
(I installed jre-7u2-windows-x64)
My procedure:
- apktool if framework-res.apk (and tw-framework)
- apktool d systemui.apk
- (edit xml file)
- apktool b SystemUI
But the compilation is full of errors:
Code:
C:\apktool1.5.0>[B]apktool if framework-res.apk[/B]
I: Framework installed to: C:\Users\Fred\apktool\framework\1.apk
C:\apktool1.5.0>[B]apktool d SystemUI.apk[/B]
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Fred\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
C:\apktool1.5.0>[B]apktool b SystemUI[/B]
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/drawable-sw360dp-hdpi
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/drawable-sw360dp-xhdpi
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/drawable-sw600dp
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/drawable-sw600dp-xhdpi
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/drawable-sw720dp-xhdpi
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/drawable-sw800dp-xhdpi
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/layout-sw600dp
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/layout-sw720dp
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/layout-sw800dp
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/values-sw320dp
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/values-sw360dp
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/values-sw600dp
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/values-sw600dp-land
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/values-sw600dp-port
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/values-sw720dp
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/values-sw720dp-port
invalid resource directory name: C:\apktool1.5.0\SystemUI\res/values-sw800dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-version, 16, -F, C:\Users\Fred\AppData\Local\Temp\APKTOOL981547692988867223.tmp, -I, C:\Users\Fred\apktool\framework\1.apk, -S, C:\apktool1.5.0\SystemUI\res, -M, C:\apktool1.5.0\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, 16, --target-sdk-version, 16, -F, C:\Users\Fred\AppData\Local\Temp\AP
KTOOL981547692988867223.tmp, -I, C:\Users\Fred\apktool\framework\1.apk, -S, C:\a
pktool1.5.0\SystemUI\res, -M, C:\apktool1.5.0\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:253)
... 6 more
I forgot something ? I'm lost...
What is the exact and complete procedure ?
Can you help me please ?
Hi,
I got help from user here.
I give you his tips now
You decompiled the sysui without any error, right? Then you edited your tw_status_bar xml and compiled all with the error apeared, as you wrote.
If you have luck, your tw_statusbar is correctly compiled now. Ignore the error.
So you have to transfer the compiled statusbar xml and the resources file to the ORIGINAL systemui.apk.
I dont have this brut error anymore but i hope this will help you.
We got the clock centered with this method.
I wish you a good result
Best regards
PS: please install also tw_framework-res with apktool like you did with framework-res.apk.. This could solve your problem.
Gesendet von meinem Galaxy Nexus mit Tapatalk 2
Thank you for the speed
I did not do twframework-res.apk, I try.
The result with the above error is only classes.dex, nothing else ...
EDIT : always the same error with framework-res.apk + twframework-res.apk
And the same result (classes.dex)
Then delete the classes.dex and try again? I read anywhere that this could work.
Gesendet von meinem Galaxy Nexus mit Tapatalk 2
Hi,
there is not in the file "classes.dex" in the file "SystemUI" Original
Up
Please try please help me, I would just center the clock in the status bar of the Rom ThaiDai LSC
AW: Problems with de/compiling sysui apk - center clock wanted
Download apktool 1.50 and install the framework-res.apk and the tw-framework-res.apk with it (using java -jar apktool.jar if framework-res.apk).
After doing this you are able now to decompile the framework apk and or the systemui.apk. I believe sysui was the file.
Then you can edit the tw_status_bar.xml. Search a correct layout (other centerclock projects) and copy / paste the lines you need.
So I did it.. Compiled the new files with apktool again and copied the new files from build directory into the old apk (the systemui.apk from phone).
Reboot and be happy..
Gesendet von meinem Galaxy Nexus mit Tapatalk 2

Problems decompiling/compiling settings.apk in KitKat mediatek mt6592

Hi all!
I was trying to make some changes in Settings.apk from my Elephone P8, a mt6592 device with kitkat (4.4.2), when I had a problem: it's impossible to decompile/recompile this apk!!
Here, you can see a log of simple decompile-compile action, with no changes in any file
Code:
[[email protected] ~]$ cd apktool/
[[email protected] apktool]$ ./apktool if framework-res.apk
I: Framework installed to: /home/javi/apktool/framework/1.apk
[[email protected] apktool]$ ./apktool if SystemUI.apk
I: Framework installed to: /home/javi/apktool/framework/127.apk
[[email protected] apktool]$ ./apktool d Settings.apk
I: Using Apktool 2.0.0-RC2 on Settings.apk
I: Loading resource table...
W: Skipping "android" package group
I: Loading resource table...
W: Skipping "android" package group
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/javi/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
[[email protected] apktool]$ ./apktool b Settings.apk
I: Using Apktool 2.0.0-RC2 on Settings.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:247)
at brut.androlib.Androlib.build(Androlib.java:266)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:243)
... 4 more
[[email protected] apktool]$
What i've tried:
- Installing dependencies from: mediatek-res.apk, Systemui.apk, Settings.apk, ext.jar, etc... nothing worked ;/
- Using another tools as apk multitool, advanced apk tool, etc... not working also
- Copying original resources.asrc and classes.dex from original Settings.apk to Settings folder after decompiled. This compile Settings apk, but no encoded, so it's unuseful
- Ussing differente enviroments: BBQ linux, Ubuntu, Windows 8.1... Not working in any of them
I'v tried to do the same with another mt6952 device, the BQ Aquaris E5 FHD with similar results... so it's a mediatek kitkat common problem.
Can you help me, guys????? Any idea what can I try next??
johnnybra said:
Hi all!
I was trying to make some changes in Settings.apk from my Elephone P8, a mt6592 device with kitkat (4.4.2), when I had a problem: it's impossible to decompile/recompile this apk!!
Here, you can see a log of simple decompile-compile action, with no changes in any file
Code:
[[email protected] ~]$ cd apktool/
[[email protected] apktool]$ ./apktool if framework-res.apk
I: Framework installed to: /home/javi/apktool/framework/1.apk
[[email protected] apktool]$ ./apktool if SystemUI.apk
I: Framework installed to: /home/javi/apktool/framework/127.apk
[[email protected] apktool]$ ./apktool d Settings.apk
I: Using Apktool 2.0.0-RC2 on Settings.apk
I: Loading resource table...
W: Skipping "android" package group
I: Loading resource table...
W: Skipping "android" package group
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/javi/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
[[email protected] apktool]$ ./apktool b Settings.apk
I: Using Apktool 2.0.0-RC2 on Settings.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:247)
at brut.androlib.Androlib.build(Androlib.java:266)
at brut.androlib.Androlib.build(Androlib.java:258)
at brut.apktool.Main.cmdBuild(Main.java:240)
at brut.apktool.Main.main(Main.java:89)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:243)
... 4 more
[[email protected] apktool]$
What i've tried:
- Installing dependencies from: mediatek-res.apk, Systemui.apk, Settings.apk, ext.jar, etc... nothing worked ;/
- Using another tools as apk multitool, advanced apk tool, etc... not working also
- Copying original resources.asrc and classes.dex from original Settings.apk to Settings folder after decompiled. This compile Settings apk, but no encoded, so it's unuseful
- Ussing differente enviroments: BBQ linux, Ubuntu, Windows 8.1... Not working in any of them
I'v tried to do the same with another mt6952 device, the BQ Aquaris E5 FHD with similar results... so it's a mediatek kitkat common problem.
Can you help me, guys????? Any idea what can I try next??
Click to expand...
Click to collapse
Well see that's the issue. As they seldom use official software. You will have to make sure to only use the framework from you device. Make sure to install them all. Also make sure the rom is deodex or you won't be able to decompile anything.
Thank you.
All files are from the same device (elephone p8), extracted and deodexed by me and working well in a ROM.
UPDATE: I succesfullly recompiled settings.apk!!! I installed mediatek-res.apk, but apktool.yml did not use it, so I edited the file including it and ... voilá!
Thank you, friend, without your words it couldn't be possible
johnnybra said:
Thank you.
All files are from the same device (elephone p8), extracted and deodexed by me and working well in a ROM.
UPDATE: I succesfullly recompiled settings.apk!!! I installed mediatek-res.apk, but apktool.yml did not use it, so I edited the file including it and ... voilá!
Thank you, friend, without your words it couldn't be possible
Click to expand...
Click to collapse
Explain exactly how you did it?
marsapa said:
Explain exactly how you did it?
Click to expand...
Click to collapse
Hi, friend. Glad to see you here Your Roms are awesome.
You must decompile settings.apk installing framework-res.apk and mediatek-res.apk first.
Then, before recompiling, you must open apktool.yml and you'll see a line that point to used dependences. Something like "- 1". Simply add after this one a new line with "- 2" if you installed dependences using default mode. Then save the changes and compile in normal way.
johnnybra said:
Hi, friend. Glad to see you here Your Roms are awesome.
You must decompile settings.apk installing framework-res.apk and mediatek-res.apk first.
Then, before recompiling, you must open apktool.yml and you'll see a line that point to used dependences. Something like "- 1". Simply add after this one a new line with "- 2" if you installed dependences using default mode. Then save the changes and compile in normal way.
Click to expand...
Click to collapse
I'm sorry I did not understand, unfortunately I'm arguing with the framework-res.apk of 6595, I published the change that you made so I try the new soc?
marsapa said:
I'm sorry I did not understand, unfortunately I'm arguing with the framework-res.apk of 6595, I published the change that you made so I try the new soc?
Click to expand...
Click to collapse
I'm sorry, I'm with Tapatalk. This afternoon I'll post some screenshots of what I'm saying, OK?
marsapa said:
I'm sorry I did not understand, unfortunately I'm arguing with the framework-res.apk of 6595, I published the change that you made so I try the new soc?
Click to expand...
Click to collapse
ok i have solve, thaks
marsapa said:
ok i have solve, thaks
Click to expand...
Click to collapse
With the soc mediatek 6595 I have a problem installing, decompile and compile the framework-res.apk with apktool v2.0.0RC3 I can not even decompile the framework and have this error: Log For : framework-res.apk
Log Type : Decompiling
Log Recorded At : 09 2014-12- 10:03:34,86
Log Recorded By : Advanced ApkTool v4.1.0 By BDFreak
------------------------------------------------------
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x010e0045 integer/config_mobile_mtu, config=-mcc460
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:63)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:186)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:157)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:125)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:100)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:606)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:75)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:67)
at brut.androlib.Androlib.getResTable(Androlib.java:61)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:206)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:92)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
while with earlier versions it, but still not what recompile is the log: .
For the rest mediatek.res.apk installing and making the change to apktool.ylm decompilo and recompile all files including settings.apk
Tips?
marsapa said:
With the soc mediatek 6595 I have a problem installing, decompile and compile the framework-res.apk with apktool v2.0.0RC3 I can not even decompile the framework and have this error: Log For : framework-res.apk
Log Type : Decompiling
Log Recorded At : 09 2014-12- 10:03:34,86
Log Recorded By : Advanced ApkTool v4.1.0 By BDFreak
------------------------------------------------------
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x010e0045 integer/config_mobile_mtu, config=-mcc460
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:63)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:56)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:186)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:157)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:125)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:100)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:606)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:75)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:67)
at brut.androlib.Androlib.getResTable(Androlib.java:61)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:206)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:92)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
while with earlier versions it, but still not what recompile is the log: .
For the rest mediatek.res.apk installing and making the change to apktool.ylm decompilo and recompile all files including settings.apk
Tips?
Click to expand...
Click to collapse
Are you trying to decompiling for meizu mx4??? I'll tried it too, but I couldn't find the way to install framework as dependence. Same error as yours.
That's because they use files that differ from stock Android that apk tool is not set to use and the apktool dev already stated he will not add support for it.

Categories

Resources