There's a similar post of how to change the default homescreen in Touchwiz 4.0
unfortunately, the method by changing the "default.prop" did not work for some STOCK ROM (like ZSKF1 and ZSKF4). After spending more than a week, I have find a conclusion. (Don't laugh me spending too long on this. I9100 is my first Android Phone.....and i just want to share with those who suffered like me...)
try this:
1. download the attachment "apktool.rar"
2. extract "apktool.rar" to C:\apktool (easy for locate the files under windows's Command prompt)
3. pull "TouchWiz30Launcher.apk" from /system/app using RE Explorer and put it into C:\apktool
4. now go to CMD (Windows Command Prompt)
5. type the following:
- C:\apktool\apktool d "C:\apktool\touchwiz30launcher.apk "C:\apktool\touchwiz30launcher"
6. once it has finished, you will see there is a folder named "touchwiz30launcher"
7. inside the folder C:\apktool\touchwiz30launcher, go to \res\layout-port
8. find the "launcher.xml and edit it with Notepad
9. find the - launcher:defaultScreen="0"
10. change it to launcher:defaultScreen="3"
11. save and exit
12. go back to CMD and type:
- C:\apktool\apktool b C:\apktool\touchwiz30launcher\
13. now you've got a folder namded "build" under C:\apktool\touchwiz30launcher\
14. open your TouchWiz30Launcher.apk by using 7z (choose "Open archive") you will see a file "resources.arsc"
15. replace the "resources.arsc" with the one uncer C:\apktool\touchwiz30launcher\build\apk\
16. put TouchWiz30Launcher.apk back to your phone.
17. restart
This is the way how I've made it, but to be honest, I AM A NEWBIE, the above method i used to changing something of the Framework, and I found it also work on this.
Please if any expert can improve or point out any mistake.
It's better to have third party Launcher installed just incase if it's not working, and still have a chance to undo it by placing the original files back.
Alas this didn't work on:
Villain ROM 1.4
Also modified the launcher.xml in \res\layout-port-1024x600 but this made no difference.
Anyone managed to figure this out?
andyvaughan said:
Alas this didn't work on:
Villain ROM 1.4
Also modified the launcher.xml in \res\layout-port-1024x600 but this made no difference.
Anyone managed to figure this out?
Click to expand...
Click to collapse
i can 2nd that! would love to see a fix...
Tested on litepro 1.5. Doesnt work
You don't change xml file but you have to make changes to Launcher.smali
find the following lines:
const/4 v0, 0x4
const/4 v2, 0x0 <<< change this value to 0x3
const-string v1, "N"
.line 291
sput v2, Lcom/sec/android/app/twlauncher/Launcher;->DEFAULT_SCREEN:I
.line 292
sput v2, Lcom/sec/android/app/twlauncher/Launcher;-DEFAULT_SCREEN_NO:I
const/4 v2, 0x0 <<< add this line
recompile and copy to system/app folder
hey guys decided to use this thread to clear out one thing.
what should I edit in order to change de app/home button to other position ?
kcchik said:
There's a similar post of how to change the default homescreen in Touchwiz 4.0
unfortunately, the method by changing the "default.prop" did not work for some STOCK ROM (like ZSKF1 and ZSKF4). After spending more than a week, I have find a conclusion. (Don't laugh me spending too long on this. I9100 is my first Android Phone.....and i just want to share with those who suffered like me...)
try this:
1. download the attachment "apktool.rar"
2. extract "apktool.rar" to C:\apktool (easy for locate the files under windows's Command prompt)
3. pull "TouchWiz30Launcher.apk" from /system/app using RE Explorer and put it into C:\apktool
4. now go to CMD (Windows Command Prompt)
5. type the following:
- C:\apktool\apktool d "C:\apktool\touchwiz30launcher.apk "C:\apktool\touchwiz30launcher"
6. once it has finished, you will see there is a folder named "touchwiz30launcher"
7. inside the folder C:\apktool\touchwiz30launcher, go to \res\layout-port
8. find the "launcher.xml and edit it with Notepad
9. find the - launcher:defaultScreen="0"
10. change it to launcher:defaultScreen="3"
11. save and exit
12. go back to CMD and type:
- C:\apktool\apktool b C:\apktool\touchwiz30launcher\
13. now you've got a folder namded "build" under C:\apktool\touchwiz30launcher\
14. open your TouchWiz30Launcher.apk by using 7z (choose "Open archive") you will see a file "resources.arsc"
15. replace the "resources.arsc" with the one uncer C:\apktool\touchwiz30launcher\build\apk\
16. put TouchWiz30Launcher.apk back to your phone.
17. restart
This is the way how I've made it, but to be honest, I AM A NEWBIE, the above method i used to changing something of the Framework, and I found it also work on this.
Please if any expert can improve or point out any mistake.
It's better to have third party Launcher installed just incase if it's not working, and still have a chance to undo it by placing the original files back.
Click to expand...
Click to collapse
hi hk mate,
i suggest u go and download notepad2 or notepad++ etc, which can save txt file in unix format. don ever trust m$ notepad when u r dealing with unix/linux/android/mac
good luck
remorema said:
hey guys decided to use this thread to clear out one thing.
what should I edit in order to change de app/home button to other position ?
Click to expand...
Click to collapse
simply because ppl have diff preferences
How to get a Transparent status bar!
ok ok there are still a few problems to work out but maybe some people smarter than I will know the answers.
Here's what you should know before we begin... MAKE A BACKUP FIRST
at the moment ..
1. this does not work with the stock touchwiz launcher (may be a simple fix havn't looked into it yet.)(well works everywhere but the desktop)
works quite well with ZEAM and not too shabby with GO EX (if you use multipicture live wallpaper from the market)
havent looked into any others.
2. the status bar is still clear on the lockscreen (may annoy some)
fixible with multipicture wallpaper just set use lockscreen settings and then lock screen settings and set a black picture.
probably not perfect but it's a start.
thanks to KBanause for providing the info needed at this link http://forum.xda-developers.com/showpost.php?p=9978779&postcount=62
This tut also assumes you have some basic computer skills and can navigate from a command prompt. and that your computer has java installed. (most do you just need the runtime enviroment if you don't have it get it here http://www.oracle.com/technetwork/java/javase/downloads/jre-7u1-download-513652.html)
OK if you still want to try this
START HERE
MAKE A BACKUP FIRST
download
clearstatustry.zip (attached above)
unzip this file to a folder (7zip or winrar ect whatever)
you should have 4 files here
baksmali-1.2.8.jar
smali-1.2.8.jar
statusbar_background.9 - 25.png 25% transparency
statusbar_background.9 - 50.png 50%transparency
still here . wow ok you must really want to see this.
pick one of the statusbar_background files and rename it statusbar_background.9.png
now you need the SystemUI.apk from your phone it's in /system/app
grab it with a file browser that has root access and copy it into the folder with that other crap.
next Open SystemUI.apk with your zip tool, do not extract, just open.
navigate to the res/drawable-hdpi/ folder and copy your statusbar_background.9.png over the existing one.
now go back to the root of the SystemUI.apk and Drag classes.dex out to your folder.
open a command prompt and navigate to your folder with these files.
or just shift + right click in the folder you extracted the files to and select open command prompt here.
run this command
java -jar baksmali-1.2.8.jar -o classout/ classes.dex
now go back to your folder
and navigate to classout\com\android\systemui\statusbar
open StatusBarService.smali in a txt editor
find the line
invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V
above that change const/4 v5, 0x2 to const/4 v5, -0x3
save and close
Go back to your CMD prompt and enter this command
java -jar smali-1.2.8.jar classout -o classes.dex
ALMOST THERE I PROMISE
now copy the classes.dex back into the root of the SystemUI.apk file and close
MAKE A BACKUP FIRST
now just copy that systemui.apk back into the /system/app folder on your phone
dont mind the force close and reboot.
MAKE A BACKUP FIRST
if it doesn't seem to work try a live wallpaper
or use Multipicture live wallpaper from the market to set a static image.
this will probably mess up your phone but hey sorry MAKE A BACKUP FIRST
mjcollum said:
java -jar baksmali-1.2.8.jar -o classout/ classes.dex
Click to expand...
Click to collapse
For those that are unfamiliar with command line and get file not found errors, instead of typing everything try this
Code:
java -jar [b](drag baksmali-1.2.8.jar file here)[/b] -o classout/ [b](drag the classes.dex file here)[/b]
This will fill out the path to your files for you if they aren't in the root directory.
mjcollum said:
Go back to your CMD prompt and enter this command
java -jar smali-1.2.8.jar classout -o classes.dex
Click to expand...
Click to collapse
Same concept here
Code:
java -jar [b](drag smali-1.2.8.jar file here)[/b] [b](drag classout folder here)[/b] -o classes.dex
Either way, thanks for the guide. I'm sure a lot of people will find it useful
Good call I didn't even think to let people know about that.
also another heads up for anyone that doesn't know you can shift + right click in the folder and choose open command window here that way you don't have to navigate to the directory.
Wow- I can't believe this thread got buried with only a few posts.
I have followed these outstanding instructions word for word with no issues at all, however my status bar is still blacker than black! After completing this, I went back and pulled my SystemUI.apk again, decompiled it, and checked to make sure the smali edit and the .9 were still there which of course, they are. Is there an xml color code that needs to be changed as well?? I tested this with both Go launcher and ADW and no luck. Help!?!?
Thanks!
I would think that maybe using the transparent lock screen and this we could figure it out. I would love to have that option!
I really wish we could get this working. its the Last visual hack I want to do on my SII that I can't do. Everything else is perfect just really hate that black bar. I can hide it but then I can't see my info either. Grrrrr
In addition to the smali edit and the statusbar_background.9, I found an XML difference between a miui clear status bar systemUI and all of ours (as in any ET4G systemUI. I'm getting ready to mod it and push it. I'll let you know if it works!
Sent from my SPH-D710 using xda premium
I tried this step by step with no luck. To make it white could you just change -0v3 to -0v1 or make the statusbar image white?
Is this possible with apk manager using notepad++ to edit the smali file and recompiling?
Thanks.
is there an easy way for me to "change" the image to another opaque image ie an actual image not a "color"
I could just crop X pixels from the top of my image and MAKE THAT the background for the status bar if that is possible.
Ok I think I figured it out and I don't even think you have to edit the smali but I could be wrong. You have to edit the layout/statusbar xml file and at the top you see ff000000 which is black and change that to the desired color or make it transparent. I just made mine white but combined with the smali edits shown here but stock statusbar image.
nerys71 said:
is there an easy way for me to "change" the image to another opaque image ie an actual image not a "color"
I could just crop X pixels from the top of my image and MAKE THAT the background for the status bar if that is possible.
Click to expand...
Click to collapse
There is, to do that make sure you have the newest version of Android SDK, Java, and ADB
Download APK Multitool here - http://apkmultitool.com/?q=node/5
Extract it then extract the apps you are going to mod, in your case framework-res and SystemUI.
Put the SystemUI.apk in the modding folder and run the script to decompile SystemUI with the framework-res as a dependency (option 10). Before proceeding, but after decompiling check the log file to ensure everything decompiled without error, otherwise it won’t recompile. Errors are usually due to improperly patched .9.png’s, and while they can be very confusing, you can just swap bad ones out with those from a stock ROM until after you’ve made your edits.
Once you have decompiled without any errors open your project folder (inside whatever you named your APK Multitool folder and navigate to;
res/layouts/statusbar.xml:
On the second line find <com.android.systemui.statusbar.StatusBarView androidrientation="vertical" android:background="#ff000000" android:focusable="true" android:descendantFocusability="afterDescendants"
change it to
<com.android.systemui.statusbar.StatusBarView androidrientation="vertical" android:background="@drawable/statusbar_background" android:focusable="true" android:descendantFocusability="afterDescendants"
Do the same on the second to last line which is the date view. It will have the color code (#ff000000) change it to "@drawable/statusbar_background"
Follow the prompts to recompile and use the new apk created in the mod folder called unsignedSystemUI.apk. In the drawable-hdpi folder you’ll find a png named statusbar_background.9.png, which is what will now be displayed as the status bar instead of the color code. You can make it any color you’d like. Ideally, you should ensure that the .9 is properly patched, but if you swap it out after recompiling it somehow doesn’t seem to matter much.
Good luck.
I just don't feel comfortable going to those lengths just yet.
Guess I will have to wait (hope) for a simpler solution
I tried the metamorph one but it does not work (bad file)
You only have to edit calls to the image in system UI status bar XML as someone above said. No smali edits required. Currently it calls a color code. You want it to call an image. Alternately, you could simply use a color code with transparency as well and skip editing an image all together. =P
Sent from my SPH-D710 using XDA App
nerys71 said:
I just don't feel comfortable going to those lengths just yet.
Guess I will have to wait (hope) for a simpler solution
I tried the metamorph one but it does not work (bad file)
Click to expand...
Click to collapse
It's actually easier to do than it is to read, but if you're not comfortable with t yet thats understandable.
What ROM are you using? If you send me the SystemUI.apk your using I can take a look at it.
Change the color code if you want something simple, but if you want to use an image up there, do as posted a few posts up.
calkulin's 2.7
nerys71 said:
calkulin's 2.7
Click to expand...
Click to collapse
+1, if someone has this working on calks 2.7 could you please share the files you edited? Id love to add this to my theme. If no one has already did it, ill give it a try and post results if successful
I can post one tonight, its very easy to do.
Minimal black and white theme has transparent statusbar
Sent from my SPH-D710 using xda premium
Greetings and Salutations, Epic 4G Touch Owners and other curious parties!
Disclaimer: Just reading this may cause your head to burst, your phone to catch fire, dogs and cats may do the tango! I am not responsible for any bad stuff that happens from you reading or acting on the information in this thread.
If any ROM authors want to use this fix in their ROMs, I'm completely cool with that. A quick kudos in your credits section would be nice, though.
Background: People were asking about removing the ascending ringtone volume. I don't really care either way, personally, but there is demand.
Thankfully, the fix is quite simple!
Credits
the_ozyrys - One of the first posts I saw this in.
The brave XDA members who try these instructions and report their success or failure!!!
XDA for being a great source of information!!!
XDA members for thinking outside of the box!!!
The fix:
This fix requires editing your Phone.apk file. If you are using one of the fine custom ROMs on XDA, be aware that the you or the author may have already made changes to the Phone.apk file, so using my file IS NOT RECOMMENDED.
If you are using the Calkulin's E4GT ROM v1.5a ROM, you can safely use my attached Phone.apk file. It may work with other "stock" ROMs, but this is the one I based it on. Make sure to rename it to Phone.apk
What you need to perform this mod:
1. An Epic 4G Touch ROM ZIP file, or a phone running a Epic 4G Touch ROM.
2. The Java SDK -- So you can run Smali.
3. Smali/Baksmali -- So you can decompile/compile the classes.dex file.
4. Android SDK -- To push/pull files from your phone (adb only).
5. Some sort of archive tool (such as WinRAR, 7zip, etc).
5. A text editor capable of editing UNIX-formatted files. I recommend Notepad++, personally.
Ease Of Use Tips: Install Java SDK first, then Android SDK (if you need adb). Download the smali files (smali-1.2.8.jar and baksmali-1.2.8.jar at the time of this writing) to a new "working" folder where we can do our magic.
KEEP A COPY OF YOUR PRE-EDITED PHONE.APK FILE, just in case!
Android is case-sensitive, so ensure that your file is named Phone.apk, and not phone.apk.
Instructions:
1. Put your phone in AIRPLANE MODE (hold Power->Airplane Mode)
2a. [If you are using a ROM ZIP File]: Use 7zip/WinRAR/WinZip to open the ROM ZIP file. Navigate to system\app and extract Phone.apk to your "working" folder.
2b. [If you want to grab Phone.apk from your running phone]: Use adb to pull Phone.apk to your working folder. Example: adb pull /system/app/Phone.apk C:\Working\Phone.apk
TIP: To avoid problems, ONLY USE adb to pull/push Phone.apk. Phone apps may cause unknown issues.
3. Go to a command prompt in your "working" folder and run the following command: java -jar baksmali-1.2.8.jar -o Phone/ Phone.apk
4. Browse to your "working" folder and see that there is now an Phone folder inside, with other subfolders. Browse to Phone\smali\com\android\phone.
5. Edit the file called Ringer$1.smali with your favorite UNIX-format compatible text editor and look for the following text. The key is to search for setStreamVolume. There should be two results. Comment the line below that is in BOLD by adding a hash (#) in front of it.
Code:
.line 394
iget-object v1, p0, Lcom/android/phone/Ringer$1;->this$0:Lcom/android/phone/Ringer;
iget-object v1, v1, Lcom/android/phone/Ringer;->mAudioManager:Landroid/media/AudioManager;
[B]invoke-virtual {v1, v3, v5, v4}, Landroid/media/AudioManager;->setStreamVolume(III)V[/B]
6. Change that line to say #invoke-virtual {v1, v3, v5, v4}, Landroid/media/AudioManager;->setStreamVolume(III)V
7. Save Ringer$1.smali
8. Go back to your command prompt, change to your "working" folder and issue the following command: java -jar smali-1.2.8.jar Phone/ -o classes.dex
9. Open Phone.apk in your favorite archiver.
10. Drag the file called classes.dex from your "working" folder into Phone.apk and replace the one already in there.
11. Run the following commands to get the file on your phone:
Code:
adb remount
adb push Phone.apk /system/app/Phone.apk
adb reboot
IF ADB REBOOT DOESN'T WORK, REBOOT YOUR PHONE MANUALLY. YOU MAY HAVE TO PULL YOUR BATTERY. ANDROID DOES NOT LIKE REPLACING THE PHONE APK WHILE RUNNING.
Your phone should reboot and now have one volume level when the phone rings.
Please let me know whether or not this worked for you. I'd like to make a list of ROMs (with applicable mods) this works for or doesn't work for.
I will do whatever I can to help if you are struggling. If there's something you don't understand, please let me know. I can update the instructions if I accidentally wrote something wrong.
the_ozyrys was one of the first I saw that posted it when I was searching for this mod, so you can give credit to him, http://forum.xda-developers.com/showpost.php?p=8482676&postcount=13.
And BTW thanks for posting the how to because I was actually going to add this mod for the next release, so if people ask, I'll point them this way
Calkulin said:
BTW thanks for posting the how to because I was actually going to add this mod for the next release
Click to expand...
Click to collapse
Excellent, Calk. I'll wait for you to do that so as not to bork my phone LOL.
Nice tutorial Ithink I will give it a shot just tonsee if I could do it. Now aall I need is a tutorial on how to mod the dialer to the center like Calls.. I happen to be testing out another rom and miss that tweak. THX again OP
Sent from my SPH-D710 using XDA App
Is there any way we could get a flashable zip of this?
Nice.
Sent from my SPH-D710 using XDA App
hey guys i was wondering if i could get some help because no matter how many times i try to do this mod myself i cant seem to get it right.
if anyone could mod the themed apk file that i attached i would greatly appreciate it
thanks in advance
xx8todiefor6xx said:
hey guys i was wondering if i could get some help because no matter how many times i try to do this mod myself i cant seem to get it right.
if anyone could mod the themed apk file that i attached i would greatly appreciate it
thanks in advance
Click to expand...
Click to collapse
Sorry for the delay -- here is a file that should work. Don't forget to rename it to Phone.apk before you put it on your phone.
Thank you so much Nivron
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.