help please!! modifying framework to show percent (battery) - XPERIA X10 Themes and Apps

hey,
i need help!
i used this code for extracting the framework-res.apk to edit the .xml...
Code:
java -jar apktool.jar d framework-res out\framework-res.apk
-----
xml's edited (battery)
-----
the i have to use this code
Code:
java -jar apktool.jar b framework-res out\framework-res.apk
but then this happens:
Code:
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.
C:\Users\Jürgen>cd /apktool
C:\apktool>java -jar apktool.jar b framework-res out\framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(Unknown Source)
... 5 more
C:\apktool>

The exception is PathNotExist. Does the C:\apktool\framework-res folder exist?

Yes it does
Sent from my X10i using XDA App

Are you on the same computer and in the same folder as you were when you decompiled?
Can you decompile again successfully?

_calum_ said:
Are you on the same computer and in the same folder as you were when you decompiled?
Can you decompile again successfully?
Click to expand...
Click to collapse
Yes and no
The apktool.yml was not there... i put it in and
It worked for the first time but then... error, error, error, error...
Sent from my X10i using XDA App

PoTi_96 said:
Yes and no
The apktool.yml was not there... i put it in and
It worked for the first time but then... error, error, error, error...
Click to expand...
Click to collapse
The only files in my folder are apktool.jar and aapt.exe. Is java set up properly?
What errors are you getting when you try to decompile again? The same one you posted before?

_calum_ said:
The only files in my folder are apktool.jar and aapt.exe. Is java set up properly?
What errors are you getting when you try to decompile again? The same one you posted before?
Click to expand...
Click to collapse
don't know how, but i got it working 0o
btw.. thanks!

Alternatively, you could use MrRusch's 2.1 unmodified apart from the SCB framework-res.apk, and just change the images.

Related

Please Help!

I have been trying to figure out how to sign an apk I have for the droid x. Actually it's a lot of apks but im using this one as an example. I have deodexed the apks and now want to resign them to put back onto my droid. From what I understand, after unzipping and apk and rebuilding it, you need to resign it before it can be used. If this is different for the droid x I am unaware.
Here is what I am running
here is my java version
Code:
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)
here is the command with testsign.jar
Code:
java -classpath testsign.jar AccountAndSyncSettings.apk AccountAndSyncSettings-signed.apk
with the error
Code:
Could not find the main class: AccountAndSyncSettings.apk
and when using
Code:
java -classpath testsign.jar AccountAndSyncSettings.apk AccountAndSyncSettings-signed.apk
I get
Code:
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:114)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:114)
at testsign.main(testsign.java:361)
also tried with signapk.jar
Code:
java -jar -classpath ~/deodex/sources/sign/signapk.jar ~/deodex/sources/sign/testkey.x509.pem key.pk8 AccountAndSyncSettings.apk AccountAndSyncSetting-signed.apk
and get
Code:
Invalid or corrupt jarfile /home/andrew/deodex/sources/sign/testkey.x509.pem
another signapk.jar variation
Code:
java -jar ~/deodex/sources/sign/signapk.jar ~/deodex/sources/sign/testkey.x509.pem ~/deodex/sources/sign/testkey.pk8 AccountAndSyncSettings.apk AccountAndSyncSetting-signed.apk
and get
Code:
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:114)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:114)
at com.android.signapk.SignApk.main(SignApk.java:320)
last one I promise
Code:
java -classpath ~/deodex/sources/sign/signapk.jar ~/deodex/sources/sign/testkey.x509.pem ~/deodex/sources/sign/testkey.pk8 AccountAndSyncSettings.apk AccountAndSyncSetting-signed.apk
and lastly I get
Code:
Caused by: java.lang.ClassNotFoundException: .home.andrew.deodex.sources.sign.testkey.x509.pem
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: /home/andrew/deodex/sources/sign/testkey.x509.pem
Please Help!!!!

[Q] could some compile this framework-res folder

I have trying to build this and it doesn't work. I just modified a color in res/values/styles.xml. Please build this. Build the folder inside the zip file and send it back thanks.
I will do it when I get home, give me an hour.
Sent from my SGH-T959V using XDA Premium App
There is a problem with what you changed i attached the log, it appears you changed a text color to an invalid color, you need to find a different color code and change. Then recompile and sign as system apk.
I attached the log.
I: Loading resource table...
I: Decoding resources...
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
C:\All Installed Apps\android sdk\apk_manager_4.9\other\..\projects\framework-res.apk\res\values\styles.xml:981: error: Error: Color types not allowed (at 'itemTextAppearance' with value '#ffffff').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\tyler\AppData\Local\Temp\APKTOOL1310562279121413550.tmp, -x, -S, C:\All Installed Apps\android sdk\apk_manager_4.9\other\..\projects\framework-res.apk\res, -M, C:\All Installed Apps\android sdk\apk_manager_4.9\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\tyler\AppData\Local\Temp\APKTOOL1310562279121413550.tmp, -x, -S, C:\All Installed Apps\android sdk\apk_manager_4.9\other\..\projects\framework-res.apk\res, -M, C:\All Installed Apps\android sdk\apk_manager_4.9\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
try this one
which file and line are you attempting to modify:
Log Reports:
Error: String types not allowed (at 'textColor' with value 'bright_foreground_dark').
I am just trying to make the text colors of the pop-up menu white and the Google app pop-up menu text colors white, could you help me?
Sent from my SGH-T959V using XDA App
what line is the value you wish to change on?
send me your un-modified framework-res.apk
I don't know, google change popup menu color and clock the one from modaco, that might help.
Here is original apk
airfluip1 said:
I have trying to build this and it doesn't work. I just modified a color in res/values/styles.xml. Please build this. Build the folder inside the zip file and send it back thanks.
Click to expand...
Click to collapse
Not trying to flame you. But please keep questions EVEN if they have to do with development in the general forum.
The development forum is only for posting actual completed development efforts. Discussions such as this should occur in the general forum even if they relate to development.
Again this forum is only for posted stuff that is ready.
Moved to proper forum
do not use this one.
Compile this please
Here you go. tested and working.
compiled - not tested
Here you go all fixed.

[Q][Help] Cant compile framework-res

Hi!
I edit the theme Pure AOSPGinger by dhirend_6d.
I've extracted and changed only the battery icon (so far)
I tried to compile but not work for me neither the program nor apktool apkmanager?
4.9 No apk manager in selecting the project
4.7 manger in unknown error apk
in apk tool:
[*] "C:\Users\*\Documents\*\AutoAPKTool2.0.3\_INPUT_APK\res"
recompiling "C:\Users\*\Documents\*\AutoAPKTool2.0.3\_INPUT_APK\res"...
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(Unknown Source)
... 5 more
The system can not find the specified driver.
Click to expand...
Click to collapse
Thanks in advance
No need to de/recompile for editing/replacing pngs, simply open the apk with an archiver such as winzip/7zip
Thanks! Work!

[Q] compile SystemUi.apk

when im compiling systemui from virtuous Inquisition 4.0.1 im geting errors:
Code:
c:\apktool>Java -jar apktool.jar b systemui
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: c:\apktool\systemui\res/drawable-sw600dp-hdpi
invalid resource directory name: c:\apktool\systemui\res/layout-sw600dp
invalid resource directory name: c:\apktool\systemui\res/values-sw600dp
invalid resource directory name: c:\apktool\systemui\res/values-sw600dp-port
invalid resource directory name: c:\apktool\systemui\res/values-sw720dp
invalid resource directory name: c:\apktool\systemui\res/values-sw720dp-port
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\knyku\AppData\Local\Temp\A
PKTOOL1129380418371610026.tmp, -I, C:\Users\knyku\apktool\framework\1.apk, -S, c
:\apktool\systemui\res, -M, c:\apktool\systemui\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\knyku\AppData\Local\Temp\APKTOOL1129380418371610026.tmp, -I, C:\Users\knyku
\apktool\framework\1.apk, -S, c:\apktool\systemui\res, -M, c:\apktool\systemui\A
ndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
c:\apktool>
framework and resources installed, any ideas ?
Yes, build on linux. I've never had luck with apktool on windows...
Also, has apktool been updated yet to support ICS apk's? I haven't used it in a little while, but it was unsupported last time I tried...
have read somewhere that it supports now, but not working. anyway, if its not working so how devs theming their roms ?!
edit:
updated builtin framework to SDK API14
Click to expand...
Click to collapse
so not supporting. but rly, how devs doin' it ?
I'm looking at the changelog right now:
code.google.com/p/android-apktool/wiki/Changelog said:
1.4.3¶2011.12.08
•updated builtin framework to SDK API14
•fixed some "Multiple substitutions (...)" errors ( Issue 254 )
1.4.2¶2011.12.02
•added support for API14 (Android 4.0) resources
•updated smali to v1.3.0
•added --quiet option
•fixed decoding error when string ends with '%' ( Issue 169 )
•fixed decoding error when <plurals> contains a reference ( Issue 234 )
•fixed a broken res when decoding <array> with positional substitutions ( Issue 222 )
Click to expand...
Click to collapse
It looks like 4.0 should be supported in v1.4.2 and up. Verify that you're running the correct version, and if that doesn't work then I still defer to my original recommendation of running on a linux system. One thing I'm noticing from your posted error is that the file system for the missing resource is using a forward slash after the res directory. Possibly an error in the windows version of apktool.
If you want to upload your changes to a git repo I can update my apktool and play with it...
As far as I know sense 3.6 is now SDK 15 and I can see that sense 4.0 is SDK 18/19 so it would be interesting to see if somebody could download apktool from git, add the framework into it and compile. That should solve the issues.
I was able to download the apktool from GIT but dont know what to do to add the framework in.
solved.
just need to copy updated aapt.exe from platform-tools @ sdk to apktool folder.
to install type apktool if framework-res.apk and done
kamik_f said:
solved.
just need to copy updated aapt.exe from platform-tools @ sdk to apktool folder.
to install type apktool if framework-res.apk and done
Click to expand...
Click to collapse
That works for me as well. I dropped it into my /usr/local/bin directory after updating my apktool in order to resolve the errors...
I'm glad you posted this today. I've been putting off updating my apktool. This not only motivated me to update, but also got it working in a timely manner...
dziekuje
GhostXSeries said:
As far as I know sense 3.6 is now SDK 15 and I can see that sense 4.0 is SDK 18/19 so it would be interesting to see if somebody could download apktool from git, add the framework into it and compile. That should solve the issues.
I was able to download the apktool from GIT but dont know what to do to add the framework in.
Click to expand...
Click to collapse
The 3.32 based apktool works fine for me on sense 4. Just need to install the new framework and then no errors
Sent from my Sensation using xda premium

[Completed] Can't Install Framework-res.apk in apktool

I have install Java JDk and JRE, also android sdk and .Net framework..but when trying to install framework-res.,apk i am getting this error in apktool, apk multi tool, advance apk tool..
Exception in thread "main" brut.androlib.AndrolibException: Could not decode arsc file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:54)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:611)
at brut.androlib.Androlib.installFramework(Androlib.java:469)
at brut.apktool.Main.cmdInstallFramework(Main.java:260)
at brut.apktool.Main.main(Main.java:81)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:43)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:100)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
Hi, please read the purpose of XDA Assist here, http://forum.xda-developers.com/showthread.php?t=2764768

Categories

Resources