[REQUEST][MOD] enable android SIP stack - Verizon Samsung Galaxy S III

UPDATED 8/15 !!!
Original Post:
The method explained here: http://forum.xda-developers.com/showthread.php?t=1109962
works for SGS II but not the III. I have copied the xml sip permissions file to /system/etc/permissions, and I have decompiled framework-res.apk, where the res/values/bools.xml file already reads
Code:
<bool name="config_sip_wifi_only">false</bool>
<bool name="config_built_in_sip_phone">true</bool>
I've looked over the rest of framework-res.apk and can't find anything. Verizon must be blocking this somewhere else.. any ideas??
Click to expand...
Click to collapse
---------------------------
My own research/efforts:
I have added /etc/permissions/android.software.sip.voip.xml from a sprint Galaxy S III (its the same on all versions, its only like 4 lines) and set permissions to rw-r--r--
I have replaced my deodexed SecPhone.apk and SecContacts.apk with deodexed Sprint ones. These run fantastically (no FCs anywhere). I've also double checked the boolean values in framework-res.apk which allow SIP (as previously stated)
PROGRESS
By installing the xml SIP permissions file and then editing build.prob to imitate the sprint model:
Code:
ro.product.model=LPH-L710
ro.product.name=d2spr
ro.product.device=d2spr
or the Galaxy Nexus:
Code:
ro.product.model=Galaxy Nexus
ro.product.name=yakju
ro.product.device=maguro
it opens up the "internet call options" submenu within the dialer options. You now have sip calling... Over wifi only though, as this wipes out your data connection.
In order to keep data working, you must set set the model, name, and device to be something from verizon, which in turn disables SIP calling. It is a vicious cycle.
Therefore, in order to use SIP calling on the Verizon Galaxy S III we must either use an AOSP ROM or find where this check is occuring in smali and remove it or make it constantly return true. However, I have no clue where it could be...

preusstang said:
The method explained here: http://forum.xda-developers.com/showthread.php?t=1109962
works for SGS II but not the III. I have copied the xml sip permissions file to /system/etc/permissions, and I have decompiled framework-res.apk, where the res/values/bools.xml file already reads
Code:
<bool name="config_sip_wifi_only">false</bool>
<bool name="config_built_in_sip_phone">true</bool>
I've looked over the rest of framework-res.apk and can't find anything. Verizon must be blocking this somewhere else.. any ideas??
Click to expand...
Click to collapse
just looking at it rather quickly, the way sip stack works in ICS is different than gingerbread. The guide you have is for gingerbread. You will need to find a guide that supports ICS. I would help you with this, but I already have to many projects on my table.

nosympathy said:
just looking at it rather quickly, the way sip stack works in ICS is different than gingerbread. The guide you have is for gingerbread. You will need to find a guide that supports ICS. I would help you with this, but I already have to many projects on my table.
Click to expand...
Click to collapse
That's the thing. There are none. The menu shows up fine on the i9300. I have a copy of their SecPhone.apk that I'm looking at now.
I'm having some trouble with apktool and apk manager tho, whenever I extract, I'm not seeing the "res/values/" folder or the smali folder.

preusstang said:
That's the thing. There are none. The menu shows up fine on the i9300. I have a copy of their SecPhone.apk that I'm looking at now.
I'm having some trouble with apktool and apk manager tho, whenever I extract, I'm not seeing the "res/values/" folder or the smali folder.
Click to expand...
Click to collapse
What version of apktools are you using?
Sent from my SCH-I535 using xda app-developers app

nosympathy said:
What version of apktools are you using?
Sent from my SCH-I535 using xda app-developers app
Click to expand...
Click to collapse
ok so I now have apktool 1.4.3, with the windows helper files - apktool.bat and aapt.exe.
Code:
C:\apktool-1.4.3>apktool d originals/framework-res.apk
I: Loading resource table...
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\apktool-1.4.3>
decompiles everything fine. including the values/ xml files. I still see no smali folder though. how do you get access to that?
also, im not able to recompile the apk. its decompiled to framework-res/, but trying to build it results in epic failure:
Code:
C:\apktool-1.4.3>apktool b framework-res
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/drawable-sw3
20dp-hdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/drawable-sw3
20dp-w533dp-hdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/drawable-sw3
60dp-hdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/drawable-sw3
60dp-w640dp-hdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/drawable-sw3
60dp-w640dp-xhdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/drawable-sw3
60dp-xhdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/drawable-sw6
00dp-xhdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/layout-sw320
dp
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/layout-sw320
dp-hdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/layout-sw320
dp-w533dp-hdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/layout-sw360
dp
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/layout-sw360
dp-hdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/layout-sw360
dp-w640dp-hdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/layout-sw360
dp-xhdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/layout-sw600
dp
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/layout-w600d
p
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-h720d
p
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-sw320
dp
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-sw320
dp-hdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-sw360
dp
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-sw360
dp-hdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-sw360
dp-xhdpi
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-sw600
dp
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-sw600
dp-land
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-sw600
dp-w1024dp
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-sw600
dp-w1280dp
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-w360d
p
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-w480d
p
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-w500d
p
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-w600d
p
invalid resource directory name: C:\apktool-1.4.3\framework-res\res/values-w720d
p
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Kyle\AppData\Local\Temp\AP
KTOOL3864608409932162932.tmp, -x, -S, C:\apktool-1.4.3\framework-res\res, -M, C:
\apktool-1.4.3\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\Kyle\AppData\Local\Temp\APKTOOL3864608409932162932.tmp, -x, -S, C:\apktool-
1.4.3\framework-res\res, -M, C:\apktool-1.4.3\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
C:\apktool-1.4.3>
for some reason the program is changing directory backslashes to slashes midway, but those directories it mentions do not exist. more importantly, I don't know what is causing the error with exec'ing aapt - aapt.exe runs fine and is in my PATH.
any ideas? thanks for your help.
EDIT: if i run the failed exec command manually:
Code:
aapt p -F C:\Users\Kyle\AppData\Local\Temp\APKTOOL7789083448626722688.tmp -x -S C:\apktool-1.4.3\framework-res\res -M C:\apktool-1.4.3\framework-res\AndroidManifest.xml
I get more directory errors, but these directories really do exist.

Can someone tell me what sip is?
Sent from my SCH-I535 using xda premium

SIP = Session Initiation Protocol.
The short of it - VoIP (GTalk/Voice, Vonage, etc).
Stock Android supports it natively since 2.3.x.

I'm not sure if this would help but I found that there's an option in AnyCut:
Activity
Sip settings
I'd create a shortcut on the home screen to this and try setting up your sip account credentials
My phone gives me the option, I just have no sip account to my knowledge
Afterwards, I've read you should go to the Dialer settings to enable ask each call.
Sent from my SCH-I535

Josolanes said:
I'm not sure if this would help but I found that there's an option in AnyCut:
Activity
Sip settings
I'd create a shortcut on the home screen to this and try setting up your sip account credentials
My phone gives me the option, I just have no sip account to my knowledge
Afterwards, I've read you should go to the Dialer settings to enable ask each call.
Sent from my SCH-I535
Click to expand...
Click to collapse
the sip settings dialog that shows when you use the anycut widget is a big part of the sip calling. it allows you to set up accounts and register them, it then says its receiving calls but it doesn't.. Here's what the menu(s) look like:
{
"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"
}
However, the actual call settings menu still lacks the buttons required to set up/allow dialing out with SIP.
because that internet calling section is missing, this dialog is never presented:
I have tried decompiling the SecPhone.apk from nosympathys stock OTA VRALG (deodexed) rom and get errors:
Code:
C:\apktool>apktool d SecPhone.apk
I: Baksmaling...
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78
0a 30 33 36 00
at org.jf.dexlib.DexFile.(DexFile.java:377)
at org.jf.dexlib.DexFile.(DexFile.java:274)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:48)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)
C:\apktool>
I've also tried replacing our SecPhone.apk with one from the i9300, obtained here:
http://forum.xda-developers.com/showthread.php?t=1706310
(in the posted zip file)
but it results in mad FC's. I'm not sure what else to do here..
EDIT: all screens were stolen from http://blog.brightpointuk.co.uk/setting-sip-voip-account-samsung-galaxy-s-iii

Any further progress on this. I am really interested to try this out. However, my knowledge of modding things is somewhat limited.

joebob296 said:
Any further progress on this. I am really interested to try this out. However, my knowledge of modding things is somewhat limited.
Click to expand...
Click to collapse
Unfortunately, no. It seems the community here [is used to getting bent over backwards by verizon and/or doesn't know about the awesome benefits of SIP(!) and] is not interested in making/receiving FREE calls nationwide with their Google voice # or another outward trunk to the PSTN (public switched telephone network)
Instead of actually modifying our touchwiz dialer (or installing other carriers' GS III touchwiz dialer) I think we have a better chance of some dev around here building an ASOP dialer from source. But I think that also necessitates an ASOP build of the contacts app.

Could we use the dialer from cm9/10 giant that aosp? I don't know if we could use that apk or have to modify it to use on a stock touchwiz ROM.
Edit: Or maybe the sprint app if they have that feature still open to them.
Sent from my SCH-I535 using xda app-developers app

joebob296 said:
Could we use the dialer from cm9/10 giant that aosp? I don't know if we could use that apk or have to modify it to use on a stock touchwiz ROM.
Edit: Or maybe the sprint app if they have that feature still open to them.
Sent from my SCH-I535 using xda app-developers app
Click to expand...
Click to collapse
Good thinking. I'm not sure why I didn't see that.. I'll extract them from one of the CM builds tonight. I'm still unsure though of exactly what apks need copied out.

update:
I made a zip which removed SecPhone, SecTelephonyProvider, SecContacts, and SecContactsProvider and installed:
Phone.apk
TelephonyProvider.apk
Contacts.apk
ContactsProvider.apk
all from invisiblek's cm9 build. this caused mad FC's with the gallery, messaging, sync service, and google.process.gapps.
fail somewhat of a learning experience though.
I'm now gonna try installing the "Sec" apks from a sprint ROM. *crosses fingers*

if you have google voice here is an awesome app for talking for free. its well setup.. its called groove ip and you can get it here..
https://play.google.com/store/apps/details?id=com.gvoip&hl=en
i have been using it for a long time now, never fails

mrbracht said:
if you have google voice here is an awesome app for talking for free. its well setup.. its called groove ip and you can get it here..
https://play.google.com/store/apps/details?id=com.gvoip&hl=en
i have been using it for a long time now, never fails
Click to expand...
Click to collapse
It is a good app and works very well. its just disappointing that you need to download a 3rd party app for something that the android OS already provides for. And verizon is the only carrier to do this. isn't surprising tho..

preusstang said:
It is a good app and works very well. its just disappointing that you need to download a 3rd party app for something that the android OS already provides for. And verizon is the only carrier to do this. isn't surprising tho..
Click to expand...
Click to collapse
Verizon is pretty much a joke. I still can't believe they get away with all the **** they do
Sent from my SCH-I535 using Tapatalk 2

preusstang said:
update:
I made a zip which removed SecPhone, SecTelephonyProvider, SecContacts, and SecContactsProvider and installed:
Phone.apk
TelephonyProvider.apk
Contacts.apk
ContactsProvider.apk
all from invisiblek's cm9 build. this caused mad FC's with the gallery, messaging, sync service, and google.process.gapps.
fail somewhat of a learning experience though.
I'm now gonna try installing the "Sec" apks from a sprint ROM. *crosses fingers*
Click to expand...
Click to collapse
Yea I'm learning to. I read today that the dialer app relies on more then just the app itself if I recall correctly we have to change some framework files. So we would have to modify more then just the app. But I think that an app with that already allows sip calling would be a good place to start. I think that we would have a better chance using sprints stock dialer if they have it enabled, because that should be based on touchwiz.
Sent from my Galaxy Nexus using xda app-developers app
---------- Post added at 02:30 AM ---------- Previous post was at 02:20 AM ----------
mrbracht said:
if you have google voice here is an awesome app for talking for free. its well setup.. its called groove ip and you can get it here..
https://play.google.com/store/apps/details?id=com.gvoip&hl=en
i have been using it for a long time now, never fails
Click to expand...
Click to collapse
How is the voice quality over 3g/4g? Any complaints about the app?
Sent from verizons soon to be unlocked galaxy s3

joebob296 said:
Yea I'm learning to. I read today that the dialer app relies on more then just the app itself if I recall correctly we have to change some framework files. So we would have to modify more then just the app. But I think that an app with that already allows sip calling would be a good place to start. I think that we would have a better chance using sprints stock dialer if they have it enabled, because that should be based on touchwiz.
Sent from my Galaxy Nexus using xda app-developers app
---------- Post added at 02:30 AM ---------- Previous post was at 02:20 AM ----------
How is the voice quality over 3g/4g? Any complaints about the app?
Sent from verizons soon to be unlocked galaxy s3
Click to expand...
Click to collapse
None what so ever. Loving it to be honest, been using it for a while now
Sent from my SCH-I535 using Tapatalk 2

I've been debating whether or not to try it. Right now I use talkatone which was free for 3g/4g calling but I've had issues with it recently.
Sent from Verizon's soon to be unlocked Galaxy S3.

Related

Trying to change status_bar.xml but aapt keeps inserting zero bytes?

Hi,
I was trying to modify status_bar.xml in framework-res.apk. I downloaded the source from git, and started changing the xml files. Then I used aapt to package them into an apk. However, when I move the binary status_bar.xml to some other framework-res.apk that worked before, I get stuck in a boot loop. I compared both status_bar.xml's in a hex editor, and it seems aapt inserted a lot of zero bytes (see screenshot, left the new one, right is the working one), at first I thought it might have something to do with UTF-8, but setting another encoding didn't do anything. Anyone know what I'm doing wrong here?
Yeah, you're right, file on the right was built using new encoding introduced in Froyo and it can't work on Android <= 2.1 . It's used when you set minSdkVersion to 8.
But you said, that this one is ok and that normal encoding ("normal", cause it was here for last 2 years) on the left isn't working. I don't really know, why.
Brut.all said:
Yeah, you're right, file on the right was built using new encoding introduced in Froyo and it can't work on Android <= 2.1 . It's used when you set minSdkVersion to 8.
But you said, that this one is ok and that normal encoding ("normal", cause it was here for last 2 years) on the left isn't working. I don't really know, why.
Click to expand...
Click to collapse
The status_bar.xml on the right is from this AOSP Desire rom. I just tried to built it with minSdkVersion set to 8 and it seems to work. Thanks for the help!
Got one more question on the subject. It's working now, in the sense that I edit the XML file, use aapt to build an apk, then move the binary xml to the original framework-res.apk. When I try to sign the homebuilt framework-res.apk and boot my phone it goes into a boot loop. Is there any way that you can replace framework-res.apk without resigning all other apps?
I think you must install it through an update.zip file.
And right you are. Thank you very much
And here I am again. It does seem to work, signing it and putting it into an update.zip, however, when I boot my phone, it gets to the sim unlock screen, and it starts FCing. Logcat has the following messages:
Code:
W/PackageManager( 400): Unknown permission android.permission.VIBRATE in package com.google.android.gsf
W/PackageManager( 400): Unknown permission android.permission.WAKE_LOCK in package com.google.android.gsf
W/PackageManager( 400): Unknown permission android.permission.WRITE_CONTACTS in package com.google.android.gsf
Basically it shows these messages for all applications, for all permissions. The weird thing is, I tried this yesteray, right after your post and it worked fine. But now it doesn't work anymore. This is, by the way, the newest framework-res.apk from git, no changes.

Modifying .xml's that are encoded into resources.arsc

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...

[COMPLETE GUIDE] decompiling, theming, and recompiling JB SystemUI.apk [Jelly Bean]

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:

[Q/A][REF] All About Theming/Modding [GUIDE]

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.

Recompiling Viber apk with different package name

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,

Categories

Resources