yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Gear] borillion_star:
Ok so here are two diffs I have:

First is the diff of one kernel directory with the other, and the second is the kernel config files.

The sources are from Samsung's Website. I'm not inserting these because of their length.

https://github.com/Borillion/GearV700/blob/master/T310_KK_Kern_TO_SM-V700_JB_Kern.diff

https://github.com/Borillion/GearV700/blob/master/T310_KK_Kernconf_TO_SM-V700_JB_Kernconf.diff

The second one is the one that I am going to start with the Kernel Configs:

[COLOR="Red"]-# Linux/arm 3.0.15 Kernel Configuration ( KitKat Tab 3 Kernel )[/COLOR]
[COLOR="YellowGreen"]+# Linux/arm 3.0.31 Kernel Configuration ( JellyBean V700 Kernel )[/COLOR]

Red lines are those that do not exist in the JellyBean Kernel, also indicated by "-"

I think you can figure out what the +, green lines mean.

These lines indicate modules, or switchable features in the kernel. They are somewhat analogous to drivers in windows.

These are enabling some kind of virtual to physical memory translation.

-# CONFIG_ARM_PATCH_PHYS_VIRT is not set

+CONFIG_ARM_PATCH_PHYS_VIRT=y

Thats my little blurb for the day. I'm doing this so someone can also maybe learn a few things on the way to either Failure or Success. :P
[Samsung Galaxy Gear] leszakk:
Aced CS and Chemistry :D physics was meh... I'm sorry I have not had any time to work on this.... yes, my watch is still bricked... I know, I'm lazy. I'll get around to it, I promise... but it may be after a few more exams /: As for the rom, the current state is simply that it does not boot. It won't brick your watch though; I bricked mine with a bad recovery image. Feel free to try to debug the kernel without worrying about the brick. IMHO the gear is much to light to be a brick.... maybe a paperweight tho? do people still use those? I gave [MENTION=5885383]SenseiEmu[/MENTION] an updated TWRP recovery image that he claims to have worked. flood him with PMs so I can get a confirmation and release it. Also, thanks to [MENTION=709992]borillion_star[/MENTION] for stepping up. I'm proud of you son!
[Samsung Galaxy Gear] The_SilverOne:
Congrats on the good exam results. Im sorry, I though it was the ROM itself that bricked your device, whereas it turns out to not be the case. I had sent (a few) PMs to SenseiEmu, no response as of yet. Two questions: 1) any good resources or points of reference if say, a newb, would like to learn kernel debugging and rom building? 2) I had no idea that you can still ADB into a bricked device. how does one do that on this watch for example. I mean i know with some phones that are hard bricked you can use a USB jig to push it into download mode but beyond that im stumped. How does one recover a hard bricked watch?
[Samsung Galaxy Gear] leszakk:
1. you can solder on a serial port or jtag but I wouldn't recommend this as the probability is high that you will ruin your watch. Your'e best bet is to enable a framebuffer console. you can do this while compiling the kernel or enable it afterwards if the kernel supports it. Also, if you have a working kernel, you can enable CONFIG_ANDROID_RAM_CONSOLE and use cat /proc/last_kmsg to get the kmsg from the last boot. Obviously you would need adb or serial access to the working kernel to run the cat command.

2. bricked is a relative term. In my case it means that the device takes ages to boot and when it finally does, it does not respond to touches. The hardware key still works so I can still boot to download mode. once in download mode, I should be able to flash a custom odin package that contains null rom with adb already enabled. If I can boot with adb enabled, I should be able to reflash the bootloader and other device partitions which will hopefully fix my watch.
[Samsung Galaxy Gear] westwallpoma:
Ha! That is a exactly the state my Gear is in. Would it be possible to flash the bootloader with heimdall? I only ask since I probably made a paperweight out of my Gear using Heimdall ;)

I must say, I was considering mounting an image of Tizen to automatically allow sdb access so I could fiddle with it ; but I couldn't get past the usual startup wizard despite fiddling around with the various images and systemd. And then work got in the way ...

Well done on your exams, BTW.
[Samsung Galaxy Gear] haryp2309:
If you wait until odin says pass, not reset, the touchscreen will work
[Samsung Galaxy Gear] leszakk:
Yes but only if the problem is caused by downgrading from tizen.
[Samsung Galaxy Gear] leszakk:
Work sucks.. I have not attempted to use heimdall since I had my s3. It seemed to have stability issues at the time but I'll give it another look. How long does your gear take to boot?
[Samsung Galaxy Gear] westwallpoma:
Just dug my Gear out of it's box and timed a boot. Takes around 105 seconds to boot into Tizen.
[Samsung Galaxy Gear] borillion_star:
Guys just checking in to say that I am here. I have been busy with a new job.

Additionally I got a chance to pick up a Linux kernel development that's

going to be starting soon.

I am walking through the kernel configs and comparing the code in the different directories,

I have not gotten very far yet though so my apologies. So far it looks like setting some of the

first lines to yes will work, but I have not had a chance to get further in yet.

For those other noobs like myself. Just download kernel sources and build an android emulator

image to start of with. After that just start diggin in. Helps to know C as the kernel is written in

it and Assembly specific to each architecture. I don't think we will need to get that level though.

HINT : make config, make menuconfig
[Samsung Galaxy Gear] paultje162:
No need for apologies! You're trying, thats what matters. How long it takes is not an issue.
[Samsung Galaxy Gear] h2ocrystal:
I would like to help

Hi guys!

I have a Galaxy Gear few months ago and I would like help testing or developing if it's required. I have a question, the version of Wearez "Wearez-20150129-TEST-ls02.zip" 'brik' the device? I ask it because i'd like intall into my gear.

Thanks :)
[Samsung Galaxy Gear] miky1989:
Interesting.. Subscrived !!

Hope soon will have our android wear rom for Galaxy Gear :D
[Samsung Galaxy Gear] lgiang1994:
http://xdaforums.com/gear-2/development/please-help-kernel-compiling-android-t2992953/page14 gear 2 neo already has android wear :victory: but when gear 1 get android wear on it ???? :crying:
[Samsung Galaxy Gear] emuandco:
Yeah, even some german IT news pages posted about that. Maybe it's of use here. CPU seems to be close to ours.
[Samsung Galaxy Gear] ApoKyla:
I am in the same boat, and have been for a year... The kernel brick was my poison...
[Samsung Galaxy Gear] leszakk:
No. It won't brick your gear but it also won't boot in it's current state.
[Samsung Galaxy Gear] leszakk:
Sorry for being absent for so long. I have not given up. My gear is still bricked but I've been tinkering with it whenever I get chance. I think that it is a hardware problem, not software so I will be buying another as soon as I get out of uni for the summer. As soon as I have a working gear I will get back to work. Hopefully we will have a working kernel by June.
[Samsung Galaxy Gear] oddbehreif:
Good to hear you're still around. Samsung's stock OS is dreadful so I'm really looking forward to this.
[Samsung Galaxy Gear] fresnogamer:
Great job!

Great to hear your are still working hard. Good luck.
[Samsung Galaxy Gear] leszakk:
I have built an updated TWRP recovery that seems to work. I say seems to work because it boots on my gear but as my touchscreen still does not work, I can vouch for its safety. If you want to test it, send me a PM. If it works on other gears I will update the op post with a link.
[Samsung Galaxy Gear] Ducter:
What's your gear doing? More so, when did it become unresponsive to touch? I know you probably have tried but going from tizen to android does that. You have to flash exactly right other wise you get your scenario. Even if you think it's something else flash back to stock tizen, then flash the tizen to android deal, reboot into recovery when it's time to flash the recovery, it will fail but that's when and where you flash the recovery. Every time I do it any other way it leaves my gear with an unresponsive display.

Not disagreeing with you that it could be hardware only saying give it another shot. When mine was like that I could flash anything all day and would not have a working display till I did it the way I mentioned.
[Samsung Galaxy Gear] leszakk:
I will definitely try it again. It would be great to know why that method works.
[Samsung Galaxy Gear] Ducter:
No idea why it works like that, I know if I missed recovery and it started to boot I would have to start all over, continuing on would give the non responsive display also.
[Samsung Galaxy Gear] leszakk:
I've never actually installed stock tizen, only tizenmod. Do you know where I can find stock?
[Samsung Galaxy Gear] Ducter:
This is stock rooted, it's what I use and uploaded just so I have it some where lol. I go ne9 to nf1 then tizen mod but in your case, ne9 should be enough to take you back to android successfully.
[Samsung Galaxy Gear] leszakk:
Brilliant! Thanks! so NE9 is android and NF1 is tizen? and I need to flash NF1, then NE9, then enter recovery without rebooting?
[Samsung Galaxy Gear] Ducter:
Ne9 is tizen, it's a full ROM, nf1 Is an update for tizen and not a full ROM.

If I were you I would Odin ne9, then follow the guide to go back to android. I posted my steps some where on here, let me look for them and I'll link you.

---------- Post added at 09:01 PM ---------- Previous post was at 08:54 PM ----------

This should work.
[Samsung Galaxy Gear] leszakk:
Will (hypothetically) my touch screen work once I am in Tizen? or only after I boot stock android recovery? Also, do you happen to have a pit file for tizen?
[Samsung Galaxy Gear] Ducter:
You will have to go to android correctly, after that it should work. I believe there's a pit file in the tizen to android zip, not sure if that's what you need.
[Samsung Galaxy Gear] westwallpoma:
I tried all the steps above and multiple variations and never been able to get a functioning touchscreen. I fear it was flashing an earlier recovery image posted in this forum that mangled something. Either that or using Heimdall rather than Odin as my default flashing client along the way.

Keen to find out if you get it working again with this approach ; but my next idea was to get ADB working in TWRP (fscking selinx ...) and see if you could eek something out of out the device at a lower level.

UPDATE

Tried your documented process, diligently. Touchscreen still not working.

Also, just flashed your updated TWRP, leszakk - still getting the libc error that we had with the Null TWRP. I'll PM you the details ; although I suspect you are already aware of it. Without a shell, I can't really do much with the device :(
[Samsung Galaxy Gear] haryp2309:
Hi My gear is now unusable. Som kids jumped on me and my gear got torn ?

But it still works and it can be used to test your rom so I can help you with the development ?

Ps. I fixed the touchscreen (2 times) on my gear by doing the follow the steps and wait until odin shows "pass". Every time I disconnected my gear in "reset", the touchscreen stopped working ?
[Samsung Galaxy Gear] dandyrow:
Doesn't work with normal TWRP

I have just tried flashing the zip with the regular null_twrp and it failed. I have messaged lezakk for his build of twrp to test that but i have had no reply yet.
[Samsung Galaxy Gear] westwallpoma:
Comparing Gear 2 and Gear

Re: Touchscreen woes.

Been doing a bit of digging (basically comparing the Gear 2 SM-R380 to the Gear SM-V700) and noticed that they share the same TSC ; Melfas MCS-8000 which is supported in the Linux kernel through the following driver:

https://github.com/F4uzan/f4kernel-u0/blob/master/drivers/input/touchscreen/mms128s_ts.c

A quick scan of the code pretty confirms to me that the firmware needs to be uploaded to the controller and the dmesg output from the earlier days of porting Android to the gear2 has the following:

<4>[ 0.546459] mms128 2-0048: cannot get touchscreen firmware version
<3>[ 0.580974] mms128 2-0048: mms_flash_fw fw_data is NULL!
<3>[ 0.580989] mms128 2-0048: mms_flash_fw fw_data is NULL!
<3>[ 0.581001] mms128 2-0048: mms_flash_fw fw_data is NULL!
<3>[ 0.581013] mms128 2-0048: failed to flash firmware after retires
<3>[ 0.581025] mms128 2-0048: failed to initialize (1)
<4>[ 0.584424] mms128: probe of 2-0048 failed with error 1

The whole touchscreen shenanigans with reverting back to Android from Tizen is probably enveloped within the kernel. Way above my head, sadly. Post this in case there's anybody here with half a clue :)

enable CONFIG_TOUCHSCREEN_MMS114, if you're rolling your own kernel.

Link to comprehensive V700 teardown:

http://www.techinsights.com/uploade...y/Marketing/2014/WaRP/Samsung-Galaxy-Gear.pdf

Link to less than comprehenive R380 teardown:

https://www.ifixit.com/Teardown/Samsung+Gear+2+Teardown/23990

Edit - comparison table.

Component Man. V700 R380
-------------------------------------------------------
Bluetooth Broadcom BCM20702 BCM4334W
GyroAccel Ivensence MPU-6500 MP65M [0]
Audio Yamaha YMU831 YMU831
Power Man Maxim MAX14577E MAX77836 [1]
Battery Guage Maxim MAX17048
PowerManagement Samsung S5M8767 [2]
CPU Samsung KMNJW0002M KMF5X0005M [3]
MCU STM STM32F401CB STM32F401CB
TSC Melfas MCS-8000 MCS-8000 [4]

[0] Appears to be the same product? Kernel driver inv-mpu-iio perhaps?

[1] See https://lkml.org/lkml/2014/1/28/155

[2] https://www.kernel.org/doc/Documentation/devicetree/bindings/regulator/s5m8767-regulator.txt

[3] V700 - 4212 Cortex-A9 ; R380 Exynos 3 3250 Cortex A7

[4] https://github.com/F4uzan/f4kernel-u0/blob/master/drivers/input/touchscreen/mms128s_ts.c
[Samsung Galaxy Gear] creasqui:
any news guys ?

my simple idea is still this

https://www.youtube.com/watch?v=r49TIu3UABA
[Samsung Galaxy Gear] WeedyEyes:
This thread is dead?
[Samsung Galaxy Gear] kscasper13:
looks that way....... sadtrombone
[Samsung Galaxy Gear] langsalang:
Hey all!

I just wanted to share how I revived my Gear watch in hope that if you revived yours, we can have "Wearez" sooner!

I was on latest Tizen and decided to downgrade.

I followed the downgrade instruction but missed out on selecting recovery and instead just left the watch for few seconds and it did whatever and ended up with dead touchscreen.

Read on another thread that by simply repeating the process would fix the problem.

So I gave it a go but during the process I moved the watch and the cradle was lose and opened up! So naturally it was bricked!?

I tried flashing again using the downgrade option and it would just freeze at where it stopped last time.

I tired flashing Tizen again but no luck. I tried flashing stock android again but failed.

At one point I even lost the bootloader, leaving only "firmware upgrade error" screen.

I literally almost shat myself when that happened.

I think I tired the downgrade method again but it will get stuck again.

But aftet trying the downgrade method, I was able to get bootloader menu. Again tried using downgrade method on Download mode, but wouldn't work.

My final attempt was to flash original firmware through "firmware upgrade error" and this time for some reason it had finished flashing!!

I was able to boot but without touchsreen working.

So I followed the downgrade intruction again as following:

1. Press power button till "rebooting..." appears and press the power button several times until menu comes.

2. Press power button to select "Download". Press power button for 5 seconds to select "Download" mode

3. Use odin to flash the PIT and downgrade firmware file with "Auto Reboot" unchecked, "RE-Partition" checked and "F. Reset Time checked.

5. After flashing, press on the power button to get to "rebooting...." screen then select recovery.

6. Then by pressong power button until "rebooting...." screen then enter "Download" mode.

7. Use odin to flash recovery file with "Auto Reboot" unchecked, "RE-Partition" unchecked and "F. Reset Time checked.

8. Once done, press power button until "rebooting..." screen then enter "Recovery" and let it do its magic then reboot.

9. Touch screen should work.

10. (Optional) Flash stock android firmware over the downgraded firmware. ADB should work fine. (I had trouble with ADB on freshly downgraded Gear)

11. Do whatever pleases you. I personally installed TWRP and installed Null Rom.

Hope it makes sense and help to revive those with dead touch screen! If you can get it to bootloader or firmware update error screen, you can revive it!!
[Samsung Galaxy Gear] iSpammer:
any news ? [MENTION=5971961]leszakk[/MENTION] [MENTION=709992]borillion_star[/MENTION]
[Samsung Galaxy Gear] westwallpoma:
No news sadly. Watch is useless without a working TSP.

This is the important stuff from the recovery boot log ; where it shows that it doesn't know which firmware to flash to the controller.

<6>[ 30.617579] c0 melfas-ts : melfas_power OFF
<6>[ 30.629554] c0 melfas-ts : melfas_power ON
<4>[ 30.655143] c0 melfas-ts 3-0048: failed to obtain ver. info
<6>[ 30.655228] c0 melfas-ts 3-0048: MMS-128S Before FW update : [0xff][0xff][0xff]
<6>[ 30.655336] c0 melfas-ts 3-0048: tsp ic fw error : section [0] is need to be updated
...
..
<6>[ 130.937693] c0 melfas-ts : melfas_power OFF
<6>[ 130.949630] c0 melfas-ts : melfas_power ON
<4>[ 130.975174] c0 melfas-ts 3-0048: failed to obtain ver. info
<6>[ 130.975243] c0 melfas-ts 3-0048: MMS-128S Before FW update : [0xff][0xff][0xff]
<6>[ 130.975326] c0 melfas-ts 3-0048: tsp ic fw error : section [0] is need to be updated
<6>[ 135.270543] c0 pet_watchdog_timer_fn kicking...dc32
<6>[ 140.270087] c0 pet_watchdog_timer_fn kicking...dc33
<6>[ 145.269671] c0 pet_watchdog_timer_fn kicking...dc34
<3>[ 145.976234] c0 melfas-ts 3-0048: i2c failed @ mms_flash_section
<3>[ 145.976304] c0 melfas-ts 3-0048: failed to mms_flash_section[0]
<6>[ 150.270175] c0 pet_watchdog_timer_fn kicking...dc31
<6>[ 150.977652] c0 melfas-ts : melfas_power OFF
<6>[ 150.989428] c0 melfas-ts : melfas_power ON
<3>[ 151.015027] c0 melfas-ts 3-0048: failed to flash firmware after retires
<3>[ 151.015105] c0 melfas-ts 3-0048: failed to initialize (-1)
<6>[ 151.016508] c0 melfas-ts : melfas_power OFF
<4>[ 151.016581] c0 melfas-ts: probe of 3-0048 failed with error -1

I grabbed this from by booting TWRP from recovery. While adb shell is knackered due to the following error:

gregor@alanstubbs:~/gear$ adb shell
soinfo_link_image(linker.cpp:1673): could not load library "libc.so" needed by "/sbin/sh"; caused by load_library(linker.cpp:771): library "libc.so" not foundCANNOT LINK EXECUTABLE
gregor@alanstubbs:~/gear$

You can still grab files from the watch with adb pull ; so I grabbed the log files with:

gregor@alanstubbs:~/gear$ adb pull /data/log
pull: building file list...
pull: /data/log/Status.dat -> ./Status.dat
pull: /data/log/setupwizard.txt -> ./setupwizard.txt
pull: /data/log/PreloadInstaller.txt -> ./PreloadInstaller.txt
pull: /data/log/recovery_kernel_log.txt -> ./recovery_kernel_log.txt
pull: /data/log/recovery_last_kernel_log.txt -> ./recovery_last_kernel_log.txt
pull: /data/log/recovery_log.txt -> ./recovery_log.txt
6 files pulled. 0 files skipped.
283 KB/s (172822 bytes in 0.594s)
gregor@alanstubbs:~/gear$

Full boot log is pastebin'd here: http://pastebin.com/v5iwaESC

Basically, what is happening is the kernel is saying "I need to flash firmware to the touchscreen controller ; it's calling mms_flash_section and using the i2c_transfer api to flash the data. It's either failing on the first block or it's unable to verify (or read) it and then coming back with that error. Diagnosis ; something not working :)
[Samsung Galaxy Gear] iSpammer:
Take it to the service center9?
[Samsung Galaxy Gear] royredman:
Has anyone tried flashing this rom at all? IF so, is the newest build working?

Also, how do you install it? (noob here)
[Samsung Galaxy Gear] WeedyEyes:
You install it like any other android rom using recovery.

1. Install custom recovery using Odin.

2. Put rom.zip into your device

3. Install zip using recovery (with necessary wipes)

I recommend to do a full backup all the time before flashing anything

Anyway looks like this rom ISNT SAFE to flash, so you can brick your device.
[Samsung Galaxy Gear] emuandco:
You don't because it does nothing useful for the end user right now.
[Samsung Galaxy Gear] westwallpoma:
Yeah. Gave that a go. It's long out of warranty. They quoted me a figure for repair that was in excess of a new Gear. I shared a laugh with them, thanked them for their time and put the phone down.

Anyway, I've buckled and bought another Gear from Ebay ; the average price was dropping like a stone this month so picked one up for 60 quid. I'll use this new one as a donor for my old one. First thing I'll do is take a copy of all the partitions and see if I can recover the old Gear. If not, then the TSP controller is definitely borked and I'll just keep the device for hacking about with. Imagine, a gesture only Gear :)
[Samsung Galaxy Gear] iSpammer:
So? Any news??
[Samsung Galaxy Gear] leszakk:
Tried again to flash to tizen and back to android to fix my touchscreen. It committed suicide on the way to tizen and now I have no bootloader. I think a used one on ebay is about $90 which wouldn't be to bad except I'm saving up to get a new ECU for my little red sports car. Car hacking > Watch hacking. Sorry guys. BTW, I updated the op post with an update TWRP image that SHOULD work.
[Samsung Galaxy Gear] oddbehreif:
What if all of us sponsored you a new Gear, would you be willing to continue then?
[Samsung Galaxy Gear] leszakk:
I guess i would have to haha
[Samsung Galaxy Gear] oddbehreif:
Well then, I suppose we should get a thread going. I'm ready to throw in some bucks.

I'll gladly say goodbye to Sammy's stock firmware, and surely I'm not the only one. :)
[Samsung Galaxy Gear] Ducter:
I have my gear, it's obviously used, minor scratch on screen and the clasp shows use but everything still works fine. I'll sell it for 50$ if wanted. Since getting another nexus device I don't use the gear often. I would just donate it to the cause but money is tight.
[Samsung Galaxy Gear] Viper3001:
Hope it will be possible to port wear because otherwise i have a 100€ watch and cant use it with my s4 on stock google 5.0.1 rom
[Samsung Galaxy Gear] emuandco:
Sure you can, but not all stuff will work...
[Samsung Galaxy Gear] Viper3001:
But how? I tried several methods like installing gear manager packs but always my hostmanager and saproviders has stopped.
[Samsung Galaxy Gear] speedme:
I have also a Galaxy S4 (Black Edition, GT-I9515) with stock Android 5.0.1 and Gear Manager is working flawlessly.

All functions even.

I didn't have to do anything special to get it working.

Coming to think of it, I did do a OTA update from 4.4 to 5.0.1 with no wipe.
[Samsung Galaxy Gear] dexter35803:
Hope its not dead

Well im hoping this thread is not dead i will say the latest recovery works to restore my backup. It also worked to attempt install of latest zip you have posted but it still failed to install so here is the recovery log so you can figure out what went wrong. I just got a gear yesterday and was disappointed to find out it wasnt the proper version of android right now im running null 23 but would def pref android wear an willing to help out anyway i can. I have android dev and some kernel dev i dont really know C or C++ but am willing to learn i would love to get wear working on this i figured we could use the Gear 2 AW as a base and change the drivers out for the hardware that is not the same since there is a working android version on the device. anyways let the dev continue lol
[Samsung Galaxy Gear] dexter35803:
Messed around a lil more and found out that is seems the kernel is directly related to recovery. I decided to flash the boot img via download mode from the zip file well that was a bad idea lol cuz now i cannot boot back into recovery luckily i have the mk7 image and i can get it back up and running but just thought you would like to know my findings since that is why its not working

*edit

so recovery finally booted but the TS does not work lol so i guess i still have to restore