yashsingh1/xdaforums huggingface dataset:
[Samsung Gear 2] biktor_gj:
The thing is I don't really know what it does ;)

I'll try to explain it from the beginning:

Sensorhub is driven by a microcontroller, and there's a custom firmware integrated in the kernel. That firmware has a version number hardcoded in the kernel driver, and when the watch boots, the kernel compares that firmware version with the one that has bundled in. If it's lower, it forces the download of the newer firmware.

Gear 2 Firmware version: 14031200

Gear Live Firmware version: 14061200

The magic word here is "download". I don't know if Download means Flash, or if it really means "download to RAM and execute". Given that the mcu hasn't died when overwriting the firmware, I assume I can simply put a newer firmware version number and would force to reflash when going back to tizen, but may be it doesn't matter and when reflashing everything goes back to normal...

But it would be nice to know if that work is really needed or a simple fresh flash would bring everything back to normal. I set up that big red warning when posting because I don't really want anyone to f*ck up his/her watch without knowing all the facts. I do that in my watch because I don't care even a little about Tizen at this point, but I know there's people here who's going back and forth between the two, and don't want to break it for them, at least, not without warning them first ;)

If you can get back to tizen and try if everything works you'll do me a favor! Simply using the Tizen restore procedure on the first post as usual should be enough to know if it returns to normal or not...:angel:
[Samsung Gear 2] Gabri98:
Hello [MENTION=803006]biktor_gj[/MENTION] .

The TWRP in this project , will it work if i use on Tizen ?

And next, when you fix the audio and screen always on , i want to create one custom rom with pure graphics aosp.

i can use this for the base ?

I put the credits and this link for base.

But i need how to repack it to rootsf.img is possible on windows ?
[Samsung Gear 2] biktor_gj:
TWRP won't work with Tizen kernel... It will just reboot itself over and over again. Tizen doesn't use basic framebuffer functionality, which TWRP requires to draw on screen.

About reusing my images, you don't even have to ask me for it, pick them and do what you want with them ;)

rootfs.img is an Ext4 image. I don't know if you can unpack it in Windows, I always use linux for all this. If you have a virtual machine at hand, it's as simple as "mount -o loop rootfs.img [folder_to_mount_it] and copy everything inside the folder.
[Samsung Gear 2] Gabri98:
Gear 2 Neo

No, i unpacked with ext2explorer.

but need to repack now to rootsf.img

If isn't possible i use Virtual machine by oracle and emule Linux Ubuntu, i tried with Linux Mint but running slow..

Next, thanks for reply this helped me , can you send me link tutorial for how to repack into file img with terminal emulator ?linux
[Samsung Gear 2] kavinzhao:
Now let us see what's missing.

Update#20150628

Working:

Vibrator

Bluetooth

Screen(90%)

Touch

All sensors

Not working

Camera

IR Led

Audio(in/out)

It's a amazing work. Keep up:)
[Samsung Gear 2] emuandco:
Heartbeat sensor does not work I think? ^^
[Samsung Gear 2] molesaied88:
Have you tried unplugging your heart then turning it back on? Lol sorry I had to!
[Samsung Gear 2] emuandco:
Yeah, but now it hangs in a boot loop... Still trying to get it back working... :D

Naah jkjk, rest seems to be working fine already, the list is OK as it seems.
[Samsung Gear 2] alvaromartinezb:
Oh okay! although I think download mode really means flash, because based in my experience with odin and download mode, I have used it to change the os in several tablets and phones, as well as flashing new kernels... I thinks, that if we grab a stock tizen firmware and flash it, it might just work, because in theory it re-flashes EVERYTHING regardless of any version it has installed... (for example, in a Galaxy Tab S I accidentally flashed the Korean version of lollipop, because it was the first one released, but since it had no translation.... I flashed back to US KitKat without an issue) I will leave the firmware downloading and try it when i get home, i have to leave for work now...

---------- Post added at 12:34 PM ---------- Previous post was at 12:22 PM ----------

Hello again everyone!

Heres the video of the new update:

https://www.youtube.com/watch?v=QjpBgU8SaWY

I really hope it helps someone! Good luck!
[Samsung Gear 2] kavinzhao:
Now downloading.. If only I had a faster connection I will be the first one to test everything (en..except our beloved dev.....)

And also, Odin doesn't flash everything. It only flash things included in the package. But since NAND Erase All did not affect the firmware, I guess the firmware is included in the package. But I'm not so sure because I think that it might not be a part of NAND storage.

P.S. NAND is the storage device used in our phone/watch.
[Samsung Gear 2] Gabri98:
Hello, in your video firts the clock changed working and next when you re flash the build have bug and working only Simple mode.

