yashsingh1/xdaforums huggingface dataset:
[Nexus 9 Original Android Development] flar2:
I just have generic otg cable and generic y-cable from ebay, I bought them a long time ago and have no idea where to get the same ones today.

Others here on XDA are successfully charging while using OTG, maybe one of them can help you. Since this feature is present even on stock kernel, perhaps you could make a thread in the General section to catch more attention.
[Nexus 9 Original Android Development] italynstylion:
Thanks for the replies. I found the thread linked below where people stated that it does indeed charge but for whatever reason the OS doesn't state it's charging. Meaning, no lightning bolt icon in the header but the tablet is indeed taking a charge. I've just verified this is the case with my cable too. Now it's time to build a new dash kit/mount for the truck! :laugh:

http://xdaforums.com/nexus-9/accessories/charging-nexus-9-using-otg-cable-usb-hub-t2950726/page2
[Nexus 9 Original Android Development] italynstylion:
[MENTION=4684315]flar2[/MENTION] can you post a quick screenshot of your Nexus 9 charging whith a USB device such as a flash drive plugged in? Does yours SHOW it is charging in the notifications bar?

The reason why any of this even matters is I'm planning to install the tablet as a headunit and use Tasker to automate a bunch of stuff for when the vehicle is turned off (airplane mode, kill all apps, disable wake alarms, etc) using charging status as my trigger. I'm still unsure if Tasker will recognize the tablet is charging due to the fact mine doesn't SHOW that it is. Your kernel monitor shows the correct charging status but for some reason the OS does not.
[Nexus 9 Original Android Development] DroidIt!:
If Ex is showing, and you can double check under battery settings, then I wouldn't worry about it personally. UI glitch ;)
[Nexus 9 Original Android Development] flar2:
I don't have any of this with me at the moment. But if my app is showing charging, then Tasker will too. The charge indication in my app is based on battery intents broadcast by the system. These same intents will be available in Tasker.
[Nexus 9 Original Android Development] italynstylion:
Wonderful....thanks for the responses guys. There's hope for my project yet!!!
[Nexus 9 Original Android Development] DroidIt!:
Just for clarification :) Double check under system battery settings. If that's backing up the ex app then there's nothing wrong with your tab and it's a ROM ui glitch. ;)
[Nexus 9 Original Android Development] italynstylion:
Noted.

Question I didn't see answered in the first post....is this kernel ONLY for the stock ROM or will it work with other custom ROMs?
[Nexus 9 Original Android Development] DroidIt!:
Works with every one I've tried so far. You might run into the oddity here or there, but it's mostly stock with some tweaks...some good tweaks :)
[Nexus 9 Original Android Development] italynstylion:
I've tested our theories with a Tasker profile set to launch an app when the device is plugged in. All tests show the device has no idea it's plugged in even though it's receiving a charge. Even battery stat apps can't tell. What. The. Hell.

PS: I've tried flashing the completely stock factory image and it still doesn't work. No idea what's going on.
[Nexus 9 Original Android Development] flar2:
Didn't you say my app detected the charging? If so, which screen is it?
[Nexus 9 Original Android Development] italynstylion:
I've taken what may be the best screenshot in the history of man.

-The screenshot shows your kernel manager stating the device is charging in the upper left corner.

-The notifications section on the top right (battery logo) states the device is NOT charging.

-The battery stats app shows it's not charging.

-Tasker states no profiles are active (only profile setup is to recognize charging and launch a simple app).

Sitting here scratching my head...

[IMG="http://dl-1.va.us.xda-developers.com/3/6/1/7/9/0/9/12596867_10101154543552444_669657494_o.jpg?key=iIS0ueO6nfApE6dLXU9XQw&ts=1453407930"]http://dl-1.va.us.xda-developers.com/3/6/1/7/9/0/9/12596867_10101154543552444_669657494_o.jpg?key=iIS0ueO6nfApE6dLXU9XQw&ts=1453407930[/IMG]
[Nexus 9 Original Android Development] flar2:
I don't use Tasker, so I'm not sure how it works.

In my app, I get the charging status exactly like described here: http://developer.android.com/training/monitoring-device-state/battery-monitoring.html

That means I'm using the intent Intent.ACTION_BATTERY_CHANGED

getting the status from BatteryManager.EXTRA_STATUS

and saying it's charging if the status == BatteryManager.BATTERY_STATUS_CHARGING

