[Q] Need help to recompile apk with apktool - Optimus One, P500, V General

Hi all when i tried to recompile apk with the apktool with this line: apktool b <file>, it comes out with this error.
L:\Users\YJ\Downloads\apktool\MiuiMusic\res\values \strings.xml:199: error: Apost
rophe not preceded by \ (in There's a new version available, please update)
L:\Users\YJ\Downloads\apktool\MiuiMusic\res\values \public.xml:587: error: Public
symbol string/upgrade_detail declared here is not defined.
L:\Users\YJ\Downloads\apktool\MiuiMusic\res\values \public.xml:688: error: Public
entry identifier 0x7f090129 entry index is larger than available symbols (index
297, total symbols 297).
L:\Users\YJ\Downloads\apktool\MiuiMusic\res\values \public.xml:688: error: Public
symbol string/url_debug_update declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, L:\Users\YJ\AppData\Local\Temp\APKT
OOL1164060080391540263.tmp, -I, L:\Users\YJ\apktool\framework\1.apk, -S, L:\User
s\YJ\Downloads\apktool\MiuiMusic\res, -M, L:\Users\YJ\Downloads\apktool\MiuiMusi
c\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib .java:301)
at brut.androlib.Androlib.buildResources(Androlib.jav a: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, L:\U
sers\YJ\AppData\Local\Temp\APKTOOL1164060080391540 263.tmp, -I, L:\Users\YJ\apkto
ol\framework\1.apk, -S, L:\Users\YJ\Downloads\apktool\MiuiMusic\res, -M, L:\User
s\YJ\Downloads\apktool\MiuiMusic\AndroidManifest.x ml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(An drolibResources.jav
a:191)
... 6 more
Anybody can give me help?
Using windows 7 to compile.

I am just assuming you didn't decompile using apktool, and using it only to recompile. And use latest apktool.
Sent from my LG-P500 using XDA Premium App

4silvertooth said:
I am just assuming you didn't decompile using apktool, and using it only to recompile. And use latest apktool.
Sent from my LG-P500 using XDA Premium App
Click to expand...
Click to collapse
omg thanks for replying. But the thing is that i'm using v1.4.1 of apktool. I did decompile. After decompiling, i edited the strings.xml file, and then recompiled

kongyujian said:
omg thanks for replying. But the thing is that i'm using v1.4.1 of apktool. I did decompile. After decompiling, i edited the strings.xml file, and then recompiled
Click to expand...
Click to collapse
You have not installed the apk tool correctly. Read the wiki on apktool site.
aapt path has to be set.
Sent from my LG-P500 using XDA Premium App

Oh i resolved it! =) Thanks for helping though!
The problem is that in the .xml file, i'm supposed to put a backslash before an apostrophe. E.g. Proxy's must be written as Proxy\'s
Thanks for helping! =) Hope to have helped others. =)

Ok nice.
Sent from my LG-P500 using XDA Premium App

kongyujian said:
Oh i resolved it! =) Thanks for helping though!
The problem is that in the .xml file, i'm supposed to put a backslash before an apostrophe. E.g. Proxy's must be written as Proxy\'s
Thanks for helping! =) Hope to have helped others. =)
Click to expand...
Click to collapse
So is the miui music app gonna be done soon?
Sent using LGE Xda Secret phone

