[MOD][HOWTO] Disabling Autorotation in Call and Alarm Clock - Galaxy S II Original Android Development

Hi
After study Phone.apk and ClockPackage.apk I've found how to disable properly the autorotation:
Disable autorotation in Phone.apk (only in callscreen)
Decompile Phone.apk
Locate com/android/phone/InCallScreen.smali
Locate method onConfigurationChanged
Search:
Code:
invoke-super {p0, p1}, Landroid/app/Activity;->onConfigurationChanged(Landroid/content/res/Configuration;)V
.line 6650
iget v0, p0, Lcom/android/phone/InCallScreen;->mOrientation:I
iget v1, p1, Landroid/content/res/Configuration;->orientation:I
if-ne v0, v1, [B][SIZE="4"]:cond_2[/SIZE][/B]
Replace by:
Code:
invoke-super {p0, p1}, Landroid/app/Activity;->onConfigurationChanged(Landroid/content/res/Configuration;)V
# .line 6650
# iget v0, p0, Lcom/android/phone/InCallScreen;->mOrientation:I
# iget v1, p1, Landroid/content/res/Configuration;->orientation:I
# if-ne v0, v1, [B][SIZE="4"]:cond_2[/SIZE][/B]
const/4 v0, 0x1
invoke-virtual {p0, v0}, Lcom/android/phone/InCallScreen;->setRequestedOrientation(I)V
goto [B][SIZE="4"]:cond_2[/SIZE][/B]
Noticie :cond_2 . You have to use same condition number, maybe when you decompile then you will get another number, in last baksmali I get another number
Compile new Phone.apk and zipalign
Replace classes.dex from new Phone.apk to original Phone.apk and replace it in your phone
You can install manually using adb in recovery mode
Extract Phone.apk from zip file and follow next steps in a command shell
Code:
adb root
adb push Phone.apk /system/app/Phone.apk
adb shell mount -o rw -t ext4 /dev/block/mmcblk0p10 /data
adb shell rm -f /data/dalvik-cache/*phone*
adb shell rm -f /data/dalvik-cache/*Phone*
adb shell sync
Now Autorotation is disabled in call screen
Modified Phone.apk ONLY FOR LITENING 6.1 (CMW)
http://www.mediafire.com/?wvhxynux1v3e83u
Disable autorotation in ClockPackage.apk (only when alarm is running)
Decompile ClockPackage.apk
Locate com/sec/android/app/clockpackage/alarm/AlarmAlert.smali
Locate method onConfigurationChanged
Search:
Code:
.end local v0 #config:Landroid/content/res/Configuration;
.end local v4 #r:Landroid/content/res/Resources;
:cond_1
iget-object v5, p0, Lcom/sec/android/app/clockpackage/alarm/AlarmAlert;->mItem:Lcom/sec/android/app/clockpackage/alarm/AlarmItem;
iget v5, v5, Lcom/sec/android/app/clockpackage/alarm/AlarmItem;->activate:I
Replace by:
Code:
.end local v0 #config:Landroid/content/res/Configuration;
.end local v4 #r:Landroid/content/res/Resources;
:cond_1
const/4 v5, 0x1
invoke-virtual {p0, v5}, Lcom/sec/android/app/clockpackage/alarm/AlarmAlert;->setRequestedOrientation(I)V
iget-object v5, p0, Lcom/sec/android/app/clockpackage/alarm/AlarmAlert;->mItem:Lcom/sec/android/app/clockpackage/alarm/AlarmItem;
iget v5, v5, Lcom/sec/android/app/clockpackage/alarm/AlarmItem;->activate:I
Modified ClockPackage.apkONLY FOR LITENING 6.1 (CMW)
http://www.mediafire.com/?cj8k0ieck6sd3vv

hello,
installed by CMW, tested and ok for me.
Thanks for your good job

vadatte said:
hello,
installed by CMW, tested and ok for me.
Thanks for your good job
Click to expand...
Click to collapse
Thks for your report

rodries said:
Hi
Attached modified Phone.apk ONLY FOR LITENING 6.1 (CMW) Probably you will have to clean dalvik cache
Click to expand...
Click to collapse
Thank u very much !!! Workin well ! No dalvik cache cleenin!

It`s working only on Litening 6.1????

Is there solution for alarm clock ? I can't catch the arrow while its ringing
--------------------------------
Sent From ® Galaxy S II using Tapatalk

Остап said:
Is there solution for alarm clock ? I can't catch the arrow while its ringing
--------------------------------
Sent From ® Galaxy S II using Tapatalk
Click to expand...
Click to collapse
if you explain me the problem exactly i can try to fix it

078gregory said:
It`s working only on Litening 6.1????
Click to expand...
Click to collapse
Not sure but if you attach your phone.apk i can try to fix it for you

rodries said:
if you explain me the problem exactly i can try to fix it
Click to expand...
Click to collapse
A problem is the same. Autorotation while alarm is ringing.

rodries said:
Another Change:
- Adjust buttons properly if you receive the call in landscape mode
Click to expand...
Click to collapse
I see the some bug here. It's difficult to explain and very difficult to get screenshot because it occurs not every time ...
I'll try. Sometimes at the end of conversation or at time of it but while putting down the telephone and landscaping him ( when proximity sensor do not sense an ear ) all buttons shrinking. It's looking ugly. You need to try some playing with it and you'll see
I hope it helps to understand what i meen ....

Остап said:
I see the some bug here. It's difficult to explain and very difficult to get screenshot because it occurs not every time ...
I'll try. Sometimes at the end of conversation or at time of it but while putting down the telephone and landscaping him ( when proximity sensor do not sense an ear ) all buttons shrinking. It's looking ugly. You need to try some playing with it and you'll see
I hope it helps to understand what i meen ....
Click to expand...
Click to collapse
Uhmm, I can't reproduce, but I know what you mean.
I'm going to do a little change for testing.

rodries said:
Uhmm, I can't reproduce, but I know what you mean.
I'm going to do a little change for testing.
Click to expand...
Click to collapse
Yeah. Good if you are understanding
It's like 5-6 buttons in the row from gorizontal ( landscape ) position suddenly place themselves on vertical position. And the ugly effect of it - that the buttons appear to be very thin

Остап said:
A problem is the same. Autorotation while alarm is ringing.
Click to expand...
Click to collapse
Ok test this CMW zip file (ony for Litening 6.1) (Always make a backup before test)
http://www.mediafire.com/?cj8k0ieck6sd3vv
If works feel free to redistribute

Остап said:
Yeah. Good if you are understanding
It's like 5-6 buttons in the row from gorizontal ( landscape ) position suddenly place themselves on vertical position. And the ugly effect of it - that the buttons appear to be very thin
Click to expand...
Click to collapse
Try this new mod & comment
http://www.mediafire.com/?wvhxynux1v3e83u

Thanks for quick reply !!! Downloaded ( BOTH )and i'll test it and report !

rodries said:
Ok test this CMW zip file (ony for Litening 6.1) (Always make a backup before test)
http://www.mediafire.com/?cj8k0ieck6sd3vv
If works feel free to redistribute
Click to expand...
Click to collapse
Works perfect !!! Thank u very much !

Остап said:
Works perfect !!! Thank u very much !
Click to expand...
Click to collapse
OK
Waiting your report about buttons problem in call screen, if you think is working fine I'll update main post with the changes

rodries said:
OK
Waiting your report about buttons problem in call screen, if you think is working fine I'll update main post with the changes
Click to expand...
Click to collapse
I've a 3 only conversations today and haven't seen any issues about shrinking buttons. I hope it solved. I'll continue to supervise this. I suppose you can update your code.
And if it possible to release code of ClockPackage.apk at the first post
And if you want to change the name of this thread a little bit for easyest searching.
You are great ! Thanks !

Остап said:
I've a 3 only conversations today and haven't seen any issues about shrinking buttons. I hope it solved. I'll continue to supervise this. I suppose you can update your code.
And if it possible to release code of ClockPackage.apk at the first post
And if you want to change the name of this thread a little bit for easyest searching.
You are great ! Thanks !
Click to expand...
Click to collapse
Thks for report
Ok, I'll try to update the first post, my problem is that my english is not very good
Another problem is that I don't remember the ClockPackage changes p but I'll do a diff
Can you recommend me a thread name?

rodries said:
Thks for report
Ok, I'll try to update the first post, my problem is that my english is not very good
Another problem is that I don't remember the ClockPackage changes p but I'll do a diff
Can you recommend me a thread name?
Click to expand...
Click to collapse
You are coder, no ? ALWAYS wrap your code with comment !
Code:
# Begin Rodries No Rotation
....
# End Rodries No Rotation
It's simple to find the changes after )))
My english is the same
"[MOD][HOWTO] Disabling Autorotation in Call and Alarm Clock"

Related

[MOD] Remove "Your phone will shut down" prompt

Okay, here is how to remove the annoying "confirm shutdown message".
I did this with KH4, but should work with most roms.
ALWAYS MAKE A BACKUP BEFORE MODIFYING YOUR ROM...JUST IN CASE THINGS GO TERRIBLY WRONG.
1 - Decompile framework.jar
2 - Open /com/android/internal/app/ShutdownThread.smali
3 - In .method public static shutdown(Landroid/content/Context;Z)V
look for the following:
.line 159
const-string v2, "ShutdownThread"
const-string v2, "Notifying thread to start radio shutdown"
invoke-static {v4, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/StringI
.line 161
if-eqz p1, :cond_2
4 - at about .line 161, comment out: if-eqz p1, :cond_2 as follows
# if-eqz p1, :cond_2 (make sure # is at beginning of line)
5 - then add the following after the above commented line:
goto :cond_2
the 2 lines should look like this:
# if-eqz p1, :cond_2
goto :cond_2
6 - recompile framework.jar
7 - use adb to push it to your sdcard
8 - then do the following:
adb shell
cd /sdcard/
stop
cp framework.jar /system/framework/
reboot
That's it - no more shutdown prompt!
amazing find
Thanks a lot
Sent from my GT-I9100 using xda premium
Good find but alternatively why not just download http://www.appbrain.com/app/quick-boot-(reboot)/com.siriusapplications.quickboot
i cant remember the last time i DIDN'T use this app to shut down or reboot my phone.
jonny68 said:
Good find but alternatively why not just download http://www.appbrain.com/app/quick-boot-(reboot)/com.siriusapplications.quickboot
i cant remember the last time i DIDN'T use this app to shut down or reboot my phone.
Click to expand...
Click to collapse
I prefer use the power menu for this and i will be pleased to skip the confirmation step
sicopat said:
I prefer use the power menu for this and i will be pleased to skip the confirmation step
Click to expand...
Click to collapse
i don't think it really matters to be honest, it shuts down quicker actually using the app i posted but each to their own
I prefer clean shutdowns to ensure all buffers are flushed and processes are cleanly stopped. I doubt you will have any problems with a quick shutdown but you never know - could end up with some data loss. I even shutdown my Ubuntu pc cleanly to ensure no problems.
Sent from my GT-I9100 Photon-based, Laser-accelerated 24-core I128 CPU
gcrutchr said:
I prefer clean shutdowns to ensure all buffers are flushed and processes are cleanly stopped. I doubt you will have any problems with a quick shutdown but you never know - could end up with some data loss. I even shutdown my Ubuntu pc cleanly to ensure no problems.
Sent from my GT-I9100 Photon-based, Laser-accelerated 24-core I128 CPU
Click to expand...
Click to collapse
I've been using that app now for a long time and have never once had any problems
sicopat said:
I prefer use the power menu for this and i will be pleased to skip the confirmation step
Click to expand...
Click to collapse
I agree 100%. This works exactly as I wanted.
gcrutchr said:
I prefer clean shutdowns to ensure all buffers are flushed and processes are cleanly stopped. I doubt you will have any problems with a quick shutdown but you never know - could end up with some data loss. I even shutdown my Ubuntu pc cleanly to ensure no problems.
Click to expand...
Click to collapse
Thank you for sharing this.
mostyle said:
I agree 100%. This works exactly as I wanted.
Thank you for sharing this.
Click to expand...
Click to collapse
You're welcome!
Thanks mate
Cool find. Thanks
s7
Does this mod work on an Nougat s7? If so, how do I decompile then recompile the .jar file?
tech927 said:
Does this mod work on an Nougat s7? If so, how do I decompile then recompile the .jar file?
Click to expand...
Click to collapse
I think probably not. This thread was written in 2011 and android Gingerbread is the latest android version then. Gingerbread is still known for the easiest android version to mod. Now, android nougat and oreo are taking place but they're damn hard to make any modification BUT you can try to decompile with apktool and see if it works

[Dev]Enabling CRT-off Animation on Neo Stock ICS roms

We all know that there is no CRT-off mod for the Neo /V. This is because only changing the value of config_animateScreenLights from true to false in framework-res.apk is not working anymore!
The problem is that are some missing commands in the /system/framework/services.jar
After comparing files from GB and ICS, i might have come up with a Method.
This will require some devs to continue on my work, as i don't have the proper tools to work on.
Hands-on:
This is what have to be done:
First of all decompile classes of services.jar (I won't provide any information to this, there are many tutorials out there how to use the smali tools!)
Then in com/android/server/PowerManagerService.smali we have to make the method nativeStartSurfaceFlingerAnimation(I)V callable from inner classes. To do that, we have to add the following after the last access$XXXX method:
Code:
.method static synthetic access$9000(Lcom/android/server/PowerManagerService;I)V
.registers 2
.parameter "x0"
.parameter "x1"
.prologue
.line 110
invoke-direct {p0, p1}, Lcom/android/server/PowerManagerService;->nativeStartSurfaceFlingerAnimation(I)V
return-void
.end method
Than we have to add some commands to the file com/android/server/PowerManagerService$BrightnessState.smali to trigger the CRT-off-effect. For that add the red part between :cond_38 and iget-object v4, p0, Lcom/a.... like this (its around line 400 in code):
Code:
.line 2679
.restart local v3 #turningOff:Z
:cond_38
[COLOR="red"]iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
const/16 v3, 0x11 # CRT-On and CRT-Off
#calls: Lcom/android/server/PowerManagerService;->nativeStartSurfaceFlingerAnimation(I)
invoke-static {v4, v3}, Lcom/android/server/PowerManagerService;->access$9000(Lcom/android/server/PowerManagerService;I)V[/COLOR]
iget-object v4, p0, Lcom/android/server/PowerManagerService$BrightnessState;->this$0:Lcom/android/server/PowerManagerService;
#getter for: Lcom/android/server/PowerManagerService;->mScreenBrightness:Lcom/android/server/PowerManagerService$BrightnessState;
invoke-static {v4}, Lcom/android/server/PowerManagerService;->access$6000(Lcom/android/server/PowerManagerService;)Lcom/android/server/PowerManagerService$BrightnessState;
move-result-object v4
Lastly, recompile the file, put it on your phone CRT-off effect will be magically displayed.
Lastly, i really seek the devs help to work on this and bring success to this work
Wow that will be great when we have this on ICS
Write in my mobile
TheF3nix said:
Lastly, recompile the file, put it on your phone CRT-off effect will be magically displayed.
Click to expand...
Click to collapse
what do u mean by magically displayed? u made it to work or its still a work in progress?
jjdoctor said:
what do u mean by magically displayed? u made it to work or its still a work in progress?
Click to expand...
Click to collapse
Work in Progress? Just follow my steps. I haven't try it out yet. Not sure whether it will work
Sent from my MT11i using Tapatalk 2
TheF3nix said:
Work in Progress? Just follow my steps. I haven't try it out yet. Not sure whether it will work
Sent from my MT11i using Tapatalk 2
Click to expand...
Click to collapse
we need modified surfaceflinger.so and sufaceflingerclient.so to get it to work...
jjdoctor said:
we need modified surfaceflinger.so and sufaceflingerclient.so to get it to work...
Click to expand...
Click to collapse
Is anyone working on this anymore?
This would be a great mod to have again
Really waiting to have that on my Ray... CM Based ROM have this effect... So nice.... As I decompile CM ROM, animatescreenlights is set to TRUE. What I saw new is the config_screenOffAnimations, that line on bool.xml and not present on Stock ROMS I think (some?).
What if you compare the surfaceflinger and surfaceflingerclient from cm9 and stock roms, they can't be that different right?, maybe thats the way to go, to get this to work.
The latest cm 9.1 stable has CRT enabled....
Surely someone can now port this to stock ICS!!!!!!!!!!!!!!!!!

[HOW TO] [4.1.2] [LS8] Proper disable HOME BUTTON LAG (Apex support)(improved)

Hello xda'ers,
someone reading the title may say: but we still have no home button lag!
You could link me Oliwe's mod but this is a different thing.
His fix or mod consist to disable mHomeKeyDoubleClickConcept launching directly launchHomeFromHotKey()V method.
Nothing bad until you hate to have double click feature to launch vlingo (or voice commands).
If you want NO LAG and keep the double click feature?
Now there s a real fix to the home button lag, no workaround, no disabling samsung features! :victory:
We need to place a single line into a .smali file inside our android.policy.jar called PhoneWindowManager.smali.
This mod it s really simple to do, there s no :cond_xx to replace, add or remove.
Simply add green part
JELLY BEAN LS8
Code:
.line 3267
.end local v38 #statusbar:Lcom/android/internal/statusbar/IStatusBarService;
:cond_304
:goto_304
const/16 v46, 0x0
move/from16 v0, v46
move-object/from16 v1, p0
iput-boolean v0, v1, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomePressed:Z
[COLOR="DarkGreen"]invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->launchHomeFromHotKey()V[/COLOR]
Now we launch home before double click is recognized, but.. we re doing this twice, so we need to delete the second launch.
In fact if we take a look at PhoneWindowManager$HomeKeyDoubleClickConcept.smali we can see, at the end of singleClickJob()V method (red lines)
Code:
[COLOR="Red"]if-eqz v7, :cond_93[/COLOR]
const-string v7, "HomeKeyDoubleClick"
const-string v8, " in singleClickJob(), mSentHomeDownToApp is false. Now call launchHomeFromHotKey()"
invoke-static {v7, v8}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 8201
[COLOR="Red"] :cond_93
iget-object v7, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$HomeKeyDoubleClickConcept;->this$0:Lcom/android/internal/policy/impl/PhoneWindowManager;
invoke-virtual {v7}, Lcom/android/internal/policy/impl/PhoneWindowManager;->launchHomeFromHotKey()V
[/COLOR] goto :goto_48
.line 8203
:cond_99
iget-boolean v7, p0, Lcom/android/internal/policy/impl/PhoneWindowManager$HomeKeyDoubleClickConcept;->DEBUG:Z
if-eqz v7, :cond_48
const-string v7, "HomeKeyDoubleClick"
const-string v8, " in singleClickJob(), mSentHomeDownToApp is true. now set mSentHomeDownToApp to false and do nothing."
invoke-static {v7, v8}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
goto :goto_48
.end method
that we re launching again "launchhomefromhotkey" method, so we need to delete the red lines.
This will fix home button lag, won t let u return on default homescreen (but u will get the homescreen u were before) and no more problem with apex or other non touchwiz launchers.
it s so easy that maybe samsung someday will implement it this way lol
that s all.
Easy to do
recompile and enjoy your no lag home button with double click feature.
need a zip? Send me your android.policy.jar or request this mod to your rom maker.
ICS
Search: .line 2232, you will get:
Code:
.line 2232
:cond_207
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomePressed:Z
move/from16 v39, v0
if-eqz v39, :cond_2b3
if-nez v8, :cond_2b3
.line 2233
const/16 v39, 0x0
move/from16 v0, v39
move-object/from16 v1, p0
iput-boolean v0, v1, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomePressed:Z
at the end of this code add:
Code:
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->launchHomeFromHotKey()V
So it will looks like this:
Code:
.line 2232
:cond_207
move-object/from16 v0, p0
iget-boolean v0, v0, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomePressed:Z
move/from16 v39, v0
if-eqz v39, :cond_2b3
if-nez v8, :cond_2b3
.line 2233
const/16 v39, 0x0
move/from16 v0, v39
move-object/from16 v1, p0
iput-boolean v0, v1, Lcom/android/internal/policy/impl/PhoneWindowManager;->mHomePressed:Z
invoke-virtual/range {p0 .. p0}, Lcom/android/internal/policy/impl/PhoneWindowManager;->launchHomeFromHotKey()V
that s all.
Easy to do
recompile and enjoy your no lag homebutton with double click feature.
Awesome
Sent from my S II ( "Jelly Bean'd Monster" )
As always, great job Mirko :good:
Hi, This method is successful for Lockscreen Home button lag on Stock rom 4,04 ?
Nasty_z said:
Awesome
Sent from my S II ( "Jelly Bean'd Monster" )
Click to expand...
Click to collapse
Thanks
salesale said:
As always, great job Mirko :good:
Click to expand...
Click to collapse
thx mate, did u try?
pnhsp said:
Hi, This method is successful for Lockscreen Home button lag on Stock rom 4,04 ?
Click to expand...
Click to collapse
What u mean?
Inviato dal mio GT-I9100 con Tapatalk 2
Great job as always mirko. :good:
I was wondering if u could write a similar guide on creating expandable volume controls. Saw it in the github sometimes ago. I tried comparing files to no result.
kamdev said:
Great job as always mirko. :good:
I was wondering if u could write a similar guide on creating expandable volume controls. Saw it in the github sometimes ago. I tried comparing files to no result.
Click to expand...
Click to collapse
yup, it s pretty hard to compare expandable volume controls, there are lots of diffs.
I will look into a simpler way, and maybe posting the how to, but i l need time.
So.. This requires a deodexed ROM. huh?
Hi folks,
Can someone modify my android.policy.jar ? (attached file)
The home button lag makes me sick
I've tried but I was unable to find the required file to modify it.
Thanks in advance
KcLKcL said:
So.. This requires a deodexed ROM. huh?
Click to expand...
Click to collapse
sure
dany__ said:
Hi folks,
Can someone modify my android.policy.jar ? (attached file)
The home button lag makes me sick
I've tried but I was unable to find the required file to modify it.
Thanks in advance
Click to expand...
Click to collapse
thread is for devs or people who can use tools and for help
No requests please
tutorial updated to jelly bean leak LSJ
There is a built in setting in jb leak in the voice command app to disable the double home button press.
Sent from my GT-I9100 using Tapatalk 2
hikarugo said:
There is a built in setting in jb leak in the voice command app to disable the double home button press.
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
Hello hikarugo. I don t wanna disable voice command, i wanna disable the lag xD.
Have both, that s the mod
Hi Mirko, thanks for the guide, but there is a different behavior at least in MIUI ICS if I use your guide.
Lets assume there is 3 home screen pages and the second one is set to home screen. If I start an app from the first screen page and then pressing home button, it will go to the second page instead staying in the current page which is the first page.
The only thing to make stay on the current page is to remove the "PhoneWindowManager$HomeKeyDoubleClickConcept;->addAction(IIZ)V" like in the Oliwe guide.
If you have another workaround, I'll be appreciate it. Thanks.
mirko are you going to relase a new rom or what?
fusionjack said:
Hi Mirko, thanks for the guide, but there is a different behavior at least in MIUI ICS if I use your guide.
Lets assume there is 3 home screen pages and the second one is set to home screen. If I start an app from the first screen page and then pressing home button, it will go to the second page instead staying in the current page which is the first page.
The only thing to make stay on the current page is to remove the "PhoneWindowManager$HomeKeyDoubleClickConcept;->addAction(IIZ)V" like in the Oliwe guide.
If you have another workaround, I'll be appreciate it. Thanks.
Click to expand...
Click to collapse
yes buddy, same behaviour here too.
but i really prefer to back in my homescreen soon and preserve a samsung feature instead of disabling voice command (erasing that line u will erase the feature), and wouldn t be any reason to make a tutorial after Oliwe's one, right?
anyway, if u are on miui there s no reason to use this tutorial, since miui shouldn t have doubleclick feature, or am i missing something? (i m not a miui user )
reply back
malavan said:
mirko are you going to relase a new rom or what?
Click to expand...
Click to collapse
hello mal
sincerely i thought to make it with legendk95 as before, but in the last times we re going wrong.. so i don t know, probably yes.
Mirko ddd said:
yes buddy, same behaviour here too.
but i really prefer to back in my homescreen soon and preserve a samsung feature instead of disabling voice command (erasing that line u will erase the feature), and wouldn t be any reason to make a tutorial after Oliwe's one, right?
anyway, if u are on miui there s no reason to use this tutorial, since miui shouldn t have doubleclick feature, or am i missing something? (i m not a miui user )
reply back
Click to expand...
Click to collapse
LOL..sure.
MIUI basically is using manufacture ROM for each device, so I see similar code in MIUI and yes, it has also lag by pressing home button.
I never use voice command, therefore I don't know if MIUI for Galaxy S2 really supports this double-click feature.
fusionjack said:
LOL..sure.
MIUI basically is using manufacture ROM for each device, so I see similar code in MIUI and yes, it has also lag by pressing home button.
I never use voice command, therefore I don't know if MIUI for Galaxy S2 really supports this double-click feature.
Click to expand...
Click to collapse
lol!! so disable directly the doubletap feature following Oliwe's tutorial
mh i gotta update the code, i made it wrong lol

[REQ] reboot, screenshot, CWM on power menu [Sola]

hi guys i tried to modified the Sola framework-res but, when i try to additional screenshot and reboot option on power menu, i don't find some string/line to mod; i use this guide but i don't find this:
Just under .line 195 add these lines :
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$8;
const v1, 0x108057f
const v2, 0x10403da
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mCaptureScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
Now it must look like this
Click to expand...
Click to collapse
.line 195
new-instance v0, Lcom/android/internal/policy/impl/GlobalActions$8;
const v1, 0x108057f
const v2, 0x10403da
invoke-direct {v0, p0, v1, v2}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
iput-object v0, p0, Lcom/android/internal/policy/impl/GlobalActions;->mCaptureScreenshot:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;
const/4 v0, 0x4
Click to expand...
Click to collapse
Click to expand...
Click to collapse
i've tried to additional this line and go ahead but when i go to compile i had some errors; i used this guide to compiling xperia framework..
Can someone help me with this mod? or can someone do this mod? I would a power menu like this: [MOD v22] Reboot and SystemUI MOD for XPERiA ICS 4.1.B.0.587 [UDPATE:14.03.2013]
+1 for this, I know there are button combinations for reboot and screenshot, but it will be great have them at power menu in stock roms (p, u go, etc.)
+1 Would be nice to have on my P
someone can help me? :/
edit: i have send message to draco for help =) i hope he answers me =P
mtmattia said:
someone can help me? :/
edit: i have send message to draco for help =) i hope he answers me =P
Click to expand...
Click to collapse
it will be cool for stock roms on nxt devices
http://forum.xda-developers.com/showthread.php?t=1206965
Here add reboot
ReadReadz said:
http://forum.xda-developers.com/showthread.php?t=1206965
Here add reboot
Click to expand...
Click to collapse
en voila un tout fait http://www.mediafire.com/?064xnzp9nzdosp3
Bootloop...
mtmattia said:
Bootloop...
Click to expand...
Click to collapse
with any rom?
Avec quelle rom?
this is my framework, i work with the stock rom and rom from pulak861.
this framework come from xperia S and it work..
otherwise give me yours, I'll look for the change.
i'm verry, verry sorry for my bad english, just speak french, i google trad.
thanks =) but with other framework i have ext-card error..
when i connect phone at pc with MTP i can't see my real sdcard.. and into settings>storage i can't see "DS CARD"
NOW, i used a sola modded framework (with sone Z img)
i created this flashable zip =D the only error is themes;
screeenshot in attachment
download:frame-edit.zip
:victory:
thanks to damnat for some files =P
mtmattia said:
thanks =) but with other framework i have ext-card error..
when i connect phone at pc with MTP i can't see my real sdcard.. and into settings>storage i can't see "DS CARD"
NOW, i used a sola modded framework (with sone Z img)
i created this flashable zip =D the only error is themes;
screeenshot in attachment
download:frame-edit.zip
:victory:
thanks to damnat for some files =P
Click to expand...
Click to collapse
So, this one works with Sola Stock ROM without problems?
Thanks bro
R: [REQ] reboot, screenshot, CWM on power menu [Sola]
Now the only problem is bg into settings: themes don't work..
Sent from my MT27i using xda app-developers app
mirost1 said:
So, this one works with Sola Stock ROM without problems?
Click to expand...
Click to collapse
I get bootloop after flashing with CWM on stock .54 ROM (locked bootloader)

[MOD] Enable Double Press Power for Camera on stock ROM

This will enable the double press power for camera gesture on the stock ROM. On MiFavor 5.0 this will only work when the screen is on due to some zte service preventing it from working when screen is off (not surprised).
Decompile Settings_ZTE and open res/xml/display_settings.xml
Change
Code:
<SwitchPreference android:title="@string/camera_gesture_title" android:key="camera_gesture" android:summary="@string/camera_gesture_desc" />
to
Code:
<SwitchPreference android:title="@string/camera_double_tap_power_gesture_title" android:key="camera_double_tap_power_gesture" android:summary="@string/camera_double_tap_power_gesture_desc" />
Open smali/com/android/settings/DisplaySettings.smali
Go to
Code:
.method private updateState()V
Everywhere you see
Code:
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mCameraGesturePreference:Lcom/zte/mifavor/support/v7/preference/SwitchPreference;
Change to
Code:
iget-object v3, p0, Lcom/android/settings/DisplaySettings;->mCameraDoubleTapPowerGesturePreference:Lcom/zte/mifavor/support/v7/preference/SwitchPreference;
Change
Code:
const-string/jumbo v6, "camera_gesture_disabled"
to
Code:
const-string/jumbo v6, "camera_double_tap_power_gesture_disabled"
Go to
Code:
.method public onCreate(Landroid/os/Bundle;)V
Change
Code:
const-string/jumbo v6, "camera_double_tap_power_gesture"
invoke-virtual {p0, v6}, Lcom/android/settings/DisplaySettings;->removePreference(Ljava/lang/String;)V
to
Code:
const-string/jumbo v6, "camera_double_tap_power_gesture"
invoke-virtual {p0, v6}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Lcom/zte/mifavor/support/v7/preference/Preference;
move-result-object v6
check-cast v6, Lcom/zte/mifavor/support/v7/preference/SwitchPreference;
iput-object v6, p0, Lcom/android/settings/DisplaySettings;->mCameraDoubleTapPowerGesturePreference:Lcom/zte/mifavor/support/v7/preference/SwitchPreference;
iget-object v6, p0, Lcom/android/settings/DisplaySettings;->mCameraDoubleTapPowerGesturePreference:Lcom/zte/mifavor/support/v7/preference/SwitchPreference;
invoke-virtual {v6, p0}, Lcom/zte/mifavor/support/v7/preference/SwitchPreference;->setOnPreferenceChangeListener(Lcom/zte/mifavor/support/v7/preference/Preference$OnPreferenceChangeListener;)V
For MiFavor 5.0 use v0 instead of p0.
Go to
Code:
.method public onPreferenceChange(Lcom/zte/mifavor/support/v7/preference/Preference;Ljava/lang/Object;)Z
Change
Code:
iget-object v8, p0, Lcom/android/settings/DisplaySettings;->mCameraGesturePreference:Lcom/zte/mifavor/support/v7/preference/SwitchPreference;
to
Code:
iget-object v8, p0, Lcom/android/settings/DisplaySettings;->mCameraDoubleTapPowerGesturePreference:Lcom/zte/mifavor/support/v7/preference/SwitchPreference;
Change
Code:
const-string/jumbo v11, "camera_gesture_disabled"
to
Code:
const-string/jumbo v11, "camera_double_tap_power_gesture_disabled"
You may need to change the register numbers (v#) based on the surrounding code.
Recompile Settings_ZTE.
Huge thanks to @raystef66 for testing for me.
Can you make this steps for B32?
WesTD said:
Can you make this steps for B32?
Click to expand...
Click to collapse
This should work for any variant and any build
bkores said:
This should work for any variant and any build
Click to expand...
Click to collapse
I've couldn't get 3rd step. what should be new line?
WesTD said:
I've couldn't get 3rd step. what should be new line?
Click to expand...
Click to collapse
Code:
<item type="integer" name="zte_config_screenBrightnessDoze">17</item>
Doesn't work. No ambient display
WesTD said:
Doesn't work. No ambient display
Click to expand...
Click to collapse
Does it show up in settings or it just doesn't work?
Check to the OP and make sure you changed all the values. I added one that I forgot.
bkores said:
Does it show up in settings or it just doesn't work?
Check to the OP and make sure you changed all the values. I added one that I forgot.
Click to expand...
Click to collapse
No in settings
WesTD said:
No in settings
Click to expand...
Click to collapse
Did you make sure you modified all the values in the OP? Like I said I added one I forgot.
If you did try removing the following from Settings_ZTE/smali/com/android/settings/DisplaySettings.smali
Code:
.line 594
invoke-static {v2}, Lcom/android/settings/zte/MFVSysResource;->getResId(I)I
move-result v2
bkores said:
Did you make sure you modified all the values in the OP? Like I said I added one I forgot.
If you did try removing the following from Settings_ZTE/smali/com/android/settings/DisplaySettings.smali
Click to expand...
Click to collapse
Did you try and worked on b32?
BTW, I've make all steps
WesTD said:
Did you try and worked on b32?
BTW, I've make all steps
Click to expand...
Click to collapse
No I didn't try it because I just assumed it would work since those modifications have worked on every ROM I've used them on. But of course ZTE messed something up, as usual.
@WesTD I updated the OP with a new method that should work.
So this requires a root?
could you send us the modificated apk?
so we could replace it manually without decompiling and compiling the apk since i dont know how to do it.
Better yet, maybe teach a man to fish.. I wouldn't mind learning this
JackTheBest said:
could you send us the modificated apk?
so we could replace it manually without decompiling and compiling the apk since i dont know how to do it.
Click to expand...
Click to collapse
I'm sorry but I will not as the point is to do it yourself.
bkores said:
I'm sorry but I will not as the point is to do it yourself.
Click to expand...
Click to collapse
Could you at least tell us what tools we should use?
And what compiler you used since there's more than just one.
JackTheBest said:
Could you at least tell us what tools we should use?
And what compiler you used since there's more than just one.
Click to expand...
Click to collapse
I used APKTool and oat2dex. I'll write a guide on using these tools in general to modify apks on the Axon 7.
@JackTheBest I made a guide here: https://forum.xda-developers.com/axon-7/how-to/guide-modifying-apk-jar-files-axon-7-t3697945
Sorry guys I updated the OP with an extra step that I forgot. ZTE really went to extreme lengths to disable this function. Instead of just removing the one line in the display_settings.xml file they chose to disable it in the code itself. ZTE really needs better engineers because this is pissing me off.
My rant of the day

Categories

Resources