yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy SL i9003] Samsung fan1:
No dude, this ideally should be a functionality of any phone with memory card (mass storage) provision.

1. i tried connecting my old nokia phone (express music) to my TV's USB port, by selecting the mass storage connection in the phone setting and it works. same way my friend's HTC phone also works with my TV.

2. when you select the USB mass storage, the phone memory card is treated just like any other pen drive storage.

3. even my i9003 gets connected in this way, but it get disconnected immediately after the connection is established.

there is some process in the phone that terminates the connection with the TV, dont know what it is....
[Samsung Galaxy SL i9003] dewasathya:
Well.... Odd enough. When you say the phone turn into storage device, why I never experienced this problem on computer? Probably because lack of the USB Driver.

Sent from my Galaxy SL Powered By CM10.1 (Android 4.2.2)
[Samsung Galaxy SL i9003] mustafahussain:
well the connection gets disconnected soon enough beccause of the conflict created between the internal and external storage of your device.. this is something you should know.... As LoLa said this is not possible for I9003 but still if you wanna try your luck then I suggest you to remove your SD card and then connect to TV and see what happens
[Galaxy S II General] RusherDude:
wtf?
[Galaxy S II General] Force Close:
Because whoever is in charge of that stuff can't be bothered to change it. There have been countless threads on this.
[Galaxy S II General] compactdisc:
Can't be bothered to change it? It was showing the correct image as far as a month ago i think, so someone clearly bothered to change it to the wrong picture. Doesn't matter either way.
[Galaxy S II General] crachel:
I've got the request in to change it. Be patient grasshoppers.

Closed
[Galaxy S II General] svetius:
This is fixed. Sorry about that. :eek:
[Galaxy Note II Android Development] mikeyxda:
Guess I'll do some Q&A here...

I did a lot of research on that and it's not so easy to answer. Generally, I believe battery will be no worse and possibly better. Google location services, alarms, widgets, push mail, and many other processes end up waking up 99% of phones at least once every 3 minutes anyway and the deep-sleep-->awake-->deep sleep cycles actually consume more power than letting the processor(s) stay awake. On my phone for example, Google location services alone woke the phone 20 times/hr (every 3 minutes) and that's with GPS turned off and no navigation or map activities running! Add a weather widget here, a push mail app there, and I found that my phone was bouncing in and out of deep sleep more than a hundred times an hour! Better (on both battery and circuitry) to just idle at that point. With only one CPU awake with screen off, the radio will draw more power than the CPU idling. Most people don't realize that the screen and radio eat orders of magnitude more power than (especially an idling) CPU, so idling one CPU will have little effect on battery. That said, I suppose if you put your phone in airplane mode and maybe froze a bunch of other apps that wake the phone, maybe battery would be worse with the ZeroWakeLag wakelock and the phone would do better in deep sleep. Reality is: we don't use our phones that way.

From my testing, the Note 2 already appears to limit processing to a single CPU when the screen is off. For extra battery savings, you can set up a screen-off max frequency limit of say 800Mhz to 1.0Ghz. I personally use 1.0Ghz because you only have one processor running and it won't ramp up unless it's needed anyway. Going below about 800Mhz can cause issues like bluetooth music skipping, media share server stuttering, etc. I definitely would not recommend setting the max to 200Mhz with the screen off to force the CPU to the lowest frequency all the time. But hey, this is Android... never hurts to try I guess if you really want to. :)

Mike
[Galaxy Note II Android Development] grgsiocl:
let me give a try now..thanks for the guide though...
[Galaxy Note II Android Development] wesamothman:
Thx for sharing mike. Valuble guide. Really. Much appreciated.
[Galaxy Note II Android Development] soloilmeglio:
R: [GUIDE] Eliminate Screen Wake Lag

Thanks mate... will try soon

Inviato dal mio GT-N7100 con Tapatalk 2
[Galaxy Note II Android Development] mexiking713:
Mike you are awesome thank you

Sent from a galaxy note 2 far far away...
[Galaxy Note II Android Development] shatroghistro:
Can someone upload the files so we all won't have to do it?

Thx
[Galaxy Note II Android Development] Nicheuji:
I got lost at So open KeyguardViewMediator.smali...

Lol
[Galaxy Note II Android Development] majormickey:
Thanks for the guide mikey. MeanBean was my daily rom on my evo 4g lte, wondering if you will ever bring that awesome ROM here.
[Galaxy Note II Android Development] jvillatoro:
Me too, but it is great someone figured out how to implement this feature in upcoming roms.
[Galaxy Note II Android Development] jvillatoro:
You need apktool to decompile the android.policy.jar

