yashsingh1/xdaforums huggingface dataset:
[Samsung Epic 4G Touch] erikalin:
Hi, TD. Finally got a chance for this. Wanted to confirm from testing - Your Screenshot addendum in the OP is all good. :good:

For anyone else who built using this guide and also had chosen to remove Data Mode and Airplane mode options, you need to create a space for the Screenshot as follows.

(Using TD's guide here) Adding Screenshot if you already removed Data Mode & Airplane Mode

In Android.policy.jar\smali\com\android\internal\policy\impl\GlobalActions.smali

Before:

const/4 v1, 0x5

After:

const/4 v1, [COLOR="red"]0x6[/COLOR]

And now Insert Screenshot in whichever order you want (I put it at the bottom of the power menu options):

Before:

const/4 v2, 0x4

move-object/from16 v0, p0

iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;

aput-object v3, v1, v2

After:

const/4 v2, 0x4

move-object/from16 v0, p0

iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;

aput-object v3, v1, v2

[COLOR="Red"]const/4 v2, 0x5

move-object/from16 v0, p0

iget-object v3, v0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenCapture:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;

aput-object v3, v1, v2[/COLOR]

P.S. Remember to be gentle with those power buttons... seems like their average life expectancy is less than our 24 month contracts... ;)
[Samsung Epic 4G Touch] manuel lpz:
Will this work on stock rom gb27
[Samsung Epic 4G Touch] tdunham:
If it is rooted and deodexed, yes.
[Samsung Epic 4G Touch] Spannaa:
Thanks for the Adding Screenshot to Power Menu guide, it works flawlessly on Neat Lite 4.8 even though my android.policy.jar is already heavily modified ;)
[Samsung Epic 4G Touch] bilgerryan:
Looks good:thumbup:

Team Rejectz
[Samsung Epic 4G Touch] Spannaa:
Thanks :)

I've modified it again so that now it just adds a Screenshot button to the power menu rather than replacing the Data network mode button.
[Samsung Epic 4G Touch] TheWizardOfROMs:
There is nothing insinide android.policy.jar just a file called manifest. Can someone please help me.
[Samsung Epic 4G Touch] engloa:
Decompile it first using apktool or baksmali.
[Samsung Epic 4G Touch] TheWizardOfROMs:
Already did that. Now there's nothing in it.
[Samsung Epic 4G Touch] Spannaa:
Is your ROM deodexed?

If not, that would explain it as smali is in android.policy.odex on odexed roms.
[Samsung Epic 4G Touch] TheWizardOfROMs:
Omg I completely forgot about that. Thanks. Can you also tell me how to exratct a .odex file?
[Samsung Epic 4G Touch] Spannaa:
Sorry, I can't - I've always used deodexed roms as they're far easier to mod.
[Samsung Epic 4G Touch] TheWizardOfROMs:
OK I will deodex mine too
[Samsung Epic 4G Touch] manuel lpz:
Looking good
[Samsung Epic 4G Touch] TheWizardOfROMs:
Everything was going well vut i wasn't able to find

.field private mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction; inside GlobalActions.smali?
[Samsung Epic 4G Touch] xXWeresXx:
've done everything as described (3times) but when i pressed Powermenu reboot my system new...

why?
[Samsung Epic 4G Touch] bilgerryan:
"Reboot my system new"? What do you mean by this?
[Samsung Epic 4G Touch] xXWeresXx:
Reboot system new = i press my powerbutton and want open powermenu and than crash my system.
[Samsung Epic 4G Touch] siul_goncalves:
Nice

Thank's :good:
[Samsung Epic 4G Touch] Asmy Yuh:
can i use Adding Screenshot to Power Menu mod at OP with galaxy y?
[Samsung Epic 4G Touch] erikalin:
Howdy. Yes and no. It's not going to be exactly the same because every single file is probably not exactly the same. So no, you can't do this word-for-word and have it work. But, you can definitely use this plus some extra thinking. I used this same guide to make an extended power menu with screenshot on the Galaxy S3, a different phone. Some code is different, but when I didn't see in my framework exactly what this guide shows, I was able to easily see what in my framework matched up with what tdunham has here in this easy-to-follow guide, and make the corresponding, similar edits... Try it out. Make a backup before you test, you know? Good luck.

