Hey Guys.!
Lately I've been getting a lot of PM's regarding theming. So I'm starting this thread to answer your queries. Not only me but I'll try asking other Themers, who I know, to help me here if I get stuck with any question. Also as time passes I'll try including guides too.
I request you all to ask your queries here and not PM me regarding theming. This way I won't be repeating the same stuff to each and every person. This way everyone can benefit from the answers to the questions asked by others.
You can ask anything related to theming. And I'll try my best to answer them.
I'll add and update FAQ's as and when required.
I would like to thank the following users for contributing their knowledge in this thread:
loSconosciuto
androman1507
nitinvaid
Ticklefish
Note:
Please search the thread before asking any query. Maybe it's already answered.
Don't spam the thread with questions not related to theming. I will report them immediately.
P.S.: Before somebody posts that this thread is in the wrong section, I've already consulted with mf2112 about which section this thread should go.
Links to Guides and Tools.
If you are thinking to start theming. Here are few things you'll require:
1. Apk Manager. (for decompiling, recompiling apks)
2. JDK. (To run apk manager).
Few other tools which I have come across which can be useful.
1. Tickle my Android. (For easy theming)
2. Quick ADB Pusher. (To push final modded apks quickly)
3. GIMP (Free image editor)
4. Saint's Color Editor (Changing colors in Android XML files made easy)
5. Windows Logcat Reader. (To get live Logcat with color codes(warning, error, etc.) )
After gathering all the required tools. Go through some guides already available on XDA or any other sites. I'll link few of them which I personally found useful. I'll keep adding and updating links here. If you have any useful link/guide to share, please post it. I'll add them here.
Guides:
1. TUTORIAL - decompiling/editing XML by itiskonrad
Things to note before starting theming:
1. If you are theming for stock, be sure to be deodexed first.
2. Read the HOW-TO of the tool before using the tool. (Don't ask here how to decompile, recompile etc.) (It's what to be done after decompiling that can be asked here)
FAQs
No FAQs yet.
Here a tip.
It's better to replace framework files when the phone is not running. For example if you replace framework-res.apk while Android is running, your phone will automatically "reboot" and some of your settings will be lost after that (wallpapers, accounts etc...).
Rebooting in recovery could be a bit boring, so, here what I do:
Code:
adb root #needed the first time after a reboot and not needed with most of our custom kernels
adb remount #needed the first time after a reboot
adb shell stop #it will freeze the phone
adb push XXXX XXXX
adb shell start #it will re-start the phone.
This is faster than a reboot, but yet safe.
If you get a blackscreen only after adb shell start, it means that the phone was stopped while the screen was off. In this case, just wait. Normally the bootanimation is shown.
Sometimes the dalvik-cache is rebuilt, so it could take some time.
Thanks for making this thread!
Ok, heres the situation.
I've downloaded Androman's Galaxy S2 theme for gb but the problem is, it is galaxy s2 Gingerbread theme. What I'm finding is galaxy S2 ics. Nobody ever did that before. When I search the internet, only aosp ics shown. So, I decided to make one to get the original Samsung ICS experience. To make as Galaxy SL got the official ICS on touchwiz4 like SGS2.
So, I downloaded the stock system UI & framework of ics SGS2 and try to combine it with Androman's SGS2 theme. Changed the battery & signal icon. But when seeing the result, I got disappointed. The Battery icon is too big compared to signal icon. When using stock gb battery, the battery went too small. It doesnt suit wifi icon and looks weird. After a whole day doing this, I lose hope.
I just need someone to guide me.
amifiq said:
Thanks for making this thread!
Ok, heres the situation.
I've downloaded Androman's Galaxy S2 theme for gb but the problem is, it is galaxy s2 Gingerbread theme. What I'm finding is galaxy S2 ics. Nobody ever did that before. When I search the internet, only aosp ics shown. So, I decided to make one to get the original Samsung ICS experience. To make as Galaxy SL got the official ICS on touchwiz4 like SGS2.
So, I downloaded the stock system UI & framework of ics SGS2 and try to combine it with Androman's SGS2 theme. Changed the battery & signal icon. But when seeing the result, I got disappointed. The Battery icon is too big compared to signal icon. When using stock gb battery, the battery went too small. It doesnt suit wifi icon and looks weird. After a whole day doing this, I lose hope.
I just need someone to guide me.
Click to expand...
Click to collapse
U can have ics style battery from my s3-style theme...i also had very much problem with battery icon.... After playing with adobe photoshop , i got it with proper size.
androman1507 said:
U can have ics style battery from my s3-style theme...i also had very much problem with battery icon.... After playing with adobe photoshop , i got it with proper size.
Click to expand...
Click to collapse
Last time I downloaded the s3 theme, it doesnt come in the usual format so i cant take some part of it without flashing it.
Can you please upload the it in your theme post?
Sent from my GT-I9003 using xda app-developers app
amifiq said:
But when seeing the result, I got disappointed. The Battery icon is too big compared to signal icon. When using stock gb battery, the battery went too small. It doesnt suit wifi icon and looks weird. After a whole day doing this, I lose hope.
I just need someone to guide me.
Click to expand...
Click to collapse
Hi. I'm on mobile right now so cant point you to the exact value entry but theres a dimen value in dimens.xml in SystemUI.apk in /res/values/ something like statusbar height. You can increase that to fit your need. Try it and let me know.
Cant find it. But its okay.. I found a solution.
I think I'm gonna take Google's ics icon and photoshop it to Samsung's ics icon colours.
The shape is exact same, right?
I'm gonna try this.
Sent from my GT-I9003 using xda app-developers app
Added Saint's Color Editor to Guides and Tools. Check it out.
Hi, i am trying to change system back ground and progress-bar. When i am recompiling apk file i am getting error of resources changed.
Code:
C:\ADT\apk tool>apktool b C:\ADT\Ogg
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'permdesc_accessUsb' has no default translation in C:\ADT\
Ogg\res; found: da es pl pt sv
aapt: warning: string 'permlab_accessUsb' has no default translation in C:\ADT\O
gg\res; found: da es pl pt sv
C:\ADT\Ogg\res\values\styles.xml:189: error: Error: No resource found that match
es the given name (at 'windowBackground' with value '@color/background').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Dell\AppData\Local\Temp\AP
KTOOL1964697750821808325.tmp, -x, -S, C:\ADT\Ogg\res, -M, C:\ADT\Ogg\AndroidMani
fest.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\Dell\AppData\Local\Temp\APKTOOL1964697750821808325.tmp, -x, -S, C:\ADT\Ogg\
res, -M, C:\ADT\Ogg\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
What to do???? If i dont change anything than it is compiled but when i change style.xml and progress-bar.xml i get this error. If i need to pull the resources then how to get it???
androman1507 said:
Hi, i am trying to change system back ground and progress-bar. When i am recompiling apk file i am getting error of resources changed.
Code:
C:\ADT\apk tool>apktool b C:\ADT\Ogg
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'permdesc_accessUsb' has no default translation in C:\ADT\
Ogg\res; found: da es pl pt sv
aapt: warning: string 'permlab_accessUsb' has no default translation in C:\ADT\O
gg\res; found: da es pl pt sv
C:\ADT\Ogg\res\values\styles.xml:189: error: Error: No resource found that match
es the given name (at 'windowBackground' with value '@color/background').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Dell\AppData\Local\Temp\AP
KTOOL1964697750821808325.tmp, -x, -S, C:\ADT\Ogg\res, -M, C:\ADT\Ogg\AndroidMani
fest.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\Dell\AppData\Local\Temp\APKTOOL1964697750821808325.tmp, -x, -S, C:\ADT\Ogg\
res, -M, C:\ADT\Ogg\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
What to do???? If i dont change anything than it is compiled but when i change style.xml and progress-bar.xml i get this error. If i need to pull the resources then how to get it???
Click to expand...
Click to collapse
Did you change an existing color or added your own?
If u r talking about color of system background then i want to use png file as back ground.Here is the link i used to change background. Otherwise no change in any type of color...And i am trying to add ics style progress-bar.
androman1507 said:
If u r talking about color of system background then i want to use png file as back ground.Here is the link i used to change background. Otherwise no change in any type of color...And i am trying to add ics style progress-bar.
Click to expand...
Click to collapse
Ok. Do the following.
1. Goto style.xml and check what is on line 189.
2. Check if the color 'background' is specified or not in colors.xml or in the color folder.
The error is there because it couldn't find that color. Check it out.
ammar786 said:
Ok. Do the following.
1. Goto style.xml and check what is on line 189.
2. Check if the color 'background' is specified or not in colors.xml or in the color folder.
The error is there because it couldn't find that color. Check it out.
Click to expand...
Click to collapse
Ok, in style.xml line 189 is
Code:
<item name="windowBackground">@color/background</item>
So i think it is ok.
In colo.xml i am getting line as below:
Code:
<color name="name of color">color-code</color>
They must be defining color values. So will i have to define background as color? If yes, then in which line and which color code should be used for background?
androman1507 said:
Ok, in style.xml line 189 is
Code:
<item name="windowBackground">@color/background</item>
So i think it is ok.
In colo.xml i am getting line as below:
Code:
<color name="name of color">color-code</color>
They must be defining color values. So will i have to define background as color? If yes, then in which line and which color code should be used for background?
Click to expand...
Click to collapse
Color code depends on the color you want. Use this site to generate the color hex-code.
For eg. : ICS Blue is 33b5e5.
So the color entry would be:
Code:
<color name="background">#FF33b5e5</color>
The initial FF is for alpha value.
00 -> Fully transparent
FF -> Fully Visible
Anything in between is semi-transparent
ok...sorry for asking these much questions but what this warning msg is??
Code:
aapt: warning: string 'permdesc_accessUsb' has no default translation in C:\Them
eing\framework\res; found: da es pl pt sv
aapt: warning: string 'permlab_accessUsb' has no default translation in C:\Theme
ing\framework\res; found: da es pl pt sv
Actually feeling like a very-noob that's why having this much questions....
androman1507 said:
ok...sorry for asking these much questions but what this warning msg is??
Code:
aapt: warning: string 'permdesc_accessUsb' has no default translation in C:\Them
eing\framework\res; found: da es pl pt sv
aapt: warning: string 'permlab_accessUsb' has no default translation in C:\Theme
ing\framework\res; found: da es pl pt sv
Actually feeling like a very-noob that's why having this much questions....
Click to expand...
Click to collapse
Nothing. You can ignore them. I too get them all the time. Doesn't matter.
Now apk files compile but when i view it using root explorer i found that META-INF folder in apk file is not created..how to add it?
androman1507 said:
Now apk files compile but when i view it using root explorer i found that META-INF folder in apk file is not created..how to add it?
Click to expand...
Click to collapse
You can't use the recompiled apk directly. Take the files you changed from the recompiled apk using 7zip. When I say 'take' it means copy paste somewhere. And replace those in the original apk. Before doing this, make sure you backed up the original apk. Files should go in the exact same place. This method confirmed works.
Related
Ok this is a quick little guide. Decided not to put this in the notification text thread as that needs to be cleaned up anyway.
This is for modifying .xml's in say /values or wherever you want. This particular example is going to use /values/styles.xml
First up, decode your framework using apktool
** Make a backup! **
Code:
: adb pull /system/framework/framework-res.apk /sdcard/mytheme/backup.apk
: adb pull /system/framework/framework-res.apk C:\themes\mytheme.apk
: apktool d -f C:\themes\mytheme.apk C:\themes\mytheme\decoded\
Then open up the /res/values/styles.xml.
Find "<style name="Widget.Button" parent="@style/Widget">
Change the textcolor to #FFFF0000
This will make all buttons have a RED text color.
Click to expand...
Click to collapse
Now re-encode the file
Code:
:apktool b C:\themes\mytheme\decoded C:\themes\mytheme\encoded\mytheme-new.apk
Now, the simplest thing to do is to do the following:
- Open the original C:\themes\mytheme.apk with 7-zip
- Drag and drop the META-INF and AndroidManifest.xml File into a folder, like C:\themes\mytheme\signed
* Now you have a copy you can always use, and skip the above steps after doing it once *
- Open the new encoded mytheme-new.apk with 7-zip
- Drag and drop the META-INF and AndroidManifest.xml from the \signed directory
Click to expand...
Click to collapse
Code:
: adb push C:\themes\mytheme\encoded\mytheme-new.apk /sdcard/mytheme/framework-res.apk
: adb remount (if available for you!)
: adb shell
**Only if remount doesn't work.**
: mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
: cp /sdcard/mytheme/framework-res.apk /system/framework/framework-res.apk
**Wait for the theme to apply, no need to reboot**
**If you Bootloop and stay in shell (which you should if you don't reboot)**
Click to expand...
Click to collapse
Code:
: cp /sdcard/mytheme/backup.apk /system/framework/framework-res.apk
**After this the bootloops should stop as your last stable framework is loaded**
Click to expand...
Click to collapse
That's it!
Questions? Comments? Leave em!
So, for instance, in the Vanilla Froyo theme for 2.1, where all of the text elements that should be a dark grey or black are white, this would allow me to change them?
Yep. Just a matter of figuring out which style controls what...that's next on my list to document lol. It's a LOT easier than trying to Hex Edit everything.
I'm really surprised this thread isn't exploding with questions, but I have to say great work, man!
I'm gonna wait it out until I know my way around the SDK a little more, but I really wanna dig through this and finish the Vanilla theme I'm using.
Thanks! I should make one big guide get it stickied and be fine with it lol. You can check out my vanilla theme fire an idea of what I've done.
Sent from my DROIDX using XDA App
Great tutorial man. I especially appreciate the part about not having to reboot. I wonder why everyone always says to do that for installing themes.
If you use apkmanager (which is a frontend for apktool) -- it automates some of the steps mentioned here. Its in the G1 development section as well as apktool.
Not work...
Very sad
After complete all steps, device not boot after LG lable longer.
Any ideas?
log cmd in process:
Code:
D:\Android\SDKTools\tools>apktool d -f C:\themes\mytheme.apk C:\themes\mytheme\decoded\
I: Loading resource table...
I: Decoding resources...
I: Copying assets and libs...
D:\Android\SDKTools\tools>apktool b C:\themes\mytheme\decoded C:\themes\mytheme\encoded\mytheme-new.apk
[B][COLOR="Red"]W: Could not find sources[/COLOR][/B]
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
phimuskapsi said:
Thanks! I should make one big guide get it stickied and be fine with it lol. You can check out my vanilla theme fire an idea of what I've done.
Sent from my DROIDX using XDA App
Click to expand...
Click to collapse
Phim, you're the best! I have been searching for a simple guide like this, as I found one a while ago when theming, but lost the link. Thanks for all your contributions on here, they are greatly appreciated! If I have some questions on editing some xml files, can I shoot you a PM or two?
Sent from my DROIDX using XDA App
I am trying to edit the color of the text in the drop down notification bar for the text such as USB Connection.
Can someone please tell me which xml file and which portion needs to be edited?
The font color would most likely be in the styles.xml file (in the values folder). I don't know which line exactly but you can take too different color versions and compare the decompiled xml files with word or online and look for differences.
yawdapaah said:
The font color would most likely be in the styles.xml file (in the values folder). I don't know which line exactly but you can take too different color versions and compare the decompiled xml files with word or online and look for differences.
Click to expand...
Click to collapse
Yae, thanks for the info. I found it shortly after posting through trial and error. I think it was in one of the status_bar_latest*.xml
For some reason when I made the esit and recompiled my famework-res.apk I lost adb capabilities and usb-mode and had to revert to a nandroid.
Any ideas on what may have caused this? Only edited an xml file...
Sent from my DROIDX using XDA App
.apk on desktop (adp pull C: [??])
phimuskapsi said:
Ok this is a quick little guide. Decided not to put this in the notification text thread as that needs to be cleaned up anyway.
This is for modifying .xml's in say /values or wherever you want. This particular example is going to use /values/styles.xml
First up, decode your framework using apktool
** Make a backup! **
Code:
: adb pull /system/framework/framework-res.apk /sdcard/mytheme/backup.apk
: adb pull /system/framework/framework-res.apk C:\themes\mytheme.apk
: apktool d -f C:\themes\mytheme.apk C:\themes\mytheme\decoded\
Click to expand...
Click to collapse
Hi there, newbie here (but I've managed to decode all the java and xml, which is fully readable). Only thing I have left is this pesky "resources.arsc" file. I tried using both the xml way and java way, but neither worked, that's when I found your posting. Thanks so much for sharing btw!!
I haven't tried this yet because I'm confused about why you did not put a "C:" in the beginning of the file address to route the command to the folder on your sdcard which contains your .apk.
My .apk will be on my desktop, so, how should my command line look???
Thanks again, hope to here from you.
Ok, I managed to decode everything except resources.arsc. I imported package successfully into eclipse but I have errors. I looked through all XML, which is in English and good, except for the resources.arsc, which is not decoding by methods I'm familiar with. Your method will probably work but I need command prompt spelled out for me (sorry about that).
So, resources.arsc is located: desktop/space/resources.arsc. I'll play around with it an see what happens...
I was wondering if anyone knew how to change the name of the service provider from "Virgin Mobile" to whatever i want. (Like my name for instance.) I have already tried changing the build.prop file and it didn't work. The app "Carrier Name" doesn't work. I tried extracting the framework.apk and going deeper to the eri.xml and changing the provider name to something else but "Virgin Mobile" wasn't even there. Also in cdma workshop changing the banner doesn't do anything and the banner isn't even "Virgin Mobile" which it should be. I have tried other forums with no success and i'm hoping a dev can help. Yes i am rooted.
x2 would also like to know how to change that name to something else..
Self-bump for hope
QPST didn't work.
Ya i forgot to mention I also tried QPST with no luck.
under CDMA carriers I believe if you edit the framework-res.apk/values/strings.xml you can change something like zz_nationalRoaming_Carrier=Virgin Mobile
i know it sounds weird, roaming, but check it out....
I've been trying to accomplish this on GSM phones but they pull the variable from the sim card.... if you can simply change the txt value in framework-res.apk/layout/keyguard_screen_lock.xml then maybe that would work?
You need to change it from something like android:id="@id/carrier" whatever it says;
to android:text="custom" or whatever that is... (Open up eclipse and check out a basic text fields layout.xml so that you can use that as a guide if you need to...)
I'll check it out soon; it's something I intended to do for a guy.. I just don't personally own the triumph this worked great on Samsung Moment... but it was android 2.1 ....
I was so excited when I saw your post! But then I became bummed again as I saw that I don't have a "values" folder on my triumph's framework-res.apk. The three folders that I have as I open the .apk are "assets", "META-INF",and "res." I have attached a picture to show you what I mean. Thanks for the effort. Keep me updated.
Don't extract it... use apktool,
it needs decompiled... (if you use root explorer or something you can't see the correct text either)
-- Please be ready to recover your rom before trying this you may have a bootloop if you forget to fix permissions etc... ---
Windows instructions
Place framework-res.apk in your c:\ in a new folder called frame (or wherever);
example will use c:\frame\
Put apktool and aapt in \frame; (I will try to find something to attatch sorry i'm on my lunch break @ work)
C:\frame\framework-res.apk
C:\frame\aapt.exe
C:\frame\apktool.bat
C:\frame\apktool.jar
Open command prompt as administrator (open start menu type cmd right click it hit run as administrator)
In this prompt type cd\frame (Or wherever you put those files)
Run this;
apktool d framework-res.apk
this will extract all files to C:\frame\framework-res\
Check then for your values folder, you should see tons... just worry about Values. the rest are locales... (languages,, if it fails maybe try values-EN?)
Once you're done you can run apktool b framework-res and it will build the contents of the c:\frame\framework-res\ folder into C:\framework-res\dist\framework-res.apk
now you have to put this file in your /system/
you can get it there via the phone if you have issues I will try to help for now here are adb instructions:
adb remount
adb push c:\frame\framework-res\dist\framework-res.apk /system/framework-res.apk
adb shell chmod 644 /system/framework-res.apk
This may or may not work again I'm on my lunch sorry...
report back i'll stay active here;
I don't own a triumph but my buddy does so I can't test much
I am learning this stuff too but I have spent some time with it so i'd be more than happy to share; likewise i'd love anyones help learning aswell.... that's actually what brought my attention to this triumph; =D
edit; btw i'll see if i can't test this realtime tonight I had heard that 7zip is fine for framework-res but I think that was for the GFX themeing not for the xml editing? I dont' know, I apologize if you got stuck on my guide however I will work with you to make it through it
Thanks man. I appreciate your write up. I will try it today after school and get back to you on the results.
You may have an issue in adb, i noticed that I was unable to get the device to pick up in ADB ... I rebooted the phone and noticed that the device manager picks up the Android ADB Interface for a minute, but as it finalizes boot it drops it...
Perhaps I just have driver issues but it seems like a start up script is runing the command stop adbd
Anyway if that's the case we need to remove the stop adbd command from the startup scripts;
Anyways; if you can't get ADB USB drivers maybe w/ your root access you can set it up on wifi? connect to wifi and run
(From phone terminal)
setprop service.adb.tcp.port 5555
stop adbd
start adbd
(From PC)
adb tcpip 5555
adb connect IPADDRESS:5555 -Note that i mean the ip address to the phone on wifi)
then if it's successful you should be able to adb remount adb push framework etc...
remember to chmod or you WILL bootloop.
I was able to successfully follow your guide up until when i (try to) compile with the apktool b framework-res command I get this:
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
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:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
The new and improved .apk never gets made because of this error. I google searched and tried to find a solution for at least an hour with no luck. I would just like to thank you in advance for all of your help.
I was able to successfully follow your guide up until when i (try to) compile with the apktool b framework-res command I get this:
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
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:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:138)
... 4 more
The new and improved .apk never gets made because of this error. I google searched and tried to find a solution for at least an hour with no luck. I would just like to thank you in advance for all of your help.
EDIT: It posted twice for some reason!? Weird
i'll take a look i believe it it's entirely because of what version of APKtool I submitted (perhaps a bad one, sry...) I'll get the framework from the system dump in the other thread and try it out
Ok thanks a lot man.
Wow I joined in 2008 and got my first thanks; yet I went to reply and thanked you for saying thanks!
Hahahah, no but for real it's cool cause thanks for trying; fyi i was able to compile okay...
I found apktool.yml or whatever, but it's supposed to be in the decompiled folder... when you recompiled are you doing it like this?
apktool d framework-res.apk
apktool b framework-res (NO .apk it is the FOLDER you are targetting)
I will test my rebuilt framework, this is what I changed;
<string name="roamingText1">Virgin Mobile</string>
to
<string name="roamingText1">Ryan S.</string> (The guys name.)
You guys what you have to edit is the line "zz-roaming text 1" just editing this one will change them all. (Lockscreen and notification bar) as for the tool to decompile the framework-Res.apk I recommend apk manager. It is the easiest to use. (Note to newbs) with apk manager you don't have to remember command prompt codes
Sent from my MOTWX435KT using XDA App
I found no zz in it, was the problem... several zzz but no zz roaming
anyway i should forwarn that my framework-res.apk broke the guys phone i restored it and we're good but looking at the files they're 700kb differences so perhaps apk manager alone will recompile more successfully?
I appreciate the reocmmendation most of the tools I have found so far havn't allowed access to the xml files just the pngs, or not all of the contents of the apk (not decoding them)
I'll try apk manager and report back soon.
I've never tried apk tool, I may try this once someone does it successfully so I'll be watching. I don't know how to backup my phone so I'm wary of tinkering.
using apk tool
From my own experience I find that apk manager can sometimes be tricky to use. And sometimes when you recompile the first time it doesn't work properly. If it doesn't work the first time try it again. Ill try doing this when I can get to my computer. BTW make sure you import the old files and delete whichever one you changed. That's where it can get tricky
the current issue i'm having is that the apk file made is like 6-800kb smaller and all i didwas remove ascii,
i'll test it when i can though sorry
I am facing problem when i edit xml's and try to compile apk
Code:
C:\Users\SARTHAK ACHARYA\Downloads\apk_manager_4.9\other\..\projects\framework-res.apk\res\values\public.xml:3898: error: Public symbol drawable/zzzzzzz_sec_noti_icon_decryption declared here is not defined.
C:\Users\SARTHAK ACHARYA\Downloads\apk_manager_4.9\other\..\projects\framework-res.apk\res\values\public.xml:3899: error: Public symbol drawable/zzzzzzz_sec_noti_icon_encryption declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\SARTHA~1\AppData\Local\Temp\APKTOOL5554419900531165905.tmp, -x, -S, C:\Users\SARTHAK ACHARYA\Downloads\apk_manager_4.9\other\..\projects\framework-res.apk\res, -M, C:\Users\SARTHAK [B]ACHARYA\Downloads\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\SARTHA~1\AppData\Local\Temp\APKTOOL5554419900531165905.tmp, -x, -S, C:\Users\SARTHAK ACHARYA\Downloads\apk_manager_4.9\other\..\projects\framework-res.apk\res, -M, C:\Users\SARTHAK ACHARYA\Downloads\apk_manager_4.9\other\..\projects\framework-res.apk\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
The system cannot find the file specified[/B].
Any help will be appreciated!
When you edit xml you must assign ids properly in public.xml
Sent from my GT-I9003 using XDA App
ronhoover88 said:
When you edit xml you must assign ids properly in public.xml
Sent from my GT-I9003 using XDA App
Click to expand...
Click to collapse
thanks.......
can u tell me how to get the id's ?
PS:newbie @ themeing
What exactly are you trying to do??
Sent from my GT-I9003 using XDA App
ronhoover88 said:
What exactly are you trying to do??
Sent from my GT-I9003 using XDA App
Click to expand...
Click to collapse
i m trying to port ics animations
sakindia123 said:
i m trying to port ics animations
Click to expand...
Click to collapse
that's what i tried to do, but if would shows error in the apk manager when building it and if i continue and push the file to system/framework using root explorer, many apps would fc immediately and when rebooting, the phone would end up in a boot loop
rocker529 said:
that's what i tried to do, but if would shows error in the apk manager when building it and if i continue and push the file to system/framework using root explorer, many apps would fc immediately and when rebooting, the phone would end up in a boot loop
Click to expand...
Click to collapse
of course it would,since the xml's are not properly converted into binaries into apk manager
I'm making a theme for go sms and I compiled the APK thru APK Manager, but when I try to upload the apk file on the market, it says,
"Market does not accept apks signed with certificates issued by Android team.Market does not accept apks signed with certificates issued by Android team."
Click to expand...
Click to collapse
What should I do?
The theme I made was made at Go SMS' website then I decompiled the APK to edit some images that it can't be edited at the website. I compiled it back with no errors. I tried signing it and not. When it's unsigned, market says
The server could not process your apk. Try again.
Click to expand...
Click to collapse
Any suggestions please?
If you are not having problems compiling SystemUI.apk with no problems then this is not for you
WARNING:
You should not attempt to do this on a device that does not have a recovery, because if something goes wrong you may have to reinstall your rom (not very likely though). You should probably back up SystemUI.apk You should also have some experience modding and some experience using Apktool and Linux.
INTRO:
If your having problems modding SystemUI.apk on JB then this thread is just for you. I recently found out how to mod the Jelly Bean SystemUI. Jelly Bean has made it very difficult to mod. Yes it is still easy to replace images, but if you want to do some major changes to the UI such as a 100 percent battery mod or changing the status bar color then you will need to know exactly how to do it. For example, if you get the UI decompiled without errors and you recompile it without errors YOUR RECOMPILED SystemUI.apk WILL NOT WORK and your status bar will disappear etc... There is a special way to get everything working and I will show you how.
STEP 1:
LINUX>>
Before we start I recommend that you have File Roller: one of the most popular archive managers for Linux (Ubuntu comes with it). If your distribution uses a Debian package manager (most popular ones do) then all you have to do is go into the terminal and type:
Code:
sudo apt-get install file-roller
Now you will have File Roller. You also will need java installed. Check if you have java by typing:
Code:
java
in the terminal. If you dont have java and your using a Debian package manager then type:
Code:
sudo apt-get install openjdk-6-jre
or download from the java website and install it.
WINDOWS>>
Before we start, you will need 7zip and java. Just search and you will find the programs to install
STEP 2:
Now we will install APKTOOL. You may already have it installed BUT your version will probably not work. I have ran around the internet for a modified apktool that wont give you errors (If you follow my directions). I came across a great thread. check it out and download all the tools their (dont forget aapt) http://forum.xda-developers.com/showthread.php?t=1755243. If you are in Linux rename the jar file to apktool.jar and move the the jar plus aapt to /usr/local/bin. You will need root. If you are in Windows rename the jar to apktool.jar and move it and aapt to your WINDOWS directory. You also need zipalign http://powerpoint45.webs.com/android/zipalign(<Linux)( zipalign for windows:- ZIPALIGN )move it to your WINDOWS dir/bin dir. You need one more thing. It is from the apktool websitehttp://code.google.com/p/android-apktool/. According to your os download either apktool-install-linux-r04-brut1.tar.bz2 or apktool-install-windows-r04-brut1.tar.bz2. Extract the contents. You only need one file from the archive. In linux move apktool (not apktool.jar) to /usr/local/bin. In Windows move apktool.bat to your WINDOWS directory. Dont jump ahead and say "Now that I got apktool set up, I know what to do", because it gets a lot more difficult than you are used to using apktool.
STEP 3:
Now that you have apktool set up, you need to know how to mod SystemUI.apk. Get SystemUI.apk from /system/app within your device onto the computer. Now make a backup of SystemUI.apk on your computer because we will NEED it later. So you need two SystemUI.apk files on your computer. You could name one “backup” if you'd like. So now now we need to decompile the apk. Go into the terminal/cmd and cd/chdir into the directory you have SystemUI.apk. Now type
Code:
apktool if SystemUI.apk
It will then install frameworkneeded.Then type:
Code:
apktool d SystemUI.apk
It will decompile the apk. It will take a bit of time for it to fully decompile. The decompiled code will be in a folder in your current directory called SystemUI. If It had errors decompiling, (IT WILL FOR MOST NEXTUS 7 ROMS) you will need to install framework manually. Download framework here:http://db.tt/Rpc6zskQ and place the two APK files into apktool framework folder (replace the old framework files). In Linux it is located at /home/yourusername/apktool/framework and in windows it is something like C:\\Documents And Settings\yourusername\apktool\framework. After that delete the SystemUI folder that was made by the bad decompiling proccess and repeat the decompile command.
STEP 4:
This is the part where you start modding. You can make many customizations to the UI this way as you probably know. I will just show you how to make a 100 percent battery mod. You need to go into the decompile folder (SystemUI) using a file manager, Then from SystemUI, go delete res/drawable/stat_sys_battery.xml and replace it with http://powerpoint45.webs.com/android/stat_sys_battery.xml (to download that file right click on link and click something like "save link as"). Now you need to move to a new directory: /res. In that folder you need to look through all the directories that start with the word drawable. For example drawable-mdpi. There is one directory that your device uses for images but you may not know which one. Your device might be MDPI but use drawable-sw600dp from the UI instead of drawable-mdpi. So if you dont know or you want to be safe then search through the drawable folders and if their are any battery icons then remember you will need to add 100 battery icons to each one of the folders with battery icons. The battery icons are the ones named something like stat_sys_battery_0.png. So if you need to add 100 icons they need to be named in numerical order from stat_sys_battery_0.png to stat_sys_battery_100.png. Dont worry though, you wont need to rename 100 icons. Their ar many battery mods online that you can get them from, but I have some images you can download: http://powerpoint45.webs.com/android/BATTERY_BLUE.tar.gz. Download it, extract it and copy all the images into all the drawable folders that contain battery icons. Now your ready for compiling; The step that is different than how we have always done it before Jelly Bean existed. keep in mind that some images can not be changed or edited at all durring this step because it will result with many errors durring compiling. You would have to add images to the archive after its compiled
STEP 5:
Like I said at the end of step 4, this step will be different than you have seen before. This is also the step where you will be using File Roller/7zip. To build the apk make sure you are in the terminal in the directory where SystemUI exists and type:
Code:
apktool b SystemUI almostdone.apk
almostdone.apk is the output file. Once it is done building you need to open the backup apk you made at the beginning with File Roller /7zip. Also open almostdone.apk with File Roller/7zip. From inside the backup.apk drag meta-inf folder & androidmanifest.xml to allmostdone.apk. Now all you need to do is zipalign the apk. Lets say your backup apk is named backup.apk. Go into the terminal at the directory you are working
in and type
Code:
zipalign -v 4 allmostdone.apk done.apk
This will optimize the apk. The output is done.apk.
STEP6:
Now you install the apk. Their are many meathods of installing the apk, here are a couple. Transfer done.apk to your device and rename it to SystemUI.apk. Now use a root browser or terminal app to replace the other SystemUI.apk on your system at /system/app. And make sure you give it the same permissions as all the other apk's in the system/app directory. Then reboot. Or you could make a flashable zip to install it.
Here is something I did:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Nice guide OP! Thanks!
Josepho1997 said:
Thanks. Even though I've known this for weeks because of you(thanks for helping me, btw). Just one thing. Why is it
Code:
sudo apt-get install openjdk-6-jre
Instead of
Code:
sudo apt-get install openjdk-7-jre
Click to expand...
Click to collapse
Just because a lot of distros including debian do not have jdk7 in their repository. But if its in your repository you can get jdk 7
Sent from my Amazon Kindle Fire using xda app-developers app
powerpoint45 said:
Just because a lot of distros including debian do not have jdk7 in their repository. But if its in your repository you can get jdk 7
Sent from my Amazon Kindle Fire using xda app-developers app
Click to expand...
Click to collapse
ok.
Thanks. Will try it.
midi_1996 said:
Thanks. Will try it.
Click to expand...
Click to collapse
Cool, tell me how it goes
Sent from my Amazon Kindle Fire using xda app-developers app
Updated op to work with nextus 7 roms
Sent from my Amazon Kindle Fire using xda app-developers app
Hi,
I tried doing exactly as you said, but when I copy the apk to system/app, the the is no jelly bean icon as on the stock systemui.apk, and my system ui crashed.
I followed your guide exactly.
Can someone please tell me what I have done wrong.
I was making a circle battery mod for the first n7.
I will upload the apk I made in a second when I go on my pc.
Thanks in advance
Cheers
Corey
Sent from my Nexus 7 using xda premium
fishingfon said:
Hi,
I tried doing exactly as you said, but when I copy the apk to system/app, the the is no jelly bean icon as on the stock systemui.apk, and my system ui crashed.
I followed your guide exactly.
Can someone please tell me what I have done wrong.
I was making a circle battery mod for the first n7.
I will upload the apk I made in a second when I go on my pc.
Thanks in advance
Cheers
Corey
Sent from my Nexus 7 using xda premium
Click to expand...
Click to collapse
here is the apk
fishingfon said:
Hi,
I tried doing exactly as you said, but when I copy the apk to system/app, the the is no jelly bean icon as on the stock systemui.apk, and my system ui crashed.
I followed your guide exactly.
Can someone please tell me what I have done wrong.
I was making a circle battery mod for the first n7.
I will upload the apk I made in a second when I go on my pc.
Thanks in advance
Cheers
Corey
Sent from my Nexus 7 using xda premium
Click to expand...
Click to collapse
Ok, did you change permissions of SystemUI.apk after you moved it to system/app. Also, sometimes it crashes due to a small misteak. Sometimes that happens to me, and when I completely redo it it works. Another thing, are you making a battery mod?
Sent from my Amazon Kindle Fire using xda app-developers app
powerpoint45 said:
Ok, did you change permissions of SystemUI.apk after you moved it to system/app. Also, sometimes it crashes due to a small misteak. Sometimes that happens to me, and when I completely redo it it works. Another thing, are you making a battery mod?
Sent from my Amazon Kindle Fire using xda app-developers app
Click to expand...
Click to collapse
Hi,
I had forgotten to reset the permissions.
The system ui now does not crash anymore.
But now I have a new problem.
The battery icons no longer appear in the status bar, the is no battery icon there at all now.
Do the icons have to be a certain resolution to work? If so, do u know what res the have to be?
I hav, attached a screen, as you can see, the icons no longer show.
Thanks again
Cheers
Corey
Sent from my Nexus 7 using xda premium
fishingfon said:
Hi,
I had forgotten to reset the permissions.
The system ui now does not crash anymore.
But now I have a new problem.
The battery icons no longer appear in the status bar, the is no battery icon there at all now.
Do the icons have to be a certain resolution to work? If so, do u know what res the have to be?
I hav, attached a screen, as you can see, the icons no longer show.
Thanks again
Cheers
Corey
Sent from my Nexus 7 using xda premium
Click to expand...
Click to collapse
Did u drag resources.arsc classes.dex and res/drawable/stat_sys_battery.xml to the origional apk after it compiled. No it doesnt realy need to be a certain resolution. Oh also did u zipalign
Sent from my Amazon Kindle Fire using xda app-developers app
powerpoint45 said:
Did u drag resources.arsc classes.dex and res/drawable/stat_sys_battery.xml to the origional apk after it compiled. No it doesnt realy need to be a certain resolution. Oh also did u zipalign
Sent from my Amazon Kindle Fire using xda app-developers app
Click to expand...
Click to collapse
Hi,
i managed to get it working.
i think you made a small mistake in your guide lol.
you said this:
almostdone.apk is the output file. Once it is done building you need to open the backup apk you made at the beginning with File Roller /7zip. Also open almostdone.apk with File Roller/7zip. From inside the backup apk drag resources.arsc and classes.dex to the root of almostdone.apk and it will replace resources.arsc that is in the apk. You are almost done. From inside almostdone.apk drag the res folder into the backup apk(file roller sometimes has problems moving a whole folder so make sure that the size is updated and the edited images are moved). Now all you need to do is zipalign the apk. Lets say your backup apk is named backup.apk. Go into the terminal at the directory you are working in and type
Where as it should have been:
almostdone.apk is the output file. Once it is done building you need to open the backup apk you made at the beginning with File Roller /7zip. Also open almostdone.apk with File Roller/7zip. From inside the almostdone.apk drag resources.arsc and classes.dex to the root of backup.apk and it will replace resources.arsc that is in the apk. You are almost done. From inside almostdone.apk drag the res folder into the backup apk(file roller sometimes has problems moving a whole folder so make sure that the size is updated and the edited images are moved). Now all you need to do is zipalign the apk. Lets say your backup apk is named backup.apk. Go into the terminal at the directory you are working
in and type
Sorry for all my noobish qustions
Cheers
Corey
fishingfon said:
Hi,
i managed to get it working.
i think you made a small mistake in your guide lol.
you said this:
almostdone.apk is the output file. Once it is done building you need to open the backup apk you made at the beginning with File Roller /7zip. Also open almostdone.apk with File Roller/7zip. From inside the backup apk drag resources.arsc and classes.dex to the root of almostdone.apk and it will replace resources.arsc that is in the apk. You are almost done. From inside almostdone.apk drag the res folder into the backup apk(file roller sometimes has problems moving a whole folder so make sure that the size is updated and the edited images are moved). Now all you need to do is zipalign the apk. Lets say your backup apk is named backup.apk. Go into the terminal at the directory you are working in and type
Where as it should have been:
almostdone.apk is the output file. Once it is done building you need to open the backup apk you made at the beginning with File Roller /7zip. Also open almostdone.apk with File Roller/7zip. From inside the almostdone.apk drag resources.arsc and classes.dex to the root of backup.apk and it will replace resources.arsc that is in the apk. You are almost done. From inside almostdone.apk drag the res folder into the backup apk(file roller sometimes has problems moving a whole folder so make sure that the size is updated and the edited images are moved). Now all you need to do is zipalign the apk. Lets say your backup apk is named backup.apk. Go into the terminal at the directory you are working
in and type
Sorry for all my noobish qustions
Cheers
Corey
Click to expand...
Click to collapse
Oh. God Thank you for pointing that out. Fixed op.Appreciate it. I just got mixed up wich is wich lol
Sent from my Amazon Kindle Fire using xda app-developers app
you do know you kinda have this backwards and to be fair rather confusing
i dont know why you mess around copying all classes&resources&res from your almostdone.apk
the way i used to do it when theming for the htc hero system apps was
do your mods
apktool b SystemUI almostdone.apk
then open your SystemUIbackup.apk & copy the meta-inf folder & androidmanifest.xml
inject them into your almostdone.apk
zipalign -v 4 almostdone.apk SystemUI.apk
adb remount
adb push SystemUI.apk /system/app/
adb reboot
has always worked for me
seems miles easier than copying the hundreds of files in all the other folders
bagofcrap24 said:
you do know you kinda have this backwards and to be fair rather confusing
i dont know why you mess around copying all classes&resources&res from your almostdone.apk
the way i used to do it when theming for the htc hero system apps was
do your mods
apktool b SystemUI almostdone.apk
then open your SystemUIbackup.apk & copy the meta-inf folder & androidmanifest.xml
inject them into your almostdone.apk
zipalign -v 4 almostdone.apk SystemUI.apk
adb remount
adb push SystemUI.apk /system/app/
adb reboot
has always worked for me
seems miles easier than copying the hundreds of files in all the other folders
Click to expand...
Click to collapse
I'll look into it once im back from vacation.That will probably work and make it less confusing
Sent from my Galaxy Nexus using xda app-developers app
powerpoint45 said:
I'll look into it once im back from vacation.That will probably work and make it less confusing
Sent from my Galaxy Nexus using xda app-developers app
Click to expand...
Click to collapse
The link for framework is broken. Any new link?
vaibhav palande said:
The link for framework is broken. Any new link?
Click to expand...
Click to collapse
Ok thanks. Ill fix it. Here is a link. http://db.tt/Rpc6zskQ
Sent from my Galaxy Nexus using xda app-developers app
I am getting error while recompiling theme chooser theme.. Here is the log:
PHP:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
c:\4nec2>apktool b 12345 done.apk
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building resources...
c:\4nec2\12345\res\values\styles.xml:98: error: Error retrieving parent for item
: No resource found that matches the given name '@android:style/TextAppearance.S
tatusBar'.
c:\4nec2\12345\res\values\styles.xml:99: error: Error retrieving parent for item
: No resource found that matches the given name '@android:style/TextAppearance.S
tatusBar'.
c:\4nec2\12345\res\values\styles.xml:119: error: Error retrieving parent for ite
m: No resource found that matches the given name '@android:style/TextAppearance.
StatusBar.Ticker'.
c:\4nec2\12345\res\values\styles.xml:123: error: Error retrieving parent for ite
m: No resource found that matches the given name '@android:style/TextAppearance.
StatusBar'.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Vaibhav\AppData\Local\Temp
\APKTOOL7356544712132047658.tmp, -x, -I, C:\Users\Vaibhav\apktool\framework\1.ap
k, -S, c:\4nec2\12345\res, -M, c:\4nec2\12345\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:251)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:325)
at brut.androlib.Androlib.buildResources(Androlib.java:270)
at brut.androlib.Androlib.build(Androlib.java:193)
at brut.androlib.Androlib.build(Androlib.java:175)
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\Vaibhav\AppData\Local\Temp\APKTOOL7356544712132047658.tmp, -x, -I, C:\Users
\Vaibhav\apktool\framework\1.apk, -S, c:\4nec2\12345\res, -M, c:\4nec2\12345\And
roidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:249)
... 6 more
c:\4nec2>
While decompiling it worked perfectly but recompiling got stuck. Any solution?
---------- Post added at 11:53 PM ---------- Previous post was at 11:38 PM ----------
EDIT: IT WORKED WITH NEW FRAMEWORK FILES. THANX FOR THE NEW LINK:good::good::good:
Hi guys,
Sorry for asking this question here, but I don't have privileges for writing on the Developer threads.
I am looking for a way to rename the original Viber package name so that I can install two viber applications on one device.
I've decompiled the application and changed the "package name" in the AndroidManifest.xml file, also the "cur_package" and "original_package" in the yml file to the new package name, but it gives me the following error on Recompiling:
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.Androl
ibException: brut.common.BrutException: could not exec command: [aapt, p, --min-
sdk-version, 9, --target-sdk-version, 15, -F, .....\Temp\APKTOOL130542784550865622.tmp, -0, arsc, -I, ...\apktool\framew
ork\1.apk, -S, viber.apk\res, -M
, ...\viber.apk\AndroidManifest.xml]
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:353)
at brut.androlib.Androlib.buildResources(Androlib.java:281)
at brut.androlib.Androlib.build(Androlib.java:209)
at brut.androlib.Androlib.build(Androlib.java:177)
at brut.apktool.Main.cmdBuild(Main.java:237)
at brut.apktool.Main.main(Main.java:79)
I know that this is not the right thread to post this, but I am hoping that the admins, will move it where it belongs.
Not sure what your talking about but if you have the project source file to rename is actually easy
PHP:
go and edit the manifest.
remove every old package name in the manifest.
put instead of the old package name, the new package name in every location inside the manifest. You might have classes(Activities that is) that need direct package name references.
save the manifest.
Then Right click the package name inside the project.
Select "Refactor".
Select "Rename".
Type the new package name.
select "update references".
press OK and your done and watch out also what should be done to replace the new name.
DON'T forget to update also the layout xml files with the new package name. you might have a custom View. look for them.
I found that online just with a few clicks. Let me know if that helps.
astroSkills said:
Not sure what your talking about but if you have the project source file to rename is actually easy
PHP:
go and edit the manifest.
remove every old package name in the manifest.
put instead of the old package name, the new package name in every location inside the manifest. You might have classes(Activities that is) that need direct package name references.
save the manifest.
Then Right click the package name inside the project.
Select "Refactor".
Select "Rename".
Type the new package name.
select "update references".
press OK and your done and watch out also what should be done to replace the new name.
DON'T forget to update also the layout xml files with the new package name. you might have a custom View. look for them.
I found that online just with a few clicks. Let me know if that helps.
Click to expand...
Click to collapse
I don't have the real source code of Viber, what I did is I decompiled the application with "android-apktool". I think that you are talking about if I have the project opened in some IDE and I have control over the source code.
Hindski said:
I don't have the real source code of Viber, what I did is I decompiled the application with "android-apktool". I think that you are talking about if I have the project opened in some IDE and I have control over the source code.
Click to expand...
Click to collapse
You need to change all package name references in the smali folder as well. This link will walk you through it.
http://forum.xda-developers.com/showthread.php?t=2760965
[HOW TO][GUIDE][MOD] Change Package Names of APKs
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
149ThemedGoogleKeyboards!!!!!!
If you root your phone, you need to know this!!
MyColorScreen
Shaftamle said:
You need to change all package name references in the smali folder as well. This link will walk you through it.
http://forum.xda-developers.com/showthread.php?t=2760965
[HOW TO][GUIDE][MOD] Change Package Names of APKs
Sent from a Shaftamle Galaxy S4
"Thanks Button" is always appreciated!
149ThemedGoogleKeyboards!!!!!!
If you root your phone, you need to know this!!
MyColorScreen
Click to expand...
Click to collapse
Thank you for your proposal, I've tried it and when I recompile Viber, sign the apk and install it, the application is crashing all the time. It is not stable at all. Do you have any other articles, I can look into?
Hindski said:
Thank you for your proposal, I've tried it and when I recompile Viber, sign the apk and install it, the application is crashing all the time. It is not stable at all. Do you have any other articles, I can look into?
Click to expand...
Click to collapse
Hello, friend.
You found a way how to recompile the application ??
I mean it Viber.
I want something to do with this app but it does not work.
After installing the app just does not start or starts but falls
succeeded ?
have any of you guys figured out on how to do this ?
i want to use 2 viber accounts on my phone w/o root.
A lot of things that you have to do to rename it.
1. App decompile into a new project.
2. Change app package using defactor.
3. Change it in Manifest.xml
4. Change it in Gradle file.
5. I believe that Viber using lib.so, it will be quite difficult to change function name in .so library. Google how to do it because it's quite complicate and you will need some special tools and you will be able to read some bytecode.
Brgs,