SQLite management - Asus Transformer TF700

Has anybody here ever tried managing SQLite on (rooted) Android? (managing databases, putting things in order after they become messy etc.)

kind of like disk defragment for PC's?

demandarin said:
kind of like disk defragment for PC's?
Click to expand...
Click to collapse
Yes, this is a great analogy.

d14b0ll0s said:
Has anybody here ever tried managing SQLite on (rooted) Android? (managing databases, putting things in order after they become messy etc.)
Click to expand...
Click to collapse
I used SQLite editor on my Bionic to change the value of the Verizon Mobile Hotspot "Entitlement Check" to "0" so I can use the hotspot app without paying for it

KilerG said:
I used SQLite editor on my Bionic to change the value of the Verizon Mobile Hotspot "Entitlement Check" to "0" so I can use the hotspot app without paying for it
Click to expand...
Click to collapse
ok, nice one! "hack the planet"!
I meant managing the database itself, making it run smoother etc.

I am not entirely sure if i understand what you mean, but check out the VACUUM-Statement with sqlite (http://www.sqlite.org/lang_vacuum.html/).
Other than that, i can only see "removing old data from the database", but that would need a profound understanding of the structure and usage of each table for each application - so that's pretty much not possible.
If you have no idea what an SQL-Statement is or how to run it, you're better of leaving the databases alone ...
Furthermore, i assume that most apps don't store massive amounts* of data in sqlite and change it frequently, so a VACUUM might not solve anything.
* by massive i mean at least multiple thousands of rows in one table.
PS:
i take it that each application has at least it's own sqlite-database, or multiple, each of them in a separate file in the applications directory mostly. There is no "one central point" for that, it's nothing like server-based SQL (MySQL, MSSQL, Sybase ASE,...).

Thank you, this is exactly what I meant, I have no experience with SQLite whatsoever, this is great to learn that it is that different from SQL central databases management.
Do you think that the auto_vacuum mode is enabled for most databases nowadays by default or is there a reason to do the cleaning up manually?

Related

OS Maintenance

I have noticed that over certain period the performance of my Kaiser degrades. Considering that it works great even after I install additional software and configure it to sync with exchange 2007, over time it start to act flaky. Could somebody tell me what causes this and how to resolve it?
My guess is it has to do with temporary and cache file used by different applications and os. If so, what should I be getting rid of?
Thanks in advance
rgelfand said:
I have noticed that over certain period the performance of my Kaiser degrades. Considering that it works great even after I install additional software and configure it to sync with exchange 2007, over time it start to act flaky. Could somebody tell me what causes this and how to resolve it?
My guess is it has to do with temporary and cache file used by different applications and os. If so, what should I be getting rid of?
Thanks in advance
Click to expand...
Click to collapse
u need to use some "cleaning tools" like sktools or memmaid. There are options to clear some files(temp. internet, ...) and to free up your ram. Thats the main problem, your ram memory is decreasing over time and the phone is acting slover. To make it quicker is to make softreset after some time or use this tools and free up your ram.
You also can use some tools (apps) which will automatically and periodically do the soft-reset for you,
e.g. during the night your device is unused etc...
You can use tools, I like Sk Tools as it is the most comprehensive tool period. But there are many things you can do manually as well.
Delete the files in: \Application Data\Volatile, also in: \Windows\Profiles\Guest\Cookies; History; & Temporary Internet Files; as well as files in \temp.
GSLEON3 said:
You can use tools, I like Sk Tools as it is the most comprehensive tool period. But there are many things you can do manually as well.
Delete the files in: \Application Data\Volatile, also in: \Windows\Profiles\Guest\Cookies; History; & Temporary Internet Files; as well as files in \temp.
Click to expand...
Click to collapse
I have to agree with GSLEON3. SKtools was by far the best piece of software I have purchased for my kaiser. It allows easy cleaning, sip changes, today changes, registry editor, and nearly any tool or tweak you can think of.
I suggest you check out their trial and see what you think.

[ADMIN TOOLS] What Apps/Widgets/Shortcuts do you keep in your toolbox?

There's plenty enough threads discussing the best twitter clients or which SMS app is best...But except for the odd tidbit mentioned in a post by someone, I don't see any particular discussion (if I've about what folks have in their "toolbox" for doing things like capturing logs, running test, etc...
Here are some of the things I've found, please feel free to share any gems you may have found.
Antennas: Monitor GSM/CDMA cellular network http://www.cyrket.com/p/android/com.technolatry.antennas/
Any Cut: Any Cut allows you to create Home shortcuts to anything http://www.cyrket.com/p/android/com.appdroid.anycut/
aLogcat: View color-coded, scrolling (tailed) Android device logs directly from your phone http://www.cyrket.com/p/android/org.jtb.alogcat/
Dev Tools: With the Dev Tools application, you can enable a number of settings on your device that will make it easier to test and debug your applications http://developer.android.com/guide/developing/debug-tasks.html#additionaldebugging
GPS Test: GPS Test shows basic GPS signal (SNR) and satellite information
http://www.cyrket.com/p/android/com.chartcross.gpstest/
BASH: drop it in /system/bin and you're off http://android.modaco.com/content/software/301932/bash-4-1-native-app-for-android/
Wifi Analyzer: Turns your android phone into a Wi-Fi analyzer http://www.cyrket.com/p/android/com.farproc.wifi.analyzer/
Titanium Backup: The ONLY tool that can backup/restore/analyze your apps + data + Market links http://www.cyrket.com/p/android/com.keramidas.TitaniumBackup/
I'm not sure if this is along the lines of what you were saying, but I use the 'url monitor' widget from the marketplace. It's free, and it monitors a list of URL's to check their status. I host several websites as well as my own exchange server so this is very useful. It's always good to be working on a problem before people tell you about it.
Thanks for mentioning titanium backup! I've never heard of it before so I decided to check it out. I liked it so much I bought a license.
Few more for the list...
Apps Organizer: Create labels/categories for all your apps...Titanium Backup uses the categories from this app for filtered views! http://www.cyrket.com/p/android/com.google.code.appsorganizer/
MyIP: MyIP displays your current IP address, name and connection type http://www.cyrket.com/p/android/radonsoft.net.myip/
Just wondering, whats the need for a bash shell? While useful in many cases, I fail to see how its helpful on the N1
Does Titanium Backup only backup your apps+data? I mean...it doesn't reorganize the desktop to it's previous state...right...or is that function only in the paid version? I would have gotten the license already, but I thought that it would re-organize the desktop as well. Maybe I'm missing a step?
Namuna said:
Few more for the list...
Apps Organizer: Create labels/categories for all your apps...Titanium Backup uses the categories from this app for filtered views! http://www.cyrket.com/p/android/com.google.code.appsorganizer/
MyIP: MyIP displays your current IP address, name and connection type http://www.cyrket.com/p/android/radonsoft.net.myip/
Click to expand...
Click to collapse
Wait...titanium backup supports apps organizer? I was about to wipe my phone and was wondering how this was going to work. I exported my categories anyway but if that is a step i don't have to fuss about...fantastic.
Just wondering, whats the need for a bash shell? While useful in many cases, I fail to see how its helpful on the N1
Click to expand...
Click to collapse
For me, I use it when I SSH into my N1. Working in BASH is a part of what I do at work, so I've got lots of shortcuts/aliases/scripts that can be dropped directly to my N1 and used.
I mean...it doesn't reorganize the desktop to it's previous state...right
Click to expand...
Click to collapse
TB can indeed restore your home screens! You have to manually find the backup with 'launcher' or 'home' in the name and manually reload it though (which is confusing since TB has a 'restore all apps +all system data' batch option)...But yes, it does restore the desktop
Wait...titanium backup supports apps organizer?
Click to expand...
Click to collapse
Yup. Create your labels in AO, then assign your apps to those labels...Then when you go into TB->Filter, you'll see that you can now filter your apps by those labels! VERY convenient. Attached are some pics of the dynamic-duo in action.
For more goodies to add...
FCC Test: The Federal Communications Commission (FCC) Broadband Test application provides consumers with information about the quality and speed of their mobile data connection http://www.cyrket.com/p/android/com.ookla.fccbroadband/
root explorer: The ultimate file manager for root users. Access the whole of android's file system (including the elusive data folder!). http://www.cyrket.com/p/android/com.speedsoftware.rootexplorer/
MountUSB: (Included with the DesireROM) MountUSB is a one-click tool which allows you to mount or unmout your SD card as an USB mass storage device. http://www.cyrket.com/p/android/at.abraxas.mountusb/

Android Fork Bomb

Just out of curiosity does anyone know if any android devices can be affected by a fork bomb sent via text or email?
It is Linux so I'm guessing it will be affected. Maybe it won't be like OMG but it will be some what affected.
If a text or email could execute a custom script on being received, there is probably a lot worse that it could do than a fork bomb... Might be possible to get two views to keep calling each other, in which case the bundle for that program will expand until it runs out of memory and android will kill the app. This is very much an app specific bug though, and isn't related to the "fork bomb" of a program making a new instance of itself.
I thought Android runs on the sandbox environment for applications, which means the app can't execute much permissions as compared to Windows.
Just my $0.02
Yes, the apps are sandboxed for the most part.
Now that I think on it, there is a launch flag to open a new instance of a program leaving any currently running ones alone, which could be used to make a forkbomb. In this case, it would not be stopped by memory as the earlier instances will shut down but the exponentially increasing new instances will keep going, probably making the phone unusable until a reboot.
This can only be done by compiling and launching a signed app though, no email client can do this unless it has a backdoor to trigger this code from itself or from a trojan-esque feature to download, install, and launch apps on its own. The user would be promted to ok the new app's permissions anyway, unless it uses and gets permission for root access.
Basically, forkbombs are possible, but not by email or text with stock or nonmalacious programs.
Task Management
If the script gained root access, it'd be just the same as on a Linux machine. But I believe the DalvikVM simply kills any apps/processes it needs to in order to keep the system running smoothly (in theory).
well it works...
https://github.com/nicandris/com.example.forkbomb

[Q] Block unwanted cookies files in databases

Hi!
Yeah, yeah, I know, I know, I'm a noob... Well, sort of actually coz even if it's my first public message I've been roaming this forum for quite a while. And thanks to you guys I understood how to root, how to flash a CD Rom and so on. Without disturbing anyone, ain't it nice?:good:
But now I have a question, I couldn't find the answer anywhere on the web hence this post.
I'm rooted on both my Galaxy Mini and my Galaxy Tab P6210 and I noticed that some apks leave files like webview.db, googlestats etc. on the data/data/whateverapk/databases folders.
On the Mini I found how to prevent those annoying files from polluting my system(yep, I don't like cookies and similar spying stuff) by changing the databases folder's perms to --x --- ---, or even sometimes -- --- ---. For the most stubborn apks I rwx --- --- the databases folder, then I erase all the text in the unwanted file and finally I lock the file's perms to --- --- ---. It works with most apks including Dolphin Mini and Opera Mini, cool. Only one or two resist and FC if I attempt to modify too much the perms but it's OK, I don't use then that often and I don't mind to delete the trash manually.
The problem is that on the Galaxy Tab it doesn't work on most apks, it makes them FC. I've tried all the possible perms combinations but nope, FC.
I guess, since the concerned apks are the same on my Mini and on my Tab, that it has to do with the OS, Gingerbread for the Mini, Honeycomb for the Tab. I noticed as well that some of the files on the Tab are different, on the Mini it's mostly googleanalytics.db, webview.db and webviewCache.db files, whereas on the Tab I have, apart from the above mentioned ones, some webview.db-shm, webview.db-wal, webcookieschromium.db and webcookieschromiumprivate.db files.
I guess .db has something to do with dropbox, but I don't use any dropbox, and I even deleted the (empty by the way) folder in my system. When I open those files I can see that they have something to do as well with sqlite, but I don't have any built in sqlite. I have one that has been installed by an apk in the /xbin folder but I erased it and it didn't change anything (don't worry, I put the sqlite back afterwards). It's very annoying, those files spy on us guys, they record all the web sites we visited, the email(s) or facebook accounts we use etc.
For now I have put bookmarks on my home screen and I delete manually the troublesome files just after I opened the relevant apk but hey, it's not very convenient!
Anyone knows how I can prevent them from coming back everytime I use an apk?
Thanks a lot for your help, and sorry for the long post:angel:
Already 3 days and over 50 views but no answer yet, what's wrong?
Is it that my question is of absolute no interest?
Or that the way I explained my problem was not clear?
Or that no one knows how to do it?
Or a bit of the 3?
It seems that you want to remove unnecessary garbage files that have been left out by some applications. I recommend that you use SD Maid, free is good enough, but of course PRO is better.
Anyway, SD Maid can clean File Corpses and clean the system files like the ff:
/data/log
/data/tombstones
/data/system/dropbox
/cache
Temporary Files
Log Files
Gallery Thumbnails(This one can really build up even with just the same files. I'm not exactly sure as to why it adds again and again but it saves me a lot. Like 300~600MB)
Empty Directories
LOST.DIR Directories
It can also optimize DBs. All of these are available on the free version.
As for cookies in browser, you can uncheck "accept cookies" but this might cause some websites to malfunction or not work.
Other things like cache you can use History Eraser, One Tap Cleaner and etc.
Hope I helped.
I think most don't want to delete them because they are normal caches and cookies, also some apps' settings are stored on those database files. I don't see any advantages in deleting those files (apart from saving couple of MBs storage space...) They aren't any "bad" or "spying" files.
By the way, the .db means database, not dropbox.
Sent from my GT-P6210
miksumortti said:
I think most don't want to delete them because they are normal caches and cookies, also some apps' settings are stored on those database files. I don't see any advantages in deleting those files (apart from saving couple of MBs storage space...) They aren't any "bad" or "spying" files.
By the way, the .db means database, not dropbox.
Sent from my GT-P6210
Click to expand...
Click to collapse
Correct me If I'm wrong but it is necessary to clean caches and cookies once in a while because it can hog the device. Sometimes old caches are stored even if they are of no use anymore. It's like the principle of filling up your internal storage too much that you can see a dramatic decrease in performance. These kind of files updates a lot and does not seem to overwrite existing files or at least delete those that are unnecessary. It is not needed however to clean it every after use. Just once or twice a week is good enough.
Thanks for your answer but it's not what I was meaning, let me explain more clearly.
Take any app, say a mp3 cutter. It doesn t need any internet connection to work but when one downloads it one sees that it requires internet access permission. One thinks it s ok and one downloads it. But then in the mp3 cutter databases one finds those webview.db files, and this is why I say that it spies on us coz why this mp3 cutter needs such databases? The same with offline dictionaries, or one tap cleaner (a very bad one by the way, put it through privacy blocker and you ll be amazed of all the infos it takes from you), or mp3 players etc. On browsers like dolphin it s the same story, and when one views those files one sees that they record all the sites one has been through although the apk doesn t need it (I know it for sure coz I delete the files before my browsing cession and it still works). Disabling the cookies doesn t help, it just prevents you from accessing web sites that need cookies like gmail, yahoo and the like. Apps like LBE or privacy blocker show partly what those apks do in our back, taking our IMEI number, our contacts, reading our sms and sending everything to who knows where and for who knows what purpose. But they don t show the databases leaks...
As I said in my first post another parameter is that for a same apk, with the same version, let s say dolphin 2.3, on my Galaxy Mini running GB I managed to block the perms and thus to prevent those files to pollute my system but on my Tab running HC it doesn t work and FC the apks. Plus the files are not the same, there are more of them and with different extensions on HC (again using the same apk on both GB and HC).
So the answer lies somewhere in the OS but I couldn t find where due to my limited knowledge and that s why I m here
Any hint or idea on how to eradicate those files from their source? Of course one can delete them manually and that s what I do but it would be so nice not to have to do it all the time. It s not about saving space, those files weight next to nothing, it s about privacy.
By the way I deleted most google apks and this is already a big relief. Other setting I did include blocking all the perms of the usagestats folder, of the throttle folder (well I just left r--, ---, --- otherwise it bootloops). Download testlogging and you will see for exemple of many spying stuff the google apks put on your tablet...
Anyway, back to the topic:
how can I permanently block those files? Many people on this forum and elsewhere are very concerned with their privacy, to the extend that some create privacy watching apks, but to my knowledge nobody ever bothered about those databases files although they represent a big privacy hole in our systems...
Thanks a lot for your help!
Send from my barebone Galaxy Tab P6210, 34 system apks left and counting down
Apart for some real serious stuff, apps need some way to persist information. If you prevent them to, you should expect fc when they try, no?
That's too much paranoia for me.
Enviado de meu MB525 usando o Tapatalk 2
Graffiti Exploit said:
Correct me If I'm wrong but it is necessary to clean caches and cookies once in a while because it can hog the device. Sometimes old caches are stored even if they are of no use anymore. It's like the principle of filling up your internal storage too much that you can see a dramatic decrease in performance. These kind of files updates a lot and does not seem to overwrite existing files or at least delete those that are unnecessary. It is not needed however to clean it every after use. Just once or twice a week is good enough.
Click to expand...
Click to collapse
Yes, the caches can get bloated if the app doesn't remove unnecessary things automatically. In that case a clean is ok.
Sent from my GT-P6210
@unclefab
If the mp3 cutter that you mentioned in your example has ads it needs the internet permission for them, and some ad providers make the database files automatically. They just contain some ad web address cache and only "personal" information saved is your language setting, at least from my experience.
And blocking the apps saving the information doesn't help with privacy really much because they can still access the info, they just can't save it in the databases. A malicious app can send the info without saving it too.
Sent from my GT-P6210
leodfs said:
Apart for some real serious stuff, apps need some way to persist information. If you prevent them to, you should expect fc when they try, no?
That's too much paranoia for me.
Enviado de meu MB525 usando o Tapatalk 2
Click to expand...
Click to collapse
I have to agree with this one. Messing up with permissions can cause issues to certain applications and it really seems that he is paranoid.
If your concerned about such privacy, you shouldn't download the app on the first place. Although some developers get rid of such permissions because of some people's concern, this is unlikely to happen to every application. HC is a different platform from Gingerbread and so such issues that you have mentioned may occur.
Have you tried firewalls like DroidWall? I'm not sure if it really works, but it might lessen your burden from manually deleting files or privacy concerns like your data being accessed/used. Again, not sure.
Don t worry, I m not paranoid, my Tab is well protected, I have rather intricated settings between Privacy Blocker, LBE (by the way and FYI, LBE conflicts with Droidwall, both can t work together) Rom Tool Box, Logging Test and Permissions denied, so I don t think that any apk can steal any info from me!!!
Actually it s more a matter of principle, why apks like let s say Dolphin or Opera record all the sites I ve surfed, eventhough they don t need to do so (coz they still work after I deleted those files manually). And about the exemple given above, why apks which don t display adds need to have an internet permission and to put such webview.db files in the databases? Of course I m not obliged to download them, and actually I ve already erased many such apks, but for some I don t have any choice, specially for dictionaries (I travel a lot and need such stuff).
Plus it s a matter of curiosity, where the heck lies the source of those files? And why can I block those files easily on GB but not on HC? Yes, it s because the OS is different, I know, but how does it work? I don t know so much about Android OS but I like it and I want to learn more.
So back to the question, how can I tweak my system in order to prevent those files from appearing everytime use an apk? There are enough experts on thsi forum so hopefully someone knows the answer.
And BTW, when I see the difference between GB and HC, I mean more spying from the Google/Android OS, then I feel less eager to upgrade to ICS coz for sure it will get even worse, not to mention JB...
You're not saving passwords in your browsers/webview-based-apps, right?...
Do you mind explaining why webview.db databases have you concerned?
Thanks.
They are saving information from him, that's why. Nothing can save his information, I think that is the point.
Dude relax, there are spy apps, there loggers, but you are blacklisting all webview based ones.
And as some guy told before, if they want to spy you, they don't need to save anything.
But seriously, you don't need to study much on Android OS to known why what you are doing are causing fc. Take any app in any platform that have internal Conf and db files. Corrupt them and mess with permissions, you should get something similar.
Enviado de meu MB525 usando o Tapatalk 2
Thank you for explaining me why they Fc but I had understood it by myself from the very begining, I m what you call a noob but I m not brain dead:silly:
All what I want to know is what generates those files in the OS, and how to prevent it from happening, provided that it s possible.
Apart from that it s ok for me if other people don t mind having files in their databases which record their web activity, and if they don t feel uneasy to know that the more advanced the Android OS the more files there is and the more difficult it is to block them (I said already 2 times that on Ginger Bread I block all those files and that the apks don t FC, which prove that the files are not required by the apks to work normally).
Thanks
I am not calling you noob buddy, but you were trying to solve a problem with no elegance at all.
Contact developers and ask why they are using webview and that you are not comfortable with files it creates. But if you use a program that uses it you have to accept those files, simple.
A lot of details of stuff like webview are API specific so changes version to version. So access of those files may changes on each version of android, as well as file location, name or how to handle errors. So the fact that what you did worked on gb, helps you with no conclusions.
Enviado de meu MB525 usando o Tapatalk 2
I didn t mean thay you (tu) called me a noob but that you in general (vos) call newbies noobs. Sorry for the misunderstanding, it s one of the many limitations of english compated to latin or germanic languages
So it sounds like what I was asking about is impossible to do, well, well, I will see what I can do with apktool, maybe I can change something in the manifest or ressources or I don t know where. Just for info, here s what s insideone of those files when it s newly created and before it starts spying:
SQLite format 3@ 
-� g
���k �6� `���" �tablepasswordpasswordCREATE TABLE password (_id INTEGER PRIMARY KEY, host TEXT, username TEXT, password TEXT, UNIQUE (host, username) ON CONFLICT REPLACE)/
Cindexsqlite_autoindex_password_1password�+�)tablehttpauthhttpauth CREATE TABLE httpauth (_id INTEGER PRIMARY KEY, host TEXT, realm TEXT, username TEXT, password TEXT, UNIQUE (host, realm) ON CONFLICT REPLACE)/Cindexsqlite_autoindex_httpauth_1httpauth
�"�tableformdataformdataCREATE TABLE formdata (_id INTEGER PRIMARY KEY, urlid INTEGER, name TEXT, value TEXT, UNIQUE (urlid, name, value) ON CONFLICT IGNORE)/Cindexsqlite_autoindex_formdata_1formdataR}tableformurlformurlCREATE TABLE formurl (_id INTEGER PRIMARY KEY, url TEXT)J%cindexcookiesIndexcookiesCREATE INDEX cookiesIndex ON cookies (path)�� tablecookiescookiesCREATE TABLE cookies (_id INTEGER PRIMARY KEY, name TEXT, value TEXT, domain TEXT, path TEXT, expires INTEGER, secure INTEGER)W--ctableandroid_metadataandroid_metadataCREATE TABLE android_metadata (locale TEXT) ��en_GB
@unclefab
Even if the webview.db has always all the fields it doesn't mean they need to have a value or string. For example the "password" field is almost always emtpy.
Sent from my GT-P6210
A little old, but worth the reading:
forensicsferret.wordpress.com/2010/09/30/android-browser-forensics/
Sent from my GT-P6210 using Tapatalk 2
Why would I use such apks?
I said it already, it s because I need them. I deleted some and replaced them by similar apks more privacy friendly, but for some I don t have any choice. For exemple browser. I managed to lock the perms on opera mini and it still works but you know opera mini, on some sites it doesn t display correctly so I have to use dolphin whose perms can t be locked. Talking about it I will try boat browser, it s not as good as dolphin but if it doesn t have those files it could be a solution...
Same stories with dictionaries. I m a language teacher who lives in asia and I need far eastern languages dictionaries. Try to find a thai english or thai indonesian dictionary which can work without those files... BTW if you are interested I found a good english chinese which works without any .db garbage;-)
Thanks for the links, interesting article, some food for thoughts...

Phone analysis

Hi,
i'm looking for a fast way to analyse the apps installed on some phones in my company. I need to get an overview of all apps and some properties. I would like to list the permissions, check if they are allowed to run on mobile data and/or Wifi, the space the app is consuming, maybe battery usage... We don't have any mobile management.
I need all this for analysis, so preferably in a Csv export, or something similar. To avoid to bother the owner too much, i want to reduce the time I need the phone to do the job.
My only idea until now is to take screenshots of all needed settings. That's of course not very comfortable.
Any ideas?
Thanks

Categories

Resources