yashsingh1/xdaforums huggingface dataset:
[One (M7) Original Android Development] The Analog Kid:
What's the speaker phone bug doing?
[One (M7) Original Android Development] maciclazar:
You must be S-OFF and have unlocked bootloader in order to flash a firmware. If you meet requirements do the following:

Download a firmware and place it in the same folder where your adb drivers are installed on your pc. Rename it to firmware.zip for easier flashing

Connect phone to usb and make sure usb debugging is enabled in developer options

Open cmd window and type:

adb reboot bootloader

Your phone should reboot to fastboot. Now type:

fastboot oem rebootRUU

Type:

fastboot flash zip firmware.zip

(You may get a error. Just type this command again and it will work)

After you see OK message type

fastboot reboot

Thats all. You are now running on GPE firmware.
[One (M7) Original Android Development] devsk:
My m7 is unlocked bootloader but S-ON. So, no go for S-ON devices? Darn! How do I S-OFF? Note that this is an old (originally GPE based) m7 that I haven't updated in a while firmware wise.

BTW, isn't the official GPE firmware flashable on an S-ON device? I would think it is. If I use the final GPE firmware and flash the whole ZIP (including the boot and recovery) and then flash TWRP again and restore my backup, would that not work?
[One (M7) Original Android Development] maciclazar:
No you can't change firmware on S-ON device. And do not flash boot and recovery if you are not running GPE rom or your current rom won't boot.

If your phone is already a GPE device there is no need to change firmware unless it is running on old one. Boot to fastboot and type

fastboot getvar all

and it will display your current firmware version. Copy results here (without imei and serial number) and maybe someone or me can help you to get S-OFF. If your firmware is old one I think you can use some tools from this forum to get S-OFF but if it is newer one than I think your only option is Sunshine for which you need to pay.

Here is a guide I used to S-OFF my phone but I don't remember which firmware I was running because it was long time ago.
[One (M7) Original Android Development] oznate:
It's discussed earlier in this thread but basically if you use speaker phone you then have to reboot because subsequent calls will connect but neither the caller nor the person on the other end will be able to hear anything.
[One (M7) Original Android Development] miki4:
Unless you turn off the speaker again before hanging up/connection interrupts.
[One (M7) Original Android Development] The Analog Kid:
Well, I already have this bug... and I don't even have Lineage installed!
[One (M7) Original Android Development] oznate:
Hmm, that could be useful information. What ROM are you running?
[One (M7) Original Android Development] The Analog Kid:
Maybe not... 6.0 stock, save for r16g squid kernel. But issue remains, squid kernel or not
[One (M7) Original Android Development] oznate:
Wait, you are running a 6.0 stock on an M7??
[One (M7) Original Android Development] devsk:
$ fastboot getvar all
INFOversion: 0.5
INFOversion-bootloader: 1.61.0000
INFOversion-baseband: 4T.35.3218.16
INFOversion-cpld: None
INFOversion-microp: None
INFOversion-main:
INFOversion-misc: PVT SHIP S-ON
INFOmeid: 00000000000000
INFOproduct: m7_ul
INFOplatform: HBOOT-8064
INFOmodelid: PN0713000
INFOcidnum: T-MOB010
INFObattery-status: good
INFObattery-voltage: 4059mV
INFOpartition-layout: Generic
INFOsecurity: on
INFObuild-mode: SHIP
INFOboot-mode: FASTBOOT
INFOcommitno-bootloader: dirty-331585dd
INFOhbootpreupdate: 11
INFOgencheckpt: 0
all: Done!

Possible to S-OFF?

---------- Post added at 07:27 PM ---------- Previous post was at 06:38 PM ----------

looks like hboot 1.61 is not S-OFF'able with the rumrunner method
[One (M7) Original Android Development] oznate:
Actually, I didn't. I assumed I must have done S-OFF back when I first left stock ROMs. So I thought I flashed the firmware the other day, but after checking today I see it didn't do anything; I am still on the same old version and I am S-ON. Whatever mistaken perception I had of better performance is nice but not relevant. I just wanted to set the record straight.

UPDATE: Now I've gone S-OFF, flashed the firmware previously mentioned, flashed latest LOS build from this thread (2017-06-18), latest opengapps and su. NOW if I have anything to report, I'll do so. :)
[One (M7) Original Android Development] samhhmobil:
That's correct.

1.61 is only S-OFF'able with „sunshine” and you've to pay 25US$, for each single S-OFF process.