I think that intent should be available in Tasker, but someone more familiar with Tasker would have to explain how to use it.
[Nexus 9 Original Android Development] DroidIt!:
You tab doesn't die on you though? I mean the battery does take a charge and refill in reality and it's just not reflected in anything you try to get a reading with?

And did you clean out everything including internal storage when flashing stock? And did you restore anything from TiBu after going stock? <---- ideas of other things to think about :)
[Nexus 9 Original Android Development] italynstylion:
Yep, totally clean. Even formatted internal storage. In fact, I did a hard factory reset and flashed the stock images over. Then I installed TWRP and blew everything away to start from scratch.
[Nexus 9 Original Android Development] flar2:
I'm not seeing any difference.
[Nexus 9 Original Android Development] DroidIt!:
I'd say it's probably either a cord then or the port on your tab. I got my cords only about 2 months ago and I noticed as I shift, the contacts must not be hitting the inside of the port well. Even though I thought I had it plugged in, I saw my tablet drift in and out of actually charging. This may have been your case. If that doesn't seem to be the case then it might be an internal hardware issue.

---------- Post added at 06:31 PM ---------- Previous post was at 06:31 PM ----------

No difference here either. :)
[Nexus 9 Original Android Development] italynstylion:
I noticed the device only charges if you plug everything into the OTG cable and THEN plug the cable into the device. If you remove the power from the wall or from the OTG cable and then plug it back in it will not charge after that. I think it might be a hardware issue. My OTG cord works just fine on the Nexus7 I have.

Can you confirm your Nexus 9 allows charging via OTG with a flash drive plugged in and SHOWS it on yours via a screenshot? I'm on the phone with Google and HTC and they're not very helpful. I just need to confirm if my device is defective or not before I get a replacement. Sorry to be so annoying. :(
[Nexus 9 Original Android Development] italynstylion:
Also, I just found out my device is an international version (bought off Amazon). Is that an issue? I'm wondering if any differences exist and would they cause the problems I'm having?
[Nexus 9 Original Android Development] DroidIt!:
Lol. Well, I do have an otg cable...an old one. Yeah if you wouldn't mind waiting till tomorrow I've been kinda sick here and took all my fabulous drugs and feeling the effects now. I might try to plug into a wrong hole. :silly: That's no problem though. I'll have a dig through my cords. I have a pretty good idea where it is. Lol, I never throw anything out. But I know have two regular cords that definitely work and a mini USB that works good with the otg.
[Nexus 9 Original Android Development] DroidIt!:
Just so you don't think I forgot :) got busy yesterday and I'll take a looksie today and let ya know what I see :)
[Nexus 9 Original Android Development] italynstylion:
Awesome! And I hope you're feeling better!
[Nexus 9 Original Android Development] DroidIt!:
:) Sorry school's kept me busy. Well, my otg must be a little too old. If I remember right I got it when the N7 first came out. My N9 didn't respond to it at all. I would guess though it's as flar said and it's probably your cable. If you go to Amazon though I've found those one's marked Amazon Basics products work just as well as any brand name and they're usually half the price. I'd give one of those a try. One of the reason's I think it's probably your cable is I have seen people in the past in here say they've had problems getting their tab to read the external storage but not charging. So the rule of thumb I've always used is that if I'm the only one I should probably look at my setup and usually digging into my own stuff or clean flashing or looking at mods has always fixed it...and sometimes that's included buying a new cable. :) Well, hopefully you get it figured but I'd personally do a clean flash and if that doesn't work then hit Amazon. ;)
[Nexus 9 Original Android Development] italynstylion:
I figured out that it will charge only if you plug the devices into the OTG cable FIRST and THEN plug the OTG cable into the device. However, it still doesn't show it is charging. If you removed the power from the wall and then plug it back in the device won't charge (showing or not).

I have a US spec Nexus 9 that should arrive tomorrow. Had to get it straight from them because ATT uses LTE bands not supported by the international version. We shall see what happens when I test this new one.
[Nexus 9 Original Android Development] DroidIt!:
Huh, that's interesting. Have you thought about trying a different cable? I've not played with otg myself, is all of that normal? I mean it being so finicky. Do other people have that many problems with it? If no, then I'd definitely do a different cable. Lol, sounds like there's a whole lot of ways you can knock it offline, unless you're just planning on plugging in and forgetting it. :)
[Nexus 9 Original Android Development] italynstylion:
Tried a different cable and the new US Spec Nexus 9 came in last night. It doesn't seem to work with it either.