BTW, I just applied the changes to my phone, will report how it behaves. I am currently using latest Omega Rom V15.

I have the modified android.policy.jar in case anyone wants it

Edit #2: apparently the mod is working, do not notice any lag when turning the screen on. The process shows on better battery stat.

So that means that the cpu will idle at 200 mhz? Ill make a battery test tomorrow under my normal usage.

Ill post results later
[Galaxy Note II Android Development] Nicheuji:
Can I have the android.policy.jar, please?

So, I just replace it with the one in root/system/framework? (Yes, I'll make a backup first :D)
[Galaxy Note II Android Development] bungknees:
I don't have access To a computer for the next few days, all I have is my note 2 to keep me entertained. If I upload my android.policy.jar would there be any chance you could edit it for me? Would like to try this mod out. If not that's no biggie.

Cheers.
[Galaxy Note II Android Development] jvillatoro:
Nicheuji which Rom are you using?

Bungknees, sure, upload it and Ill work on it. Which Rom are you using?

Here, I am uploading my android.policy.jar for OMEGA ROM V15

You just have to replace the one under system/framework. I used Rootz Explorer to do this
[Galaxy Note II Android Development] soloilmeglio:
R: [GUIDE] Eliminate Screen Wake Lag

Many many thanks! It works fine ;)

Inviato dal mio GT-N7100 con Tapatalk 2
[Galaxy Note II Android Development] vtec303:
Will this mod work on a cm Rom ?, thanks.
[Galaxy Note II Android Development] bungknees:
I'm using a rom from another forum, and it's odexed, so that may cause a problem. But here it is anyway and I'll try it. Thanks.
[Galaxy Note II Android Development] jvillatoro:
That's going to be a problem because I have no experience at all with odexed files. If it was deodexed, I could've help you.

I tried your file with the tools I have and I got a bunch of errors.

Sorry
[Galaxy Note II Android Development] bungknees:
No problem, thanks for trying.
[Galaxy Note II Android Development] nintendolinky:
Could you do mine mate
[Galaxy Note II Android Development] SmokinWaffle:
Awesome! Thanks, :D

Will flash it in about 40 minutes and report back. :good:
[Galaxy Note II Android Development] examiner:
deleted
[Galaxy Note II Android Development] SmokinWaffle:
It works great, no problems! :victory:

I really appreciate your efforts, thanks again.

The lag is pretty much totally gone, it's only a very very slight delay (not even really noticeable), which is normal with most phones anyhow. Weird that now when you turn the screen off it fades out a little before turning off totally, random side effect of the mod I guess.
[Galaxy Note II Android Development] Scarface1991:
@mikeyxda

