Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,742,912 Members 40,718 Now Online
XDA Developers Android and Mobile Development Forum

[APP - Nexus, MT3G, Droid, Evo, Hero] Search2Play - Control Music with the Search Key

Tip us?
 
Geniusdog254
Old
(Last edited by Geniusdog254; 14th November 2010 at 03:32 AM.)
#1  
Geniusdog254's Avatar
Retired Recognized Developer - OP
Thanks Meter 166
Posts: 1,094
Join Date: Jan 2009
Location: St. Louis

 
DONATE TO ME
Default [APP - Nexus, MT3G, Droid, Evo, Hero] Search2Play - Control Music with the Search Key

Hello all, I just completed an app I'd like to share with you all.

It's called Search2Play, it lets you play and pause your music by pressing a button on your device. On most devices, it is the search key. Currently, the Nexus & MyTouch 3G both use the Search key, whereas the Droid uses the Camera key. If you have physical keys (i.e. Droid, MT3G, G1, etc) then it will work when the phone is locked, but if you have capacitive keys (Nexus, Moment, Eris, Incredible, etc) then the screen must be on (lockscreen works, and fully unlocked of course).

It is available on the market under the name "Search2Play (Root Required)". It's totally free.

It requires root permissions to install. It also requires that you have a version of BusyBox that supports the "cp" command. Only Droid users probably have to worry about the busybox version, as most other custom ROMs have that already. Droid users, I recommend CyanogenMod for Droid or Bugless Beast as I know both of them have the right version.

It does not run in the background or install a service, just makes some changes to a few files on the /system partition.

The UI is very simple, just two buttons and some text explaining the app. Once you hit install, it will ask for permission to use root, you must hit accept or the app won't serve its purpose

The other button, "Restore", lets you remove the mod and go back to stock settings, where the search button brings up search, etc.

Supported Devices:
Nexus
Spica
Hero (GSM & CDMA)
Galaxy S devices (all US variants and probably the i9000 as well. It's not tested)
MyTouch 3G
Droid 1 (I've been told DX & D2 work as well, though I'm not sure how :?)
Evo (must be NAND unlocked or S-OFF)
Desire (must be NAND unlocked or S-OFF)

Free Version on Market:


Or click this from your device: Search2Play Free

See the Market to view a screenshot. Please give me some feedback. Thanks! Hope you enjoy the app :

FOR DEVICE REQUESTS SEE POST #3
Follow me on Twitter @Geniusdog254

If you like my work, please buy one of my apps on the Market or donate!
  • Reflex-A-Tron - A colorful, addicting, & fun game to test yourself & challenge friends for only $.99!
  • Search2Play - Control your music with your device's buttons!
  • Task'd - A beautiful to-do list app!

Phones:
Android Dev Phone 1 - Dec. '08
Rogers HTC Dream - Sept. '09
AT&T Nexus One - March '10
Motorola Droid - Apr. '10
HTC Evo - Jun. '10
HTC Evo 3D - Jun. '11
Sprint Galaxy Nexus - May '12
 
Geniusdog254
Old
(Last edited by Geniusdog254; 26th July 2010 at 06:51 PM.)
#2  
Geniusdog254's Avatar
Retired Recognized Developer - OP
Thanks Meter 166
Posts: 1,094
Join Date: Jan 2009
Location: St. Louis

 
DONATE TO ME
Changelog:

1.4.1 thru 2.1:
Add support for Evo, GSM Hero, CDMA Hero, & Samsung Spica (thanks to Aasheet Kumar for the files I needed for Spica support!)

1.4:
Fixed rare root checking bug on some Droid ROMs, and maybe some Nexus ROMs too
1.6+ only now, sorry, it's not like any device this works for isn't updated to at least 1.6

1.3:
Now checks if the SD card is present on launch instead of just crashing if it's not there
Cleaned things up more
Merged some code between the donate & free versions
Better checks to see if it can be installed

1.2.5:
FINALLY stopped it from causing buttons to stop working. Checks for compatibility, and throws an error if it detects it can't run.

1.2:
Droid support!!
More should fix a few FC issues some people have seen. Let me know if you have problems.

1.1.2:
Fixes the not restoring bug

1.1.1:
Failed attempt at fixing the not restoring bug.

1.1:
Support for low res devices.
Now works with MT3G! Since it has a hard search key, it will even work when the phone is locked
Deletes files from SD card once done installing.
Cleaned up more code.

1.0.1:
Sets system back to Read-Only once finished installing
Cleaned up some code, if you have FCs let me know.

1.0:
Base release
Follow me on Twitter @Geniusdog254

If you like my work, please buy one of my apps on the Market or donate!
  • Reflex-A-Tron - A colorful, addicting, & fun game to test yourself & challenge friends for only $.99!
  • Search2Play - Control your music with your device's buttons!
  • Task'd - A beautiful to-do list app!

Phones:
Android Dev Phone 1 - Dec. '08
Rogers HTC Dream - Sept. '09
AT&T Nexus One - March '10
Motorola Droid - Apr. '10
HTC Evo - Jun. '10
HTC Evo 3D - Jun. '11
Sprint Galaxy Nexus - May '12
 
Geniusdog254
Old
(Last edited by Geniusdog254; 14th November 2010 at 03:28 AM.)
#3  
Geniusdog254's Avatar
Retired Recognized Developer - OP
Thanks Meter 166
Posts: 1,094
Join Date: Jan 2009
Location: St. Louis

 
DONATE TO ME
If you want to request support for your device here's what I need. Note that your device must be able to be rooted and the system partition must be able to get read/write access from userspace. I.E. any Desire or Evo or any other recent HTC device with a NAND lock will not work, unless it has been NAND unlocked with an S-OFF bootloader, like via Unrevoked.. If your device has all that, get this info and send me an email at geniusdog254@gmail.com

Run the command "adb shell mount" and tell me the output. I don't need the whole thing, just the line referring to the system partition. I.E. "/dev/block/mtdblock3 on /system type yaffs2 (ro,relatime)" is the line on the Nexus, it should be similar to that.

Then, run "adb shell getprop" and tell me the 1-4 lines related to the keyboard, like hw.keyboards.*.devname and tell me those lines. I.E the Nexus returns "mahimahi-keypad". Yours should be similar.

Finally, run "adb shell ls /system/usr/keylayout/". It should return a list of files all ending in ".kl"

Remember the keypad name from step 2? Good :)
There should be a ".kl" file matching that name (like mahimahi-keypad.kl). Pull that file with "adb pull /system/usr/keylayout/keypadname.kl directory" with directory being the folder you want to pull the file to and keypad name being the name from step 2.

Zip that file, and then send it to me please.

That should be it, if you have any questions or problems with this list hit me up on GTalk or email me. Geniusdog254@gmail.com for both GTalk & email.
Follow me on Twitter @Geniusdog254

If you like my work, please buy one of my apps on the Market or donate!
  • Reflex-A-Tron - A colorful, addicting, & fun game to test yourself & challenge friends for only $.99!
  • Search2Play - Control your music with your device's buttons!
  • Task'd - A beautiful to-do list app!

Phones:
Android Dev Phone 1 - Dec. '08
Rogers HTC Dream - Sept. '09
AT&T Nexus One - March '10
Motorola Droid - Apr. '10
HTC Evo - Jun. '10
HTC Evo 3D - Jun. '11
Sprint Galaxy Nexus - May '12
 
bayoffire
Old
#4  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Apr 2010
Dear geniusdog

I just tried out your app.
I installed it, run it, pressed the install button, allowed root access and rebooted mynexus one. But after that reboot, my sell doesn't react on anypressed buttons anymore. I can only use the touchscreen...
I also tried to restore in your app, but there appeared a window saying that the app is not responding anymore.

How can I manually restore it? Is there a command or some files, I can edit?

Thanks for your help
 
Geniusdog254
Old
#5  
Geniusdog254's Avatar
Retired Recognized Developer - OP
Thanks Meter 166
Posts: 1,094
Join Date: Jan 2009
Location: St. Louis

 
DONATE TO ME
Quote:
Originally Posted by bayoffire View Post
Dear geniusdog

I just tried out your app.
I installed it, run it, pressed the install button, allowed root access and rebooted mynexus one. But after that reboot, my sell doesn't react on anypressed buttons anymore. I can only use the touchscreen...
I also tried to restore in your app, but there appeared a window saying that the app is not responding anymore.

How can I manually restore it? Is there a command or some files, I can edit?

Thanks for your help
Sorry for the issue. I have uploaded a new version of both apps that should fix the problem. If you can download the app and install it again, otherwise, PM me & I will give you manual instructions to restore it.

Also, just some technical details, the problem was caused because I had set it to create the directory on the start of the application. After that I removed it once you clicked the button & the install was finished. Because of that, if you clicked restore after install, it would fail to find the directory and then proceed to FC. Sorry for the trouble
Follow me on Twitter @Geniusdog254

If you like my work, please buy one of my apps on the Market or donate!
  • Reflex-A-Tron - A colorful, addicting, & fun game to test yourself & challenge friends for only $.99!
  • Search2Play - Control your music with your device's buttons!
  • Task'd - A beautiful to-do list app!

Phones:
Android Dev Phone 1 - Dec. '08
Rogers HTC Dream - Sept. '09
AT&T Nexus One - March '10
Motorola Droid - Apr. '10
HTC Evo - Jun. '10
HTC Evo 3D - Jun. '11
Sprint Galaxy Nexus - May '12
 