[MENTION=4684315]flar2[/MENTION] Not sure if you're familiar with Timur's kernel for the Nexus 7 but the main feature of that kernel was to add TRUE charging support over USB OTG. Do you think there's any way to figure out what he's done to try and get that type of feature in your kernel for the Nexus 9? He has quite the following and they are all looking to get off the Nexus 7 device onto something newer like the Nexus 9. I'd be happy to help with the process where possible. Here's a link to his page.

https://timur.mobi/
[Nexus 9 Original Android Development] italynstylion:
And to add further clarification. This feature is available in the Nexus 7 version of the Elemental-X kernel. It's listed in the feature set, second from the bottom on the web page here. http://elementalx.org/devices/nexus-7-2013/

Is there any particular reason that couldn't be added for the Nexus 9?
[Nexus 9 Original Android Development] kacanghantu:
hi guys..i dont know why,when i charge my tab all night,but it charge to 67%.normally when charge all night,it suppose to be full..after reboot,battery indicate 99%..i dont know which is can cause this..i use pure nexus project rom and elementalx 4.06..thanks in advance
[Nexus 9 Original Android Development] italynstylion:
I also noticed this on my first charge after flashing Pure Nexus and ElementalX. Haven't charged the tablet since (I'm doing an extended test of airplane mode battery life) so I'm not sure what it's like on the second charge, third, etc....

Try charging it again tonight and then let us know if you experience the same thing.
[Nexus 9 Original Android Development] kacanghantu:
its been 2 days(2 all night charging)..still happen same behavior..on 1st charge,i leave all night with tab off..in the morning still charging logo,but when turn on battery indicator 99%..last night charge all night with tab on..it charge to 67% but after reboot battery indicator show 99%..i dont know how to get log(sorry)..thanks italynstylion
[Nexus 9 Original Android Development] DNarsingh:
It's a problem with the ROM guys, not this kernel. You can read in the ROM thread that its a problem everyone is having.
[Nexus 9 Original Android Development] kacanghantu:
thank DNasingh..but it never happen with fire ice kernel..i'm sorry,i'm not compare this two kernel..just to inform
[Nexus 9 Original Android Development] italynstylion:
Ahhh, good call. Figured as much. Hopefully they get it in the next round of updates.
[Nexus 9 Original Android Development] DroidIt!:
Well it's two different kernels and so will have different components. The fact that you have it plugged in all night your battery will obviously be full, but your gauge is reading 67% until a reboot. That would indicate to me that it's probably a UI glitch with the ROM and probably nothing to be concerned about. But in any case, I'd probably still bring it up with the ROM dev as there might be a deeper issue.
[Nexus 9 Original Android Development] DNarsingh:
Yea for some reason that kernel fixes the problem. Not sure why though. People are also reporting that in the rom thread.
[Nexus 9 Original Android Development] flar2:
There is no problem with charging or battery.

I flashed the latest factory images, then elementalx, and my tablet charges perfectly fine.

I'm extremely busy, please don't report issues unless you have a nice clean system.
[Nexus 9 Original Android Development] kacanghantu:
im sorry sir..so maybe that bug from the rom..i wipe system,data,cache,dalvik and internal storage..but still happen..thank you
[Nexus 9 Original Android Development] madbat99:
It won't happen on stock rom with this kernel. It only happens on pure nexus rom. The only way to fix it on pure nexus is with fire ice kernel.
[Nexus 9 Original Android Development] baronmax:
What would it take to get someone from EX talking to the guy who makes PureNexus for the Nexus 9 so the two pieces of software work together flawlessly? I have the PN ROM on my phone (6P), as well as EX and it's THE best device I have ever used, it's fast, the battery life is amazing, it has all the features I want (plus room to grow). If I could get that same experience on my N9, that would be the best thing ever. I did purchase the EX app, but I'd be willing to make another donation if you guys could get together and make them work together. I wish I knew more about kernels and ROMs so I could give you some useful information to help you fix the issues, but I'm fairly ignorant in this area. Currently, the only Kernel that works well with PN is Fire-Ice and it's a wonky setup (SELinux disabled which adds a whole other set of headaches when I want to change kernels in the future).

