Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,740,943 Members 52,739 Now Online
XDA Developers Android and Mobile Development Forum

[REF] How to add Reboot to power menu (updated 10/21/2010)

Tip us?
 
Rookie407
Old
#231  
Senior Member
Thanks Meter 34
Posts: 197
Join Date: Dec 2011
Location: Clinton
thats deff not the case. the images and the lines come up just fine after i push the power button but it does a FC vibration thingy when i click to select an option other then the original 3...


why do i sound like a broken record here. =\
Devices:

Current:
Phones:
AT&T HTC One (M7) (Straight Talk BYOP)
Rooted: No
Recovery: Stock
Rom: Stock
Kernel: Stock

Tablets:
Acer Iconia Tab A100 (refurbished)
Rooted: Yes
Recovery: ClockWorkMod
ROM: Flex Reaper
Kernel: God Machine
 
pvyParts
Old
#232  
pvyParts's Avatar
Recognized Developer
Thanks Meter 2317
Posts: 1,855
Join Date: Oct 2010
Quote:
Originally Posted by Rookie407 View Post
thats deff not the case. the images and the lines come up just fine after i push the power button but it does a FC vibration thingy when i click to select an option other then the original 3...


why do i sound like a broken record here. =\
can you post the smali from the shutdownThread file too

Pvy.
 
Rookie407
Old
#233  
Senior Member
Thanks Meter 34
Posts: 197
Join Date: Dec 2011
Location: Clinton
Quote:
Originally Posted by pvyParts View Post
can you post the smali from the shutdownThread file too

Pvy.
done
Attached Files
File Type: 7z framework.jar.7z - [Click for QR Code] (4.21 MB, 35 views)
Devices:

Current:
Phones:
AT&T HTC One (M7) (Straight Talk BYOP)
Rooted: No
Recovery: Stock
Rom: Stock
Kernel: Stock

Tablets:
Acer Iconia Tab A100 (refurbished)
Rooted: Yes
Recovery: ClockWorkMod
ROM: Flex Reaper
Kernel: God Machine
 
lingfude
Old
(Last edited by lingfude; 20th April 2012 at 10:23 PM.)
#234  
lingfude's Avatar
Senior Member
Thanks Meter 279
Posts: 365
Join Date: Jun 2011

 
DONATE TO ME
Quote:
Originally Posted by Rookie407 View Post
done
The file is corrupt.
I can't open it.
 
pvyParts
Old
#235  
pvyParts's Avatar
Recognized Developer
Thanks Meter 2317
Posts: 1,855
Join Date: Oct 2010
Open the file in notepad xda is returning a 404 on it

Pvy

Sent from my LT18i using xda premium
 
Rookie407
Old
#236  
Senior Member
Thanks Meter 34
Posts: 197
Join Date: Dec 2011
Location: Clinton
Quote:
Originally Posted by pvyParts View Post
Open the file in notepad xda is returning a 404 on it

Pvy

Sent from my LT18i using xda premium
its gotta be yall i dl'd it just fine just tested it... xda wont let me upload it as a txt it keeps failing.
Devices:

Current:
Phones:
AT&T HTC One (M7) (Straight Talk BYOP)
Rooted: No
Recovery: Stock
Rom: Stock
Kernel: Stock

Tablets:
Acer Iconia Tab A100 (refurbished)
Rooted: Yes
Recovery: ClockWorkMod
ROM: Flex Reaper
Kernel: God Machine
 
pvyParts
Old
(Last edited by pvyParts; 21st April 2012 at 02:31 PM.) Reason: typos make for much confusion :D
#237  
pvyParts's Avatar
Recognized Developer
Thanks Meter 2317
Posts: 1,855
Join Date: Oct 2010
Default Try This!

Quote:
Originally Posted by Rookie407 View Post
its gotta be yall i dl'd it just fine just tested it... xda wont let me upload it as a txt it keeps failing.
downloading now. xda does that sometimes

will update soon if i find somehting

Edit 1
you have two variables with the same name.

Code:
Select Code
.field public static mReboot:I

.field private static mReboot:Z
Edit 2

Ok my 2 cents worth.