I hope it`s okay that I opened up a thread in a german Android Forum and translated the instructions? I mentioned your name of course and there is also a link to this thread here.

http://www.android-hilfe.de/anleitu...ch-dem-druecken-der-powertaste-entfernen.html
[Galaxy Note II Android Development] temasek:
Anyform of github source codes available for this mod?
[Galaxy Note II Android Development] zidane:
would this work on cm10.1?
[Galaxy Note II Android Development] cswarrior:
would anyone be able to modify this for me?tried to do the first few steps but got lost...thanks for the help
[Galaxy Note II Android Development] Scarface1991:
@mikeyxda

The mod works great but isn't it a bit unhealthy for the cpu to stay awake the whole time?
[Galaxy Note II Android Development] sms2000:
ARM core should run at 200MHz for eons.

What I'm failing to understand why people want to modify their ROMs to achieve that simple result easily done at the application level?

Any app with a controlled service obtaining PWL would do the trick.
[Galaxy Note II Android Development] dannejanne:
It's always a plus to not have to install an app to do something for you that needs to run in the background. Better to do it at a system level if you're gonna do it properly. Me myself prefer my device to go to deep sleep though as I leave it untouched for longer periods every day and the wake lag does not bother me one bit.
[Galaxy Note II Android Development] Scarface1991:
Here you go, just flash via CWM and it should be fine. Don't forget to do a Nandroid backup before flashing though
[Galaxy Note II Android Development] Houyo:
Epic guide. Thanks a bunch
[Galaxy Note II Android Development] cswarrior:
flashed it and worked perfectly, thank you for your help and time, and of course mikey :D
[Galaxy Note II Android Development] xcly:
No one has any ideas on this? I found acquire(long timeout) on the web but have no idea how to implement it in the smali file..
[Galaxy Note II Android Development] lehoi79:
Can someone mod this file for me? I want to try this mod but don't know a thing about coding...

This is from CleanRom 4.8.0 (DMC3 base). Thanks for the help!
[Galaxy Note II Android Development] aukhan:
I Flashed this using Mobile Odin worked fine not sure from where i got this Mod but its from XDA
[Galaxy Note II Android Development] SmokinWaffle:
Strange, I don't seem to get any battery drain using the mod. Maybe flashing via CWM makes a difference somehow? (Not sure how you did yours, though)

My battery after a day of moderate/semi-heavy use, took this just before I went to sleep:

Which is pretty standard. Recently flashed Perseus Alpha34 though, seems to drain battery a little quicker than Alpha 31 for me.

Took this just after I woke up this morning:

5% battery loss overnight, I turn off Wifi/Data at night, but no power saving or anything like that. All seems normal here.
[Galaxy Note II Android Development] dannejanne:
5% drain in 6 hours is fairly much if you ask me. Specially considering you turned off wifi and data. I get about 3% drain in 8 hours sleep and that is with data enabled. Not using this mod that is. Not really big differences in the big picture. But it seems to be noticable. Which isn't strange. Preventing deep sleep has affect on battery if the phone just idles much.
[Galaxy Note II Android Development] lehoi79:
Are u running CleanRom 4.8?
[Galaxy Note II Android Development] Scarface1991:
I guess I have too much time :D

Here you go, as I've mentioned before, do a Nandroid backup before flashing.
[Galaxy Note II Android Development] xcly:
5% overnight is quite a lot I must say.. I get around 2% over 8hrs with wifi + poor signal.
[Galaxy Note II Android Development] aukhan:
no i m usingMONXDIFIED

it should work on any ROM
[Galaxy Note II Android Development] lehoi79:
Working great so far. I don't see any wake lag. Thank you
[Galaxy Note II Android Development] cerede2000:
Please Scarface make version for Android HD 15 ;)

Thank you.
[Galaxy Note II Android Development] Scarface1991:
I could do it but you need to post your android.policy.jar file
[Galaxy Note II Android Development] cerede2000:
Is here ;)

http://xdaforums.com/showpost.php?p=40280396&postcount=166

Thank you !!
[Galaxy Note II Android Development] nintendolinky:
So guys, could you modify my file please, thanks for any help.
[Galaxy Note II Android Development] examiner:
guys can someone please help me how to edit this or someone help me to edit this for me....im using PAC the latest build by vertigo..thanks..
[Galaxy Note II Android Development] tuxonhtc:
Second the overnight/standby battery drain. I notice considerable difference - had hardly dropped like 1 or 2 percent before, now it's 5-6/7. That's massive for me. It came default with Project AOSP rom, and since I flashed the disable zip, it's all back to normal now.
[Galaxy Note II Android Development] Scarface1991:
Your android.policy.jar file seems to be damaged somehow because apktool can`t decompile it.

Check out the attachment. Flash via CWM

I think this guide is based on Touchwiz. ROMs that are based on AOSP have a different layout inside the KeyguardViewMediator.smali file. I can't find where I must paste the code provided in the tutorial. Maybe someone with better skill could do it.
[Galaxy Note II Android Development] nintendolinky:
Thanks mate.
[Galaxy Note II Android Development] cerede2000:
Ah ! the then are back;)

Thank you :)
[Galaxy Note II Android Development] Scarface1991:
Apktool gives me an error when I try to decompile. Don`t know what`s wrong. Worked with every other file so far.
[Galaxy Note II Android Development] cerede2000:
Ah!

weird I just extracted my file system framework :(
[Galaxy Note II Android Development] mnickkk:
Hello, could you help me with editing my android_policy.jar @ GalaxyS3?

I've tried your guide [MENTION=2052521]android-[/MENTION]hilfe, but I get this error message (first step), is it caused by JKay framework that I use?

C:\Users\JP\Desktop\decompile java and apk>apktool d android.policy.jar
I: Baksmaling...
Exception in thread "main" java.lang.RuntimeException: bad magic value: 64 65 78
0a 30 33 36 00
at org.jf.dexlib.DexFile.<init>(DexFile.java:377)
at org.jf.dexlib.DexFile.<init>(DexFile.java:274)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:44)
at brut.androlib.src.SmaliDecoder.decode(SmaliDecoder.java:33)
at brut.androlib.Androlib.decodeSourcesSmali(Androlib.java:68)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:85)
at brut.apktool.Main.cmdDecode(Main.java:128)
at brut.apktool.Main.main(Main.java:65)