Geniusdog254
Old
#6  
Geniusdog254's Avatar
Retired Recognized Developer - OP
Thanks Meter 166
Posts: 1,094
Join Date: Jan 2009
Location: St. Louis

 
DONATE TO ME
Droid Support!!!!
Follow me on Twitter @Geniusdog254

If you like my work, please buy one of my apps on the Market or donate!
  • Reflex-A-Tron - A colorful, addicting, & fun game to test yourself & challenge friends for only $.99!
  • Search2Play - Control your music with your device's buttons!
  • Task'd - A beautiful to-do list app!

Phones:
Android Dev Phone 1 - Dec. '08
Rogers HTC Dream - Sept. '09
AT&T Nexus One - March '10
Motorola Droid - Apr. '10
HTC Evo - Jun. '10
HTC Evo 3D - Jun. '11
Sprint Galaxy Nexus - May '12
 
hahabear
Old
#7  
Junior Member
Thanks Meter 0
Posts: 5
Join Date: Apr 2010
Help!!!!!

I have installed V1.0.4, but my touch keys(back, Menu, Home and Search) don't work.

Then I have tried to restore it, but it's failed.

How could I fix it? Thanks.

My Rom is 2.1-update1 rooted.
 
Geniusdog254
Old
#8  
Geniusdog254's Avatar
Retired Recognized Developer - OP
Thanks Meter 166
Posts: 1,094
Join Date: Jan 2009
Location: St. Louis

 
DONATE TO ME
Quote:
Originally Posted by hahabear View Post
Help!!!!!

I have installed V1.0.4, but my touch keys(back, Menu, Home and Search) don't work.

Then I have tried to restore it, but it's failed.

How could I fix it? Thanks.

My Rom is 2.1-update1 rooted.
Hmm I dont have this issue, how does it fail? Does it just freeze, or does it FC, or does it say it finishes then do nothing? Also, what ROM, CM? Enomther? Please let me know so I can work on this.

Also, to fix it, download the attached file, & run the following commands (you must have ADB set up):
adb remount
adb shell rm /system/usr/keylayout/mahimahi-keypad.kl
adb push *path to downloaded file* /system/usr/keylayout/mahimahi-keypad.kl

Or you can just reflash your ROM, either way you'll get the same thing.
Attached Files
File Type: txt mahimahi-keypad-orig.txt - [Click for QR Code] (1.7 KB, 21 views)
Follow me on Twitter @Geniusdog254

If you like my work, please buy one of my apps on the Market or donate!
  • Reflex-A-Tron - A colorful, addicting, & fun game to test yourself & challenge friends for only $.99!
  • Search2Play - Control your music with your device's buttons!
  • Task'd - A beautiful to-do list app!

Phones:
Android Dev Phone 1 - Dec. '08
Rogers HTC Dream - Sept. '09
AT&T Nexus One - March '10
Motorola Droid - Apr. '10
HTC Evo - Jun. '10
HTC Evo 3D - Jun. '11
Sprint Galaxy Nexus - May '12
 
hahabear
Old
#9  
Junior Member
Thanks Meter 0
Posts: 5
Join Date: Apr 2010
My phone is Nexus one.
My rom is Official v2.1-updated1.

When I execute the command as your indication.
"adb shell rm /system/usr/keylayout/mahimahi-keypad.kl"
rm failed for /system/usr/keylayout/mahimahi-keypad.kl, No such file or directory

What's wrong? And thank you for your quick reply.
 
Geniusdog254
Old
#10  
Geniusdog254's Avatar
Retired Recognized Developer - OP
Thanks Meter 166
Posts: 1,094
Join Date: Jan 2009
Location: St. Louis

 
DONATE TO ME
Quote:
Originally Posted by hahabear View Post
My phone is Nexus one.
My rom is Official v2.1-updated1.

When I execute the command as your indication.
"adb shell rm /system/usr/keylayout/mahimahi-keypad.kl"
rm failed for /system/usr/keylayout/mahimahi-keypad.kl, No such file or directory

What's wrong? And thank you for your quick reply.
Ok excellent that answers the second part of my question its failing to copy the file back over after deleting the original on certain ROMs.

You can just skip that step and go on to the "adb push" step. Also, can you run the command "adb shell cp" and tell me the output?
Follow me on Twitter @Geniusdog254

If you like my work, please buy one of my apps on the Market or donate!
  • Reflex-A-Tron - A colorful, addicting, & fun game to test yourself & challenge friends for only $.99!
  • Search2Play - Control your music with your device's buttons!
  • Task'd - A beautiful to-do list app!

Phones:
Android Dev Phone 1 - Dec. '08
Rogers HTC Dream - Sept. '09
AT&T Nexus One - March '10
Motorola Droid - Apr. '10
HTC Evo - Jun. '10
HTC Evo 3D - Jun. '11
Sprint Galaxy Nexus - May '12

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


TRENDING IN THEMER...