On a separate note...​

Why this, folks? See attached screenshot. "sigh..."
[Samsung Epic 4G Touch] :
Sir, [MENTION=1042140]tdunham[/MENTION],

I am trying to add screen-shot option in power menu and also got the option but it seems to be not working for me.

Now When I add these lines

.field private mScreenCapture:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;

&

move-object/from16 v0, p0

iput-object v1, v0, Lcom/android/internal/policy/impl/GlobalActions;->mScreenCapture:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;

My Phone Reboots with saying These errors......

E/AndroidRuntime( 350): *** FATAL EXCEPTION IN SYSTEM PROCESS: WindowManagerPolicy

E/AndroidRuntime( 350): java.lang.VerifyError: com/android/internal/policy/impl/GlobalActions$16

E/AndroidRuntime( 350): at com.android.internal.policy.impl.GlobalActions.createDialog(GlobalActions.java:268)

E/AndroidRuntime( 350): at com.android.internal.policy.impl.GlobalActions.handleShow(GlobalActions.java:157)

E/AndroidRuntime( 350): at com.android.internal.policy.impl.GlobalActions.showDialog(GlobalActions.java:152)

E/AndroidRuntime( 350): at com.android.internal.policy.impl.PhoneWindowManager.showGlobalActionsDialog(PhoneWindowManager.java:813)

E/AndroidRuntime( 350): at com.android.internal.policy.impl.PhoneWindowManager$2.run(PhoneWindowManager.java:790)

E/AndroidRuntime( 350): at android.os.Handler.handleCallback(Handler.java:615)

E/AndroidRuntime( 350): at android.os.Handler.dispatchMessage(Handler.java:92)

E/AndroidRuntime( 350): at android.os.Looper.loop(Looper.java:153)

E/AndroidRuntime( 350): at com.android.server.wm.WindowManagerService$PolicyThread.run(WindowManagerService.java:953)

I am attaching my modded android.policy.jar.

I have MediaTek 6577 device running on JB 4.1.1

Please have a look on it Sir and advise me what to do.:confused::confused::confused::confused:
[Samsung Epic 4G Touch] tdunham:
Please send me stock android.policy.jar also.
[Samsung Epic 4G Touch] :
Thanks for this quick reply.

Here it is sir.....
[Samsung Epic 4G Touch] tdunham:
Leaving for work. I will look at this when I can.
[Samsung Epic 4G Touch] tdunham:
This mod will not work with your version of android. It may be possible but not using the same method I have posted here. The code is very different. Sorry.
[Samsung Epic 4G Touch] tdunham:
The OP has been updated at the bottom with additional info for screenshot mod.
[Samsung Epic 4G Touch] pemell:
[MENTION=1042140]tdunham[/MENTION]

Thanks for your awesome guide. It was very easy to follow. Though, I'm trying to get this to work on my galaxy note 2 and in the end I got stuck in a bootloop. No problem as I just pushed original files back through adb.

I'm on stock 4.1.2 and I thought this mod might work for me too. What do you think? Maybe I did something wrong..
[Samsung Epic 4G Touch] sieuan:
I am trying to add screen-shot option in power menu, but in my GlobalActions.smali, there isn't "mDataModeToggle:Lcom/android/internal/policy/impl/GlobalActions$ToggleAction", so in that step, how can I change it to "mScreenCapture:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction" sir? Here is my GlobalActions.smali, Please have a look on it Sir and advise me what to do. My phone running ICS 4.0.4

Thanks!
[Samsung Epic 4G Touch] bilgerryan:
This is a guide for Jelly Bean 4.1.2 TouchWiz ;)
[Samsung Epic 4G Touch] majdinj:
Just a small notification that might help other new users to smali modification,,,

When you try to port this mod to 4.2 TW OS for example, you should match all variables and parameters.. Pay attention to these codes in android.policy:

.line xxx
new-instance [COLOR="Red"]v1[/COLOR], Lcom/android/internal/policy/impl/GlobalActions$4;

const [COLOR="Red"]v2[/COLOR], 0x10808ee

const [COLOR="Red"]v3[/COLOR], 0x1040192

invoke-direct {[COLOR="Red"]v1, v0, v2, v3[/COLOR]}, Lcom/android/internal/policy/impl/GlobalActions$4;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

iput-object [COLOR="Red"]v1, v0[/COLOR], Lcom/android/internal/policy/impl/GlobalActions;->mPowerOff:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;

.line zzz
[COLOR="Blue"]new-instance [COLOR="Red"]v1[/COLOR], Lcom/android/internal/policy/impl/GlobalActions$Download;

const [COLOR="Red"]v2[/COLOR], 0x10808ee

const [COLOR="Red"]v3[/COLOR], 0x1040192

[strike]move-object/from16 v0, p0[/strike] [B][COLOR="SeaGreen"]<!-- It is not there, so delete it[/COLOR][/B]

invoke-direct {[COLOR="Red"]v1, v0, v2, v3[/COLOR]}, Lcom/android/internal/policy/impl/GlobalActions$Download;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V

[STRIKE]move-object/from16 v0, p0[/STRIKE] [B][COLOR="SeaGreen"]<!-- It is not there, so delete it[/COLOR][/B]

iput-object [COLOR="Red"]v1, v0[/COLOR], Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;[/COLOR]

Also the array code:

.line xxx
const/4 [COLOR="Red"]v2[/COLOR], 0x3

iget-object [COLOR="Red"]v3, v0[/COLOR], Lcom/android/internal/policy/impl/GlobalActions;->mRestart:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;

aput-object [COLOR="Red"]v3, v1, v2[/COLOR]

.line zzz
[COLOR="Blue"]const/4 [COLOR="Red"]v2[/COLOR], 0x4

[STRIKE]move-object/from16 v0, p0[/STRIKE] [B][COLOR="SeaGreen"]<!-- It is not there, so delete it[/COLOR][/B]

iget-object [COLOR="Red"]v3, v0[/COLOR], Lcom/android/internal/policy/impl/GlobalActions;->mDownload:Lcom/android/internal/policy/impl/GlobalActions$SinglePressAction;

aput-object [COLOR="Red"]v3, v1, v2[/COLOR][/COLOR]

So basically, you must match all variables (v) and parameters (p) to be exactly like the stock code (the red v and p values). Also if "move-object/from16" line is not found in stock code, you need to remove it as well (so it is only comparison to stock code (.line xxx codes) of the pre-defined power menu objects to the newly put codes (.line zzz codes) and you will be ready to port to any TW API)

I hope this might help,,

Cheers
[Samsung Epic 4G Touch] zeyaan:
I am going to try this and by the way will it work on any stock Rom? I have a Chinese 're branded Indian phone with no support for development but we recently got a new custom Rom so I want to get this a try! will it work on stock 4.1.2
[Samsung Epic 4G Touch] majdinj:
If it is TW ROM,, most probably yes.

Do full backup first and then try..
[Samsung Epic 4G Touch] Bazirker:
Hey guys, I'm a loser who doesn't have time within the next few weeks to sit down and go through the guide to get this to work. For those of you who have done this, does anyone have a flashable zip that would work on a GB27 odex'd ROM that would give me a power menu that at least has the option to boot to recovery? I don't really care what it looks like, I'm a function over form kind of guy, plus beggars can't be choosers...

Thanks!
[Samsung Epic 4G Touch] tdunham:
Use Quickboot app from the Play Store.

You won't get an odex version of this unless it has been done already since it is so much extra work. This is why 99.9% of custom roms are deodexed, because they are far easier to make modifications.
[Samsung Epic 4G Touch] shazzl:
im on tw 4.2.2 i try your screenshot methot but it not funcion but the screenshort appear in power button on systemui i found this

\Decompiled_apk\SystemUI\smali\com\android\systemui\screenshot

how to point android.policy.jar to systemui.apk