C:\Users\JP\Desktop\decompile java and apk>
[Galaxy Note II Android Development] Scarface1991:
Possibly, I just tried and yes same error. I never used JKay Framework so I don't know if it`s causing it but I tried the same for [MENTION=512178]cerede2000[/MENTION] and got a similar error.

cerede2000 do you also use JKay?
[Galaxy Note II Android Development] cerede2000:
No I dont know JKay :(
[Galaxy Note II Android Development] grgsiocl:
try pushing the frameworkres.apk and twframework-res.apk from JKAY mod and then use this command before you decompile the android.policy.jar

apktool d framework-res.apk

apktool d twframework-res.apk

and then try decompiling the android.policy.jar . If you still get errors then, you should use the recent smali and backsmali files.

edit: i could decompile the android.policy.jar without any issues. so it is the problem of smali and backsmali files. change it and you will decompile the file with ease

EDIT: I added the zero screen wake lag code in the android.policy.jar. you can download it from the attachment!
[Galaxy Note II Android Development] JustArchi:
Hello dear developers.

Today I've tried to somehow automate this great tutorial for mine SGS3. Thank you mikeyxda for your awesome job.

It's not perfect, it's not universal, it's dirty and simple. It works now but it may not work tomorrow. We'll see ;)

You need any linux distro, zip package, probably openjdk-6/7-jre or "java" in general. And nothing else I guess. I've included apktool in zip already.

Start doing magic by executing archi.sh

# Archi's decompile helper

# JustArchi@JustArchi.net

# JustArchi @ xda-developers

# Should be used for automating zero_delay modifications

# It's a dirty code made only for SGS3, I give no warranty that it'll work for other devices

# I'm even 100% sure that it won't because of changes in the code

# I've included in _original/ folder actual samples from SGS3. If you're sure that your filestructure is the same (especially in my grep samples) then it'll be compatible as well.

# Probably it just need some small modifications to work for you but you need to be familiar with bash ;).

# Requirments:

# INPUT:

# stock_framework/framework-res.apk <=> /system/framework-res.apk

# stock/android.policy.jar <=> /system/framework/android.policy.jar

# jkay_framework/framework-res.apk <=> /system_common/framework-res.apk

# jkay/android.policy.jar <=> /system_deodexed/framework/android.policy.jar

# OUTPUT:

# stock/android.policy.jar + stock/android.policy.jar.old (unmodified)

# jkay/android.policy.jar + jkay/android.policy.jar.old (unmodified)

View attachment Archi_zerowakeup.zip

I bet at least one person will find it very useful. Maybe someone will try to make it more universal in the future, for me it just need to work on SGS3 ;).

Have fun!
[Galaxy Note II Android Development] appro77:
As expected this mod uses more battery. I think it's wishful thinking to expect anything else. With wifi and data off over 8 hours at night, I normally get around 3-4% drain. With the mod, I get 9% which isn't unacceptable but it's still around twice as much.

The advantage of having no wakeup lag is huge for me though. Ever since my S2 and every phone in between I've hated the wakeup lag. Big fail for Samsung in my opinion. Their engineers should get their **** together and rid their phones of it once and for all.

I was wondering if some battery could be saved by underclocking the cpu to say 100Mhz when the screen is off. Are there any kernels that allow underclocking? I'm using Perseus at the moment and it doesn't seem to be an option.
[Galaxy Note II Android Development] Raugote:
Possible SOD Solution?

I've been wondering if keeping the phone from entering deep sleep prevents the infamous Sleep Of Death, I've benn suffering from that in an irregular basis, about one SOD per week

My note 2 isn't undervolted, that's probably the main cause of SOD for some users, but in my case, settings in Perseus Kernel are Stock

anyway, I'm here asking for someone to modify my android.policy.jar to include this zero wake lag, hoping this solves, not only screen wake lag, but the SOD I've benn suffering

or if someone can point me to a APKTool tutorial to implement this mod

Thanks for your attention

ROM: Omega V16

Kernel: Perseus alpha 36 (stock settings)

Update:

manage to make the modifications Myself, tested an working for Omega v16

will update if this solves SOD at the long rung

I'll leave the updated jar (includes zerowakelag mod) in case somebody needs it

Update2:

Suffered Sleep of Death last night, even with this mod enabled, SOD happened, still wondering why

going back to full stock and see what happens

-----------------

N7100
[Galaxy Note II Android Development] rm001:
Exactly the same results on GOAtrip 8.5 with Adam 2.4 kernel (about 10% per night instead of 4%). But no wakeup lag is more important for me too.

