New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
llorn
Old
(Last edited by llorn; 8th April 2012 at 04:45 AM.) Reason: added more detailed instructions
#1  
Member - OP
Thanks Meter 42
Posts: 96
Join Date: Jul 2011
Default [TIP] [FROYO] How to change the carrier name

Here's how to change the carrier name in the Triumph. I ran across this while looking for some other strings.

You will need to decompile framework-res.apk, make your changes, and then recompile it. If you don't know how to decompile the file, I recommend that you read this great thread on XDA written by KBanause; he gives you links to the tools that you will need as well as walking you through making theming edits:

http://forum.xda-developers.com/show...40&postcount=1

The steps below will assume that you are using apkmanager:

1. Decompile framework-res.apk using apkmanager.

1a. To do that, place the framework-res.apk file into the place-apk-here-for-modding folder.

1b. Start apkmanager. In Windows, double-click on the script.bat file in the main apkmanager folder. I'm not sure what you would type to start apkmanager in another OS since I haven't used this in any other OS at this time.

1c. In APKMANAGER, hit 22 and select the number for your framework-res.apk file -- if it is the only file in the place-apk-here-for-modding folder, it should be 1.

1d. Back on the main menu, select 9 to decompile framework-res.apk.

2. Once, the decompile is complete, browse to the projects folder in apkmanager and you should now have a new folder inside named framework-res.apk. Look inside the framework-res.apk folder and you should now be able to find the subfolder \res\values . This folder ONLY shows up if you decompile framework-res.apk.

3. Find strings.xml in that folder and open it in a text editor such as notepad++ or such. I don't recommend using the built-in Notepad in windows.

4. Find the line:

<string name="roamingText1">Virgin Mobile</string>

Change the "Virgin Mobile" to whatever you want. For example, changing this to:

<string name="roamingText1">Save the tatas</string>

5. After making your changes, recompile framework-res.apk.

5a. In apkmanager, use option 11 to recompile.

5b. When asked if this is a system file, select Yes.

5c. When asked if you want to copy over additional files, click Yes and it will extract the files into a folder named Keep in apkmanager and then pause.

5d. Go into the Keep folder and delete any files that you changed, in this case you only need to delete the resources.arsc since the only thing you changed was the strings.xml file.

5d. Back on the apkmanager screen, hit the space bar or Enter to continue.

5e. A file named unsignedframework-res.apk will be created in the place-apk-here-for-modding folder. You'll need to rename it back to framework-res.apk.

6. Either adb push the new framework-res.apk back into your phone or put it in a flashable Zip file and flash it in recovery.
6a. For anyone wanting to put their new file into a flashable zip, I've attached an empty Zip file in this thread. Add your new framework-res.apk file into the \system\framework folder. Make sure that you have your Zip utility set to just use the Store or No Compression method. You do not need to change anything in the META-INF folder for just this simple flash. Note: the updater script in the zip file mounts the file system as ext3 so I don't know how well that will work if your file system is ext4.

This results in the changes on the lockscreen and the extended status screen:


Attached Files
File Type: zip flashable-zip.zip - [Click for QR Code] (155.6 KB, 157 views)
The Following 3 Users Say Thank You to llorn For This Useful Post: [ Click to Expand ]
 
primetechv2
Old
#2  
primetechv2's Avatar
Senior Member
Thanks Meter 131
Posts: 342
Join Date: Nov 2010
Location: Wisconsin
So would this allow me to change your ROM's carrier text? Because I haven't found a version of apktool (or a deodexed ROM) that has allowed me to decompile and recompile a framework-res.apk yet.
 
llorn
Old
(Last edited by llorn; 21st September 2011 at 06:36 PM.) Reason: updated apk manager link
#3  
Member - OP
Thanks Meter 42
Posts: 96
Join Date: Jul 2011
Quote:
Originally Posted by primetechv2 View Post
So would this allow me to change your ROM's carrier text? Because I haven't found a version of apktool (or a deodexed ROM) that has allowed me to decompile and recompile a framework-res.apk yet.
It depends on what version of apktool/apkmanager that you're using. Without knowing that, I can't say if you'll be successful or not.

I'm doing all of this on Windows.

Edit: Apparently APK Manager has a version 5.0 released. Linking it here instead of the original 4.9 that was linked before (thanks to one_love on sdx for pointing that out to me):
http://forum.xda-developers.com/show...98&postcount=1