Thanks for your consideration.
[Nexus 9 Original Android Development] oo0:
[MENTION=4684315]flar2[/MENTION] trying to build ElementalX for Nexus9LTE from your git. it builds fine without modifications, but as soon as i enable module support via menuconfig, which i need for external wifi - it stops building with hwmon/driver related conflicts. https://paste.debian.net/379921/

With ElementalX kernels for other devices i didn't have that issue, so maybe Git is outdated? please advice.
[Nexus 9 Original Android Development] flar2:
No, it's always up to date.

Why do you need module support?
[Nexus 9 Original Android Development] oo0:
for atheros external wifi, and mounting nethunter fs.

using your modified elementalx for hammerhead and bullhead - no problem, with same setup (just different toolchains)
[Nexus 9 Original Android Development] madbat99:
I'm using pn and ex kernel. They work fine. What's your issue?

If you mean the charging percentage, that's all pure nexus. It does that with no custom kernel. That's a problem in his rom that he would have to fix. Nothing to do with elementalx.

The fact that fire ice kernel fixes it is a fluke that neither developer can pinpoint.
[Nexus 9 Original Android Development] baronmax:
Okay, I will give it a try then, we'll see how it goes. I was a bit leery about trying it due to the battery thing, but as long as it's still charging properly, that's not really an issue. Like I said, I **love** this combination on my Nexus 6P. I have never had a device that was so fast, fluid and worked so perfectly. PN and EX on the 6P are truly a match made in heaven, so I figured I'd try the same thing with the N9 that I got for a steal earlier this week.

Thanks.
[Nexus 9 Original Android Development] flar2:
What if you build them into the kernel instead of as modules?

Check my nexus 7 git, way back. I vaguely remember having to make a fix for some compiler error when I added WiFi modules.
[Nexus 9 Original Android Development] baronmax:
What scheduler and governor do most of you use? On my phone, I use ondemand, but that seems to introduce some lag on the N9 (stock marshmallow 6.0.1 ROM).
[Nexus 9 Original Android Development] ricco333:
ElementalX seems to handle everything I do on the N9 lag free, give it a try maybe it also works for you, Interactive is also a good choice.

Erik
[Nexus 9 Original Android Development] flar2:
Use ElementalX or Interactive.

isched won't make any noticeable difference
[Nexus 9 Original Android Development] baronmax:
The battery life is unbelievable with this kernel and stock ROM. According to the EX app, I'm using 0.24% per hour when the screen is off (which includes both doze and non-doze usage) over 48 hours. That's even better than my 6P (I guess due to LTE services being on). Still, that's amazing and far better than I could have hoped.

Excellent job on this kernel.
[Nexus 9 Original Android Development] sing1gnis:
I'm getting occasional static through headphones when using Google Play Music. I tried raising the min CPU speed, but that didn't help. My 6P with your EX kernel doesn't exhibit this behavior. Any suggestions?
[Nexus 9 Original Android Development] flar2:
I haven't modified sound on here. But it could be any number of things. You could try using interactive.
[Nexus 9 Original Android Development] sing1gnis:
Changing to interactive didn't help, but I did notice that it only happened when the screen was off. Once the screen came on, the problem went away.
[Nexus 9 Original Android Development] TYMO68:
Hello community, would anyone be so kind to please advise of suggested kernel settings when flashing in Aroma for ElementalX? I am presently running MoRoM 2.2 on my Nexus 9 Android 6.0.1 and just went through the Aroma install for the kernel and simply kept everything at default (other than enable USB Fast Charge). Any input and/or suggestions for each Aroma install screen selection would be most appreciative. Thanks again XDA community!
[Nexus 9 Original Android Development] flar2:
That is my recommendation
[Nexus 9 Original Android Development] TYMO68:
flar2, so what is your recommendation ? Nothing shows in your response other than your statement of "That is my recommendation"
[Nexus 9 Original Android Development] corkiejp:
What you have done is what flar2 recommends!
[Nexus 9 Original Android Development] TYMO68:
Thanks
[Nexus 9 Original Android Development] oo0:
forgot to mention, that one didn't fix my issue, fixed it with this.

and changing exportfs.c

