[Mod] Long press volume buttons to skip songs.
Attached is a mod I've spent the last week and a half working on for my friend and I. We were working out and found it a hassle to have to bring out our phones from our pocket in order to seek past tracks. This mod allows you to now seek from your pocket easily.
Those of you who've used CM6/7 are probably aware of a feature they have where you can seek music tracks with the screen off using the volume up (forward track) / volume down (previous track) buttons.
Essentially, I've ported this feature onto the Samsung Framework. Since the Samsung Framework is closed source, I had to reverse engineer a lot of their functions in the Android.Policy framework which took a while. Although the CM6/7 is open source, the code they provide is in Java which you can't really inline with dalvik assembler code so converting their relevant functions into .smali compatible code took more time.
Because of this, I'm only releasing this for Leomar75
(v. 2.6 XXKH3
) Rom since it's the Rom I've settled on. I have not tested it on other roms, it may or may not work with others, I make no guarantees.
However, I'm ~80% sure it will work with other KH3 based Samsung Firmwares. I don't have time, or the will, to port it to other roms so please don't ask.
Make a Nandroid backup using Clockwork Recovery.
Wipe your Cache & Dalvik Cache.
Unzip the file.
ADB push the file to your phone:
adb push android.policy.jar /system/framework/
Make sure permissions are correct:
busybox chmod -R 644 /system/framework/android.policy.jar
When the screen is off, and music is playing, holding the volume up button
for ~1 second will seek forward
Holding the volume down button
for ~1 second will seek back
When you do either actions, the screen will not
wake (battery life is conserved).
If the screen is ON, and
music is playing, it will not
seek forward/back if you hold the buttons.
My friend told me this breaks JKAY AOSP Lockscreen mods
. I don't use JKAY mods so that bug probably won't be fixed.
I don't want any donations, plz don't ask.
If you want to disassemble this using baksmali to try to see what I've changed, that's fine by me. I don't really care tbh.
If you have honest questions I will answer but if it's answerable with a Google search, I probably will not bother.
Jon Boekenoogen (metalhead8816): First guy to submit the 'Long press volume buttons to skip songs' concept for CM6.
Thanks for this simple, but great feature.
Obviously the CM6/7 team: I disassembled & used your code
Leomar75: I use your rom
JesusFreak: You made an awesome tool for disassembling and assembling .dex