-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Huawei watch 2 support #101
Comments
Hi, we have the Huawei watch 2 on the list of possible ports. I don't think that we have made any progress on the watch. Additional note: this is the repository of the sync client for Android. |
just saw support being added for the Huawei watch GT 2... hoping the huawei Watch 2 classic would be there soon as well |
Same here. +1 for the Huawei Watch 2 (LEO-DLXX) |
To get started on the Huawei Watch 2 we need the partition table of the device. Steps to do:
|
Hi, I'm new to all this, but is this the right output? ~ # ls -al /dev/block/platform/soc/7824900.sdhci/by-name |
Thanks @dave18, this is what we are looking for! |
Glad I could help. happy to test any builds on my Watch 2 if needed. |
@jrtberlin and I are working on a port for the Huawei Watch 2(sawshark/sawfish). We don't own this watch so this is a unique opportunity for the community to help 😉 We both own the regular Huawei Watch (sturgeon) of which I did the port. At first glance the two seem very similar. The (probably) biggest challenge is to port the Android base from Marshmallow to Nougat. The current road map we will use to get a working port will be as follows:
A repository for the Huawei Watch 2 has already bee setup: https://github.com/MagneFire/meta-sawshark-hybris Of course, when we have something to test we will publish that here. Though, keep in mind that porting the Android base is a time consuming task, meaning that it'll probably take sometime before we have anything to test for you. |
@jrtberlin @MagneFire Thank you for working on this. I own a Huawei Watch 2 (sawfish) and am pretty well versed in both the Linux and Android ecosystems as well as development for both (I'm the author of andOTP). So if you need any specific information or testing feel free to contact me. |
Sorry for not getting back at this sooner. But I have successfully ported the Android base to 7.1.1 on And I have just built a version for the Huawei Watch 2. This one has the system base from a Download: https://www.dropbox.com/sh/h0kzcky4qls3v60/AAC7nBfhSoPpStSQ6Gx4h769a?dl=0 First of all, I don't expect it to boot fully. So depending on how far it gets in the boot process there are different things to debug. To flashJust follow the general instructions on the install page (pick for example It rebootsThe first thing to try is to boot AsteroidOS with EDIT:
Things that
|
@MagneFire thank you. Tried booting the BT variant, following https://asteroidos.org/install/sturgeon/ The watch is unlocked now. Followed -> 2 b. Temporary installation:
=> The watch then boots again into Wear OS. Then tried:
=> watch hangs in fastboot and does not react on anything except holding both buttons until reset... then again booting into Wear OS
|
@FlorentBrianFoxcorner Thanks for testing! 😄
Also, does it show the AsteroidOS boot logo at this point? Another thing, can you also send the output of For reference sake, this may also be helpful: https://asteroidos.org/wiki/boot-process/ |
@MagneFire, YES, I was able to connect! It does not show the logo but is stuck at the frozen fastboot menu. The kernel seems to lack CONFIG_QUOTA, I was NOT able to mount sdcard, mind dmesg.
-> My Ubuntu box was able to mount the resulting image RW alright. For dmesg on Wear Os I need root or is there a shortcut?
|
Thanks so much for that info! Only the fastboot image has changed, you do not need to push the ext4 file again. |
The kernel still does not seem to fully support required ext4 features:
Tried to build myself, did not succeed...
added line to asteroid/build/conf/bblayers.conf:
then did:
got:
|
Tried
Filesystem is ok. |
A new As for the bitbake issue, I think this is caused by |
That did the trick for mounting /sdcard! New dmesg: sh-4.4# ls -l /sdcard Also started new build now... |
Very interesting! |
There is no adb connection possible when booted without debug. And in debug mode there is no /system mounted. Followed https://asteroidos.org/wiki/boot-process/ and logcat is in /rfs/system/bin. But it seems to be dynamically linked and libs are missing as well as ldd -> I am lost.
The build passed yesterday's error, now stuck at
I there a way to skip tests during build? |
Is a ssh connection possible without debug mode? (ssh ceres@192.168.2.15) (https://asteroidos.org/wiki/ssh/) As for the build, disabling tests require some manual patches as well. Can you try to clean the package first?
And try to rebuild. Also, I have uploaded a new |
Sorry I did not notice this earlier: When that screen content I sent earlier is displayed, actually no USB connection can be made to the watch. Tried different USB ports at my PC without success. Also tried with new ext4 image. Ubuntu dmesg shows endlessly:
These line occurs after fastboot boot [..] zImage-dtb-sawshark.fastboot:
Then the device becomes "Google Android" and USB connect is no longer possible. Trying rebuild as well. |
Build succeeded, I get the same result when using resulting ext4 and kernel. |
ok, thanks for confirming. I am currently not sure why this issue occurs. Meanwhile, I will create a new layer specific for the Bluetooth version of this watch. So there will, for now be, two repos:
I will let you know when the builds are done. The files will be published here: https://www.dropbox.com/sh/lefbpbjwqsmhfm2/AABSEF33uHH119JV38Ri1OYna?dl=0 On edit: New files have been published to the Dropbox folder. Also I have updated the kernel to the latest version for Nougat. Edit 2: I have updated the binaries one more time |
I'm not very well versed in this but I did try to flash both versions referenced in your last post @MagneFire to my Watch 2. No luck: Both end up with the screen shown here #101 (comment) To make the device discoverable with adb I'd gladly extract any logs I can (from debug) if needed! |
@fosspill Thanks for testing! 1. Boot to debug-ramdiskBoot to this mode to change the configuration of journalctl. Then start a
Change the contents of
Then make adjust the journald config:
Adjust the
Lastly, remove the symlink and create a new folder:
Now exit chroot:
And reboot to normal mode. 2. Reboot to normal mode.Now just reboot to the mode where 3. Reboot to debug mode.Now boot to debug mode to fetch the journalctl logs from the normal mode:
Now you should see the log of the previous boot. Can you send me this? On a side node, I have updated the images once more with an updated adb daemon and small changes to the usb-moded package. Can you test this too. I don't really expect it to be any different, but you never know 😉 edit: Adjusted instructions for temporary installation. |
First: The new images has the exact same issue. Further: I ran (in order):
There is indeed no /0/ or anything alike in /sdcard/media, it is empty. |
Huh!? That's really strange, can you try this: #101 (comment), is the output the same? |
@MagneFire |
Time for a quick update. It looks like the lackluster performance is originating from the underclock script we use https://github.com/AsteroidOS/meta-sawfish-hybris/blob/master/recipes-core/underclock/underclock/underclock. Looking at the WearOS scripts makes it more obvious that it keeps all cores active but limiting their max clock speed. In any case, I've done some tuning such that it keeps only two cores active instead and changing the GPU parameters. Now it performs much better 😄 Lastly, I looked into the speaker/microphone issue, it turns out that the issue really is related to using Oreo firmware files on a Nougat kernel. So, I went ahead and ported everything to Oreo and now the speaker and microphone works fine too. Happy easter to you all! |
@MagneFire Awesome to see all the progress you made, looks like I can soon permanently ditch WearOS from my sawfish. |
In case you haven't noticed, we finally have official nightlies! (https://asteroidos.org/install/sawfish/) To comment on last progress update I've uploaded a nightly with some of my most recent changes in there (not upstreamed yet). It's available here: https://www.dropbox.com/sh/r2hhnfsgk3lbbxz/AADJyoFw4jKGG_h4-CYlIoAva?dl=0 A list of changes compare to the current upstream build:
I did now start to notice that battery life isn't particularly great. I'm currently looking into this specific thing. Disabling AOD and Bluetooth still causes a huge battery drain, not sure where to look for now. I intend to look into how this was in the current official nightly. An initial look into the Talking about the screen stuff again, while looking into the boot logo not shown at boot issue I noticed that double-buffering for the framebuffer causes the black screen. This makes me lean to think that double buffering could maybe cause the garbled screen output. I will look into this further. EDIT: I tried to give credit to the most relevant people helping with this port: https://asteroidos.org/wiki/porting-status/ if I missed someone please, let me know so I can rectify. |
So much exciting stuff here! You are a true superhero @MagneFire. Battery drain is better with underclock I presume? Maybe keep the sluggishness until the cause of battery drain is figured out? |
You are too kind @fosspill 😊 Regarding the battery drain, I did also assume that the underclock tool would be the culprit here, but it isn't. The battery drain is equally bad when either all cores are active or if only one core is active (Around 50% overnight with AOD and Bluetooth off). This makes me think it's not related directly to the amount of cores active. There are some low power mode settings for the CPU (https://github.com/AsteroidOS/meta-sawfish-hybris/blob/master/recipes-core/underclock/underclock/underclock#L15) which I seem to have disabled in my local branch, will look into this. But I can't remember how good/bad battery life was with the previous nightly, so I have to look into this further. For now I think it could be any of the following:
The fact that I have to explicitly disable double buffering to actually show the boot logo is also very interesting. Looking at the kernel source it seems that double buffering is supported, but somehow it results in a black screen. I think this is one of the reasons for the sluggishness too. (Assuming that double buffering = improved UI smoothness) |
Maybe you can have a look at this kernel here now that the watch is ported to an Oreo base: https://forum.xda-developers.com/t/rom-kernel-huawei-watch-2-lte-sawshark-bt-sawfish-owde-180926-001-a1-22-jan-20.3705589/ If I remember correctly it drastically improved battery and and responsiveness on WearOS. |
@flocke Very interesting! I will try to use this kernel instead, it does sound like it has quite some improvements. |
Huh ? |
Speaker and microphone functionality is only fixed in the build referenced in that comment (https://www.dropbox.com/sh/r2hhnfsgk3lbbxz/AADJyoFw4jKGG_h4-CYlIoAva?dl=0). This is not available in the current nightlies. Simply due to the issue that was introduced in these images: huge battery drain. As for how to test microphone and speaker, look into this PR on the relevant commands: AsteroidOS/meta-sturgeon-hybris#1 As for the thing I did last since the last post here:
I do think that I found the root cause of the battery drain issue though. It seems to be related to |
Strange with this build https://www.dropbox.com/sh/r2hhnfsgk3lbbxz/AADJyoFw4jKGG_h4-CYlIoAva?dl=0 the speaker and mic doesn't work but the problem is that when my watch is connected to my phone my watch don't receive any notifications 🤔 |
How are you testing the speaker and microphone? I should mention that it only works as the user Also, I can now confirm that |
I didn't tested microphone but when I put the speakers at 100% and an alarm I can't hear anything and notifications doesn't work too I don't know why (on your last build) |
Ah, I see. We don't actually have any sounds included in the image 😢 That's also why I noted the AsteroidOS/meta-sturgeon-hybris#1 as that lists the commands that allow you to test the functionality for those. |
Ok but can you check at the notifications please because (I don't know if it's me or not) I don't receive any notification on this build but it worked with the one that is on the official site. |
Notifications work fine for me, I've been using this build (https://www.dropbox.com/sh/r2hhnfsgk3lbbxz/AADJyoFw4jKGG_h4-CYlIoAva?dl=0) since yesterday. Otherwise you can just try to reboot the watch or phone. Toggle Bluetooth on/off on the watch or phone. (It's finicky 😉) |
Ok I just rebooted my watch and it worked now. |
Hey @MagneFire, |
The kernel you mentioned was also mentioned by @flocke. I've already reported the the behavior of this kernel in comment: #101 (comment) A reason as to why janjan's ROM build feels smoother is because it enables an additional CPU core and overclocks the GPU. Already tried this too, but still behaves the same. (Could be more but the kernel source doesn't have a proper git history, it's not worth to figure out what exactly changed (21+ million changes in one commit): https://github.com/toffyjan/Huwaei_watch_2_sawshark/commits/master) I would like to mention again that I don't think the kernel is to blame for the performance issues. As mentioned in #160 (comment) I suspect that the hwcomposer is to blame here. So, to summarize:
Here is a quick comparison between current implementation and with the aforementioned PR fix: comparison.mp4 |
I have the Sawfish(BT) variant and I tried the current nightly build and this version: https://www.dropbox.com/sh/r2hhnfsgk3lbbxz/AADJyoFw4jKGG_h4-CYlIoAva?dl=0 |
The current nightly has a rather sluggish UI performance. This is using the kernel GPU drivers from Marshmallow with Android Nougat HWComposer library (copied from a stock Nougat ROM) (https://dl.dropboxusercontent.com/s/u1o3mtnlojg49jt/system-NXH20B.tar.gz). Here is a new version that changes this a bit: https://www.dropbox.com/sh/hwox7dvun536fjb/AADUOnhMVQpJFDhjB-4_Teooa?dl=0 it's similar to what's done in #101 (comment). But for now with microphone and speaker functionality disabled as it resulted in horrible battery life. As well as it has enabled the Interestingly, using a stock WearOS ROM for sawfish (BT) or sawshark (LTE) from https://www.reddit.com/r/WearOS/comments/9lnwu4/for_those_wanting_to_force_the_new_ui_on_the_hw2/ makes the UI still feel sluggish. Now the real interesting part, in case you didn't know, the Huawei Watch 2 (BT) actually got some WearOS H (Android Pie) preview builds. Simply using the system image from that results into a much improved UI performance. You can download the WearOS preview build from here: https://storage.googleapis.com/androiddevelopers/shareables/wear-preview/sawfish-PWH1.180422.008.tgz. It works on the LTE version of the watch too. A quick how to on how to flash
Now to the actual flashing of it all, make sure you are already in fastboot mode:
Enjoy AsteroidOS performing much better on the Huawei Watch 2 😄 To summarize
The latest work is not yet upstreamed but you can view it here: https://github.com/MagneFire/meta-sawfish-hybris-1/commits/oreo_v2. |
Sorry for reviving this thread after months, but I think this belongs here :-). All dropbox links in here are dead, so installed the build from the official website. Any chance for a fixed build or a reupload? @MagneFire Thanks ;) |
I'm not aware of people reporting bad battery life on Is your experienced battery life similar to what you also had on WearOS? This could perhaps mean that your battery is faulty. Otherwise, it must be some deep sleep related issue. Could you send some logs for that?
|
It's worth mentioning that I found a workaround to the black screen issue that has been plaguing this port for some time (and ports that build upon this). This has been merged in: AsteroidOS/meta-smartwatch#74 That PR also makes a huge performance improvement for all ports based on an Android 8.0 base. This port still uses the Nougat base because of the two (now solved) issues. |
Shall we close this and open individual issues tagged sawfish in meta-smartwatch for eventually remaining problems? |
Sounds good 👍 In both cases we have achieved the main goal, which is to add support. Missing features and current issues should get their own dedicated issue in https://github.com/AsteroidOS/meta-smartwatch/issues. |
Hi everyone,
I was thinking about this for quite some time.
Is there any chance we could get Asteroid on huawei watch 2?
I would be glad to help on the porting.
The text was updated successfully, but these errors were encountered: