yashsingh1/xdaforums huggingface dataset:
[Samsung Gear 2] jeffc83:
Mods - delete this post to help clean up this thread, thanks. PM me if you need anything [MENTION=803006]biktor_gj[/MENTION]. [MENTION=5477644]tooandrew[/MENTION], no worries, I'm done, post removed to the best of my ability;)
[Samsung Gear 2] tooandrew:
Don't feed the trolls. Can we stay on topic here please? [MENTION=803006]biktor_gj[/MENTION] I am at a friend's house I can flash tizen and pull logs real quick if you still need them. Please respond asap
[Samsung Gear 2] Festaman:
N00b question maybe. But I have been searching the thread without much luck....

So I converted mine a while back, i want to install and update. Since recovery is replaced whats the procedure?
[Samsung Gear 2] biktor_gj:
Don't worry, I have enough logs to go a bit further, but thanks!

[MENTION=1007992]everyone[/MENTION]: every two days someone is going to come over to criticize/complain/ask for something that doesn't make any sense or that's already stated on the first post. It's really simpler to report the post and ask in the comment section of the report for a thread cleanup, than starting a roll of replies. I know we all loose our nerves at some point and explode, but after that, report the post and let the mods do their jobs! They can't know that something is going on if nobody tells them!
[Samsung Gear 2] McGuigew:
Coming back to Android Wear. I tested battery with that new kernel yesterday and I lost 20% in 4 hours.

That means that a 100% could get me 20 hours of always screen on, that is a full day! :D

With the ambient mode disabled and touch-to-wake disabled, I only lost 13% in 11 hours today, this is great progress! :victory:
[Samsung Gear 2] biktor_gj:
All those changes are here to stay, 15 hours, 72% remaining(screen off) with my trashed battery... I don't think it can give much more!

The only thing that I have yet to fix, battery related, is the settings for controlling ambient mode (color depth, idle mode, and maybe brightness)

I'm trying to make an android wear app for that, if I don't succeed, I'll make a boot script to configure it...
[Samsung Gear 2] llsh:
Amazing!
[Samsung Gear 2] crime_of_heart:
Do we have the option to disable touch to wake (or are you referring to theater mode?)?

I am asking that because in theater mode notifications don't wake the screen. It would be great to have touch to wake disabled and still receiving notifications.

If touch to wake can be disabled at kernel level it would be great.

Hey [MENTION=803006]biktor_gj[/MENTION] is there a sysctl entry for that so that we can disable it via script?
[Samsung Gear 2] biktor_gj:
Yes, touch wake too. In fact, disabling touch wake from kernel shuts down the entire touch screen, so it helps battery life ;)

I'm putting all that available via sysfs, so echoing 1 to /sys/display/alpm turns the feature on, for example. I was hoping to make an app for that, but Android Studio and I aren't getting too confy with each other. I may very well expose it all and make a simple script and post some instructions... Maybe it's even better, even if it doesn't survive a flash... Less work for me, yayy!

What do you think?

Edit: I just thought that if I put the script in /efs it would survive every flash, so you would only need to set it up once and retain the settings even after a wipe, or put it in /data so it can be resetted with a flash... You choose!
[Samsung Gear 2] McGuigew:
Hey, You are right, I forgot to mention that I was speaking about theater mode... ;) and good idea, if we can get a way to have notifications lighting the screen without touch-to-wake active, so be it!
[Samsung Gear 2] crime_of_heart:
Two phased approach maybe?

Phase 1; just put the script with instructions on how to config.

Phase 2: the app :D

You are a true legend...

Wonder when you will be on xda, gsmarena and some others) news.
[Samsung Gear 2] McGuigew:
What are the arguments for both ? I guess the script has the advantage of a better integration whereas the app might be more handy ?

