Extract file form LG Backup "lbf" - G4 Q&A, Help & Troubleshooting

Hi,
I want to extract a single file from a "lbf" file created by LG Backup on a G4. The file has to be in there as the app using it works on my G5. ADB backups (or Helium) do not work as the app can not be backed up this way. Rooting is no option for me. I've found nothing any where. Can some one help?
TIA

I have the same issue
My LG G4 Crashed.... and had to sent it to the Service Center for Repair.
Now i dont a month old backup take by LG Bridge software and the file is with extension ".lbf".
How can i extract data from the .lbf file and load it to Samsung Mobile.
Please help.... i hv lost all my contacts and others details..
Many Thanks.
Zaks

Reading and .LBF
A friend of mine's phone died (an LG G4) and all he had to go off of was an .LBF file.
I was able to pull the photos, contact, text messages, and voicemail out of the file using a Hex Editor (HxD). I can go over the process if you are still interested,

Hoggmeiser said:
A friend of mine's phone died (an LG G4) and all he had to go off of was an .LBF file.
I was able to pull the photos, contact, text messages, and voicemail out of the file using a Hex Editor (HxD). I can go over the process if you are still interested,
Click to expand...
Click to collapse
please...pm me if could ...i really need to know this...Thanks in advance

Hoggmeiser said:
A friend of mine's phone died (an LG G4) and all he had to go off of was an .LBF file.
I was able to pull the photos, contact, text messages, and voicemail out of the file using a Hex Editor (HxD). I can go over the process if you are still interested,
Click to expand...
Click to collapse
I am intersted. Thanks

Pulling Data from an .LBF file (LG Phone Backup)
Things you'll need (all freeware):
HxD - Hex Editor
7Zip
Mozilla Firefox
SQLite Manager Add-On
VideoLAN Media Player
This procedure gets very technical, but bear with me and you'll find what you're looking for.
I've posted a video on YouTube going over the process if you prefer watching rather than reading: watch?v=HGwX7lFtd4s
Contacts
Right click the .LBF file and open it with 7Zip, you can navigate through the folders to find the database file. Extract the .DB file somewhere (it's usually called "contact2.db"). Now open Mozilla Firefox, and open your SQLite Manager. In the options at the top, click "Connect Database" and navigate to your newly extracted .DB file. It won't see it natively, make sure you set the filter to "All files" in the open file dialogue menu to see it, then click OK. Here you can go through all of the different tables containing account information, contacts, call history, phone numbers, etc.
Text Messages
Much trickier than pulling contacts. There are two kinds of text messages we are looking for: SMS & MMS. These files will be compressed in a ZIP file, so we need to isolate the ZIP file in HxD before we can continue. Open the .LBF in HxD, hit CTRL+F to search, and type ".vmsg" into the box as a text-string searching forward, then hit enter. It should jump you to a file usually called "sms.vmsg". This is where the SMS text messages begin in the ZIP file. Now to identify the beginning of the ZIP file, look a few characters back for a string called "PK. ."; this is the universal identifier for ZIP files, it stands for Phil Katz, the creater of the ZIP file header. There will be other PKs on the screen, so just focus on the first one you come to going backwards from the "sms.vmsg". Highlight the PK, and note the offset in the lower left corner of the HxD window, record that number for later. Now, searching forward once again, look for the next instance of "sms.vmsg", this is the end of the SMS area of the ZIP file, and it leads to the beginning of where the MMS messages are stored. MMS files are stored in the "PDU" file container when they are sent, so you will be searching the document for .PDU files until you come to the last one (when you hit search again, and a window pops up saying HxD has finished searching the document with negative results). That tells you you have reached the end of the MMS message area, and now you need to find where the ZIP file ends. Search forward for PK [HEX: 50 4B], until you see the PK that's right before the next database declaration, usually called "tasks.db". The PK before "tasks.db" is the beginning of the ZIP containing that database (and we're not interested in that right now), so look for the very next occurrence of PK going backward from that one to find the ending declaration of the ZIP file containing the text messages. The pattern for ending a ZIP file is difficult. You will be looking for:
PK {followed by 17 bytes} {followed by 00 00 00}
Keep in mind: 1 byte = 2 hex characters (00 = 1 byte worth of data)
SO! At the ending PK we are at, count forward 17 groups of hex characters, then three groups of 00s. Highlight the six zeros and that is your end of ZIP file. Now Hit CTRL+E to select a block of data. Remember that offset I told you to record? Enter that as the beginning address, the end address should already be at the 00 00 00 you highlighted, then hit Enter. Now CTRL+C, CTRL+N, CTRL+V, CTRL+S to make a new file containing those highlighted bytes, and to save it. Make sure you save it with the ".ZIP" file extension. Now extract that zip file using whatever program you like, and you will find a "sms.vmsg" file and a bunch of .PDUs. I'm not going to get into .PDUs in this post. You can open "sms.vmsg" in a text editor to view the contents. If you want a prettier version of it, you can try converting it online, or what I did, was download an android emulator, imported the .VMSG file into that, and used a random app to export the text messages to .PDF format.
Photos
JPEGs are way easier to carve out than text messages. The problem is that there are usually TONS OF THEM. I will show you how to do this manually, but if you would like to automate the process, you may have to consider writing a bit of code. JPEGs always start and end the exact same way. They start: FF D8 FF E0 xx xx 4A 46 49 46 00 in Hexadecimal, or in ANSI text: ÿØÿà..JFIF
If you find that string, you've found the beginning of a JPEG file. Highlight it and write down the offset. JPEGs for the most part all end consistently, too. They end: FF D9 in Hexadecimal, or in ANSI text: ÿÙ
Select the FF D9, hit CTRL+E to select a block, enter the beginning offset (where FF D8 FF E0 was) and hit OK. Then the CTRL+C, CTRL+N, CTRL+V, CTRL+S combo, and save it with the .JPEG file extension.
Hopefully this helps. If you need assistance with voicemail, let me know. It completely relies on the carrier of your phone to find how those files are stored.

