[Q] How to edit Sony ICS Callscreen? - Xperia Arc Q&A, Help & Troubleshooting

I'm trying to edit the positions of the graphics on this screen, but I can't find the specific strings in the code. I looked after the name of the different images and found them in the drawable-hdpi folder, but a string containing the filename does not exist!
I searched in framework-res.apk & SemcPhone.apk. I can change the graphics if I move them into the .apk's, but I want to change the location of the slider background for example. Can someone help me? Where do I have to start?

decompile "SemcPhone.apk",
Use:
$ astro grep
$ beyond compare
You can edit images via gimp, and move values via dimens.xml...

Related

[App] RGUber v1.21a, RGUOrder v1.4

Purpose:
This purpose of this VBScript is to process and organize data in RGU/REG files to remove duplicates, identify faulty entries, and move entries to ascending alphabetical order (the same way it is displayed in a registry editor).
Requirements:
Windows Scripting Host (included in most versions of windows)
rgucomp.exe and cereg400.dll located somewhere in your path (same folder as the script probably won't work if the script is run from another folder)
.reg and .rgu files are expected to be UTF-16LE with BOM
Usage:
Drag a .rgu, .reg, or .hv onto RGUber.vbs OR run "wscript.exe RGUber.vbs example.rgu"
Details:
When an rgu|reg file is specified, RGUber will:
1) create backup of input file
2) rename input file to boot.rgu
3) use rgucomp to convert it to *.hv
4) use rgucomp to convert new .hv to original rgu path\name
5) Reorder all keys in ascending alphabetical order and all values for each key in ascending alphabetical order with default value first
When an hv file is specified, RGUber will:
1) use rgucomp to convert it to *.rgu
2) Reorder all keys in ascending alphabetical order and all values for each key in ascending alphabetical order with default value first
Options
Open RGUber.vbs in your favorite text editor. All options are set at the beginning with (hopefully) meaningful descriptions.
Code:
'//Path to rgucomp (leave this as default if rgucomp.exe is located in your system path)
Const RGUCOMP = "rgucomp.exe"
'//Path to notepad, only needed if %OPENAFTER% is true
Const NOTEPAD = "notepad.exe"
'//The following options can be set to True/False or 0/1
'//Organize registry entries in ascending alphabetical order
Const REORDER = True
'//Open in %NOTEPAD% after conversion is done
Const OPENAFTER = False
'//Save any errors from rgu -> hv conversion
Const LOGERRORS = True
'//Save a backup copy of %INPUTRGU% as "%INPUTRGU%_Backup.rgu"
Const BACKUPRGU = True
Other info
If target file already exists, RGUber will ask if you want to overwrite.
Text files (the MS way) typically contain CRLF for next line. Output from rgucomp.exe contains many CRCRLF. RGUber removes the extra CR.
I have very few comments in the code. If requested, I will upload another copy with as many detailed comments as I can manage.
I tried to code this as efficiently as VBScript can possibly be. I kept getting errors when trying to run 'rgucomp.exe -b -nologo' so instead of running it directly, RGUber creates a bat file, executes it, then deletes it.
On my AMD Phenom 9600 with Vista64 and 3 SATA in Raid5, RGUber completes rgu->hv->rgu of 2084 lines in <3s
RGUber always saves output from rgu->hv conversion but deletes the file if there were no errors.
RGUber crashes on files with no reg entries (e.g. empty app.reg in an EXT package that does not add any registry entries)
Changelog:
v1.21a
Values are now sorted in alphabetical order for each key
v1.2
Replaced Organize function with one from RGUOrder
Lost ability to reorder values for each key (To be readded in next version)
v1.1
Fixed a bug with removing hashdata from output (RGUber would mix data from two keys under one)
Changed sorting algorith with a much faster one
v1.02
Added option to remove RegistryUpdate key from rgucomp output
Fixed a typo where RGUber was not removing the system attribute from input rgu files
v1.01
Fixed typo where RGUber was waiting for backup file instead of log file
Change 'Done' msgbox to one that shows beginning time and ending time
v1.0
Initial Release
RGUOrder v1.4
This script will only reorder the contents of an rgu without processing with RGUComp, thereby keeping comments and delete key entries. RGUComp/cereg400.dll are not needed to use this app.
Changelog:
v1.4
Fixed a bug where if the original rgu did not end with a new line then the last entry after being sorted would be lost.
Fixed two bugs where only the first 25 tabs and first 25 spaces would be removed before sorting (This did not affect data integrity or performance, but the checksum would be different each time you run the output back through RGUOrder until all the original tabs/spaces were removed)
Added code to prevent multiple entries of the same key from being reordered
Fixed other miscellaneous bugs/oddities introduced with v1.3
v1.3
Added code to add a delete key for each subkey of a deleted key so that when reordered, the key deletion isn't broken
v1.2
Fixed a bug where the last key processed was being concatenated to another with no CRLF producing an invalid rgu file
I'm not sure if this relates to your app but I have a small question:
If a dumped a rom (raw, not kitchen type) and removed several apps/programs but did not clean the registry (very tedious), will this help me clean it up (remove dead paths, etc)?
And if so, how will it know just by dragging the .hv file? I mean how will your app know if a registry entry does not have the app/program included in the rom anymore?
Please forgive me if my question does not relate to your app
There is no way for my app to know, it isnt that smart
It would take an extensive app/database to know which keys are related to which apps.
Thanks for this post
updated to v1.1
v1.02 had a bug in the code which removed hash data from output which made it mix data from the key before it with the key after it
If I ever get around to updating again, I will use hvedit instead of rgucomp
I get an error.
Script: D:\RGUber.vbs
Line: 136
Char: 2
Error: File not found
Code: 800A0035
Source: Microsoft VBScript runtime error
Any reason why?
I attach the file i want to sort alphabetically.
I have no idea
It worked for me with no problem (file attached)
Please tell me the location of RGUber.vbs and of 51329f91-0017-4364-bcff-e032c5d45b01.rgu
Great application bro!!
Only limitation is that I have to put reg400.dll and rgucomp in C:\windows
c_shekhar said:
Great application bro!!
Only limitation is that I have to put reg400.dll and rgucomp in C:\windows
Click to expand...
Click to collapse
yeah, I tried to get around that but I didn't find anything feasible with vbscript :-/
Actually, they don't have to go in C:\windows
I reinstall windows regularly so I keep as many apps portable as I can. I have a bin folder on another partition that I add to the system path variable after a new install for stuff like this.
selyb said:
yeah, I tried to get around that but I didn't find anything feasible with vbscript :-/
Actually, they don't have to go in C:\windows
I reinstall windows regularly so I keep as many apps portable as I can. I have a bin folder on another partition that I add to the system path variable after a new install for stuff like this.
Click to expand...
Click to collapse
can you elaborate this a bit more. Because I too would like a similar arranfements...
My C:\ partition has Vista64
My F:\ partition has all my documents, downloads, music, movies, etc and a folder F:\bin\
F:\bin contains >100 downloaded command line programs and vbs scripts that I have written including
RGUber.vbs
lame.exe
rgucomp.exe
cereg400.dll
FixVTS.exe
faad.exe
nuerecmod.exe
Tag.exe
find Advanced System Properties (I can't remember how, it's different for XP/Vista/7) go to the Advanced tab and hit the Environment Variables button
Under system variables, scroll down to 'Path', double click it. This defines your 'system path'. It contains a list of folders separated by semicolon ";". At the end, add a semicolon and the path to the folder you want to add (e.g. ;F:\bin) after that, hit ok. XP may need to reboot to reflect the change but I'm not sure. Vista and 7 are affected immediately.
With this setup, you can open a command prompt in any folder on your computer and type "RGUber.vbs xyz.rgu" and it would work as if all the files are in that folder.
Thanks a lot bro!!!
I am grateful...
I'd really like to use this, but unfortunately I get this error regardless of the app.reg I drag onto the script:
Script: C:\RGUber\RGUber.vbs
Line: 232
Char: 3
Error: The system cannot find the path specified.
Code: 80070003
Source: (null)
Thanks if you can advise.
Quetzecotyl said:
I'd really like to use this, but unfortunately I get this error regardless of the app.reg I drag onto the script:
Script: C:\RGUber\RGUber.vbs
Line: 232
Char: 3
Error: The system cannot find the path specified.
Code: 80070003
Source: (null)
Thanks if you can advise.
Click to expand...
Click to collapse
Hmmm... this line asks the system for what is in the %temp% variable and attempts to change the working directory to the result.
Open RGUber.vbs in notepad and go to line 232
Modify
Code:
WSH.CurrentDirectory = WSH.Environment("SYSTEM")("temp")
to
Code:
WSH.CurrentDirectory = "C:\RGUber\"
then try again
Works great after your fix, selyb. Thank you for this useful app and your many helpful contributions to the Kaiser forums.
Quetzecotyl said:
Works great after your fix, selyb. Thank you for this useful app and your many helpful contributions to the Kaiser forums.
Click to expand...
Click to collapse
Yeah, I may relocate from Kaiser forums to Rhodium. I have an AT&T Tilt 2 in the mail to me ATM
Grats on getting a Rhodium. Found a question after using it for a while. This is just one example of such behavior, but why does:
Code:
[HKEY_CURRENT_USER\Software\HTC\TaskManager\ExclusiveList\System]
"CMBandSwitching.exe"=dword:0
get turned into:
Code:
"CMBandSwitching.exe"=dword:0
How do I make it regard CURRENT_USER keys?
Quetzecotyl said:
Grats on getting a Rhodium. Found a question after using it for a while. This is just one example of such behavior, but why does:
Code:
[HKEY_CURRENT_USER\Software\HTC\TaskManager\ExclusiveList\System]
"CMBandSwitching.exe"=dword:0
get turned into:
Code:
"CMBandSwitching.exe"=dword:0
How do I make it regard CURRENT_USER keys?
Click to expand...
Click to collapse
I had this problem with an earlier version. If you are using v1.1 then please attach the original rgu/reg. I have tried and I can't seem to reproduce it since I fixed it already.
Please, replace rgucomp with hvedit . I really need your help because rgucomp doesn't work for me . Thanks in advance .
tomcug said:
Please, replace rgucomp with hvedit . I really need your help because rgucomp doesn't work for me . Thanks in advance .
Click to expand...
Click to collapse
why doesn't rgucomp work? I would be surprised to learn that hvedit will work when rgucomp won't.