(I applied to be moderator, my application is weak on some points, but if I can help you by getting you a better environment here, that's the least I can try)
[Samsung Gear 2] biktor_gj:
Given that I have almost zero ideas on building an app for android (well, one or two but not enough), phase 1 I can do it in an hour of peace at home :)
[Samsung Gear 2] gled:
I would vote for option 1, you have worked so hard already, and some adb push never killed anyone... Plus it's not like we're gonna change those settings every day... And someone can offer an app so that you don't have to maintain that on top of the already awesome work done...

Attached is last kernel consumption here... More than 2 days Yeaaaah !! Can use my gear 2 neo over the week-end without a charge :)

The only thing left I can think of battery wise would maybe be to disable the 'ok google' listening.. Don't even know if it's possible or if it could have some benefits...
[Samsung Gear 2] WerWolv:
[MENTION=803006]biktor_gj[/MENTION]

If you tell me which commands should get run, I can write you a little app that can do that. I've already written several apps for Android and Wear.
[Samsung Gear 2] andrew.mackew:
Sounds really awesome! :good:

Which kernel date are you referring?
[Samsung Gear 2] biktor_gj:
Offer accepted ;)

I have already coded the display side, I have yet to do the touchscreen and the vibrator (If I manage to make it work ;))

Here's some data so you can start working on it:

I have put the settings for the display in this directory at /proc:

/proc/lcdsettings

There are 3 files inside:

ambient_brightness

idlemode

partialmode

ambient_brightness can be 1, 2 or 3 depending on the backlight level you want to have while ambient mode is enabled (1 lowest, 3 max), defaults to 1 on boot.

idlemode controls the color depth reduction while low power mode is on. 1 means enabled, and 0 disabled

partialmode controls the way the screen is refreshed during ambient mode. 1 means only partial redraws, 0 means full redraw.

To get max battery life, ambient_brightness should be 1, and both idlemode and partialmode should be 1 too.

Example(from adb)

echo 1 > /proc/lcdsettings/partialmode

Will enable color depth reduction

I will make similar folders for the touchscreen and vibration:

/proc/tssettings/

touchwake: set to 1 to enable, 0 to disable

/proc/vibrasettings/

strength:

0-50, 0 being the weakest and 50 being the strongest

When I have it all done I will post a new full image with the changes and permissions so an app can control it (have to patch init.rc to allow it) and hopefully root too ;)
[Samsung Gear 2] WerWolv:
Echo is a shell command, I guess? In this case I can just make a few buttons that run these commands. Shouldn't be too hard ^-^ I'm unfortunatly not at home until 5 o' Clock in the evening but I will try to finish it as quick as possible :3
[Samsung Gear 2] bitstra:
I could make an app ...

But I'm in vacation until August 8th ;)

My choice is /data for those data...
[Samsung Gear 2] andrew.mackew:
Enjoy your vacation buddy, have a sweet time! See you on August 8th ;) :good:

---------- Post added at 08:21 AM ---------- Previous post was at 08:18 AM ----------

Thanks for your wonderful work [MENTION=803006]biktor_gj[/MENTION] :good:

I'm back to my office and ready to flash tizen or anything else :laugh: if necessary.. I wonder if you need any log about camera or anything else that our watches can provide.
[Samsung Gear 2] biktor_gj:
Okay, kernel settings done.

I managed to find the regulation levels for the vibrator, so with the new image you'll be able to:

* Configure the ambient mode settings for the LCD:

echo 1 > /proc/lcdsettings/idlemode

echo 1 > /proc/lcdsettings/partialmode

echo 2 > /proc/lcdsettings/ambient_brightness

IDLE Mode: Controls the color depth reduction in ambient mode.. For best battery set it to 1

Partial mode: Controls the way the screen redraws in ambient mode. For best battery set it to 1

Ambient Brightness: This is on testing. Choose 1-3 depending on the backlight level you want.

With Idle and partial to 1, and and brightness set to 2, my battery drain was a 7% with display always on in 5 hours, with one of the default watchfaces, and a 13% in 12 hours. Not bad!

* Configure vibration level:

echo 5 > /proc/vibrasettings/strength

Choose from 1 (lowest) to 9 (highest): At minimum level it's makes very low sound but it's noticeable in the wrist, choose your best fit!

* Enable or disable Touch Wake:

echo 1 > /proc/tssettings/touchwake

Set it to 1 to enable, or 0 to disable it.

I'm attaching a little script with the default options I'm using.

Using ADB, push the script to /data:

adb push powersettings.sh /data

And reboot the watch. Options should be updated automatically on the next reboot.

If you wipe, you'll loose the settings and will have to push them again.

You can try your best vibration settings with the Watch connected to USB:

1. Go to Android Wear App on the phone, and select "Test notifications", and launch a dummy call

While it's vibrating, using adb:

adb shell echo 1 > /proc/vibrasettings/strength

(choose the value you want instead of 1) and see what suits you best ;)

Links: Full flash (all included): http://www.mediafire.com/download/smfm8xh6yc568ac/Wear_511__07_30_2015_Root_KernelSettings.tar

After installing, from recovery, run ADB shell and paste this: (change values with what you want)

echo "#!/system/bin/sh" > /data/powersettings.sh
echo "echo 1 > /proc/lcdsettings/idlemode" >> /data/powersettings.sh
echo "echo 1 > /proc/lcdsettings/partialmode" >> /data/powersettings.sh
echo "echo 2 > /proc/lcdsettings/ambient_brightness" >> /data/powersettings.sh
echo "echo 1 > /proc/tssettings/touchwake" >> /data/powersettings.sh
echo "echo 1 > /proc/vibrasettings/strength" >> /data/powersettings.sh

By the way, I tried to push root binaries but they didn't work, so just flash this after ODIN:

http://www.mediafire.com/download/9ppo5zd6f9y41yl/Wear-SuperSU-v2.40(1).zip

Install it from TWRP (either copy it to sdcard or ADB sideload) to get root!

EDIT: The script doesn't start automatically on boot, so you'll have to run it on every reboot. I'll fix it when I have a bit of time ;)
[Samsung Gear 2] jeffc83:
Testing now, thanks! Awesome work:)

EDIT: [MENTION=803006]biktor_gj[/MENTION], I am not able to change the ambient brightness after several tries. Does this value get entered into a special place? (I entered it at the end of the command)
[Samsung Gear 2] biktor_gj:
You write:

echo 1 / 2 / 3 > /proc/lcdsettings/ambient_brightness

Anyway it does strange things, some times it doesn't get picked up, sometimes it gets resetted by other events... I upped the overall ambient brightness to have a more functional ambient mode while we debug it ;)
[Samsung Gear 2] jeffc83:
Oh crap, what the hell was I thinking? Lol, thanks Biktor but that makes two major mistakes for me now;) Will play with the settings now, will report back:D OKay, now I see what you were referring to with the ambient brightness....do you happen to know what event is triggering the screen to do that?
[Samsung Gear 2] biktor_gj:
To be fair, I'm not too good explaining stuff today either ;)
[Samsung Gear 2] crime_of_heart:
Hey [MENTION=803006]biktor_gj[/MENTION] , as always excellent work! Gonna try the new image now.

An idea;