Audio files?

Use PhotoRec
After having some trouble with Hoggmeiser's Hex Editor solution, I found that the free software PhotoRec pretty much does it all for you (I can't insert links yet as I just created an account to post this, but just google "photorec"). Just change the .lbf at the end of your file to .raw so that you can select it in PhotoRec. It parses out a ton of different file types. Not sure if one could find the text messages and contacts database, but I did see some "sqllite" files in my data. Definitely usable to get photos/pictures.

Hoggmeiser said:
Pulling Data from an .LBF file (LG Phone Backup)
Things you'll need (all freeware):
HxD - Hex Editor
7Zip
Mozilla Firefox
SQLite Manager Add-On
VideoLAN Media Player
This procedure gets very technical, but bear with me and you'll find what you're looking for.
I've posted a video on YouTube going over the process if you prefer watching rather than reading: watch?v=HGwX7lFtd4s
Contacts
Right click the .LBF file and open it with 7Zip, you can navigate through the folders to find the database file. Extract the .DB file somewhere (it's usually called "contact2.db"). Now open Mozilla Firefox, and open your SQLite Manager. In the options at the top, click "Connect Database" and navigate to your newly extracted .DB file. It won't see it natively, make sure you set the filter to "All files" in the open file dialogue menu to see it, then click OK. Here you can go through all of the different tables containing account information, contacts, call history, phone numbers, etc.
Text Messages
Much trickier than pulling contacts. There are two kinds of text messages we are looking for: SMS & MMS. These files will be compressed in a ZIP file, so we need to isolate the ZIP file in HxD before we can continue. Open the .LBF in HxD, hit CTRL+F to search, and type ".vmsg" into the box as a text-string searching forward, then hit enter. It should jump you to a file usually called "sms.vmsg". This is where the SMS text messages begin in the ZIP file. Now to identify the beginning of the ZIP file, look a few characters back for a string called "PK. ."; this is the universal identifier for ZIP files, it stands for Phil Katz, the creater of the ZIP file header. There will be other PKs on the screen, so just focus on the first one you come to going backwards from the "sms.vmsg". Highlight the PK, and note the offset in the lower left corner of the HxD window, record that number for later. Now, searching forward once again, look for the next instance of "sms.vmsg", this is the end of the SMS area of the ZIP file, and it leads to the beginning of where the MMS messages are stored. MMS files are stored in the "PDU" file container when they are sent, so you will be searching the document for .PDU files until you come to the last one (when you hit search again, and a window pops up saying HxD has finished searching the document with negative results). That tells you you have reached the end of the MMS message area, and now you need to find where the ZIP file ends. Search forward for PK [HEX: 50 4B], until you see the PK that's right before the next database declaration, usually called "tasks.db". The PK before "tasks.db" is the beginning of the ZIP containing that database (and we're not interested in that right now), so look for the very next occurrence of PK going backward from that one to find the ending declaration of the ZIP file containing the text messages. The pattern for ending a ZIP file is difficult. You will be looking for:
PK {followed by 17 bytes} {followed by 00 00 00}
Keep in mind: 1 byte = 2 hex characters (00 = 1 byte worth of data)
SO! At the ending PK we are at, count forward 17 groups of hex characters, then three groups of 00s. Highlight the six zeros and that is your end of ZIP file. Now Hit CTRL+E to select a block of data. Remember that offset I told you to record? Enter that as the beginning address, the end address should already be at the 00 00 00 you highlighted, then hit Enter. Now CTRL+C, CTRL+N, CTRL+V, CTRL+S to make a new file containing those highlighted bytes, and to save it. Make sure you save it with the ".ZIP" file extension. Now extract that zip file using whatever program you like, and you will find a "sms.vmsg" file and a bunch of .PDUs. I'm not going to get into .PDUs in this post. You can open "sms.vmsg" in a text editor to view the contents. If you want a prettier version of it, you can try converting it online, or what I did, was download an android emulator, imported the .VMSG file into that, and used a random app to export the text messages to .PDF format.
Photos
JPEGs are way easier to carve out than text messages. The problem is that there are usually TONS OF THEM. I will show you how to do this manually, but if you would like to automate the process, you may have to consider writing a bit of code. JPEGs always start and end the exact same way. They start: FF D8 FF E0 xx xx 4A 46 49 46 00 in Hexadecimal, or in ANSI text: ÿØÿà..JFIF
If you find that string, you've found the beginning of a JPEG file. Highlight it and write down the offset. JPEGs for the most part all end consistently, too. They end: FF D9 in Hexadecimal, or in ANSI text: ÿÙ
Select the FF D9, hit CTRL+E to select a block, enter the beginning offset (where FF D8 FF E0 was) and hit OK. Then the CTRL+C, CTRL+N, CTRL+V, CTRL+S combo, and save it with the .JPEG file extension.
Hopefully this helps. If you need assistance with voicemail, let me know. It completely relies on the carrier of your phone to find how those files are stored.
Click to expand...
Click to collapse
Found these steps while looking to extract some data from a backup of my K20 Plus. Super helpful and easy to follow!!