I'm confused

What fixed for refreshing screen ?
[Samsung Gear 2] biktor_gj:
Sensorhub and touchscreen firmware aren't in any odin package, they are packed inside the kernel (/firmware/ssp_B2.fw), that's why I don't know if a reflash, even with a full flash, will fix it... The test is simple, if after flashing the latest wear build you get back to tizen and the step counter works, everything is fine. If it doesn't count, then the firmware doesn't get downgraded.

If the last scenario is the case, maybe I can craft a kernel that forces a new download to the mcu and restores original firmware, but first we need to know if the problem exists:)
[Samsung Gear 2] kavinzhao:
So we need someone back these things up for us;)

Actually there is a more professional testing mode in tizen. It's called Factory Test. Dial *#0*# and you will launch it.

Also, from there I confirmed that there is no compass in our watch. So [MENTION=803006]biktor_gj[/MENTION] you can remove compass app in later images.
[Samsung Gear 2] Lfuz75:
I know that this is a developer thread but I think that a big thank you doesn't hurt anyone, so big thanks to [MENTION=803006]biktor_gj[/MENTION] and for anyone that makes that our gear's come back to life again :) thanks too to [MENTION=6322628]alvaromartinezb[/MENTION] for your video tutorial because a lot of us aren't experts and now we can get this superb work running, really thanks to all!

Enviado desde mi SM-G900M mediante Tapatalk
[Samsung Gear 2] achunt2143:
Thanks lol:p
[Samsung Gear 2] bitstra:
HowTo declare our Gear2/Gear2 neo as a LG g Watch

Because Android Wear can't know officially a Gear2,

I've declared my Gear2 neo as a LG g Watch in build.prop as follows:

# begin build properties
# autogenerated by buildinfo.sh
ro.build.id=KNX01Q
ro.build.display.id=KNX01Q
ro.build.version.incremental=1520385
ro.build.version.sdk=20
ro.build.version.codename=REL
ro.build.version.release=4.4W.2
ro.build.date=Thu Oct 16 12:11:24 UTC 2014
ro.build.date.utc=1413461484
ro.build.type=user
ro.build.user=android-build
ro.build.host=kpfj14.cbf.corp.google.com
ro.build.tags=release-keys
ro.product.model=[COLOR="Red"]G Watch[/COLOR]
ro.product.brand=[COLOR="red"]lge[/COLOR]
ro.product.name=[COLOR="red"]platina[/COLOR]
ro.product.device=b2
ro.product.board=b2
ro.product.cpu.abi=armeabi-v7a
ro.product.cpu.abi2=armeabi
ro.product.manufacturer=[COLOR="red"]LGE[/COLOR]
ro.wifi.channels=
ro.board.platform=exynos3
# ro.build.product is obsolete; use ro.product.device
ro.build.product=b2
# Do not try to parse ro.build.description or .fingerprint
ro.build.description=b2-user 4.4W.2 KNX01Q 1520385 release-keys
ro.build.fingerprint=samsung/b2/b2:4.4W.2/KNX01Q/1520385:user/release-keys
ro.build.characteristics=nosdcard,watch
# end build properties

#
# ADDITIONAL_BUILD_PROPERTIES
#
. . .

. . . and now Android Wear App on mobile device recognices my gear2 as 'G watch'

Android wear gives an advice to download essential apps for LG g Watch... (as it does for my real LG g Watch too)

But Watchface Chooser doesn't appear in Android Wear App :(

Any Ideas [MENTION=803006]biktor_gj[/MENTION] ?

I suspect, that there is really something wrong with clockwork service in you ROM...

as I mentioned some pages back already...

And so maybe all Watchface issues are related to clockwork service too...
[Samsung Gear 2] biktor_gj:
I did more or less the same ;)

For that to work better you should also rename product and rest of stuff from 'b2' to 'dory' and rename init.b2.rc and init.b2.usb.rc to init.dory.*

Anyway, I think what I need to do, before anything else, is try and succeed migrating the watch to wear 5.1.1

It seems 4.4 is no longer supported as a platform for wear, quoted:

http://www.wareable.com/android-wear/android-wear-hidden-secrets-tips-and-tricks

In case you didn't notice, watchfaces get installed on the watch from Google Play,but all of them (all that I've tried at least) fail because API version is too old.

So I think it's time to retry the Android 5.1.1 build and try to overcome the problems related to the closed source libraries... I'm preparing the new init scripts for lolipop, and will try to make it work when I get some time. Until then, at least now it can be used as a daily driver, despite the audio and opengl limitations ;)
[Samsung Gear 2] jeffc83:
You're correct Biktor...the api has changed so the new watches/watch apps won't work with what we're running. I got the first version of Facer and Watchstyler to work but I did not share Facer here because it is a paid app. We DO need 5.1.1 in order to get decent watch faces:/ OH and they both crash if the Aeris card goes away...
[Samsung Gear 2] Alxoom33:
Heartbeat sensor works perfectly for me. Try wiping to factory settings and set up again. It should work.

Yes excellent. I only saw a 6/27 update. Is there one dated 6/28 or is that a typo?
[Samsung Gear 2] bitstra:
thanx [MENTION=803006]biktor_gj[/MENTION]

If you will do that successfull - I have made/finished today a nice (highly customizeable) 5.0+/5.1.1 watchface with usefull function for control brightness directly from within the watchface. It comes with nice companion app for mobile wear...

BTW: implemented a weather display above the digital-time-/stopwatch-display today too, but have no screenshots for this atm ...

I will open a thread for it in apps/themes section after tomorrow...

If you want to test it on your LG g Watch- PM me...
[Samsung Gear 2] alvaromartinezb:
Hi! Sorry this turned out to be confusing, in the previews builds (pre 27-06) if you had the aeris weather card opened, all watchfaces worked for a few minutes... Which is the case at the beginning of the video, I had just received the card. In the new build, the same is possible with the step counter card... If it's displayed at the top of the list, watch faces work... But I didn't get the steps notification when I was filming... So I couldn't show it

Sent from my Nexus 5 - Android M developer preview 1
[Samsung Gear 2] alvaromartinezb:
Hey! Good news!

I flashed back to tizen using tizenmod full restore, and everything works just fine... from the hear rate monitor to the step counter... that simplified things a lot (not that I actually want to go back to tizen, but just for other people to know)

I really look forward for a possible lollipop update, it might even simplify things! who knows... hahaha

Well, good night everyone!
[Samsung Gear 2] biktor_gj:
For once, I had to crosspost ;)

Lolipop here we go!

No bluetooth, no nothing, but video is working!
[Samsung Gear 2] emuandco:
Oh, this was quick :D Niiiice
[Samsung Gear 2] bitstra:
[MENTION=803006]biktor_gj[/MENTION], You are our hero, if you didn't know it already :) :good:
[Samsung Gear 2] Samkitpalecha:
That is just awesomeness to its level max. Thanks a lot for that. I was gonna flash Android but will wait until this gets bluetooth working.
[Samsung Gear 2] Gabri98:
Hey Biktor what is this ? It's same android wear or new update ?
[Samsung Gear 2] biktor_gj:
And now the glamour shots

* Bluetooth working

* Sensorhub working

Display always on still broken, default watches now working without needing to keep any kind of notification open

Still a lot of work to do, for now I'll leave it 'till I'm back home, I have a lot of work to do ;)

Glamour shots:

Looking reeally good this time!

Edit: CUSTOM WATCHFACES WORK PERFECTLY!
[Samsung Gear 2] Gabri98:
Awesome!

thank you very much you are very pro.

What fixed in this version ?

The clock, bluetooth , sensor ?

For audio and for display always on fixed or work in progress ?
[Samsung Gear 2] dataonlycod:
Is time to give a download link. Hahahaha
[Samsung Gear 2] biktor_gj:
Just because you asked for it.

REMEMBER: QUICK AND DIRTY. I WILL NEED MORE TIME TO FINISH IT UP AND FIX SOME THINGS.

Lolipop Alpha 0:

Android Wear 5.1.1 / LDZ22J

Based on Sprat firmware

NOT WORKING:

Audio (not implemented, can someone try A2DP? that should work)

Screen Always ON (crashes like always)

Power Off (gets stucked)

SELinux

IPv6 NAT

All the rest (Custom watchfaces, mixed compositions, bluetooth, step counter, tilt to wake, touch screen) IS working.

Find some bugs for me people ;)

FLASH ON TOP OF PREVIOUS FIRMWARE, THEN WIPE DATA AND REBOOT

http://www.mediafire.com/download/h9rp9n76wa0z66b/lolipop_alpha0.zip

FIRST BOOT TAKES AGES, JUST LIKE EVERY OTHER ANDROID WEAR DEVICE, IT'S WORTH IT. WAIT FOR IT ;)
[Samsung Gear 2] WerWolv:
Everything seams to work fine for me, except I can't boot into recovery anymore. It just reboots my watch and starts Android again... Is there any other way of doing a factory reset?
[Samsung Gear 2] mag2007:
I did some other way to factory reset. I was on tizen before. Then i flashed the one old firmware with android 4.4.4w, after it i flashed recovery, then i did factory reset and then i flashed the android L. No problems so far. Btw i am running it on Gear 2. I could easy pair it with my Note 4. Pedometer, Heartsensort, Tilt etc. is working fine. The only thing i am not sure, the Heart monitor is really fast :o takes maybe 5 seconds to get my heart rate. 73bpm. Wonder is it true or not :confused:

Well done biktor!
[Samsung Gear 2] Gabri98:
What is A2DP ?

I can try if i say what is a2dp need to compile or it's apk ? I think missing lib file , and file in etc and if exist on android wear missing audio file in folder vendor same

Lib

Etc

Vendor.
[Samsung Gear 2] Razor29:
Thank you so much, i have been waiting so patiently and with utter bated breath for the lollipop attempt, yet the speed and uncanny success of this so called "Quick and Dirty" attempt is remarkable !

I will now finally try the iOS Wear connection apps, Such as Android_Wear_For_iOS and Aerlink.....

Will report the result (-;

Thank you Biktor your work is far more then appreciated its cherished.
[Samsung Gear 2] biktor_gj:
A2DP --> Bluetooth headphones

For all of you having problems with recovery, you can try this after flashing lolipop:

http://www.mediafire.com/download/5315q7eu1mex1r6/recovery_only_no_kernel.tar

It's just the recovery image without anything else, it should work both from bootloader menu and from Settings-> Restore device (I forgot, it doesn't power off or reboot :))

Will prepare a full package when I have some time to fix the init issues (shutdown & reboot, which is the most problematic right now), hopefully tonight I might have something else for you to play with ;)

Have fun!
[Samsung Gear 2] jeffc83:
YOU ARE THE MAN!!!! Testing all day;)

Theater mode works!!! (still syncing but that's the first thing I noticed;) Obviously wrist gestures setting works too, which you can flip cards by flicking your wrist:D "Tilt to wake screen" toggle setting works as well! (setting in wear app) I know its been mentioned but ALL stock AND custom watch faces are working so far!!!! THIS IS AWESOME, thanks again!
[Samsung Gear 2] Darth Ziggurat:
A2DP is a bluetooth protocol made for hands-frees

https://en.wikipedia.org/wiki/List_...dvanced_Audio_Distribution_Profile_.28A2DP.29
[Samsung Gear 2] rajpa:
I flashed the lollipop alpha 0 tar via Odin to the Gear. It was running Tizen earlier and not an earlier version of Wear. It rebooted a few times. Now it is stuck in the login screen for the last 10 minutes or so. What should I do?
[Samsung Gear 2] Darth Ziggurat:
Boot into recovery and select wipe
[Samsung Gear 2] kavinzhao:
Well, I don't know what's wrong with me, but I asked Google for support for our Gear 2. Never mind...

Biktor you said all the rest are working.. Do that mean Camera and IR is also working?
[Samsung Gear 2] emuandco:
I am 99.999% sure he meant all that worked before....
[Samsung Gear 2] biktor_gj:
No, IR & Camera don't work either. I meant everything that was working before is working now, and better ;)

The only new bug that I've found so far is the Poweroff bug.

IPv6 NAT works too, the errors I was seeing were from the very first stages of the boot process

SELinux I will try to keep it disabled, since it gives us nothing useful

By the way, image is pre-rooted, you don't need to do anything for it to work!

So,

THINGS LEFT TO FIX:

Audio

IR

Camera

Screen Always ON

Power off / Reboot (I think I know what the problem is, will check when I'm home)
[Samsung Gear 2] mag2007:
Don't know if it is real a big problem/bug, but for me Kompass do not work. Well it is always showing 0°N.
[Samsung Gear 2] dataonlycod:
For me recovery is not working :s
[Samsung Gear 2] Redmen:
Did a "fresh" installation. From Tizen to Full_06_27. After that updated with Lolipop_alpha.

Press restart will give notification: Shutting down but nothing happens.

Press Power off and the watch vibrate's 3 times and then same as restart, nothing happens.

For the rest, everything seem to work real good. No compass but there's no compass in our watch hehe.

Can't wait to get audio, cam and IR working.

Plz tell us how we we can donate you some beers buddy!
[Samsung Gear 2] jeffc83:
Biktor, don't forget to add fix brightness setting to the short list;)
[Samsung Gear 2] biktor_gj:
This you say?

I'm working on it, but yes, that's missing from the list ;)

Power issues will be fixed on next build (was a problem with init binary)
[Samsung Gear 2] mikaeldalc:
I shall wait for the next build before flashing to lollipop then.... I dont know how you do it sir, but you seem to surprise me each and everyday lol. I wasn't expecting lollipop for quite a while and then..... BOOM, I wake up and there's an alpha for lollipop baked and ready. GOOD JOB Man.
[Samsung Gear 2] albs:
hi i have a version previous to 27_06 can i flash lollipop alpha directly? in which way?
[Samsung Gear 2] Darth Ziggurat:
Yes, the same way as flashing the 27_06 tar file. You need to go into recovery and wipe to factory reset, if you have troubles going into recovery you can flash a tar file biktor posted after lolipop alpha0 called recovery_only_no_kernel.tar
[Samsung Gear 2] Redmen:
Had to reflash image to get my other phone paired. Watch won't boot to Factory settings. I guess thats the same problem like the watch won't reboot or power off.

Btw, have u seen this post?

http://www.sammobile.com/2015/04/24/developer-gets-android-wear-running-on-the-samsung-gear-2/

EDIT: Reflashing image won't help connect to a different phone.
[Samsung Gear 2] biktor_gj:
Android wear only pairs to one device at a time, if you want to pair it to another one you must do a factory reset.

When I get home I will upload a full package with kernel, init, recovery and rootfs with the powerdown fix and compass app removed so you can run what I'm running now. It's been a day and the watch is still running great (no reboots, no hangs, nothing strange)

A little more battery drain but that was expected :)
[Samsung Gear 2] bitstra:
[MENTION=803006]biktor_gj[/MENTION]

