Noob at reg editing - Touch Pro2, Tilt 2 Windows Mobile General

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.

Related

How to convert _setup.xml to a cab

Hi,
I have searched and searched for the answer to this but can someone please help.
have downloaded some add on's, the dir includes the _setup.xml file which i believe i have to change to a cab file using makecab.exe, i have done this and copied the cab and all the other files on to the device and tried to run the cab but always get, their has been an error, the cab can not be installed. Tried it with several programs, all give same error.
Only thing I wonderd is if the makecab is the same for 2005 as it is for mobile 2006 ??
or am i going about this totally the wrong way, any help MUCH MUCH appreciated.
i use makecab comed with my winxp ( the one used to create cab for your pc)
in a dos prompt and never had a problem..
maybe you could have wrong sintax inside your xml file..
anyway here is the command I use
makecab /D COMPRESS=OFF _setup.xml whatevername.cab
they all work on my hermes.
Bye
Thanks for that, i was not using the -d setting but still gives me same problem.
I am trying to install Schapps Operator settings program, do makecab /D compress=off _setup.xml setup.cab
copy this and all the other files in one directory to the storage card of the phone and run the setup.cab, goes to ask me wher ei want to sotre it, i select device then it says "Schaps operator setup cannot be installed', this is the same with another program i try to install.
Arrrrgggghhh !!!!
wait a moment.. what you mean when you say program?
with this command you can only "store" an XML file into a cab file.
This xml should be something simple like a provisioning xml file not
a program.
To create a cab file to install a program you need a different tool
(something like wince cab manager), more complete and powerful.
Ciao
J
jarod_73 said:
i use makecab comed with my winxp ( the one used to create cab for your pc)
in a dos prompt and never had a problem..
maybe you could have wrong sintax inside your xml file..
anyway here is the command I use
makecab /D COMPRESS=OFF _setup.xml whatevername.cab
they all work on my hermes.
Bye
Click to expand...
Click to collapse
Hi jarod_73,
i have just created cab file using your instruction and it worked well if you are runing cab file manually.
i have startup.xml file on my device that can run cab files and install them to any folder i want on my windows mobile device.
my question is.. after i added my new file xxx.cab then i noticed that allthugh file exist and even runed it, then it doesn't install it automatically.
only manual operation can run this cab.
do you have any suggestions?
thanks
ran.
msward3380 said:
Hi,
I have searched and searched for the answer to this but can someone please help.
have downloaded some add on's, the dir includes the _setup.xml file which i believe i have to change to a cab file using makecab.exe, i have done this and copied the cab and all the other files on to the device and tried to run the cab but always get, their has been an error, the cab can not be installed. Tried it with several programs, all give same error.
Only thing I wonderd is if the makecab is the same for 2005 as it is for mobile 2006 ??
or am i going about this totally the wrong way, any help MUCH MUCH appreciated.
Click to expand...
Click to collapse
Same problem here and it use to work for me..maybe its windows 7 i dunno

Ricky Kavana and T-MyFaves