Simple python script for file extraction
Script is here:
Code:
import mmap
index=0
filename=f"LGBackup_xxxxxx.lbf"
def read_in_chunks(file_object, chunk_size=1024):
"""Lazy function (generator) to read a file piece by piece.
Default chunk size: 1k."""
while True:
data = file_object.read(chunk_size)
if not data:
break
yield data
def find_in_file(f,signature, startpos):
prev=b''
chunk_size=2**20
for i,cur in enumerate(read_in_chunks(f,chunk_size)):
searchee=prev+cur
pos=searchee.find(signature)
if pos>=0:
return i*chunk_size+pos-len(prev)+startpos
prev=cur
else:
return -1
with open(filename,"rb") as backup:
starpos=0
while True:
pos=find_in_file(backup, b'PK\x03\x04',starpos)
if pos<0:
break
print(backup.tell())
backup.seek(pos)
print(backup.tell())
index+=1
filename=f"{index}.brokenzip"
with open(filename,"wb") as nextfile:
for chunk in read_in_chunks(backup,2**20):
nextfile.write(chunk)
starpos=pos+1
backup.seek(starpos)
print(backup.tell())
print()
Instruction there, here is copy:
You will need 7-zip context menu "Extract here".
Edit filename to your backup file
Run this script from same folder
Select all *.brokenscript and choose 7-zip > Extract here
On overwrite request, choose either "Yes to all" or "No to all", id doesn't matter
Ta-da! You just got your files.
Looks like this backup is a bunch of concatenated broken zip files with zeros for file sizes. 7-zip can open this easily.
Script does this: finds ZIP header, copies everything from header to new file, opens it and repeats it until no more ZIP headers. Quick, hackish, works.

File "skrypt.py", line 31
nextfile.write(chunk)
^
IndentationError: expected an indented block

barszet said:
File "skrypt.py", line 31
nextfile.write(chunk)
^
IndentationError: expected an indented block
Click to expand...
Click to collapse
Oops. Fixed in post. It was needed to prepend 13+ spaces before nextfile.

topin89 said:
Script is here:
Code:
import mmap
index=0
filename=f"LGBackup_xxxxxx.lbf"
def read_in_chunks(file_object, chunk_size=1024):
"""Lazy function (generator) to read a file piece by piece.
Default chunk size: 1k."""
while True:
data = file_object.read(chunk_size)
if not data:
break
yield data
while True:
with open(filename,"rb+") as backup:
mm = mmap.mmap(backup.fileno(), 0)
pos=mm.find(b'PK\x03\x04',1)
if pos<0:
break
backup.seek(pos)
index+=1
filename=f"{index}.brokenzip"
print(filename)
with open(filename,"wb") as nextfile:
for chunk in read_in_chunks(backup,2**20):
nextfile.write(chunk)
Instruction there, here is copy:
You will need 7-zip context menu "Extract here".
Edit filename to your backup file
Run this script from same folder
Select all *.brokenscript and choose 7-zip > Extract here
On overwrite request, choose either "Yes to all" or "No to all", id doesn't matter
Ta-da! You just got your files.
Looks like this backup is a bunch of concatenated broken zip files with zeros for file sizes. 7-zip can open this easily.
Script does this: finds ZIP header, copies everything from header to new file, opens it and repeats it until no more ZIP headers. Quick, hackish, works.
Click to expand...
Click to collapse
File "script.py", line 21, in <module>
mm = mmap.mmap(backup.fileno(), 0)
ValueError: mmap length is too large
---------- Post added at 02:29 AM ---------- Previous post was at 02:28 AM ----------
File is 2.75 GB. Is that a problem?