How about changing 'touch to wake' --> 'double touch to wake'? It should not be that much complicated I guess (well at least for you lol). There are several github repos (especially https://github.com/showp1984 ) with some relevant commits for android screens.

By implementing that we avoid accidental wake ups of the watch and still have the ability to wake when necessary without clicking any button.

Is it something doable?
[Samsung Gear 2] mettercomputers:
might be wrong place to ask but was wondering how to notifications on this watch for email and text messages. Get much better battery life with the latest stuff 66% remaining after 12 hrs so willing to lose some to get notifications working. thanks to all

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

enjoy your vacation cant wait for app:D
[Samsung Gear 2] McGuigew:
Vibration!! Thanks so much!! Testing today :D
[Samsung Gear 2] gled:
[EDIT] Not usefull, info was wrong on my side.
[Samsung Gear 2] biktor_gj:
I'm finally building an app, just missing the make it actually work part ;)

Preferences lists ready

Reads and stores config

Service auto starts on app launch / watch boot, and reads the preferences correctly

Only thing is when it actually has to starts the commands, echo returns an error. I might actually have to open the files directly instead of executing shell commands from the app...

Working on it ;)
[Samsung Gear 2] gled:
Small thing here [MENTION=803006]biktor_gj[/MENTION], reproducible 100%:

When I launch the powersettings script

multiples times

, changing the /proc/lcdsettings/ambient_brightness value, notifications are well received on the watch, but the screen does not wake up by itself anymore, nor does the watch vibrates ( it did when I do the test notification from wear though ). Rebooting the watch, screen wakes up again by itself when receiving notifications ( of course, custom settings are not applied ). Could be totally normal though, just reporting in case someone has the same issue. The issue does not appear by just applying the powersettings once after a reboot.

My general settings:

- Wifi deactivated.

- Wrist movement: Off

- Luminosity: 2

- Screen always on: Off

- Lock screen: Off.

My powersettings in the script:

/proc/lcdsettings/idlemode 1

/proc/lcdsettings/partialmode 1

/proc/lcdsettings/ambient_brightness 1

/proc/tssettings/touchwake 0

/proc/vibrasettings/strength 1

Btw, awesome news about the app, and awesome work as always :)

Other question, do we still have to shutdown/start the watch every day ? I do it now just by reflex, haven't noticed any issue though...
[Samsung Gear 2] hokamp:
Hay,

can u show me the code where you execute the command?

I will help you :)
[Samsung Gear 2] WerWolv:
Nice to see, you got it working. How do you try to run the commands? I suggest to use something like this:

public static void doCmds(List<String> cmds) throws Exception {
Process process = Runtime.getRuntime().exec("su");
DataOutputStream os = new DataOutputStream(process.getOutputStream());

for (String tmpCmd : cmds) {
os.writeBytes(tmpCmd+"\n");
}

os.writeBytes("exit\n");
os.flush();
os.close();

process.waitFor();
}

I found this here: http://stackoverflow.com/questions/3054973/android-how-to-run-a-shell-command-from-within-code

If you don't get it working you can send me the Source Code and I will take a look at it :)
[Samsung Gear 2] biktor_gj:
Okay, it's ugly, it's a little rough, but it's working ;)

Instead of echoing commands, I simply open the proc entry and write whatever data needs to be sent:

Example:

/* AMBIENT LEVEL */
if (ambientlevel > 0 && ambientlevel <4)
{
try {
File ambientFile = new File("/proc/lcdsettings/ambient_brightness");
fWriter = new FileWriter(ambientFile, true);
fWriter.write(ambientLevel);
fWriter.flush();
fWriter.close();

} catch (IOException e) {
e.printStackTrace();
}
}

Check if it works for you too!

http://www.mediafire.com/download/xn59y6k9dzn3y91/app-debug.apk

I will put the entire project folder on Github so anyone with more experience can make it prettier and / or more functional ;)

Have a nice day!
[Samsung Gear 2] WerWolv:
For me it is not working. Doesn't matter which settings I change, nothing happens. I taped several times on the 'Update' button too and ir wasn't working. I'll try to take a logcat when I'm back home
[Samsung Gear 2] biktor_gj:
It doesn't need to say anything, it just pushes the changes to the kernel. Do you have installed the image I posted yesterday? It will only work with that...
[Samsung Gear 2] WerWolv:
I've installed the full build from yesterday and made the adb shell commands in the recovery. After that I installed the app via adb and tried the settings. I rebooted several times too and it seams like they didn' get applied...
[Samsung Gear 2] biktor_gj:
My bad, sorry, I thought I had the permissions set on the init script (init.b2.rc), turns out I had it on my watch but weren't pushed into yesterday's build... that's why it works for me but doesn't work for you. New build in progress ;)

Edit: uploading now, will post back when it's up. I flashed it into my watch and it does update the settings :)
[Samsung Gear 2] McGuigew:
You got me going mad :laugh: thanks for making a new one!
[Samsung Gear 2] biktor_gj:
Okay, image ready, app bundled in, let's see if this time it works all right ;)

http://www.mediafire.com/download/yw8laj4jkdg5we2/Wear_511__07_31_2015_KernApp.tar

Full firmware, apply root zip with TWRP after install!
[Samsung Gear 2] jeffc83:
[MENTION=803006]biktor_gj[/MENTION] - Thanks, downloading and testing now:) (well, it'll take 40 minutes to download it for some reason...waiting patiently for it to finish)
[Samsung Gear 2] WerWolv:
Mediafire sometimes does such things. I don't know why...

I had to restart the download a few times. After that it took only 5 minutes.

EDIT: [MENTION=803006]biktor_gj[/MENTION]

Now everything is working! Thank you :3

I donated a few dollars for all your work. You've done way too much :)
[Samsung Gear 2] gled:
working here :)
[Samsung Gear 2] jeffc83:
All is working here too, the app works great! (tested each setting one by one and rebooted after each change) I am confirming all settings survive a reboot too:) Thanks again Biktor!!!
[Samsung Gear 2] AntwonJenkins:
working beautifully here too. the touchwake disabled is beautiful! [MENTION=803006]biktor_gj[/MENTION] thank you a million times my friend.
[Samsung Gear 2] andrew.mackew:
Working perfectly 'n beautifully! :) Thanks [MENTION=803006]biktor_gj[/MENTION]! :) God bless ya!

PS. I wonder if you are still proceeding tests with camera!
[Samsung Gear 2] biktor_gj:
I've played a bit more, but no results... I found the first point where the kernel crashes, but not sure on why it does not find the device when it should... I'm not too confident on being able to make camera work to be fair... Will try a bit more and see if I get something else, at least now I know how it should behave and I can try a few things more on my own watch ;)
[Samsung Gear 2] McGuigew:
Awesome, it's working perfectly, love the vibration at 1!

Are you finished when the rom is fully working or do you want to make it into a nice custom Android Wear for our Gear2? I understand it is the second option and I'm totally in favor of that one! :victory:
[Samsung Gear 2] AntwonJenkins:
He said before he didn't think he'd be able to get so and so to work and look at all we have now. I bet Biktor_gj will post tonight, "I have no clue what I'm doing but test this camera build" and it'll work flawlessly.
[Samsung Gear 2] fernandogdl:
is battery life affected in this new build?
[Samsung Gear 2] WerWolv:
Oh Yeah! With the right settings, the batterylife will be way better!
[Samsung Gear 2] gled:
On the way to more battery than tizen with Android Wear :)

Last version is very stable and the issue with screen staying black when receiving notification after applying Power settings multiples time is totally gone !
[Samsung Gear 2] biktor_gj:
I'm not going to make custom roms off it, I'll let you guys do that ;)

In the end, I'm trying to finish all that I can do. Right now, Neo is done for me. All that I could make work is working, even with the issues with audio out (understandable given the no audio out support for wear)

The camera on the gear2 is the only real remaining stuff for me, and maybe some random bug here and there. The real issue I have with the camera is that I don't understand how it works, it's four or five devices doing random stuff to take a picture, so really I don't know how to fix it... So if I finally manage to make it work, OK, if I don't, I'll post everything I know about it and push my modified library tests to github so anyone with more knowledge or willing to try can have something to start with.

