yashsingh1/xdaforums huggingface dataset:
[Asus ZenWatch 2] Lrs121:
Requirements:

Linux/OSX (Windows if drivers are available)

Unlocked Bootloader

ADB and Fastboot in path - recommended not required

Developer mode

ADB enabled

Not Needed:

DOES NOT NEED TWRP

A backup, though it is recommened

Before Installing (only if the bootloader is locked):

Install the Android developer tools: adb and fastboot, on your computer.

Enable ADB in the Android Wear settings under Developer options/Android Debugging. (Developer options appear after tapping the Build number in the About page several times)

Enter the following commands in a terminal:

adb reboot bootloader

fastboot oem unlock

Temporrary Install (Assumes your using Linux):

Go to the AsteroidOS website - link is below

Select Asus ZenWatch 2 (sparrow)

Download the official rootfs and zImage files

Download the AsteroidOSSync app from the bottom of the website

Install on your phone - Useless until bluetooth is implemented

Push the rootfs to the sdcard

adb push -p /home/user/Downloads/asteroid-image-sparrow.ext4 /sdcard/linux/asteroidos.ext4

Reboot to bootloader

adb reboot bootloader

fastboot boot the zImage

fastboot boot /home/user/Downloads/zImage-dtb-sparrow.fastboot

Download:

AsteroidOS Official Downloads

Archives/Mirrors:

To be updated

Old How To "Install":

Extract asteroidos-*-sparrow.tar.xz

cd to extracted files

adb push -p asteroid-image-sparrow.ext2 /sdcard/linux/rootfs.ext2

adb reboot bootloader

fastboot boot zImage-dtb-sparrow.fastboot

enjoy

Getting logs:

While there is no straight forward way to determine which log is needed because there are so many pieces that break regularly. Some common areas are debuging the launcher, and hw issues. I do not remember all the logging commands or what does what, so if you are obtaining logs you will need to run all the commands and capture the outputs.

adb access to Asteroid OS (windows, linux, mac)

adb shell

add strace - if needed

journalctl -u mce --no-pager (requires disabling 1000 user first) - used to debug launcher and other packages.

EGL_PLATFORM=hwcomposer strace lipstick --platform hwcomposer

EGL_PLATFORM=hwcomposer lipstick --platform hwcomposer

more to come
[Asus ZenWatch 2] Lrs121:
Q: Why doesn't x, y, z, feature work?

A: Probably, because it hasn't been implemented yet.

Q: I have x, y, z, issue.

A: Logs Please

Q: Can I use a custom kernel?

A: Only if you are willing to put forth the effort replace the kernel source in the build process yourself and make your own builds.

Q: I flashed *insert file here* and now it won't boot.

A: Sounds like a personal problem, since you didn't read the instructions properly. Seriously, you will probably need to restore some sort of backup.

Q: Will you port AsteroidOS to my watch?

A: No, but I can, somewhat, help you port it yourself. #asteroid on freenode or [url]https://asteroidos.org/irc-channel/[/URL] is a good place to get help.
[Asus ZenWatch 2] matze19999:
after the bootanimation, the display is turning black and it seems to have a bootloop :(

---------- Post added at 12:09 ---------- Previous post was at 11:42 ----------

https://www.androidfilehost.com/?fid=24694152805485105

Mirror for your file
[Asus ZenWatch 2] Lrs121:
Thanks for the mirror.

Have you tried pressing the power button after the boot animation. I can't remember if it defaults to the sleep state after boot. There is no "ambient" mode, the screen is either on or off.

It is also possible that, because it is a dev preview, this particular build is broken and may be so for a while.
[Asus ZenWatch 2] matze19999:
Will try it, thanks

---------- Post added at 19:59 ---------- Previous post was at 19:55 ----------

no, doesnt work. I can access the watch via adb shell, but display is black all time..
[Asus ZenWatch 2] Lrs121:
Ah that's useful. If adb can be access then that means is not the boot image nor is it boot looping. Which narrows it down to the root file system and probably just an unstable build.
[Asus ZenWatch 2] matze19999:
I thought you are the developer of this build? :)
[Asus ZenWatch 2] Lrs121:
I maintain the device tree, beyond that I'm clueless. So if there happens to be bad code or something related to the system I'm clueless. That or I had a bad download during the build process. Anything could be the issue.

If I can remember the some of the logging commands I can have people get me logs from their watches and I can get help decoding what the issue is from Florent Revest or someone on IRC.
[Asus ZenWatch 2] matze19999:
If you tell me how I can take a log file, I would send it to you...
[Asus ZenWatch 2] Lrs121:
Update:

There is now a directory for test changes. Use this if you are brave, though in general it should be safe.

It can be found under the Google Drive link. Please read the README file. It will include important information related to the test builds

Edit:

the sync app has been uploaded. it is not signed so any future updates will probably require uninstalling the old app and installing the new
[Asus ZenWatch 2] matze19999:
I get parsing Error while installing the apk file.

Android 6.0

Snapdragon 820 64Bit
[Asus ZenWatch 2] matze19999:
http://hastebin.com/onuyifedet.md

sh-4.3# lipstick --platform hwcomposer
EGLFS: Screen Info
- Physical size: QSizeF(29, 29)
- Screen size: QSize(320, 320)
- Screen depth: 32
Segmentation fault
[Asus ZenWatch 2] Lrs121:
Make sure you have the EGL_COMPOSER=hwcomposer pre-appended or else it will segfault. I forgot strace had to be built and added to /bin. Also I believe the journalctl command is used to debug the launcher

I'll look into the app issue
[Asus ZenWatch 2] prathmesh01:
fastboot and adb is working flawlessly on Mac OSX 10.11.6
[Asus ZenWatch 2] Lrs121:
Update:

Major updates to meta-asteroid (core of the os) - should probably fix launcher issues

Minor update to sparrow device tree

Will be up soon
[Asus ZenWatch 2] Lrs121:
Major update:

meta-asteroid has had many changes and some rewrites

sparrow device tree has been updated to support changes to meta-asteroid

rootfs is smaller after removing some optional features
[Asus ZenWatch 2] Misterjunky:
bootloader

I was wondering if after executing these two adb commands

will the bootloader remain unlocked even after reboot and

a power down? (my phone has the MM 6.01 updated)

adb reboot bootloader

fastboot oem unlock

Thanks, have a great day everyone!
[Asus ZenWatch 2] Lrs121:
Adb reboot bootloader just reboots the watch into fastboot mode.

Fastboot OEM unlock is what unlocks the watch, this is "permanent" as in it will stay that way until you run the command fastboot oem lock
[Asus ZenWatch 2] Misterjunky:
good to know

Does this mean that the watch can be rooted easily once the bootloader is unlocked?

If so, which rooting app would I need to use on my MM 6.0.1 Zenwatch 2 (WI501Q)?

After the bootloader is unlocked would supersu alone without anything else root the phone?

Thanks in advance!

Have Great day!
[Asus ZenWatch 2] Lrs121:
This is a question better asked in the Q&A, Help, and Troubleshooting threads. http://xdaforums.com/zenwatch-2/help

Root is not needed for Asteroid OS, but yes with the unlocked bootloader you can root the watch. You will need the TWRP recovery for your phone and a modified version of SuperSU.
[Asus ZenWatch 2] Misterjunky:
re: OK

Okay, that's good to know... I already unlocked the bootloader and flashed the proper version of twrp which I

found in one of the threads here in this forum.

Thanks for the info.

Have a great day!
[Asus ZenWatch 2] jon7701:
Watching this thread. Even though its a developer preview I went ahead and flashed the boot image since I cant really use android wear anyways (I dont use google services). Is there any "apps" that can be added to the os? I dont have any expectations of there being any but im curious.
[Asus ZenWatch 2] Lrs121:
Some are being added as it's developed such as a music player but at the moment all apps must be built when AsteroidOS is built. No way to "side load"apps. Also just remember to flash the boot image with each update. It may change when it is least expected.
[Asus ZenWatch 2] Lrs121:
Update coming when I get home. The build includes a music app. It's features are wholly unknown to me but it's there. An update to the sync app will be required to use these features.

A majority of changes exist to the back end meta-asteroid
[Asus ZenWatch 2] Lrs121:
It has occurred to me that I have completely forgotten to update the AsteroidSync app, even though I already had it built sitting on my hard drive. My bad, I bet that makes using the new features built into AsteroidOS rather difficult. These now include music and notifications(?). Also it seems MTP is being worked on and is potentially available in the latest update.

As usual there are nightlies and subject to change or be out right broken. I haven't tested any builds since July and probably wont until December break.
[Asus ZenWatch 2] Lrs121:
Put up a minor update, it will probably be the last one for a while. Im running out of harddrive space to keep the build environment setup.
[Asus ZenWatch 2] ps000000:
Wow I will try this ROMs.
[Asus ZenWatch 2] Lrs121:
So I caved and bought a 2TB hard drive. I'm working on catching up on patches as well as fixing the kernel build. It's slow going, classes and homework are consuming a majority of my time.
[Asus ZenWatch 2] Lrs121:
I finally figured out what was breaking the builds, it turns out I made a typo in updating the source.

Since its been so long creating a full change log will take some time so if you want to know whats changed in the mean time

check up the commits in the source code.
[Asus ZenWatch 2] matze19999:
will you make a new build?

---------- Post added at 21:41 ---------- Previous post was at 21:27 ----------

nice work, the rom works perfectly!
[Asus ZenWatch 2] abine45:
I can't get asteroidOS to boot at all, it just goes right into android wear instead every time. I'm doing everything correctly.
[Asus ZenWatch 2] jon7701:
Unfortunately it looks like the touch screen issue isnt fixed yet (hopefully in the next update?). Thanks for the updates, the latest one added some cool stuff.

Are you sure you named everything correctly? The path to your rootfs.ext2 should look exactly like this "/sdcard/linux/rootfs.ext2", Linux generally treats everything as case-sensetive.
[Asus ZenWatch 2] Lrs121:
Please list exactly what you did. The instructions are rather precise and any changes will prevent it from booting to AsteroidOS.

We still don't know what's causing the touchscreen issues. It's intermittent for me and when it does happen debugging it isnt showing much right now. I plan to look further after finals next week.
[Asus ZenWatch 2] vibraniumdroid:
I'm having the same problem :(
[Asus ZenWatch 2] Lrs121:
Some basic information on the process you followed, the files/version you used, whether or not you unlocked your watch. Just these basic pieces of information helps me diagnose the issue. Just saying it doesn't work is not only unhelpful but completely useless since there's nothing that can be used to diagnose the issue.
[Asus ZenWatch 2] Lrs121:
AsteroidOS is officially in Alpha 1.0. Official builds of the os are available through the AsteroidOS website. Link in the third post.

Please reread the op and follow posts by me as some of the information has changed.

http://florentrevest.github.io/2016/12/07/asteroidos-alpha
[Asus ZenWatch 2] vibraniumdroid:
I have my bootloader unlocked and twrp flashed. I downloaded the latest build from AsteroidOS.org pushed asteroid-image-sparrow.ext2 to /sdcard/linux/rootfs.ext2 successfully and then I booted zImage-dtb-sparrow.fastboot it said successful but booted into Android wear instead.
[Asus ZenWatch 2] matze19999:
the rom works perfectly for me, but bluetooth isnt working..

can u please fix this?

keep up work!

best regards,

