yashsingh1/xdaforums huggingface dataset:
[Nexus 4 Android Development] tonidavid5:
Hi guys,

I finally made the jump to modify my stock Nexus after I updated the 4.2.2. OTA. First thing I had in mind (other than root and custom recovery) was the modified NfcNci.mod.4.2.2.apk from the OP.

First I tried to install the zip, available a few posts back, through TWRP recovery, but that didn't seem to work, so I just copied the modded apk manually, changed permissions and renamed the .odex file. That did the trick.

Problem is I'm seeing a huge battery drain. First night after updating to 4.2.2, with stock nfcnfi apk, I fully charged the phone before going to bed, and even while remaining connected to the home wifi, overnight drain was insignificant, below 1% per hour.

Last night, however, with modded nfcnci apk installed, I left the phone overnight after a full charge.... and to surprise, the battery drain had gone up to 20% roughly over a 7,5h period. Not even with the waklock issues on 4.2.1 stock did I have such bad battery behaviour with the phone basically doing nothing.

Post 4.2.2 update I really have very few other new apks installed; only ones I recall are Sidebar and Dashclock...but people having those swear bat drain is not an issue with those.

What are your battery drain results with 4.2.2 before/after modifying the NFC polling apk?

Just in case, I've reverted back to stock nfcnci.apk and renamed back the .odex, rebooted, and will see what the results are overnight after another full charge.

Cheers!
[Nexus 4 Android Development] doumer:
that drain seems huge...well, screenoff polling increase drain for sure, got used to it on my HOX, but with my nexus 4 I use the while on lockscreen apk (great thanks to OP for modding this...nfc without to unlock the phone is really essential for me!) and the drain isn't so much more then usual. in 12h with about 10h 3g and 2h wifi connection and light usage I use about 40%
[Nexus 4 Android Development] Stryder5:
Install Better Battery Stats to dig to the root of the problem. I have this mod and on idle (with a bunch of things syncing), I lose about 1% per hour. With moderate usage, I average 5% drain.
[Nexus 4 Android Development] vielfalter:
Works also with Display off!

Hi there,

I installed the 4.2.2. stock version from the original post. NFC tags are read also when the display is off! Did I do something wrong? Is that still the display-off-version?

Any help appreciated,

thx
[Nexus 4 Android Development] Smudola:
Same here. Works with screen off.
[Nexus 4 Android Development] Kazliux:
same here. strange. i was sure that it didn't worked with screen off. hm
[Nexus 4 Android Development] Looloup:
Just tried this on my otherwise Stock (but rooted) N4.

Works OK with screen off - which is a bonus, as I thought it was menat to work with screen on but still locked

Has anyone tried this on an N7 ?
[Nexus 4 Android Development] Chill0utb0y:
Hi,

I use some nfc-tags to mute my phone. So, I dont want it to make a sound. I tried to modify the apk (for cm/parandoid android). With apktool, I decompiled the apk, modified a smali file, rebuild it and replaced the newly generated classes.dex with the one of the apk. The result is that the apk doesnt work. The Nfc-Service doesnt even crash, it just doesnt recognize any nfc-tag.

Can someone explain me what went wrong or how to modify the apk properly? I attached my modified smali-file so you can see what I tried.
[Nexus 4 Android Development] 4L3xN3t:
Hi there!

I've a stock rooted N4 with 4.2.2.

I've almoust the same problem had the user in the following post

I downloaded the NfcNci.mod.4.2.2.apk file posted in the first page, used ES File Explorer to backup the old apk and odex files and to replace the new apk in system/app. rebooted the phone, I pratically have no more NFC on the phone, tried to replace the old apk, and changed permission to 644, rebooted twice, but nothing changed....no more NFC

but then I read this:

Is it true? why isn't written in the firs post!?!?

is this true too? have I to rename odex file to make the old NFCNci.apk file to work properly?

HELP ME!!!:rolleyes:

thx

[UPDATE]

I re-tried to replace the old apk, rebooted then went to settings>app and found "NFC Service"...deleted cache and data, stopped app and tapped over "uninstall update"...

