ADT8 proguard integration not working - Android Software Development

I tried to export signed apps using eclipse and i have the proguard.cfg file in my base project folder but at the end getting build failed.

Same
Some of my projects "Failed to export application" and no more tips.
Is there any logs or other something I can see?
Need help, thanks

Got the same problem here. Looking on the message groups here and the suggestion is to ensure the proguard folder is not under a folder with spaces in it's name. so if you have the sdk installed into "Program Files" then maybe move it to the root of the c drive instead.
*however* even after I did that, I still couldn't get it to compile with proguard enabled...

Managed to get it to work, and confirmed it is all to do with spaces in folder names. If you change your windows temp folder to something else (the default goes under your user accounts in the "Local Settings\Temp" folder which has a space in it. I also had to move my whole workspace which again was under my user account below the "Documents And Settings" folder.
If you feel adventurous - once you try to export a signed app and it fails, you can find a .pro file which you can invoke manually using the proguard.bat and the parameters of @<location to workspace proguard.cfg fle> and @<location to the .pro file> (obviously don't include the < or the > !)
I can't find any issues raised on the android bug tracker, but I'm sure someone will raise it soon.

Related

SDConfigGen - a tool for automatically creating SDAutorun configurations

First off, I'd like to thank Sleuth255 for SDAutoRun, and to mousio for his AutoRun tool which provided the inspiration for this project.
SDConfigGen is a command line tool for the PC which inspects a collection of files to be installed, then produces an SDConfig.txt and other associated scripts and provisioning files to allow SDAutoRun to automatically install them.
It differs from mousio's solution in that rather than having SDAutoRun call a MortScript to do all the work, this tool creates an SDConfig.txt to do the majority, only calling scripts for specific functionality when required. Scripts (and therefore MortScript) may not even be required, if nothing being installed needs automation.
Installation
Unzipping the contents of the archive will produce this folder structure:
\
Storage Card\SDConfig\Cabs\
Files\
Scripts\
Settings\
Sys\​First things first - to use any of the script-based functionality a copy of the MortScript installation cab file must be placed within the Sys folder. Download MortScript-4.11b7.zip (or newer version) from http://www.sto-helit.de, then extract \cab\MortScript-4.11b7-PPC.cab from it.
Usage
If the name of the Storage Card will be different on your target device, then rename that folder to whatever it will be. Otherwise, just leave it as it is.
Within the sub-folders of SDConfig, add the files you want to be installed.
Cabs:
Any .cab files in this folder will be installed. If the installation of a .cab file requires user interaction (to confirm a license window, for example), then create a .mscr script file of the same name containing instructions to be executed while the cab file is being installed.
For example, if you need to install a cab file: "eWallet-PocketPC-Install.cab",
create a file called "eWallet-PocketPC-Install.mscr" too. This file contains
MortScript to be run while the cab installer is being run, for example:
Code:
windowTitle = "Software License Agreement"
WaitFor(windowTitle, 60)
SendLeftSoft(windowTitle)
Note that you don't need to worry about actually installing the cab, or waiting for installation to finish - just write the automation code itself.
The SDAutoRun UI will be hidden while an interactive cab is being installed like this, and a MortScript status window shown instead. The device will be responsive to user input, so if any non-automatable interaction is required, that can be done manually.
Files:
After the cab files have been installed, all files in this folder will be copied directly to the root folder. To copy files to sub-folders, place them in sub-folders of this folder. For example, to copy files to the Windows folder, create a Windows folder here and place the files within it.
Standard (English) folder names will automatically be replaced by variables, so files in the "Files\Program Files" folder here will be copied to %CE1% folder by SDAutoRun.
The file copy operation is actually performed by generating a CopyFiles.xml provisioning file in the Sys folder, and it is this that goes in the SDConfig.txt file. This method was chosen as it avoids the path length limit of copying directly in SDConfig.txt, and allows for the %CEn% variable subsitution scheme.
Settings:
After the files have been copied, any settings in this folder will be applied. Settings may either be .xml provisioning files (which are added directly to SDConfig.txt), or registry data in .reg, .rgu or .cereg files. Registry data files will be automatically converted to xml provisioning files within the Sys folder, which are then added to SDConfig.txt.
Scripts:
After the settings have been applied, any .mscr scripts within this folder will be executed. SDConfigGen will generate instructions in SDConfig.txt to automatically handle copying them to the \Temp folder and renaming them to replace spaces by underscores before execution if required.
Note that the device will not be interactive at this point, so don't write scripts that require user interaction.
Sys:
Apart from placing a copy of MortScript-4.11b7-PPC.cab in here, you shouldn't touch the contents of this folder; they will be automatically cleaned out and generated by the SDConfigGen tool.
Notes
I've provided RegToXml as a standalone .exe file so that registry data files can be manually converted to .xml provisioning files, if required. This is not generally necessary, though, as it will occur automatically as part of the SDConfigGen process.
Due to limitations of SDAutoRun, during installation some files need to be copied to the \Temp folder on the device before execution. A TempCleanup.xml provisioning file is generated in the Sys folder by SDConfigGen which is the last thing executed by SDConfig.txt. It should remove any temporary files that were placed in the \Temp folder, but will not remove the folder itself, or any other files within it.
SDAutoRun also requires that SDConfig.txt be ASCII, which means that if any files contain characters outside that range (such as accented characters), they can not be directly referenced. SDConfigGen will automatically detect this, and generate provisioning XML files to transparently rename the files before processing them, then back again afterwards.
The last statement in the SDConfig.txt is the RST: Reset statment, to reset the device.
The only part of the file structure that can be changed is the name of the "Storage Card" folder - the other folders cannot be renamed or moved. By default, when the SDConfigGen tool is run, it works with the first sub folder under the folder the .exe file is placed. To override this behaviour, pass the folder path to SDConfigGen.exe as a command line argument.
Cabs, settings and scripts are executed in alphabetical order, grouped by subfolder. Subfolders will be executed first, so for example the contents of Cabs\Prerequisites\ would be installed before the files directly in Cabs\ (but after files in Cabs\A\). All interactive cabs are executed first, followed by non-interactive ones.
All generated files (except SDConfig.txt) are in Unicode UTF-16 encoding.
To have SDConfigGen create a log file of the generation process, use the SDConfigGenWithLog.bat file included in the archive. It will create a results.log file containing the messages that would normally be output to the console.
This is still an early version, so there will probably be bugs with it. I've used it successfully for setting up my own device several times now, but I can't make any guarantees. Please do post any bug reports or suggestions here though!
Alex
Updates
0.6:
All output files are now in UTF-16 encoding, with the exception of SDConfig.txt, which is in ASCII.
If files referenced by SDConfig.txt have names containing non-ASCII characters, provisioning files to automatically rename them before they are accessed, and to restore them afterwards will be generated.
Subfolders are now supported in the Cabs, Settings and Scripts folders. Files within subfolders will be processed first, in alphabetical order of subfolder name.
File folder variable substition made case insensitive
Added SDConfigGenWithLog.bat file for easy logging of output to a log file
0.5.1:
Removed .svn files from the file structure (oops!)
0.5:
Made warning message on skipping registry files less confusing
RegToXml: Now supports empty values for String, MultiString and Binary values
RegToXml: Made ,ore robust to invalid data - if a value contains invalid data, only that value is skipped.
RegToXml: The line number is now reported with any error or warning message.
RegToXml: Whitespace allowed to surround the = in value lines.
0.4:
RegToXml: Fixed nesting bug with registry key deletion conversion
RegToXml: Now supports comments (lines starting with ; )
0.3:
RegToXml now assumes that registry files without Unicode BOM's are encoded in the system default ANSI codepage, rather than UTF-8 (this means that if your registry file is UTF-8, it must contain a Byte Order Mark to be read correctly)
0.2:
Files are now installed in alphabetical order by file name (within their own group). For example, first interactive cabs A-Z, then non-interactive cabs A-Z. This allows control over installing cabs that require others to be installed before or after them.
.NET Framework (required)
Lookin Mighty Fine Siuer.
Not in the Testing Time yet.
But does the scripts folder eventually combine the scripts into one?
(lazy Bum At Work, Not Able to test it)
No, the scripts in the scripts folder are not combined into a single script, they are all executed separately. Would there be some benefit to trying to combine them into a single script before execution?
AlexVallat said:
No, the scripts in the scripts folder are not combined into a single script, they are all executed separately. Would there be some benefit to trying to combine them into a single script before execution?
Click to expand...
Click to collapse
No, you are absolutely right there is now good reason for it.
It's better to have them seprated, makes finding **** Ups easier.
Don't know what i was thinking or why..
AlexVallat,
Thanks for your job, you soft is amazingly simple which is a great pro compared to SASHIMI for instance.
So yhis afternoon I started to put all my files in the appropriate folders and when I launch SDConfigGen with the folder path I don't get in the config.txt file \Storage Card\ before the files to execute but the path I gave as parameter. I think transforming the path given into \Storage Card\ could help.
One other point, as a poor French guy your RegToXml converter does not handle all the French extended character set such as é, à, ... Could you make it support this characters.
Anyway for now it is fully usable but requires SDConfig.txt file edition before launching the whole process. Tomorrow it will be hands-on time as I plan to upgrade my Polaris ROM so more news to come regarding SDCofingGen usage.
The_Steph
The_Steph said:
AlexVallat,
Thanks for your job, you soft is amazingly simple which is a great pro compared to SASHIMI for instance.
So yhis afternoon I started to put all my files in the appropriate folders and when I launch SDConfigGen with the folder path I don't get in the config.txt file \Storage Card\ before the files to execute but the path I gave as parameter. I think transforming the path given into \Storage Card\ could help.
One other point, as a poor French guy your RegToXml converter does not handle all the French extended character set such as é, à, ... Could you make it support this characters.
Anyway for now it is fully usable but requires SDConfig.txt file edition before launching the whole process. Tomorrow it will be hands-on time as I plan to upgrade my Polaris ROM so more news to come regarding SDCofingGen usage.
The_Steph
Click to expand...
Click to collapse
Hm my pall had the same thing but changing to Unicode seemed to solve his XML issue. NOt sure if this is the same but worth the try.
Great work alex!
Question:
Anyway to verify the syntax of the provisioning XML files?
Any tools out there that can create these files or verify them? I think a tool like this would be great.
NEVERMIND! I just saw your reply in the reg2xml converter thread! THANKS!
The_Steph: Thanks for your comments!
The idea with the path is that the name of the folder is used to control the name of the Storage Card on the device. So if you name your folder Storage Card, that's what goes in the SDConfig.txt. If, on your device, it has a different name (due to language changes, or whatever), then you need to rename the folder appropriately.
Thanks for the bug report about accented characters in RegToXml. I will fix that and post an updated version soon.
gtxaspec: I could verify that the files were valid XML, but the more useful check that they contain valid provisioning instructions is beyond the scope of this project. Not least because the documentation describing what are valid instructions is confusing and can be inaccurate. With anything other than the file and registry providers, it usually ends up being a case of trial and error. With the file and registry providers, using the auto-generation capabilities of SDConfigGen will avoid most surprises.
Alex
Version 0.3 released
I've just updated the first post to release version 0.3. This should address the accented characters issue raised by The_Steph, however it does mean that if your registry file is UTF-8 encoded, it must include Byte Order Marks to indicate this. Otherwise, it will be assumed to be encoded in the system default code page.
I've also added a feature that files are now installed in alphabetical order (within each group). If you need to make sure that certain cabs are installed before others, this can now be done by renaming them, usually by including a numeric prefix.
Alex
reg2xml bugs
Hi Alex,
Converting everything to xml and using standard provisioning is an interesting approach!
Only obviously reg2xml has got some problems still with .reg files containing certain characters:
I've attached you a sample file which is not converted correctly at three points, each with a different error cause.
- Comments (Lines beginning with ";") in the .reg files are sometimes (not in every case, could not see what the trigger is) leading to an aborted conversion.
- Some characters like the arrow character (ASCII 27/1BHex) are also a problem.
Maybe the attached file helps in finding the bug.
BTW: Do you also have a tool that is converting just the other way around: From XML to reg indstead of from reg to XML?
Sometimes I need to have a .reg file instead of an .XML. And importing the XML and then trying to find all registry entries to export it back to a .reg can be a very tedious thing when the imports are not all together in one registry branch.
Thanks!
Thanks for the bug report, asango. Yes, I forgot about comments, I'll fix that and release an update soon. I'm looking into what the best way to handle control characters like 0x1B is (which is 'Escape', according to the ASCII chart I'm looking at). Obviously crashing is not an acceptable behaviour, so I'll have some sort of fix for it.
I don't have a XmlToReg tool, but it sounds like a good idea - I'll probably write one over the weekend.
Alex
Great, looking forward to that, thank you!
Version 0.4 released
The first post has been updated to version 0.4. RegToXml has been updated to add support for comments in .reg files.
Unfortunately there appears to be no way to include control characters in an XML file. If the character itself, or even the character entity (like &#x1B, then the file is regarded as malformed and not accepted. I have therefore not been able to do anything to fix this (sorry asango!).
If anyone knows of a way that a provisioning file could be used to set a registry string value containing these characters, please let me know.
On a more positive note, the requested XmlToReg tool is up - I've given it its own thread here: XmlToReg.
Alex
Yes, the comments are now handled corectly, perfect!
Some other thing is still an issue:
test.reg: Converting...
test.reg: Conversion failed. (Unexpected value format: dword) Skipping.
In this case the output file is not generated at all, seems that not only the value is skipped but this causes the whole file not being written.
This leads to another suggestion: Would it be possible to indicate the line number where a problem happened?
This would make it much easier to find the problem.
And regarding the non handled escape characters:
This also leads to aborting. Would it also be possible to just skip them and issue a warning but go on with the conversion and with writing the outout file for the rest of the entries?
Now that is odd. "dword" is a perfectly valid value format, it shouldn't have produced that error. Any chance you could send me the .reg file that produced it?
Line numbers should be do-able, I'll add that to the next version.
The "skipping" message there referred to the "test.reg" at the start of the message, not to the dword value. I agree it looks misleading as it is currently worded though, I'll improve that.
About recovering from errors and skipping only invalid values rather than the whole file - this will be quite tricky. By the time I am notified of invalid characters by the XmlWriter, it has already given up in a sulk and can't be persuaded to continue writing any further. I'll need to do some sort of pre-vetting before passing data on to it. If I come up with any good ideas on how to do this, I'll include it in the next version.
Alex
asango, here's a candidate RegToXml.0.5.0 - could you check if it is still reporting the "Unexpected value format: dword" error with your file? It now reports line numbers, which might help track down the problem. It should also be able to recover from an invalid value and skip just that value, although I'm not sure how well that is working yet.
Alex
Hi Alex,
Great, the line numbers are making things much easier and this way I even found the reason for this error very easily:
Here's the point where it is failing:
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\RIL]
"NITZEnable"= dword:00000001
...with this error message:
test.reg: Converting...
[Line 194] Error: Invalid value (Unexpected value format: dword)
Skipping: HKEY_LOCAL_MACHINE\Drivers\BuiltIn\RIL\NITZEnable
Done.
As soon as I'm deleting the blank between the "=" and "dword" everything is ok.
Maybe you can allow blanks after the "=" in general?
This would solve this issue definitely
And yes, by the way the xml file is now generated despite of this error, very good!
Asango
Hmm... I'm not sure whitespace is supposed to be allowed around the = sign. It doesn't make anything ambiguous though, so there's no good reason not to relax the matching. Try this 0.5.1 which allows whitespace around the = sign, hopefully that should now parse your file correctly.
Alex
Yes, now I can see no other issues with the RegToXml tool, good work!
Also the whole cold boot import is ok with one exception:
Only the CopyFiles.xml which is generated by the SDConfigGen.exe is not copying all the files from the "Files" diectory during its execution.
Tried to import that xml manually with the xml option of Taskmgr and also got an error, but since the error is *very* uninformative and not showing the line number and my CopyFiles.xml is rather big I could not find the problem.
Could it be that the reason for the error is that if a file is already existing or read only that this will stop the rest of the import?
asango said:
Yes, now I can see no other issues with the Only the CopyFiles.xml which is generated by the SDConfigGen.exe is not copying all the files from the "Files" diectory during its execution.
Tried to import that xml manually with the xml option of Taskmgr and also got an error, but since the error is *very* uninformative and not showing the line number and my CopyFiles.xml is rather big I could not find the problem.
Click to expand...
Click to collapse
Second hands-on day with SDConfigGen and I have the same issue with v0.4. CopyFiles.xml is not executed at all. Probably a syntax error issue as stated by asango (I've done the same tests as him).
The_Steph

[Q] after I added a new class program won't recognize xml objects

I just added a new class to one of my apps which I copy and pasted from another one (which worked fine) and I used the same xml layout file (but I changed the package names and such). But now NONE of the objects from it (e.g. buttons) are being recognized and eclipse keeps underlining all of them in my code with error messages. I tried re-saving it and cleaning the project but nothing works. Any ideas????
How did your change the package name? It doesn't work just to type over it in the source file. In package explorer, under the src folder, does it show under the correct package name? If not right click on the source file name in project explorer and select refractor, rename.
________________________________
Unrevoked forever
SkyRaider Sense 3.5
Radio 2.15.00.09.01
thanks but I figured it out. I forgot to transfer over my background image so it wouldn't save the xml properly (and I wasn't paying attention), causing the button objects to be "ignored"

[APP]Configurable Android Commander

Hello,
heres my Tool for simple anything you try to do with external Applications like ADB.
Short Description of my Tool:
you can self create a menu in the contained XML-File with commands you are use with
adb or other Applications. Then configure Actions you will do when you click at this menu.
you can do things like Start Processes and put the Output into a Text Window or a
configurable colored and separated log-Window, copy or delete Files / Folders, Ask the User for Input of a folder
or file and work with this input in another command.
Preconfigured XML contains various adb-commands for logging, reboots, tasks and
Kernel splitting / creating.
This is a Beta-Version !
Copy contained Files into a local folder without spaces ! many binary packages won´t work
with spaces in a folder- or filename.
https://docs.google.com/open?id=0B-5Myc7jmiBcWGpoZEN1dURHQkE
Youtube Video in german: http://www.youtube.com/watch?v=uHL2AcMQxYw&feature=youtu.be
This Application requires .Net Framework 4.0 !

[Q] Is it possible to save Windows 8 live mail to external storage?

Greeting,
Due to space limited on my Ativ PC500T, I would link to save Windows live mail to my external 64GB MicroSD. Under Windows live mail options, mail, advanced tab, maintenance, store folder, change... When I browse to my MicroSD card, the "Ok" button is grayed out. Am I missing something?
Thanks,
It probably doesn't want to use removable storage, as there's too great a risk of the data getting "lost" if the card is removed or seated incorrectly, and that could cause the program to crash or something similarly unpleasant.
If you really want to do this, though, there's a way to fool it into thinking you're using a local path. This is called a symlink, or Symbolic Link; they are widely used on Unix/Linux but are also usable on Windows. Here's what you do:
1: open an elevated command prompt. By default, only Admins can create directory symlinks on Windows.
2: determine the location where you want the link to be created (somewhere in your user profile is fine), and the location where you want the link to go (a folder on your SD card).
3: ensure the target location (SD card folder) exists.
4: enter the following command in the elevated command prompt: mklink /D <link_location> <target_location> (example: mklink /d c:\users\pwanghk\email d:\email).
5: Set the mail app to store email into the link, which should basically just look like a local folder.
A clever way to do this would be to shut down the mail app, go to the folder it currently uses, rename that folder, then create the link using the folder's original name and copy the contents of the renamed folder into the link. That way, when the app starts up again, it will already be set up to use the link - no need to change anything. You can delete the renamed folder and its contents once you've verified that the link works.
Thank you so much for your help. I follow your instruction to the letter.
- rename the current "windows live mail" to "windows live mail original"
- create a "windows live mail" in my c:\users\pwanghk\windows live Mail
- create a "windows live mail" in my SD card D drive root directory I.e d:\windows live mail
- copy all the content of the original folder to the folder created in SD card
- run cmd prompt as admin
- change to root directory c:\
- type mklink /d c:\users\pwanghk\windows live Mail d:\windows live mail and enter
- receive message "the syntax of the command is incorrect.
Am I missing something?
If you want to use paths with spaces in them, you need to quote the paths.
mklink /d "c:\users\pwanghk\windows live Mail" "d:\windows live mail"
Duh! I completely forget bout the quotation mark. I am not a DOS guy and haven't used command for ages.
Anyway after correcting the syntax, I receive this message "cannot create a file when that file already exists". I rename the original folder to win_live_mail_original, add underscore prefix to the link_location and target location to no avail. Any idea?
To recap:
- Windows live mail folder now becomes Win_live_mail_original
- mklink /d "c:\users\pwanghk\_windows live mail" "d:\_windows live mail"
Edited 09/06/2013
I also try the following with no success. I rename the directory such that it match the mklink command below.
- mklink /d "c:\users\pwanghk\_windows live mail link" "d:\_windows live mail"
Just making sure: your folder "d:\_windows live mail" already exists, but "c:\users\pwanghk\_windows live mail link" does not, right?
If the latter does (and you've backed up the info in it), you need to delete it. Alternatively, you can just rename it.
Thanks. I will look into this once I got my Ativ back from repair. I may also look into other mail client which allows me to check imap and pop3 email and store them externally so I don't have to jump through hoops to get it to work.

[GUIDE] Extract and Restore Contacts, SMS, Call logs from nandroid backups(TWRP)

So yesterday My phone, Sony Xperia S, decided to go into bootloop and not boot at all, no matter what I did. Tried flashing stock PRF, stock firmware, some stock based firmware, but it would get stuck in bootloop. The reason for this being I was not formatting the data partition, which I needed to preserve since it had all My sms, contacts, call logs and other app data. Luckily, I had a working recovery(TWRP) and was able to take a backup. Then using that I was able to recover My contacts, sms, call logs and app data. After a lot of Google searches, I was finally able to work it out. The process is as follows:
Needed software:
Code:
yaffs-mmssmsdb-calls-extractor.zip from [URL="http://forum.xda-developers.com/showthread.php?t=1585957"]here[/URL].
Firefox Browser
Firefox addon of SQLite manager : [URL="https://addons.mozilla.org/en-US/firefox/addon/sqlite-manager"]link[/URL].
Excel macro to convert .db contacts to .csv : [URL="http://thydzik.com/downloads/convert-contacts2.db-data-to-vcard-vcf.xlsm"]link[/URL].
Software for csv to vcard conversion (Windows) : [URL="http://www.csvtovcard.com/"]link[/URL].
CSV to vcard conversion (online) : [URL="http://labs.brotherli.ch/vcfconvert/"]link[/URL].
SMS Backup & Restore android app : [URL="https://play.google.com/store/apps/details?id=com.riteshsahu.SMSBackupRestore"]link[/URL].
Call Log Backup and Restore app : [URL="https://play.google.com/store/apps/details?id=com.riteshsahu.CallLogBackupRestore"]link[/URL].
The procedure is a lot crude as of yet, I would update as more universal and convenient options are found.
I know there is Titanium backup app which can restore contact, sms etc from nandroid backups, but You need a paid version of the app.
First we need to extract the data partition of nandroid
Rename the data.ext4.win to data.ext4.tar.gz . If Your files are like data.ext4.win000, data.ext4.win001, then rename each of them to data.ext4.tar.gz in separate folders.
On windows, now You can directly extract them using WinRaR or 7zip application, although You don’t need to extract it entirely.
On linux, You can do so using the following command. It is recommended to store the file in a separate folder as the file gets extracted directly.
Code:
tar –xf data.ext4.tar.gz
Now we need to find two files contacts2.db and mmssms.db . The contacts2.db files is for contacts as well as the call logs and the mmssms.db is for messages. The contacts2.db is constant across most ROM’s and OEM firmware apps. The mmssms.db file may vary as per app and ROM’s. So what You need to do is look for a .db file inside the SMS app You have been using with the firmware/ROM.
We will restore the SMS and Call logs first.
Currently it is limited to Windows OS only.
Extract the contents of yaffs-mmssmsdb-calls-extractor.zip to a folder.
Copy the mmssms.db file and contacts2.db file to the above folder.
Now open a command prompt at location of the above folder. This can be done by opening the folder, right clicking using shift key pressed in blank space. You get the “Open command window here” option.
In it type:
Code:
extract -s mmssms.db
It will ask You to enter a name for the output .xml file, You can press enter to let it give a default name. This will convert Your sms to a .xml file .
Then type:
Code:
extract –c contacts2.db
It will also ask You to enter a name for the output .xml file, You can press enter to let it give a default name. This will convert Your call logs to a .xml file .
Copy both of these files to Your newly formatted phone and then use the two before mentioned apps (Call Log backup& Restore and SMS Backup & Restore) to restore Your SMS and call logs.
Now retrieving contacts. It is a bit lengthy, but simple process.
Start firefox browser. In it, after You have installed the addon do following to enable the addon
Go to options (3 horizontal lines).
Select “Customize” and drag the “SQLite Manager” to the blue bordered box.
Now open options and select SQLite Manager. In it select Database>Connect Database. In the opened dialog box, select All Files(*.*). Then select Your contacts2.db .
From the left side tree structure in the SQLite Manager window, right click on “data” and select “Export Table”.
Now in right side part of the window, You will get CSV tab and SQL tab. Under CSV tab, simply press OK button without changing any other options.
It will ask You to save Your .csv file. Save it.
Now if You try to open this file directly, You will notice that file is not properly arranged.
To arrange it properly, open the convert-contacts2.db-data-to-vcard-vcf.xlsm file. If You don’t know how to enable Macros, then do the following:
It will show You a warning “Security Warning Macros have been disabled. Options..”
Press the Options button. Select “Enable this content” and press ok.
Now Press the office button present at left top corner. In it select “Excel Options”.
Select Customize tab from left side. Then from “Choose commands from:” drop down menu, select Macros.
Now add convertDatatoContacts and writeContactstovCard to right pane from left pane by selecting them and pressing add. Press OK button.
Now as You can see two white square icons have been added at top right corner next to save undo redo options.
Select the first white square icon. Select “Enable Macros” button. Now select Your .csv file in the opened dialog box.
Now the file must have opened in a separate excel. The format should be 4 rows with they being First Name, Last Name, Phone 1 and Phone 2.
Then select Save As>Excel Workbook>Save Type as CSV(Comma delimited).csv . Press ok and yes on the two warnings generated.
At the left bottom, right click on “contacts” sheet and press delete. Save and close the file.
Run CSV to vCard software and open the above saved .csv file. Here You can save all contacts as single vCard file or separate files.
In the “Properties” section on the window, in front of “Phone 1” and “Phone 2” select “Mobile Phone” from options. Press “Convert” button.
Alternative to above two steps, You can also convert .csv to vcard using the website.
Now a .vcf file will be created where the .csv file was stored.
Now simply copy the .vcf file to phone and import using the phone contacts app!
Done!
Credits and sources:
@abbot2
[TOOL] yaffs extractor, mmssms.db & contacts2.db converter
http://thydzik.com/export-android-contacts-contacts2-db-to-vcard-vcf-on-windows/
Reserved.
This is complicated, but youre great mate...
Sent from my C6903 using Tapatalk
odie70 said:
This is complicated, but youre great mate...
Sent from my C6903 using Tapatalk
Click to expand...
Click to collapse
Ah yes, it's a lot complicated, but the need of recovering data was a lot important too!
Praise to you for saving me !
And if I may, I'd like to state my experience, which brings a few interesting facts into light:
1/ I was unable to open my tar.gz archives with 7-zip v9.20. It kept displaying an error message. Only the v15.14 version could handle them flawlessly.
2/ as a textra user, I discovered that it stores a duplicate sms database, which IS NOT compatible with yaffs-mmssmsdb-calls-extractor (which screams a message about a "missing sms table" or something) (praise to the author as well)
BUT, the system sms database can be found here, and is fully handled by the extractor tool:
data\data\com.android.providers.telephony\databases\mmssms.db
Now my sms are back and I can resume my thread about the best knitting techniques.
Thanks again
Add this cool service Online converter contacts2.db to vCard
OP - you're a deadset legend.
This is damn useful! :good:
Even if I do not need it right now but it is very good to know that there is a way.
Hello @Mirhawk, I am having this error when running the macro. What could be the issue?
http://i.imgur.com/baUmFci.png
Thanks for this. I wanted to comment to help others using Microsoft Office 2016 & now that Firefox Quantum has made old extensions incompatible. Call logs & SMS are easily imported by Nandroid Manager app (god bless the dev). This a short summary of steps to restore contacts, presuming you have the contacts2.db file extracted:
- Install Firefox 39 from here. Might work with FF 57, but did not want to take chances.
- Download the Excel Macro [which will help us later correctly arrange our data via pre-set changes, aka macros, on the Excel spreadsheet][see link above]
- Install & enable the SQLite extension in Firefox (already linked above by OP)
- Follow OP's steps until you obtain the .csv file
- Open the macro file you had downloaded earlier & click enable the content
- In Excel 2016, you need to add Developer Tab to your top menu: Go to File -> Options -> Customize Ribbon -> Check mark Developer option on the right side column. Click OK.
- Now we need to run the macros: Click on Developer Tab at the top -> Macros -> Run the first macro: convertDatatoContacts
- Select the .csv file & proceed
- Now run the second macro: writeContactstovCard
- Vcard (.vcf) is saved to same folder as your original macro file.
In Nougat, Contacts app can open and import .vcf file or you can use third-party app.
Great tutorial, thank you very much! This saved 6000 SMS when Titanium Backup had messed up. ??
Thank you very much! With your guide I could recover my SMS from a phone with a bootloop (TWRP bootable) but I did a different process:
1. TWRP Backup
2. Transfer it to PC
3. Rename the data.ext4.win to data.ext4.tar.gz . If Your files are like data.ext4.win000, data.ext4.win001, then rename each of them to data.ext4.tar.gz in separate folders.
4. Open each file in BandiZip program and search for mmssms.db
In my case it was in: data/user_de/0/com.android.providers.telephony/databases/
5. Copy this file to the same folder in spare phone / same phone after factory reset.
6. SMS appear now!
mmssms.db not found
I guess since Android 5+ mmssms.db is deprecated, refer https://forum.xda-developers.com/showpost.php?p=74784136&postcount=3 to extract sms to xml file
owzm tutorial
tks for A DETIALED TUTORIAL
try this forum for retrive contacts ,given a easy method by "StefanPutureanu"
https://forums.androidcentral.com/ask-question/459773-how-do-i-retrieve-my-contacts-twrp-backup.html
Thanks for valuable infomation.I'd like to share my experience that I have use Android recovery program to extract and recover sms,contacts,call logs from backup files.It has powerful method and the operation is easy.
my samsung s9+ deleted all my contacts, slowly like 20 a month lol, no idea why, ****ty sammy soft and auto sync deleted em from sammy cloud too...
i had problems even extracting contacts2.db /Failed to extract calls: no such table: calls/
so i found a better way: just convert your contacts2.db right into vcf here: http://gsmrecovery.ru/db2vc/index.php?lang=en
all my contacts are back
Mirhawk said:
Reserved.
Click to expand...
Click to collapse
Any way to get attachments on SMS back ?
Cause i get all my sms back, but no more pics

Categories

Resources