Trying to learn how to sign the apk. =( no luck so far. Haha. probably tonight or tmr night. :\ i got an output apk file already. The only thing is it cannot install.

kongyujian said:
Trying to learn how to sign the apk. =( no luck so far. Haha. probably tonight or tmr night. :\ i got an output apk file already. The only thing is it cannot install.
Click to expand...
Click to collapse
Wad? I tht miui music u have to push system/app... It will not work by jus installing... Btw can u attach so i can test it...
Sent using LGE Xda Secret phone

Related

[Q] recompile framework-res.apk from cm9-20120404

Is it possible to recompile the framework-res.apk from cm9-20120404??
tried apktool 1.4.1 & 1.4.2 with newest aapt.exe
and AutoAPKtool 2.0.3 still lots of error........
anyone can help?
Use the apk tool designed for ics . It didn't gave me errors on decompiling, not tried the version you mentioned though
#*posted on the move *#
bala_gamer said:
Use the apk tool designed for ics . It didn't gave me errors on decompiling, not tried the version you mentioned though
#*posted on the move *#
Click to expand...
Click to collapse
I tried this ICS apktool, but still got errors with 'plurals.xml'
http://forum.xda-developers.com/showthread.php?t=1558171
ron194 said:
I tried this ICS apktool, but still got errors with 'plurals.xml'
http://forum.xda-developers.com/showthread.php?t=1558171
Click to expand...
Click to collapse
use "AutoAPKTool2.0.0" and just tried decompiling the same and didnt got any errors. dont forget to install the framework b4 decompiling.
bala_gamer said:
use "AutoAPKTool2.0.0" and just tried decompiling the same and didnt got any errors. dont forget to install the framework b4 decompiling.
Click to expand...
Click to collapse
still not work......
Code:
[*] C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res
recompiling C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res...
W: Could not find sources
I: Building resources...
invalid resource directory name: C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res/animator
invalid resource directory name: C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res/interpolator
invalid resource directory name: C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res/mipmap-hdpi
invalid resource directory name: C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res/mipmap-ldpi
invalid resource directory name: C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res/mipmap-mdpi
invalid resource directory name: C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res/mipmap-xhdpi
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Ron\AppData\Local\Temp\APKTOOL8300429255981799689.tmp, -x, -S, C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res, -M, C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\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\Ron\AppData\Local\Temp\APKTOOL8300429255981799689.tmp, -x, -S, C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\res, -M, C:\AutoAPKTool2.0.0\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
ron194 said:
still not work......
Click to expand...
Click to collapse
you are right, giving errors on recompiling. what mod are you doing anyway?
bala_gamer said:
you are right, giving errors on recompiling. what mod are you doing anyway?
Click to expand...
Click to collapse
thx for ur help! I hv just replaced the ICS "aapt.exe" to the AutoAPKTool 2.0.0, and it works now!
I just want to mod the navigation bar, but cant recompile the framework-res even without any mod before.......

apktool won't build unchanged SystemUI

Can anyone help a noob figure out why?
Code:
[email protected]:~$ apktool b '/home/linux/SystemUI'
I: Checkingwhether sources has changed...
I: Checkingwhether resources has changed...
I: Building resources...
invalid resource directory name: /home/linux/SystemUI/res/values-sw720dp
invalid resource directory name: /home/linux/SystemUI/res/layout-sw600dp
invalid resource directory name: /home/linux/SystemUI/res/values-sw720dp-port invalid resource directory name: /home/linux/SystemUI/res/drawable-sw600dp-mdpi
invalid resource directory name: /home/linux/SystemUI/res/values-sw600dp
invalid resource directory name: /home/linux/SystemUI/res/values-sw600dp-port Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL8165751601391013391.tmp, -I, /home/linux/apktool/framework/1.apk, -S'
/home/linux/SystemUI/res, -M, /home/linux/SystemUI/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL8165751601391013391.tmp, -I, /home/linux/apktool/framework/1.apk, -S, /home/linux/SystemUI/res, -M, /home/linux/SystemUI/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
I decompiled SystemUI.apk with no problem but when I went to rebuild, I got this error. I want to make sure I know how to rebuild an unchanged directory before I start making any kind of changes and go crazy trying to figure out what the problem is.
Sent from my Amazon Kindle Fire using xda premium
What android version?
Sorry...
4.0.3
CM9
Ubuntu 10.4
Sent from my Amazon Kindle Fire using xda premium
OK, same problem, new error...
Changed <app_path>
Code:
[email protected]:~$ apktool b SystemUI
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.DirectoryException: java.util.zip.ZipException: error in opening zip file
at brut.androlib.Androlib.readMetaFile(Androlib.java:142)
at brut.androlib.Androlib.build(Androlib.java:159)
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.directory.DirectoryException: java.util.zip.ZipException: error in opening zip file
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)
at brut.androlib.res.util.ExtFile.getDirectory(ExtFile.java:55)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:127)
at java.util.zip.ZipFile.<init>(ZipFile.java:144)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)
... 7 more
I'm at a loss
Sent from my Amazon Kindle Fire using xda premium
soupmagnet said:
Can anyone help a noob figure out why?
Code:
[email protected]:~$ apktool b '/home/linux/SystemUI'
I: Checkingwhether sources has changed...
I: Checkingwhether resources has changed...
I: Building resources...
invalid resource directory name: /home/linux/SystemUI/res/values-sw720dp
invalid resource directory name: /home/linux/SystemUI/res/layout-sw600dp
invalid resource directory name: /home/linux/SystemUI/res/values-sw720dp-port invalid resource directory name: /home/linux/SystemUI/res/drawable-sw600dp-mdpi
invalid resource directory name: /home/linux/SystemUI/res/values-sw600dp
invalid resource directory name: /home/linux/SystemUI/res/values-sw600dp-port Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL8165751601391013391.tmp, -I, /home/linux/apktool/framework/1.apk, -S'
/home/linux/SystemUI/res, -M, /home/linux/SystemUI/AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, /tmp/APKTOOL8165751601391013391.tmp, -I, /home/linux/apktool/framework/1.apk, -S, /home/linux/SystemUI/res, -M, /home/linux/SystemUI/AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
I decompiled SystemUI.apk with no problem but when I went to rebuild, I got this error. I want to make sure I know how to rebuild an unchanged directory before I start making any kind of changes and go crazy trying to figure out what the problem is.
Sent from my Amazon Kindle Fire using xda premium
Click to expand...
Click to collapse
Try this, hope I can help you
apktool d -s SystemUI.apk
-s, --no-src
Do not decode sources.
apktool b SystemUI
hey guys, just found this thread on a google search for this error ..
i have the same problem with CM9 Beta8 for Galaxy Ace ... pulled the framework-res.apk and SystemUI.apk via adb and installed framework-res.apk via apktool if framework-res.apk ...
i modded a lot of things in Adrenaline ROM before and everything was ok ... now, on android 4.0.4 (CM9) i get this error when ever i try to compile the apk ... tried it with a fresh project and without modding anything and it gives the same error ...
anyone have an idea ??? maybe apktool can't handle ICS-apks ???
DJ_Synergy said:
hey guys, just found this thread on a google search for this error ..
i have the same problem with CM9 Beta8 for Galaxy Ace ... pulled the framework-res.apk and SystemUI.apk via adb and installed framework-res.apk via apktool if framework-res.apk ...
i modded a lot of things in Adrenaline ROM before and everything was ok ... now, on android 4.0.4 (CM9) i get this error when ever i try to compile the apk ... tried it with a fresh project and without modding anything and it gives the same error ...
anyone have an idea ??? maybe apktool can't handle ICS-apks ???
Click to expand...
Click to collapse
This should help you
http://forum.xda-developers.com/showpost.php?p=24893563&postcount=1
pwelyn said:
Try this, hope I can help you
apktool d -s SystemUI.apk
-s, --no-src
Do not decode sources.
apktool b SystemUI
Click to expand...
Click to collapse
hello
guys i dont know but i am trying to recompile apks from 10 day tried ever fix every fix thread. i usaly get the first op problem can anyone confirm it that this method work
For ICS you need to use 2 different apktool jar files. One to decompile and another to recompile. Also you need to install system UI framework files like you do normale framework files. With apktool if systemui.apk command. And some files still can't be edited unless you edit the source file from scratch
zelendel said:
For ICS you need to use 2 different apktool jar files. One to decompile and another to recompile. Also you need to install system UI framework files like you do normale framework files. With apktool if systemui.apk command. And some files still can't be edited unless you edit the source file from scratch
Click to expand...
Click to collapse
Man I think I was looking for this in past 2 weeks I looked into all the apktool related threads and this is the simplest answer I have seen and straight forward
I will try it today thanks man
Sent from my HTC Glacier using xda premium
I'm getting the same errors. Tried everything. Got to be doing something wrong.
Sent from my HTC Sensation 4G using Tapatalk 2
Rainbowbright081 said:
I'm getting the same errors. Tried everything. Got to be doing something wrong.
Sent from my HTC Sensation 4G using Tapatalk 2
Click to expand...
Click to collapse
Yeah you didn't read my post 2 posts above this. You have to use a different apktool version to compile an ICS systemui apk
Sent from my Inspire 4G using Tapatalk 2
Sir, I did. Tried decompile with 1.4.2 compile with 1.4.3. Tried a lot of things, will try ferns way this evening. And yours again.
Edit: I hadnt installed systemui into framework, will try that and -s tag as well. Why does theming have to change in the way we deal with each rom. Lol.
Sent from my HTC Sensation 4G using Tapatalk 2
Rainbowbright081 said:
Sir, I did. Tried decompile with 1.4.2 compile with 1.4.3. Tried a lot of things, will try ferns way this evening. And yours again.
Edit: I hadnt installed systemui into framework, will try that and -s tag as well. Why does theming have to change in the way we deal with each rom. Lol.
Sent from my HTC Sensation 4G using Tapatalk 2
Click to expand...
Click to collapse
Because each rom has different framework changes. Lol and each OS update you need to reinstall the framework files as well
Sent from my Inspire 4G using Tapatalk 2
wrong version of apktool and/or aapt.
Sent from my Nokia 2100 using xda premium
thetrisatria said:
wrong version of apktool and/or aapt.
Sent from my Nokia 2100 using xda premium
Click to expand...
Click to collapse
So which is the right version then? as I have tried with apktool 1.4.1 - 1.4.3 and am on the latest aapt version and still cannot get it to work
As in am having the same problem .I tried using almost all apktools and every version of apktool but problem exist
Can this be the windows problem?
But Even on Linux I get same errors.
I also tried decompiling by one apktool and recompiling by other . Nothing worked
Even used the method ( decompiling with -s ) suggested in one of the reply in this post
I am using windows 7 64 bit and Linux 11.04 64 bit
Sent from my HTC Glacier using xda premium
1.4.3 with latest ics aapt.
tested to de/compile miui v4.
oh, btw I'm using windows7 32bit.
try to get the apktool from here:
http://forum.xda-developers.com/showthread.php?p=25063042
Sent from my Nokia 2100 using xda premium
thetrisatria said:
1.4.3 with latest ics aapt.
tested to de/compile miui v4.
oh, I'm using windows7.
Sent from my Nokia 2100 using xda premium
Click to expand...
Click to collapse
I have tried new aapt its not working for me idk why
Sent from my HTC Glacier using xda premium
gsminhas said:
I have tried new aapt its not working for me idk why
Sent from my HTC Glacier using xda premium
Click to expand...
Click to collapse
lol, its works for me. the key is to find the proper apktool. try my link above.
Sent from my Nokia 2100 using xda premium