once rebooted NFC come back working...OK! very happy...then I tried to check if the apk was really the old one, but found still the modified apk (dimension and last modified date are not the old one)...in fact trying to use NFC with SCREEN OFF it can read tags!!!!! mhhhhhhhh....this will drain my battery, isn't it?

I think I need to revert back to the correct OLD APK...any idea?

thx
[Nexus 4 Android Development] vitalgrados:
Works great on cm10.1-RC2, thanks!
[Nexus 4 Android Development] tofsla:
but doesn't work on stock 4.2.2

Could somebody modify stock apk to work with screen on-lock on and put it here, please?

discovered this tread. http://xdaforums.com/showthread.php?t=2122019&highlight=battery

its 4.2.2. stock apk works with screenON|lockON + add a very nice TagLost feature

PS No. It is for screen off either :(
[Nexus 4 Android Development] Robogar:
For anyone who copied over their stock NfcNci.apk, found that the modified APK isn't for them, and wants to go back to default NFC APK.
[Nexus 4 Android Development] THE-E:
Compatible with Android 4.3 ?

Does anybody tried to use it with Android 4.3 on the Nexus 4 ?

greets

THE-E
[Nexus 4 Android Development] jinx90:
Tried it just now on stock 4.3, on reboot got stuck with an error message saying something to the effect of nfc service has stopped. Pressing OK just results in the message disappearing for half a second then coming back again before you can do anything on the phone. Since I used ES File Explorer to swap the apk not adb, I had no way of putting the original file back so just restored a nandroid backup.
[Nexus 4 Android Development] Stryder5:
chgamauf made a version for 4.3 this. I'm about to flash a 4.3 ROM later today or tomorrow so I can't personally verify whether it works or not. http://xdaforums.com/showthread.php?t=2391170
[Nexus 4 Android Development] Segarra:
I have the same problem... but I dont have any nandroid backup, because Im only root, now I cant do anything.. :( someone could help me?

Thanks
[Nexus 4 Android Development] jinx90:
You can always adb in and restore it that way, someone else can probably give you more help than I could with that though.
[Nexus 4 Android Development] Ameisentaetowierer:
Just patched my own NfcNci.apk for Stock 4.3

You need root and have to mount /system read/write for installation!!!

Backup and remove NfcNci.apk and NfcNci.odex (in /system/app) then copy new NfcNci.apk to /system/app/NfcNci.apk and change filemode to 644. Then reboot.

I've also removed /data/dalvik-cache/*NfcNci* - though..don't know, if neccesssary.

It works with screen locked/unlocked, but not, when screen is switched off (this would prevent the device from deep sleep)

Link:

https://mega.co.nz/#!M1MnVQYY!AufHPEfkIszoYxEr00njK09_LCkkVyzVpr4CP8wSSl4

Micky
[Nexus 4 Android Development] yoko89:
is there a file for the 4.3 ?
[Nexus 4 Android Development] Stryder5:
Read the past few posts...
[Nexus 4 Android Development] Mircolino:
I have a Galaxy S4 Google Edition running Android 4.3 but the NfcNci.apk is obviously not stock since I tried yours and it doesn't work. I'd love to modify my version and then share it.

Could you tell me which .smali file you patched and with which values?

Thanks!

---Mirco.
[Nexus 4 Android Development] Ameisentaetowierer:
Hi Mirco,

I've patched the file NfcService.smali

The line containing "const/4 v2, 0x3"

has to be changed to "const/4 v2, 0x2"

For better understanding I've also pasted the meaning of these values to the code below.

Simply spoken, the content of variable v1 (current screenstate) is compared to variable v2 (screenstate at which NFC should be activated).

If v1 is less than v2, jump to :cond_da, else enable polling NFC.

Something which was very important for me:

I had to use the latest tools to make it work.

Java 1.7

baksmali-2.0b5.jar (with parameter "-a 18")

apktool-cli-2.0.0-Beta5.jar (selfcompiled from GIT repository!)

Hope it helps

Micky

.field static final SCREEN_STATE_OFF:I = 0x1
.field static final SCREEN_STATE_ON_LOCKED:I = 0x2
.field static final SCREEN_STATE_ON_UNLOCKED:I = 0x3
.field static final SCREEN_STATE_UNKNOWN:I = 0x0

---------- snip -------------

iget v1, p0, Lcom/android/nfc/NfcService;->mScreenState:I

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

if-lt v1, v2, :cond_da

.line 1684
if-nez p1, :cond_aa

iget-boolean v1, p0, Lcom/android/nfc/NfcService;->mNfcPollingEnabled:Z
[Nexus 4 Android Development] Mircolino:
Micky,

thank you so much for the tip.

First I started fiddling with POLLING_MODE and that obviously didn't work. Then I started modifying the method checkScreenState() forcing it to always return either SCREEN_STATE_OFF or SCREEN_STATE_ON_UNLOCKED but that didn't work and I didn't like it either.

Your suggested modification was spot on and worked right away with one caveat: now Google Wallet no longer works and crashes every time. Is Google Wallet on your device still working OK?

Could it be because now NfcNci is deodexed, or maybe because I did something wrong in repackaging it?

For others trying to patch the GT-I9505G 4.3.JWR66V version of NfcNci.apk:

this is how the code looks in NfcService.smali:

iget v2, p0, Lcom/android/nfc/NfcService;->mScreenState:I

const/4 v4, [COLOR="Red"]0x2[/COLOR]

if-lt v2, v4, :cond_164

.line 2949
if-nez p1, :cond_e9

iget-boolean v2, p0, Lcom/android/nfc/NfcService;->mNfcPollingEnabled:Z

I used the following tools:

baksmali-2.0b5.jar

smali-2.0b5.jar

dex2jar 0.0.9.15

jd-gui 0.3.5

To disassemble: java -jar baksmali.jar -d <framework_dir> -a 18 -x NfcNci.odex

To assemble: java -jar smali.jar -a 18 -o classes.dex out

To create classes,jar: d2j-dex2jar.bat classes.dex

To view source: open classes.jar with jd-gui.exe

once patched the NfcService.smali file I recreated the classes.dex, added it back to NfcNci.apk and run it through zipalign.exe

Used adb shell to rename /system/app/NfcNci.apk to NfcNci.apk.org and /system/app/NfcNci.odex to NfcNci.odex.org, then pushed the new apk over and rebooted.

[Updated on 09/05/2013] By applying the modification to the enforceNfcIntegrity() method suggested here, google wallet is now fully functional.

The patched NfcNci.apk for the GT-I9505G 4.3.JWR66V can be downloaded here.

---Mirco.
[Nexus 4 Android Development] Ameisentaetowierer:
Hello Mirco,

I'm from Germany. Looks like the wallet app isn't available here.

Google's website says, it's only available in the US. :eek:

If the phone can do financial transactions via NFC, then I wouldn't wonder if Google does some extra security checking in wallet.

And before someone tries to patch wallet too....if I was Google, I would do some selfchecking in wallet too. :D

Micky
[Nexus 4 Android Development] seanw712:
Hi,

Anyone here who could help me with my issue?

I'd be eternally thankfull!!!!

See: http://xdaforums.com/showthread.php?p=48976088#post48976088
[Nexus 4 Android Development] Ameisentaetowierer:
Here's a patched NfcNci.apk/NfcNci.odex for 4.4.2

You need to copy BOTH files to /system/app, then change permissions for both files to 644 and delete dalvik-optimization from previous version (rm /data/dalvik-cache/system@app@NfcNci.apk@classes.dex), then reboot.

Without NfcNci.odex it takes several seconds for your device to switch from "screen off" to "screen locked".

Download:

https://mega.co.nz/#!coMlWTDB!ZLbywTyXyjQHbq1e0TMMolsbfvh3WHtmZvNVDdMCqKI

Micky
[Nexus 4 Android Development] quicksand10:
This functionality on Stock KK 4.4.4

Hey all,

Sorry for reviving this old post.

I updated to Android KitKat 4.4.4 recently, but I didn't realize I would lose this functionality.

Any way to have NFC working on screen lock on stock Android 4.4.4 (KTU84P)?

Thanks!

EDIT: Upon more research, the NFC LockScreenOff Enabler Xposed module does exactly what I want.

http://xdaforums.com/xposed/modules/mod-nfc-unlocking-based-t2478163
[Nexus 4 Android Development] thebrainkafka:
Delete
[Nexus 4 Android Development] elmerohueso:
Any chance of someone taking a crack at getting this working on Lollipop?
[Nokia Lumia 920] Strike_Eagle:
Alright , several people here might be familiar with my name and my review of the HTC TITAN back in the day. Do i decided to give Nokia a go this time.

So... i got my 920.

I will try my best here to explain everything that an advanced users like most of XDA members here are looking for.

Most of the Cyan 920 are only available online on AT&T , i got a Dev from Nokia hook me up with one so don't ask me why or how i get it.

Open it up, i must say i am impressed with the design and the color, it is a little bit bulky compare to the old built-like-a-tank TITAN , but it doesn't hurt my feeling.

Because the 920 use the microsim , so i have to cut my sim to make it compatible (if you don't want to spend like $5 for a cutter, go online, there is plentiful template out there for you)

The Cyan color is definitely catchy and i am glad that i got it. The device feel great in hand, but somehow i feel it kinda fragile. (i got a case for it anyway). And of course, Nokia doesn't allow you to throw away your old batter and put a new one in. It is secured inside that polycarbonate cover.

The Camera on the back look sleek and beautiful, but there is still questions about it, ( i will cover it tomorrow on the second post)

First boot, start up just fine, little bit longer than i expected.

The screen is the WXGA one , mean you still hold the same ratio from the old Windows Phone but with lager Pixel Density. (this one is 331 i believe). I mean , all the tile look very sharp and beautiful on the 4.5 inch IPS display from Nokia. The glass is the Gorilla Glass so at least i don't have to worry about it getting scratches easily, but screen protector is still recommended, i am still looking for a good one. The super sensitive screen prove itself , i can wear gloves and still navigate around easily.

The 920 is the LTE phone, so if you have a GoPhone service like me, you will have to add the VPN to get HSPDA to work. (wap.cingular). But overall , it work just fine.

So, first impression over the phone and compare to HTC TITAN II?

The phone is about the size of the TITAN II, longer and a little bit thicker. It is a little bit heavier in my hand but it is hard to notice. While TITAN has the usb port on the side , the Lumias seem to have the USB on the bottom of it (i like it)

The screen is definitely a plus for the Lumia, the picture sure as hell look sharper even though we all agree that pictures still look beautiful on TITAN and TITAN II. But because of smaller screen size and higher resolution, the image will be better on the Lumia/

As the first impression, i feel happy with the purchase, but the fun part has not yet come.

I will go over the hardware and software part tomorrow or so, keep the questions and request coming, i will answer.
[Nokia Lumia 920] Strike_Eagle:
Reserved
[Nokia Lumia 920] schettj:
I also went from a titan to the 920 - agree that size wise its a wash, and the slightly greater weight isn't an issue. On AT&T LTE, you can really feel the network speed difference between that and "4G" on the Titan.
[Nokia Lumia 920] Strike_Eagle:
Sorry that i have some projects i need to codes and test before the end of next week. Something i didn't expect.

Sorry about the delay.
[Nokia Lumia 920] jonx15:
I just bought the 920 and also have a Titan 2..

I've noticed the 920 does open apps a little faster but on opening maps...both using bing maps..

the Titan is smoother scrolling around...I don't really play games so I can't compare that..

Honestly...I prefer the build on the Titan...whenever (if ever) they release 7.8 for the Titan..I could see myself selling the Nokia....
[Nokia Lumia 920] Crack920:
blue color is very nice:laugh:but my city cant to buy it,only white and black .,
[Galaxy Tab General] generalnod:
I just started using nightly CM 10 builds (at the moment Dec 1 build which puts my cpu at 90+ % boo) and didn't find the linked changelog from the developer thread

CHANGELOG.mkdn

very helpful at all regarding what's changed between builds.

in case it's helpful to someone else who doesn't know about it, here's one that is helpful that I dug up

changelog DOT bbqdroid DOT org/#p1c/cm10/next

yes you have to assemble the link yourself sorry.

cheers
[Galaxy Tab General] speedyg0nz:
Try BBQTools app. Shows daily changelog (device specific) and even allows flashing of new dailies through the app itself.

https://play.google.com/store/apps/...d.bbqtools&feature=more_from_developer#?t=W10.
[HTC EVO 3D] cedsays:
Few days ago I returned back to stock using this guide.

http://xdaforums.com/showthread.php?t=1578977

After successfully doing so I did the update and I now have Hboot 1.58. Android 4.0.3 I want to root my phone again and was wondering if this guide works with hboot 1.58

http://www.youtube.com/watch?v=M3jbZZWKwkY&list=UL
[HTC EVO 3D] Flashalot:
Ramjet73 post helped me out a lot [Guide] Quick And Dirty Evo 3D/V Root & S-OFF (Sprint and Virgin Mobile Only)

Also zedomax has a tut on this

Sent from my DarkSense3D
[HTC EVO 3D] cedsays:
For the wire trick would a umm.. bread tie work? I think I saw someone said they used it but not sure if it worked for them.
[HTC EVO 3D] coal686:
I think someone used a paper clip wrapped in scotch tape
[HTC EVO 3D] Flashalot:
Ghetto style jk but I can confirm that that work did it when I did not feel like going in the garage

:D

Sent from my DarkSense3D
[HTC EVO 3D] cedsays:
I don't have a paper clip LOL what about the bread tie thing? lol
[HTC EVO 3D] cedsays:
The twist tie that comes with a loaf of bread works! Finally S-OFF
[HTC EVO 3D] Flashalot:
Lol now flash you can flash any thing splash screen, kernels, and any Roms

Sent from my DarkSense3D
[HTC EVO 3D] DarkRazorZ:
I actually did that myself... I still have it :o
[HTC EVO 3D] Flashalot:
I still have my wire why?

Because it symbolic

*every one looks away*

It's not creepy

Sent from my DarkSense3D
[Nexus 7 Q&A, Help & Troubleshooting] stonecb:
I am so confused at this point that I have to ask for help. I DID search but couldnt find the answers that related to my current situation. I am keenly aware after watching the video that I do not want to cause a stir by posting perhaps a subject thats been covered over and over but here I go.

I purchased a Nexus 7 WiFi only and have updated to 4.2.1 build JOP4OD. I want to load a custom ROM, specifically:

http://xdaforums.com/showthread.php?t=1830016

I have downloaded said "ROM, along with Nexus Root Toolkit 1.6.1. I have the drivers installed on my PC (win7 x64) with the device showing up under "portable devices."

I have tried all that I can to get the custom ROM to work and for the life of me I cant get it to load so I opened up the Root Toolkit and hit "Flash Stock + unroot."

I rebooted and installed the system update that was downloaded. So here I am and am asking for someone to please walk me thru getting the custom ROM on my device. Feel free to dummy down the steps for me. Clearly I need it after my failed attempts.

Thanks so much for any help.

Regards,

Chris
[Nexus 7 Q&A, Help & Troubleshooting] OhioYJ:
I use MSkip's Toolkits for all my Nexus devices.
[Nexus 7 Q&A, Help & Troubleshooting] fljoe:
Steps I took to install the ROM

Here's what I did:

1) Downloaded and installed Wug's Nexus Tool Rootkit v1.6.1 (http://xdaforums.com/showthread.php?t=1766475)

2) Using the above toolkit (it is GUI driven) made a complete backup first

3) Clicked on the "Unlock" button on the GUI to unlock my Nexus 7

