yashsingh1/xdaforums huggingface dataset:
[Nexus 7 Android Development] adstraylight:
[MENTION=2188693]AndDiSa[/MENTION]

I've just discovered that if wifi scanning is enabled in the settings, the issue is fixed when toggling wifi off/on.

This accounts for the discrepancy between people's experiences of the bug, ie why for some the problem only occurs when using​ airplane mode.
[Nexus 7 Android Development] AndDiSa:
[MENTION=2583740]adstraylight[/MENTION] that's a great finding! Thank you very much for detecting this. I'll directly try to reproduce it on my device.

Edit: One additional question to you: I cannot find the option to enable / disable WiFi scanning on my device. Can you give me a hint which option you are referring to?
[Nexus 7 Android Development] capounet:
Probably the difference is when WiFi scanning is allowed, the WiFi module is not physically stopped. Rgds, Philippe
[Nexus 7 Android Development] adstraylight:
[MENTION=2188693]AndDiSa[/MENTION]

Just open settings and press the search icon at the top, then type scanning ?

Or go to location settings and press the three dots..

---------- Post added at 10:05 AM ---------- Previous post was at 09:52 AM ----------

Agree, so the problem must lie in initialising the module via the kernel, or perhaps the manner in which it is shut down. That and open network notification, which is just annoying...

As a side note, I always turn off scanning as it saves a significant amount of power when the tablet is sleeping.
[Nexus 7 Android Development] AndDiSa:
[MENTION=2583740]adstraylight[/MENTION] only the second version is working for me, thanks again.

Switching off always scanning I can reproduce the behaviour and I need to reboot the device to re-enable WiFi after I switched off.

To all people not being able to switch on WiFi again: Switch on wifi scan in location settings, it will prevent that the wpa_supplicant is beeing killed
[Nexus 7 Android Development] adstraylight:
Good luck and good hunting...?
[Nexus 7 Android Development] BOBvD:
Where can I activate the advanced reboot menu? I can't find it in developer options?
[Nexus 7 Android Development] adstraylight:
That option is not available in this Rom, as it is simply AOSP rather than a custom variant. I do think it would be a useful addition though...

I use the overflow menu of the Flashify app for advanced reboot options.
[Nexus 7 Android Development] adrman:
Just a FYI, I successfully flashed the latest version and GApps via Chainfire's FlashFire app instead of using TWRP. [MENTION=2188693]AndDiSa[/MENTION], thanks for your efforts to keep the old Grouper alive.
[Nexus 7 Android Development] BOBvD:
Tanks Andy and adstraylight.
[Nexus 7 Android Development] AndDiSa:
WiFi problems fixed

Hi all,

I was able to find the commit which was causing the issues with the WiFi. As attachment you can find the updated kernel, you can flash it using fastboot.

The sources of the kernel I've updated, too. A new release will take a while as currently I do not have a fast internet access but as there is also the workaround described in the OP ...

Special thanks to [MENTION=2583740]adstraylight[/MENTION] who found out the reason for this issue.
[Nexus 7 Android Development] paasoares:
Hi AndDiSa,

The workaround works (thanks [MENTION=2583740]adstraylight[/MENTION]) , but it is not the same thing regarding battery consumption.

With Feb. build, Without wifi location and the setting keep wifi on during sleep set to NEVER, my device loose between 1% and 3 % during one night (say: 23:30 to 8:30). With current build, With wifi location and the setting keep wifi on during sleep set to NEVER the device lost 10% this afternoon (15:00 to 19:00)

Just a question regarding this kernel update :

Installing this is exactly the same as manually change the location setting or it will have the old behavior as Feb version

Thanks for your hard work and effort to keep this device able to run the latest android versions ;)

Cheers
[Nexus 7 Android Development] Andy2No:
I have used fastboot before, but not often and for a while, so I had to look that up.

FWIW, I copied boot.img into the folder where I'd installed ADB, [EDIT: rebooted into the bootloader...] then did this:

C:\adb>fastboot flash boot boot.img

sending 'boot' (6112 KB)...
OKAY [ 6.686s]
writing 'boot'...
OKAY [ 0.266s]
finished. total time: 6.954s

C:\adb>fastboot reboot
rebooting...

finished. total time: 0.020s

It works! Thanks, AndyDiSa.

---------- Post added at 07:49 PM ---------- Previous post was at 07:44 PM ----------

Fair question. Having installed this new kernel, and verified that it works (at least so far - I can turn WiFi off then back on again, and use it), I've checked in Settings->Location->three dots->Scanning and it shows it's off.

Whether that's proof, I don't know :)
[Nexus 7 Android Development] AndDiSa:
[MENTION=342699]paasoares[/MENTION] the new kernel behaves as the new one only that the issue is fixed. If you would like to keep the 'never' settings, you probably shoud lflash the new kernel.

Btw. if you flashed SuperSU in systemless mode it needs to be re-applied afterwards.
[Nexus 7 Android Development] Andy2No:
Thanks. I previously just installed SR3-SuperSU-v2.79-SR3-20170114223742.zip from TWRP, and after flashing the new kernel it wasn't working, and reported there was no binary installed, so I've now done the same thing again, and that worked. It has apparently remembered the permissions granted before.

I am definitely no expert but I recently read an article which said recent versions of SuperSu would install in systemless mode by default, on versions of Android that need it.

After giving up on the Ressurection Remix Lollipop ROM I tried, I tried to restore my backup of 4.4.2. That had worked to restore from a Carbon ROM Lollipop, but it didn't work any more. I've been wondering why, but possibly it was due to SuperSu having been automatically installed in systemless mode? As I understand it, that won't work on KitKat.

---------- Post added at 08:41 PM ---------- Previous post was at 08:37 PM ----------

Is there a way to get the settings menu to have a dark background, other than installing a new theme?
[Nexus 7 Android Development] mamed3000:
little problem

Hi

Great Rom. I just test it and flashed your new kernel.

a little problem i found:

hide password visibility won't work for me
[Nexus 7 Android Development] capounet:
Thanks AnDiSa, new kernel corrects the WiFi bug.

Note, i just flash it using the Flashify app.

Regards, Philippe
[Nexus 7 Android Development] k ahangar:
Hi [MENTION=2188693]AndDiSa[/MENTION]

How I can use MX player or vlc player or other perfect players in this device and this ROM?

I try to play but don't played any videos.

Please help me. Tnx
[Nexus 7 Android Development] DrCheesecake:
Hi [MENTION=2188693]AndDiSa[/MENTION] and [MENTION=2583740]adstraylight[/MENTION].

Excellent work! Many thanks. The WiFi works great now. However, I've noticed that the mobile signal on the tilapia is still affected in the same way the Wifi was (it's there after booting, but disappears after a while/sleep cycle). Could it be a similar issue with the relevant mobile process being forcefully closed? Does anyone else have this issue?

I realise you don't own a tilapia, so let me know if I can provide any debugging information. I have downloaded and built your 20170308 source, but I haven't (yet) got the skill to troubleshoot the issue :).
[Nexus 7 Android Development] adstraylight:
Much as my ego is flattered by the praise, I'm not a developer of this or anything else. All the credit for the actual work belongs to AndDiSa.

All I did was stumble across a connection between an OS setting and the problem, but thanks for the appreciation anyway ?
[Nexus 7 Android Development] :
I hope I don't confuse things....

I updated to the latest ROM (dirty flash over previous version), reflashed SuperSU and gapps. Everything went cleanly and I don't have the WiFi problem. It is grouper, I've got WiFi sleep as 'Never', I haven't got location WiFi scanning on and I haven't flashed the patched boot image... but yet I don't experience any WiFi problems. I'm guessing I'm not the only one and there's maybe a sequence of events or apps that are involved in the problem too. Whatever the case, all okay here!

Excellent work AnDiSa - I'm mighty impressed with what you're doing :good::good::good:
[Nexus 7 Android Development] kwsam9:
I have 2 N7s and only 1 of them has the wifi problem associated with the location scanning when I tested both. For the one affected, I flashed the boot image and the problem is resolved. The one without the problem, I didn't and will continue to test it occasionally to see if it will start acting up in future.
[Nexus 7 Android Development] tomtom_38:
I have the problem that a lot of apps will close suddenly, since i flashed this rom.

is that a known problem ?

is there a solution?

and last but not least, can i flashed the new version without wipe the data?

thanks for help
[Nexus 7 Android Development] AndDiSa:
[MENTION=6811049]tomtom_38[/MENTION] wiping data is needed if you are coming from a different ROM otherwise you will get force closes. When updating to a new version of the ROM, wipe cache and dalvik/art-cache to be sure everything is updated to the latest version. After the update ART is running in the background to optimize the apps which are installed. In that period it may happen that you notice apps closing while you are using them. After a short time of settling this should reduce much / you should not notice it at all.
[Nexus 7 Android Development] tomtom_38:
[MENTION=2188693]AndDiSa[/MENTION] I flashed this rom 10 days ago.( this was my first time I flashed a custom rom) I wipe the data befor i did this

