yashsingh1/xdaforums huggingface dataset:
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] dolorespark:
AC Power Fix

The attached diff will prevent the tablet from fully booting when it is off and you plug in the AC adapter. A quick tap on the power button should show the battery's charging status. I've tested this under a number of scenarios but I could have missed something so let me know of any glitches.

Beside applying this patch while in the system/core directory, builders will also have to add the following to various files:

In device.mk

PRODUCT_PACKAGES += \
charger \
charger_res_images

In init.m470.rc

service charger /charger
class charger
user root
group root
oneshot

Optionally, you can add this to init.m470.rc

on charger
write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor powersave
write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor powersave
write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor powersave
write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor powersave

FYI... When the tablet is genuinely off and you plug in the AC adapter, it always boots up (and always has). After all, there's no way for a computer that's off to display anything on its screen: it has to be up and running. However, in this mode it is configured to load just the bare minimum of software needed to monitor the battery's status and provide the display. Since Hisense's AC adapter provides 3 times the current of a USB power source, it can power the tablet while still charging the battery fairly quickly.

Note: On my AOSP build, if I tell it to power down with the AC attached, it actually turns off. A quick tap on the power button causes the Hisense logo to appear for a bit while it boots, then the battery image appears. Holding the power button for a longer time causes it to boot normally.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] jerbear294:
Nice! I'm incorporating this into PAC.

EDIT: I can't get the patch to apply. It says

1 out of 1 hunk FAILED

Any help?
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] dolorespark:
The context lines (the 3 lines above and below the revised code) probably don't match. You'll have to apply it manually, making adjustments as needed.

Open system/core/init/init.c and find the function "import_kernel_nv". At the bottom of the function is the code to be patched (about line 713). In the AOSP version, it looks like this before patching:

if (!strcmp(name,"qemu")) {
strlcpy(qemu, value, sizeof(qemu));
} else if (!strncmp(name, "androidboot.", 12) && name_len > 12) {
const char *boot_prop_name = name + 12;
char prop[PROP_NAME_MAX];
int cnt;

cnt = snprintf(prop, sizeof(prop), "ro.boot.%s", boot_prop_name);
if (cnt < PROP_NAME_MAX)
property_set(prop, value);
}

After the patch it should look something like this (I've omitted my comment to make it easier to see what goes where):

if (!strcmp(name,"qemu")) {
strlcpy(qemu, value, sizeof(qemu));
} else if (!strncmp(name, "androidboot.", 12) && name_len > 12) {
const char *boot_prop_name = name + 12;
char prop[PROP_NAME_MAX];
int cnt;

cnt = snprintf(prop, sizeof(prop), "ro.boot.%s", boot_prop_name);
if (cnt < PROP_NAME_MAX)
property_set(prop, value);
} else if (!strcmp(name, "power_reason") && !strcmp(value, "0x808800")) {
property_set("ro.boot.mode", "charger");
}

If you continue to have problems, post the original code from PAC and we can fix it.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] dolorespark:
A2DP Fix v2

While looking for something else, I stumbled upon the real fix for this bug. With it in place, the method where the crash occurred never gets called (I've left my original fix in place "just in case"). If you've already applied the first version of this patch, you can just change frameworks/av/services/audioflinger/Configuration.h manually.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] jerbear294:
I searched for the code manually since the PAC code wasn't around line 713. I added in your fix, hopefully that works. :fingers-crossed:

EDIT:

Right as I initiate a build, too...

I'll download this patch as well and will apply it once this build finishes. I didn't clean the ccache since virtually nothing is changed so it shouldn't be long.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
I had tried that in the past, but not sure I tried the on charger writes. I will give it another shot.

building now, I'll see what happens if it works I will upload it. I was going to make an non overclocked build anyway.

Unless I did something wrong this does not appear to work in cm-11 even the charge rate seems about the same
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] Bdadd34:
The charger patch work on gummy but I had to manually apply some of it and I'm using deloresparks kernel source as a base. I uploaded the file before I left for work but haven't had time to put it op yet..I'll try to throw a link up in few.

Here is link. I'll try to have in my op with description soon

[URL=http://d-h.st/aoR]Gummy-M1.2-03-13-14-UNOFFICIAL-m470.zip - 189.16 MB[/URL]

Sent from my Sero 7 Pro using Xparent Green Tapatalk 2
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] dolorespark:
Did you apply the patch? It will have to be applied manually at line 828 in CM11's version if init.c - right before "#ifdef HAS_SEMC_BOOTLOADER". Be aware that the patch is the fix. The other stuff just keeps your screen from displaying "Hisense" for as long as it's plugged in.

BTW... all this is completely independent of the kernel.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
Nope I missed the patch. But, I am having bigger issues now. Having memory errors. Trying to fix.

Wish we could change the boot loader, it seems to have a few issues and that 24 sec delay to show hisense or recovery or boot loader is really annoying
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] jerbear294:
What do you mean by 24 second delay? I don't notice anything.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
Your tablet does not sit at the hisense screen for 20+ seconds before it starts the boot animation?
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] jerbear294:
It does, but I don't think it does going to Recovery mode. I could be wrong.

I thought it took a while but thought it was just me.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
It is not just you, and it does in recovery as well. Bootloader might be the only thing that is fast.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] jerbear294:
I thought that we could only get into Fastboot and manipulate it via a computer... We can actually get into the bootloader screen?
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
Nope but you can get into fastboot right away. No 24 sec delay

---------- Post added at 10:52 PM ---------- Previous post was at 10:49 PM ----------

trying to make a build now, see if this one will boot. fyi I made a build this morning, it worked. I changed nothing, did another this afternoon, it built but had zygote crashes. I didnt change anything, and I didnt repo sync. So I wiped and started over
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
Ok here is a non overclocked cm-11 build with dolorespark init changes. The charging mod really does work.

Pulled getting multiple reboots. Not sure if cm or some mod. Will check it out tomorrow
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] boonesmi:
are these using the latest cm11 nightlys? ive heard that the recent ones are kind of buggy with several issues

and the cm11 M4 which was just release a couple days ago is supposed to be pretty stable

http://www.cyanogenmod.org/blog/cm-11-m4-post-release-items

i found that article interesting
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
I was using nightly and very buggy. Worse I thought it was something I had done.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] chopin_k:
Yay for a new era of stable Dave's cm11
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
Or a new era of buggy cm-11 nightly. Anyway I have switched to the stable/cm-11.0 branch and I will try another build. Least with the stable build if it is buggy it is a patch we did and not the source code.

When I first downloaded my source code they did not have a stable/cm-11.0 branch so I have always been doing nightly builds.

well the stable/cm11.0 build boots, now to test. FYI with the last buggy build, I had no error until I put it on the charger for the night. So I will test for a few hours this time.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
Well let me try this again. This is a non overclocked build of stable cm-11.0 . It has been behaving for the last few hours. all the patches seem to work and not cause a problem. Starting to believe that last nights cm-11 nightly was really buggy. I will be going mobile in a short time and I wont have web to even report if it has a problem for the next several hours. So I could use a few more to try it out so here it goes.

Warning CyanogenMod recommends a clean flash. Says weird things including boot loop might happen other wise.

https://www.dropbox.com/s/q17j706pvb4y0y4/cm-11-20140314-UNOFFICIAL-m470.zip

to overclock use https://www.dropbox.com/s/xkm697fikc808ns/m470-add-overclock-20140314.zip Note this is not a full rom, be sure to flash the full rom and gapps as well

to re remove overclock use https://www.dropbox.com/s/xz8m5ddqs4mji5b/m470-remove-overclock-20140314.zip Note this is not a full rom, be sure to flash the full rom and gapps as well. in fact

you only need this to undo the add overclock zip from above.

Note I have not tried overclock at all , trying to see how stable the non overclocked is first.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] intrepid9:
Does this rom get rid of the emulated SD card so I can install apps on my external SD card?
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] jerbear294:
Nope, but FolderMount does what you want.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] taba4real:
boot loop with this 314 version.... had to reinstall 307 version....
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
Weird, I am using it, so far walking through town I have had one soft boot, when I walked into range of an open router. I had dozens of secure routers with no problem.

I did clean flash it. Did you try clean or dirty flash?

Did you get a logcat? Be interested to see what was going wrong
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
Going to try a diff on a downloaded zip to confirm the build uploaded OK.

Mainly because I had no problem with it loading or booting.

Ok really confused, the zip I flashed and I am running, is identical to the zip I just downloaded from the links.

You didn't wipe system and flash one of the m470-add-overclock-20140314.zip or m470-remove-overclock-20140314.zip without flashing the first link to the full rom? Those are not full roms, just basicly a kernel and the modules to enable overclocking or to remove it.

If you wiped the system and only flashed one of those, you would boot loop because you would have no os.

going to try flashing mine again see if it will boot.

Confirmed just clean flashed from my downloaded 0314 and it booted fine. Can not imagine it would need a clean flash from one of my older builds, but cyanogenmod recommends a clean flash from a nightly anyway.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
I have tried, it is not as easy as it sounds.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] DDNV:
I dirty flashed 314 over 307 (maybe it was 309) and boot loops. First boot got to optimizing apps then as soon as it got to launcher reboots. Then reboots every time it gets to launcher.

Fresh install (factory wipe) and no boot loop.

DDNV

DDNV
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
Yeah CyanogenMod warned about weird things and boot loops could happen flashing from a nightly build to a stable build. Only reason I didn't put a warning was I didn't believe it. Guess I believe it now. I will go back and put a warning.

BTW CyanogenMod claims it is safe to dirty flash from a stable build to another stable build. Or from a nightly to another nightly. But like in ghost busters, do not cross the streams.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] boonesmi:
A clean flash is probably a good idea. The m4 release broke a lot of devices when people did dirty flash (since the code was actually a couple weeks older then the nightly's it was replacing)
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] lichan:
Or try Mounts2SD, available unlocked here on the forums for members. I have used it on several phones and the Sero 7 Pro. You have to partition your card into an sd-ext partition and a FAT32 but you can put as much space as you want for apps.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] nccruz:
I use link2sd with ext2 partition
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] XjokiX7:
No more random reboots :D really loving it! and the charging problem I asked about has been fixed! The rom is nearly perfect :p
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] chopin_k:
It's been great so far, Dave. Thanks a lot for providing a non OC rom, setting the cpu at 1300mhz max with the OC kernel kept it at 1400mhz max.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] taba4real:
I did dirty flash it.... should be doing a clean flash i thought it had the same basics no need for clean flash from the previous latest version?

Now i did a clean flash and installed gapps then then restored backup.... finally no reboots so far.... no soft reboots...

I thought previous version, wifi gets disconnected when in sleep mode retries to connect once woken up but i am still getting the same issue with the new build.... e.g. clash of clans, once it gets into sleep mode, i loose connection to the internet and requires to be connected again...
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] chopin_k:
I just had a lock up, I woke it up, it did then froze, wifi was down (as usual even if I set it to always on) so I suspect that it was trying to reconnect what killed it. After around 10 seconds it seemed to reboot but the hisense logo stayed there for over a minute before I shut it down.

How exactly do I get a logcat when it crashes?
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
Might look at /data/tombstones see if it left one. The WiFi problem have only rarely been leaving any trace logcat or tombstone.. I am on a test build now. I changed a bunch of settings in wpa_supplicant. I believe that is where our problems lie. If you want a logcat and you have a desktop with Linux I can help, I haven't done one from windows, however the logcat is short lived, it gets overwrote as time goes on.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] x000x:
i think i read a while back that viper4android doesn't work, does anyone want to be a guinea pig and test to see if this http://xdaforums.com/showthread.php?t=2293589 works with davepmer's latest test? i'm too worried i'll mess something up on mine :mad:
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] DDNV:
I had viper4android working on previous 307 or 309 can't remember. The V4A was the 2.3.2.2 version, not the most recent one released in the lsat week. I just haven't gotten around to installing the V4A on 314. I'll report back in a bit.

V4A 2.3.2.6 (newest version as of this posting) works with 314 release.

DDNV
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] chopin_k:
I was thinking about providing logs to maybe help find the issue but I guess if you have it too there is not much mine can add.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] a178235:
No More Reboots

I also don't seem to be having reboots with Dave's latest non-overclocked build. With the previous overclocked build, I was having reboots on one of my two tablets until I dropped it down to 1.2. It's still too early to tell, but overclocking may be hit and miss with some tables.

I still have Wi-Fi reconnect issues after reboot and I think once after coming out of sleep. I have to actually re-enter the Wi-Fi password when this happens, as just turning off the Wi-Fi and then back on does not reconnect it. I'm not longer using ART, just Dalvik and gapps-kk-20140105-signed.zip.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
Oh I could use the logs, but it seems really rare to actually get one.

I am not sure on how do get a log in windows, in linux the command would be adb logcat > logcat.txt

that would use adb to read the logcat off the device and instead of giving the output of logcat to the screen it will send it to the file logcat.txt

Problem is if you have a reboot from the issue, the logcat wont show what caused the reboot, you would have to be grabbing the logcat as the device does the reboot to catch the problem.

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

I have it loose connection once in a while while sleeping, but not all the time.

My problem is wifi causing random soft boots. So far it seems to be related to going out of range of a connected router and into range of an open router, or going out of range a connected router and back into range of the same router.

I had one yesterday, when I got in range of an open public router, and one today when I returned to the router it left yesterday.

I think the problem is in either wpa_supplicant or bcmdhd. I have started doing heavy checking on both source codes.

---------- Post added at 08:00 PM ---------- Previous post was at 07:55 PM ----------

You have to reenter the wifi password on a reboot? Just making sure you clean flashed 0314? Really weird that other tablets dont have the problem.

if you could, after a reboot and before you re enter the wifi password try to make a copy of /data/misc/wifi the whole folder for me, zip it and somehow get it to me.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] DDNV:
I also had this (having to renter wifi password on a reboot) happen it was a reboot I started. at the time I chalked it up to something I did. I'll see if I can reproduce it.

It happens for me on softboot, not all the time but most (2 out of 3 so far). I do softboots using xposed when installing the framework or modules. I tried copying the folder you requested with es file explorer but even with root, some of the files fail to copy, like wpa_ctrl_3944-1. I'll try something different to copy the folder. Thought I'd post what I've learned so far so you could try to reproduce it on your end.

DDNV
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] a178235:
I don't get the lost Wi-Fi issue all the time, just every once in a while. Yes, I have to re-enter the password, and sometimes I have to "forget" the connection, then re-enter the password for it to connect. I did a clean flash, formatted system, data, cache. I'll see if I can grab the wifi logs as you requested. Note, I have a a/b/g/n/ac router, so it will have the same SID for different speeds.

I also plugged it into the USB port on my computer last night and it was fully charged. This morning the battery was dead and my computer was on all night. I can't remember if this happened with the stock ROM. If I remember correctly, a computer normally does not output enough power to charge the device, but if the display is off and it's not running anything CPU intensive, it should at least keep the tablet at the same level. Has anyone else experienced this?
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] dgjenkins:
I have the new version working on pacman and if I remember correctly on Dave's Rom as well. I've found though that I had to install SuperSU. The driver doesn't seem to want to install correctly using Superuser.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] Moirae:
The pc can charge it, it's just really slow.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] rodos15:
Australian Sero 7 pro CM11 & selinux enabled recovery

This is only for the Australian Sero 7 pro m470bss

WARNING: I take no responsibility for any damages that may occur to your device, if you choose to install this ROM-recovery, you do so at your own risk.

To install CWM recovery first read this:

http://xdaforums.com/showpost.php?p=41875861&postcount=2

Then download the zip file from the step1, extract it somewhere easy to find(c: drive?) put the recovery.img inside the xboxexpert tools folder you extracted before and boot your tablet into fastboot, open terminal(command prompt) navigate to the folder you extracted before, connect your tab to your computer and type:

fastboot flash recovery recovery.img

Use it use it at your own risk, remember to do a backup of your original rom before you flash anything.

http://www.4shared.com/file/-_YlM5Nuba/recovery.html

http://www.4shared.com/zip/GHHStfWpba/cwm6045-selinux-flashable-470b.html (If you have my old cwm installed)

http://www.4shared.com/zip/S8No5Kyjba/cm-11-20140304-UNOFFICIAL-m470.html

I don't have much time to work on this rom(two kids,wife) but if a major change/release comes out for the US model I will try my best to make it work on the AU m470bss.

A big thanks to davepmer, xboxexpert, dolorespark, randomblame and all the devs here for their hard work.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
When plugged into a computer's USB port the computer and tablet communicate through the USB constantly. The tablet will not enter a deep sleep state while it is connected.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] rodos15:
The 'retype password' it happened to me with your new build, maybe it is a permission problem?

btw it is not kernel related because I use my m470bss kernel.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
But then it should do it on everyone's not just a few.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] rodos15:
It happens only after power down, deep sleep and sometimes after reboot:confused:
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] NubzX:
Oh joy we needed more confusion and links in the same thread
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] davepmer:
I might have something , I took my last test build for a walk, and it did not soft reboot when finding an open router, and did not reboot on returning home. It just connected to the router like it was suppose to. Next test multiple same SSID routers aka church

Well crap, I had a soft boot waking up from sleep. So thinking maybe the 5th core support was causing us trouble I tried a kernel without that support. You don't want to try that, wifi diconnects every time, just a few seconds after the screen goes off. So if anything 5th core support is helping the problem a bunch.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] x000x:
why don't you request a dedicated forum be created for this device then? http://xdaforums.com/showthread.php?t=1660354 dozens have already but who knows maybe your request will be the one that turns the tide.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] enfermo:
We need to ask the admm for our own forum

here is a way to do it

Like the Sero 7 Pro? Go to this thread and ask for our own forum and then add this to your signature till we get one.
[Hisense Sero 7 Pro ROMs, Kernels, Recoveries, & Ot] envygreen:
Dave, it sounds like you have a possible fix but if you need more logs, here are some fresh from Hong Kong! I had two soft rebooted and a lost password for wifi past 24 hours but otherwise smooth sailing. Hope it helps. Your latest build and clean flash.