[Q] terminal command "touch ./*" doesn't work; only when I specify a single file - General Questions and Answers

[Q] terminal command "touch ./*" doesn't work; only when I specify a single file
Here's a background of my problem. I copied an audio book from my computer to my phone (galaxy s2 i777 with AOKP jellybean). I import it into BeyondPod to play, but it tries to play the files by date rather than alphanumeric order. Apparently when the files are copied over it isn't done in any kind of order, so the modified dates are all out of order.
I figured an easy solution would be to use a terminal app and just do a
touch ./*
in the proper directories. However, when I try that I get the error
touch: usage: touch [-alm] [-t time_t] <file>
If I specify a single file, or even use wildcards that only match a single file, then touch works properly. Is there an easy way to get it to touch every file without doing each one manually? I tried using two different terminal apps, "Android terminal emulator" and "Terminal IDE", and both had the same problem.
I don't need to use touch of course, any solution wold work so that sorting by modified date matches the alphanumeric order.

bjgood said:
Here's a background of my problem. I copied an audio book from my computer to my phone (galaxy s2 i777 with AOKP jellybean). I import it into BeyondPod to play, but it tries to play the files by date rather than alphanumeric order. Apparently when the files are copied over it isn't done in any kind of order, so the modified dates are all out of order.
I figured an easy solution would be to use a terminal app and just do a
touch ./*
in the proper directories. However, when I try that I get the error
touch: usage: touch [-alm] [-t time_t] <file>
If I specify a single file, or even use wildcards that only match a single file, then touch works properly. Is there an easy way to get it to touch every file without doing each one manually? I tried using two different terminal apps, "Android terminal emulator" and "Terminal IDE", and both had the same problem.
I don't need to use touch of course, any solution wold work so that sorting by modified date matches the alphanumeric order.
Click to expand...
Click to collapse
I was able to work around this by using
find . -exec touch -m {} \;
in case anyone else has this same problem (good luck searching for "touch" relating to cell phones though)

Related

[APP] Gscript * Easily launch/save shell scripts from within Android UI *

2013-05-17 ( 1.0.0-alpha3 )
New features:
* Basic terminal emulation ( input handling, color support, cursor control ) etc.
The terminal has 2 gesture modes ( scroll, cursor ) and additional soft-input methods for keys like ctrl, escape etc.
Scroll-mode:
Normal scrolling, auto-scrolling and fast-scrolling (right-edge), double tap on top/bottom to jump.
Cursor-mode:
Edges of the screen will send d-pad (up/down/left/right) keys ( multiple pointers/fingers to control speed of repetition ).
Swipe up/down for page-up, page-down and swipe left/right for home and end keys.
Currently the emulator has no utf-8 support and some other features might be missing.
* The ability to start a terminal/process directly.
* The ability to create aliases directly to a profile.
Enabling an alias will add a shortcut in the launcher directly to the selected profile.
Currently 3 aliases can be set (terminal, su, sh). Sadly android is pretty limited in this area and it only allows enabled/disabling of components so there is no way to change titles, but i guess these 3 are most common. Be aware that you might need to re-start your launcher/phone before changes are visible ( this also depends on the launcher active ).
* Updated icon.
Notice:
Because of major changes happening during the alpha-state it is required to do a reinstall instead of an upgrade ( because of possible database/preference changes ).
2013-04-12 ( 1.0.0-alpha2 )
- Cleanup of list items in the history tab ( date/time added ).
- Basic history view which shows the history transcript and allows to email it.
- Ability to create desktop shortcuts from library items added ( contextual actionbar of an item ).
- If a input dialog (gscript-input) is dismissed it now shows a notification that there is a input request pending and clicking it will bring the user straight back to the dialog.
2013-04-10 ( 1.0.0-alpha1 )
Gscript is currently in an alpha state so features might be missing or broken.
The current progress:
Basics of the new library interface.
Scripts are no longer stored within gscript but instead access is now handled through libraries.
Basically the library decides how to browse through files and get their content and the only thing
that is stored within gscript are the additional item attributes and conditions.
Currently this is limited to a LocalStorage library type, but other options might come later on.
Basic process / history management.
Processes now run in a background service and can be accessed through the 'active'-tab in gscript or
by clicking on their notification (if enabled).
Custom shell profiles ( editable in settings )
Instead of a fixed option for sh / su you can now create Shell Profiles which allow changing of the actual
command including color schemes and additional extras like path appending etc.
Launching scripts directly from most file managers ( if they handle files the way they should... Astro works for me )
Launching scripts from anywhere else (terminal, adb etc) using gscript-exec ( found in /data/data/org.gscript/bin )
First start on the dialog framework to allow graphical user input from shell using gscript-input, which should also work outside gscript.
Very minimal console view ( output only and no input methods yet )
What is WIP:
A lot...
A decent console view which will allow user input
History tab only shows the files that have been executed but no way to see the output, time etc
Additional features to the library interface to edit scripts etc
Additional features to the dialog framework ( to allow file selection etc, numeric input )
Additional item conditions like schedules ( now only has a boot condition )
Desktop shortcuts / widget
Backwards compatibility to android 2.2 ( now 2.3 )
More...
Who should install this?
Users who want to help make this better and can live with the fact that things might not be 100% finished
How to start?
Install
Within Gscript click the + sign in the action bar to add a new library.
Select Local Storage
Give the Library a name
And set the path to a folder you want as the root view ( It does not create the folder so make sure it exists ).
Browse the folder from within Gscript and click an item to execute or long click an item to set attributes/condtions ( shell, boot etc )
In settings new Shell profiles can be created or deleted and a default can be set.
The command-line of a shell profile can have %path% in it. If this is the case it will replace this with the final executable script.
If it does not have a %path% argument the script will be send as input.
The binaries gscript-exec, gscript-input can be found in /data/data/org.gscript/bin ( if everything went right and it is a supported ABI )
Usage
gscript-exec filename
gscript-input types
will list available input types
gscript-input [type]
will list the expected arguments
Sample script which uses gscript-input
Code:
# items are ; seperated key:value pairs
# keys with a * prefix are pre-selected
# in case of radiobuttons only the first
# selected item will actually get selected
RESULT=$(gscript-input \
list \
"Choose" \
"Select multiple" \
"0:The first option;
*1:The second option;
*2:The third option;
*3:The last option;")
gscript-input \
toast \
"Selected items: $RESULT"
echo "Selected: $RESULT"
SELECTED=$(gscript-input \
list \
"Choose" \
"Select single" \
"0:The first option;
*1:The second option;
2:The third option;
3:The last option;" \
radio)
if [ $? -eq 1 ]; then
gscript-input \
toast \
"You selected $SELECTED"
fi
echo "Selected: $SELECTED"
NAME=$(gscript-input \
text-entry \
"Name" \
"Please enter your name")
if [ $? -eq 1 ]; then
gscript-input \
dialog-info \
"Welcome" \
"Welcome back $NAME"
echo "$NAME"
fi
gscript-input \
dialog-message \
"Finished" \
"Finished processing script.. do you want to exit now?" \
yesno
if [ $? -eq 1 ]; then
gscript-input \
toast \
"Goodbye $NAME"
exit
fi
* In case of issues please be clear and give as many details as possible.
* During the alpha-state i will keep multiple versions available for download ( so be sure to check version numbers ).
* During the alpha-state it is required to do a re-install instead of an upgrade ( because of possible breaking changes ).
Fantastic, you got my full support ^^;
Very cool. I was going to make something similar to this for mounting\unmounting debian but I don't need to now.
Already uploaded the source... ill create an apk as soon as I have the time.
Link to source repository
Ok ive created an apk.. Ill update the first post with the zip-file attached.
Please be aware that its still beta and that executing scripts without knowing what they do could harm your system!
I just use it to execute "reboot", "tether start/stop", but you can use it to just execute any shell script either as normal shell or as su.
Let me know if it works and if its usefull for anyone.. thanks.
Exactly what I was trying to find time to write!
Great idea.
Thanks!
awesome
perfect for backing up ALL apps thanks
I must be missing something. I put in the script to launch Debian but it dosent appear to launch. Its just a simple command-
cd /sdcard/debian
su
modprobe ext2
su ./bootdeb
Any suggestions?
you shouldnt need the su commands as you are executing it as su... havent tested multilines a lot other then a few simple calls, but maybe thats where it goes wrong.
Can you try making one .sh file and execute that from within the script field?
That actually how i intended it... that way you can easy backup your larger scripts without having to rely on the database used in my app.
So i just use the commands "tether start" and "tether stop" and leave the actual scripts intact.
Or try it without the su commands and do something like this:
/sdcard/debian/modprobe ext2
/sdcard/debian/bootdeb
Let me know if it works else ill look further into it.
Any chance of adding support for shortcuts to run these commands on the desktop?
Already was thinking about that feature..
I'll try to add an option "Create shortcut" that will create a desktop shortcut to run the selected script.
Ok ive been thinking a bit last night and ill add the following features:
Load from file ( from sdcard .sh files )
Create shortcut ( will create a shortcut to the specified script on the home screen )
Save to file ( will save specified script to sdcard )
Ill also change some things in how things are executed to make it more stable ( im going to save the selected script into a temporary .sh file and execute that one ).
Ok ive made some changes:
* Added ability to create a shortcut to a script from the home screen ( long press home screen -> shortcut -> gscript and then select the script you want to create a shortcut of )
* Added ability to save the selected script to sdcard as .sh file
* Changed the way scripts are executed. The script is now first saved to /sdcard/gscript_tmp.sh and then executed using either sh or su.
Todo:
Load .sh files from sd.
Ill update the first post with a new zip and the latest changes.
New zip file in the first post... and also added some screenshots so people know what it does.
New code is also committed to the source repository.
Let me know if all is working ok.
rogro82 said:
Hi all,
Ive created a small application, for people like me who dont like typing the same thing over and over. I use it for things like tethering and reboot.
Its basically a small database in which you can save your scripts and run them easily from within Android ( either with normal shell or su ).
Ive decided to make it open source ( project can be found on google code, a link is listed below ), so people don't have to be afraid something else is executed as root.
[/URL]
Click to expand...
Click to collapse
Damn you beat me to it! I've been working on this exact same thing but I've not had much free time lately (I have a two month old at home). I think the only thing that I'd planned that I'm not sure if you've integrated is the abaility to import scripts, so a *nix guru could write a script and share it with others, and for other applications to call a script via this application. Still AWSOME!
Damn you beat me to it! I've been working on this exact same thing but I've not had much free time lately (I have a two month old at home). I think the only thing that I'd planned that I'm not sure if you've integrated is the abaility to import scripts, so a *nix guru could write a script and share it with others, and for other applications to call a script via this application. Still AWSOME!
Click to expand...
Click to collapse
Todo:
Load .sh files from sd.
Click to expand...
Click to collapse
Ill add that feature tonight or tomorrow but its coming soon... the shortcut feature took most of my time so didnt had time to complete loading ( although I already started some work on it )
About the calling script from within other applications. I dont know if people would like having other apps running script and as other apps dont know what script a user has its almost impossible to create a solid solution. So yes it is possible, but if its actually workable is another thing.
Glad you like it!
package file
Can someone just upload the package file so we can load this from our android devices?
oops sorry
When I downloaded gscript.zip on my iMac it unpacked it as a folder. Stupid Mac...
Anyway here is the link to the .apk file for people on their androids....
Thanks for posting a link for people to use straight from there mobile. Ill add it to the first post.
Added the ability to load .sh files from the sdcard.
Just put your .sh file in the root of the sdcard and add or edit a script and select "Load file". You will now see the file. Click it and the content of the file will be used as the script.
This way you can easily create .sh files on your pc or share them and eventually execute them as shortcuts
Update is in the first post... About to upload the source to the repository

How can I export my Shazam tagged songs list?

Before formatting my TD2 I made a full backup.
Now I want to transfer my Shazam tagged songs list back.
Simple copy paste from the backup is not working.
Where Shazam is keeping the list of tagged songs?
How do I export that list?
__________
Update: found it!
Can someone please open this attached shazam.db (from shazam for wm 6.5 ) and return the song list , date and time in some other format? xls, cvs etc.
Thanks!
Update:
Shazam.db file in aplication data\shazam\folder is where all tags are stored.
Did you have any luck with this? I was hoping to do the same thing, but I hit a wall when I realized that I don't know how to access files on my Droid's internal storage. Would you mind pointing me in the right direction?
Found nothing so far.
Anyone?
Incorrect....
Either the htc hero has a different file structure or this information is inaccurate....
There is no such file path.
I whipped a quick app (attached below) that can back up the shazam database file to your SDCard (in folder "shazambackup") and restores it need be.
Also you can export the Tagged songs to xml (saved as "exports.xml" in the "shazambackup" folder).
Next i'll probably parse the xml to a more readable format. Maybe CSV? or just Plain Text? Any ideas are welcome!
Let me know if you have any issues. So far i've only tested it on my G1. Must also have a rooted phone for any of this to work.
Can you please open this shazam.db (from wp6.5) and return the song list , date and time in some other format? xls, cvs etc.
Thanks!
bump.
Anyone can help?
See first post.
You're dealing with mostly Android here, you may want to ask in a WM or phone specific forum.
(from... Evo/MIUI/Tapatalk)
kokenjr said:
I whipped a quick app (attached below) that can back up the shazam database file to your SDCard (in folder "shazambackup") and restores it need be.
Also you can export the Tagged songs to xml (saved as "exports.xml" in the "shazambackup" folder).
Next i'll probably parse the xml to a more readable format. Maybe CSV? or just Plain Text? Any ideas are welcome!
Let me know if you have any issues. So far i've only tested it on my G1. Must also have a rooted phone for any of this to work.
Click to expand...
Click to collapse
Does not work properly on Desire. Opens the app after installation but "backup" button does not create the backup file and "Export to XML" makes the app force close without exporting anything.
About the export feature - the CSV version would probably be the best.
Thanks!
p666nn said:
About the export feature - the CSV version would probably be the best.
Thanks!
Click to expand...
Click to collapse
Can you or someone please export attached shazam.db (zip) in any other usable format?
Thanks!
Bumb!
BUMP!!!!!!
CSV would be great
The app's export to xml feature also fails on HTC Evo 4G (GingerBread).
Solution with SQLite
Hi everybody,
I found a solution to export the list via SQLite. I had to find it for myself as I found nothing on the web, but I put it here, so perhaps somebody else is looking for such a solution as well.
This explanation is about how to get Shazam's data base file from your Android phone, access it on your computer and export a list of your tagged songs.
1. COPY FILE FROM PHONE
The data is stored in the file on your Android:
/data/data/com.shazam.android/databases/library.db
You have to copy this file to your Computer to work with it. Probably everybody does this in a different way. Mine was probably a bit more difficult than necessary, there should be simpler ways (e.g. with ssh / scp), but mine was: Opening the Android app "Terminal" and typing in the command:
Code:
cp /data/data/com.shazam.android/databases/library.db /sdcard
Then the file was copyed on the sdcard, which I could access to with my computer via USB cable.
Then you need a program which can open SQLite-Files. There is the command line tool (at least in Linux) "sqlite3", but also graphical tools for Linux/Windows/Mac like the "sqlitebrowser" (Link: sourceforge.net/projects/sqlitebrowser).
2. OUTPUT FROM DATA BASE:
In every of these tools, you can execute SQL-commands. For my output I chose:
Code:
SELECT a.name , t.title, t.subtitle, t.album, t.subgenre_name, tg.short_datetime, tg.location_name , tg.lat, tg.lon
FROM artist a, artist_track at, track t, tag tg
WHERE a.id = at.artist_id AND at.track_id = t._id AND tg.track_id = t._id ORDER BY tg.timestamp;
This command displays a list of the songs, ordered by their timestamp.
So with the command line tool "sqlite3" you just type in:
sqlite3 -line /tmp/library.db "SELECT a.name , t.title, t.subtitle, t.album, t.subgenre_name, tg.short_datetime, tg.location_name , tg.lat, tg.lon FROM artist a, artist_track at, track t, tag tg WHERE a.id = at.artist_id AND at.track_id = t._id AND tg.track_id = t._id ORDER BY tg.timestamp;"
Click to expand...
Click to collapse
The output is in lines, you could also let put this in a text file by e.g. adding to this command:
"[see above] > shazam-tracks.txt"
Click to expand...
Click to collapse
There is also a way to export the data into an html table (just the table, no complete html file), by changing "-line" for "-html". For further details on how to export everything to a different file format (CVS etc) have a look on the Manpage of sqlite3 (command "man sqlite3").
With the graphical tool "sqlitebrowser" it is imho only possible to show this list, not to export it to a textfile. After having opened the .db-file with the program, you chose the tab "Execute SQL" and put there the above SQL command ("SELECT [...]"). Voilà!
3. DETAILS:
What I do like this is combining the necessary data of the database. They are spread over several tables. There is a table "artist" with the list of the artists and their unique ids. Then there is the same for the tracks, "track". In the "artist_track" table there is listed, which artist's id belongs tho which track's id. Finally in the table "tag" there are additional data like the time stamp of the song and even it's geo data tag.
With the SQLite program you can easily watch all the data and add / remove data from the SQL command, as you wish.
So far, I hope, I could help somebody?
Greetings, spectas
spectas said:
Hi everybody,
I found a solution to export the list via SQLite. I had to find it for myself as I found nothing on the web, but I put it here, so perhaps somebody else is looking for such a solution as well.
This explanation is about how to get Shazam's data base file from your Android phone, access it on your computer and export a list of your tagged songs.
1. COPY FILE FROM PHONE
The data is stored in the file on your Android:
/data/data/com.shazam.android/databases/library.db
You have to copy this file to your Computer to work with it. Probably everybody does this in a different way. Mine was probably a bit more difficult than necessary, there should be simpler ways (e.g. with ssh / scp), but mine was: Opening the Android app "Terminal" and typing in the command:
Code:
cp /data/data/com.shazam.android/databases/library.db /sdcard
Then the file was copyed on the sdcard, which I could access to with my computer via USB cable.
Then you need a program which can open SQLite-Files. There is the command line tool (at least in Linux) "sqlite3", but also graphical tools for Linux/Windows/Mac like the "sqlitebrowser" (Link: sourceforge.net/projects/sqlitebrowser).
2. OUTPUT FROM DATA BASE:
In every of these tools, you can execute SQL-commands. For my output I chose:
Code:
SELECT a.name , t.title, t.subtitle, t.album, t.subgenre_name, tg.short_datetime, tg.location_name , tg.lat, tg.lon
FROM artist a, artist_track at, track t, tag tg
WHERE a.id = at.artist_id AND at.track_id = t._id AND tg.track_id = t._id ORDER BY tg.timestamp;
This command displays a list of the songs, ordered by their timestamp.
So with the command line tool "sqlite3" you just type in:
The output is in lines, you could also let put this in a text file by e.g. adding to this command:
There is also a way to export the data into an html table (just the table, no complete html file), by changing "-line" for "-html". For further details on how to export everything to a different file format (CVS etc) have a look on the Manpage of sqlite3 (command "man sqlite3").
With the graphical tool "sqlitebrowser" it is imho only possible to show this list, not to export it to a textfile. After having opened the .db-file with the program, you chose the tab "Execute SQL" and put there the above SQL command ("SELECT [...]"). Voilà!
3. DETAILS:
What I do like this is combining the necessary data of the database. They are spread over several tables. There is a table "artist" with the list of the artists and their unique ids. Then there is the same for the tracks, "track". In the "artist_track" table there is listed, which artist's id belongs tho which track's id. Finally in the table "tag" there are additional data like the time stamp of the song and even it's geo data tag.
With the SQLite program you can easily watch all the data and add / remove data from the SQL command, as you wish.
So far, I hope, I could help somebody?
Greetings, spectas
Click to expand...
Click to collapse
Thanks!!! It helped me since Shazam no longer gets past the setup screen!
I found that with SQliteExport you can use your same command above and export to a file of your choice, for example, xls or csv. Here's the link to the little program:
http://www.speqmath.com/tutorials/sqlite_export/index.html
Flyview said:
Thanks!!! It helped me since Shazam no longer gets past the setup screen!
I found that with SQliteExport you can use your same command above and export to a file of your choice, for example, xls or csv. Here's the link to the little program:
http://www.speqmath.com/tutorials/sqlite_export/index.html
Click to expand...
Click to collapse
Tried but cant do it. I need step by step instruction. Or better, can someone just export the db that I attached? (See OP - first post - shazam.db ?)
Thanks
K
Best solution for exporting from shazam database
Delete this one please
Hello I am new on the forum. I've learned a lot of things in this website, it's time to payback
I’ve got another solution to this issue….
1.-Download this plugin for Firefox.
addons.mozilla.org/es/firefox/addon/sqlite-manager
2.- In Firefox – Tools, select SQLite Manager
3.- In the new window select database – connect database – then open your db from shazam
4.- Then you’ll see two panels. on left panel select track and on right panel, select browse and search then you’ll be able to see all your tag info
5.- On the left panel select track – right click – export table, select csv on right panel then ok.
6.- Open your new saved database with any office (word, excel)
7.- That’s all
Shazam Tags
snakesight said:
Hello I am new on the forum. I've learned a lot of things in this website, it's time to payback
I’ve got another solution to this issue….
1.-Download this plugin for Firefox.
addons.mozilla.org/es/firefox/addon/sqlite-manager
2.- In Firefox – Tools, select SQLite Manager
3.- In the new window select database – connect database – then open your db from shazam
4.- Then you’ll see two panels. on left panel select track and on right panel, select browse and search then you’ll be able to see all your tag info
5.- On the left panel select track – right click – export table, select csv on right panel then ok.
6.- Open your new saved database with any office (word, excel)
7.- That’s all
Click to expand...
Click to collapse
This above works well nice one.
I was trying to do my own program before I saw this.I'm not a programmer but I stuck together a few bits of code I found and hopefully works you you. Use android app Root Browser Lite to copy file from data/data/com.shazam.android/databases/library.db to your sd card. Or use the app posted earlier which does this for you.
Put library.db file from you Shazam backup in the same folder as this program and run program and hit 'GetTags' and should get CSV and htm versions of your tags. No error checking or anything fancy in this program. Requires .NET 3.5. May only work on 32-bit machines. I'd like to enhance this and will if people find it useful.
How results should look.

[APP Extra][WIP] Spotify Controller: OS X Controller

cewan created the awesome Spotify Controller application. I really like it and I am obviously not the only one.
Of course this made me even more sad that there is no matching server for OS X; there is a package that you can download but it's only Windows and Linux.
So, I took cewan's server, reverse engineered some of it and come up with this version that works on my Mac.
I could certainly have done it a bit better but not without de/recompiling his Java code so I decided to play with its "facade" scripts instead.
It's very much Alpha quality and I don't expect it to 100% match the current Linux & Windows servers, but I am able to play/pause, fast forward/backward, display song information and add songs from Spotify.
My script builds on top of what Cewan posted here.
It should be compatible with Linux, Windows and OS X.
Get it here (SpotifyController.zip)
Notes:
1. To configure, open a terminal window and run install_osx
2. To run the server, run SpotifyController.sh
I hope to turn it into a more "MAC-like" service in the future.
The installation process for this server seems very straightforward but I absolutely cannot get it to work. This is what I keep getting when I run install_osx:
Code:
Installing Spotify Controller Server...
This installation file has been created for OS X. If you are not using that distribution, installation might not work, but it should be pretty straightforward to modify the script to work for your distribution.
This program requires Spotify and Java. This program will now check if Spotify is installed. Press enter to continue...
sh: spotify_install_osx.sh: No such file or directory
Spotify installed.
Proceeding with installation. Creating application shortcut...
cp: resources/KillSpotifyController: No such file or directory
cp: resources/SpotifyController.desktop: No such file or directory
cp: resources/SpotifyController STOP.desktop: No such file or directory
cp: resources/SpotifyController.desktop: No such file or directory
cp: resources/SpotifyController STOP.desktop: No such file or directory
Remapping commands to make OSX commands default
Program is now installed. We will now perform some tests to make sure your installation works correctly. First of all, please start Spotify manually and start playing a song.
Press "Enter" when you have started a song on Spotify:
Trying to pause the song...
/Applications/SpotifyController/install_osx: line 61: commands/spotifyPlayPause_osx: No such file or directory
Did the music stop (press 'y' if it did)?
n
Seems that we have a problem controlling Spotify. Make sure you have Spotify (for Linux, not under Wine) installed, running and playing a song. Also make sure that you have "dbus" installed. This script will now exit. When you have solved the requirements, rerun the installation script.
logout
I'm sure I'm missing something obvious. Any help is appreciated. Thanks.
Sorry, just saw your post :/
It looks like '.' (current directory) may not be in your path.
Are you running install_osx from the terminal?
If so, try running it again after typing:
Code:
export PATH=.:$PATH
No worries. Thanks for replying. I had a feeling something was wrong with the path and I was able to get the server installed. However, I couldn't get the server to launch. It's been a while since I last tried this so I'll give it another try when I get home from work.
Sent from my ADR6300 using XDA App
Ok, to answer your question, yes, I am running it from the Terminal. Here's what is returned when I add your snippet of code:
Code:
Last login: Tue Sep 13 01:03:52 on ttys001
my-computer:~ my_computer$ export PATH=.:$PATH /Users/my_computer/Downloads/SpotifyController/install_osx
-bash: export: `/Users/my_computer/Downloads/SpotifyController/install_osx': not a valid identifier
The only way I could get it to work was to open install_osx in TextEdit and specify the exact location of spotify_install_osx.sh and the other items that are located in the resources. That seems to let me install it, but here's the result:
Code:
Last login: Tue Sep 13 00:57:00 on ttys001
my-computer:~ my_computer$ /Applications/SpotifyController/install_osx ; exit;
Installing Spotify Controller Server...
This installation file has been created for OS X. If you are not using that distribution, installation might not work, but it should be pretty straightforward to modify the script to work for your distribution.
This program requires Spotify and Java. This program will now check if Spotify is installed. Press enter to continue...
Please install Spotify
Spotify installed.
Proceeding with installation. Creating application shortcut...
Remapping commands to make OSX commands default
Program is now installed. We will now perform some tests to make sure your installation works correctly. First of all, please start Spotify manually and start playing a song.
Press "Enter" when you have started a song on Spotify:
Trying to pause the song...
2011-09-13 01:01:13.243 osascript[40158:903] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
Did the music stop (press 'y' if it did)?
y
Trying to play the song...
2011-09-13 01:01:17.285 osascript[40168:903] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
Did the music start (press 'y' if it did)?
y
Trying to skip the song...
2011-09-13 01:01:28.859 osascript[40184:903] Error loading /Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: dlopen(/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types, 262): no suitable image found. Did find:
/Library/ScriptingAdditions/Adobe Unit Types.osax/Contents/MacOS/Adobe Unit Types: no matching architecture in universal wrapper
osascript: OpenScripting.framework - scripting addition "/Library/ScriptingAdditions/Adobe Unit Types.osax" declares no loadable handlers.
Did Spotify move to the next song (press 'y' if it did)?
y
Program is now installed. Simply run "Spotify Controller" from your desktop, or type "SpotifyController" to start the server. Make sure you have Spotify up and running with songs in the play queue.
To automatically start Spotify Controller Server when computer boots, add the application to System -> Preferences -> Startup Applications.
Don't forget to install the Spotify Controller app from Android Market.
If you experience any problems, see the file "TROUBLESHOOTING".
Happy Listening!
logout
[Process completed]
After what appears to be a successful install, I get the following when I launch SpotifyController.desktop.
Code:
Last login: Tue Sep 13 01:05:41 on ttys000
/Users/my_computer/Desktop/SpotifyController.desktop ; exit;
my-computer:~ my_computer$ /Users/my_computer/Desktop/SpotifyController.desktop ; exit;
env: xdg-open: No such file or directory
logout
[Process completed]
I'm sure what tinkering I've done has rendered the install useless. Any help is appreciated. I'd love to get this up and running as I paid for Macify but it hardly has any functionality. Thanks!
Rather than the desktop shortcut, can you try to run, in terminal, in the directory you installed from:
Code:
SpotifyController.sh
Cheers,
-Chris.
I did try running it from the terminal in the directory I installed it from. If I remember correctly, I received an "insufficient privileges" error which I thought odd because my account has administrative privileges. I'd have to get back to you with the exact error message when I get home. My job gets in the way of the important stuff.
Thanks again for all the help and suggestions. I really do appreciate it.
Sent from my ADR6300 using XDA App
Does this need a Premium account?
Unable to get Android app to connect
Install of server went ok. Browsing on the same machine to: localhost:1258/SpotifyControllerServlet/SpotifyControllerServlet
Shows me the current track playing. However, the app cannot find the server - even if I manually enter the ip address (192.168.1.2). Both devices are connected to the same wifi...
Can you help?
Brian
Fixed this - the network in the office must have blocked the specific ports required. I can now connect the app using my home network.
HOWEVER, the app is now asking me to upgrade to Spotify Premium or sync music to my phone... I was under the impression this app was to "remote control" my Mac/Spotify i.e. changes tracks without being next to the Mac. I do not wish to play/stream music to my phone.
Have I missed something?
Brian
So I was finally able to launch the server (None of the files were in the right place so I had to change paths, etc.) and connect to it using the app on my Droid Incredible. Spotify Controller was unable to detect the server automatically so I had to specify the server IP manually. After I did that I was connected in a jiff. However, I'm unable to control Spotify from Spotify Controller. All it states is "Nothing is playing..." If I click on "Select song/playlist" both Songs and Playlists are empty. The app states "There are no items..." and I'm under the impression that Playlists should be populated with all of my Spotify playlists and that Songs should list all the songs in my Spotify library.
Anyways, I don't know if this will be of any help, but here's the output when I run spotifycontroller.sh in Terminal:
Code:
2011-10-04 22:12:28.803:INFO::Deployment monitor /Applications/SpotifyController/server/webapps at interval 1
2011-10-04 22:12:28.806:INFO::Deployable added: /Applications/SpotifyController/server/webapps/SpotifyControllerServlet.war
2011-10-04 22:12:28.857:INFO::Extract jar:file:/Applications/SpotifyController/server/webapps/SpotifyControllerServlet.war!/ to /private/var/folders/zb/zbitUE7+E2qHl0QMJkvwTU+++TI/-Tmp-/jetty-0.0.0.0-1260-SpotifyControllerServlet.war-_SpotifyControllerServlet-any-/webapp
2011-10-04 22:12:29.279:INFO::started o.e.j.w.WebAppContext{/SpotifyControllerServlet,file:/private/var/folders/zb/zbitUE7+E2qHl0QMJkvwTU+++TI/-Tmp-/jetty-0.0.0.0-1260-SpotifyControllerServlet.war-_SpotifyControllerServlet-any-/webapp/},/Applications/SpotifyController/server/webapps/SpotifyControllerServlet.war
0 [main] INFO com.cewan.spotify.SpotifyControllerServlet - init
52 [main] INFO com.cewan.spotify.ServerThread - found broadcast: 10.37.129.255
52 [main] INFO com.cewan.spotify.ServerThread - found ipString: 10.37.129.2
53 [main] INFO com.cewan.spotify.ServerThread - found broadcast: 10.211.55.255
53 [main] INFO com.cewan.spotify.ServerThread - found ipString: 10.211.55.2
53 [main] INFO com.cewan.spotify.ServerThread - found broadcast: 192.168.0.255
53 [main] INFO com.cewan.spotify.ServerThread - found ipString: 192.168.0.12
2011-10-04 22:12:29.471:INFO::Deployment monitor /Applications/SpotifyController/server/contexts at interval 1
2011-10-04 22:12:29.472:INFO::Deployable added: /Applications/SpotifyController/server/contexts/move-context.xml
2011-10-04 22:12:29.481:INFO::started o.e.j.s.h.MovedContextHandler{/oldContextPath,null}
2011-10-04 22:12:29.482:INFO::Deployable added: /Applications/SpotifyController/server/contexts/resources.xml
2011-10-04 22:12:29.493:INFO::started o.e.j.s.h.ContextHandler{/resources,file:/Applications/SpotifyController/server/resources/}
2011-10-04 22:12:29.523:INFO::Started [email protected]:1260
Any thoughts?
HOWEVER, the app is now asking me to upgrade to Spotify Premium or sync music to my phone...
Click to expand...
Click to collapse
This is pure speculation on my part since I'm (very obviously) unable to run the app successfully on my phone, but if you're not a premium subscriber, the Spotify app (the one made by Spotify) will only allow you to sync your music on a wi-fi network. You can't access their online library. In order to access the Spotify library (play songs, etc.), you need to be a premium subscriber.
It appears that Spotify Controller has a nifty feature that allows you to add music from Spotify through the official Spotify app. My guess is that this feature of Spotify Controller requires that you have access to the Spotify library, and you will only have access to the library through the official app if you're a premium subscriber. Otherwise Spotify Controller is just a remote.
cyansmoker said:
It's very much Alpha quality and I don't expect it to 100% match the current Linux & Windows servers, but I am able to play/pause, fast forward/backward, display song information and add songs from Spotify.
...
I hope to turn it into a more "MAC-like" service in the future.
Click to expand...
Click to collapse
Works on 10.7.2 pretty much as stated above (w/ Spotify Premium), thanks! Any plans of taking this further? Songs and playlists now show up in the remote UI only after adding them with 'Add from Spotify' and for this you need a Premium account, I suppose. Songs from these lists can then be played/paused/skipped, but only as long as the list is still played in the OSX Spotify client (green speaker).
Changing list in OSX Spotify will correctly affect what song is shown in Android, but changing list in the Android remote (to a list that has been added as above) will only change the OSX Spotify display to show this lists songs. The active list from which songs are played will not change.
Starting the Android client and then choosing a list that has been added as above (without starting the OSX Spotify beforehand) will start OSX Spotify, but will not make the list active, i.e. no songs will play before one from the list has been started from the OSX Spotify.
Haven't tested the Win/Linux versions though, so I don't really know if this should work on OSX or not.
I think there's a lot of people looking for a stable and feature-rich Spotify remote for Android. I certainly am and would very much appreciate any development.
This is what I did in Terminal, no problems connecting after this:
$ cd Downloads/SpotifyController
$ sudo ./install_osx
$ chmod u+x SpotifyController.sh
$ ./SpotifyController.sh
[CTRL-c to quit]
Btw, I think the .desktop-files are for Linux, shouldn't be used in OSX.
jerrycan said:
This is what I did in Terminal, no problems connecting after this:
$ cd Downloads/SpotifyController
$ sudo ./install_osx
$ chmod u+x SpotifyController.sh
$ ./SpotifyController.sh
[CTRL-c to quit]
Btw, I think the .desktop-files are for Linux, shouldn't be used in OSX.
Click to expand...
Click to collapse
This worked for me. Using Spotify Unlimited.
This actually works quite well for me. Thanks! The android client does give a warning, that it's recommended to update the server install, and that not all features in the client are available at the moment. Are there plans to integrate this experimental support for mac into the project?
nicxz said:
This actually works quite well for me. Thanks! The android client does give a warning, that it's recommended to update the server install, and that not all features in the client are available at the moment. Are there plans to integrate this experimental support for mac into the project?
Click to expand...
Click to collapse
Though this topic is quite old, i'd like to push it. Simply coz there is now nice-working remote for android-mac out there.
I can now control the song playing (skip, play/pause, volume) but still do not have access to my playlists and stuff...
Anyone any idea?
sophisticated_one said:
Though this topic is quite old, i'd like to push it. Simply coz there is now nice-working remote for android-mac out there.
I can now control the song playing (skip, play/pause, volume) but still do not have access to my playlists and stuff...
Anyone any idea?
Click to expand...
Click to collapse
Hi,
I have installed this server and it works quite well. Allthough is not finished, I wonder if you have any plans make some more improvements =)
I would love to help! hehe..
Regards,
Alberto
Oh I had completely forgotten about this app.
Let me check if I can find where I put the source code for starters...
cyansmoker said:
Oh I had completely forgotten about this app.
Let me check if I can find where I put the source code for starters...
Click to expand...
Click to collapse
just wondering if you had the original file from the nexus.zteo website, link isnt working for me, website is down i think. the file download worked from there, but not the one you posted, for mac at least, THANKS!!!!
It's working wonderfully, except for that the app opens the Spotify Web Player when I want it to open the Spotify application. Any ideas on how I could manage this?
(Android app, Macbook Pro retina.)
Thanx!
Not working..any help will be appreciated.. OS X Version 10.9.1 & Samsung Galaxy S3
Last login: Sat Jan 18 09:34:48 on ttys001
DebasishGhoshal:~ pranabmandal$ /Other\ folder/Downloads/SpotifyController/install ; exit;
Installing Spotify Controller Server...
This installation file has been created for Ubuntu. If you are not using that distribution, installation might not work, but it should be pretty straightforward to modify the script to work for your distribution.
This program requires Spotify and Java. This program will now check if they are installed. Press enter to continue...
Password:
sh: spotify_install.sh: No such file or directory
Spotify installed.
Do you want to install Java (default-jre)? Press y or n.
y
Installing Java...
sudo: apt-get: command not found
Installation of dependencies finished.
Proceeding with installation. Creating application shortcut...
cp: resources/KillSpotifyController: No such file or directory
cp: resources/icon.png: No such file or directory
cp: resources/icon_stop.png: No such file or directory
cp: resources/SpotifyController.desktop: No such file or directory
cp: resources/SpotifyController STOP.desktop: No such file or directory
cp: directory /usr/share/applications does not exist
cp: directory /usr/share/applications does not exist
Program is now installed. We will now perform some tests to make sure your installation works correctly. First of all, please start Spotify manually and start playing a song.
Press "Enter" when you have started a song on Spotify:
Trying to pause the song...
/Other folder/Downloads/SpotifyController/install: line 63: commands/spotifyPlayPause: No such file or directory
Did the music stop (press 'y' if it did)?
n
Seems that we have a problem controlling Spotify. Make sure you have Spotify (for Linux, not under Wine) installed, running and playing a song. Also make sure that you have "dbus" installed. This script will now exit. When you have solved the requirements, rerun the installation script.
logout
[Process completed]

[TOOL][ICS][GB][FROYO] Extract contents of Samsung Memo App's Database to CSV File

Many people, including myself, enjoyed using the stock Memo application on Froyo and GB. Unfortunately, it relies on TouchWiz so it is pretty unlikely that it will ever be ported to ICS. There are a plethora of note-taking apps out there to replace it, but how do you get your data back?
You don't need a running version of Memo to do this, just a backup of your Memo.db database.
I've attached a couple of shell scripts that you can run either on your phone or `nix / Mac to help you out. Here is the plan:
extract-memos.sh will take the memo data in a copy of your Memo.db, add a new table with columns for human-readable modified and created dates, as well as color, and write out the result (all memos) in a CSV file. You should be able to read the CSV file in most spreadsheet programs and save the data or transform it as you might need for another use.
Code:
[email protected]:~/Documents/memo-export$ sh extract-memos.sh
Checking database: /sdcard/memo-extract/com.sec.android.app.memo/databases/Memo.db
Checking output directory: /sdcard/memo-extract
You may want to see if there is anything important in
/sdcard/memo-extract/com.sec.android.app.memo/shared_prefs/memo_shared_pref.xml
Data exported to
/sdcard/memo-extract/memo_20120714-100915.txt
Code:
[email protected]:~/Documents/memo-export$ cat /sdcard/memo-extract/memo_20120714-100915.txt
_id,title,content,color,modify_t,create_t,color_text,modify_datetime,create_datetime
1,20120712,"A yellow memo",1,1342138985041,1342138985041,Yellow,"2012-07-12 17:23:05","2012-07-12 17:23:05"
2,20120712,"A tan memo",2,1342139010315,1342139010315,Tan,"2012-07-12 17:23:30","2012-07-12 17:23:30"
3,20120712,"A green memo",3,1342139028326,1342139028326,Green,"2012-07-12 17:23:48","2012-07-12 17:23:48"
4,20120712,"A blue memo",4,1342139045894,1342139045894,Blue,"2012-07-12 17:24:05","2012-07-12 17:24:05"
5,20120712,"A pale blue memo",5,1342139064381,1342139064381,BlueGray,"2012-07-12 17:24:24","2012-07-12 17:24:24"
extract-memos.sh expects to find the database in /sdcard/memo-extract/com.sec.android.app.memo/databases
and will write the output in /sdcard/memo-extract
If you already have a copy of Memo.db (I suggest a copy, as the script adds a new table to the database), you can adjust the input and output directories using the environment variables dbdir and outdir.
If you're not command-line savvy, you might want to try creating a copy of Memo.db using extract-files.sh first. It will try, in order:
The GB location -- /data/data/com.sec.android.app.memo
ClockworkMod backups -- /sdcard/clockworkmod/backups
TitaniumBackup backups (default location only) -- /sdcard/TitaniumBackup
and, if successful, copy/extract into /sdcard/memo-extract
You likely need busybox on your phone to run these scripts on the phone. You will need root if you intend to copy from /data/data
To run them on the phone:
Copy the scripts to your phone; here I am assuming you saved them to /sdcard/
Get a shell started on the phone (adb shell, or a terminal emulator on the phone)
Change directory to where you have the scripts
# cd /sdcard/
Uncompress the files, if you haven't already
# gunzip extract-files.sh.gz
# gunzip extract-memos.sh.gz
Get a copy of Memo.db, either using your own approach, or
# sh extract-files.sh
Assuming that succeed, extract the memos into a CSV file
# sh extract-memos.sh
Thanks to m4xm4n for pushing me to make this available. If you find it helpful, please take the time to poke both our Thanks buttons.
If you have problems, please PM me and I'll try to resolve them.
Latest version is 2012-07-14
What is the warning about memo_shared_pref.xml? I don't even have the file!
I had some reasonably useless information about "check" this and that in my com.sec.android.app.memo/shared_prefs/memo_shared_pref.xml My instance of that file dates back to the first release of the phone. I didn't see it on a fresh GB-created version, so it might be Froyo cruft, or who knows. You probably should check this file to see if there is anything useful to you in it.​
My _id values aren't all there
Missing _id values are from the memos you have deleted.​
What are _id values?
They are an internal number that the Memo app used to keep track of your memos. You probably don't need them to import.​
What are the long numbers for modify_t and create_t?
Internal "unixtime" in milliseconds. If that sounded like gibberish, use the human-readable versions that are in your local timezone.​
The create/modify times seem off by several hours
Strangely, I have some memos that seem around eight hours off in the opposite way I would expect if they were in UTC. I don't know why.​
(reserved for information on importing into other apps)
There are a ton of note-taking apps out there. Right now, I haven't found any that can import the content, the created and modified dates both, and hopefully the color in a reasonable way. If I do, I'll post here how to get the data easily into that app.
Would you be able to post a new link to extract-memos.sh? I just tried clicking on the current one, and both only led to a page that said "410 Gone."

Extracting contacts2.db to vCard

Spent a fair bit of time searching, and had some trouble trying to get this to work, so I figured I'd share what ended up working for me in case someone else ends up in a similar position and tries googling around for it. I used the perl script at https://github.com/tmo1/contacts2vcard - everything else struggled to handle either the exported .csv table or I had trouble with errors.
I wanted to extract my contacts, but since I had a more or less bricked phone I couldn't export as vCard nor upload them to some cloud service.
Steps:
1. Grab the contacts2.db file (if you have a large -wal then consider performing a 'vacuum" See: https://stackoverflow.com/questions...f-sqlite-3-7-wal-file-into-main-database-file)
2. Get Perl running if you haven't, and install dependencies listed
3. Run the script, get vCard, drop onto new phone, open it and import.
A few notes
- If you're on windows, install something like strawberry perl, then go to the cmd line and install https://metacpan.org/pod/vCard and https://metacpan.org/pod/DBD::SQLite as dependencies. Install instructions you can paste into the command line are on the left side under the Tools category - click it and it'll give you the command prompt ready input you can copy/paste.
- Even on Android 12, import didn't work when I had exported as vCard 4.0 - I used the -v 2.1 switch and then everything imported flawlessly.

Categories

Resources