Clarify
Hi Topin89,
Thank you for the post. I downloaded python for android and typed out the script and saved it to a .py file. Can you please clarify what the next steps were? I sort of got lost on how to proceed. Thanks
topin89 said:
Script is here:
Code:
import mmap
index=0
filename=f"LGBackup_xxxxxx.lbf"
def read_in_chunks(file_object, chunk_size=1024):
"""Lazy function (generator) to read a file piece by piece.
Default chunk size: 1k."""
while True:
data = file_object.read(chunk_size)
if not data:
break
yield data
while True:
with open(filename,"rb+") as backup:
mm = mmap.mmap(backup.fileno(), 0)
pos=mm.find(b'PK\x03\x04',1)
if pos<0:
break
backup.seek(pos)
index+=1
filename=f"{index}.brokenzip"
print(filename)
with open(filename,"wb") as nextfile:
for chunk in read_in_chunks(backup,2**20):
nextfile.write(chunk)
Instruction there, here is copy:
You will need 7-zip context menu "Extract here".
Edit filename to your backup file
Run this script from same folder
Select all *.brokenscript and choose 7-zip > Extract here
On overwrite request, choose either "Yes to all" or "No to all", id doesn't matter
Ta-da! You just got your files.
Looks like this backup is a bunch of concatenated broken zip files with zeros for file sizes. 7-zip can open this easily.
Script does this: finds ZIP header, copies everything from header to new file, opens it and repeats it until no more ZIP headers. Quick, hackish, works.
Click to expand...
Click to collapse

topin89 said:
Script is here:
Code:
import mmap
index=0
filename=f"LGBackup_xxxxxx.lbf"
def read_in_chunks(file_object, chunk_size=1024):
"""Lazy function (generator) to read a file piece by piece.
Default chunk size: 1k."""
while True:
data = file_object.read(chunk_size)
if not data:
break
yield data
while True:
with open(filename,"rb+") as backup:
mm = mmap.mmap(backup.fileno(), 0)
pos=mm.find(b'PK\x03\x04',1)
if pos<0:
break
backup.seek(pos)
index+=1
filename=f"{index}.brokenzip"
print(filename)
with open(filename,"wb") as nextfile:
for chunk in read_in_chunks(backup,2**20):
nextfile.write(chunk)
Instruction there, here is copy:
You will need 7-zip context menu "Extract here".
Edit filename to your backup file
Run this script from same folder
Select all *.brokenscript and choose 7-zip > Extract here
On overwrite request, choose either "Yes to all" or "No to all", id doesn't matter
Ta-da! You just got your files.
Looks like this backup is a bunch of concatenated broken zip files with zeros for file sizes. 7-zip can open this easily.
Script does this: finds ZIP header, copies everything from header to new file, opens it and repeats it until no more ZIP headers. Quick, hackish, works.
Click to expand...
Click to collapse
How do i run this python script ( i dont know anything about python)? i have extracted my .lbf file into a folder already. What do i do from there?