please add if possible.
[Nexus 9 Original Android Development] italynstylion:
I took a look at the link you posted. What exactly does that fix allow? It appears to be charging and or power related which interests me a LOT. Would a fix of that nature allow you to charge the device via OTG while other devices like flash drives are plugged in?
[Nexus 9 Original Android Development] oo0:
kernel failed to build with native module support enabled without this changes. there was problem with exportfs also, don't remeber where i've got that one, but now it builds and boots.
[Nexus 9 Original Android Development] italynstylion:
What exactly does module support get you? I'm not familiar with it.
[Nexus 9 Original Android Development] oo0:
[MENTION=4684315]flar2[/MENTION] can you add vibration control to the kernel, please?
[Nexus 9 Original Android Development] Kevin Andrews:
Logcat + Backlight Dimmer

[MENTION=4684315]flar2[/MENTION]

Hello, building elementalx_defconfig, everything works fine, but logcat on device.

While using pure CM13 everything is fine, as soon as I flash elementalx_defconfiged kernel or ElementalX 4.06 - logcat gone from logging apps and no /dev/log/main.

Any way to have it back manually/with your update?

P. S. Please tell is it possible to get Backlight Dimmer function on this device? Too bright to use at night. Thanks!
[Nexus 9 Original Android Development] flar2:
I think I tried this early on and kept getting crashes when I tried to change the vibration strength. Maybe I'll try again when I have some time.

This must be specific to cyanogenmod? Perhaps permissions or selinux issue?
[Nexus 9 Original Android Development] Kevin Andrews:
FireIce kernel has logcat with same setup here, and it definitely being disabled upon flashing EX(even after factory reset), maybe some incompatibility with CM13.
[Nexus 9 Original Android Development] Philaphlous:
Ive always had this since going to this kernel. I honestly thought it was damage from modding my cooling but it's not. Mine is really really bad. Especially with Spotify..

Also, since getting my iPhone 6s I use my n9 way less. I thought the nexus 9 was lag free....wow was I wrong. Compared to this iPhone 6s it's pretty slow actually. The iPhone scores a 16k in octane but my n9 can only score a tad over 9k. The iPhone seems much more stable and just quicker overall because I'm sure it never thermally throttled since it uses like 4 watts...
[Nexus 9 Original Android Development] madbat99:
You should post those results in an iPhone open source development forum. Oh yeah, there isn't one, lol.
[Nexus 9 Original Android Development] oo0:
do you have supersu installed? it borks root permission and logcat is not shown, will be fixed in 2.68.
[Nexus 9 Original Android Development] Beta1440:
I suspect this issue is being caused by the CPU quiet governor. On Elementalx, balanced is set as the default quiet governor. The problem with the balanced governor is that it has a maximum idle frequency of 0.7 GHz which may be too low for playing music. To fix this issue, try:

echo 1224000 > /sys/devices/system/cpu/cpuquiet/balanced/idle_top_freq

Let me know if this works.
[Nexus 9 Original Android Development] oo0:
noticed wifi is shown always enabled, even though i don't really use it. scanning/notification, always on settings are disabled.

some kind of bug? using CM13 on LTE version.

edit: just a bug, wifi is really off, corresponding to other battery meters.
[Nexus 9 Original Android Development] andybones:
So I came across something strange.

Not sure if this is supposed to act this way or not.

I have S2S enabled for both landscape and portrait.

However, it works for landscape while I'm in portrait mode.

For example, while in portrait, if you sweep 2 sleep where the nav buttons would be for landscape while in portrait mode it still turns off the device.

Sorry if this has been discussed before.

Here is a video showing what I mean

https://youtu.be/S8arIpmBDyQ
[Nexus 9 Original Android Development] tdamocles:
Why does it seem that charging is very slow when using this kernel? Anyone else seeing this?
[Nexus 9 Original Android Development] flar2:
The kernel doesn't know the orientation. The S2S coordinates are hrsd coded
[Nexus 9 Original Android Development] flar2:
Not sure why this happens, but it seems to happen on any kernel.
[Nexus 9 Original Android Development] flar2:
UPDATE!!!!

March security update

I have removed the enforcing option from the installer. Selinux is enforcing by default, just as it was before. Removing this option will allow you to use setenforce again. There is no reason to run in permissive mode, but if you must, then use the permissive.zip found here: https://www.androidfilehost.com/?fid=23991606952602503

Download:

ElementalX-N9-4.08

Changes:

-March security update

-remove enforcing option
[Nexus 9 Original Android Development] kacanghantu:
thank mr flar2..but i have 1 question..right now my rom n kernel is selinux enforcing is off..what happen if i download and install selinux enforcing..did my data will erase..thanks
[Nexus 9 Original Android Development] nigelhealy:
deleted, posted in wrong forum oops