Messing with mmssms.db - Android General

First off, I searched without success hence this post.
Second, if this is in the wrong forum will a mod please move to the correct. (If this is the case I apologize in advance)
With my job I spend a deal of time some days txting employees seeking someone to work, notifying them of company things, yadda yadda yadda.
Lately I've had a few part timers 'screw me over' by stating they didn't receive a text message or don't remember replying back to me. Because of this I've had to resort to making nightly copies of my mmssms.db. I've got a tasker job set up to move and send the file and get it on my desktop. That's not a problem. The problem is after I send the database I want to 'clear' my messages out but leave only certain ones. ie threads from friends or family but delete threads that sit cluttering my messaging and getting in the way. Through tasker I'm trying to run some SQL to pull only relevant data and move that to a txt file stored locally and then trying to clean out the database of unnecessary stuff. The problem I'm running into is that it's not clearing out everything I want it to. I want to keep my stuff intact but because of that I can't remove threads started by me sent to my employees. Confuzed yet?
sorta goes like this
Tasker kicks in. copies mmssms.db to desktop.
Run query and write data to txt
Run another query and remove unnecessary rows from mmssms.db
my query to delete the unwanted rows is this
delete from sms where thread_id in (select _id from threads where _id in (select _id from canonical_addresses where address!="xxx-xxx-xxxx" and address!="xxxxxxxxxx"))
Click to expand...
Click to collapse
on the desktop this works great, I guess, but on the phone I'm just not getting the right results.
phew!
That being said, sorry for long windedness, am I doing this right? or am I going at it wrong?
any help would be much appreciated.
Thanks, in advance.

Related

Upgrade / Erase / Upgrade / Rinse / Repeat

As much as I love screwing with my phone -- there are several things that I have to restore every time, that keep me from re-flashing, even when I know my build is probably more buggy than another. I'm posting this as kind-of an advice question. These are the things that I go through after a reflash. I'm hoping that people out there have a better way to do things, to make life less painful for me.
1) So -- I think my biggest issue is my contacts. I have several ringtones that I use to distinguish contacts. And, It is a royal pain to go through the entire contact list after a reflash and set them back up. Is there a way (maybe with pim backup) to save that information?
2) I *think* if I delete my active sync association, I won't end up with 100 different names for my phone -- is that true?
3) Apps: I keep a directory with all the apps I need to install. After things are happy again, I just go through the directory and install all the apps. (There's a separate directory for cabs -- they're a quick copy, then a few clicks to install)
4) And, finally -- one last semi-related question / seek for advice: Is there one place where all the builds are rated for stability? I love the cool stuff, and don't mind occasional gotcha's. But -- I'd like my phone to hang one time a day or less . . . Is there a page like that on the wiki somewhere? Where people can rate builds based on stability, coolness, geektitude, etc?
-Dave

Is it possible to force My Docs to use Card only?