sorry for my stupit question and bad English
[Samsung Epic 4G Touch] tdunham:
I cannot help with TW 4.2.2. It is very different than 4.1.2.

There are guides written for extended power menu for 4.2.2. You will have to search XDA for one of them.
[Samsung Epic 4G Touch] tdunham:
Shazzl, also screenshot function that you refer to is already built into most Touchwiz builds and it is mapped to key functions. You should ask for your phone what keys to press to take screenshot. For our Galaxy SII variant, both Power/Home are pressed at the same time to take a screenshot.

Good luck - TD
[Samsung Epic 4G Touch] Chad The Pathfinder:
Hey tdunham, have you considered adapting this guide for the GS3? I've been going through the information in the OP but I'm finding there are differences in the android.policy.jar (and possibly other things I'm not seeing) that I can't figure out. Just asking.
[Samsung Epic 4G Touch] JonSCSL:
You can download Xposed and there is lots of modules that have that option in them. Like Winam and Xblast.
[Samsung Epic 4G Touch] tdunham:
Yeah, I prefer this much better than the extended reboot menu. Maybe I'll look at it when I get time but all the 4.3 custom roms already have the extended reboot menu so it's kinda overkill.
[Samsung Epic 4G Touch] Chad The Pathfinder:
Well the only ROM with screenshot as an option that I know of is MOAR. Thats what I'm interested in.
[Samsung Epic 4G Touch] tdunham:
I'm already working on getting this ported over to 4.3 TW but I don't think for MOAR, there's too much going on in that rom with all the toggles.
[Samsung Epic 4G Touch] tdunham:
4.3 Touchwiz New Power Menu is completed.

Not sure when or if I will provide a guide.

http://xdaforums.com/showthread.php?t=2667505
[Samsung Epic 4G Touch] Spannaa:
Nice one :thumbup:

Re: providing a guide - I would ;)
[Samsung Epic 4G Touch] tdunham:
Hey Spannaa. I saw you lurking here in my JB thread. ;)

Yeah, when I get a few moments. Creating guides isn't nearly as much enjoyment as doing the work itself. LOL
[Samsung Epic 4G Touch] tdunham:
A link to the Touchwiz 4.3 guide has been posted on the OP.
[Samsung Epic 4G Touch] Spannaa:
Thanks - another flawless guide from [MENTION=1042140]tdunham[/MENTION]

It just works...

Sent from my GT-I9300...
[Samsung Epic 4G Touch] 3to4:
This mod is working for my N5120 (4.1.2 stock deodexed and rooted). Thank you very much.

PS: It also worked for Galaxy Tab 2 (4.1.2 stock deodexed and rooted), although some of the line numbers were different.
[Samsung Epic 4G Touch] sayakshinobu:
problem

i have followed as you instructed.but i get an while recompiling android.policy.jar.....invalid parameter in slobal action$16.smali...it also happened with the global actions$download as well as recovery.any help?should i attach the files?anyway great tutorial.

ok solved it.removed all the parameter lines.
[General Questions and Answers] aschutz:
Hi all!

I'm super new to this forum, and main reason for joining was to contribute to this thread:

http://xdaforums.com/showthread.php?t=2102679&page=12

TS wanted original fimware to be able to specialize cwm-based recovery for RK3066 devices. Well here it is:

Android 4.0.3

http://narod.ru/disk/60948234001.1584c438af8766a6b2a7e8e2e141c0bb/PD80-0904.rar.html