[Android] I8000 Theme's & Creating Theme's [UPDATED]

Tutorial & Theme's Download Hold On To Your Balls.
| How To Create You Own Theme. (There are images contain in the framework-res.apk Extract it using 7-Zip & edit it) [You Can Start Theme-ing now]
| How To Change Status Bar Font Color. Time Font Color: (Refer To Post: #2) | StatusBar Font Color - : (Refer To Post: #3)
| How To Get It Installed On Your I8000
- Basically its o2bupdate.tar.gz thingy.
File's Provided:
- Original Android 2.1(Eclair) Theme From Almar's android files [Beta1 Original Theme Extracted, Beta1 Original Framework-res.apk]
- Modified StatusBar Font Color: White/Black. [Statusbar - White, Statusbar - Black [Original] ]
- .... more will come
Requirement's To Start:
- Any photo editing software [Recommended **Adobe Photoshop/GIMP]
- Some files to work around with. [Smali Dex Compile&decompile, Context Editor, HxD Hex Editor]
- 7-Zip You will need it for some reason [You Will Understand Why Later]
- .... more will come
Smali Dex Compile & Decompile:
This small program is used generally for extensions that are .dex its a simple thing to use. (Refer To Post: #2)
Context Editor:
A program use to edit the file's that are found after using smali. (Refer To Post: #2)
Will Update More Soon.
Here are some screen-shots of what I've been working on:
Note: Please Ignore - (No Service)|Starhub. My sim got suspended for not paying bill's
There's so much that you can do but sadly im only a designer who designs theme. so with this info and file provided i hope you guys out there can do something better. Peace.
Please Take Note That Current Theme Won't Work On Beta 2, Only For Beta 1. I'm Currently working on Beta 2 File's. Will Update Soon.
How To Use Smali Dex Compile / DeCompile For classes.dex and Context Editor: [Changing Of Font Color Time On You Status Bar!]
Download This Files: [Smali Dex]
Normally I will place all my files to C:\Android\ for a new project. But you can choose anywhere you like that is at your own convenience.
1. You will need classes.dex from Service.jar - Extract it out using 7-Zip or WinRAR.
2. Once You have already done extracting classes.dex out put it in you project folder.
3. You can start following the steps below.
So lets start. Lets say i have already extracted all the file i've needed and placed it to my project folder here is what you need to do. Run CMD.
Type in cd C:\Android\ or where ever you project folder is located it. It should show you something like this once you've pressed ENTER.
[attachment=69743:1.png]
Okay lets move one, now here is what you need to check be sure that classes.dex is located inside the folder in order for you to start de-compiling the dex files.
Now Type in java -Xmx512M -jar baksmali.jar -o classout/ classes.dex
After pressing enter you should now get a classout folder inside you project folder.
[attachment=69746:2.png]
Now double click on the classout folder. [Do not close the CMD it will save you alot of time.] Inside the folder contains alot of files so lets cut it short with a photo:
Locate the file here: classout\com\android\server\status
Item will be: StatusBarIcon.smali
[attachment=69748:3.png]
Okay once you see the StatusBarIcon.smali we will now start using the Context Editor that is given on the first Post.
Right Click on StatusBarIcon.smali open with Context Editor or You could run context editor and just drag StatusBarIcon.smali into it.
You should get something like this:
[attachment=69752:4.png]
Now on Context Editor press CTRL+F and type color and press enter.
You should all be getting this paragraph that i've highlighted:
[attachment=69754:5.png]
Follow the following lines stated below: From original to edited.
Text Original:
Code:
.line 46
const/high16 v6, -0x100
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V
Text Edited:
Code:
.line 46
const v6, -0x1
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V
Once you are done, Save the file & close context editor. Go to your Project folder and rename your classes.dex to classes-old.dex You need to do this just incase you mess up some stuffs. After you have done with this go to cmd and type in java -Xmx512M -jar smali.jar classout/ -o classes.dex Press enter and now you'll get the new classes.dex
Here's what you need to do open service.jar with 7-Zip and drag the new classes.dex inside and save. You're done changing your status bar Time into white color. The next tutorial is changing your status bar text to white color [The Tricky Part].
To store the new service.jar you have compiled you can use ADB USB or o2bupdate.tar.gz your own convenience [I'll touch on a how to soon]
If your using o2bupdate.tar.gz place it in My Storage/ where haret is at and run haret. Let the o2bupdate do it stuffs & You'll get a white color time font something like this: [attachment=69760:tada.png]
Photo's Will Be Updated Soon.
How to use HxD Hex Editor: I Believe Most Of You Knows How To. (Changing Status Bar Font Color To White) Other colors may work to you can try.
Download Files: HxD Hex Editor 1.7.7.0
By now most of you should have the Framework-res.apk with you. Inside the apk contain images & XML for the android theme. You can mess around with the images & the xml.
But what i'm about to teach you all here is basically changing the font color of the status bar.
Go inside the framework-res folder that you have extracted. Go to this directory: framework-res\res\layout
Look for a file named status_bar.xml
[attachment=69761:1_1.png]
Now once you have found it. Open HxD Hex Editor and drag status_bar.xml into it.
Now once you have done that, press the search tab and click find 08 00 00 1C. change text string to hex value.
The first one should come out: [Now in the photo you see the red box Change it to FF FF FF.]
[attachment=69762:2_2.png]
We are not done yet. Do The same thing again search for 08 00 00 1C.
This is what you should get: [Now in the photo you see the red box Change it to FF FF FF.]
[attachment=69763:3_3.png]
One you change it save it but don't close it just yet. There's another few more steps you need to do.
Now search for 39 00 01 01.
You should get this: [Now in the photo you see the red box change it to 1C FF FF FF FF.]
[attachment=69764:4_4.png]
Now save it and close Hex editor. Open your framework-res.apk with 7-Zip and drag your edited Status_bar.xml in it and save.
Use o2bupdate.tar.gz to update or you can simply use adb usb. Remember if you use o2bupdate.tar.gz the should contain \system\framework\ in order for it to be updated. save goes to service jar.
Now this is what you should get after the update :
[attachment=69765:Tada_2.png]
Further Developement =D =D
Further Developement =D =D Further Developement =D =D

[Q] Problem recompiling custom apks?

So I am trying to make some edits to the bools.xml which is located in the values folder which gets recompiled into the resources.arsc file and apkmanager keeps throwing errors regarding public.xml values being declared but not defined (i am using maddogin's rom and want to remove CRT animations). My question is what do I need to do to keep the errors from occurring or how do I hex edit resources.arsc to turn the CRT animations off. I have found the animatescreenlights section in my hex editor but can't figure out what values to change to make the bool "true".
ericwgarza1 said:
So I am trying to make some edits to the bools.xml which is located in the values folder which gets recompiled into the resources.arsc file and apkmanager keeps throwing errors regarding public.xml values being declared but not defined (i am using maddogin's rom and want to remove CRT animations). My question is what do I need to do to keep the errors from occurring or how do I hex edit resources.arsc to turn the CRT animations off. I have found the animatescreenlights section in my hex editor but can't figure out what values to change to make the bool "true".
Click to expand...
Click to collapse
I could be wrong but doesn't it have a setting to turn off Crt animation built into it?
playya said:
I could be wrong but doesn't it have a setting to turn off Crt animation built into it?
Click to expand...
Click to collapse
It does, but it isn't functioning atm. I just want to know how to do this for my personal knowledge.
I know this is old, but wanted to post for future reference.
Don't use a hex editor. Just open in a regular text editor like Notepad.
Line 16 should read:
<bool name="config_animateScreenLights">true</bool>
Just change true to false:
<bool name="config_animateScreenLights">false</bool>

Problem with charge battery icon

Hi,
I have Minco V3, I would like to change the battery icon of this mod
https://www.dropbox.com/s/yng6akbnxnxxu98/ThunderStick-SAC-NoSearchButton-RLMenu.zip
With the icons contained in this zip: http://d-h.st/ssN
I followed this guide:
• Place your SystemUI.apk in place-apk-here-for-modding of your apktool/apkmanager folder
• Use apktool/apkmanager to extract the images (no need to decompile/compile) with option 1
• Look inprojects of your apktool/apkmanager folder for your SystemUI.apk
• Go to /res/drawable-xhdpi and replace the images with your favorite battery icon files.
• Zip the SystemUI.apk back with option 3 (as a system app)
• In place-apk-here-for-modding you should find an unsignedSystemUI.apk
• Rename it to SystemUI.apk and push it to /system/app (I have modified permissions to rw-r-r).
But systemUI go to crash and I have to restore the rom using nandbackup.
Is there something wrong in this procedure?
I have also noticed that the battery icons are provided in two different folders in the two zip files. drawable-hdpi instead of drawable-xhdpi. Could it be a problem?
thanks
up.. :angel:
If changing images in an APK file they need to have the same file name and be placed in the same directories as the images you wish to replace.
To move the menu button to the opposite side of the screen you need to decompile the APK, then edit the navigation_bar.xml file located in the res/layout folder.
Find lines containing
Code:
android:id="@id/menu"
Move these lines so that they are before what ever item is furthest to the left.
You can rearrange any items by using this same method.
Adding items how ever is more complicated as there needs to be smali additions.
Good luck, let me know if you need any more help. I will keep my responses in the forums so the knowledge can be shared. It took me a while to figure this stuff out as not too many people are willing to help out when it comes to teaching noobs. They forget we all started somewhere.
EDIT:
Oh yeah,
Don't use APK Manager, it is easier to use for some things but can really complicate things when problems arise.
If just replacing images, dont decompile anything, just open the APK using 7ZIP, then drag and drop image files directly in to the APK file. Don't unzip it to a folder, drag and drop.
Be certain all file names being added are replacing existing files with the same file names and types.
thank you! I changed the battery icons.
I'm trying to edit the xml file, but when I decompile and compile the file apk I have errors. i use apk manager and apk multitool.
error with apk manager 5.0.2
HTML:
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f02002d drawable/ic_sysbar_ime_default, config=-xhdpi-v13
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:105)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
Looks like you have two instances of the same file in two different folders. Remove one of them.
First decompile the APK, with out making changes try to recompile it. If you still have errors. This may be a problem with APKTOOL, try a different version. If not you made the error when making modifications. Read the output
The very first line in the exception thread is the problem you need to work on.
Code:
Multiple resources: spec=0x7f02002d drawable/ic_sysbar_ime_default, config=-xhdpi-v13

[Tutorial] Decompile/Recompile APKs

Complete guide on how to Decompile/Recompile Apks with APKTOOL
This Tutorial is for Windows Only
Apktool and all .bat files outlined in this tutorial have been uploaded here for your convenience
Requirements
- 7zip / Winrar (or similar)
- Apktool - (Package link above)
Notes
- I use .bat file to make the whole process alot quicker ...
- Copying Apktool files (aapt.exe, apktool.bat, apktool.jar, baksmali.jar, zipalign.exe) into C:/windows will allow you to use the .bat files anywhere on your computer without the need for apktool in the same directory
Step 1 - First you need to install the framework files so the apktool can use them to decompile other apks in the rom that depend on the framework
- Make a text document and rename it "Install Framework.bat"
- Edit it with a txt editor and paste in this code
Code:
CMD /K apktool if framework-res.apk
- with your framework-res.apk in the folder run the Install Framework.bat file and it should output
Code:
Framework installed to: C:\Users\USER\apktool\framework\1.apk
Step 2 - Decompiling (we will be decompiling framework-res.apk in this tutorial)
- First make a copy of the apk you wish to decompile and name it backup.apk (this will be used later)
- Make a text document and rename it "Decompile.bat"
- Edit it with a txt editor and paste in this code (replace the "framework-res.apk" with the name of the apk you wish to decompile)
Code:
CMD /K apktool d framework-res.apk
- with your apk in the same folder run the Decompile.bat file and it create a folder that you can edit as you see fit
Step 3 - Recompiling (we will be Recompiling framework-res.apk in this tutorial)
- Make a text document and rename it "Compile.bat"
- Edit it with a txt editor and paste in this code (replace the "framework-res.apk" with the name of the apk you wish to recompile)
Code:
del almostdone.apk
CMD /K apktool b framework-res almostdone.apk
- Run the Compile.bat file and it create an apk called almostdone.apk (if you get errors you most likely made a change which broke the apk)
- Open both almostdone.apk and backup with 7zip or Winrar
- Drag all the contents of almostdone.apk except for AndroidManifest.xml into backup.apk and replace existing files
- Now make a text document and rename it "Zipalign.bat"
- Edit it with a txt editor and paste in this code (replace the "framework-res.apk" with the name of the apk you wish to recompile)
Code:
del framework-res.apk
zipalign.exe -v 4 backup.apk framework-res.apk
- Run the Zipalign.bat file and it create the finished apk
Nice one :good:, but i think very few takers in our forum. I was also thinking about posting on ROM Porting, but there are many guides already out there .
yeah ... seems so.... iv'e tryed porting myself ... never got it booting ...

Categories

Resources