Hello all,
I notice when syncing and also using explorer to look at files on my Tilt that there are what looks like multiple folders with the same name, such as My docs, my pics and so on.
Can I delete them and somehow dorect the device and Active sync to all use the card for file storage?
What has to do with ROM development??? "No i don't want an answer"
Please post somewhere more relative to your subject matter.
abovenbeyond said:
Hello all,
I notice when syncing and also using explorer to look at files on my Tilt that there are what looks like multiple folders with the same name, such as My docs, my pics and so on.
Can I delete them and somehow dorect the device and Active sync to all use the card for file storage?
Click to expand...
Click to collapse
Try it and see !
Where else di you post this, I seem to remember helping someone with this same question not long ago ?
I did not post this question before, and I looked around and saw nothing...
And Stylez... WTF dude or Dudett... I asked it here because it has everything to do with the ROM. You see after I flash the ROM I have several duplicate folders, some right in the mobile device root, then some in the My docs folder, and then some on the card when I put it in...
Sheesh my concern about just deleting them is 1) some are tagged as system files so I can't. 2) I don't want to delete one that say the camera is going to try to save to, and 3) Outlook/Exchange, where does it store its data on the device?? If it is on the main memory I would like to change it so it will be saved to the card.
I seem to recall years ago either JasJamming, or Custel, or Maybe it was Dutty had a ROM or maybe a CAB that forced all anything to be saved to the card.
So if the ROM is pointing say to one folder, and active sync to another, and the default OS uses a third, I thought maybe this could all be corrected in ROM cooking and so I asked it here...
Now then, with that said... instead of responding with a NON answer, either speak up with a answer or if you don't know... well pardon my frence but "Shut the F*** up!"
PS: To all you that will read this as me being rude and possibly hurting my ability to get an answer, well I am sorry. But I hate when all someone has to say is to bit*h about anything but an answer.
Your question has to do with active sync & documents
Chill ya beanz no need for a response like that, but please post in the correct sub forum "Software or General" up to you really
You can move the doc to the storage card. Use advanced config and set it there. This is controlled by active synch keys in the registry which you could have found in a few threads...i know because I wrote answers about how this is controlled in several threads and even made a cab for someone to use in my roms to move them back to main memory because Phoenix roms store my documents/pictures/camera/audio files on the storage card and for some reason the change made by advanced config was not taking in the registry. You should do more research about the structure and FYI unless you use a file manager other than the default one, you can't delete system files which is good because you shouldn't delet things unless you understand them.
You can download this from http://www.touchxperience.com/
Good luck and this really does belong in the general kaiser thread.
Also stylez is a great contributor here. So you probably should apologize and your response was off the chart rude here. I should NOT have answered this out of respect for my friend but felt like giving you an answer and a chance to apologize. The mods should NOT close this thread until that occurs.
abovenbeyond said:
I did not post this question before, and I looked around and saw nothing...
And Stylez... WTF dude or Dudett... I asked it here because it has everything to do with the ROM. You see after I flash the ROM I have several duplicate folders, some right in the mobile device root, then some in the My docs folder, and then some on the card when I put it in...
Sheesh my concern about just deleting them is 1) some are tagged as system files so I can't. 2) I don't want to delete one that say the camera is going to try to save to, and 3) Outlook/Exchange, where does it store its data on the device?? If it is on the main memory I would like to change it so it will be saved to the card.
I seem to recall years ago either JasJamming, or Custel, or Maybe it was Dutty had a ROM or maybe a CAB that forced all anything to be saved to the card.
So if the ROM is pointing say to one folder, and active sync to another, and the default OS uses a third, I thought maybe this could all be corrected in ROM cooking and so I asked it here...
Now then, with that said... instead of responding with a NON answer, either speak up with a answer or if you don't know... well pardon my frence but "Shut the F*** up!"
PS: To all you that will read this as me being rude and possibly hurting my ability to get an answer, well I am sorry. But I hate when all someone has to say is to bit*h about anything but an answer.
Click to expand...
Click to collapse
parleyp said:
Also stylez is a great contributor here. So you probably should apologize and your response was off the chart rude here. I should NOT have answered this out of respect for my friend
Click to expand...
Click to collapse
The part I agree with ..............................
I would have let this thread die a fast and unanswered death.
P.S..... the last two threads you started got locked for being redundant and irrelevant. This is going to make three in a row. Nice Job !
denco7 said:
The part I agree with ..............................
I would have let this thread die a fast and unanswered death.
P.S..... the last two threads you started got locked for being redundant and irrelevant. This is going to make three in a row. Nice Job !
Click to expand...
Click to collapse
What a track record. I have only actually started one thread in my whole time here!

Whay am I doing wrong with the Pim.vol?

I noticed almost 900 views on my thread: "Need help restoring contacts..." 'under HTC Polaris: Touch Cruise ' page, but no replies...and I apoligize in advance to the moderators if I'm breakin' a rule by posting on the ?&answers page but, I've spent weeks/months reading other similar problems from multiply sites but this site seems to be filled w/the most knowledgeable people who are seemingly wanting to help
I've tried to do the whole copy/paste Pim.vol, renaming the old one and deleting it, soft reset...but still...exact same-same. What the heck am I doing wrong?
A few times the process bricked it, but somehow I've got it back to what it was like in May...when all this started...all post May calls since are gone but they're just numbers w/out names, so no bother as i don't wanna possibly write over Pim and 4ever write over info. Strange how SMS's are still up to date tho and with the right contact names.
Also, I can read thru the Pim on my laptop w/the Pim.vol Extractor which this site linked me to, (thank you) and can see all the info jumbled up...but it would take months to redo by hand.
Please, someone out there has gotta know what I'm doing wrong and set me on the right course. I know I'm a bit of a tecknodork, but I'm not clueless as how to fuss w/puters and such. And since reading so much of this site, I'd really like to flash my phone to Android OS, but I'm scared I'll never get the contacts and calender info back. Please,someone lend me a hand.