gagica86 said:
Hi Topin89,
Thank you for the post. I downloaded python for android and typed out the script and saved it to a .py file. Can you please clarify what the next steps were? I sort of got lost on how to proceed. Thanks
Click to expand...
Click to collapse
Sorry, gagica86, I forgot to answer. I hope somebody helped you anyway, if not, see below.
eltonm1219 said:
How do i run this python script ( i dont know anything about python)? i have extracted my .lbf file into a folder already. What do i do from there?
Click to expand...
Click to collapse
So, say there are these files in a folder:
LGBackup_010218.lbf
thescript.py
first, you need to change line:
Code:
filename=f"LGBackup_xxxxxx.lbf"
to
Code:
filename=f"LGBackup_010218.lbf"
in "thescript.py".
Then, if should install Python (if you don't already). I can't post links, so google "Python", first link is what you need. Then "Download", then "Python 3.7.0" (version may be different). Install it, make sure "Add to path" is set.
First try double-click on thescript.py. If nothing happens or "How to open" dialog box appears, in Explorer, Shift+Right Click on empty space in the folder, then "Command line" or "Powershell". Type
Code:
python thescript.py
and press Enter.
Lots of *.brokenzip files should appear. Select them all and extract with 7-zip.

Yato gami said:
File "script.py", line 21, in <module>
mm = mmap.mmap(backup.fileno(), 0)
ValueError: mmap length is too large
---------- Post added at 02:29 AM ---------- Previous post was at 02:28 AM ----------
File is 2.75 GB. Is that a problem?
Click to expand...
Click to collapse
Oh! Yes, it may be. Write if solution is still needed.

topin89 said:
Oh! Yes, it may be. Write if solution is still needed.
Click to expand...
Click to collapse
Yep, I still do.

Yato gami said:
Yep, I still do.
Click to expand...
Click to collapse
Here, this should help:
Code:
import mmap
index=0
filename=f"LGBackup_xxxxxx.lbf"
def read_in_chunks(file_object, chunk_size=1024):
"""Lazy function (generator) to read a file piece by piece.
Default chunk size: 1k."""
while True:
data = file_object.read(chunk_size)
if not data:
break
yield data
def find_in_file(f,signature, startpos):
prev=b''
chunk_size=2**20
for i,cur in enumerate(read_in_chunks(f,chunk_size)):
searchee=prev+cur
pos=searchee.find(signature)
if pos>=0:
return i*chunk_size+pos-len(prev)+startpos
prev=cur
else:
return -1
with open(filename,"rb") as backup:
starpos=0
while True:
pos=find_in_file(backup, b'PK\x03\x04',starpos)
if pos<0:
break
print(backup.tell())
backup.seek(pos)
print(backup.tell())
index+=1
filename=f"{index}.brokenzip"
with open(filename,"wb") as nextfile:
for chunk in read_in_chunks(backup,2**20):
nextfile.write(chunk)
starpos=pos+1
backup.seek(starpos)
print(backup.tell())
print()

Maybe, I've a simple solve this problem. My LG G3 crashed and I've an LG backup file *.lbf but my phone could'nt open it, and my pc same... I found 2 websites, where I could extract it and save contacts.db to vcard file.

Related

Noob at reg editing

i've looked around and didn't really find what i was looking for maybe i just didn't look or searched the right way. i usually keep searching until i find an answer but failed at this one. i have total commander and i want to terminate program correctly. the problem is i don't know where to put reg text file :/
Create a new txt file.
First line of txt file =
REGEDIT4
Second line of txt file =
[HKEY_CURRENT_USER\Software\HTC\TaskManager\Termina teProcess]
Next line(s) of txt file =
"Opera9.exe"=dword:00000001
Replace Opera9.exe with the name of the exe of your program. Leave the quotes and everything as is.
Save txt file.
Rename extension to reg.
PHP:
REGEDIT4
[HKEY_CURRENT_USER\Software\HTC\TaskManager\Termina teProcess]
"Opera9.exe"=dword:00000001
once i have this the text file on my phone where do i put it at? it says import to my total commader but just don't know where.
any help would be great and thanks in advance.

Customizing the 18 Buttons Action Screen by Wedge

This thread is about how to create your own action screen icons based on the Wedge Action Screen.
What you need to customize your action screen
- a set of icons you wanna use ;
- Paint.net for preparing your custom icons (you can use any tool but then you'll need to convert the templates first, PDN has the advantage of layers) ;
- BRN Convert to convert BRN to BMP and vice versa ;
- a PDN file with all the icons at a glance (Background_empty.pdn, see ZIP file);
- a PDN file with one icon (button_small_empty.pdn, see ZIP file);
- a file to edit your registry entries (action.reg, see ZIP file).
The basic steps fast explained
1. Prepare your preferred items so that they have a max.size of 102x102 pixels;
2. For each icon: open the button template and place the icon over it, save it under the appropriate name (e.g. 00P) and file format (BMP, keep a native format copy as well, you'll never know why);
2a. A little side note: the numbering starts top left with 00 and ends bottom right with 17, e.g. the second icon in the 2nd top row is icon number 4;
3. Do the same for the background screen: place each item into its place, attention do not use the buttons created under step 2, otherwise you'll loose the "animation" effect when pushing a button, save the file under the name "background.bmp" (+native format);
4. Convert your BMP files into BRN format;
5. Copy your BRN files over the files in the folder \Windows\ActionScreen\ - before you can copy background.brn, you should rename it, otherwise you get an error message à la "not enough memory" or similar;
6. Customize the registry entries - you can edit the attached action.reg file with a text editor, later I usually convert it with SK Tools into a cab file and install it. Naturally, you can do this manually using a registry editor, if you want.
Finished!
This process will take 1-2 hours depending on your motivation, skills and expectations.
reserved for future use

How to build a Flasher

What is needed?
1. Winrar
2. One of the flashers (depending on your device) from the following post: Flasher
After you have both extract the flasher using Winrar. Next place your rom in \LGMOBILEAX\Phone. After that navigate to LGMOBILEAX\SmartPhoneSetup and open SPConf.ini with Notepad. You will see a line called DZNAME =. After the = sign insert the physical name of the rom you placed in the Phone folder. Make sure you have the dz extension at the end. Also make sure there are no spaces in the name of the rom. There is also a line called SWVERSION. You can change that to whatever you want as long as there is no spaces. After you are done with editing this file save it.
Next right-click on the LGMOBILEAX folder and choose Add to Archive. Now name the flasher what you want and then check Create SFX Archive. After that click the Advanced tab. Click on SFX options. Now set path to extract to "C:\Users\All Users" for Windows 7 or "C:\Documents and Settings\All Users\Application Data" for Windows XP. Also set Run after extraction to "LGMOBILEAX\SmartPhoneSetup\SP_Starter.exe".
Note: There are options to set icons, pictures, and text in the installer, but is not necessary. If you want to play with that you can by going to the text and icon tab.
Now that you have all that set click ok and then ok again. It will start to create your flasher. IOnce it is done all you need to do is run it.

[HOW TO] Status Bar [5/2/2010]

First I want to make it clear that the techniques I show here are what I found scouring through the xda forums and androidforums.com
Second I am posting this because I see a lot of people asking for custom status bars. Hopefully what I put here will help other people get started or at least try their own ideas.
I want to Thank XxKolohexX for getting me started with theming and pointing me in the right direct. There is a lot I still don't know and need to learn.
I know you can use colorChange.jar v3.1 and colorchange has more options. I have put this out here for people who want to know what is going on underneath. This will also grow.
I AM NOT RESPONSIBLE FOR ANY DAMAGE DONE TO YOUR PHONE, COMPUTER, USB CABLE, TOASTER, OR ANYTHING ELSE FROM YOU USING THESE DIRECTIONS
Ok lets get started
WHAT YOU WILL NEED
Code:
[I][B]A ROOTED PHONE!![/B][/I]
ADB get it here,[URL="http://developer.android.com/sdk/index.html"] the Android SDK[/URL]
baksmali get it [URL="http://smali.googlecode.com/files/baksmali-1.2.2.jar"]here[/URL]
smali get it [URL="http://smali.googlecode.com/files/smali-1.2.2.jar"]here[/URL]
Java
A Hex editor;
for windows try HxD. Get it from [URL="http://mh-nexus.de/en/downloads.php?product=HxD"]here[/URL]
for linux try Ghex. Get it from [URL="http://live.gnome.org/Ghex"]here[/URL]
A text editor;
for windows use notepad++. get it [URL="http://sourceforge.net/projects/notepad-plus/files/"]here[/URL]
for Linux gedit will be fine
An archive manager;
for windows use 7-zip. Get it from [URL="http://www.7-zip.org/download.html"]here[/URL]
for Linux the built in will be fine
WHAT TO DO NEXT
Download the ROM you want to use.
Create a new folder on the desktop to work in. Name the folder to the name of your ROM (i.e. CM5)
Using your archive manager open up the zipped ROM (do not extract, it is not necessary) and go into the system folder
Inside the system folder go to the framework folder
Extract the framework-res.apk and the services.jar to the folder you created on the desktop
Click to expand...
Click to collapse
WORKING WITH THE XML FILES
Now open up the framework-res.apk. (In windows 7-zip will open this without having to change the extension to .zip) (Do not extract)
Now go into the res/layout folder and extract the following three files to the folder you made on the desktop
status_bar_expanded.xml
status_bar.xml
status_bar_latest_event_content.xml
Here is what these files control
status_bar_expanded.xml
Controls the text color for:
1) Clear Button
status_bar.xml
Controls the text color for:
1) USB Connected and Preparing SDcard
2) USB Debugging and Status Bar Notifications
status_bar_latest_event_content.xml
Controls the text color for:
1) Title text in pull down bar for Ongoing and Notifications
2) Description text in the pull down bar under Ongoing and Notifications
3) Text notifications time stamp in the pull down bar under notifications
Open status_bar_expaned.xml with your Hex Editor
Do a search for 08 00 00 1C
The next four 2 digit segments control color and alpha (Transparency) in this order BGRA (Blue, Green, Red, Alpha) (Sorry I had this reversed earlier)
In Hex FF would be the darkest and 00 would be the lightest, so if you set the next four 2 digit segments like this -> FF 00 00 FF then your USB Connected and Preparing SDcard text would be red. I suggest not messing with the alpha, just leave it FF
you will find two areas in this file where 08 00 00 1C appear and in the section above I show the order in which you find 08 00 00 1C and what they control. REMEMBER TO EDIT THE FOUR 2 DIGIT SEGMENTS FOLLOWING 08 00 00 1C
Save the file and edit the other two files (status_bar_expanded.xml has one instance of 08 00 00 1C, and status_bar_latest_event_content.xml has three instances of 08 00 00 1C)
All instances of 08 00 00 1C are in the order that I have outlined above
When you are done open up the framework-res.apk and go into the layout folder
Drag your newly edited files into the res/layout folder, wait for it to update then exit
Click to expand...
Click to collapse
WORKING WITH THE SMALI FILES
THE StatusBarService.smali edit DOES NOT WORK ON CM5
Open up the services.jar file with your archive manager
Extract the classes.dex file to your folder on the desktop
Now we need to disassemble the classes.dex file with baksmali so we will issue this command
java -jar baksmali-1.2.2.jar -o <output directory> <.dex file, typically classes.dex>
For example: java -jar baksmali-1.2.2.jar -o c:\users\david\desktop\CM5 c:\users\david\desktop\CM5\classes.dex
This will create the following directory c:\users\david\desktop\CM5\com\android\server
Inside the server folder/directory there is a status folder/directory go into that folder/directory
Open up the StatusBarIcon.smali file in your text editor. When the file is open look for this line
.line 46
const/high16 v6, -0x1 00
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V
Now change -0x100 to -0x1. This will change your clock to red
Save the file and exit
Open up the StatusBarService.smali file with your text editor and look for this line
iget-object v7, p0, Lcom/android/server/status/StatusBarService;->mDateView:Lcom/android/server/status/DateView;
const/4 v8, 0x4
Below the line you found add the following line
invoke-virtual {v7, v8}, Lcom/android/server/status/DateView;->setVisibility(I)V
const v8, -0x1
This will make your date white in the notification bar when it is exposed when you pull the notification bar down
Now that your edits are done it is time to put these files back into a .dex file. issue the following command
java -Xmx512M -jar smali-1.2.2.jar <output directory from above step> -o <name for new .dex output file>
For example: java -Xmx512M -jar smali-1.2.2.jar c:\users\david\desktop\CM5 c:\users\david\desktop\CM5\new-classes.dex
Delete the classes.dex file already in that folder and rename new-classes.dex to classes.dex
Add the classes.dex file back into the services.jar file
Click to expand...
Click to collapse
PUSH THE FILE TO YOUR PHONE
If the ROM is not flashed to your phone flash it now
Once your phone is setup, reboot into recovery
once your in recovery issue the following
adb shell
#mount /system
#exit
adb push c:\users\david\desktop\CM5\framework-res.apk /system/framework/
adb push c:\users\david\desktop\CM5\services.jar /system/framework/
adb reboot
Click to expand...
Click to collapse
When your phone boots up you will see your changes.
See examples here
Status Bar How To
Reserved for future tutorials
Nice Tutorial
XxKOLOHExX said:
Nice Tutorial
Click to expand...
Click to collapse
Thank You.
I owe it to you.
Nice tutorial! I'm gonna have to try this out(My brain hurts already) soon as I get time to sit down and play.
Subscribed!
Hi there,
So i'm looking for a simple black status bar, nothing else, can someone please help me? I'm confused with the whole process, even after reading it a few times...
If someone who is using the latest CM 5.0.7 DS build and have a black status bar with no other frills, please share....
thx,
Clear status bar
pleaseeee tell me someone is making a clear or drop shadow status bar for the g1, i can only seem to find it for froyo which is not yet stable for the g1.. any help here ?
Nice tut. Thanks... To those requesting mods... DON'T HIJACK, OPEN A NEW THREAD!
thingzero said:
Hi there,
So i'm looking for a simple black status bar, nothing else, can someone please help me? I'm confused with the whole process, even after reading it a few times...
If someone who is using the latest CM 5.0.7 DS build and have a black status bar with no other frills, please share....
thx,
Click to expand...
Click to collapse
pleaseeee tell me someone is making a clear or drop shadow status bar for the g1, i can only seem to find it for froyo which is not yet stable for the g1.. any help here ?
Click to expand...
Click to collapse
The status bar is a matter of editing the statusbar.background.png file you have. In order to do this you will need to open the zipped rom. Make A Backup FIRST! your using then open the system folder, then the framework folder, then open the framework-res.apk (use 7-zip in windows) then go into the res folder. Extract the drawable-mdpi folder. use photoshop or gimp to change the opacity of the statusbar.background.png file. Save the file with the exact same name. Put it back into the drawable-mdpi folder, put that folder back into the res folder of the framework-res.apk. Close the open archive program. sign the zipped file then flash it.
This may not work on all roms. but if you make a backup of the original rom you used you will be able to get back to where you were. Also I suggest Titanium Backup.
If you need more details PM me as I am not checking this thread.