(But it works!, I did it two times, some years ago.)
[One (M7) Original Android Development] maciclazar:
You are running latest sense firmware so rumrunner method won't work. Looks like your only option is sunshine unless it is possible to downgrade hboot by flashing older RUU.
[One (M7) Original Android Development] bert7:
I´m S-OFF and running the last official build lineage-14.1-20170302-nightly-m7-signed.zip.

When trying to S-OFF with SunShine, I get the message: "SunShine encountered problems with your rom. Please flash a stock, or more near stock rom and try again."

Does someone had the same problem?

(bootloader) version: 0.5
(bootloader) version-bootloader: 1.61.0000
(bootloader) version-baseband: 4T.35.3218.16
(bootloader) version-cpld: None
(bootloader) version-microp: None
(bootloader) version-main:
(bootloader) version-misc: PVT SHIP S-ON
(bootloader) serialno:
(bootloader) imei:
(bootloader) meid: 00000000000000
(bootloader) product: m7_ul
(bootloader) platform: HBOOT-8064
(bootloader) modelid: PN0710000
(bootloader) cidnum: HTC__102
(bootloader) battery-status: good
(bootloader) battery-voltage: 3845mV
(bootloader) partition-layout: Generic
(bootloader) security: on
(bootloader) build-mode: SHIP
(bootloader) boot-mode: FASTBOOT
(bootloader) commitno-bootloader: dirty-0e2a13e5
(bootloader) hbootpreupdate: 11
(bootloader) gencheckpt: 0
[One (M7) Original Android Development] camambeou:
Sunshire only works if your decice is running on a firmware nearest stock rom. If your htc is still s-on, you should turn back to stock 5.xx and then use sunshine to s-off
[One (M7) Original Android Development] superd3:
Is nfc working on this rom ? I'am on gpe firmware on stock rom and i use Android pay a lot so that is very importante for me

Thanks
[One (M7) Original Android Development] FeelThePoveR:
It's not possible. If RUU package will contain an older version of HBOOT than you have, it will fail to flash on S-ON.

There are 3 checks and if any of them fail - flash fails:

- HBOOT check

- CID check

- OS number check

And only the OS number can be changed on S-ON. Obviously the RUU package needs to be signed too.
[One (M7) Original Android Development] maciclazar:
Didn't know that. So it is not possible to downgrade to kitkat or jelly bean from lollipop if you are S-ON? Or it is possible but hboot will be same as on lollipop?
[One (M7) Original Android Development] FeelThePoveR:
Nope, not possible either, even if you would exclude HBOOT from the RUU package you would need to re-sign it, but you can't do that either and packages that are not properly signed fail to flash on S-ON too.
[One (M7) Original Android Development] samhhmobil:
I made it the following way, years ago:

- Unlocking the bootloader,

- having latest HTC stock ROM (5.0.2, with hboot 1.61)

- installing TWRP recovery

- install root via TWRP

- installing SuperSU apk

- installing sunshine

--- paying for sunshine, and — TADAAA — the M7 is S-OFF

That's it, and it worked!
[One (M7) Original Android Development] The Analog Kid:
M7?... Darn. Sorry, my mistake; I've got a thread confusion and I was supposed to be in the Moto X Play thread!... But I still have that bug
[One (M7) Original Android Development] oznate:
I did S-OFF via SunShine yesterday, and managed by temporarily flashing the "stock" ROM from this thread (NOT the firmware, just the 5.1 stock ROM). SunShine ran successfully, then I was able to flash the firmware from [MENTION=5236274]Slim Jim Guy[/MENTION], then reflash Lineage, gapps and su.

edit: I also had to set superCID along the way. And it took 2 attempts to get the firmware flashed (first attempt said to "flush again").
[One (M7) Original Android Development] maciclazar:
It's always like that when you flash firmware or radio. First time you get an error and second time it works.
[One (M7) Original Android Development] Zombie Feynman:
Looks like I'm suffering from the battery bug too, but unfortunately I'm on hboot 1.61 and I don't want to burn $25 on Sunshine just yet. (In my case it's also at least partially a hardware issue because my phone has gone "puffy" with a bloated battery. I bought a replacement battery on eBay and I'm going to see if installing that offers some improvement first, once it gets here.)

Anyway, the problem itself is manageable if I do a hard shutdown and reboot about once every 48 hours (this temporarily sets the battery level to the correct value, or at least a more accurate one) and take care not to let my battery drop below 50%, but I was wondering if there's any possibility of a fix in LOS without having to upgrade the firmware. Since the bug didn't occur in CM 12.1 (as far as I remember) and the charging screen when powered down also gives the correct percentage, it would seem to me that there's at least a good chance some patchwork in the high-level code could fix it, but is anyone looking into that at the moment?
[One (M7) Original Android Development] plazma247:
[MENTION=7971333]Zombie Feynman[/MENTION]

I didnt have any battery issue under hboot 1.61 before going s-off (but i ensured i did a complete clean wipe). I suspect this is a combination of a stale battery profile and also a cell going iffy. I think your approach of replacing the cell is the best move, mines ok until about 20 percent and then falls quickly (but its been like this on all roms including stock sense, since i got the phone second hand), i would be interested to know how easy it splits apart to replace m7 battery when you do it.
[One (M7) Original Android Development] oryan_dunn:
I've found this video to be the best at showing how to open the m7

[YOUTUBE]KPkwWxX8PU8[/YOUTUBE]

I swapped my battery, but I don't think the heat gun is necessary since there isn't any adhesive holding the two halves together, just clips. There is adhesive holding the display into the front frame, but you don't need to take the display out of the frame if you're only swapping the battery.
[One (M7) Original Android Development] plazma247:
So you basically start at the volume rocker.. doesnt look to bad, was the rear case bent at all or would your recommend swapping the rear cover (as they are not the expensive). I think the heat is to ensure the plastic is not brittle and the clips give instead of snap, although i think many people assume wrongly (like in the video) its because of glue. Might have a go swapping mine for a fresh one soon. Thanks for posting back.
[One (M7) Original Android Development] Zombie Feynman:
If the phone has been on for a while, it randomly shuts down at a very high battery percentage, sometimes even around 70%. If I then plug it in, the charge screen says it has 4% charge remaining. It often even happens that if I turn it off at 100%, the charge screen will show a number below 90%. I've tried resetting the battery calibration profile with an app, to no avail. All in all that does feel like a software bug to me. Still, I do think the battery itself is near death; if this were a Samsung I would be worried about explosion risk right about now. ;)

I'm kind of scared about replacing the battery considering most sources say this phone is a royal PITA to open, but my phone is always in a case anyway, so I don't mind some minor damage to the rear cover. It's a second-hand phone and a pretty old model at that, so I'm not planning to sell it either.
[One (M7) Original Android Development] plazma247:
Previously i had the S-on gpe 5.1 rom before, i wonder if maybe its something left over from or due to cm12... i went sense 5.1 to gpe 5.1 to lineage 14, ran for a few days with s-on and hboot 1.61 and then went s-off due to the reset bug, which is still a thing after wards, but i get it about once every 5 days instead of once every 24 hours now. I wonder if odin flashing a full stock sense 5.1 rom to reset to stock and confirm you dont have the battery issue there, then clean flash the 5.1 gpe s-on conversion and again see if you have the bug there, finally flashing lineage 14 and following the same path i did. Yes sunshine tax is a lot... which is why i held off for so long. once i had s-off i didnt do a partial conversion, i went the long way round and flashed the full original gpe with hboot, went through various over the air upgrades until i was on the last and final build and then flashed twrp back and switched to lineage.

I wonder if all the people who have the battery bug came from a cm 12 rom previously.
[One (M7) Original Android Development] oznate:
Me too (still have a reset bug) after S-OFF and flashing the firmware discussed a few pages back in this thread.

I think I did run CM a couple of years ago briefly but would have thought after this many clean wipes and ROM installs there would certainly be no remnants of that left! Unless it stores something in "external" user data storage?
[One (M7) Original Android Development] plazma247:
[MENTION=7117943]oznate[/MENTION] so do you have the battery bug, also i think the flash mentioned earlier in the post was not the full gpe firmware, i maybe wrong but i think it was stripped down to hboot and system, when i flashed myself i loaded the full and older original gpe firmware using odin, as i was not 100% sure the firmware a few pages back contained all partition data. Then let it ota update a lot of times to ensure everything was upto date as possible. After this twrp and lineage.

bugs i have:

- rotation on app switcher stops working after a few hours (around 24 hours is i think)

- bluetooth iffy after a few days, and if turned of wont come back properly with reboot.

- random reboot about once every 6 days

far as i can tell the reboot issues a thing on all 7.x m7 roms ive looked at (read threads), not sure on bluetooth, i think the rotation on app switcher maybe lineage based.

bluetooth feels like the driver/radio is actually crashing, sometimes it refuses to turn on, others it will, but then wont talk or see anything.

Other than that im good, but the strange thing is prior to getting soff, i was running hboot 1.61 and upgraded as i explained previously and i still never saw the battery bug, the phone never had cm rom, which is why i wonder if some how its triggered by something in cm not getting cleared (have these uses tried advanced wipe and ensuring all partitions are clean in twrp for example), there is a user who had the battery bug who said flashing gpe and wiping battery stats stats fixed it, but if those who have the battery bug can confirm if they are son or soff and their upgrade path (ie did they have cm previously). If something causes the battery bug for some and not others, we can work out what those users have in common its going to be easier to identify a possible solution. Where as people posting i have the x bug without knowing all the information, upgrade path, previous rom, simple or advanced wipe, soff/son etc etc does not allow anyone to identify a possible pattern to the issue.
[One (M7) Original Android Development] FeelThePoveR:
It's not that hard really. In some cases you don't even need heat gun, but that's a case by case scenario as they have different amounts of glue (or even no glue at all). Start at a volume rocker, pry it up a little bit and slide something along the edges. Inside try not to bend anything to much (I destroyed 2 cables becouse of that) and be extra careful around vibration motor as it's really easy to damage (destroyed 2, order 3rd but it already arrived damaged). AND during the opening do not pry to hard near the grills as you can pry them off instead of the back.
[One (M7) Original Android Development] 465swa:
I've got a PN07100 , hboot 1.54 , supercid , s-off , issue i'm facing is unknown baseband from a couple of weeks .. However I flashed LOS 14.1 03022017 last night and miraculously everything back to life like sim being detected as expected , baseband version started showing 4T.30.3218.21 .. Unfortunately I did a battery pull and again baseband version shows unknown

Plzz somebody help me out there .. Regards
[One (M7) Original Android Development] plazma247:
kIf you look back a few pages (3 or 4) i think someone posted a radio only flash for me, i would try and flash this over and see if it helps. if not take a twrp backup and then try a clean install of another rom (gpe 5.1 or sense) to see if the problem persists, if it happens on another rom it could be a hardware issue. 4t.36.3218.06 should be the latest radio, yours is way behind.
[One (M7) Original Android Development] 465swa:
Can you plzz assist me with which radio should I go for and is this issue a common issue or only i'm the only one facing??
[One (M7) Original Android Development] plazma247:
as far as ive seen ur the only one, but your running a very old radio, why not flash : https://xdaforums.com/showpost.php?p=72730093&postcount=969 the latest radio and try the other thing i suggested.
[One (M7) Original Android Development] 465swa:
Flashed the radio suggested , still the problem persists.. Baseband version in about device shows unknown... tried nearly every stock to custom rom , sometimes in LOS 14.1 baseband version appeared but was lost as soon as rebooted the device.. Suggestions awaited .. Regardss
[One (M7) Original Android Development] plazma247:
So your saying it happens in other roms as well..? So its not a fault of lineage is it...

i assume your soff, if so i would recommend flashing the original full (complete) gpe firmware, this includes hboot radio etc.. flash using odin, this will put things back to stock for everything, after this let it boot and run through every single ota upgrade it offers, from there odin flash twrp, then flash los back, but i suspect this wont help you.

if that fails i would suspect you have a hardware issue:

https://xdaforums.com/showthread.php?t=2568038
[One (M7) Original Android Development] 465swa:
Surprisingly today i've come across this thought lyk I can flash things via odin on htc , I assumed it was particularly for Samsung...

& could u plz confirm that on LOS 14.1 sometimes my device detects sim cards and baseband versions info in about tab shows everything well , but as soon as I reboot baseband version vanishes again !!
[One (M7) Original Android Development] plazma247:
[MENTION=7895803]465swa[/MENTION] sorry i ment to type fastboot flash, i was short of sleep and had a samsung issue i was helping someone else with and things got a little muddled.
[One (M7) Original Android Development] 465swa:
Alryt no issues .. But I suspect its not a hw issue as sometimes baseband info shows everything well ..
[One (M7) Original Android Development] mchowdhury:
New Builds!

M7: https://www.androidfilehost.com/?fid=817550096634784765

M7 vzw: https://www.androidfilehost.com/?fid=745425885120747393

Changelog:

- Latest LOS source

- More kernel CVE patches

Known issues:

- FM Radio

- Speakerphone Bug

Please report any bugs or issues. Also, can I get confirmation that the battery bug is a non-issue if you are running the latest GPE firmware?
[One (M7) Original Android Development] saturday_night:
I am running aicp but this is based on LOS and you know who make it ;p Using latest GPE Firmware with an 3,5 Year old device and i make it up to 7 hours screen on time. Well if i use navigation software its a little bit less but still very good and much more than it was with Marshmallow

Oh, forgot that i dont have gapps installed, i use microg that saves about 10-15% battery a day
[One (M7) Original Android Development] ★Michaelo★:
Proof or it didn't happen ?
[One (M7) Original Android Development] FeelThePoveR:
The speakerphone bug may be fixed as alsys at RR topic said that latest RR build by tathanhlam66 doesn't have it.

I went ahead and searched for his github (https://github.com/tathanhlam66?tab=repositories) and quickly checked for audio related changes and it seems that this commit (https://github.com/tathanhlam66/and...mmit/fc6271efb9f30ce72870d2dd5b48cd2f54f6cefb) may have fixed it (I didn't check it though as I need a working device right now and I don't have time to set up RR)
[One (M7) Original Android Development] alial04:
thx will try this now and post a aicp build :)
[One (M7) Original Android Development] saturday_night:
Just charged it full this evening, but as you can see already used it for more than an hour and still 90% battery. Theoreticaly that would make it up to 10 hours screen on time :laugh::p

And that with the gapps is no joke, nothing else is wasting that much energy. And with microg you can have nearly everything what you get from gapps.

Will test it asap
[One (M7) Original Android Development] gehess:
Since we're talking about AICP, where exactly is the signature spoofing switch again? :D
[One (M7) Original Android Development] saturday_night:
There is no integrated signature spoofing, you have to flash magisk and the nanomod microg patch https://xdaforums.com/apps/magisk/module-nanomod-5-0-20170405-microg-t3584928
[One (M7) Original Android Development] gehess:
So am I understanding this correctly that it's possible to replace gapps with magisk + nanomod microg patch + microg GmsCore + F-droid + gapps from microg's F-droid repo?
[One (M7) Original Android Development] ★Michaelo★:
Yes you can
[One (M7) Original Android Development] alial04:
https://www.androidfilehost.com/?fid=673368273298970559 here is a build that will maybe fix speaker bug so test and report please do a clean build just for safety
[One (M7) Original Android Development] saturday_night:
For the basic functionality you dont need everything of that. Just flash rom, if you want a different one flash kernel, after that magisk and nanomod microG. Reboot to system but dont setup anything, reboot to recovery and flash nanomod patcher, reboot to system and setup microG and you are done. You have full access to play store with this, google cloud messaging, google device registration, safetynet and the mozilla location services. Only if you need more you should take the full package of nanomod. Also the f-droid stuff isnt neccesary because you can install f-droid anytime on any device without magisk.

Downloading now and testing in a few minutes

---------- Post added at 10:51 ---------- Previous post was at 10:30 ----------

Sadly its still the same, if i end the call with speaker active the next call has no sound until i end the call without speaker after that the sound is back. Using latest GPE Firmware and clean install of rom only no additions.
[One (M7) Original Android Development] alial04:
have u tried lates RR cuz i saw a post saying that it is fixed
[One (M7) Original Android Development] saturday_night:
Hahaha, thats what i´m going to do right now. Had the same idea

Edit: In latest RR by tathanhlam66 this bug is also present in the same way.

Going to test last aicp mm build to see if it was in there too... Edit: In latest aicp mm rom its working as it should without bug. Going to make a logcat now of mm and after that of n, maybe that shows something what helps to identify the problem

So here is the log of both MM and N AICP latest rls and i just copied the part where the call is going to end with speaker active. Dont know why or what all this means haha, hope that can help you. Additional i added the full logs in a zip. In the full logs, the call is at the end of the logs.
[One (M7) Original Android Development] FeelThePoveR:
Sorry for the trouble guys next time I'll check things out myself before posting.

Anyway thanks for all the hard work you're doing to keep the m7 alive.
[One (M7) Original Android Development] cylanjose:
please help, no sim found.

S-On Hboot-1.61 I can't found how changed s-off...