recompile sony ICS apk's with APKTOOL

i tried recompiling the Home.apk, in the same condition i decompiled it, but it gives an error,
i installed
SemcGenericUxpRes.apk and framework-res.apk and it succesfully decompiled.
also: i tried an older version of apktool , 1.4.1 which was succesfull with some samsung phones in other threads but no success with that either
i also tried copying the latest aapt from the sdk to the apktool installation, nothing.
so if anyone has had success recompiling sony ICS apks, then help..
gandhar said:
i tried recompiling the Home.apk, in the same condition i decompiled it, but it gives an error,
i installed
SemcGenericUxpRes.apk and framework-res.apk and it succesfully decompiled.
also: i tried an older version of apktool , 1.4.1 which was succesfull with some samsung phones in other threads but no success with that either
i also tried copying the latest aapt from the sdk to the apktool installation, nothing.
so if anyone has had success recompiling sony ICS apks, then help..
Click to expand...
Click to collapse
You should ask question in general section anyway...
Sent from my WT19i using XDA
What error you get?
Also, wrong section.
Someguyfromhell said:
What error you get?
Also, wrong section.
Click to expand...
Click to collapse
oh sorry for the wrong section, but i do not think someone in the general section would have answered this one..
this is exactly the error
C:\Users\gandhar\apktool>apktool d Home.apk Home
Destination directory (C:\Users\gandhar\apktool\Home) already exists. Use -f swi
tch if you want to overwrite it.
C:\Users\gandhar\apktool>apktool d Home.apk Home
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\gandhar\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\gandhar\apktool\framework\2.apk
I: Loaded.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\Users\gandhar\apktool>apktool b Home Home1.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\Users\gandhar\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\gandhar\AppData\Local\Temp
\APKTOOL762609809719293048.tmp, -I, C:\Users\gandhar\apktool\framework\1.apk, -I
, C:\Users\gandhar\apktool\framework\2.apk, -S, C:\Users\gandhar\apktool\Home\re
s, -M, C:\Users\gandhar\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\gandhar\AppData\Local\Temp\APKTOOL762609809719293048.tmp, -I, C:\Users\gand
har\apktool\framework\1.apk, -I, C:\Users\gandhar\apktool\framework\2.apk, -S, C
:\Users\gandhar\apktool\Home\res, -M, C:\Users\gandhar\apktool\Home\AndroidManif
est.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
C:\Users\gandhar\apktool>
i have the latest version of java
danist727 said:
You should ask question in general section anyway...
Sent from my WT19i using XDA
Click to expand...
Click to collapse
i thought ROM modders would have come across this error before, so, here..
edit:
@sumguyfromhell,
i have latest aapt from sdk, java jdk, jre
Seems like you have made a mistake while editing a .xml file, as it is unable to compile the file(xml files are compiled to a bit different language).
Someguyfromhell said:
Seems like you have made a mistake while editing a .xml file, as it is unable to compile the file(xml files are compiled to a bit different language).
Click to expand...
Click to collapse
i just did that, no editing done, i directly recompiled after the decompiling..
edit:
say i just want to change the values.xml, so is there a workaround maybe?
edit: i mean integers.xml
Hurray!!! i found something,
Just decompile apk, replace the string <style name="Layout.ButtonContainer" for <style name="Layout.ButtonContainer" parent="@android:style/Theme.Wallpaper.NoTitleBar"> at \res\values\styles.xml and compile...
it's from this thread,
http://forum.xda-developers.com/showthread.php?t=1276332
just recompiled, thank you guys
can someone close this thread?
gandhar said:
Hurray!!! i found something,
Just decompile apk, replace the string <style name="Layout.ButtonContainer" for <style name="Layout.ButtonContainer" parent="@android:style/Theme.Wallpaper.NoTitleBar"> at \res\values\styles.xml and compile...
it's from this thread,
http://forum.xda-developers.com/showthread.php?t=1276332
just recompiled, thank you guys
can someone close this thread?
Click to expand...
Click to collapse
i get dis error while recompiling.....
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\LaLa\AppData\Local\Temp\APKTOOL61323.tmp, -I, C:\Users\LaLa\apktool\framework\1.apk, -S, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\res, -M, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.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\LaLa\AppData\Local\Temp\APKTOOL61323.tmp, -I, C:\Users\LaLa\apktool\framework\1.apk, -S, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\res, -M, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
but i cant find layout in styles.xml!!!! Help..
whalesplaho said:
i get dis error while recompiling.....
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\LaLa\AppData\Local\Temp\APKTOOL61323.tmp, -I, C:\Users\LaLa\apktool\framework\1.apk, -S, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\res, -M, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.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\LaLa\AppData\Local\Temp\APKTOOL61323.tmp, -I, C:\Users\LaLa\apktool\framework\1.apk, -S, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\res, -M, C:\Users\LaLa\plaho\Android\flash.driverz\Apk_Manager_5.0.2\other\..\projects\TTPod_Android_release.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
but i cant find layout in styles.xml!!!! Help..
Click to expand...
Click to collapse
update your sdk to latest version, then copy aapt.exe from platform-tools to apktool directory, that was the fix i had found on the apktool bugtracker.
edit:you have to install frameworks again after replacing aapt
how about decompiling and recompiling framework-res.apk, settings.apk, systemui.apk, and other semc ics apks bro gandhar ??
iiandskater said:
how about decompiling and recompiling framework-res.apk, settings.apk, systemui.apk, and other semc ics apks bro gandhar ??
Click to expand...
Click to collapse
a lot of people including me are waiting for the next version of apktool just because of the errors that are met when recompiling ICS apks..
it does not accept some parts of a lot of xml files, so many need to be changed just to recompile the file, many files excluding the actual modifications we need to do..
well i am no expert at this, so i may be wrong, but my experience in trying to recompile leads me to conclude that i should wait for the next version
gandhar said:
a lot of people including me are waiting for the next version of apktool just because of the errors that are met when recompiling ICS apks..
it does not accept some parts of a lot of xml files, so many need to be changed just to recompile the file, many files excluding the actual modifications we need to do..
well i am no expert at this, so i may be wrong, but my experience in trying to recompile leads me to conclude that i should wait for the next version
Click to expand...
Click to collapse
i'm agree with you,
i've try many ways but its always end with no luck..
that's doesn't matter my bro,
i also hope for new version / way that will works perfectly,
thanks for ur answer..