However, I was always getting an error with the version of apktool 1.4.1 built into that APK Manager. I upgraded the APKTOOL to an unreleased version 1.4.2.26970b.jar which you can download from brut.all on his google code site. He provides it in one of the issues that somebody reported here:

http://code.google.com/p/android-apk...wner%20Summary

Just download the apktool1.4.2.269870b.jar from the link brut.all provides and then rename it to apktool.jar and then replace the version in apkmanager in the OTHER folder with the updated one.

I also downloaded the latest version of appt.exe and apktool.bat that is on brut.all's download area (they are contained in the apk install downloads (download the appropriate one for your os) and replaced the respective files in the "other" folder of apk manager:

http://code.google.com/p/android-apktool/downloads/list

That took care of all of my errors decompiling/recompiling framework-res.apk (except of course for user errors).

If that doesn't solve your issue, post your log file of errrors here or on the apk manager thread and perhaps somebody can help you/give you suggestions.
The Following User Says Thank You to llorn For This Useful Post: [ Click to Expand ]
 
primetechv2
Old
(Last edited by primetechv2; 21st September 2011 at 05:54 AM.)
#4  
primetechv2's Avatar
Senior Member
Thanks Meter 131
Posts: 342
Join Date: Nov 2010
Location: Wisconsin
o.o

I didn't know all that was there... it should keep me busy for a little while, at least. Many many thanks. It sounds like 1.4.2 should be the build that fixes all my problems.
 
boomersooner25
Old
#5  
boomersooner25's Avatar
Junior Member
Thanks Meter 2
Posts: 20
Join Date: Aug 2011
how or where do you get the framework?
 
primetechv2
Old
#6  
primetechv2's Avatar
Senior Member
Thanks Meter 131
Posts: 342
Join Date: Nov 2010
Location: Wisconsin
You can either get it from a root file manager (like File Expert, Astro, Root Explorer), by navigating to /system/framework and getting framework-res.apk,

or by executing the following command from your command line (provided you have Android SDK and its platform tools installed):

Code:
adb pull /system/framework/framework-res.apk
Either of these will give you a working framework resource file to work with. (Umm... if it's not framework-res.apk, do this with the different filename.)

From there, use APKTool to decompile the whole file via the command line again...

Code:
apktool d framework-res.apk (or whatever the file be).
Once you've edited the contents to your liking, run the following to build the folder back into a workable framework-res...

Code:
apktool b framework-res framework-res.apk
If you changed the source (you did), also make sure you sign the new apk file... in this case find testsign.bat (and testsign.jar etc) and run the following:

Code:
testsign framework-res.apk
From there, getting framework-res.apk back can be a bit of a hassle. I have no evidence it can be done just by returning the file to the /system directory, and a few people have recommended throwing it into an update.zip package. If you find this to be an effective method, I'd recommend stealing b_randon14's stock Triumph ROM, opening it, replacing the framework-res.apk with your own, and then rezipping it (no signature is necessary here).

Need more info? lol. If you're confused feel free to PM me or one of the real gurus here.
The Following User Says Thank You to primetechv2 For This Useful Post: [ Click to Expand ]
 
boomersooner25
Old
#7  
boomersooner25's Avatar
Junior Member
Thanks Meter 2
Posts: 20
Join Date: Aug 2011
Thank you kind sir, i successfully changed the carrier name.
 
primetechv2
Old
#8  
primetechv2's Avatar
Senior Member
Thanks Meter 131
Posts: 342
Join Date: Nov 2010
Location: Wisconsin
Quote:
Originally Posted by boomersooner25 View Post
Thank you kind sir, i successfully changed the carrier name.
Congrats! I probably shoulda just asked if you wanted me to do it for ya instead of writing a mini-tutorial. But it was fun.
The Following User Says Thank You to primetechv2 For This Useful Post: [ Click to Expand ]
 
boomersooner25
Old
(Last edited by boomersooner25; 9th October 2011 at 04:06 AM.)
#9  
boomersooner25's Avatar
Junior Member
Thanks Meter 2
Posts: 20
Join Date: Aug 2011
You see to know a lot primetech..u should make your own rom
 
rukin5197
Old
#10  
rukin5197's Avatar
Senior Member
Thanks Meter 760
Posts: 815
Join Date: Jul 2011
Location: Shepherdsville

 
DONATE TO ME
Thank you for this