[Q] Export list of files in a directory? - Android Apps and Games

Is there an app (or could someone develop one) that would export a list of files in a directory into a text document or some other file type that could edited?
I have a need for it at the moment and frankly I'm too lazy to do it manually. lol
Anything like this out there?

Besides the obvious? ls >file

obvious to whom? I have no idea what that means. lol
is that some sort of adb shell command?
Edit: I've figured out the list in the command window but it would still be nice to have an app to do this.

Related

HOWTO: Backup SMS Database

Playing around with the ls -R command, I found where the SMS database is kept, and it's somewhat readable in a text editor...
UPDATE (thanks staulkor): This database is viewable, and searchable using an SQLite database viewer.
Code:
/data/data/com.android.providers/telephony/databases/mmssms.db
Just run the following command to back it up to the SD Card:
Code:
busybox cp /data/data/com.android.providers.telephony/databases/mmssms.db /sdcard
Happy hacking
You can use an SQLite viewer to read the database correctly
Would seem simple enough to write a script to run on a PC/Mac to back up the database and load it into some sort of viewer... searchable perhaps?
I'm not too familar with databases, but would seem simple enough to make a lightweight app to keep the SMS archive...
Cool, maybe we'll soon see a port of PIM Backup. Would be nice...
Hmm...
/data/data/com.android.providers/telephony/databases/mmssms.db
Click to expand...
Click to collapse
and
busybox cp /data/data/com.android.providers.telephony/databases/mmssms.db /sdcard
Click to expand...
Click to collapse
are two different paths - I think both are supposed to be
Code:
/data/data/com.android.providers.telephony/databases/
(since I can't cd to the other one).
At any rate - thanks for the tip, but can anyone else confirm this works for them? On my android (R30) I get "opendir failed, Permission denied" if I try to read the contents of that directory.
Seeing as it's fully possible to write an application to back up the database to the sdcard (or even to a website), wouldn't that make more sense?
Afterall, there's no need to have the actual database -- and the method is highly restrictive to both people with root on their phones and those with a USB cable and computer handy.
Also, backing up this database will not backup any MMS attachments, which are stored here:
/data/data/com.android.providers.telephony/app_parts/
Refer to the "part" table for an index matching the files there to messages/filenames. (For each MMS, there should be an XML file that helps identify the type of message, and then the file itself, such as a jpeg).
is this the best and safest way to back up sms database as of yet? I have about 1000 sms and it slows down my messaging so I've been try to find a way to free that up. Backing them up would be great so i can clear them.
If anyone has tried this, please share with the rest of us on its effect on the phone.
Thank you,
Hbguy
P.S: This site is truely GREAT because pros are patient with noobs
i don't understand this...i downloaded the file managers on marketplace, and cannot when i click on data file, there is nothing in there..so i dowonloaded a terminal program and still don't understand how to use the commands to move sms from memory to sim...can u do a quick step-by-step? do i have to use any specific programs to do this? sorry, so used to the simplicity of WM6 on my old phone, having trouble adapting to this platform..thanks for any help.
jazzmanmonty said:
i don't understand this...i downloaded the file managers on marketplace, and cannot when i click on data file, there is nothing in there..so i dowonloaded a terminal program and still don't understand how to use the commands to move sms from memory to sim...can u do a quick step-by-step? do i have to use any specific programs to do this? sorry, so used to the simplicity of WM6 on my old phone, having trouble adapting to this platform..thanks for any help.
Click to expand...
Click to collapse
You need to have root on your phone to follow the instructions given above (if you don't know what that means, you don't have it). For non-root users, most of the Android system on the G1 is locked down -- including /data and all its subfolders.
If you do have root on the phone, you can follow the instructions at the top from a terminal while logged in as root. You can verify you are root by running the program "id":
# id
uid=0(root) gid=0(root)
From there, to copy the SMS/MMS database to your sdcard, you can follow the above instructions. If you don't have busybox (ie, "busybox: not found"), you can use the "cat" command as so:
cat /data/data/com.android.providers.telephony/databases/mmssms.db > /sdcard/mmssms.db
You may also want any files stored here:
/data/data/com.android.providers.telephony/app_parts/
Which are from MMSs (if you've no MMSs saved, then you've no need to bother).
Also, not sure if there is a clarification needed for you. The instructions provided offer no way to access SMSs stored on the SIM, as Android uses a PDU interface that doesn't use the SIM's SMS storage space. It is possible to read SMSs off the SIM, however, and into the internal memory storage. See the settings window in the messaging application.
If someone does take the time to create an application to do this, then it would not require root access. Applications are allowed to access the SMS/MMS database, provided the user grants them permission, and could then be used to read the data from the database and into a new database or other file (eg, csv).
do ya think it would be posible to move these permanently to the memory card? ummmm.... ill try if i get a chance ..... ya can connect to phone via adb in recovery mode right ? an undo whatwver i break?
how would you view your backed up sms messages using staulkors sql database?
step by step would be great
hbguy
Just to be clear - for most people on RC30, this probably will not work.
Per http://forum.xda-developers.com/showthread.php?t=442480 the hacks to gain root access have been blocked since RC30 was deployed in early November. Someone should write an application to support this, but instead everybody is busy creating new useless calculators and niche geolocation applications.
If I'm wrong about the above, it would be terrific for anyone to chime in and clarify that.
goodwinm said:
Cool, maybe we'll soon see a port of PIM Backup. Would be nice...
Click to expand...
Click to collapse
https://github.com/jberkel/sms-backup-plus

Where is MMS saved?

I'm sure someone has figured this out.
Where in the file system are the pictures I receive via mms saved?
I'm sure they have to be somewhere, there has to be a way to get them without the fwd to pc email / attach image to new email / email back to phone trick.
Bonus points, I deleted a thread - can I still find those images somewhere in the file system and restore them?
I believe they're stored in a sqlite3 database, so it's not as easy as just copying a file.
It looks like this is the database:
/data/data/com.android.providers.telephony/databases/mmssms.db
I don't have any mms/sms messages atm (recently wiped phone), so I don't have any data to look at in the database.
If you want, give me an IM or PM and I'll give you my cell number so you can send me an sms with a pic, so I can figure out how to extract it from the database
i dont think its in the database: its the same size no matter how many messages there is
Found it. The text and attachments are saved in /data/data/com.android.providers.telephony/app_parts
They are stored in files named something like "PART_1228000671287", with no extension.
To see what type of files they are, you can run this command on the phone (assuming you have RC30 v1.2).
sqlite3 -header /data/data/com.android.providers.telephony/databases/mmssms.db "SELECT _data, ct FROM part;"
The first column is the full path to the file, and the 2nd column is the mime type of the file
Awesome, good work Android Master JesusFreke.
too bad I have the factory RC30
(why oh why did I hit the update button that night?)*
but that's cool to know that they can be found.
Now we just need someone to apply that knowledge into making a SaveImage option appear in the MMS thread.
* on an unrelated note I need to put in another thread: when RC29 came I noticed the camera worked like 5 times better. I was even able to snap pics of the kids on the swings and they came out clear, when RC30 came it was back to blurriness as usual.
JesusFreke said:
Found it. The text and attachments are saved in /data/data/com.android.providers.telephony/app_parts
They are stored in files named something like "PART_1228000671287", with no extension.
To see what type of files they are, you can run this command on the phone (assuming you have RC30 v1.2).
sqlite3 -header /data/data/com.android.providers.telephony/databases/mmssms.db "SELECT _data, ct FROM part;"
The first column is the full path to the file, and the 2nd column is the mime type of the file
Click to expand...
Click to collapse
Would it be possible to write a program that would automatically extract the imgs/vids from that path and put them on the sd card with the correct file extension?
Sure. It would certainly be possible for rooted phones. I'm not sure for non-rooted phones.
I should have added on rooted phones on my first post.
Guess i should get off my butt and start messing around with some code.
I'm kinda leery about messing with root comands.
I think it would be possible for rooted as well. Can't applications have message privys so they can read messages? if they can read them can't they save the data?
JesusFreke said:
Found it. The text and attachments are saved in /data/data/com.android.providers.telephony/app_parts
They are stored in files named something like "PART_1228000671287", with no extension.
To see what type of files they are, you can run this command on the phone (assuming you have RC30 v1.2).
sqlite3 -header /data/data/com.android.providers.telephony/databases/mmssms.db "SELECT _data, ct FROM part;"
The first column is the full path to the file, and the 2nd column is the mime type of the file
Click to expand...
Click to collapse
Now I can save my pictures people texted me! Thanks dude!

Editing your Applications

Hi,
Does anyone know how to organize your application (programma's), because is a little bit complex.. if you know what i mean..
Thanks in advance,
Lib
LiberationX1 said:
Hi,
Does anyone know how to organize your application (programma's), because is a little bit complex.. if you know what i mean..
Thanks in advance,
Lib
Click to expand...
Click to collapse
I think what you CAN to do is find the exe and then rename it with numbers at the beginning of the name, and it will sort out alplhanumeric'ly.
I haven't tried, but it is a guess.
I heard someone talked about getting rid of the programs from the list as well.
No, that's not what i'm looking for.. But thanks..
I ment there are folder that are empty and i wan't to delete them..
The folders and program shortcuts are located in windows/start menu (just like the directory structure on a PC). You can get to it either on your device with whatever file explorer you use or from your desktop via explore from the Activesync window. Then move, remove or rename whatever you want.
Tnx, that's much " cleaner " !!
Thats right as stated by emesbe,.
1. Go to your file explorer
2. Windows/Start Menu
3. There you will find your empty folder, etc, you could make a new shortcut there too,.
Best of luck,.

Search within files?

I have a directory full of ascii files (.txt and .html) on my SD card. What I need is an app that can do a full text search for a keyword within all those files. Does anyone know of such an app?
I wrote something along those lines a while back, but its slow and not very well written, as I'm a terrible coder. If there's anything out there, it'll likely be better than what I have.
Rapax said:
I have a directory full of ascii files (.txt and .html) on my SD card. What I need is an app that can do a full text search for a keyword within all those files. Does anyone know of such an app?
I wrote something along those lines a while back, but its slow and not very well written, as I'm a terrible coder. If there's anything out there, it'll likely be better than what I have.
Click to expand...
Click to collapse
cat & grep?
Look for agrep in market
if you are rooted you can install busybox
it comes with cat and grep
Sent from my SCH-I800 using XDA App

[Req] SD Card organizer?

Hey guys, I have a request for an app. I'm tired of having 5 different folders for music, 3 for pictures, and so on. Is there an app that can read a files extension, and then categorize it into an appropriate folder? For example, any files that have a .mp3 .ogg .wma etc. extension will be grouped into a folder called "music" any file with the extension .mp4 .m4a etc will be grouped into a videos folder, and then .jpg .png .gif and things like that into a pictures folder. I get music from amazon, from a music downloader, and from 3 of my web browsers, and they all save in different locations. It is very annoying and cluttered. Does this exist / can it be made?
BUMP.
I wanna know the same thing. very helpful if you switch roms a lot!!
Ahh u can move the files ur self its kinda hard u drag and drop but its ya
Sent from my PG86100 using Tapatalk
dc13 said:
Ahh u can move the files ur self its kinda hard u drag and drop but its ya
Sent from my PG86100 using Tapatalk
Click to expand...
Click to collapse
That is the exact opposite of what I wanted to know.
Sent from my LG Optimus V running Sense 3.0
App like this would be so useful.
Does this app exist? I need something like this badly
Sent from my LG Optimus V running Sense 3.0
Well, this can be easily done with a simple shell script which gets runs regularly by Tasker or similar app; heck, could be even an init script that runs on boot in case you do not mind the slowdown on boot...
However, note that some apps may not look at your single folder at all or need to be manually configured to look there. So, think about what you are doing.
dr.notor said:
Well, this can be easily done with a simple shell script which gets runs regularly by Tasker or similar app; heck, could be even an init script that runs on boot in case you do not mind the slowdown on boot...
However, note that some apps may not look at your single folder at all or need to be manually configured to look there. So, think about what you are doing.
Click to expand...
Click to collapse
I don't know how to script. Also, I'm not necessarily talking about an application pushing the downloaded file into one folder, so much as an application (or script) pulling all downloaded files into their corresponding folder. Pulling, not pushing. Hope this clarifies. If someone were to clarify this, it would be an amazing tool to be able to utilize.
gerbetta33 said:
I don't know how to script. Also, I'm not necessarily talking about an application pushing the downloaded file into one folder, so much as an application (or script) pulling all downloaded files into their corresponding folder. Pulling, not pushing. Hope this clarifies. If someone were to clarify this, it would be an amazing tool to be able to utilize.
Click to expand...
Click to collapse
For "pulling" something, you need some daemon running which will watch SD card and do something when a file of a certain type is created. That is exactly what stuff like gallery does (watch pictures/movies and create thumbnails for them). It is resource intensive and basically slows everything down.
Learn to use shell.
Code:
# busybox find /sdcard/* -iname "*.mp3" -type f -exec busybox mv -f {} /sdcard/Music \;
The above will move all MP3 files to Music folder on your SD (assuming the SD card is mounted on /sdcard). Use mv -n instead if you have files with the same name in different dirs, otherwise they will be overwritten.

Categories

Resources