GO ThemesFactory Beta2 released!Make your own go theme now!
View attachment 588995
GO launcher ThemesFactory is a tool to make your own themes about GO Launcher EX.
It has all the elements of a theme in GO Launcher EX that you can recover them.
It also has many beautiful material that you can choose to use freely
It have many ways to allow you to edit the picture you input
User Manual: http://golauncher.goforandroid.com/2011/05/24/go-themesfactory-user-manual/
*For the running of the Software, you should Install the JRE and JDK,and configured correctly
*Double-click the file “themesfactory.jnlp” to download for first-time running
[Change log]
1.(Fix) The export bug of the software
2.(Fix) The running bug of the software
3.(Fix) The preview area display
4.(Improve) The editing area display
5.(Improve) The Common Icons of icons replacement
6.(Improve) The edit box display
[Features]
1. Preview area can show the effect of your replacement of the elements.
2. In the preview area ,you can click a element to open the editing area the element belongs.
3. The elements you can recover include wallpaper, icon, background, the text color and so on.
4. You can find the “import” in the “File-import”, then you can import a GO Launcher EX theme.
5. You should fill in the product description in the Export box. You will see it in the “info” of the theme in the phone.
6. The Generic icon will affect all the icons you didn’t recover.
[Tips]
1. You can only make the theme of GO Launcher EX.
2. You can open the file by open the folder with the name of your theme in the Software.
3. The JRE and JDK is the tool to help you run the software and export the APK files.
4. This is our fist version,we will improve it step by step.
[Screenshots]
View attachment 589001
View attachment 589000
View attachment 588996
View attachment 588998
View attachment 588997
View attachment 588999
Download:
http://61.145.124.93/soft/3GHeart/gothemesfactory_beta.rar
If you have Any feedback/wish/bugreport, please reply to this thread or send us email [email protected].
Doesn't work with Ubuntu 11.04 (and same for many others on Linux). here's the output from terminal:
Code:
[email protected]:~/Scaricati/Go launcher$ javaws themesfactory_beta.jnlp
Unable to use Firefox's proxy settings. Using "DIRECT" as proxy type.
net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Could not initialize application.
at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:776)
at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:552)
at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:887)
Caused by: net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars.
at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:254)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:174)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:288)
at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:767)
... 2 more
Caused by:
net.sourceforge.jnlp.LaunchException: Fatal: Application Error: Cannot grant permissions to unsigned jars.
at net.sourceforge.jnlp.runtime.JNLPClassLoader.setSecurity(JNLPClassLoader.java:254)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.<init>(JNLPClassLoader.java:174)
at net.sourceforge.jnlp.runtime.JNLPClassLoader.getInstance(JNLPClassLoader.java:288)
at net.sourceforge.jnlp.Launcher.createApplication(Launcher.java:767)
at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:552)
at net.sourceforge.jnlp.Launcher$TgThread.run(Launcher.java:887)
java.io.FileNotFoundException: /home/leonardo/.icedtea/cache/recently_used (File o directory non esistente)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:209)
at java.io.FileOutputStream.<init>(FileOutputStream.java:160)
at net.sourceforge.jnlp.util.PropertiesFile.store(PropertiesFile.java:137)
at net.sourceforge.jnlp.cache.CacheLRUWrapper.store(CacheLRUWrapper.java:102)
at net.sourceforge.jnlp.cache.CacheUtil.cleanCache(CacheUtil.java:560)
at net.sourceforge.jnlp.runtime.JNLPRuntime$1.run(JNLPRuntime.java:704)
Exception in thread "Thread-3" java.lang.NullPointerException
at net.sourceforge.jnlp.cache.CacheUtil.removeUntrackedDirectories(CacheUtil.java:569)
at net.sourceforge.jnlp.cache.CacheUtil.cleanCache(CacheUtil.java:562)
at net.sourceforge.jnlp.runtime.JNLPRuntime$1.run(JNLPRuntime.java:704)
[email protected]:~/Scaricati/Go launcher$
I have a problem with export. It doesn't export anything. Beta1 works normally. So JRE and JDK are set as it should be. Anyone having the same issue?
"Confirm" button on wallpaper chooser still doesn't work on Windows 7 64bit
Not working, when I export, this error message appears:
“Make Sure You Have Set The JDK environment variable?”.
The settings are here
Does anyone have any idea?
Okay I solved in a truly trivial, putting put into user variables in the system and the program took to run, I made my first theme, changing the "Go blux Theme Launcher EX" and soddistattissimo. I called and if Inter are interested in and if I can (I do not know) I'll put it on megaupload
Doesn't work with Fedora 15...
confirm button only work with stock, if you rechoosen wallpaper, dock, icon etc...
confirm button not even work
win7
I can't export the theme . I couldn't find the manual from the link provided.
Help, suddenly ThemesFactory 2 (but also 1) has stopped working.
The thing is complicated.
At first glance, the program seems to work as before.
I can inport themes already made, I can well as create new ones and I can also produce the apk file, but when I try to install it, at the end the phone always tells me "no application installed", and in fact not the installs.
If I try to install themes created by me before, or if I try to install other themes downloaded from the market, no problem, so I think the problem lies in the program, on how he builds the apk.
I got this error message that I enclose.
will give it a try
Hi, I resolved.
Describe what had happened because, if it were to happen to someone, the solution is really fantastic.
The first installation of the JDK's, first in installation applications, this entry: ????????????.
Thinking it was a mistake, I had uninstalled some time ago. Bad idea.
The program has started having the problem I have exhibited at previous post and when I uninstalled jdk and jre for going to restore it is removed from the windows registry to register the extension jnlp themesfactory_beta and has not been recreated, even if I removed and put different verson of the JDK and JRE.
From this point it becomes impossible to even open themesfactory_beta2.jnlp.
I have been able to solve by taking the recording from another PC and putting it in the registry of my PC.
I have of course changed the address of JRE, unlike other PC, and it worked.
When I booted themesfactory_beta, this has been connected to the Internet and downloaded the software that has recreated the voice applications in the installation and everything is shared.
You must put these lines in the register to put in place to register jnlp, with a reg file.
Code:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.jnlp]
@="JNLPFile"
"Content Type"="application/x-java-jnlp-file"
[HKEY_CLASSES_ROOT\JNLPFile]
@="JNLP File"
"EditFlags"=hex:00,00,01,00
[HKEY_CLASSES_ROOT\JNLPFile\Shell]
[HKEY_CLASSES_ROOT\JNLPFile\Shell\Open]
@="&Launch"
[HKEY_CLASSES_ROOT\JNLPFile\Shell\Open\Command]
@="\"C:\\Programmi\\Java\\jre6\\bin\\javaws.exe\" \"%1\""
This is the item must be in Control Panel \ Installation Applications.
I hope this helps.
Can someone post a link to the themefactory jar file, i cannot access the go site, thanks!
Help GO ThemesFactory Beta released not work
Hello,
I've added to the registry keys, but I've long been trying to run the go themefactorybeta but I fail, I installed the jdk-6u27-windows-x64.exe, checked in with the javac command cmd and all OK, I've also written the variables:
• JAVA_HOME C:\Program Files\Java\jdk1.6.0_27
• classpath C:\Program Files\Java\jdk1.6.0_27;%JAVA_HOME%\jre\lib\rt.jar;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\jconsole.jar;%JAVA_HOME%\lib\javaws.jar
• Path %JAVA_HOME%\bin;%ANT_HOME%\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\WindowsLive;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
The themefactorybeta.jnlp file I open with Java (TM) Web Start Launcher.
I read the contribution http://forum.xda-developers.com/showthread.php?t=1067502, please I send my error report to see if you can help me, thank you very much.
ERROR: Can not load the resource http://61.145.124.93/soft/3GHeart/themesfactory.jar
•STOCK PERFORMANCE
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://61.145.124.93/soft/3GHeart/">
<information>
<title>������������</title>
<vendor>3g.net.cn</vendor>
<offline-allowed>true</offline-allowed>
</information>
<security>
<all-permissions/>
</security>
<resources os="Windows">
<j2se version="1.5+"
max-heap-size="512m"
/>
<jar href="themesfactory.jar"/>
</resources>
<application-desc main-class="com.jiubang.themesfactory.main.LauncherThemeFactory"/>
</jnlp>
•EXCEPTION
com.sun.deploy.net.FailedDownloadException: No se puede cargar el recurso: http://61.145.124.93/soft/3GHeart/themesfactory.jar
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
• EXCEPTION WITH PACKAGE
java.io.FileNotFoundException: http://61.145.124.93/soft/3GHeart/themesfactory.jar
at sun.reflect.GeneratedConstructorAccessor2.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doGetRequest(Unknown Source)
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResource(Unknown Source)
at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: http://61.145.124.93/soft/3GHeart/themesfactory.jar
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
... 15 more
Related
Which xml file has the color for the default status bar notification text?
Examples: the "usb connected", "application installed successfully" messages on the status bar.
I have tried all 9 options available in colorchangev3.jar and none of them change the color from back.
[ticker] - ARGB color for ticker notifications on the status bar
[clock] - ARGB color for the clock text
[date] - ARGB color for the date
[ongoing] - ARGB color for "Ongoing" Label
[latest] - ARGB color for "Notifications" Label
[none] - ARGB color for "No Notifications" Label
[clear] - ARGB color for text on Clear Notifications button
[network] - ARGB color for network name (T-Mobile usually)
[roam] - Not sure where this color shows up, possibly network name when roaming
Click to expand...
Click to collapse
edit: I suspect its in another jar/apk other than framework* OR services.jar.... (for example the music notification text color is in Music.apk)
lol, well I found it last night but couldn't install the apk after changing it... now interestingly I knew you posted to the thread here about resigning framework-res and I was looking through your posts to find that thread when I found this question.
So, I'll share with you if you can collaborate with me and between us we can get a modded one completed (I want ffd3d3d3 for most of my colours).
Indeed, the notification ticker, last and ongoing are all in the same xml so it's real easy.
BUT - I followed your steps in the other thread (to sign update.zip) and I got a boot loop...
Here's what I did:
using this framework
move classes.dex from framework.jar to framework-res.apk
apktool -d framework-res.apk - success
change xml
apktool -b framework-res.apk - success
move classes.dex from framework-res.apk to framework.jar
sign neither files
make update.zip
sign update.zip
install update.zip
boot loop - it's not because of the xml changes, they were small.
Note how in all of that I didn't tell you what xml... I'm not being mean I just need to trade... can we collaborate to get this thing working? I need it for Kang-o-rama...
OR - should we just create a Morph for the xml, would that work?
I dont get this step: framework-res.apk does not have a classes.dex right?
move classes.dex from framework-res.apk to framework.jar
Click to expand...
Click to collapse
britoso said:
I dont get this step: framework-res.apk does not have a classes.dex right?
Click to expand...
Click to collapse
No... but it wont backsmali (apktool decode) without the java classes which are in framework.jar (at least they are in the one linked above) so I took that out of that file and dumped it in framework-res.apk (.jar and .apk are only containers). Perhaps with apktool there's a command line to point to an external class file but I'm not aware of it.
I don't actually know if the other dependencies will work with classes.dex contained in framework-res.apk so I moved it back to framework.jar after rebuilding the apk.
But now I don't know (trial and all error so far) if I need to sign all of the dependencies with the same sig, the zip file or what.
I'm confused by the advice in the other thread (if I understood it correctly) to not sign the framework-res.apk and only the .zip - because an unsigned manifest will get rejected by the system at boot (even if not at installation). lol - I have boot loop logs to prove it...
Code:
E/ActivityThread( 526): Failed to find provider info for settings
W/dalvikvm( 526): threadid=31: thread exiting with uncaught exception (group=0x4001b1d0)
E/AndroidRuntime( 526): Uncaught handler: thread PowerManagerService exiting due to uncaught exception
E/AndroidRuntime( 526): *** EXCEPTION IN SYSTEM PROCESS. System will crash.
java -jar apktool.jar b framework-res.apk-decoded
where framework-res.apk-decoded is a folder, works fine for me.
are you referring to the instructions at http://forum.xda-developers.com/showpost.php?p=6334671&postcount=11 ?
britoso said:
java -jar apktool.jar b framework-res.apk-decoded
where framework-res.apk-decoded is a folder, works fine for me.
are you referring to the instructions at http://forum.xda-developers.com/showpost.php?p=6334671&postcount=11 ?
Click to expand...
Click to collapse
Different thread, same instructions... using those instructions the AndroidManifest.xml file in framework-res.apk doesn't get signed so I can't see how it's ever loaded by the system...
Oh, I can build the file okay... but apktool can't decode the one I'm using properly unless I add the classes.dex file to it...
INFO: Baksmaling...
Exception in thread "main" org.jf.dexlib.DexFile$NoClassesDexException: zip file framework-res.apk does not contain a classes.dex file
Click to expand...
Click to collapse
Oh, and the file you're looking for is status_bar.xml in /res/layout/ <- this is only for the main notification ticker (in the status bar).
Although, I've just hex edited the colours and flashed a new rom with it and it did nothing at all. I'll verify my work but this leads me to suspect that the new spare parts is overwriting these defaults with it's own defaults... which could make this a painful tracing exercise. I might need to try and trace the source code which I'd like to avoid.
djmcnz said:
apktool can't decode the one I'm using properly unless I add the classes.dex file to it...
Click to expand...
Click to collapse
use the -s option, it will work
d[ecode] [-s|--no-src] [-r|--no-res] <file.apk> <dir>
Decode <file.apk> to <dir>.
-s, --no-src
Do not decode sources.
-r, --no-res
Do not decode resources.
Click to expand...
Click to collapse
Thanks for the tip, will be interested to see it working.
britoso said:
use the -s option, it will work
Thanks for the tip, will be interested to see it working.
Click to expand...
Click to collapse
lol, so simple.
Okay, I've verified that I did patch the file correctly (I pulled it from my phone, decoded it and checked the xml). My hex edits were made correctly to the xml but they had no effect whatsoever. This, I assume, means that the way the new Spare Parts (with the colour picker) works is different and status_bar.xml is no longer the primary source of the default colours. This means existing morphs, hex edits, colorchange.jar and themes may apply but have no effect. Since there's a track record of Wysie's Spare Parts code being rolled into Cyanogen's source it seems that this might be a long term consideration.
So, I'm going to try and trace the replacement defaults (and I don't think it will simply be in spareparts.apk)... I might ping Wysie...
If you're using an older framework then I imagine you'll have more positive results.
In some respects this may be good because the date is set to:
Code:
android:textColor="?textColorPrimaryInverse"
Which would be impossible to hex edit.
Thanks for the tip on apktool!
britoso said:
Which xml file has the color for the default status bar notification text?
Examples: the "usb connected", "application installed successfully" messages on the status bar.
Click to expand...
Click to collapse
Okay mate, I've got it working thanks to some pointers from wysie.
It's all changed, the xml is no longer used. No more simple morphs but I expect that this will just mean two version float around in the wild.
Key defaults are now in the code, services.jar - specifically StatusBarService.java. Two constants are established "blackcolor" and "whitecolor" and simply inserted where needed. You can change the value of the constants or simply change how they're inserted (which is the approach I took).
For a "complete" change, you need to also modify the Spare Parts app so that the "Reset UI Tweaks" defaults to the new order of things as implemented in services.jar.
Hopefully I'll be releasing a version of Kang-o-rama today that will include these mods, feel free to kang them if you want to save some effort!
cool, will be nice to finally have this missing piece
Hi guys,
This is a guide I put together to make themes for the T-Mobile theme engine based mostly on what i've figured out by digging into haxzamatic's awesome template.
This does not require you to be on linux or whatever.
This is mainly a temporary guide till an Eclipse template for the engine is released, or for those who dont want to use eclipse, etc.
Requirements:
-You should know how to decompile/recompile/sign apk files.
-You should know some basic xml editing and theming.
-basic terminal commands
-You must install the framework for apktool, navigate to the folder containing framework-res.apk and execute -
apktool if framework-res.apk
GUIDE:
1. Get the compiled Templatebread from here: http://bit.ly/hdEWsf
2. Decompile it with apktool or whatever you use.
3. Open the AndroidManifest.xml
4. Change the names according to your theme. Here's my manifest for my NTSense theme:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<manifest android:hasCode="false" android:versionCode="2" android:versionName="1.1" android:installLocation="internalOnly" package="com.nhnt11.theme.ntsense"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:pluto="http://www.w3.org/2001/pluto.html">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="9" />
<application android:label="@string/theme_name" android:icon="@drawable/icon">
<activity android:label="@string/theme_name" android:name="com.tmobile.theme.Foo" />
</application>
<theme pluto:themeId="NTSense" pluto:styleId="@style/NTSense" pluto:name="@string/theme_name" pluto:preview="\@drawable/preview" pluto:author="@string/author" pluto:copyright="@string/copyright" pluto:wallpaperImage="@drawable/wallpaper" pluto:styleName="@string/style_appearance_name" pluto:ringtoneName="Standard" pluto:ringtoneFileName="media/audio/ringtones/Standard.mp3" pluto:notificationRingtoneName="Subtle" pluto:notificationRingtoneFileName="media/audio/notifications/Subtle.mp3" />
</manifest>
Note that the template xml file has "pluto:name="\@string/theme_name" - you need to remove this backslash, its a typo. it should be just "@string/theme_name" Should not be needed using latest version of apktool.
More detail about stuff in the manifest in 2nd post.
5. Open /res/values/strings.xml. Edit to match your theme. Here's mine again:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<string name="app_name">NTSense Theme</string>
<string name="theme_name">NTSense</string>
<string name="style_appearance_name">NTSense</string>
<string name="author">nhnt11</string>
<string name="copyright">nhnt11</string>
</resources>
6. Same for /res/values/styles.xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<style name="NTSense" parent="@android:style/Theme" />
</resources>
NOTE: the name of your style must be the same as the pluto:styleID in the manifest!!!
7. Now, if you are making a theme from scratch, go ahead and just edit the images already in the hdpi folder. compile and sign. done. But, read on anyway because i explain how the theme engine works below.
If you want to port a theme, here's what to do:
First, go ahead and delete all the drawable folders. Now, copy your THEMED drawable folders into the directory. You now have to add the following to your theme:
/res/drawable-_dpi/preview.png (prefarably hdpi I guess) (I suggest that you DO NOT remove the backslash in the manifest as different locations of preview.png do not work on different screen sized devices. RETAIN the backslash!! Your theme will not have a preview, but this is a small trade off to get themes working if you're not on linux.)
/res/drawable/wallpaper.png (this can be in drawable-_dpi for different screen res. too)
/res/drawable-_dpi/icon.png.
More detail on those in the second post.
8. Now go to /res/xml - there are a ton of xml's here. Open redirections.xml.
Here, there are entries for specifying which XML redirects which app. Add entries like so:
<package-redirections android:name="<app package name here>"
android:minSdkVersion="7"
android:resource="@xml/your_xml_file(without '.xml' at the end)" />
You have now specified that you want resources in <app> to be redirected based on what's in your_xml_file. Where and what is this your_xml_file and how do you add/modify it? That's what the rest of the xml's in the res/xml folder are.
The rest of these xmls are the heart of the theme engine. How they work is, when android asks for an image or other resource, they come in and switch that resource for your themed one. So its sort of like a proxy server.
Each xml contains the redirections for an app.
For example, redirections to framework-res.apk are in android.xml, and SystemUI is in com_android_systemui.xml
Delete files corresponding to apps you have not themed (for consistency, you might also want to delete the corresponding entry in redirections.xml. If you don't know how, just leave it). You can also add apps by using the convention, <package name>.xml where dots in the package name are separated by underscores, ie. your_package_name.xml for your.package.name
Package names of apps can be found in their respective AndroidManifest.xml's after decompiling. See 2nd post for more detail.
To redirect files, for eg. title_bar_portrait.9.png, just add the item to the systemui xml like so:
Code:
<item name="drawable/title_bar_portrait">@drawable/title_bar_portrait</item>
Note: To make it easy to add hundreds of drawables, I've written a little xml generator - here
Here, the "name" part tells the theme engine WHAT you're replacing.
the part inside the item tag ("@drawable/title_..... in this case") tells it WHAT to replace it with.
In all android packages, the @ sign means that you are referring to a resource in the package. Also, you can refer to a general system-wide resource by using @android:<whatever>
for example, you can replace the above title_bar_portrait with statusbar_background thats already in the android framework like so:
Code:
<item name="drawable/title_bar_portrait">@android:drawable/statusbar_background</item>
After the @ symbol, you have to specify the type of resource. in this case, "drawable".
Note that because the @ symbol refers to something INSIDE your package, you SHOULD NOT use it in the item name="<blablabla>" part.
See Variables in the second post for more detail.
Back to the xmls.
Pretty much all images are ALREADY entered in the xml. Just do a find and replace and get rid of all the "frameworks_res_" and "com_android_systemui_"
for eg, it already has <item name="drawable/title_bar_portrait">@drawable/com_android_systemui_title_bar_portrait</item>, so you need to get rid of the "com_android_systemui_" part.
Actually the professional/clean way to do it would be to rename all of your files to include "package_to_which_it_belongs_" at the front of the filename for better organisation. if you have the time and patience, do it this way!!!!
9. Delete the /res/values/public.xml. Its useless and annoying while compiling. It will be regenerated while compiling.
10. Try to compile the apk. you will probably get errors, because although all the resources are listed in the android.xml (or whatever) you deleted the HDPI folder so many might be missing! it will print what is missing when you compile though, so just go ahead and delete those lines.
11. you can also re-map styles, colors, drawables, etc.. for eg. battery percentage, add this to android.xml after putting the required battery xml in res/drawable:
<item name="drawable/stat_sys_battery">@drawable/stat_sys_battery</item>
also for a color, just add it to /res/values/colors.xml and then in android.xml, add
<item name="color/[name of color]">@color/[name of your color]</item>
See variables in the second post for more info.
12. Sign your compiled apk, and install it! If all goes well you will be able to apply and see the changes after you reboot.
Hope this helped!
More detail
Stuff in the Manifest
The manifest contains several general properties of your app file.
The following are a few which are referenced here.
To change the ringtone: Just put your desired ringtones/notification sound in /assets/media/audio/<Ringtones/Notifications> To prevent your theme from changing the ringtones, delete the corresponding lines from AndroidManifest.xml. I'm sure you can figure out which lines to delete. Also, you can remove the /assets folder, unless you have some other asset in it. (in which case just delete the ringtone buried inside as mentioned above)
Your theme's wallpaper is set to /res/drawable/wallpaper.png. Again, remove the required line from AndroidManifest.xml to make sure you dont mess up your users'wallpapers.
Your theme's theme chooser preview is set to /res/drawable/preview.png. (NEW - I suggest that you DO NOT remove the backslash from the manifest! (see first post))
The icon of your theme's apk file is set to /res/drawable-_dpi/icon.png. You should have an icon for at least one screen-size (preferably hdpi), but its nice to have it for all three.
Variables
This is to help those who don't have dev experience. In android packages, wherever you see an "@" symbol, the part following it will refer to a variable. A variable is basically a name given to refer to a resource for convenient use.
Here are a few types of variables you should know about (note that the explanations may not apply to the theme chooser, but are general):
1. drawable
2. color
3. style
4. string
5. dimen
1. Drawables - Drawbles are, well, drawable. These are resources which android can draw. That includes your theme images, wallpaper, preview, and also stuff like the battery percentage xml's, progress bar xml's etc.
1. Colors - Colors are colors!! Duh! LOL . Anyway, in /res/values/colors.xml you will find an editable list of colors. Say you use green a lot in your theme. Instead of typing "#ff00ff00" everywhere, you can simply define a color called "green" here, by adding the following line:
Code:
<color name="green">#ff00ff00</color>
Now, you can substitute "@color/green" wherever you want to use green.
3. Styles - these are a little advanced. They allow you to define a set of attributes and apply the entire set to different components.
Here's an example style:
Code:
<style name="mytext" parent="@android:style/TextAppearance.Small">
<item name="android:textColor">#ffff0000</item>
</style>
Let's break this down -
First of all, we're naming this style "mytext".
We're saying that its parent is "@android:style/TextAppearance.Small".
This means, that it automatically inherits ALL the properties of the android system style, "TextAppearance.Small" which can be found in the styles.xml in framework-res/res/values.
Now, we're adding an item with the android attribute, "textColor". There are many attributes to choose from, you can look in the attrs.xml in framework-res/res/values. (Note that an attribute may not be applicable to every situation)
Next we're giving the text color a value - in this case, red.
Now, this style can be applied anywhere to get red text in the normal system font size for small text.
Here's an example of how to use styles: post 88.
4. Strings - Strings let you make references to text. Maybe you have your theme name everywhere, and its really long. Maybe your theme name is "supercalifragilisticexpialidocious". Well, you dont want to type that every time. So you can add the following to /res/values/strings.xml:
Code:
<string name="myname">supercalifragilisticexpialidocious</string>
Now, wherever you want to use the word "supercalifragilisticexpialidocious", just substitute it with "@string/myname". And it will use whatever you defined for "myname" there.
5. Dimensions - These store values for sizes and so on. For example, its an easy way to remember a custom text size that you need a lot. Add the following to "/res/values/dimens.xml" (this does not exist by default)
Code:
<dimen name="mysize">33.4sp</dimen>
This will allow you to use the font size 33.4 by substituting "@dimen/mysize" wherever you want. For sizes in pixels, use "____.__dip" instead of "sp".
Comments
Comments are useful little dev tools. Comments basically let a developer (but they're useful to themers too) make comments in the code. Basically, the syntax of a comment (more on that in just a bit) tells the compiler to ignore that line(s). A side effect is that you can "comment" parts of your code - which means that you are marking it as a comment - which are not used (or not yet ready to be used), before compiling and releasing, while retaining the old code for future reference.
How to make a comment in xml files:
Simply surround the code you want to comment with "<!-- ......... -->.
The "<!--" part tells the compiler where a comment starts, and "-->" tells it where the comment ends.
More stuff will come here as I think of it.
I received many error:
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_timepicker_input_selected.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_timepicker_up_disabled.9.png malformed.
No marked region found along edge.
Found along top edge.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_timepicker_up_disabled.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_timepicker_up_disabled_focused.9.png malformed.
Frame pixels must be either solid or transparent (not intermediate alphas).
Found at pixel #8 along top edge.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_timepicker_up_disabled_focused.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_timepicker_up_normal.9.png malformed.
No marked region found along edge.
Found along top edge.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_timepicker_up_normal.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_timepicker_up_pressed.9.png malformed.
No marked region found along edge.
Found along top edge.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_timepicker_up_pressed.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_timepicker_up_selected.9.png malformed.
No marked region found along edge.
Found along top edge.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_timepicker_up_selected.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_title_bar.9.png malformed.
Must have one-pixel frame that is either transparent or white.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_title_bar.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-land-hdpi\frameworks_res_title_bar.9.png malformed.
Must have one-pixel frame that is either transparent or white.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-land-hdpi\frameworks_res_title_bar.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_title_bar_medium.9.png malformed.
Must have one-pixel frame that is either transparent or white.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_title_bar_medium.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-land-hdpi\frameworks_res_title_bar_medium.9.png malformed.
Must have one-pixel frame that is either transparent or white.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-land-hdpi\frameworks_res_title_bar_medium.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_title_bar_portrait.9.png malformed.
Must have one-pixel frame that is either transparent or white.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_title_bar_portrait.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_title_bar_portrait_cust.9.png malformed.
Must have one-pixel frame that is either transparent or white.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_title_bar_portrait_cust.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_title_bar_shadow.9.png malformed.
Must have one-pixel frame that is either transparent or white.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_title_bar_shadow.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_title_bar_tall.9.png malformed.
Must have one-pixel frame that is either transparent or white.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_title_bar_tall.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-land-hdpi\frameworks_res_title_bar_tall.9.png malformed.
Must have one-pixel frame that is either transparent or white.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-land-hdpi\frameworks_res_title_bar_tall.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_toast_frame.9.png malformed.
No marked region found along edge.
Found along top edge.
ERROR: Failure processing PNG image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_toast_frame.9.png
ERROR: 9-patch image C:\Users\ADMIN\.\templatebread\res\drawable-hdpi\frameworks_res_zoom_plate.9.png malformed.
No marked region found along edge.
Found along top edge.
Look up nine-patch pngs. Theres plenty of information about them. You didn't properly edit the nine-patch images (ending with .9.png)
Sent from my HTC Wildfire using XDA App
If i replaced some pngs with other my prefer pngs, then resigned, everything was OK. But if i wanted to add new pngs, i got that errors!
Strange... you shouldn't be getting nine-patch errors if you simply added some extra pngs. are you SURE you're doing it right?
Did you add the pngs from an already compiled framework or did you decompile them? or did you make them from scratch?
What OS are you using to build your theme apks? Are you using Windows?
No i'm on a hackintosh setup, why?
I'm limited to Windows, and the t-mo engine requires a special aapt, which has not been compiled for Windows to my knowledge.
Yeah, I heard about that. But I'm using the normal non-t-mobile aapt that came bundled with apktool, and it works fine for me.
Edit: AFAIK, you only need the T-mo aapt the first time you compile, after that decompiling and recompiling with apktool works. Correct me if I'm wrong please.
Gah! I've been led astray. I've been talking with one of the developers to ask for features, and learn more about the engine. I just didn't bother trying to build a theme, because of what I learned about the aapt change.
FYI to all t-mobile engine themers:
There are currently 2 "skinning" implementations on the table before Google. T-mo's current implementation is not the favored one. Currently, the t-mo team is working on a new engine that will hopefully make Google happy (or happier).
Sony-Ericson is developing the other concept, but it is not ready for inclusion into AOSP either. While they have Google's attention, their approach is currently focused on OEM skinning. (i.e. no root = no skinning)
Confirming, I just recompiled my theme in windows using apktool. It compiles and applies fine. This guide is valid for all OSes.
By the way, Just wanted to mention that like i said in the first post, this is sort of a temporary workaround for theming. Not in any way the best way to do it, but it's clean (at least, almost) and it works, and is, in my opinion, far more convenient than modifying and releasing and reflashing system files all the time.
nhnt11 said:
<snip> it works, and is, in my opinion, far more convenient than modifying and releasing and reflashing system files all the time.
Click to expand...
Click to collapse
I completely agree there.
I went looking into the CM source. I think an uber-genius avoided the need to the custom aapt. Sweet!
Now to have some fun...
BTW, I'm looking to put together something so "we" can share parts of themes (i.e. pack up UI changes, icon sets, mods, etc. in separate zips). Then people could mix and match to one's liking. (Based off the concepts from apk manager 4.9, ZipThemer, and my own special sauce.)
Cool! Looking forward to what you come up with. I was actually thinking kind of the same thing, like, making a base theme, and then being able to have add on packs to override only a few things in the theme like icons, etc.
Sent from my HTC Wildfire using XDA App
I'm after simple and straightforward.
You unpack the apk you want to theme/skin in directory <package name>, make your changes, then delete all the unchanged files. ZIP up one more more of these package trees, and distribute.
To build a theme/skin of your very own, download the ZIPs you like, combine (resolve 'conflicts'), package, and voila.
The BIG advantage of my approach will be that you won't have to do squat with file names! The program will take care of that for you.
Hmmm, that would work, pretty straightforward way to share resources between theme devs.
But what I think would be cool is if we could make packages for users to apply ON TOP of an already applied theme. That would obviously need to be implemented in the theme engine though.
Sent from my HTC Wildfire using XDA App
nhnt11 said:
Hmmm, that would work, pretty straightforward way to share resources between theme devs.
But what I think would be cool is if we could make packages for users to apply ON TOP of an already applied theme. That would obviously need to be implemented in the theme engine though.
Click to expand...
Click to collapse
http://code.google.com/p/cyanogenmod/issues/detail?id=2812
The reason I got in touch with the t-mo dev was so I could toss in my 2 cents. He liked the idea, but he is concerned that, for a simple user, it could be too complicated and/or confusing. Adding support for multiple APKs to ThemeManager would not be difficult. It is that Theme Chooser needs a user friendly UI that can handle multiple APKs and overlaps/conflicts. (I have in my minds eye what one could/would look like. I'm just not going to be the one writing it.)
It can't be that hard, as you said, or even complicated for a user. Two menus - one with full themes, one with addons (maybe a special flag in the package indicating what it is). All addons override everything in the theme with what they have. And you can order applied addons to prioritize which gets the final say. That's it. Not too confusing IMO.
Sent from my HTC Wildfire using XDA App
nhnt11 said:
It can't be that hard, as you said, or even complicated for a user. Two menus - one with full themes, one with addons (maybe a special flag in the package indicating what it is). All addons override everything in the theme with what they have. And you can order applied addons to prioritize which gets the final say. That's it. Not too confusing IMO.
Click to expand...
Click to collapse
I didn't think 2 listings are needed. Good naming and descriptions would be extremely helpful, but not actually required.
Just 1 multi-select "list" (could be like the current chooser with a check box added). Then an ordering screen only if an overlap is detected.
I get this error in apktool. There is more to it but I didnt include it because it was so long and just repeats of beginning only to different files.
C:\Program Files\Android\android-sdk-windows\tools\com.fyb3roptik.theme.androidi
an\res\drawable\zzz_btn_application_selector.xml:4: error: Error: No resource fo
und that matches the given name (at 'drawable' with value '@drawable/pressed_app
lication_background_static').
C:\Program Files\Android\android-sdk-windows\tools\com.fyb3roptik.theme.androidi
an\res\drawable\zzz_btn_application_selector.xml:5: error: Error: No resource fo
und that matches the given name (at 'drawable' with value '@drawable/focused_app
lication_background_static').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\DOCUME~1\Nate\LOCALS~1\Temp\APKT
OOL2146181265913808293.tmp, -x, -I, C:\Documents and Settings\Nate\apktool\frame
work\1.apk, -S, C:\Program Files\Android\android-sdk-windows\tools\com.fyb3ropti
k.theme.androidian\res, -M, C:\Program Files\Android\android-sdk-windows\tools\c
om.fyb3roptik.theme.androidian\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:\D
OCUME~1\Nate\LOCALS~1\Temp\APKTOOL2146181265913808293.tmp, -x, -I, C:\Documents
and Settings\Nate\apktool\framework\1.apk, -S, C:\Program Files\Android\android-
sdk-windows\tools\com.fyb3roptik.theme.androidian\res, -M, C:\Program Files\Andr
oid\android-sdk-windows\tools\com.fyb3roptik.theme.androidian\AndroidManifest.xm
l]
at brut.util.OS.exec(Unknown Source)
... 7 more
Can anyone help please? Thanks!
Hi, it seems some dear users have problems with Miui V5 framework and miui's applications decompiling proccess.
let's begin!
for this job, Im editing the APK Multitool, and all credits will goes to his developer. [raziel23x]
original thread
what's new on this?
changed the aapt to miui compatible, added miui frameworks to default list, added additional frameworks, also you can pull back the files from the phone via adb command.
i wrote it before, original thread
-------------------------------------------------------------------------------------------------------------------------------------------------------------
for version 11.0.1.2 and older!
Download the Attached file.
extract it.
copy these files
Code:
framework-res.apk
framework-miui-res.apk
twframework-res.apk
MiuiSystemUI.apk
from Miui Rom into other folder.
run, Setup.bat script.
Select option 2:
Code:
*
* 2. Installing Framework-Res
* This Will install one of the Framwork-Res Files for 1.x/2.x/3.x/4.x
* This Feature also will install any of the other Dependencies needed
* In order to use this feature make sure to drop all of the needed files
* into the other Folder or else this script will not find them *
*
in next window, install these frameworks by entering related numbers. install it as this order and sequence
Code:
Install framework-res.apk
Install twframework-res.apk
Install Additional Frameworks
Install framework-miui-res.apk
Install MiuiSystemUI.apk
after installing, enter the "9" to get back to main screen.
run setup by entering "3".
Code:
3. Setup Directories
This will setup the appropate directories needed by Apk Multi-Tools
(This script only needs to be ran for first time users do not use if your
Just updating from previous Version
now new folders will create on main folder of this apk multi tool.
Framework's Description
- 1 = framework-res.apk
- 2 = twframework-res.apk
- 3 = additional frameworks
- 4 = additional frameworks
- 5 = additional frameworks
- 6 = framework-miui-res.apk
- 127 = SystemUI.apk
Version 1.11.0.3 XIAOMI Phones.
1- Download Version 1.0.11.3 [[XIAOMI]MIUI_V5_APKMULTITOOL_1.0.11.3.zip] and extract it.
2- Copy MiuiSystemUI.apk, framework-res.apk and framework-miui-res.apk from your rom or phone into other folder.
3- Run Setup.bat file, choose option 2 and then select option 1 for automatically installing all frameworks.
or you can install frameworks manually
Code:
2. Install framework-res.apk
3. Install dummy frameworks
4. Install framework-miui-res.apk
4- from main menu, run option 3
Code:
3. Setup Directories
This will setup the appropate directories needed by Apk Multi-Tools
(This script only needs to be ran for first time users do not use if your
Just updating from previous Version)
best regards.
How to Edit framework-miui-res.apk?
copy framework-miui-res.apk into "place-apk-here-for-modding" folder, run "Script.bat" file.
choose your project , by entering the " 24 Set current project" [24].
the select your project with related number.
decompile apk.
Code:
9 Decompile apk
when the framework-miui-res.apk get decompiled, goto project folder and on the framework-miui-res.apk , open the "apktool.yml" file via notepadd++.
you will see like this one:
Code:
version: 1.5.2
apkFileName: framework-miui-res.apk
isFrameworkApk: true
usesFramework:
ids:
- 1
sdkInfo:
minSdkVersion: '16'
targetSdkVersion: '16'
packageInfo:
cur_package: miui
orig_package: miui
compressionType: true
add additional frameworks , just like below one
Code:
version: 1.5.2
apkFileName: framework-miui-res.apk
isFrameworkApk: true
usesFramework:
ids:
- 1
- 2
- 3
- 4
- 5
sdkInfo:
minSdkVersion: '16'
targetSdkVersion: '16'
packageInfo:
cur_package: miui
orig_package: miui
compressionType: true
save the file.
now go and edit this file, at final you can compile it.
for compile you can use "11 Compile System APK files" option.
if you have any problem, please upload the "APK-Multi-Tool.log" file and tell your problem.
Changelog:
version 1.0.11.1 initial release
version 1.0.11.2 , fixed framework installing.
Version 1.0.11.3 , specially for XIAOMI phones and updated apktool to version 1.5.3 snapshot.
+ fixed and removed some scripts
+ all in one framework installer [ option 1]
+ added miui JB frameworks [ ID 2 ~ ID5]
M_J_Nazari said:
if you have any problem, please upload the "APK-Multi-Tool.log" file and tell your problem.
Click to expand...
Click to collapse
Thank you Nazari!
I dont know if this script is only meant to work with SGS III files...
I followed your instructions using MI-2 files (without twframework-res.apk of course).
And after de-compiling the apk I can't compile it back.
I'm getting:
error occurred, please check the log (option 21)
Click to expand...
Click to collapse
Btw I notice that inside the apktool.yml
I got
compressiontype: false
Click to expand...
Click to collapse
This is my log:
--------------------------------------------------------------------------
|Sun 06/02/2013 -- 17:55:49.16|
--------------------------------------------------------------------------
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) Client VM (build 23.21-b01, mixed mode, sharing)
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Sagi\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
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...
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.err.CantFindFrameworkResException
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.err.CantFindFrameworkResException
at brut.androlib.res.AndrolibResources.getFrameworkApk(AndrolibResources.java:544)
at brut.androlib.Androlib.parseUsesFramework(Androlib.java:508)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:336)
... 5 more
Click to expand...
Click to collapse
I'm guessing it is because of the 'twframework-res.apk' which i dont have...(MI-2 not Samsung).
SagiMedina said:
Thank you Nazari!
I dont know if this script is only meant to work with SGS III files...
I followed your instructions using MI-2 files (without twframework-res.apk of course).
And after de-compiling the apk I can't compile it back.
I'm getting:
Btw I notice that inside the apktool.yml
I got
This is my log:
I'm guessing it is because of the 'twframework-res.apk' which i dont have...(MI-2 not Samsung).
Click to expand...
Click to collapse
W: Could not find sources
so, don't change the "apktool.yml" file and then compile it. see the result. maybe your phone doesn't boot!!
oh,,, i forget to add framework 5 to package, download it and copy to "C:\Users\Sagi\apktool\framework\" folder. i will update the package as soon.
or you can use new package, i added new description and new fixed version.
M_J_Nazari said:
W: Could not find sources
so, don't change the "apktool.yml" file and then compile it. see the result. maybe your phone doesn't boot!!
oh,,, i forget to add framework 5 to package, download it and copy to "C:\Users\Sagi\apktool\framework\" folder. i will update the package as soon.
or you can use new package, i added new description and new fixed version.
Click to expand...
Click to collapse
After I used the new package I succeed to compile it back but the phone doesn't boot.
In apktool.yml I add only
-1
-3
-4
-5
-2 and -6 gave me errors.
I noticed that the new apk size is smaller then the original.
Sent from my MI 2
SagiMedina said:
After I used the new package I succeed to compile it back but the phone doesn't boot.
In apktool.yml I add only
-1
-3
-4
-5
-2 and -6 gave me errors.
I noticed that the new apk size is smaller then the original.
Sent from my MI 2
Click to expand...
Click to collapse
do a search into framework folder, if there is another apk file, i think you need to install this framework. i don't know about the xiaomi phones like mi2 or another.
and, are you sure that you did all steps perfectly?
could you please tell us what did you exactly for compiling process? i mean after entering option "11".
M_J_Nazari said:
and, are you sure that you did all steps perfectly?
could you please tell us what did you exactly for compiling process? i mean after entering option "11".
Click to expand...
Click to collapse
I followed the steps as you wrote except with the twframework, then I edit the apktool.yml
But instead of adding:
-1 to -6
I only add
-1, -3,-4,-5
I edit the style following your guide,
Then I compiled back by entering option 11, copied the 'unsignedframework-miui-res.apk' to my phone and renamed it to 'framework-miui-res.apk' and past it in system/framework. The phone rebooted but got stuck after the bootanimation.
Sent from my MI 2
SagiMedina said:
I followed the steps as you wrote except with the twframework, then I edit the apktool.yml
But instead of adding:
-1 to -6
I only add
-1, -3,-4,-5
I edit the style following your guide,
Then I compiled back by entering option 11, copied the 'unsignedframework-miui-res.apk' to my phone and renamed it to 'framework-miui-res.apk' and past it in system/framework. The phone rebooted but got stuck after the bootanimation.
Sent from my MI 2
Click to expand...
Click to collapse
what's about the keep folder?
M_J_Nazari said:
what's about the keep folder?
Click to expand...
Click to collapse
What is the keep folder?
Sent from my MI 2
SagiMedina said:
What is the keep folder?
Sent from my MI 2
Click to expand...
Click to collapse
ok, i think it is need to know how to work with apk multi tool.
1- decompie
2- edit your framework
3- enter option 11 to compile
4- programs will ask you about the modification , just like this:
Code:
Building Apk
Aside from the signatures, would you like to copy
over any additional files that you didn't modify
from the original apk in order to ensure least
# of errors (y/n)
Type input:
5- enter " y ' and then press enter.
6- wait for programs, to show you this message
Code:
Everything is Ok
Files: x
Size: xxxxx
Compressed: xxxxx
In the APK Multi-Tools folder u'll find
a keep folder. Within it, delete
everything you have modified and leave
files that you haven't. IF you have modified
any xml, then delete resources.arsc from that
folder as well. Once done then press enter
on this script.
Press any key to continue . . .
7- don't touch anything, minimize Apk Multitool program window ,
8-Go back to the main folder of apk multi tool , you will find the "keep" folder.
goto keep folder and delete thisfile "resources.arsc"
9- get back to Apk Multitool program and hit any key to create a new framework-miui-res.apk file with this name
"unsignedframework-miui-res.apk" file.
10- rename it and copy to your phone, do a permission
you can do it via root Explorer
or terminal command
Code:
chmod 0644 /system/framework/framewok-miui-res.apk
or adb commnad
Code:
adb shell chmod 0644 /system/framework/framewok-miui-res.apk
M_J_Nazari said:
...
Click to expand...
Click to collapse
Still no luck Nazari, did everything like you said...
I cant get pass the boot animation once i replace the framework,
why is the new apk is smaller? is it normal?
SagiMedina said:
Still no luck Nazari, did everything like you said...
I cant get pass the boot animation once i replace the framework,
why is the new apk is smaller? is it normal?
Click to expand...
Click to collapse
its normal, you can select compression level by hitting option "21".
but upload your framework-miui-res.apk here to check it and i will make changes to that.
M_J_Nazari said:
its normal, you can select compression level by hitting option "21".
but upload your framework-miui-res.apk here to check it and i will make changes to that.
Click to expand...
Click to collapse
Thanks Nazari!!!
SagiMedina said:
Thanks Nazari!!!
Click to expand...
Click to collapse
it seems xiaomi uses different framework and aapt version, you need to ask them.
M_J_Nazari said:
it seems xiaomi uses different framework and aapt version, you need to ask them.
Click to expand...
Click to collapse
If ill get these different framework and aapt version, I only need to replace them with the those in the 'other' folder?
Guys, you don't have a clue what that other frameworks are for, do you? You can't miss nr 1 or 6 or 2 framework in apktool.yml because that will never work! Apktool.yml is fine and should look like in the first post.
I think your main issue is that you don't know frameworks IDs?
This:
Code:
1. Install framework-miui-res.apk
2. Install framework-res.apk
3. Install twframework-res.apk
6. Install MiuiSystemUI.apk
7. Install Additional Frameworks
Is wrong!
How to tell what ID framework has?
Run this command:
Code:
apktool if framework-miui-res.apk
You will get:
Code:
I: Framework installed to: /home/acid/apktool/framework/6.apk
So framework-miui-res.apk is ID = 6.
Try to install regular framework-res.apk. You will get ID = 1.
To complete the gap between ID1 and ID6 you have to install proper frameworks. AND MiuiSystemUi is NOT a framework! Thats nonsense!
ID is 127 which is out of range.
You have to install framework files that have proper ID from 1 to 6.
ID1:
framework-res.apk
ID2:
frameworks from producer base. So this is twframework-res for Samsung devices, com.htc.resources.apk for HTC, SemcGenericUxpRes.apk for Sony... etc. That doesnt really matter. ID2 frameworks are used when you recompile stock apps like Samsung TW apps or HTC apps (HTCAlbum, Music etc). If you just want to recompile framework-miui-res and boot rom then you can use any ID2 framework or just a dummy file.
ID3:
This is com.htc.dummyskin.apk. Just search for it. You can find it in HTC One roms (One X and One S). Search in MIUI roms for that devices (but with stock HTC based MIUI!). Or grab the file from micode.
ID4:
This is framework-htc-res.apk. Again. search for it. Also HTC roms should have this or grab dummy framework from micode.
ID5:
From micode.
ID6:
framework-miui-res.apk
Dummy frameworks from MiCode:
https://github.com/MiCode/patchrom_build/tree/jellybean/res
You can use 3-5.apk to fill the gap. But still I advice you to use proper ID2 frameworks in case you would like to compile stock apps.
And for last install frameworks in order:
Code:
apktool if framework-res.apk
apktool if twframework-res.apk (or htc or dummy)
apktool if 3.apk
apktool if 4.apk
apktool if 5.apk
apktool if framework-miui-res.apk
That should allow you to boot the rom. Also make sure you have miui aapt and apktool 1.5.3.
thanks a lot @ Accidd for very good explanation.
i worte it for samsung devices, and it seems its fine. this script will install frameworks automatically.
but for other devices i will update the application again, so if we want to compile Xiaomi frameworks , we need to use dummy framework for ID number 2?
It doesn't matter which device you do. You always have to install all frameworks.
Wysłane z MI-2
M_J_Nazari said:
i will update the application again,
Click to expand...
Click to collapse
Thanks Nazari!
And thank you Acid for clearing things!
Sent from my MI 2
Version 1.0.11.3 added to first post to compile Xiaomi phones frameworks.
Warning: Wall of Text Incoming
I want to enable screen off animation in miui v4 rom(cm9 based) by vadim shved. but I get an error when I recompile my framework. I used this guide as reference http://forum.xda-developers.com/showthread.php?t=1595099
so... can someone do it for me?
I know that some of you guys will say "open settings then go to display settings and enable screen off animation" but I must say, SCREEN OFF ANIMATION IS NOT PRESENT IN ANY PART OF THE ROM'S SETTINGS.
Error Log:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Chito>cd..
C:\Users>cd..
C:\>cd android/apktool
C:\android\apktool>apktool if framework-res.apk
I: Framework installed to: C:\Users\Chito\apktool\framework\1.apk
C:\android\apktool>apktool d framework-res.apk framework1
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\android\apktool>apktool b framework-res-new.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.Direc
toryException: java.io.FileNotFoundException: framework-res-new.apk (The system
cannot find the file specified)
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.io.FileNotFoundException: fra
mework-res-new.apk (The system cannot find the file specified)
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.io.FileNotFoundException: framework-res-new.apk (The system cann
ot find the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)
... 7 more
C:\android\apktool>
Click to expand...
Click to collapse
STEP BY STEP PROCESS
Step 1 : Get a copy of your framework-res.apk on your sd card. Do this by starting up root explorer on your phone, navigate to system - framework, scroll down and you should see framework-res.apk. Keep your finger pressed on it and you should see some options, select copy. Now press back twice and find the sdcard folder. Paste it anywhere you want (I made a folder for it so its easier to manage).
Step 2 : : Connect your phone up to your PC:
If you have sd card slots in your PC then unmount your sdcard from your phone by going to settings-SD card and Phone storage , take out your SD card and stick it in the SD card adapter that you should have gotten with your phone and stick that in the SD card slot in your PC
If you don't have an SD card slot then simply connect your phone to your PC via USB. When you connect it you should get a notification saying that the USB is connected, if you didn't you may need to install the drivers. On your phone drag down the notification bar and tap on "USB connected" and then tap "Connect storage to PC"
Step 3 : Now that your phone or SD card is connected you will need to navigate to where you put your framework-res.apk. cut it and paste it to a folder on your computer of your choice (somewhere easy to find). Now make a copy of it (yes that was not a typo we will need the original copy of framework-res if we fail, but we shouldnt fail). Anyway copy and paste it to the folder that you extracted "apktools". So for me that was "C:\Android\apktool" Yes i made a folder called android in C (easier to manage).
Step 4 : Now that we have a copy of framework-res.apk in the apktools folder we can modify it to enable the crt animation (at this point you can choose to disconnect your phone or SD card from your PC and connect it later or leave it in). Now we need to start up command prompt. This is where our years of command prompt navigating come into place . At this moment you should see "C:\Users\<Your Username>", you will need to navigate to where you extracted apktools, if you extracted it in "C:\" or somewhere else easy then this should be a walk in the park for you. If you extracted in "C:\" just type "cd C:\" then "cd apktool" and your there. For others, well....Go on to step 5 in a couple minutes
At the end of it you should see something like "C:\.......\apktool" (not the dots obviously)
Step 5 : now that you have framework-res.apk in the folder where you extracted apktools and you have command prompt open lets get started. First we will need to install framework to your system so we can compile correctly. To do this type "apktool if framework-res.apk" in command prompt. If you were successful you should see something like "I : Framework installed to C:\......."
Step 6: We will now need to decompile framework-res.apk. To do this type "apktool d framework-res.apk framework1". If it decompiled succesfully then there should be a folder called "framework1" where you extracted apktool.
Step 7 : Now we get to make that modification we need. Click on "framework1" --> "res" -- > "values". Find a file called "bools.xml" right click on it and click edit. Now we are looking for this line :
<bool name="config_animateScreenLights">true</bool>. Once you have found it change "<bool name="config_animateScreenLights">true</bool>" to "<bool name="config_animateScreenLights">false</bool>" now we save it (Do not click "save as" just click save)
Step 8 we will now need to recompile framework-res.apk. So open up the handy dandy command prompt and type "apktool b framework1 framework-res-new.apk". If all went well you should see a file called "framework-res-new.apk (Dont worry about all the writing in the command prompt window you saw, if you saw any). framework1 is the folder with our edited file
" NOTE: We are NOT using framework-res-new.apk as our new framework-res.apk IT WILL NOT WORK
Step 9 : This is where we are going to use 7zip. You have to open your original apk (the one we copy pasted into the apktool folder) with 7zip. right click on "framework-res.apk". Click "Open" and a window should show up check the box that says to open with a list of installed programs. You will need to browse to the folder you installed 7zip and click on "7zFM", then click "Ok". Now that we have our original "framework-res.apk" open in 7zip need to navigate to the "framework1" folder. Click on "Build -->apk" and there should be a file called "resources.arsc". Drag and drop this file in the 7zip window. You should get a confirmation box. Click "Ok" (There is already one in the 7zip window, the one we are dragging and dropping will replace it).
Step 10: Once we have replaced the "resources.arsc" file we can close the 7zip window. Now heres where the android SDK comes in handy. The rest of this tutorial will be split up into 2 parts; People with the android SDK and people without it
Click to expand...
Click to collapse
I trying to use Gstreamer on Android via Xamarin.Android(in the Visual Studio), so I built this sample project(github.com/jaroslavas/Gstreamer-Android-example) on the Ubuntu, took the compiled libtutorial-5.so and libgstreamer_android.so libraries and added them into the Xamarin.Android project as AndroidNativeLibrary's. When I try to use libgstreamer_android.so using DllImport, then all going ok, but when I try to use libtutorial-5.so (of course using DllImport), then I get:
DllImport unable to load library 'dlopen failed: could not load library "build/obj/local/armeabi-v7a/libgstreamer_android.so" needed by "libtutorial-5.so"; caused by library "build/obj/local/armeabi-v7a/libgstreamer_android.so" not found'.
Click to expand...
Click to collapse
This error occurs because libtutorial-5.so depends on the libgstreamer_android.so. libtutorial-5.so trying to find libgstreamer_android.so library in build/obj/local/armeabi-v7a/libgstreamer_android.so location.
But of course these two libraries are located in the lib/armeabi-v7a directory and even if I replace all two libraries or just libgstreamer_android.so in this location, then I still have this error.
So how can I change path of the library on which my first library will depend in the Android Studio or just in the .mk files(on the .so building stage)?
Hi, lib not found may cause by:
1. Lib is not exist.
2. Lib that declare in Build.gradle that is different that that you load in java class
3. Function name is not follow the form (the dot. in package name of java class is replaced by "_" in c++ function and class.
4. Clean project and rebuilt it. If you not clean, old lib .so will not be deleted.
5. Check if you declare create in android.productFlavors{}