Updated Android Lollipop Preview Images – XDA TV

The Android Lollipop Preview Images are now available! That and much more news is … more

Get a Complete Set of Logs with Andy Log

The importance of proper logging is undeniable. No, we’re not talking about lumberjack work. … more

Try Some Android Lollipop Applications on Your Device

Android 5.0 Lollipop has been officially announced and lucky users of Google Nexus 5 … more

AutoCon Manages Your Connections to Perserve Battery Life

As we’ve talked about in the past, battery life is still somewhat of a sore … more
Post Reply

[MOD] Skip music tracks with Volume buttons (deodexed only)

OP shaftenberg

28th November 2013, 01:48 AM   |  #1  
shaftenberg's Avatar
OP Senior Member
Flag Cologne
Thanks Meter: 697
 
648 posts
Join Date:Joined: Jul 2010
Hi there,

here is the mod for skipping music tracks when long-pressing the volume buttons. This is for stock ROM 14.71.8 DEODEXED ONLY!!
So, if you have an unlocked bootloader and have root access, you may apply my following mod. I'll guide you step through step as we got no CWM recovery yet, so you must do it manually.

- download android.policy.jar and move it to your internal SD card with an explorer or via adb:
Code:
adb push android.policy.jar /sdcard/
- after that type in the following commands, beware that su wants you to grant root access (SuperSU popup)
Code:
adb shell
su
stop
mount -o rw,remount /system/ /system/
cp /sdcard/android.policy.jar /system/framework/
mount -o ro,remount /system/ /system/
reboot
Done! Enjoy this mod

Reminder: Although this mod was tested on my device, I'll take no responsibility if you damage your system, so just do it if you know what you do!

If we have CWM, I will provide a flashable .zip then.
Attached Files
File Type: jar android.policy.jar - [Click for QR Code] (260.1 KB, 60 views)
The Following 7 Users Say Thank You to shaftenberg For This Useful Post: [ View ]
3rd December 2013, 09:40 PM   |  #2  
Junior Member
Thanks Meter: 8
 
27 posts
Join Date:Joined: Jul 2011
More
Modification?
Quote:
Originally Posted by shaftenberg

here is the mod for skipping music tracks when long-pressing the volume buttons

Thanks for this, something I miss from my old Sony Ericsson are the physical music player buttons.

I was wondering if you could point me in the right direction of modifying this to make a small alteration; instead of vol-down skipping backward a track I'd like it to have the Play/Pause functionality. That is a button press that I'd use much more often!

Another (perhaps more complicated) solution is to have a double-tap of the power button do this Play/Pause, with double taps of the volume buttons providing the skip tracks effect.
Last edited by Silently; 3rd December 2013 at 09:44 PM. Reason: clarification
3rd December 2013, 10:07 PM   |  #3  
shaftenberg's Avatar
OP Senior Member
Flag Cologne
Thanks Meter: 697
 
648 posts
Join Date:Joined: Jul 2010
Quote:
Originally Posted by Silently

I was wondering if you could point me in the right direction of modifying this to make a small alteration; instead of vol-down skipping backward a track I'd like it to have the Play/Pause functionality. That is a button press that I'd use much more often!

Change the keycode in line 48 in com\android\internal\policy\impl\PhoneWindowManage r$VolumeLongPressR.smali from 58 to 55 and you are done.

Unfortunately this mod doesn't support double taps and I don't know how to integrate this easily
5th December 2013, 03:18 PM   |  #4  
S0bes's Avatar
Senior Member
Flag Tomsk
Thanks Meter: 326
 
315 posts
Join Date:Joined: Jan 2012
Donate to Me
More
shaftenberg, could you please give a sources? Or just a list of .smalli files that you changed?
5th December 2013, 06:12 PM   |  #5  
shaftenberg's Avatar
OP Senior Member
Flag Cologne
Thanks Meter: 697
 
648 posts
Join Date:Joined: Jul 2010
Sure.

You have to add 2 files in com\android\internal\policy\impl and have to edit PhoneWindowManager.smali.

Note, there are two/three different mods around here at XDA. I used all of them and I found out that the one with "lyapota" (you will see in the sources) works most reliable, whereas the other one (I used it in the Nexus 5 mod) works too but is a little bit less responsive and doesn't work with all media players.

The hardest part is to find the right variables, if you want to use this mod in other phones. The first time I did this, I used this thread as a good start but you can't simply copy as this won't work then

Attached are my modded .smali, the 2 ones you have to add and a .txt with the diff's to the original MotoG-smali.
Attached Files
File Type: zip smali-motog.zip - [Click for QR Code] (65.0 KB, 21 views)
The Following 3 Users Say Thank You to shaftenberg For This Useful Post: [ View ]
11th December 2013, 09:42 AM   |  #6  
Kameo's Avatar
Senior Member
Thanks Meter: 555
 
836 posts
Join Date:Joined: Jul 2010
Donate to Me
More
Nice trick mate, can't wait to see this in a custom rom.
22nd February 2014, 10:20 PM   |  #7  
Junior Member
Thanks Meter: 7
 
8 posts
Join Date:Joined: Mar 2013
Skip music tracks with Volume buttons 4.4.2
shaftenberg I'm with rom kitkat 4.4.2 and would like function if do not ask for much could do this mod for it
I'm with the rom Blur_Version.171.44.31.falcon_umtsds.Brasil.en.BR
I'll leave the files from my rom
sorry for bad english I'm Brazilian
and greatly appreciate all of you who make mods
I thank
Attached Files
File Type: zip android.policy.zip - [Click for QR Code] (228.1 KB, 4 views)
23rd February 2014, 02:27 PM   |  #8  
Senior Member
Flag Syria
Thanks Meter: 6
 
110 posts
Join Date:Joined: May 2011
More
Thank you dear
i think i did the same thing but with Xposed and gravity bot in media option
it works only when the screen is off

Thank you again
6th May 2014, 06:21 PM   |  #9  
Senior Member
Flag Salerno
Thanks Meter: 26
 
119 posts
Join Date:Joined: Jul 2013
More
Sorry for my n00b post, but what you mean with: Deodexed?
6th May 2014, 06:30 PM   |  #10  
padhu1989's Avatar
Senior Member
Flag Chennai
Thanks Meter: 76
 
363 posts
Join Date:Joined: Jun 2012
More
Quote:
Originally Posted by DragonautMk

Sorry for my n00b post, but what you mean with: Deodexed?

Google it..

Sent from my XT1032 using XDA Premium 4 mobile app

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Moto G Themes and Apps by ThreadRank