Supposed to be for Androd 4.1.1 (but I haven't tested that yet)

http://narod.ru/disk/61336950001.0be670fa3994680282016e33cfa00774/PD80固件包120825.rar.html

Theese links provide firmware for the "New FreeLander PD80" wich can be found here and have the model number sku20515

Please feel free to "link" or move this post so that TS (and others) can get this information.

I'm sure that would benefit the recovery development and also benefit sku20515 owners.

Cheers!
[General Questions and Answers] whbisondtr:
This just started a few days ago, where ill be in the forums and the whole page will fade. This is the only site that does it. Just wondering what is causing this and if anyone else is having the same issue. Thanks
[General Questions and Answers] whbisondtr:
Been 2 1/2 months n not 1 friggin answer... Wow...
[Galaxy Ace S5830 Q&A, Help & Troubleshooting] MeltingSnowman:
Hi, I installed a few time ago the last GB rom based on android 2.3.6 and today I wanted to change some values in the build.prop file and I found some values I think are a bit "unsusual" to find on a stock rom. Here they are:

debug.sf.hw=1 (I thought this value caused fc's and problems on stock rom)

debug.composition.type=mdp (this means I got GPU HW acceleration for 2D apps?)

dalvik.vm.heapsize=64m (also this line gives problem in multitasking on stock rom).

Also I've noticed that all the system apps are odex? Why?

Thanks! :)

P.S. I'm not facing any problem, I'm just curious.

Inviato dal mio GT-S5830
[Android Q&A, Help & Troubleshooting] clarkinum:
Can somebody upload some file host service settings.db

in /data/data/com.android.providers.settings/databases/

from stock ics 4.0.3. I really need it and i can't find it :(
[Android Q&A, Help & Troubleshooting] clarkinum:
nobody?
[Atrix 4G Q&A, Help & Troubleshooting] luckysleven:
is there anyway to change cm7 phone.apk with ics or jb phone.apk ? and also contact.apk?
[Atrix 4G Q&A, Help & Troubleshooting] ravilov:
Yes, by backporting. Not a trivial task at all.
[Atrix 4G Q&A, Help & Troubleshooting] barry_:
I'm assuming that you want the look of ICS/Jb but with CM7?

Here's a link http://xdaforums.com/showthread.php?t=2003484 that will do that. It works on the Atrix :good:
[Atrix 4G Q&A, Help & Troubleshooting] luckysleven:
actually i only want to apply jellybean or ics (cm10 or cm9 ) phone.apk and contacts.apk instead of cm7 phone.apk
[Atrix 4G Q&A, Help & Troubleshooting] barry_:
that link does that ;)
[Atrix 4G Q&A, Help & Troubleshooting] luckysleven:
thanks for your answers
[Atrix 4G Q&A, Help & Troubleshooting] luckysleven:
thank you too
[Verizon Samsung Galaxy S III] danstar:
Just a heads up. I was in the process of flashing a new rom and used goomanager to update my recovery. It had me flash twrp 2.4.0. It was a successful flash. I then rebooted into recovery, did my normal wipes, including system, and when I went to install, when I hit external sd, it bounced right back to internal. I tried to access my sd card, and it showed it was empty. I had to odin back and start over.
[Verizon Samsung Galaxy S III] huskyjayboy:
I experienced the exact same thing. So after you flashed back via odin, did that fix the missing external sd issue in TWRP 2.4? For now, I just flashed the previous version of TWRP. I was then able to see my external sd again.
[Verizon Samsung Galaxy S III] corbn89:
What size is you ext SD card? TWRP has been known to have trouble recognizing cards over 16GB. I have a 16GB ext sdcard and the latest TWRP and Ive never had trouble flashing from external.
[Verizon Samsung Galaxy S III] andybones:
Not using an sdcard here, but all has been fine for me this far.
[Verizon Samsung Galaxy S III] danstar:
I also used an older version of TWRP. I wasn't going to try 2.4 again and have to start over.
[Verizon Samsung Galaxy S III] danstar:
I have a 32GB SD card. I had no issues with version 2.2 and the 2.3 versions. It was just when I had to use the 2.4 that it didn't work.
[Verizon Samsung Galaxy S III] tykalx:
I'm using a 64gb with no issues
[Verizon Samsung Galaxy S III] corbn89:
Hmm. Maybe they broke something when they added exFAT support? What formatting is your card btw?
[Android Q&A, Help & Troubleshooting] Barbatos19:
Hi, Good day to every one. I got a galaxy tab p1000 from my friend. Im from Philippines by the way. When i connect the tab to the PC and run Samsung kies i cannot find any update their. I tried older kies version and still doesnt give me an update. And when i browse the tab, it doesnt support OTA update. can someone help me to update this thing to gingerbread? tnx. by the way this tab was locked from a carrier known here in philippines as globe telecomm.
[HTC Desire S] asgardr:
Good afternoon to all, people of good faith and hope..