[TUTORIAL FIX-/policy/impl ] XPERiA S iCS Lockscreen FOR YOUR FILES

XPERIA ICS LOCKSCREEN TUTORIAL ............. Aeon​
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
THIS IS ONLY FOR THEMERS AND MODERS​
If Someone needs to add xperia S lockscreen to your MODED files​
::::::::::::::::::::::::::::::::ANDROID.POLICY.JAR:::::::::::::::::::::::::::::::​
First:::: Download This ::::http://www.mediafire.com/download.php?g35chi82ex5wou9
Then
DECOMPILE your android.policy.jar (After Deodexing them if odexed ) --- Using x10modtool or any other tool
Then
Copy the files from the downloaded RAR (above) to the decompiled folder /policy/impl and RECOMPILE
Thats your android.policy.jar
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
No NEED TO.ADD.ANYTHING.ANYWHERE SORRY
help
please tell me how to deodex android.policy.jar (x10moddtool cant)...
dex87xda said:
please tell me how to deodex android.policy.jar (x10moddtool cant)...
Click to expand...
Click to collapse
Use xultimate
Thank You,
Aeon
I can't download the apktool.jar which has plurals error fix, can you upload the file here?
EDIT: i had try both my default apktool.jar and a new one gotten from the google seach but both ended up with error when building the apk still :|
simplyjustkids said:
I can't download the apktool.jar which has plurals error fix, can you upload the file here?
EDIT: i had try both my default apktool.jar and a new one gotten from the google seach but both ended up with error when building the apk still :|
Click to expand...
Click to collapse
Explain the error, give a screen shot
Thank You,
Aeon
I post the log here ones I reach home. It's not a problem to decompile but recompile is an issue. I think it's my apk manager.
EDIT: logs are here
--------------------------------------------------------------------------
|Mon 16/07/2012 -- 21:09:54.45|
--------------------------------------------------------------------------
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) Client VM (build 22.0-b10, mixed mode, sharing)
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\Users\yourdog\Desktop\Apk Manager\other\..\projects\framework-res.apk\res\values\public.xml:7249: error: Public entry identifier 0x104051c entry index is larger than available symbols (index 1308, total symbols 1308).
C:\Users\yourdog\Desktop\Apk Manager\other\..\projects\framework-res.apk\res\values\public.xml:7249: error: Public symbol string/permdesc_external_lockscreen declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\yourdog\AppData\Local\Temp\APKTOOL2279707019009041448.tmp, -x, -S, C:\Users\yourdog\Desktop\Apk Manager\other\..\projects\framework-res.apk\res, -M, C:\Users\yourdog\Desktop\Apk Manager\other\..\projects\framework-res.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\yourdog\AppData\Local\Temp\APKTOOL2279707019009041448.tmp, -x, -S, C:\Users\yourdog\Desktop\Apk Manager\other\..\projects\framework-res.apk\res, -M, C:\Users\yourdog\Desktop\Apk Manager\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
--------------------------------------------------------------------------
|Mon 16/07/2012 -- 21:11:04.77|
--------------------------------------------------------------------------
java version "1.7.0_02"
Java(TM) SE Runtime Environment (build 1.7.0_02-b13)
Java HotSpot(TM) Client VM (build 22.0-b10, mixed mode, sharing)
Could Not Find C:\Users\yourdog\Desktop\Apk Manager\place-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk
Could Not Find C:\Users\yourdog\Desktop\Apk Manager\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedframework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\Users\yourdog\Desktop\Apk Manager\other\..\projects\framework-res.apk\res\values\public.xml:7249: error: Public entry identifier 0x104051c entry index is larger than available symbols (index 1308, total symbols 1308).
C:\Users\yourdog\Desktop\Apk Manager\other\..\projects\framework-res.apk\res\values\public.xml:7249: error: Public symbol string/permdesc_external_lockscreen declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\yourdog\AppData\Local\Temp\APKTOOL7622665506179392662.tmp, -x, -S, C:\Users\yourdog\Desktop\Apk Manager\other\..\projects\framework-res.apk\res, -M, C:\Users\yourdog\Desktop\Apk Manager\other\..\projects\framework-res.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\yourdog\AppData\Local\Temp\APKTOOL7622665506179392662.tmp, -x, -S, C:\Users\yourdog\Desktop\Apk Manager\other\..\projects\framework-res.apk\res, -M, C:\Users\yourdog\Desktop\Apk Manager\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Sent From My Sony Xperia Arc S
Like the compiler said, you didn't add lines in strings.xml, and the hex code you added was over, write hex in a way in continuation to the respective part in public.xml
Thank You,
Aeon
Wait you mean i forgot to add any one line mention above? or... i don't get it =[
simplyjustkids said:
Wait you mean i forgot to add any one line mention above? or... i don't get it =[
Click to expand...
Click to collapse
1. You didn't add lines in strings.xml or manifest
2. You also set the hex codes wrong
3. You might have not installed framework files
Thank You,
Aeon
do you mean this part where i set the codes wrongly?
Add these to the end of string names in public.xml (/res/values/public.xml)
I did copy whatever that was posted above. =\
EDIT: I saw some post saying it only require the android policy jar to work as you don't really have to mod the framework apk file. True or?
simplyjustkids said:
do you mean this part where i set the codes wrongly?
Add these to the end of string names in public.xml (/res/values/public.xml)
I did copy whatever that was posted above. =\
EDIT: I saw some post saying it only require the android policy jar to work as you don't really have to mod the framework apk file. True or?
Click to expand...
Click to collapse
Update : thanks man I really forgot to check that ,I will update every post
Thank You,
Aeon
I had try what's mentioned above... but it's not working =|, could it be that the problem is that i'm running 4.0.3?
simplyjustkids said:
I had try what's mentioned above... but it's not working =|, could it be that the problem is that i'm running 4.0.3?
Click to expand...
Click to collapse
Yes i think mate
sent from my Xperia Neo V Supercharged ICS 4.0.4
simplyjustkids said:
I had try what's mentioned above... but it's not working =|, could it be that the problem is that i'm running 4.0.3?
Click to expand...
Click to collapse
May be, and can you try it with an aosp multiwave framework-res and check it out
Thank You,
Aeon
multiwave framework? Which?
Sent From My Sony Xperia Arc S
simplyjustkids said:
multiwave framework? Which?
Sent From My Sony Xperia Arc S
Click to expand...
Click to collapse
I meant an ASOP framework files, no need I tried with Slide stock ics UN modified framework still it works
Thank You,
Aeon
The android.policy.jar file that i posted is what i did using your tutorial, is there anything wrong i did in there that make it not work?
After trying your android.policy.jar mod I am getting the lockscreen settings but no lockscreen. And editing framework-res.apk gives bootloop, as you mentioned earlier it needs editing androidmanifest.xml, but afaik editing it changes the signature of the apk.
I am using a lot of mods (including hansip87's) and I want to incorporate this mod too.
And I dont want to flash the rom.
Any help will be appreciated
what about mod for GB
AeonWorld said:
XPERIA ICS LOCKSCREEN TUTORIAL ............. Aeon​
Click to expand...
Click to collapse
Please tutorial how to add lockscreen from SXS for 587 Xperia arc?

HELP! Unlocking the native hotspot app...

Okay, so I have my framework-res.apk pulled out and decompiled for the S4...
> http://www.overkillhq.com/downloads/tech/framework-res.apk
I have installed apktools and successfully decompiled the apk...
Code:
java -jar apktool.jar if framework-res.apk
java -jar apktool.jar d framework-res.apk
I back up the manifest/meta-inf and later copy it back when appropriate
I remove the following lines:
Code:
<string-array translatable="false" name="config_mobile_hotspot_provision_app">
<item>"com.samsung.spg"</item>
<item>"com.samsung.spg.NewSPGActivity"</item>
</string-array>
I then go to build and get the following:
Code:
C:\apktoolsJB>java -jar apktool.jar b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\apktoolsJB\framework-res\res\values\public.xml:5998: error: Public symbol array/config_mobile_hotspot_provision_app declared here is not defined.
C:\apktoolsJB\framework-res\res\values\public.xml:6050: error: Public entry identifier 0x1070056 entry index is larger than available symbols (index 86, total symbols 86).
C:\apktoolsJB\framework-res\res\values\public.xml:6050: error: Public symbol array/config_multiWindowHideFlashBarPackageList declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, C:\Users\ADMINI~1\AppData\Lo
cal\Temp\APKTOOL5619132064710751576.tmp, -x, -0, arsc, -S, C:\apktoolsJB\framework-res\res, -M, C:\apktoolsJB\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\ADMINI~1\AppData\Local\Temp\APKTOOL5619132064710751576.tmp, -x, -0,
arsc, -S, C:\apktoolsJB\framework-res\res, -M, C:\apktoolsJB\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:357)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sdk-version, 17, --target-sdk-version, 17, -F, C:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL5619132064710751576.tmp, -x, -0, arsc, -S, C:\apktoolsJB\framework
-res\res, -M, C:\apktoolsJB\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:355)
... 6 more
What should I do to get back on track?
We need to wait for a new apktool, it's a known problem at this point. I've managed to edit some java with smali/baksmali, but not yet resources. THere is some chatter over in the ATT S4 forum about someone that got it to compile.
[FIX] systemUI, framework-res, SecPhone compile error
Jeff
If you didn't develop it it doesn't belong in the development section.
Please watch the noob video it explains not to do just this and why. You will get more support if you ask in the correct section... Q and A
Sent from my Nexus 4 using xda premium
Other thread is similar but different:
This is for those having compiling issues with systemUI.apk and framework-res.apk and the error is a layout error. Here is what I did to fix it.
For example the error in framework-res that pops up: "@layout/keyguard_transport_control" which is in keyguard_screen_unlock_portrait.xml
Just change the line to "[email protected]/keyguard_transport_control"
Click to expand...
Click to collapse
If you get a layout error, stick a + in front of your @ and it will ward off compiling demons.
Also, I'm not sure what "wifi_watchdog_on" and "subscription_mode" do in our settings.db; anybody able to enlighten me on this?
What is widgetsoid doing to enable the built-in wifi with the toggle?!
Rushing said:
If you didn't develop it it doesn't belong in the development section.
Please watch the noob video it explains not to do just this and why. You will get more support if you ask in the correct section... Q and A
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
Lesson learned. I apologize; I come from a forum that posts all root/advanced discussion in the development subthread, assumed this would be the same. Mods please move thread as you see fit =)
I went from scratch and found that if I followed another user's suggestion (cannot recall to give credit, 4:30 AM with a 6:30 wakeup time =/) in combination with the "+" trick, I got the APK to build with warnings about the translations:
Instead of removing all 4 lines, replace them with a single line:
Code:
<string-array translatable="false" name="config_mobile_hotspot_provision_app" />
Put @layout instead of @layout in 6 locations:
Code:
res\layout\keyguard_screen_password_landscape.xml
res\layout\keyguard_screen_password_portrait.xml
res\layout\keyguard_screen_tab_unlock.xml
res\layout\keyguard_screen_tab_unlock_land.xml
res\layout\keyguard_screen_unlock_landscape.xml
res\layout\keyguard_screen_unlock_portrait.xml
I'm scared to do it but I'm about to move this to my phone...wish me luck!
OverkillSD said:
Lesson learned. I apologize; I come from a forum that posts all root/advanced discussion in the development subthread, assumed this would be the same. Mods please move thread as you see fit =)
I went from scratch and found that if I followed another user's suggestion (cannot recall to give credit, 4:30 AM with a 6:30 wakeup time =/) in combination with the "+" trick, I got the APK to build with warnings about the translations:
Instead of removing all 4 lines, replace them with a single line:
Code:
<string-array translatable="false" name="config_mobile_hotspot_provision_app" />
Put @layout instead of @layout in 6 locations:
Code:
res\layout\keyguard_screen_password_landscape.xml
res\layout\keyguard_screen_password_portrait.xml
res\layout\keyguard_screen_tab_unlock.xml
res\layout\keyguard_screen_tab_unlock_land.xml
res\layout\keyguard_screen_unlock_landscape.xml
res\layout\keyguard_screen_unlock_portrait.xml
I'm scared to do it but I'm about to move this to my phone...wish me luck!
Click to expand...
Click to collapse
And now my phone is stuck at the verizon logo and ADB won't recognize it...can somebody link the thread I need to reference to fix this?
I'm at work right now (retail manager) and I need the phone tonight. This will be a lesson in playing with my phone when I'm tired and have things to do later ^_^
Thanks
Overkill
Can you get into download mode? If so use Odin to flash back to stock. That's what I would try. Its not bricked as you prolly know just need to wipe and flash with Odin the correct .tar for your verizon device.
Sent from my Nexus 4 using xda premium
Rushing said:
Can you get into download mode? If so use Odin to flash back to stock. That's what I would try. Its not bricked as you prolly know just need to wipe and flash with Odin the correct .tar for your verizon device.
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
Yeah, I was able to download the tar and flash with Odin earlier in the day...thanks though!
OverkillSD said:
Yeah, I was able to download the tar and flash with Odin earlier in the day...thanks though!
Click to expand...
Click to collapse
good deal! Odin has saved me every time I mess up my Sammy =]
So I looked at the Odin file I downloaded; is there a way to JUST flash the system.img.ext4 file from the tarball i downloaded? I want to keep goofing around with this and maybe be the one to post a working hack xD
Thanks guys,
Overkill
Alrighty...
I installed CWRM so that I can use ADB if needed to push the original file back, great success!
Whenever I use a modified framework-res.apk, it seems to freeze at the verizon logo =(
I have now tried using the APK Multi-Tool and apktools to create the modded framework-res.apk
Expected: Free native hotspot, wootsauce!
Actual: Phone stops loading at the Verizon logo and stays there. I have to re-load the original APK and the phone boots fine.
Scott released in the dev section a mod for this.
Sent from my SCH-I545 using xda app-developers app
imablackhat said:
Scott released in the dev section a mod for this.
Sent from my SCH-I545 using xda app-developers app
Click to expand...
Click to collapse
Cool. I also figured out it was because I didn't wipe the [dalvik] cache (I wiped both, not sure which one did it).
Going to see about removing the E911 icon next...

Categories

Resources