From there, when the next version arrives, I'll give it a shot to make it run on our devices, but I have to admit, it's been 8 months working on this already, and I'm a bit tired, and looking for the next challenge ;)(gear s, I'm still waiting for you to come to your little hell!)

I think I got to give a new life to an otherwise abandoned watch, which is much more that I thought I could accomplish when I started, and much more than what I hoped for when I got mine as a gift :)

Haha that's mostly luck I'm affraid, let's just hope I'm a bit more lucky!

It depends on the settings you use on the kernel settings app.

For best battery, with screen always on:

Idle mode on

Partial mode on

Ambient brightness to 1

With screen always on set to off:

Idle mode and partial mode don't matter, the screen is shut down

Touch wake off to shut down the touchscreen

[MENTION=535343]all[/MENTION]

i've put the gear 2 kernel settings app in github in case you want to play or do anything at all. All my work comes with no licensing at all. Use it however you want, all the times you want, and for everything you want to. If you want to use it for other projects or something, feel free to do so!

I've also put the source for the powerhal library we're using, and all the changes I've mode up until today to the kernel source. It's a bit of a mess, but if you skip everything outside drivers/media/video/exynos/fimc, almost all the rest are the proc functions to connect the android app.

We all learn by looking at other people's code, hope it's of some use!
[Samsung Gear 2] andrew.mackew:
Thanks [MENTION=803006]biktor_gj[/MENTION]

I really hope you get lucky with the camera crossing fingers! I have no words to express my gratitude for your awesome work! :good: :good: :good:

Oh, by the way, did you purchase a gear s? Are you planning to port wear for it too? If this is the case, I gonna pick one for myself! :good: :laugh:

Oh, and always... God may bless ya!
[Samsung Gear 2] biktor_gj:
Yes, that curved screen has been calling me since I saw it for the first time, and Gear S owners deserve a little love too ;)

This time I will try a full android port!
[Samsung Gear 2] andrew.mackew:
Awesome! :D I also gonna order one anytime soon. :)

I read somewhere that Wear does not support 3G/voice. Do you have any idea on how to work it around?
[Samsung Gear 2] jeffc83:
Guess I'm buying a Gear S too;) I dislike my Gear 1 running Android for the size of the screen and battery life. See you there soon!

Found a tiny bug. When I press the button to turn the screen off, tap to wake doesn't work until I hit the button, then its back to normal. (I normally keep it off but was testing battery life) Again, VERY minor issue but it can be duplicated.
[Samsung Gear 2] Crewchief521:
Can I just flash this file in Odin and it will update the 7/5 version?
[Samsung Gear 2] jeffc83:
Yes, you'll enjoy the changes but don't forget to root via TWRP!
[Samsung Gear 2] McGuigew:
Waow, so this is almost it. I have to thank you, I really enjoyed the whole adventure! I loved to come here and read and flash! Thanks to all other users I came to know here! Hope we gather soon enough somewhere else! I'm not promising that I'm not buying a Gear S... :)

Good luck for the camera!
[Samsung Gear 2] jeffc83:
Same here, kind of like a family here;) Now let's keep finding bugs so we can keep Biktor here;) Oh and to to the person(s) that reported my posts, thank you, I thought I was answering him in the Q&A!!! Sorry all.
[Samsung Gear 2] Hec1N1:
[MENTION=803006]biktor_gj[/MENTION] can you make one last full flash package with all the works before you head over to the Gear S?
[Samsung Gear 2] a4t:
[MENTION=803006]biktor_gj[/MENTION] Thank you very much for your hardwork!

I really appreciate bout what you've done during this 2015, from January until now to make our Gear2/Neo works as AndroidWear till 5.1.1

Next time you develop Gear S, I hope I can keep following your thread and get me one Gear S to play with.

Success to you, my friend! Thanks..

Mi4i dark grey via Tapatalk
[Samsung Gear 2] tooandrew:
Lol I'll be wearing a gear s on one arm and a gear 2 connected to days gear s on the other