I am s-on htc-dev unlocked, running viper saga 1.1.0- amidabuddha patched kernel,

without ANY problems

since i flashed it.

Today i was trying to use wifi direct and so switched it on and connected to my other device

for files exchange, then my poor b*****d(desire s) froze with blank black screen and burning

orange diode(phone was connected to the pc at that time)

which is burning even when i disconnected the wire from the comp.

phone doesn`t want to reboot or switch off, combo switch doesn`t work either,

and what is worse is that ADB sees the device, but reboot commands do not work as well.

My hummble question is: how can i reboot the phone without pulling the battery out?
[HTC Desire S] teadrinker:
AW: [Q] desire s- phone froze, adb reboot doesn`t work-how to reboot

edit: sorry, just reread your post
[HTC Desire S] jugg1es:
Re: [Q] desire s- phone froze, adb reboot doesn`t work-how to reboot

Only thing i can think of is to pull the battery or let it run down till it dies. IF you pull the battery then don't put it straight back in, wait a few seconds. I would recommend letting it die though

Life is really simple, but we insist on making it complicated.

Confucius
[HTC Desire S] asgardr:
Gentlemen, finally, after considering all facts again i decided to take courage, not wait,

and pulled the battery out.

It'd worked and the phone is running again its amazing viper saga.

I am around for a couple of years but always before on xda was able to find my answers

Without the need of asking questions- till now.

Thanks for the replay...I an proud to be part of this community
[HTC Desire S] amidabuddha:
Re: [Q] desire s- phone froze, adb reboot doesn`t work-how to reboot

Actually I never tested WiFi direct feature, but if you want to try it once again please use the wpa_supplicant and libhardware_legacy.so, that you will find in some of my recent posts in the kernel thread. Instructions are included

Sent from my HTC Desire S
[HTC Desire S] Jack_R1:
Note for the future: pulling the battery out isn't half as dangerous as putting it back in too fast. Don't be afraid to pull it out, but count to 10 before you put it back in.
[HTC Desire S] asgardr:
I seldom use wifi direct, neither am i in despear of having it on board,

But isn't it curiosity that pushes us towards new discoveries?

I'll gladly test it with those new files and perhaps post the results

On the apropreate forum(if i ever reach this magic 10 posts barier);)
[HTC Desire S] asgardr:
I've learned around here, so many bad things about the habit of pulling batery out off the fully booted device,

That i wanted to be double certain, not just follow my rush.

Now that i'm quite sure about the first part of your post,

Let me kindly understand: why on earth putting battery back on

Results in burning emmc chips of our devices

(But i'll of course- on my part-try to investigate the matter to be fully aware of-why);)
[HTC Desire S] asgardr:
You mean: in my question there is an answer as well.

Now when i think of it i see you are right
[HTC Desire S] teadrinker:
AW: [Q] desire s- phone froze, adb reboot doesn`t work-how to reboot

No, I first asked a question, that I then realised was answered already in your post, so I edited my post ;)
[HTC Wildfire S] ronzzz92:
Someone please get me the camera launcher without the glitches. I just installed jelly king rom v1.3 and the camera app is missing :(
[Xoom Q&A, Help & Troubleshooting] viriatto:
I have a motorola droid xyboard 8.2 LTE (verizon). When I insert an European SIM Card I get: Wrong Operator: SIM card is from an unknown source.

Could be this XYBOARD unlocked for use it with other carriers?

Thank you
[Verizon Samsung Galaxy S III] gtp0083:
In the data usage log on my Verizon GS3 one "program" is using the most data for the past month. It is labeled as "Delete Apps". I wouldn't have a problem with this but all of the data used is background data. Is it safe to assume that this is the data that has been used by applications that I have deleted and the specific details are no longer available? Or is this something that I should be concerned about?

Also having a problem with the Gallery being second on the list of battery usage. The combination of these two things has me concerned that something is syncing that I don't know about.

Stock phone not rooted.

Any thoughts?