matze19999
[Asus ZenWatch 2] Lrs121:
The bluetooth is a known issue, as stated in the op, and requires changes to the code to actually implement it for sparrow. This will take some time as i have to read through the code for the LG G Watch and implement a ported version. The plan is to look into after finals.
[Asus ZenWatch 2] vibraniumdroid:
Do you have any idea of what might be causing the watch to boot Into Android Wear instead of Asteroid OS?
[Asus ZenWatch 2] Lrs121:
Off the top of my head is a bad download. By all accounts it should work. I haven't tried downloading the images from the AsteroidOS website, I tested them another way.
[Asus ZenWatch 2] abine45:
I am on the latest update, and I have tried it multiple times and I didn't work! I am for sure unlocked too!
[Asus ZenWatch 2] vibraniumdroid:
I downloaded it multiple times and I tried using old builds also.
[Asus ZenWatch 2] Lrs121:
That's interesting my next thought is that it is getting corrupted during the adb push step. Let me get some ideas put together on what's happening and some steps to debug it.
[Asus ZenWatch 2] vibraniumdroid:
Okay, maybe the problem is with my Mac. Do you think it would be worth while installing linux and seeing if it works?
[Asus ZenWatch 2] Lrs121:
I would try it by installing a Linux virtual machine. Then try passing the USB connection to the virtual machine. You can use a small Linux distribution to try such as puppy Linux or DSL. Just to eliminate any potential issues, but I really don't think tour Mac itself is the issue
[Asus ZenWatch 2] vibraniumdroid:
I installed linux to the hdd of my mac and tried again but the watch still boots into Android Wear :(

---------- Post added at 04:52 AM ---------- Previous post was at 04:50 AM ----------

Also there is working adb/fastboot drivers for the zenwatch 2 on windows
[Asus ZenWatch 2] Lrs121:
I'll try the image when I get home. I'm thinking the zimage may be a bad build
[Asus ZenWatch 2] vibraniumdroid:
Okay, thanks
[Asus ZenWatch 2] Lrs121:
I used the files directly from AsteroidOS website. It works so now its time to try and debug the issue.

I didnt confirm this before but this only works on Sparrow(The larger watch), if have the smaller one Wren it wont work.

First we hash everything, on the computer and the watch. As well as confirming the bootloader is unlocked

md5sum 8d42dcc122882f146c160efe1ef607a5 asteroid-image-sparrow.ext2/rootfs.ext2

md5sum a4088fbafd05ce01aea4dc5cca69ddcf zImage-dtb-sparrow.fastboot

adb reboot bootloader

fastboot oem unlock

redownload the images and md5sum them. They should match the sums listed above.

Now push the asteroidos image to the watch "adb push asteroid-image-sparrow.ext2 /sdcard/linux/rootfs.ext2"

then open a shell to the watch "adb shell", and md5sum the rootfs.ext2 image. It should still match the sum above.

If all that works fastboot boot the zimage and see if that works. Please let me know the results.

Please note that if you attempt to boot the asteroid os image it will change the sums of the rootfs.ext2 so md5sum the image before you boot it

Some ideas ive had as to why its not working.

What i think is happening is that the zimage is booted from the fastboot transfer, and it's functioning as it should.

It looks for an asteroidos image in the exact path and the exact name /sdcard/linux/rootfs.ext2 when it doesnt find it,

or it finds a broken image that cant be booted, it defaults to booting android wear.

That tells me that the asteroidos image is in the wrong path with the wrong name, or is broken in the download or transfer.
[Asus ZenWatch 2] danialbehzadi:
Nice Try. I just ordered an Sparrow, only for using asteroidOS (:
[Asus ZenWatch 2] danialbehzadi:
I got my watch last night and unlocked oem from my bootloader by fastboot. I couldn't boot AsteroidOS, too.

On my watch I have:

shell@sparrow:/sdcard/linux $ md5sum rootfs.ext2
8d42dcc122882f146c160efe1ef607a5 rootfs.ext2

and on my PC:

~$ md5sum Downloads/zImage-dtb-sparrow.fastboot
a4088fbafd05ce01aea4dc5cca69ddcf Downloads/zImage-dtb-sparrow.fastboot

On my watch in bootloader mode. It is written

I think maybe the new bootloader from Asus is preventing or interfering the proccess of booting zImage.
[Asus ZenWatch 2] Lrs121:
I haven't tried with the latest update yet. I'll check it out when I can.
[Asus ZenWatch 2] abine45:
I really want to try this, still doesn't work on the latest update.
[Asus ZenWatch 2] matze19999:
Your rom works perfectly with latest update. But still no BT. :)
[Asus ZenWatch 2] abine45:
Really? I've tried it so many times and it never worked for me
[Asus ZenWatch 2] Lrs121:
BT is a work in progress right now it's at what I affectionately call "The Brick Maker" stage. It may remain so for a little while since life is getting in the way of development.
[Asus ZenWatch 2] hadenodom:
Sorry to hear that. I'm playing around with AsteroidOS on my Zenwatch 2 right now, and I'm quite excited to see BT get up and going. I have some linux experience, although very little embedded experience. If you get stuck, reach out to me - I might be able to help.
[Asus ZenWatch 2] abine45:
I have the latest, latest update that came out just in December here, I have an unlocked bootloader and everything! It doesn't work for me though, I can't get into asteroid os at all!
[Asus ZenWatch 2] matze19999:
Nice to hear :)
[Asus ZenWatch 2] danialbehzadi:
I am successfully running AsteroidOS on Zenwatch 2 New Hypercharge WI501Q built with this patch to meta-sparrow-hybris.