FAQ Firmware Modding... How to use Tools like Wave_Remaker and TriX

PLACEHOLDER.
If I have more time today. I will upload few Videos... Screenshots... etc.
About working with these files:
Code:
ShpApp.[B]app[/B]
rsrc_S8500_Open_Europe_Common.[B]rc1[/B]
FactoryFs_S8500_Open_Europe_Common.[B]ffs[/B]
CSC_S8500_Open_Europe_Common_DBT.[B]csc[/B]
and also...
Code:
apps_compressed.bin
amss.bin
Rsrc2_8500(Low).rc2
Lesson 1...
Working with HEX Editor to find MD5 sum ... See here:
http://forum.xda-developers.com/showthread.php?p=25686868#post25686868
To be continued...
Best Regards
Thank you for helping.I only don't know about amss.bin
Code:
S8[B]6[/B]00 [B]XXLD[/B]1 DBT [B]MD5[/B]
amss.bin 726C9536CDAE7F3A330A539B324B4E09
apps_compressed.bin B13B931FC61386A777340D5C4697DFDC
bplib_S8600OpEuroCommon.fota 70ABC89638959F4760A41118E5414F45
CSC_S8600_DBTLB1.csc 5FA176E8B64B3DEBE6AD6A78AA40D999
PFS_S8600_Open_Europe_Common_XXLA1_XXLD1.pfs 394A8265DFB37978AFC93E5D4B549F61
Rsrc2_S8600(Low).rc2 B06D2E03FC2B3A519BCA52C5B40EF556
Rsrc_S8600_Open_Europe_Common.rc1 6CC6D2E82302036FC910AE3EEC79990F
ShpApp_HD.app 063DD3BF6D00828BEDF25A0955F48D1E
Each file has MD5...
It is 16 Byte...
Here I have written about S8600 XXLD1 Firmware as "reference"...
You can find these MD5 "Values" at end of file...
See Video previous post...
Best Regards
I want to Understand About Social Hub Premium on Wave II
I Made it Custom Firmware with soical hub premium for my Wave I Firmware DXLD1
When I made It for Wave II (DXLD1) It is giving error while Log in Facebook and Twitter
I did everything the same that Wave I.But it stilld isn't working on Wave II
I am facing this problem.What i did wrong ? Exactly I don't know
Best Regards
Tutorial 1: Using TriX to Modify Firmwares. A Beginner's Guide
Tutorial: Using TriX to Modify Firmwares. A Beginner's Guide
1. Create a folder in your pc where you will save the dumped files from TriX. Example, create a folder in Local Disk C, called Test.
2. Keep the Firmware you need to modify at desktop for easy access.
3. Launch TriX
4. Check the box for Input File ==> click on the search icon ==> click desktop from the Explorer window and select the firmware file (e.g. ShpApp.app), then click Open (to load the file).
5. Check the box for Output File (where the modified file will be saved) ==> click on the search icon ==> click Local Disk C from the Explorer window and double-click the folder Test. Then enter the File name for your modified file, e.g. ShpApp.app, then click Save (to save the file).
6. After you have selected the input file, and specified the output file name and location, which are under the General tab of TriX, now click on the Scripts tab of TriX.
7. Under the Scripts tab, click on the search icon (at bottom left of TriX) ==> expand the displayed bada folder ==> select fs_shell.trx ==> Open ==> Add
8. After adding the script file, click Start (on top menu) ==> enter 2 (for Your choice) to dump files, then press ENTER.
9. Write C:/Test (for Enter Destination Directory) i.e. if you have created a folder Test as in nº 1 above, then press ENTER. TriX will now dump the files to the directory C:/Test. Wait till the dumping process completes.
10. Now go to the directory C:/Test, and edit any folder/file you want.
Caution: Do not Close TriX yet. Make sure TriX is still open.
11. After editing the dumped files as you like (in C:/Test), go back to TriX and enter option 3 (Your choice) to upload the files. After uploading, enter option 0 to quit. Now close TriX.
12. Your new modified file will be saved at C:/Test.
That’s all. I hope this basic tutorial will help those just beginning to learn how to use TriX.
See attached files for details and screenshots.
Not much time yet...
Meanwhile you can also watch such Videos.
http://www.youtube.com/watch?v=BRWpJWxnylk&feature=player_embedded
Thanx JabbaIsFat
Best Regards
Tutorial 2: How to reduce files from firmware to improve speed
In this tuotrial, you are guided to the files you can safely remove from your custom firmware to increase memory and speed. These files/folders are in the CSC, SHP and FFS. So use TriX or WaveRemaker to dump the files first.
1. CSC FILES
a. Appex => SysDefault => Java => Games => (delete all the games here).
b. CSC => Customer => (delete all except your preferred CSC)
c. CSC => SW_Configuration.xml => (delete all except your CSC. Also edit <NbCustomer>1</NbCustomer).
d. SystemFS => Settings => PreConfiguration (delete all CSC except yours).
Don't delete neither "PreConfiguration.ini" file nor "Default" folder.
2. ShpApp FILES
Osp => Applications => delete the following folders:
a. 1xd3tvpnc5 (Music Hub)
b. 5zdx8bkb6w (Yahoo)
c. 8c59h50loa (GTalk)
d. 577yx64nrt (Caster)
e. 760n3w3202 (MSN)
f. kfdoqs63to (ChatON)
NB: You can as well delete all the language xml files (except your own language) inside "Res" folder of these application:
i. 0rq06e23py (SevenIM)
ii. 8d7uw8z551 (Kona)
iii. rcz4775900 (Bori)
AppEx => Sys (delete this whole folder "Sys"completely).
The Sys folder contains the subfolders listed below which are not used (and already exist in the ShpApp/Osp/Application).
i. BDAgent ===============> [36cbr89p8t in the ShpApp/Osp/Application (BDAgent)]
ii. SamsungAccount=========> [rcz4775900 in the ShpApp/Osp/Application (Bori)]
iii.SamsungApps============> [8d7uw8z551 in the ShpApp/Osp/Application (kona)]
iv. Z7Engine===============> [2482tqy39g in the ShpApp/Osp/Application (z7clientengine)]
3. FFS FILES
a. AppEx => Sys => Widget => (delete these folders: AccuWeather, GoogleMobileService, Memo).
b. Media => Sounds => (delete the "Over the horizon.mp3" file)
c. SystemFS => Media => (from the folders listed below, delete the specified files):
i. Images => delete all except "Wallpaper 01.jpg" and "Wallpaper 02.jpg"
ii. Others => delete the pdf file.
iii. Sounds => Alert tones => delete all except "Cloud.wav", "Good morning.wav", "Haze.wav", "On Time"
iv. Sounds => Ringtones => delete all except "Samsung tune.mp3"
NOTE: Removal of these items will not affect your phone in any negative way.
Rather it will immensely improve the speed and stability of the phone.
Example, you can conveniently now play the Asphalt6 HD game without problems.
Total Memory of Phone will be approximately as follows:
Free Memory Space:
Application Memory: 838 out of 883 MB
System Memory: 570 out of 575 MB

Categories

Resources