On my Gear2/neo TOUCH_TO_WAKE dosn't work with Lollipop ROM worked with the 'OLD' ( :) ) KitKat ROM...

But Wrist gesture to wake makes it... :good:
[Samsung Gear 2] biktor_gj:
Yep I noticed it too.. Strange thing it's enabled in the ts config as always, but it seems lolipop pushes the watch to a different sleep mode or something like that... Hopefully I can use it to track down the screen on bug ;)
[Samsung Gear 2] bitstra:
Thank you for for all your work (and explanations here in the forum)!

It's a small step for Android - but a big jump for Gear2 :) :good:
[Samsung Gear 2] alvaromartinezb:
HEEEY THANKS! its really impressive the ammount of things that work now thanks to the lollipop update!

I have confirmed that pretty much everything works, running apps is a lot better! and i love how wear has evolved! (lollipop feels a lot more refined than kitkat!)

Here are some images i managed to take: (adb works just fine btw)
[Samsung Gear 2] biktor_gj:
Now you can take screenshots from Android Wear app, you know? Press menu on android wear -> take screenshot

You can also check battery and storage stats!
[Samsung Gear 2] BBowermaster:
Is yhaddad assisting with the project? I'm trying to follow the progress but I don't know if there is a sub conversation going on or not. If not, yhaddad, can you start a separate thread?
[Samsung Gear 2] biktor_gj:
You might need to add some exceptions to some type of errors / warnings on the Makefile to compile it. Here, have mine

For compiling, this is what I run:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
[Samsung Gear 2] yhaddad:
What about all the configuration of .config file?
[Samsung Gear 2] yhaddad:
Error:

make[2]: *** No rule to make target `net/netfilter/xt_hl.o', needed by `net/netfilter/built-in.o'. Stop.

make[1]: *** [net/netfilter] Error 2

make: *** [net] Error 2
[Samsung Gear 2] biktor_gj:
I think your source tree is broken...

Get this and extract it _in_ linux (dont extract it in Windows and then copy)

http://www.mediafire.com/download/gnu4818bfa87x37/tizenk.tar.gz
[Samsung Gear 2] yhaddad:
Thanks!

So this is the steps:

1. make ARCH=arm tizen_b2_defconfig CROSS_COMPILE=arm-linux-gnueabi-

2. make CROSS_COMPILE=arm-linux-gnueabi0

3. Once its compiled, go to arch/arm/boot/image - it create image file not zIamge, its ok ?

4. tar -H ustar -c zImage > yourkernel.tar

That's will give me the complete kernel for gear 2 neo ?

Thanks again!
[Samsung Gear 2] biktor_gj:
No, when you run 'make' it will build the zImage for you:

1. make ARCH=arm tizen_b2_defconfig CROSS_COMPILE=arm-linux-gnueabi-

2. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-

3. tar -H ustar -c arch/arm/boot/zImage > yourkernel.tar

Also, replace the Makefile in the source I posted earlier with the one on this post, it's modified so it doesn't trear unused functions & variables as errors:

KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-format-security \
-fno-delete-null-pointer-checks \
-fdiagnostics-show-option -Werror \
-Wno-error=unused-variable \
-Wno-error=unused-function