Hi everyone, I am new to the scene and just signed up with tmobile and received my dash today. I immediately flashed the dash with Ricky's Kavana rom and had not setup myFaves. I am not sure how the myFaves works but if I set them up with this modded rom will they register with tmobile as myFaves numbers?
No it has nothing to do with T-Mobiles My Fav plan.
HOW TO SET UP MyFaves
Instructions
==================================
This Part is for thoses how have v11 to v19
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This part is for if you flashed your phone
============================================
1)Download Total Commander form here http://ghisler.fileburst.com/cebeta3/index.html
2)Install to your phone
4)Open Total Commander
5)Navigate to \Program Files\Excalibur Photo Dialer\ in there youll find lnk files
named Dial_Contact1m.lnk all the way thougth to Dial_Contact12m
6)Now Click File then click 4 (edit)
7)You sould see this 40#"\Windows\VJDialer.exe" +1-555-555-1234"
8)You need to Change +1-555-555-1234" to the number you what
9)Then Click File then Click 2 (Save)
This part is for if you Did't flashed your phone
============================================
1)Download Total Commander form here http://ghisler.fileburst.com/cebeta3/index.html
2)Install to your phone
4)Open Total Commander
5)Navigate to \Storage Card\Program Files\Excalibur Photo Dialer\ in there youll find lnk files
named Dial_Contact1m.lnk all the way thougth to Dial_Contact12m
6)Now Click File then click 4 (edit)
7)You sould see this 34#"\Storage Card\Program Files\Excalibur Photo Dialer\VJDialer.exe" +1-555-555-1234
8)You need to Change +1-555-555-1234" to the number you what
9)Then Click File then Click 2 (Save)
============================================
This part is for v20 and v21
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
1) Go to MyFaves panel
2) Slid you panel to the left untill you get to (6)Change My5 Contacts
-------------------
3) Click on it
4) click edit Click contact1 then click change name now enter your contacts name once you have done that press down twice on your center button then the name will come up on the screen
5) click edit Click contact1 then click change phone click back then enter you contacts number then once you have done that press down twice on your center button then the number will come up on the screen
6) click edit Click contact1 then click Change image then click choose then find you contacts photo in you file system then
once you found the picture press down twice on your center button then the picture will come up on the
7) do the same for all contacts then click save
8) turn off you phone then turn it back on
This part is for if you Did't flashed your phone
============================================
1)Download Total Commander form here http://ghisler.fileburst.com/cebeta3/index.html
2)Install to your phone
4)Open Total Commander
5)Navigate to \Storage Card\Program Files\Excalibur Photo Dialer\ in there youll find lnk files
named Dial_Contact1m.lnk all the way thougth to Dial_Contact12m
6)Now Click File then click 4 (edit)
7)You sould see this 34#"\Storage Card\Program Files\Excalibur Photo Dialer\VJDialer.exe" +1-555-555-1234
8)You need to Change +1-555-555-1234" to the number you what
9)Then Click File then Click 2 (Save)
-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=
these Instructions was made by RickWyatt at xda-developers
http://forum.xda-developers.com/forumdisplay.php?f=309
\05\04\2008\ at 1.13pm
Click to expand...
Click to collapse
But this is not the real myFaves that tmobile phone rom comes with, is this correct?
Correct oh mahn doe
Thanks for posting these instructions. I was about to go bonkers.
Go to this link, download "duprade My Faves" and install it on your phone.
http://forum.xda-developers.com/archive/index.php/t-369500.html
Yo need to go to CHome to configurate "CMyFaves" for the rapid acces to your number and changes the default DIALER (Dialer.exe) by: "My5Dialer.exe;phonenumber" with 1 prefix to the phone number.
Good luck
Adavid
My faves
I tried to install Duprades my faves on my t-mobile dash but it does not show any names or number and i cannot make any calls via myfaves, please help me
when i 1st installed the duprades my faves app it didnt work for me and i gave up but just recently installed it and rebooted my phone then i was sent a txt msg that said your my faves contacts have been refreshed then i went back to my faves app then worked
How does one reset/edit the names on Ricky's v24 with the My-Favs(photo dialer) app. I didn't realize it was putting whatever I typed as the name when I tried to edit the name of one of my contacts. I typed the name in and hit the center button, and it just vanished, so I typed in some more stuff and that vanished too. Now when I restarted my phone, there's a bunch of gibberish text, everything I typed, as the name for Contact 1. I can't get rid of it to add just the name in.

Start bar/Task bar Text

Alright guys, and gals
I hate to bother everyone over such a minute, tiny issue, and I'm sure this has been asked before (although before everyone jumps on me I have already searched the forum), but I was wondering if there is an easy was to change or get rid of the "START" text next to the start menu in WM 6.1?
I have just installed some gorgeous task bar icons by InsecureSpike and feel that I can do without the Start text.
Any ideas?
Cheers,
Orpheus
yeah, how can i change the "start" text into "Go" or whatever?
greets
sid
Follow instructions on this link: http://forum.ppcgeeks.com/showthread.php?t=65911
Excellent, Thanks buddy I will give that a try
thank you, but, oh my god, this is it too much input.
my english is not good enought for too much.
i need a little tutorial how can i change the "start" text in wm6.1
can you help me?
greets
sid
Just did a search. THIS popped up
Its actually not that difficult. Just follow these instructions by tsowens who by the way deserves credit for this.
Change Start Text
1. Unsign your shellres.dll.0409.mui
2. Open it in one of these three Reshack / PE Explorer / Restoratorand go to string value 321 and change the name from Start to whatever you want.
3. Save your modified file
4. Open MssignerorMultiple file Signer
· click Start sign Process (for MFS follow directions in the link)
· a window will pop-up with "Process finished!"
· You will see a that a text file has been create for your shellres on your desktop
· Open the text file, if you see "Warning: This file is signed, but not timestamped, Succeeded" you know the file was signed.
5. Transfer the modified file to your SD card
6. Open TC and navigate to the /Windows and rename your old file to "shellres.dll.0409.mui.bak"
7. Move your modified file from your SD card into the /Windows
8. Soft Reset updated 12/09/08
super, thank you so much
greets
sid
mhmm only i found a shellres.192.dll in the windows folder with total commander...
greets
sid

update-script help

So, here's my problem.. I have created a package to be flashed from recovery (update.zip). It works.
I open the file update-script in the \META-INF\com\google\android\ directory with notepad. I add the line "copy_dir PACKAGE:data DATA:", re-zip and flash. I get a syntax error when flashing, no matter which recovery I use. I go back into the script delete the line I just added, to make it THE EXACT same script it was when it worked, and I still get the syntax error.
Now I'm frustrated and I can't figure out what's going on. Any ideas?
I could be wrong, but sounds like you're using something like Wordpad that's causing the issue. Google Notepad++, one of the most awesome editors IMO.
I'm only using windows notepad. :/
I'll try google notepad when I get home tonight.. does the encoding matter? It's saved as ANSI.
Thanks for the help, bro

Extract file form LG Backup "lbf"

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.

Categories

Resources