I also thought about inderclocking but as I understood it makes the system unstable, that`s why nobody uses it.
[Galaxy Note II Android Development] tyloud78:
Hi Mike-

I know you've been busy just wondered if you planned to create a guide for modding the lockscreen with no fade extra swirls?

Thanks again :cool:
[Galaxy Note II Android Development] bharathgdk:
[TUT]Guide By Newbie to Edit the .Jar File! :P

Hey Guys!.. Many are Experts and know how to edit the android.policy.jar file.And many doesnt know how to edit the .jar file to include the code #No wake lag fix.

I asked guys on this forum to help me edit the jar file. But i didnt feel right to keep asking them all the time to edit a jar file.So instead i learnt it, If you already knew how to edit then you can skip this post.

Well,Few Steps to Follow. (Please Note I dont take any Credit for any of the codes/procedures)

1. To get the android.policy.jar file Its Located in " /system/framework/android.policy.jar".

2. Now Extract it using an Archive Software (Winrar).

3. Download the Smali.zip. (Attached)

4.Go to this Link Simple and easy guide to use Smali.zip (you can also download the zip there) http://www.wrapcode.com/android/baksmali-smali-dex-files/

5. Place the classes.dex file in the root directory of smali folder and follow the Steps from the link above.

6. To Edit use Notepad++ , File to be edited is KeyguardViewMediator.smali

Here as mentioned by Mikeyxda We'll be making all our changes in the KeyguardViewMediator.smali file. Follow the Page 1 Code. And After everything is edited Follow the Steps from the Link Above to Re-Compile.

Open android.policy.jar using Winrar or 7zip

Rename modded-classes.dex to classes.dex, and Drag & drop to android.policy.jar with normal compression

Finally, push back android.policy.jar into the system your device or push manually using root explorer/ES File Explorer.

I have just gathered all information for a newbie to perform the editing.I didn't create any file/code.Credit goes to respective owners/creators

Any Corrections are Welcome!

Hope This Helps!. Good Luck!
[Galaxy Note II Android Development] critofur:
Why not just setup Tasker/cron job, or a widget, that turns off the wake lock (and most of the other Google/email things that aren't needed while you sleep)?

Today I was thinking to look for an "instant deep sleep" app, it would only wake for alarms, phone calls, and if the user unlocks the phone...
[Galaxy Note II Android Development] tdusen:
Has anyone done an Xposed mod for this? Is it even possible?

It would be nice not to have to decompile edit and recompile. Plus, you'd be able to enable/disable the mod whenever you wanted.
[Galaxy Note II Android Development] topjor:
+1

Would be realy helpfull specificly the enable/disable part, so you dont have to make recovery zips for this process
[Galaxy Note II Android Development] decalex:
has anyone successfully implemented this in an AOSP rom?

I'm going to give it a shot-- but wanted to ask first.
[Galaxy Note II Android Development] invertedskull:
I'm VERY surprised to have gone through the entire thread (23 or so pages) and only seen 2 or 3 people ask for a CM 10.1 mod for this... I thought CyanogenMod was more popular... It's what I'm using at least. And pardon the ignorance, but I never heard of Omega ROM until reading this thread! Looks good though.

I'm going to give this mod a whirl myself (tomorrow evening), hopefully I don't bung it up. If I do i'll post my android.policy.jar file and hopefully someone can lend me a hand. :)

EDIT: Ok, I'm a few days late, but I gave this a shot and didn't get very far. Can someone please tweak my android.policy.jar file? Here it is... Oh, and as I said, I'm using CyanogenMod ROM 10.1.
[Galaxy Note II Android Development] kasra001:
I want to revert back.....can anyone help me?.........I'm using simplistic framework....
[Galaxy Note II Android Development] PoD_Hazard:
Download the rom to ur computer and extract the original Android.policy.jar file from the rom, then inject that stock file like u would the modded file
[Galaxy Note II Android Development] paravorheim:
My post about this never received much attention in the GS4 forums, so here's nothing:

I have not tried this fix yet, but I have an observation to make. With no effects on, no lockscreen widgets, etc, the lag from pressing the power button to the lockscreen actually showing is around 2-3 seconds, possible more.

However! By turning off the lockscreen itself, I am able to have zero wake up lag. I haven't extensively researched this issue so I don't know if the phone is no longer going into deep sleep or something, but try it and let me know what you think.
[Galaxy Note II Android Development] PoD_Hazard:
I'll give it a try

RESULT (TIME 2:15pmCT): that didn't take long to see that turning off the lockscreen completely didn't help with wake lag, phone still went into deep sleep and woke up at the same speed if I had the lockscreen on, Zero Wake Lag mod is the only thing that actually fixes the problem