Change
".field public static mReboot:I"
to
".field public static mRebootInt:I"
in these places (red parts)

shutdown thread
line 29
Code:
Select Code
".field public static mRebootInt:I"
line 2332
Code:
Select Code
    sget v1, Lcom/android/internal/app/ShutdownThread;->mRebootInt:I
then in the global action files that you made as well in this step (copy pasted from the OP

Quote:
next add the code that runs when the menu item is pressed

copy GlobalActions$3.smali and name it GlobalActions$7.smali
open GlobalActions$7 and replace all instances of GlobalActions$3
with GlobalActions$7 then add this code to line 52 before
"invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V"
Code:
Select Code
Code:
const/4 v2, 0x1
	
sput v2, Lcom/android/internal/app/ShutdownThread;->mRebootInt:I
save and close

copy GlobalActions$3.smali and name it GlobalActions$8.smali
open GlobalActions$8 and replace all instances of GlobalActions$3
with GlobalActions$8 then add this code to line 52 before
"invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V"
Code:
Select Code
Code:
const/4 v2, 0x2
	
sput v2, Lcom/android/internal/app/ShutdownThread;->mRebootInt:I
save and close

copy GlobalActions$3.smali and name it GlobalActions$9.smali
open GlobalActions$9 and replace all instances of GlobalActions$3
with GlobalActions$9 then add this code to line 52 before
"invoke-static {v0, v1}, Lcom/android/internal/app/ShutdownThread;->shutdown(Landroid/content/Context;Z)V"
Code:
Code:
Select Code
const/4 v2, 0x3
	
sput v2, Lcom/android/internal/app/ShutdownThread;->mRebootInt:I
save and close

compile android.policy
see how that goes. if you do all that and it still don't work link the new crash log and all the shutdownthread and globalactions files (zip them together and i will look at just them) dont need the entire frameworks

Pvy
The Following User Says Thank You to pvyParts For This Useful Post: [ Click to Expand ]
 
Rookie407
Old
#238  
Senior Member
Thanks Meter 34
Posts: 197
Join Date: Dec 2011
Location: Clinton
Quote:
Originally Posted by pvyParts View Post
downloading now. xda does that sometimes

will update soon if i find somehting

Edit 1
you have two variables with the same name.

Code:
Select Code
.field public static mReboot:I

.field private static mReboot:Z
Edit 2

Ok my 2 cents worth.

Change
".field public static mReboot:I"
to
".field public static mRebootInt:I"
in these places (red parts)

shutdown thread
line 29
Code:
Select Code
".field public static mRebootInt:I"
line 2332
Code:
Select Code
    sget v1, Lcom/android/internal/app/ShutdownThread;->mRebootInt:I
then in the global action files that you made as well in this step (copy pasted from the OP



see how that goes. if you do all that and it still don't work link the new crash log and all the shutdownthread and globalactions files (zip them together and i will look at just them) dont need the entire frameworks

Pvy

works perfect man thanks for all your help!!! ill be sure your added into the credits of our rom. =)
Devices:

Current:
Phones:
AT&T HTC One (M7) (Straight Talk BYOP)
Rooted: No
Recovery: Stock
Rom: Stock
Kernel: Stock

Tablets:
Acer Iconia Tab A100 (refurbished)
Rooted: Yes
Recovery: ClockWorkMod
ROM: Flex Reaper
Kernel: God Machine
 
pvyParts
Old
#239  
pvyParts's Avatar
Recognized Developer
Thanks Meter 2317
Posts: 1,855
Join Date: Oct 2010
Quote:
Originally Posted by Rookie407 View Post
works perfect man thanks for all your help!!! ill be sure your added into the credits of our rom. =)
Glad we got it sorted.

Pvy.

Sent from my LT18i using xda premium
 
lingfude
Old
#240  
lingfude's Avatar
Senior Member
Thanks Meter 279
Posts: 365
Join Date: Jun 2011

 
DONATE TO ME
Quote:
Originally Posted by Rookie407 View Post
works perfect man thanks for all your help!!! ill be sure your added into the credits of our rom. =)
Great!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes