yashsingh1/xdaforums huggingface dataset:
[Samsung Gear 2] westwallpoma:
Did you see the reference to that message in the code review below?

http://lists.freedesktop.org/archives/dri-devel/2014-December/073150.html

Looks to me like debug when attempting to adjust brightness when the screen is off.
[Samsung Gear 2] jonavansanders:
Dont forget to pick your bounty when you get this port working i think its like 1000 dollars or better for the gear 2 and everyone better pay the guy lol i see too much work here i appreciate your dedication im looking into finding you some devs that might could help some and make your job a little easier salute:thumbup:
[Samsung Gear 2] AntwonJenkins:
Samsung should have to pay the bounty since it's their watch that's so messed up.
[Samsung Gear 2] jonavansanders:
haha i know lol thats funny im tired of tizen it was the biggest mistake samsung ever made i was so pissed when i found out it wasnt android
[Samsung Gear 2] soylomass:
I'll donate $40 if you get it working. I'm from Argentina, I hope you make it :)
[Samsung Gear 2] cipherswitch:
Very nice work so far... keeping a close eye on this thread.
[Samsung Gear 2] gypsy214:
Seriously dude? What a small world... I live in WPB as well :)
[Samsung Gear 2] AntwonJenkins:
With the update and everyone's watches (assumingly) working, I hope this project doesn't die... I still would like a Tizenless watch.
[Samsung Gear 2] biktor_gj:
You can't win if you don't loose over and over again until you make it behave..

Ladies and gentleman, I present you my latest attempt. S3C Framebuffer is....

WOOORKING!!

Now the vibrator is dead and makes it reboot, and it also reboots when trying to blank the display, but that's another story... pic or it didn't happen ;)

By the way, it looks that big because that's the precompiled twrp binary for the s5mini. I tried to compile TWRP but I only get errors and errors and more errors, any help with that?

I will try to clean the kernel tree and strart uploading it to github. Will update the first post with details when done.

See you on the next progress report!
[Samsung Gear 2] McGuigew:
Sweet!! Congratulations for that and for the nice wallpaper. :highfive:

Could you evaluate how much you have done on the road to Android on Gear 2 ?
[Samsung Gear 2] biktor_gj:
TEST 2 for the camera.

First time I hadn't touch the kernel. Flash this on top of the image from the morning

** This is just for testing! All of you who are not testing the camera don't touch these files! a lot of things are broken here!

http://www.mediafire.com/download/k8nudqaz7r39q98/kernel_34_camera_devclk_enabled.tar

I didn't even see the camera coming up in DMESG, and I noticed that the Kmini kernel has some clock definitions enabled which are coded, but disabled on our watch... so, let's see what it does!

If it stops booting, just flash over the latest full image on top and everything will come back normally.

By the way, I have started with audio. It opened the device correctly, but when sending the firs IOCTL to set the device to ON, it fails, then fails audio routing, then fails all the rest. So... working on it. It'll take time ;)
[Samsung Gear 2] alvaromartinezb:
You can do it even easier by typing "adb install (path to apk here)"

Sent from my Nexus 5 - Android M developer preview 1
[Samsung Gear 2] tooandrew:
You should consider adding/symlinking your adb folder to your path. Makes everything easy.

[MENTION=803006]biktor_gj[/MENTION] I'll flash that new image in a moment

idk if its just me but windows command prompt will just pull the logcat indefinately via adb. im having to cut them short. The camera app fc's on opening.

any errors you see regarding com.android.settings is my bad,i sideloaded a stock android settings app to try to enable bluetooth internet sharing, but that didnt work out too well for me. i've just uninstalled it so there should be... less of that. ignore these logs, ones without a fc'ing android settings app can be found a couple posts down
[Samsung Gear 2] alvaromartinezb:
Hey guys a small bug report, today I was walking outdoors and wanted to use the brightness boost because there was a lot of sun, but one activated, the screen dimmed again after about 5 seconds...

Sent from my Nexus 5 - Android M developer preview 1
[Samsung Gear 2] bitstra:
[MENTION=803006]biktor_gj[/MENTION],

because you are near to useable camera modules - and I also have only the "gear 2 neo" - I've ordered right now this for 49,23 €:

https://www.allbuy.com/detail/133787 - it seems to be a real gear2 (but named No.1 G2) with camera and all other gear2 specs... and should be perfect for development...

BTW: free shiping to germany via flat mail (7 day delivery time)

I have written a running Camera App, that I've used for USB-cams on No Name tablets in the past. - I will rewrite it - fitting the Smartwatches dimensions right now! I will post a new version next week here...
[Samsung Gear 2] tooandrew:
logs without any of my own sideloaded apps failing to complicate things - fresh reboot, tried to open camera twice, then pulled dmesg and logcat

[MENTION=2981094]bitstra[/MENTION] let me know how that goes. for some reason i suspect what shows up at your house will not be a gear two, but a chinese knockoff built around a mediatek SoC. That's not too say it won't be awesome, if it works well I'd buy it for 60. Also, I've got a usb webcam here and a powered otg cable if you've got an app that might allow testing with such a camera.
[Samsung Gear 2] biktor_gj:
It tells you the same as on mine... odd.

The only difference I see is in the kernel log where in your watch it probes the camera on boot, but I'm not sure if it's even being opened by the camera app... we'll see!

Last try for today: http://www.mediafire.com/download/yevn93z1wl8d9xt/kernel_cam_test3.tar
[Samsung Gear 2] McGuigew:
But why camera now? I'm curious as sound seems to be the most important thing pn Android Wear.
[Samsung Gear 2] tooandrew:
no one with a usb soundcard and powered usb otg cable is available to pull logs for audio until I get a ride to best buy. Seems like otg audio is our most promising lead. *shrug* [MENTION=803006]biktor_gj[/MENTION] might know more

The audio is also being worked on.
[Samsung Gear 2] biktor_gj:
I take camera as a side project, I use it to change focus a bit when my head hurts of looking at code ;)

And, if we get it to work, you'll have the first camera enabled android wear watch. How cool would that be!!
[Samsung Gear 2] bitstra:
You are right: Mediatek MTK 2502 - minimalistic ROM & RAM (128 MB / 32 MB) - seems I've ordered a new toy for my wife... But I will see, what's possible with porting a slim ROM ;)

I 've made a 128 MB ROM in the past for a chinese tablet.. LOL

Edit: I will port my 'old' camera app though for this Wear-On-Gear2-Community next week.. :)
[Samsung Gear 2] McGuigew:
Fair enough! It does sound awesome even I only have a gear 2 neo :)
[Samsung Gear 2] biktor_gj:
Me too :)

By the way, I have also started looking at the IR. If I knew more about android programming than making a menu it will be quite easy to make it work.

Tizen's app is a mix of one library file and a bunch of javascript files that handle the ir command db and seems to send the commands for processing. Anyone with some experience in android apps and html&js willing to take a look?
[Samsung Gear 2] tooandrew:
The only code ive ever written was meant to be executed on a microcontroller, so I cant be too useful here. Sorry :confused: hope someone jumps in soon
[Samsung Gear 2] biktor_gj:
The html&js I got it covered, making an android app interface with a closed library... Not so much ;)

Maybe [MENTION=2981094]bitstra[/MENTION] can take a look?
[Samsung Gear 2] bitstra:
I could have a look into! - and what's possible...
[Samsung Gear 2] McGuigew:
Nice! If you work everything like that, you're gonna get it all working so soon!!!
[Samsung Gear 2] tooandrew:
Keep in mind there are other ir apps, if you have access to the actual ir blaster, normal ones should work.

sideloaded free ir universal remote, nogo

EDIT: just realized i misunderstood what the problem was
[Samsung Gear 2] Gabri98:
: D

EDIT:

INSTALLED adb driver from GOOGLE official using device manager on windows , installed normal and i used this guide for install apk : https://www.androidpit.it/come-installare-app-smartwatch-android-wear

works 100%
[Samsung Gear 2] DAGr8:
Hmm long shot since I haven't been imessing with android for a long time but doesn't the camera needs a gallery in order to work?
[Samsung Gear 2] DAGr8:
One last thing guys we do need everyone s help here if you think a question doesn't belong either respond like so many did already or just ignore it.
[Samsung Gear 2] tooandrew:
I've uninstalled gallery before and it caused camera to force close. Worth looking into
[Samsung Gear 2] Razor29:
Question, regarding SElinux and root permission i understand its underway, has anyone got it working

Second question: Now that image is lollipop based Aerlink and Wear for iOS work perfectly... one thing is still missing in the iOS Wear connectivity and that is bluetooth internet tethering.

With Tizen it was possible to an extent, meaning the iPhone recognized the tethering and so did the Gear 2 but no Namespace resolving had worked or did any applications manage to utilize the connection.

can anyone think of a way to get internet tethering working from iOS via BT
[Samsung Gear 2] kavinzhao:
Looks like it's a huge time zone difference from here to your location...

And [MENTION=4995278]Razor29[/MENTION]

First this should be in the Q&A thread.

Second SE and root is NOT underway. SE is not a part of current development and root is already working.

Tethering is also working, but ClockWorkProxy only allows Google Apps to connect.
[Samsung Gear 2] rpinegar:
Anyone have any idea how to do this on Linux?
[Samsung Gear 2] flatherskevin:
[MENTION=803006]biktor_gj[/MENTION] -- Now, I am no dev in the least, so I have very little writing code background, but I can cypher through the comments within the code and offer suggestions. With the audio, is in possible to force the device to believe that both a mic and headphones are plugged into a jack? All it would take is routing the physical hardware to the jack recognition. May not be the most power efficient, but I don't see why it wouldn't work. Here is the the link to the jack file I was looking at on your GitHub https://github.com/Biktorgj/Android_b2_Kernel/blob/master/sound/core/jack.c
[Samsung Gear 2] Gabri98:
Any news for audio file biktor ? i don't tag you because i think have million notifications :D .

If is possible reply. Thanks in advance sir.
[Samsung Gear 2] biktor_gj:
Exactly 69 notification right now ;)

Here I am, with 20 tabs open in Firefox, 3 instances of IDA disassembler, and decompiled libraries.

The path to the opensource library failed miserably (I had no idea what I was doing and this time I wasn't lucky) so I changed to plan B:

* Pick the libraries from SM-N900, which uses the same audio codec, put it in its place, and make it boot.

Files are in place, and it's screaming of failing RIL library (because there's no Radio Interface for it).

So, what would a not-very-sane-at-this-point person do? Disassemble libaudio-ril.so, extract all function names and replace them with dummy functions that don't actually do anything but don't fail either so the real audio library can start.

At what point I'm at?

Libraries in place? Check

libaudio-ril source code dummyfied? Check

gcc compiled library? check

android accepting the library? fail:

I/AudioPolicyService( 1330): AudioPolicyService CSTOR in new mode

I/AudioPolicyManager( 1330): loadAudioPolicyConfig() loaded /system/etc/audio_policy.conf

W/linker ( 1330): libaudio-ril.so: unused DT entry: type 0x6ffffef5 arg 0x118

W/linker ( 1330): libaudio-ril.so: unused DT entry: type 0x6ffffffe arg 0xe60

W/linker ( 1330): libaudio-ril.so: unused DT entry: type 0x6fffffff arg 0x1

E/HAL ( 1330): load: module=/system/lib/hw/audio.primary.exynos3.so

E/HAL ( 1330): dlopen failed: empty/missing DT_HASH in "libaudio-ril.so" (built with --hash-style=gnu?)

E/AudioFlinger( 1330): int android::load_audio_interface(const char*, audio_hw_device_t**) couldn't load audio hw module audio.primary (Invalid argument)

I/AudioFlinger( 1330): loadHwModule() error -22 loading module primary

W/AudioPolicyManager( 1330): could not open HW module primary

So I'm trying to recompile the library with some options that my GCC compiler doesn't recognize...

This is the command I'm trying to run:

gcc -shared -W1, --soname=libaudio-ril.so,--hash-style=gnu -o libaudio-ril.so libaudio-ril.o

It says unrecognized options... anyone has any clue on how the h*** do you build a dynamic shared library cross compiled for arm??

I'm going a bit mad... ;)
[Samsung Gear 2] WerWolv:
[MENTION=803006]biktor_gj[/MENTION]

http://cboard.cprogramming.com/cplusplus-programming/98034-unrecognized-option-'-hash-style%3Dboth'.html

Take a look at this. The fifth reply seams rather interesting :3
[Samsung Gear 2] westwallpoma:
The default Tizen camera app simply calls the Tizen camera API ; i.e. all the heavy lifting is built into Tizen. To make matters worse, on the Gear, Samsung rolled their own video and camera libs to use closed-source code which allows the 720p video recording - whilst the Tizen API is limited to VGA (i.e. potato) quality. So, it's 1) closed-source and 2) a fudge of apples and bananas. All I wanted to do was increase the recording time limit from 15 seconds to 60, as per the Android-based Null ROM. Turns out the limit is defined as a constant in the Samsung closed-lib headers, over-riding the adjustable limit that can be altered with a Tizen API call.

I dug out some info from somebody who managed to hack the camera libs on a Samsung camera (also running Tizen) who managed to compile their own version, but not possible on this sodding watch.

That's me grumpy again ...
[Samsung Gear 2] Spartaner25:
According to this Thread, you need to use

--hash-style=sysv
or
--hash-style=both

to build for android.
[Samsung Gear 2] annson08:
If this would be of any help...I've compressed the tizenmod full restore to 157MB and reuploaded it here. http://d-h.st/Bbfx
[Samsung Gear 2] emuandco:
Nice, so still some permussion stuff as I would interpret it., but it starts :D Great work so far indeed. But no need to hurry. Take your time. ^^
[Samsung Gear 2] biktor_gj:
A picture is worth a thousand words.

Hello Gear, it's been a long time since we had a good talk.

See you tomorrow guys, I've earnt my beer :)
[Samsung Gear 2] WerWolv:
Wohoo! Nice one :D I prayed that you get the Audio working till tomorrow!

I go on holidays tomorrow, so I hope you'll upload it soon enough so I can flash it.

Thank you very very much :3
[Samsung Gear 2] biktor_gj:
I leave it uploading, pick it from here when it appears!

https://www.mediafire.com/folder/4fnc5mrnmwx1l/audio

(flash on top of previous build)
[Samsung Gear 2] inpherno3:
Sorry in advance if i take down Mediafire by refreshing so much. Thanks Biktor, i cant believe you did it. Camera and IR is only thing left. Kudos sir Kudos
[Samsung Gear 2] biktor_gj:
It's up already!

Now, keep the previpus builds at hand just in case, I got it to work two hours ago and I don't know how it'll behave ;)
[Samsung Gear 2] daevoq:
Man..amazing work and amazing skills..great! Just a question..it's somenthing like a fix or it's a full build? And what means flash over previous build? Using odin like [MENTION=6322628]alvaromartinezb[/MENTION] tutorial or else? Thanks again for your work!

EDIT: OK i think is a full build..520MB..so i think also that will be flash by odin..am i right?

Inviato dal mio XT1032 utilizzando Tapatalk
[Samsung Gear 2] biktor_gj:
It doesn't include kernel or recovery, flash (if you don't have it already) the latest build from the first post with odin, and then flash this one and you'll be good to go!
[Samsung Gear 2] WerWolv:
[MENTION=554771]biktor[/MENTION]_qj

I just flashed it and it seams like everything is working fluently! I would love to buy you a beer but I don't have any kind of Credit Card...

Take this cat as a little Thank you!

=(^-^)= *Meow*
[Samsung Gear 2] tooandrew:
I had just ordered a usb soundcard and newer otg adapter to test audio and provide logs. Cancelled the order, when the funds are released I'll send you what I was going to spend on that stuff. Bravo my man, bravo. Even getting it to boot is a great achievement, but this is nothing short of spectacular. Samsung should sponsor you.

Edit: did the gj in [MENTION=803006]biktor_gj[/MENTION] stand for good job? Cuz you did a hell of a good job.
[Samsung Gear 2] jeffc83:
Holy crap, I wasn't expecting this! (I was just going to post bad news about my audio adapter...was eaten by a pet, lol) Biktor, you're awesome!!! Now just say OK Google five times to get rid of that watermark over the clock;)
[Samsung Gear 2] biktor_gj:
Well, I think that, beside all the bugs that need to be taken care of, and despite still lacking camera and IR support, we can officially say...

Android Wear level functionality is complete!

Next in the fix list:

Screen always on (still on it)

Speaker functionality enable (driver side I know how to do it, android side not so much -haven't even tried-)

Find a way to fix the battery drain from the touchscreen (keeping it on while on suspend is what's causing it)

Next in feature list:

1. Camera (it is half way, probably it will need quite a lot of work)

2. iR (there are more devices using ICE4_FPGA module, like the galaxy S4)

Long live the gear 2!:)
[Samsung Gear 2] AntwonJenkins:
Please ignore, was already answered as i was typing... So... The mic is working flawlessly but I do have a question. This is just the mic and not working audio right?

Anyway I'm completely amazing by the leaps and bounds in progress you've made lately. You have truly gave everyone on this sub a great Christmas in July.

Edit: just fyi, I didn't have to say Google five times for the watermark to disappear. Was gone at first boot.
[Samsung Gear 2] jeffc83:
ONLY thanks to YOU!!! Samsung owes you;)
[Samsung Gear 2] biktor_gj:
I haven't tried to play anything! It might even work directly!

If it doesn't work, it will be because it will need adjustments to the mixer settings (/system/etc/ysound.xml). On a driver level it's working, both for input and output, so mic and speaker WILL BOTH work. It might happen that the volume is set to 0, or that the output is being set to an unconnected device (for example the headset), but that is fixed with just an xml setting easily ;)

Anyone knows a music player app that works on wear? Play music only lets me listen if I get a subscription...
[Samsung Gear 2] AntwonJenkins:
I have a play music subscriptions but I can't figure out how to push anything to the watch.
[Samsung Gear 2] biktor_gj:
In theory you enable Download to Android Wear from settings, and then on the playlist it should show "a download icon" to save it to play it offline. When it dowloads to your phone it pushes it to your watch too... or that's how it's supposed to work at least :)
[Samsung Gear 2] emuandco:
Well, as soon as Osmos HD (sideloaded) attempts to play music, to hangs, so... I would say, nope, no audio yet, buuuut Mike works great :D
[Samsung Gear 2] AntwonJenkins:
(Again ignore, already been answered.)

I've been messing with it, unfortunately with no luck at getting any song on the watch. Best believe as soon as I do though I'll post results here.

Again, thanks for all your hard work and quick replies.
[Samsung Gear 2] jeffc83:
Um, audio WORKS!!!! Holy crap Biktor, you're a genius...this time you knew it;) I'm currently watching YouTube and audio is loud and clear along with smooth video! Get it in Google play and have fun...it's called "video for Android wear and youtube". Going for mp3 player sideload test next...I just know it'll work:D We truly have the best wear watch now:good:
[Samsung Gear 2] burgudoy:
Whoa! biktor is faster than any of us. I wasn't even able to provide the logs of the USB soundcard experiment haha.

Anyway, I haven't installed this new baby yet but maybe we can try the new youtube app for wear to check sound output?

I've tried it and it works most of the time (crashes sometimes):

https://play.google.com/store/apps/details?id=com.appfour.weartube

Edit: I mean I've tried youtube wear on previous rom, not on this new rom yet my internet connection here at home is slow
[Samsung Gear 2] jeffc83:
Audio is working meaning sound/speakers work fine:D You should install today's "audio" ROM and try the app again...I watched 4 videos so far and it only crashed once on me.
[Samsung Gear 2] tooandrew:
[MENTION=803006]biktor_gj[/MENTION] All hail the gear god. have a few more beers on me.

3H0003997V385101T

As an aside, assuming you get the camera functional, how are you planning on handling the transfer of photos and video off the device? Will you enable mtp, or create a companion app like how it handled pictures on tizen? Or both? Just out of curiosity.

---------- Post added at 04:00 AM ---------- Previous post was at 03:37 AM ----------

also im unable to factory reset on the recovery, e:/ unable to mount cache

aaand i may have completely ****ed myself. no name appeared when trying to pair after wiping data, so i wiped system planning to reflash but i didn't enable developer options, so odin is seeing the device but i cannot flash. i've got recovery adb working, not sure if i can sideload a .tar but if i could potentially enable developer options via adb that would be great.
[Samsung Gear 2] kavinzhao:
Hey guys, so now our SuperDev biktor_gj has done what a Samsung Team is doing. We have all Android Wear standard functions ready and a sound output in addition. Cheers.
[Samsung Gear 2] DAGr8:
Yea man next check he def will get a few drinks from me :D
[Samsung Gear 2] tooandrew:
[MENTION=803006]biktor_gj[/MENTION] what image is android's /system folder in inside those tars? i think unless sideload mode works and you can provide a flashable zip to flash i'll have to adb push the whole /system there

okay, guys. if anyone manages to get themselves in the same bind as i did - let me just explain what i did to cause it, and what i did to fix it.

i failed to factory reset in recovery because twrp couldn't mount cache.

i wiped data instead, and on first boot, the watch did not provide a watch name to pair, and my phone couldn't see the watch. it didn't occur to me to enable developer options, so i rebooted to recovery and wiped system, then rebooted to download mode intending to flash, only to see that the actual writing to the disk never started, and i couldn't flash anything with odin.

i was, understandably, mildly disconcerted/panicked. i rebooted to recovery mode, manually installed samsung adb drivers via the device manager, opened a shell and tried changing the permissions on the root directory to 777, tried to flash. no - go.

so i downloaded a program called diskinternals linux reader, extracted rootfs.img from audio.tar, and mounted rootfs.img in diskinternals linux reader, and extracted all of the system files to a folder named system. i then attempted to adb push system /system and was told there was no space on the disk. SOOO, i formatted system again, twice, and attempted to push again. this time it worked. rebooting into system did not work properly, though. so i rebooted to download mode and attempted to flash again, and i was successful this time.

soooo... that was a nightmare but i worked it out.
[Samsung Gear 2] jbach44:
any chance we can go back to Tizen ( the latest from Samsung) if needed?
[Samsung Gear 2] alvaromartinezb:
Yes, I made a video about how to restore...

https://youtu.be/LhzIqFopQNY

Sent from my Nexus 5 - Android M developer preview 1

---------- Post added at 05:54 AM ---------- Previous post was at 05:53 AM ----------

HOLLY FUUUUUUUCK!!!!!!!!!!!!!!!!!!!!!

YOU HAVE NOW IDEA HOW EXCITED I AM

I just got from work 1:00 AM... But **** it I will flash it this instant and I will make a video about it!!!

Thank you very much [MENTION=803006]biktor_gj[/MENTION] !!!!!!!

Sent from my Nexus 5 - Android M developer preview 1