4) Clicked on the "Root" button to root my device

5) Downloaded GooManager from the Google Play store

6) Installed latest TWRP using GooManager (Tutorial: http://www.youtube.com/watch?v=leCiKG9-tNc)

7) Downloaded CleanRom to my PC (http://xdaforums.com/showthread.php?t=1830016)

8) Copied this downloaded ROM to Nexus 7

9) Rebooted to TWRP recovery

10) Wiped Data and Factory Reset using TWRP recovery

11) Flashed the ROM

12) Rebooted device using TWRP

13) Booted automatically into the new custom CleanROM and it runs great.

Good Luck!
[Nexus 7 Q&A, Help & Troubleshooting] veeman:
Follow this guide.

http://www.androidcentral.com/how-unlock-bootloader-and-root-your-nexus-7

After you have unlocked and installed a custom recovery, just

adb push C:\File_path_to_rom_on_computer /directory_where_you_want_the_ROM_to_be_on_Nexus7

And then wipe and flash the ROM.

Sent from my Nexus 7

Stop... MUFFIN TIME!!!
[Nexus 7 Q&A, Help & Troubleshooting] stonecb:
fljoe:

Thanks.. your steps worked like a charm!!!!

All I need do now is learn Android and NovaLauncher etc.

Thanks so much!!!! Just awesome!!!
[Nexus 7 Q&A, Help & Troubleshooting] veeman:
If someone helps, please click the thanks button as a token of appreciation. That's what it's there for. :thumbup:

Sent from my Nexus 7

Stop... MUFFIN TIME!!!
[Samsung Galaxy Nexus] silver03wrx:
http://xdaforums.com/showthread.php?t=2023154

OK I COMPLETED MY TORO BUILD OF AOCP NEED TO MAKE URE ALL IS WELL BEFORE I POST IN DEV SECTION NEED SOME TORO USERS TO PM TO TEST
[Samsung Galaxy Nexus] silver03wrx:
the link in above post is aocp if u are not familiar with it. dont flash it its my toro plus build. i need my toro build tested before i make public
[Galaxy Note 10.1 Q&A, Help & Troubleshooting] CuBz90:
Is there any TV Out function on the Note 10.1 such as using MHL?

Thanks

Edit: Never mind I found the answer here:

http://www.clove.co.uk/samsung-galaxy-note-101-mhlhdmi-adaptor
[Galaxy Note 10.1 Q&A, Help & Troubleshooting] SSThing:
These are currently £13 at PCWorld if you can find them in the store, usually with the Samsung accessories section by the TV`s, no-one in the PC section will have a clue.

Cheers
[Galaxy Tab Q&A, Help & Troubleshooting] jmcandrews83:
im looking for a good daily driver that has good speed and functionality and running ics. do ya have any ideas?
[Galaxy Tab Q&A, Help & Troubleshooting] AvRS:
Hi, best ROM threads aren't allowed as they are very subjective. A good daily driver for some may be completely unusable for others so the thread just ends up confusing more than helping anyone. The only way to find out what's best for you is to read the changelogs in the ROM threads and then flash the one/one's that are best for you.

Thanks

AvRS
[Samsung Galaxy Fit GT 5670] NocturnalDroid:
So, last night I got drunk and dropped my phone into my toilet as it was flushing... :rolleyes: ... the middle button is broke and for the screen is partially dead, however the phone still turns on but now I am stuck in recovery CWM because for some reason I thought it would be a good idea to try re-flashing my ROM to get auto-rotate to come on so i can access the stuff where ther dead part of the screen was... but I forgot home button did not work and now I can't make selections.... Help? I tried to use ScreenCast to control but it isn't working....
[Samsung Galaxy Fit GT 5670] eccos:
keys r in shortcircuit, leave then in a jar of rice , to extract moist, an then open it and clean the keys contacts with isopropolic alcohol and a toothbrush
[Samsung Galaxy Fit GT 5670] NocturnalDroid:
tried the rice thing over night ... gave up and bought a galaxy ace lol.
[Samsung Galaxy Fit GT 5670] SohamJ:
wow that was quick ! :eek: :p
[Samsung Galaxy Fit GT 5670] NocturnalDroid:
I know but I took a damage assesment and figured it was only going to get worse as I got stuck in recovery I tried to flash a new ROM using odin and I also tried rebooting using ADB and now it's just stuck in a constant bootloop, lol. So successfully managed to brick the phone at the same time as water damaging it! Yay me :p

Galaxy Ace is an early birthday present so I could get a replacement phone ASAP :p I am selling remainder of Galaxy Fit to Mazuma Mobile for recycling at £10.00 so not all is lost! Lol.