Learn How to Create an Old School Dialer

XDA is not only a great source for custom ROMs, kernels, and various modifications for numerous … more

USB Desktop Charger Roundup – XDA TV

Sometimes you learn one way to do something, and that’s the way you do it forever. You never … more

Samsung Galaxy Grand Duos Receives Early CM12 Port

Samsung Galaxy Grand is a dual-SIM phone with a 5 screen that was announced two years ago. … more

Google Adds New Features to Drive, Sheets, Slides and Docs

In the last few months, Google has been working very hard to adapt all its apps to … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP shaftenberg

28th November 2013, 02:48 AM   |  #1  
shaftenberg's Avatar
OP Senior Member
Flag Cologne
Thanks Meter: 707
 
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, 67 views)
The Following 7 Users Say Thank You to shaftenberg For This Useful Post: [ View ]
3rd December 2013, 10:40 PM   |  #2  
Member
Thanks Meter: 8
 
30 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 10:44 PM. Reason: clarification
3rd December 2013, 11:07 PM   |  #3  
shaftenberg's Avatar
OP Senior Member
Flag Cologne
Thanks Meter: 707
 
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, 04:18 PM   |  #4  
S0bes's Avatar
Senior Member
Flag Tomsk
Thanks Meter: 421
 
420 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, 07:12 PM   |  #5  
shaftenberg's Avatar
OP Senior Member
Flag Cologne
Thanks Meter: 707
 
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, 25 views)
The Following 3 Users Say Thank You to shaftenberg For This Useful Post: [ View ]
11th December 2013, 10:42 AM   |  #6  
Kameo's Avatar
Senior Member
Thanks Meter: 569
 
840 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, 11:20 PM   |  #7  
Member
Flag Anápolis
Thanks Meter: 59
 
52 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, 5 views)
23rd February 2014, 03:27 PM   |  #8  
Senior Member
Flag Syria
Thanks Meter: 7
 
114 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, 07:21 PM   |  #9  
Senior Member
Flag Salerno
Thanks Meter: 27
 
122 posts
Join Date:Joined: Jul 2013
More
Sorry for my n00b post, but what you mean with: Deodexed?
6th May 2014, 07:30 PM   |  #10  
padhu1989's Avatar
Senior Member
Flag Chennai
Thanks Meter: 160
 
602 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