this ist my wifes device, she told me that the apps still close

I still use the version 20170207
[Nexus 7 Android Development] AndDiSa:
[MENTION=6811049]tomtom_38[/MENTION] which apps are force closing? Gapps? In that case the permissions are not set correctly. Probably you booted into the ROM without having gapps flashed or you restored settings / apps from the previous ROM? You can try to adjust permissions manually. It's a bit difficult to give you a specific hint how to solve this issues.
[Nexus 7 Android Development] tomtom_38:
[MENTION=2188693]AndDiSa[/MENTION] Gapps opera and jorte( kalender app).

I flashed all thinks at once.

permissions that sounds difficult, maybe I should flash it again

restoring settings how can i have done this
[Nexus 7 Android Development] JamBax:
just flashed the new boot.img with twrp (3.1) together with supersu v2.79 (without any systemless stuff) it works.

Just one question, this boot.img is for both (grouper and tilapia) devices?
[Nexus 7 Android Development] AndDiSa:
[MENTION=7273907]JamBax[/MENTION] the boot image is for both device types, Tilapia e Grouper. Regarding SuperSU and sytemless flash: It depends a bit on what type of Gapps you are using. There is a chance that the space on /system is not sufficent and if you flash in system mode there is a risk for boot loop / malfunctions.
[Nexus 7 Android Development] SGH-i200:
MultiROM support can't be added to this ROM!?

It seems MultiROM for our old Nexus 7 does not support 7.x ROMs yet!
[Nexus 7 Android Development] Bakica:
Hi AndDiSa,

how can I download boot.img attachment, when I tap on it I can see just black page with two options: save and share (Tapatalk). When I tap save it should downloaded it in download folder, but I can't find it.

Much appreciated your wonderful work, thanks a lot
[Nexus 7 Android Development] Portgas D. Ace:
Use a web browser to access the file if Tapatalk isn't working properly.
[Nexus 7 Android Development] adstraylight:
OT ish, but Today I Learned that if you want to increase/decrease the touchscreen sensitivity, you can use the pointer speed slider (settings - language and input).
[Nexus 7 Android Development] Andy2No:
I bought a second hand Nexus 7 2012 cradle (for my Tilapia) thinking maybe it would simplify charging while using my USB audio (DAC). It doesn't, because as soon as I plug my OTG cable into the USB socket (even with nothing on the other end), it stops charging.

Is there a kernel hack that can be applied to override that? I understand something was done by Timur for the in car installation stuff, and in AudioROM, to allow USB OTG charging, but I can do that via the USB socket with this ROM and new kernel. I'm not sure if they enabled charging via the POGO pins (e.g. in a cradle), while using OTG.

FWIW, my cheap USB power meter shows 0.17A charging via the cradle (from 65% charged) vs 0.53A via the USB socket, with or without the screen on in either case, and with or without OTG, in the case of using the USB socket and an OTG Y lead. I guess the cradle, or the POGO pins connection, was designed to limit the charging rate. I'm not sure if that's enough to stop the battery draining while the screen is on.
[Nexus 7 Android Development] SGH-i200:
USB charging while in OTG mode

You don't need the cradle to do that! Simply use a "Micro USB Host OTG Cable with USB Power" and a kernel that supports USB charging while USB host mode is active.

20170308 (AOSP 7.1.1)

several changes in the kernel

usb hostmode changing patch fixed

Kernels for fixed car installations support "hotplug dac and otg fastcharge, firm sleep from usbrom" https://xdaforums.com/showthread.php?t=2558717
[Nexus 7 Android Development] parrotgeek1:
[MENTION=2188693]AndDiSa[/MENTION]

Thanks for adding parrotmod!

By the way, there are 2 things I would like you to change.

1) there is a way to set low memory killer scale either in framework-res arrays.xml or in activitymanagerservice. Can you use that instead of writing it at boot? (Your value's overridden by activitymanagerservice anyway I think)

2) please use row not cfq as io scheduler if you haven't already
[Nexus 7 Android Development] AndDiSa:
[MENTION=5723969]parrotgeek1[/MENTION] thank yo very much for your hints and suggestions, I'l try to integrate them into one of the next versions. Thank you, too, for all your work regarding performance improvements of our beloved Nexus 7.
[Nexus 7 Android Development] Andy2No:
I'm aware that I don't NEED a cradle to do that, and if you read the rest of that post you'll see that I've confirmed that AndDiSa's latest kernel already does it.

However, I WANTED to use a cradle to provide power while using OTG or otherwise, mostly to save wear and tear on the notoriously flimsy micro USB socket. They're a poor design, mechanically, and they were never meant to have a heavy assortment of cables and adapters hanging from them. Also, just plugging a cable in and unplugging it wears them out soon enough.

So, my ideal solution would be to use cradle charging as much as possible. Ideally, I'd leave the OTG adapter cable in place as much as possible too, and support the weight somehow. Unfortunately, various things are only trigged by the act of plugging a cable into the socket, especially sensing an OTG device.

I'd like to be able to tell it in software that I've connected a device, rather than having to physically plug in a cable to the fragile micro USB socket. I'd also like to be able to make it take power from the POGO pins (Asus cradle or your own home made substitute) regardless of what else is happening.

FWIW, I've confirmed that having the screen on, and an app running (in this case a spectrum analyser app, listening to the in built mic, so fairly intensive CPU usage) drains the battery while taking power from the cradle at 0.17A (according to the cheap USB power meter). Next, I'll try just leaving it showing the stock launcher and see if it still does it.

---------- Post added at 03:34 PM ---------- Previous post was at 03:08 PM ----------

Yep, with just the screen kept on, at a fixed lowish brightness level (the level I use in the evening, which is maybe 10% of the slider), showing the stock launcher with no wall paper (all black), it's still slowly draining the battery while taking power from the cradle at 0.17A (according to cheap USB meter).

Naturally, it would be draining it quicker, without that 0.17A, so I'm not saying it's not useful to have a cradle, as such. The problem is, as soon as I plug anything into the micro USB socket (e.g my OTG Y lead, with or without anything attached), the current it takes from the cradle / POGO pins drops to zero. When I unplug it, it goes back up to 0.17A.

Is there any way to stop that happening, that's compatible with this ROM?

Presumably, it's not a pure hardware thing, like plugging headphones into an old HiFi disabling the speakers, with a physical switch built into the jack socket. I'm assuming there's something in the kernel watching the USB socket, deciding a cable has been plugged in, and switching off the power input from the POGO pins.

If it is a hardware switch, there's definitely no solution that doesn't involve a soldering iron, but that seems unlikely.
[Nexus 7 Android Development] SGH-i200:
POGO pins

Your discussion is clearly OT. You can find better matching threads here: https://xdaforums.com/search/forum/1673?query=POGO pins

You could use a "USB Micro male to female extension cable" to rescue your fragile USB socket instead. I would prefere one with a right angle: "30cm Length Micro-B Male Right Angle to Female Extension Cable". Or without extension cable: "Right/Left Angle Micro USB Male 90 Degree USB Male to Micro Female Plug Adapters"
[Nexus 7 Android Development] Andy2No:
I don't believe my discussion was OT, because it would appear to be something that can be resolved via the kernel, or by using a different kernel. Not all kernels will work with this ROM, I assume, therefore advice would be useful. However, if the general feeling is so, then I am happy to drop it.

I don't own a USB extension with a micro USB end, but I'll buy one, and try that suggestion. Thanks.

---------- Post added at 05:07 PM ---------- Previous post was at 04:54 PM ----------

I've now installed MX Player, and put a file in the Movies folder (an AVI file, taken years ago on a camera I used to own). It didn't find it, and I think that may be the main issue.

I was able to play it by opening it directly from a file browser - I used the Asus one - 2.0.0.xx, which is just called File Manager. I can't remember if I installed that myself, or if it was already on the ROM. I use the same one on my phone, so I probably did. It should work with any though... Solid Explorer also works, if you can put up with the ads.

The problem seems to be finding media to list. MX Player fails at that, but so does every MP3 player I've tried so far, including the built in Music app. Opening an MP3 from a file browser also fails - it can open an app to play it, but it fails to play.

MX Player has settings to let you say where to look for the files, and which extensions to accept, which is good, but it still doesn't help it see them, unfortunately. None of the MP3 players I've tried so far (admittedly not many) have options to say where to look, which seems really stupid, but there you go. It apparently wouldn't help anyway.

I thought it might be to do with permissions, so I checked that they all had access to Storage. I'm not sure what else to try.

To summarise:

Videos - can't list, but can play from a file browser in MX Player [EDIT: or with the built in Video Player].

MP3s - can't list, and can't play from a file browser, in the built in Music app, Pi Music Player, Go Music or Equalizer+ (which comes with a barrage of full screen ads).
[Nexus 7 Android Development] kam1kazze:
Hi,

I would like use an USB DAC with your ROM, but on my n7 (grouper) not works out of box (with your rom)...

I have found this #986 and this #759, but I don't figure out if I have install another kernel to allow USB DAC working...I'm not interested to OTG charging. I thought this feature (USB DAC) was introduced with official Lollipop

Thanks!
[Nexus 7 Android Development] Andy2No:
Some DACs work with Android (Lollipop and later) but some don't. I'm not sure what the rule is. Maybe they have to be "class compliant", or maybe the drivers have to have been built into the kernel.

I've been able to use a Behringer UCA202, which is a very cheap but reasonably useful USB DAC, with stereo phono in and out.

I've been able to use it as an audio input, which I don't think was supported in the modded ROMs based on JellyBean, or the modded kernels for KitKat (which I haven't tried). I have now tried the output with the built in Video Player, and MX Player, and it works fine.

Currently, I can't find a music player that can play an MP3 file, with this ROM, so that's another problem, if that's what you want it for.

Android support for DACs is still a bit hit and miss, even with ones it works with, so it's easy to think it's not working when in fact, it can. With the two Lollipop ROMs I tried, it worked best if the DAC was already connected when I booted the tablet - not essential, but much more reliable. With this ROM, it works best if it's not plugged in when I boot. It's best to plug it in before starting an app that needs to use it.

Hot unplugging tends to work better than hot plugging - if you have it working with an app and unplug it, the app will normally revert to using the built in audio (headphones socket, dock or speaker). MX Player and the standard Video Player pause when I do that, but I can resume them by pressing Play. That's apparently how media players should react to losing connection with a DAC.

The MTP process crash problem you linked to happens, but it's not a big deal. MTP is used to connect a flash drive, or similar. It gets restarted again as soon as you close it, apparently.

The kernel that comes with this ROM supports USB DACs (as many as can be supported), but you should install AndDiSa's new kernel to solve a problem with reconnecting WiFi after you turn it off. Look at the "most thanked" on the right side of the window (or near the beginning of the first post in this thread), and you'll see a link to it.
[Nexus 7 Android Development] kam1kazze:
I use a friendly pcm2704 USB DAC...and it works like a charm and out of box with my LG G2 with stock rom (Lollipop) and also with N10 with Android 6 (CyanogenMod). So it's supported on Android and it works on stock and custom rom...but not on this ROM (or this Android version). I have also try to change "Developer options/Select USB configuration" without any success :(
[Nexus 7 Android Development] RampantParanoia:
anyone tried playing games using this rom on a nexus 7 2012? something that is gpu intensive like clash royale or clash of clans. what was your experience?
[Nexus 7 Android Development] solved:
no matter what i am trying .. clean flash .. dirty flash .. i don't get any of those two working.

both keep on stuck @ android logo
[Nexus 7 Android Development] rtiangha:
I installed the 7.1 ROM on my device which was previously running CM 12.1 (I wiped /system and installed the ROM, then formatted /data to start everything from scratch). I don't use GAPPS on this device and instead rely on f-droid.

However, I noticed with the default WebKit Browser Tester that I can't actually download anything. Tapping on any link to any kind of download does nothing. Which sucks because I have a busted USB port and thus can't transfer any files that way. Is this normal? The storage permission is activated for that app.

Luckily, the email app still works, so I emailed myself a copy of f-droid and was able to install it that way and install a different browser (mainly Privacy Browser and Lightning because I noticed that Firefox and Fennec can't download anything either; the dialogs keep saying "Download Failed" and the storage permissions for those apps are also activated).

I'm using phh superuser on this and it seems to work fine; no need to do the SuperSU systemless change as stated in the OP. Thanks for all the hard work!
[Nexus 7 Android Development] Bakica:
That was my experience too... [emoji17]
[Nexus 7 Android Development] androidbricker:
Could you please upload the kernel.img?

thanks!
[Nexus 7 Android Development] :
Download latest build, wipe data, cache, internal memory, system, install only rom without gapps and supersu, reboot in system and stuck on android logo. Any ideas?
[Nexus 7 Android Development] shaggyskunk:
Try a Reboot.

Sent from my SM-N910W8