Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,728,909 Members 50,057 Now Online
XDA Developers Android and Mobile Development Forum

[MOD] Xperia Clock limit

Tip us?
 
takagen
Old
(Last edited by takagen; 22nd June 2014 at 12:41 PM.)
#1  
Member - OP
Thanks Meter 31
Posts: 92
Join Date: Feb 2012
Default [MOD] Xperia Clock limit

Edit :
Props to @Jackos, here's the flashable patched SemcClock.apk with max of 96 clock alarm.

Cheers

==========================================

Hi guys,

Need a little help here.
I'm trying to remove the 20 Max limit of adding clock alarm in SemcClock.apk.

I thought i found the limit here MAX_ALARM_COUNT:I = 0x14
in this file SemcClock\smali\com\sonyericsson\alarm\AlarmListFr agment.smali

But changing it doesn't seem to work.

Any ideas ?
 
funky0308
Old
#2  
funky0308's Avatar
Recognized Themer
Thanks Meter 4924
Posts: 6,102
Join Date: Aug 2012
Location: Osijek

 
DONATE TO ME
Quote:
Originally Posted by takagen View Post
Hi guys,

Need a little help here.
I'm trying to remove the 20 Max limit of adding clock alarm in SemcClock.apk.

I thought i found the limit here MAX_ALARM_COUNT:I = 0x14
in this file SemcClock\smali\com\sonyericsson\alarm\AlarmListFr agment.smali

But changing it doesn't seem to work.

Any ideas ?
Never had a need for something like that.
Why don't you just use calendar or scheduler for something like that?

BTW - this section is for apps and themes, not help thread.
Naming of thread is also wrong - it's not MOD, it's REQ or HELP thread.

Try to rename it and tag @Serarj and @niaboc79 - if anyone knows, they know...

Sent from my D6503 using Tapatalk
The Following 3 Users Say Thank You to funky0308 For This Useful Post: [ Click to Expand ]
 
takagen
Old
#3  
Member - OP
Thanks Meter 31
Posts: 92
Join Date: Feb 2012
Thanks for the advise.

If @niaboc79 or @serajr can helped, that would be awesome
 
Jackos
Old
#4  
Jackos's Avatar
Recognized Developer
Thanks Meter 445
Posts: 3,460
Join Date: Feb 2008
Location: Wrocław/Breslau
Please find attached the patched SemcClock .402. It allows to create up to 50 alarm clocks.


I also included two images of my Virtuous Ten Studio, showing what values need to be patched for the fix to work if you want to do it yourself.


Keep pwning!
Attached Thumbnails
Click image for larger version

Name:	1.jpg
Views:	263
Size:	363.4 KB
ID:	2811492   Click image for larger version

Name:	2.jpg
Views:	190
Size:	374.5 KB
ID:	2811493  
Attached Files
File Type: apk SemcClock.apk - [Click for QR Code] (4.46 MB, 14 views)
Read my reviews and editorials at ION!
"From my experience - it looks like the most popular ROMs have the worst memory management " - ultrashot

Primary: Sony Xperia Z2 D6503

Sold: Samsung Galaxy S III I9300, HTC Sensation Z710e, HTC Touch Pro2 T7373 (Sold to Skrobel)

Haswell RIG: MSI Z87 MPOWER; Intel Core i7-4770K; Corsair Vengeance Pro 2133Mhz CL11 16GB; 2x EVGA GeForce GTX 760 SC ACX w/ backplate SLI; Intel SSD 530 180GB; 2x WDC Black 3TB RAID0; 3x WDC Black 1TB RAID5; CHIEFTEC BPS-750C2; Fractal Design Define R3 w/ USB3; Logitech Performance Mouse MX + Wireless Illuminated Keyboard K800; Samsung PX2370; Windows 8.1 RTM Genuine

The Following User Says Thank You to Jackos For This Useful Post: [ Click to Expand ]
 
Jackos
Old
#5  
Jackos's Avatar
Recognized Developer
Thanks Meter 445
Posts: 3,460
Join Date: Feb 2008
Location: Wrocław/Breslau
BTW I usually recompile the smali code to java, so I get a better view what's going on. As you may see the toast alarm limit is hardcoded.
Attached Thumbnails
Click image for larger version

Name:	java.jpg
Views:	166
Size:	383.4 KB
ID:	2811503  
Read my reviews and editorials at ION!
"From my experience - it looks like the most popular ROMs have the worst memory management " - ultrashot

Primary: Sony Xperia Z2 D6503

Sold: Samsung Galaxy S III I9300, HTC Sensation Z710e, HTC Touch Pro2 T7373 (Sold to Skrobel)

Haswell RIG: MSI Z87 MPOWER; Intel Core i7-4770K; Corsair Vengeance Pro 2133Mhz CL11 16GB; 2x EVGA GeForce GTX 760 SC ACX w/ backplate SLI; Intel SSD 530 180GB; 2x WDC Black 3TB RAID0; 3x WDC Black 1TB RAID5; CHIEFTEC BPS-750C2; Fractal Design Define R3 w/ USB3; Logitech Performance Mouse MX + Wireless Illuminated Keyboard K800; Samsung PX2370; Windows 8.1 RTM Genuine

The Following User Says Thank You to Jackos For This Useful Post: [ Click to Expand ]
 
takagen
Old
#6  
Member - OP
Thanks Meter 31
Posts: 92
Join Date: Feb 2012
Thanks alot.

It works, to sum up it's basically editing 2 places in file
SemcClock\smali\com\sonyericsson\alarm\AlarmListFr agment.smali

Code:
.field static final MAX_ALARM_COUNT:I = 0x14
Code:
.method public onOptionsItemSelected(Landroid/view/MenuItem;)Z
    .locals 10
    .param p1, "item"    # Landroid/view/MenuItem;

    .prologue
    const/16 v9, 0x14
Update "x14" to the number of clock you need.

Cheers
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes