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

Search This thread

Geniusdog254

Retired Recognized Developer
Jan 2, 2009
1,110
169
St. Louis
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:
img.php


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
 
Last edited:

Geniusdog254

Retired Recognized Developer
Jan 2, 2009
1,110
169
St. Louis
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
 
Last edited:

Geniusdog254

Retired Recognized Developer
Jan 2, 2009
1,110
169
St. Louis
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.
 
Last edited:

bayoffire

New member
Apr 18, 2010
1
0
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

Retired Recognized Developer
Jan 2, 2009
1,110
169
St. Louis
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
 

hahabear

Member
Apr 19, 2010
5
0
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. :confused:

How could I fix it? Thanks.

My Rom is 2.1-update1 rooted.
 

Geniusdog254

Retired Recognized Developer
Jan 2, 2009
1,110
169
St. Louis
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. :confused:

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.
 

Attachments

  • mahimahi-keypad-orig.txt
    1.7 KB · Views: 30

hahabear

Member
Apr 19, 2010
5
0
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

Retired Recognized Developer
Jan 2, 2009
1,110
169
St. Louis
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?
 

hahabear

Member
Apr 19, 2010
5
0
bingo! Thanks for your help. It's resolved. :D

On the other hand, I could get the mod.kl from SD Card, push again, Search2play will work, is that right?:p
 

Geniusdog254

Retired Recognized Developer
Jan 2, 2009
1,110
169
St. Louis
C:\N1root>adb shell cp
cp: not found

My god!!! It means there is not cp command in my phone?

Yeah exactly lol. Not sure if that was sarcasm or what, but thats what is causing the FC's and the failures some people are getting. And theres not a damn thing I can do about it.

I would recommend installing the CyanogenMod ROM, since it is fast, adds extra features, and supports cp :rolleyes: Then the app will work just fine :)
 

hahabear

Member
Apr 19, 2010
5
0
Anyway. Thanks for your help. You are so kind. I will try new ROM later. And I will support your work. cu.
 

Geniusdog254

Retired Recognized Developer
Jan 2, 2009
1,110
169
St. Louis
Any updates on newer phones?

I can make it work for any phone without a NAND lock. Any requests?

I need to do the Galaxy S series, but the only one I can test is the Epic and I'm not sure if the others have different mount tables or not. Desire still has NAND lock so I can't do it. Not sure about Droid2/X. Just email/Twitter/PM me or post here with a request. I'll get back to you.