[Q] How to backup sms with emoji?

Hi!
I have been searching for this on Google and in the forums, and I cannot find any answers. I see that the most of the sms/mms backup apps are using .XML files, and I read that they do not support emoji and would corrupt the .xml file if I try to restore it.
I have only had to restore sms one time and that time i used go sms pro since I read that they support emoji backup even though they didnt so my 14000 sms got corrupted when I tried to restore, also tried with Titanium without anyluck or maybe I did something wrong (luckly I had nandroid backup and didnt update ROM), this time i want to make sure that this would not happen again and I want to update rom without loosing my sms. I feel there is a simple solution, but I cannot find it.
Would be nice if someone could help out a newb
Bump
Dns94 said:
Bump
Click to expand...
Click to collapse
This
I'd like to know toO!
Why do they have to make this so damn hard. Why can't I just drag a file from old android phone and drop it in new android phone? What is the best method to COMPLETELY backup and restore SMS/MMS on non rooted phones?
Try this app (find the latest beta from release folder) : https://github.com/jberkel/sms-backup-plus/blob/master/README.md#readme
Used for years and did several restore while changing my rom. It push the backup into a Gmail label.
From what I saw, it saves pictures. So I guess it saves also emoji.
Hope it helps.
baudbox said:
Try this app (find the latest beta from release folder) : https://github.com/jberkel/sms-backup-plus/blob/master/README.md#readme
Used for years and did several restore while changing my rom. It push the backup into a Gmail label.
From what I saw, it saves pictures. So I guess it saves also emoji.
Hope it helps.
Click to expand...
Click to collapse
Thanks, I'll give it a shot. I tired SMS Backup & Restore but for some reason when it restored them (which worked for the most part) it screwed up a bunch of the time stamps.
One year later and no good solution to my problem?
A solution I found
Dns94 said:
One year later and no good solution to my problem?
Click to expand...
Click to collapse
I know this thread was years ago, but I came across it while trying and failing to fix this issue, and after a ridiculous amount of time investigating I have a solution finally. I thought if I posted it here then others with the same problem might come across it too and it could help people.
Assuming you already have "SMS Backup and Restore" (though confusingly there are two apps in the Play Store called that, you want the one with the green icon by SyncTech Pty Ltd).
Select "Back Up Now" and send it to Dropbox (or another place, I found Dropbox the easiest). Most importantly though, click on" Advanced Options" and turn the "Emojis & special characters" slider OFF. xml doesn't understand emojis, and it will corrupt the file and cause "XML Parsing Error" when you try to open it.
There's an extra optional step to make the file easier to read (puts it in a nice table without bare code everywhere) but this website won't let me post the code because it contains two links (and because I'm a very new member, signed up just to write this). This step involves adding a file called "sms.xsl" and adding a line of code to the xml file to make it talk to the xsl file, but I can't find anywhere to download it with a quick Google search.
Let me know if anyone wants any more details.
This all worked for me very well at least, I hope it does for others.

[Completed] $100 bounty. DESPERATE!!!!!!

What I have:
Both phones are stock. The g4 is using the system.rooted.H81110h.img
Galaxy S4 T-Mobile running 4.4.4. Original phone
Purchased T-mobile G4 running lollipop (didn't upgrade it yet)
Just want my messages of my deceased family.
I've gone as far as I could on my own. I need help and am willing to pay for it. Whatever solution that comes up will be (hopefully) useful to others. No one should have to go through what I have. I will lay out the steps I've taken and while I was unsucessful it doesn't mean I did everything right. I have been all over the internet and haven't been able to find much in the way of solutions so I pieced together a whole bunch of stuff.
First of all I want to punch the people at android in the face. No...seriously .I do.
Why in GOD'S NAME is it so HARD to do a SIMPLE thing like restoring your messages? Like I'm SHOCKED at the fact that they seemingly don't want this to ever happen.
They have gone to great lengths to ensure it doesn't happen and I'm seriously confused as to why. At every turn I've literally run into roadblocks that apparently are there for "my protection" like wtf people? I have messages of people who are now deceased and would it be that *&$&*#$& hard to put them into a new phone? I'm sorry, I'm upset, pissed off, and bewildered at how hard this is to do. Like. Literally. STUPID HARD.
I'm on the verge of tears and I have literally spend 3 weeks trying to import my MMS / SMS. I've purchased software, I've tried bribery, I've rooted my phone, extracted the mmssms.db file of the old and new. And I literally spend the last 3 days pasting all this crap into the new database. I've exported it to CSV where needed
Here is what I have tried:
1. sms backup and restore. By far the simplist. After literally 4 days of importing it finally was done. However, all of my picture mail was at the bottom of the thread. And some messages...actually a LOT of messages....were showing up at the time it imported. NOT the time it was sent. Like wtf? I opened up messanger....opened each thread....waited......some were fixed by what I found online to be a solution.
2. Purchased some software. This software (backuptrans). after 5 days. Yes FIVE days..it actually did a good job. All of them were on the right date...however....they don't support group messages....Yes. You heard me right. They thought a "solution" would be to convert every group message threat into individual ones.
Example:
group message with 10 people.
Every message you sent to the group is now shown as a sent message 10 times. One time to each person in the individual thread.
Those people's replies will show up in the corresponding individual thread.
your replies show up in all ten.
So what you have is a conversation that literally is useless. Try having a side conversation or multiple group messages with similar people at the same time...and you will quickly see why I was quite upset after 5 days of watching my new phone (which I only got because my S4 has the infamous "You removed your sim card! Let's restart!" bullcrap
Added backuptrans people to the people I want to punch in the face
3. Rooted. Copied MMSMS over and this ended up with com.phone.android has stopped. Was worth a try. I'm on kitkat...this new G4 is on lollipop. They changed the structure from what I read online.
4. No big deal right? I'll take a copy of the new database and the old one. Reimport?
Downloaded razorSQL, exported each table into SQL. Reimported when it accepted the SQL until it hit tables where they didn't match up. IE column names were wrong or one had a column the other did not.
So then I exported to CSV for both new and old. Opened the old, matched the columns up, and pasted into the new format CSV and reimported that.
Did this for all tables that matched up until I got to threads. Threads wouldn't import because it gave me a _INSERT_THREAD wasn't a function. After some reasearch it was some trigger that was there...so I'm like.. well.. can't do much with that. I ended up removing the trigger which I THINK...because I honestly don't have a clue... only helps with the indexing?
CREATE TRIGGER callback_on_insert_threads AFTER INSERT ON threads BEGIN SELECT _INSERT_THREAD(new._id); END
deleted that. Imported the CSV. And created the trigger again.
Between importing, exporting, etc. This took me about 3 days.
I had a hunch that there HAS TO be a database upgrade script. I found this page:
https://android.googlesource.com/pl...providers/telephony/MmsSmsDatabaseHelper.java
I think this might help someone but I again am not a programmer and have no clue what that all means.
There has been lolipop upgrades for other carriers...but not t-mobile....
Could we perhaps take an upgrade script from them that would convert 4.4.4 to lollipop?
Do I dare as if we can do the same from lollipop to marshmellow? The G4 will eventually
What complicates things further is that each manufacture uses different database structures. I'm not sure of the reasoning, however, this seems quite crazy and again android should step in and standardize things.
4. For whatever reason on my S4 I can't export into XML. Crashes on titanium backup. So that's why I used sms backup and restore.
5. Tried to import xml file from sms backup and restore into titanium backup and it crashes.
Hopefully someone can help
Update. Was able to make some headway. Had to give radio:radio permissions to the mmssms.db file and also the app_parts folder / files in there.
Lot's of missing messages. I'm not going to cross check the ones that DO show up and the ones that DON'T show up to see if I can find out why.
http://blog.namran.net/2010/09/25/how-to-recover-previous-smsmms-on-nexusone-backup-archive/
That was helpful.
if the “Messages” is having “force close ” problem.. after restoring backup database.
you may need to run “Fix Permission” once. and reboot the phone.
or possibly can be fixed with just the following
adb shell 'chmod 775 /data/com.providers.telephony/mmssms.db'
adb shell 'chmod 775 /data/com.providers.telephony/app_parts/*'
chown radio.radio /data/com.android.providers.telephony/databases/mmssms.db
chown radio.radio -R /data/com.android.providers.telephony/app_parts

Categories

Resources