yashsingh1/xdaforums huggingface dataset:
[Amazfit] Saratoga79:
Amazfit Stratos US/Global/International. Disable new key/button mapping

With this mod you can disable the new key/button mapping introduced by Huami on latest US firmware (and in CN firmware too since a month ago), and restore the old one.

You will be able to enable again the new key/button mapping if you like it.

This mod may work for further firmware updates.

Requirements

Unlocked bootloader

Installed adb/fastboot drivers

Your watch needs to be running latest firmware with new key mapping

OTA updates

If you have this mod installed, and you are about to update to latest OTA it will fail to update, so previously you need to revert the mod using NEW.bat or enabling the new key mapping if you use the manual method and then update using OTA as usual.

Bugs

If you use the alarm function on your watch, after stopping or snoozing any alarm will re-enable the new key mapping. Best solution is to reboot your watch to get back the old key mapping, but you will have to do this every time an alarm triggers.

Downloads

Windows .exe installer

.exe Installer by capara [MENTION=3464625]1mmortal[/MENTION].

Download the installer file, run it and follow all instructions there.

Windows .bat installer

Key mapping | Mirror

Download the .zip file, unzip it, connect your watch to the PC and if you use a Windows PC, run:

OLD.bat to disable new key mapping

NEW.bat to enable new key mapping

Manual method installation

Manual commands to disable the new key/button mapping

Open a command or terminal windows in the same path where you unzipped the file downloaded before

0. Check for watch connection

adb kill-server
adb start-server
adb devices

1. Reboot into fastboot mode

adb shell reboot bootloader

2. Boot temporal root

fastboot boot root\boot-US-adb-root.img

3. Wait for 10-15 seconds and check for watch connection

adb devices

4. Apply the mod

adb root
adb remount rw
adb shell busybox "sed -i 's:prop.keyfeature.five=.*:prop.keyfeature.five=[B][COLOR="Red"]false[/COLOR][/B]:' /system/build.prop
adb remount ro

5. Reboot your watch

adb reboot
adb kill-server

Manual commands to enable the new key/button mapping

I don't see any reason for doing this but...

Open a command or terminal windows in the same path where you unzipped the file downloaded before

10. Check for watch connection

adb kill-server
adb start-server
adb devices

11. Reboot into fastboot mode

adb shell reboot bootloader

12. Boot temporal root

fastboot boot root\boot-US-adb-root.img

13. Wait for 10-15 seconds and check for watch connection

adb devices

14. Apply the mod

adb root
adb remount rw
adb shell busybox "sed -i 's:prop.keyfeature.five=.*:prop.keyfeature.five=[B][COLOR="SeaGreen"]true[/COLOR][/B]:' /system/build.prop
adb remount ro

15. Reboot your watch

adb reboot
adb kill-server

Enjoy! All time key mapping.

Some commands may be a bit different depending on your PC OS, so let me know for any issue or guide update.

If you like my work, buy me a beer.
[Amazfit] Fevves:
So with this I can get the usual and older button press layout? Cool. I'll try it in 20...

Edit:

got stuck on temp. root:

C:\Users\xxxx\Desktop\Stratos_2.3.8.0_key_mapping>fastboot boot root\boot-US-ad

b-root.img

downloading 'boot.img'...

OKAY [ 0.349s]

booting...

FAILED (status read failed (Too many links))

finished. total time: 1.212s

I waited for more then a minute. Shall I repeat the same? What gives? Thanks.

Edit2:

got it working now... dunno why it wouldn't work on the first run though. I rebooted the watch itself and then followed step by step manually. the watch is booting... and.... IT IS WORKING!!! Yaiks! :D:highfive:
[Amazfit] Kaudii:
Saratoga78 the control of buttons goes crazy after the set alarm on the watch becomes active, when the watch is turned off and on again, everything seems to work properly, unfortunately until the next alarm
[Amazfit] Saratoga79:
Maybe in some scenarios may not work properly but there is nothing else to do :(
[Amazfit] Kaudii:
Unfortunately, this is true, I checked it on the CN roms, unfortunately it has to do with the new button control, there is no error on it. The last CN Rom on which it worked was 2.0.43.0
[Amazfit] saarakura:
this is working or not? Fevves said it worked and Kaudii said its not
[Amazfit] Fevves:
For me it's working as I don't use the alarms (hidden). I tried sports activities, music, heart rate, compass etc and all is working as it should. Occasional long tap on the uppper button is returning to upper menu instead of returning to the WF (weather, settings etc, ) but mid button work instead as is working quite well.
[Amazfit] saarakura:
This problem with alarms....you dont use any alarms?
[Amazfit] Fevves:
As I said. I don't use the (watch) alarms as I don't need them at all, so for me all is fine.
[Amazfit] cesareogallego:
Did someone else try this? I want to update the version but only if I can keep the operation of the buttons.
[Amazfit] saarakura:
i will try today
[Amazfit] wsabg:
Just installed - seems to work at least in terms of scrolling by buttons etc. Will try a short workout in a couple - if I don't edit or reply, everything is fine ;)
[Amazfit] tresexti:
On Chromebook

Is there a way to install this if i have a chromebook or do i have to get hold of a Windows laptop?
[Amazfit] cesareogallego:
Hi.

I tried it now. I unlocked my bootloader succesfully and them I executed your script. As Fevves said it failed with

C:\Users\xxxx\Desktop\Stratos_2.3.8.0_key_mapping> fastboot boot root\boot-US-ad

b-root.img

downloading 'boot.img'...

OKAY [ 0.349s]

booting...

FAILED (status read failed (Too many links))

finished. total time: 1.212s

I tried to contiue step by step. I got stuck in

> adb remount rw

remount of system failed: Permission denied

remount failed

Any idea?? Thanks

********************

EDIT

********************

I tried again and It failed too but with distinct message

downloading 'boot.img'...

OKAY [ 0.345s]

booting...

FAILED (status read failed (Too many links))

finished. total time: 1.205s

********************

EDIT 2

********************

I don't know how but... IT WORKS!!!! Thanks a lot
[Amazfit] 1immortal:
a little installer to make life easier -

https://mega.nz/#!Hd8SGIzA!ninLmqyrJONucZdeJuVOCg695aR2AnC8uNn2j9Wd35Y

[MENTION=5062938]Saratoga79[/MENTION] stick it in the first post if you wish capara.
[Amazfit] hugonv:
How can I install this ?
[Amazfit] Fevves:
By following the OP?

If still unclear then do mind reading other explanatory threads that expain how to connect your watch to your WIN PC / MAC, ADB and you're set to do the OP procedure.

Do bear in mind you will have to have patience and guts to mod your android device if you never did so in the past.
[Amazfit] Saratoga79:
New 2.3.9.0 OTA update issues

New 2.3.9.0 OTA update issues

If you have this mod installed, and you are about to update to latest OTA it will fail to update, so previously you need to revert the mod using NEW.bat or enabling the new key mapping if you use the manual method and then update using OTA as usual.
[Amazfit] andreluigo:
After upgrading to version 2.3.9 the mod to change the operation buttons is not working. Did you upgrade it?

_____

Edit:

This https://xdaforums.com/smartwatch/amazfit/global-stratos-2-3-9-0-offline-ota-t3900473 worked!
[Amazfit] Saratoga79:
There is no need of upgrading the files, it just edits a system file and works fine.
[Amazfit] ahsim:
Can you modificate this key mapping file so that to make ability to run some app by long press of bottom button on the watch?

I would like to set alpine quest by this action
[Amazfit] Adi59:
I had exactly the same error and behavior. I re-run the installer and even with the fail, it reached the end of the script and reboot watch. I have the old mapping now.
[Amazfit] alextit:
to be sure...

Hi,

Just some questions to be sure that i will do the good things.

I want to have old mapping keys. I am ever in 2.3.9.0

I have to change my bootloader first.

I can then use the files step by step as in first page. Can i use the windows installer files ? Because when i download it, it is named 2.3.8.0 version... Or must i use manual installation ? but same question : files are written for an 2.3.8.0 version...

After, if a new version is send by huami, i won't be able to install it by OTA, I will have to disable the mod installed. I will have to flash new.bat or old.bat (how ? with windows installer ?) and after OTA will be possible. Next i will do again same flash to recover old mapping.

Is it right ? Have i all understood ?

Thank you for your helpful
[Amazfit] Saratoga79:
To disable the new key mapping, run OLD.bat (or the .exe) on Windows or use the manual commands.

When a new OTA update is up, you need to revert to the new/stock key mapping running NEW.bat (or the .exe) or using the commands.

After updating your watch, you can disable again the new key mapping.
[Amazfit] alextit:
Great !

I have unlocked bootloader and install the mod. That is working perfectly !

Thank you a lot for those !
[Amazfit] cesareogallego:
Does this trick still work with the latest firmware version?
[Amazfit] richierg:
How to connect at fastboot screen?

My watch boots to a fastboot screen showing a monitor graphic. I can't connect using adb and the buttons seem to do nothing. What am I supposed to do here?

POSTEDIT

oh. OK. I need unlock the bootloader. Sorry.
[Amazfit] Saratoga79:
Windows .exe installer update

OP updated with new Windows .exe installer by [MENTION=3464625]1mmortal[/MENTION]

Now you can choose between installing old or stock/new key mapping.
[Amazfit] GoJo ^^:
I don't own it (yet) i'm curious to know what was the old mapping and what's the new one..?
[Sprint Samsung Galaxy Note 8 Questions & Answers] riyaludeen10:
After UI pie update well working pixel 2 camera but I was looking for pixel 3 camera so after uninstall pixel 2 camera now can't working anyone pixel came plz help:crying:
[Moto G6 Questions & Answers] Spaceminer:
As the title so eloquently stated, I need help with some kernel build errors. If anyone can provide assistance, I would greatly appreciate it.

If anyone else with a G6/G6 Play wants to ask their own kernel or build related questions, I very much welcome that in this thread. I don't have all the answers, but I'll damn sure try to help you anyways. If you can answer a question, please do so. If you have logs to post, please attach them or use the hide function. No one wants to be forced to read a Linux novel just to see the next post.

Logs:

GEN ./Makefile

scripts/kconfig/conf --silentoldconfig Kconfig

drivers/input/touchscreen/nova_mmi/Kconfig:4:warning: ignoring type redefinition of 'TOUCHSCREEN_NT36xxx' from 'tristate' to 'boolean'

fs/Kconfig:216: can't open file "fs/f2fs/Kconfig"

../scripts/kconfig/Makefile:43: recipe for target 'silentoldconfig' failed

make[3]: *** [silentoldconfig] Error 1

../Makefile:551: recipe for target 'silentoldconfig' failed

make[2]: *** [silentoldconfig] Error 2

make[1]: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/kernel.release'. Stop.

make[1]: Leaving directory '/home/android/kernel/kernel-msm-MMI-OPPS27.91-35-3/output'

Makefile:150: recipe for target 'sub-make' failed

make: *** [sub-make] Error 2

make: Leaving directory '/home/android/kernel/kernel-msm-MMI-OPPS27.91-35-3'

Some things I've noticed after investigating the errors.

1. fs/f2fs/Kconfig The f2fs folder and the subsequent kconfig do not exist in the kernel sources. Motorola did not include them and I don't know how to write it. I'm really stumped here. f2fs is needed by our device or nothing will ever boot. I have no clue what to do about this one. <<< Solved! Motorola has them in a different place in the repo. It took some digging but I found it. I had to add them manually.

2. include/config/auto.conf Same problem here too. auto.conf does not exist. I don't know what it should contain, or how to write it.

I'm very much at a loss with this. If I can't fix these issues, then I can't build.
[Moto G6 Questions & Answers] madbat99:
I can't believe you actually found the f2fs/kconfig or the folder itself. Nice detective work. It really is a bummer when an OEM releases a broken piece of $h!t of a source. I might try poking around in the next couple of days to see what I can figure out.
[Moto G6 Questions & Answers] Spaceminer:
I know, you'd expect it to all be together. And in the f2fs sources, there's a read me which details critical steps and dependencies required to build the kernel... Because of course there is! My 2nd problem might soon be solved for that very reason actually.

Basically, you need to search the repos for MMI-OPPS27.91-35-3. The only problem with that is, github's search function won't pull up any results for it unless you're in a specific repo that has that tag. There's also 106 Motorola repos, and many contain Jeter sources. No clue how many either. I keep finding more. If there's a way to sync all that automagically, I'm not aware of it, and my PC also has no internet. So, that's not really possible. Why isn't there simply a folder labeled "Jeter-MMI-OPPS27.91-35-3", with everything required for building that release inside? The way things are laid out is extremely scattered and makes no sense. If I built a library, I wouldn't hide parts of books in the janitors closet, bathroom, and attic. Which is basically what they did.

"You want to read the whole novel?! Well I got news for you buddy! Pages 23-57 are in a desk drawer on the 3rd floor, and pages 192-465 are stuffed inside the back of random toilets in ziplock bags. I forget which ones. You'll have to fish around. And by the way, check the hallways on your way through, because I'm positive I dropped some pages." --Not even an understatement.
[Moto G6 Questions & Answers] madbat99:
Had some crazy issues like that building Samsung kernels (albiet much less "modern") in the days of froyo. But more broken than scattered. Ended up calling the kernel "Electric Sheep".

Might be showing my age on those few things. (Like froyo, geez).

It was a reference to a sci-fi book from, well, a while back called "Do robots dream of electric sheep?" It was about androids becoming so smart they became sentient. Seemed clever at the time.

Sorry for bit of OT.
[Moto G6 Questions & Answers] Spaceminer:
I have to manually enter each repo that might contain sources for the Jeter, then search for the tag. I can't in any way search all of Motorola's repos for a specific tag, or a partial file name. I was able to use dates to help narrow it down. I need to check at least 58 repos for Jeter sources. This is insane. Android should not be this difficult. Stuff like this would turn away almost any would be developer. The bar to entry is a ridiculously convoluted mess. If anyone knows of a way to search all of an organizations repos for a tag name at once, I'd love to hear it.
[Moto G6 Questions & Answers] madbat99:
I just tried looking, I couldn't find even 1. Granted I only had a few minutes to search. Is it Motorola mobility GitHub? I didn't really see anything recent.
[Moto G6 Questions & Answers] Spaceminer:
Yep, that's it. You have to select a repo first and drop into it. This is the easiest way for me.

Ex: MotorolaMobilityLLC > kernel-msm > select the releases tab > hit tags > then use the "find in page" in your browser, search for MMI-OPPS27.91-35-3, try the next page until you find it, or nothing at all. Go back and try another repo.

I just tried searching inside of the repo, and well... I'll post screen shots of that. You can clearly see the exact name in the releases to the left and it's underlined. When I search for it, I get nothing too. I have too many questions about that, and no answers. Github's search function is broken. It can find Jeter inside a text file somewhere, but can't find its own tags...
[Moto G6 Questions & Answers] madbat99:
Yeah I was finding the same. When you sync to their repo does it find the resources? I've had to jump everywhere to see even a portion. I know GitHub can be difficult to navigate manually, but come on. What a mess. Maybe I'm missing something. Makes me wonder if ppl building for ALI just decompiled it and did a few edits. But anything meaningful needs to be built in.
[Moto G6 Questions & Answers] Spaceminer:
I can't sync, otherwise I'd try. My pc does not have internet. Plenty of guides say that you can simply download the kernel source, untar it, set the tool chain etc, and you're good to go. That's the whole idea of being able to download sources manually, or so I thought. This is entirely broken though. It's really not accessible manually. I wish I could check repo sync.
[Moto G6 Questions & Answers] madbat99:
Oh I see. I had to kill my home internet recently (can't fit it in my budget). But I went to Virgin Mobiles unlimited plan and "turned on" my hotspot. So I get internet on my PC. It slow as heck during the day but, come 2 a.m. it flies. That's when I usually do my downloading and sync sessions.

That's going to make it a little tough. You've made some great contributions to this device. I'll try to help any way I can.

The g6 play telegram group has some good guys in it. But alot of people just waiting on someone's breakthrough to show up too.

I see fs/f2fs/kconfig in the zip. But I do not see

Include/config/auto.conf
[Moto G6 Questions & Answers] madbat99:
But include/ is, well, missing things for sure.
[Moto G6 Questions & Answers] Spaceminer:
Yeah, this whole thing is a mess. I'm not sure that I'm going to get very far with it. Every time I try this, there's some major problem that can't be overcome. No answers, and no one to ask. I keep trying every few months, been doing it for years, and something always keeps me from building. The android developer website is no help, and never has been. It's just as convoluted. Every part of it leaves a bad taste in my mouth.

The truth is, I want to break my phone. I get black square glitches, audio issues (viper helps), and constant horrible scroll lag. I'm also past the return date. This was whole reason for wanting to build a kernel. To fix this crap. Our 4 core thinks it has 8 cores. It tries to send surface updates to a nonexistent core, surface flinger flips out because there's no power or response from cores 4-7, and attempts to redraw the screen on each core until it hits core 0 again. Black or white squares flicker across the screen when this happens. I've sent logs to Motorola/Lenovo, they don't care, they don't follow up, they don't fix anything. Why does this happen? The developers at Motorola took shortcuts. Huge, shortcuts.
[Moto G6 Questions & Answers] madbat99:
I saw some issues in the repo. Ppl I spoke to from the e4 on there.

Saw things about adding the /fs and needing to generate configs. It takes time. And support for sure. From users who have built Moto kernels.

I'll do some hunting.

The guy who made a kernel for the g6 also made a build for Jeter. I'll see if I can pick his brain
[Moto G6 Questions & Answers] the-her0:
From what I can tell he's building the kernel via reverse engineering, so he might not be the person to look to. My thoughts are taking the Ali auto config and modding it to be compatible with Jeter. I've been on RR for a while, tbh as well.
[Moto G6 Questions & Answers] Spaceminer:
I'm about to post Motorola's glaring shim error in a few min. I just need to reproduce it. Usually typing anything or making surface flinger do some work will do the trick, hence this long drawn out rambling about the shim error. Come on shim, I know you're going to screw up any time now... And there it is. Check the image in the attachments. I'll include the full logs. The kernel is mad because the frequency for CPU's 4-7 can't be read.
[Moto G6 Questions & Answers] madbat99:
Yeah, I see it a lot when using GPS for work (I do tons of driving). I catch it out of the corner of my eye. I see squares of glitches flipping out on the screen. Only for a second though.

Nice to have an explanation.
[Moto G6 Questions & Answers] Spaceminer:
I posted about it on Virgin's community forums. The rep there was... less than helpful, I'll put it that way. You should have no problem finding it if you look in the android section. I aim to raise a huge stink about this until Motorola, Virgin Mobile, or myself gets it fixed. I'm probably going to hit social media with it in the next 24 to 48hrs. I will fight them to get this fixed.
[Moto G6 Questions & Answers] madbat99:
I think you're one of the only other people I see with the g6 play from Virgin, other than me. Most are boost. I stick with Virgin for the hotspot. Once enabled with buildprop, it's endless.

Boost includes it in their plans, so it's already active. No need to "enable" it, But it's throttled over a certain data limit. Nope. I'll stick with Virgin. They stab you on the hotspot pricing, but their stab opens a hole for us to tether to our hearts content.

I know their both owned by Sprint, but little differences make the choice for me.

Boost does have better prices on the devices though.
[Moto G6 Questions & Answers] the-her0:
Agreed, I could have bought mine directly from sprint, but I got it from boost because they were selling it for $100 compared to a near $200 at sprint.

Update: Madbat made an issue on GitHub and I made some comments on it to clarify what he meant.
[Moto G6 Questions & Answers] Spaceminer:
I have finally located the source of the error. If anyone knows how to convert a boot.img-dtb to a dt.txt file, please let me know. I tried the old Axon 7 tutorial which worked for me in the past for other devices, but it gives me a bad magic error on the G6. Hex editing isn't going to cut it either, that's bootloop city. I need to edit out some core references. Check the images to see what I'm talking about.

Edit: I've discovered that the G6 Play actually does have an 8 core cpu. We have two clusters and 8 cores defined in the dtb. Cluster0 is set to cores 0-3. Cluster1 is rerouted to point to Cluster0, which forces the kernel to use only 4 cores. I'm attempting to get all cores online. I could still use some help converting the dtb to a dt.txt though.
[Moto G6 Questions & Answers] the-her0:
It's possible that could do a simple file rename
[General Questions and Answers] use472:
After installing TWRP do you have to format data? What does format data do?
[General Questions and Answers] Ashwinrg:
No. You don't need to format data. Its just wipe your data partition which includes user apps and the related data.
[General Questions and Answers] use472:
Thanks. Also i see many people use the disable force encryption. Do i need that with the official TWRP?
[Honor 5X Questions & Answers] CaptainNemo80:
Hi all,

I unlocked my phone and I installed LineageOS 14 (thanks to TWRP).

I tried to update Lineage (i had a notification), but when I rebooted, the stock recovery was launched... not TWRP.

Of course, i've flash TWRP several times... but at each reboot, the stock recovery come back..

From my PC, no problem :

- adb reboot bootloader : OK

fastboot flash recovery twrp-3.2.3-0-kiwi.img OK

fastboot boot twrp-3.2.3-0-kiwi.img OK

From the phone, with the correct combo key (Volume Up + Power), TWRP wasn't launched...

Could you help me ?

Thanks !
[Honor 5X Questions & Answers] shashank1320:
What happens when you boot to recovery via adb?

Adb reboot recovery
[Honor 5X Questions & Answers] CaptainNemo80:
Thanks for your answer !

Screen "EMUI" appears

with

- Reboot system now

- Wipe date/ factory reset

- Wipe cache partition
[Honor 5X Questions & Answers] shashank1320:
Is your usb connected while you boot to recovery.? If yes remove and boot once they see of that makes a difference
[Honor 5X Questions & Answers] CaptainNemo80:
- adb reboot recovery

- Phone shutdown

- I remove the USB cable

Phone restart

Recovery stock (EMUI screen, as described above) :(
[Honor 5X Questions & Answers] CaptainNemo80:
No Idea ?
[Honor 5X Questions & Answers] shashank1320:
Are you flashing the correct version of twrp. Whats your LOS version and which twrp you are using. May be the one you flashed is not compatible