Post Reply

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

OP untermensch

20th April 2012, 08:34 AM   |  #231  
Senior Member
Flag Clinton
Thanks Meter: 34
 
197 posts
Join Date:Joined: Dec 2011
More
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. =\
20th April 2012, 08:47 AM   |  #232  
pvyParts's Avatar
Recognized Developer
Thanks Meter: 2,323
 
1,858 posts
Join Date:Joined: Oct 2010
More
Quote:
Originally Posted by Rookie407

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.
20th April 2012, 09:50 AM   |  #233  
Senior Member
Flag Clinton
Thanks Meter: 34
 
197 posts
Join Date:Joined: Dec 2011
More
Quote:
Originally Posted by pvyParts

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)
20th April 2012, 09:50 PM   |  #234  
lingfude's Avatar
Senior Member
Thanks Meter: 304
 
386 posts
Join Date:Joined: Jun 2011
Donate to Me
Quote:
Originally Posted by Rookie407

done

The file is corrupt.
I can't open it.
Last edited by lingfude; 20th April 2012 at 10:23 PM.
21st April 2012, 01:56 AM   |  #235  
pvyParts's Avatar
Recognized Developer
Thanks Meter: 2,323
 
1,858 posts
Join Date:Joined: Oct 2010
More
Open the file in notepad xda is returning a 404 on it

Pvy

Sent from my LT18i using xda premium
21st April 2012, 12:22 PM   |  #236  
Senior Member
Flag Clinton
Thanks Meter: 34
 
197 posts
Join Date:Joined: Dec 2011
More
Quote:
Originally Posted by pvyParts

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.
21st April 2012, 02:03 PM   |  #237  
pvyParts's Avatar
Recognized Developer
Thanks Meter: 2,323
 
1,858 posts
Join Date:Joined: Oct 2010
More
Try This!
Quote:
Originally Posted by Rookie407

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:
.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:
".field public static mRebootInt:I"
line 2332
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:
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:
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:
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
Last edited by pvyParts; 21st April 2012 at 02:31 PM. Reason: typos make for much confusion :D
The Following User Says Thank You to pvyParts For This Useful Post: [ View ]
22nd April 2012, 01:57 AM   |  #238  
Senior Member
Flag Clinton
Thanks Meter: 34
 
197 posts
Join Date:Joined: Dec 2011
More
Quote:
Originally Posted by pvyParts

downloading now. xda does that sometimes

will update soon if i find somehting

Edit 1
you have two variables with the same name.

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:
".field public static mRebootInt:I"
line 2332
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. =)
22nd April 2012, 02:41 AM   |  #239  
pvyParts's Avatar
Recognized Developer
Thanks Meter: 2,323
 
1,858 posts
Join Date:Joined: Oct 2010
More
Quote:
Originally Posted by Rookie407

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
22nd April 2012, 08:29 PM   |  #240  
lingfude's Avatar
Senior Member
Thanks Meter: 304
 
386 posts
Join Date:Joined: Jun 2011
Donate to Me
Quote:
Originally Posted by Rookie407

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

Great!

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

Advanced Search
Display Modes


Top Threads in Vibrant Android Development by ThreadRank