P.S: Kido just merged this in kernel, so new builds should be working by default ;)
[Asus ZenWatch 2] abine45:
How can i get this?
[Asus ZenWatch 2] danialbehzadi:
As it is merged, you may want to wait for next official build. However I uploaded my build files for you:

root fs: https://mega.nz/#!ExM3DKoY!EATizVci7I2ES79L-jb9KGDGbQVFKTvrwP0YkQabutE

boot img: https://mega.nz/#!IgUniKxQ!ZkthNdQCCUU0Cf46QDgfDVMdu43mRydJ1i8YOlsm1GA
[Asus ZenWatch 2] matze19999:
Can I use this, even when I use the "normal" WI501Q variant without the fast charge feature?
[Asus ZenWatch 2] abine45:
Does the bluetooth work?
[Asus ZenWatch 2] danialbehzadi:
Yes.it should work fine. But taking a backup from ext2 file instead of replacing it is always a good idea.

---------- Post added 18-01-2017 at 12:03 AM ---------- Previous post was 17-01-2017 at 11:56 PM ----------

No. The Bluetooth stack for non-dory watches is yet to be implemented. I think it's hardcoded for dory and is not modular yet. Changing this needs some serious changes in AsteroidOS itself and can not be done for devices at this state.
[Asus ZenWatch 2] Lrs121:
Bluetooth is modular and device dependant. However because it is device dependant that means it's is a more involved process to make sure the right firmware is loaded to the right location. As well as being brought up on the right tty device.

At best it would take an uninterrupted afternoon to bring up. At worst a few days. Unfortunately, I don't have the time to spare with classes and work. The other device trees serve as a good example with meta-bass-hybris probably the closest to Sparrow.
[Asus ZenWatch 2] danialbehzadi:
Sounds great! It seems you have done some about it. I would be glad to spend time on it if you share the the technical results.

P.S: I encountered with disablement of touch screen after wake up and I tough may be enabling the ambient mode fix that.
[Asus ZenWatch 2] Lrs121:
A little, it's mostly just digging around the system archive and the commits on the other devices. I don't really know how Bluetooth works, I haven't dug into the code around it. There may be some changes that need to be done to the kernel defconfig that someone else will have to figure out. I don't know the Linux kernel very well.

The base of the changes occur with the patchram systemd config. I can't think of anything else at the moment that would help.
[Asus ZenWatch 2] macia10:
Hi,

Was there any further development around this?
[Asus ZenWatch 2] Lrs121:
I haven't had time, this last semester has more homework and reading then I expected. I did see a wip pull request on the device tree but I havent seen any more work on it.
[Asus ZenWatch 2] Lrs121:
I had some free time the other day to try and modify a pull request to get Bluetooth working. I've uploaded it to my Google drive under the DANGEROUS folder. Standard warning applies, you are responsible for what you do to your device, it may eat your cat/dog, and start a thermonuclear war, etc, etc.

Here's a link for those who might have trouble finding it. There are some patches that appear related to the touchscreen​ so it may break or fix somethings.

https://drive.google.com/folderview?id=0BzuX6WLejxQwM2J5M1loaDFsUUU
[Asus ZenWatch 2] Lrs121:
I forgot to mention, if anyone tries it out please let me know if it does/doesn't work. Or if the touchscreen bug is gone.
[Asus ZenWatch 2] jon7701:
Just tested your build. First boot got stuck on the Asteroid OS logo, force reboot and it booted to the watch face the 2nd time. The touchscreen bug appears to be gone from what I can tell (It didnt stop working while i was trying it). Bluetooth does not work still, and opening apps is very slow, but the UI seems smoother on the watch face, app drawer. Once going into the settings though it lags a lot (Settings app lags, watch face still stays smooth) and takes about 5-10 sec to even open.
[Asus ZenWatch 2] Lrs121:
Dang, there must be some more kernel work to do. The apps have always lagged for me so I'm going to assume that's normal. I plan to replace the patch that I'm using now for the touch screen with one that's less aggressive.

I really wanna get the touchscreen patch in the git repo as soon as possible.
[Asus ZenWatch 2] EpicLPer:
Some guy working on WebWear 2 had the exact same issue from what I recall.
[Asus ZenWatch 2] Lrs121:
Are you talking about the Bluetooth and wifi or the touchscreen.
[Asus ZenWatch 2] EpicLPer:
Touchscreen, would also stop recognizing swipe gestures after locking the watch for a few seconds.
[Asus ZenWatch 2] Lrs121:
Yes, he shared the fix with me and I've gotten it committed into the device tree last night. It may be some time before a new image is made containing the patch.
[Asus ZenWatch 2] EpicLPer:
Nice! Sad that this guy stopped development on WebWear for "another OS".
[Asus ZenWatch 2] Lrs121:
That it is, I'm hoping they share the source so we might pull in some of the kernel changes they made.
[Asus ZenWatch 2] Phantom410:
Just tried your last version from Google Drive, booted just fine, watch face and app drawer works really smoothly, no screen freeze.

But opening and navigating apps was really slow and bluetooth wasn't working.

Also, once the screen turns off the only way to get it back on is to press the side button, would be nice if tapping the screen would work (or gestures, but I guess that's something sensor related)

Hopefuly the guy that was working on 2.0 releases his source and that helps to get bluetooth working so I can use this as daily driver

EDIT: When I tried shuting down via the settings menu, it got stuck on asteroidOS logo, had to hold the power button for a few seconds for it to shutdown
[Asus ZenWatch 2] Lrs121:
Tap/touch to wake is not implemented as far as I know. I've always had to press the button to wake it up. The app lag is known and an old bug.

You know I've never really tried shutting down from the settings, I've always rebooted using adb because I was doing quick tests.
[Asus ZenWatch 2] dlandau:
Tap to wake works on my wren, but only if I tap several times (think more than 7). Even with the shotgun approach to the touch related sleeping code in the kernel, I still get the watch unresponsive to touch from time to time. It's not every day anymore, though. More like once a week, rare enough in any case that I haven't bothered looking into it in detail yet.

If bluetooth doesn't work, it might make sense to verify that sparrow really does have the same firmware file for bluetooth. It's in etc/firmware/bt/ in the system image.
[Asus ZenWatch 2] Lrs121:
I haven't checked the firmware yet, something I forgot.
[Asus ZenWatch 2] Lrs121:
Now I remember why I didn't check, it's because wren uses the Sparrow system dump so the firmwares are the same. I am trying a more direct path to the firmware because I'm not certain that the path I was using was accurate. Even so I don't have high hopes for my next build.