LiveView reverse-engineering effort

Search This thread

Nobolony

New member
Mar 22, 2013
1
0
Replacing battery

Hey guys.
My smartwatch doesn't seem to be holding charge. It will only stay on when connected to the charger. I'm thinking the battery may be dead. Any ideas?
 

jkorp

Member
Sep 24, 2012
37
30
Göteborg
Hey guys.
My smartwatch doesn't seem to be holding charge. It will only stay on when connected to the charger. I'm thinking the battery may be dead. Any ideas?
Sounds like you are right. When I bought mine, the charging didn't last for more than half a day. I returned it, and the one I have now lasts for 5 days... I guess the watches have been in stock for several years, and that is not good for the batteries.
If you just bought it, try to get a new one in return for the broken.
In case you have had it for a while, someone in this thread might have some hints on how to replace the battery?
 

SammysHP

Member
Nov 23, 2010
49
117
www.sammyshp.de
My LiveView was in the drawer for several months. Yesterday I saw the progress of this project and thought "hey, let's test it again" so I charged it and installed OLV. After some NullPointerExceptions, limitation and ugly code (sorry :D ) the battery was empty after 6 hours (maybe 30 min with screen turned on). Mine looks like the left one and half a year ago a full battery lasts for 3-5 days.
 

vbaros

Senior Member
Mar 25, 2011
238
50
Is there any way in either openliveview or the official app to keep the green led blinking on notifications? It seems silly that it doesn't, leds don't use that much power.

This! I would like to know if it is possible.
It seems really silly if you have to turn on LiveView every time to see if there is a notification.

For example I keep my liveview attached to my backpack and I can see immediately just by looking at it if there is a notification waiting.
 

SammysHP

Member
Nov 23, 2010
49
117
www.sammyshp.de
@GottZ

Don't remember. Maybe I turned it off over night. Never used it much because of disconnects every few minutes, no Gmail full-text notifications (API change in Gmail) etc. I bought it to develop a plugin for c:geo ("current" version maintained by Portree-Kid: https://github.com/Portree-Kid/LiveView-Navigator), but Sony's app was crap and we stopped working on the plugin.


@topic

Sadly after viewing the code of OLV I lost some of my enthusiasm about this project. The reverse engineering part is absolutely ok, but the code doesn't look nice. It's more a proof of concept than something you can release to the public.
First there's no consistent formatting of the code. A quick refactoring and reformatting with the Java guidelines should help a lot. Secondly the design is bad. There's no real structure and most of it looks like "hmm... does it work? then let's keep it, we'll clean it up later". What it needs: Clean event handling and dispatching. Currently there are several nested switch statements that control most of the functionality and is mixed with a sort of finite state machine.

The reverse engineering part was the first step. Now we have the communication protocol with the device. The next step is to provide a stable API that is extensible and represents the state of the device. With this I mean: If an event occurs the API knows to which plugin/extension it must be dispatched. In the other direction the API can handle commands from the plugins/extensions and decides if the device is in a state where it can handle them.

IMHO the development will be sped up a lot if we have this API with a good interface. Then functions like media control, sms notification etc. can be implemented by independent developers.

Don't see this as an offense against you. You've done good work, but there's a lot of room for improvements.
 

Cptnodegard

Senior Member
Nov 24, 2011
484
178
Can you broadcast intents from Tasker? (I've never used it)
If you can you can send an intent named "OLV_ADD_NOTIFICATION" with the following extras:
timestamp: long, contains unix time in seconds
type: int, 0 for generic, 1 for Android notification, 2 for SMS message and 3 for note
title: string, title of the alert
contents: string, contents of the alert


Alternative: If you can execute a console command in the shell of your phone you can try the following command:
Code:
am broadcast -a OLV_ADD_NOTIFICATION --el timestamp 0 --ei type 3 --es title "Title of your alert" --es contents "Contents of your alert"
(in combination with the latest version of OLV released in this topic a note should be added to the list of messages. This command does not notify the user that there is a new notification)


Please note that the name of this intent will change soon.
(Also note that there are other commands you can execute with intents too, like making the liveview vibrate or awaking the lv from standby. These commands are all part of the plugin API I am working on, so they may change in the future.)


I just moved to a new ROM that seems to have a compatible BT stack, so I'm playing with the LV some more. I'm a teacher, and if it proves stable, plan to use the Note feature to store notes for lessons, leaving my SGSII in my pocket and my iPad to display things for the class. My question is, is there currently any way like the above to send a note to OLV?
 

renzenicolai

Senior Member
Aug 13, 2012
125
181
www.rnplus.nl
I just moved to a new ROM that seems to have a compatible BT stack, so I'm playing with the LV some more. I'm a teacher, and if it proves stable, plan to use the Note feature to store notes for lessons, leaving my SGSII in my pocket and my iPad to display things for the class. My question is, is there currently any way like the above to send a note to OLV?

Yes, there is.

I think you can use the command you found but instead of OLV_ADD_NOTIFICATION use nl.rnplus.olv.alert.add

Maybe I changed other things too, so if it doesn't work please tell me and I will look into it.

---------- Post added at 01:41 PM ---------- Previous post was at 01:11 PM ----------

@GottZ

Don't remember. Maybe I turned it off over night. Never used it much because of disconnects every few minutes, no Gmail full-text notifications (API change in Gmail) etc. I bought it to develop a plugin for c:geo ("current" version maintained by Portree-Kid: https://github.com/Portree-Kid/LiveView-Navigator), but Sony's app was crap and we stopped working on the plugin.


@topic

Sadly after viewing the code of OLV I lost some of my enthusiasm about this project. The reverse engineering part is absolutely ok, but the code doesn't look nice. It's more a proof of concept than something you can release to the public.
First there's no consistent formatting of the code. A quick refactoring and reformatting with the Java guidelines should help a lot. Secondly the design is bad. There's no real structure and most of it looks like "hmm... does it work? then let's keep it, we'll clean it up later". What it needs: Clean event handling and dispatching. Currently there are several nested switch statements that control most of the functionality and is mixed with a sort of finite state machine.

The reverse engineering part was the first step. Now we have the communication protocol with the device. The next step is to provide a stable API that is extensible and represents the state of the device. With this I mean: If an event occurs the API knows to which plugin/extension it must be dispatched. In the other direction the API can handle commands from the plugins/extensions and decides if the device is in a state where it can handle them.

IMHO the development will be sped up a lot if we have this API with a good interface. Then functions like media control, sms notification etc. can be implemented by independent developers.

Don't see this as an offense against you. You've done good work, but there's a lot of room for improvements.

As you may have noticed I am not a professional Java / Android developer :). I only started working on the OpenLiveView app because I had a useless LiveView catching dust on my desk.

If you can help the project by rewriting some of the code: please do!
Please post your changes in this topic, after that I will add you to the Google Code project.

In my opinion the worst part of the code is currently the giant case and if construction in the service thread. For plugins there should be a way to add and manage menu items and support for more than one menu doesn't sound bad either.
Biggest problem of the current system: updating the unread count of menu items. To update the unread count the menu items have to be sent again, by making the LiveView ask for the menu, which it does not do on it's own every time. To update the counter OLV now tells the LiveView that the menu size has changed, which causes the LiveView to ask for the menu items.

Last note:
The official LiveView firmware is a *****: to exactly what she wants or she drops the connection :D
 
  • Like
Reactions: Cptnodegard

Cptnodegard

Senior Member
Nov 24, 2011
484
178
Yes, there is.

I think you can use the command you found but instead of OLV_ADD_NOTIFICATION use nl.rnplus.olv.alert.add

Maybe I changed other things too, so if it doesn't work please tell me and I will look into it.



Using the original console command with OLV_ADD_NOTIFICATION works, but replacing OLV_ADD_NOTIFICATION with nl.rnplus.olv.alert.add and running the otherwise identical command does not. Mind you I have no actual clue what I'm doing, so I'm probably missing something that has to do with the two different intent formats.

Anyways, when I use OLD_ADD_NOTIFICATION, I can't get timestamps to work. I've tried both using Tasker variable to insert it, and I've tried manually copying it from http://www.unixtimestamp.com/index.php, but both times I get a time of January 16, 1970, at 7.55 PM. Either I'm using the wrong format, or it's cutting off part of the timestamp.



EDIT: When I use timestamp 1364151581 (approx right now)
I get what (according to the convertor) is actually a timestamp of 1389300
aka 1 / 16 / 1970 @ 19:55:00 EST

I can't see the logic for how it gets there

---------- Post added at 07:22 PM ---------- Previous post was at 06:50 PM ----------

On another note, OLV has been very stable with my new ROM, with a couple of bugs:
-Have to click OK to pair it every time it reconnects. Tried some apps to fix this for stock liveview, but they did nothing.
-If I click anything while a notification comes in, it essentially freezes and loses connection.

Let me know if any of these are worth checking out as bugs, and whether you need logs etc to do so.
 
Last edited:

bongmaster

Senior Member
Dec 7, 2006
59
2
i grabbed a few of these liveviews form a shop trying to sell a load off cheap.
one i leaving as is, one i opened up but its still working ok, andanother i want to reflash with a custom firmware like a dedicated watch or something.
may grab one or 2 more if the lower the price again

how would i go about flashing olv or something via windows or have u only linux methods? linux is ok tho, as long as i dont have to compile anything, never works properly X3
 

Cptnodegard

Senior Member
Nov 24, 2011
484
178
i grabbed a few of these liveviews form a shop trying to sell a load off cheap.
one i leaving as is, one i opened up but its still working ok, andanother i want to reflash with a custom firmware like a dedicated watch or something.
may grab one or 2 more if the lower the price again

how would i go about flashing olv or something via windows or have u only linux methods? linux is ok tho, as long as i dont have to compile anything, never works properly X3

You dont "flash" anything, this is a control app that sends info to the watch for each connection. you cant make it work without a phone connected, AFAIK
 

GottZ

Senior Member
Sep 20, 2008
170
123
32
Cologne
gottz.de
AW: LiveView reverse-engineering effort

You dont "flash" anything, this is a control app that sends info to the watch for each connection. you cant make it work without a phone connected, AFAIK
lol. you do know that i'm working on a custom firmware for the device itself?

he could flash it through windows if he gets dfu-util to work on windows.
well. he could flash it but its not in a usefull state.

Sent from my HTC Desire Z using xda app-developers app
 

bongmaster

Senior Member
Dec 7, 2006
59
2
i know about the app cos i use it now X3, i jsut saw glimpses and heard rumors of an analog clock firmware (proof of concept?)
because i want one to be an analog watch free from connection to the phone. kinda like how wen u turn off the bluetooth on the phone and the time remains constant on the liveview device, (using one as a watch like that atm X3 but would be nice as an analog face ;) )
 

GottZ

Senior Member
Sep 20, 2008
170
123
32
Cologne
gottz.de
AW: LiveView reverse-engineering effort

i know about the app cos i use it now X3, i jsut saw glimpses and heard rumors of an analog clock firmware (proof of concept?)
because i want one to be an analog watch free from connection to the phone. kinda like how wen u turn off the bluetooth on the phone and the time remains constant on the liveview device, (using one as a watch like that atm X3 but would be nice as an analog face ;) )

were did you hear thoose rumors from? i'm the creator of that analog clock.

just take a look at this post. if you read it carefully you may be able to flash it.
anyways: it does not take the device to the deepsleep yet so it runs out of battery really quick (does not matter if the screen is on or off)

you also should create a backup of your current firmware.

to see how dfu-util works, simply download the firmware tar.gz file and take a look at the file "Makefile"

the olvfwp.bin file is what you can flash onto your device.

Sent from my HTC Desire Z using xda app-developers app
 
Last edited:

bongmaster

Senior Member
Dec 7, 2006
59
2
were did you hear thoose rumors from? i'm the creator of that analog clock.

just take a look at this post. if you read it carefully you may be able to flash it.
anyways: it does not take the device to the deepsleep yet so it runs out of battery really quick (does not matter if the screen is on or off)

you also should create a backup of your current firmware.

to see how dfu-util works, simply download the firmware tar.gz file and take a look at the file "Makefile"

the olvfwp.bin file is what you can flash onto your device.

Sent from my HTC Desire Z using xda app-developers app

the rumors being google and the youtube vids i saw and got the link to this thread from XD


seeing the analog clock there had me wanting to find said firmware :p

thnx for the info I'll look into it :) extended battery time would be good tho
will let u know how i get on and if i get any more of the devices for test reasons :3
 

bongmaster

Senior Member
Dec 7, 2006
59
2
having a problem here, reading thru instructions and stuff and it says my liveview will be found on /dev/ttyACM3

well there is no ttyACM anything in /dev, and i cant see weather its connecting in dfu mode or not since nothings appearing in /dev/ when i connect it :S
is there anything i need installed to have it show up? i seem to have everything else i need.
 

SammysHP

Member
Nov 23, 2010
49
117
www.sammyshp.de
@renzenicolai

I started from scratch and reused some parts of the code. My approach is to do everything with plugins. There will be a plugin manager that finds all installed plugins, let the user sort and disable/enable them, provides a list for the menu and an API for the dispatcher. The dispatcher is invoked for every received event and dispatches the event to either a built-in handler (time, menu etc.) or to the plugin (via the plugin manager) for navigation and alert events.

Currently my problem is to write the plugin api. I need bidirectional communication between different processes. Android provides IPC via AIDL. The plugin would be the service and would be started for long time with a start event (e.g. user opens the app on the LiveView) or short time (get plugin information for menu, capabilities etc). But the plugin must be able to initiate a connection, too. This is required e.g. for new notifications.
Intents would be another approach, but I think services are better.

You can find the working version here (only basic connection and one fake menu entry):
https://github.com/SammysHP/OpenLiveView-new

And here a first draft for the plugin manager, but not working because I never worked with IPC in Android and have no plan how to do it:
https://github.com/SammysHP/OpenLiveView-new/tree/plugin

Last note:
The official LiveView firmware is a *****: to exactly what she wants or she drops the connection :D
Yes, that's true. 2 seconds timeout and then - disconnect. I hope that GottZ will make a really good firmware with a better protocol. :D
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 23
    Hi all,

    A few weeks ago I started taking apart the LiveView software and manager. I'm really unhappy with the current plugin system, the menu structure and more. So, I started to reverse-engineer the Bluetooth protocol. I'm at the very beginning but it's looking promising.

    Here's the repo: https://github.com/BurntBrunch/LivelierView

    The protocol is not very difficult - just request-acknowledge-response serial communication over RFCOMM. Also, the kind people from SE didn't run the manager through Proguard (wink, wink, nudge, nudge ;) ).

    I also have what I *think* is a dump of the firmware but it seems either compressed or encrypted. Binwalk didn't find anything in it. If someone would be kind enough to take apart the software updater, we might figure out what's running on the actual device as well.

    Overall, I'm just starting but so far it's looking good (got time syncing working! it's at least a watch, if nothing else! :p ).

    Any help would be greatly appreciated (pull requests are more than welcome! :))
    10
    Well just a brief status update. The project I've started on github has been progressing, greatly in part from the contributions of boombuler.

    You can go there ( https://github.com/pedronveloso/OpenLiveView ) and check the README, and I've compiled and attached an APK so you guys can test for yourselves without having to clone the repo and compile ;). Right now that APK only asks for connecting with the device (has to be paired first of course) and then sends a Vibrate command to the LiveView. There's more commands done in the source then just that but the functionality has not yet received a dedicated UI since the whole thing is on a very early stage.

    Bare in mind that theres no point in reporting any bugs at this stage since I myself keep finding them with ease :p

    NOTE : You might have to uninstall LiveView first in order to test the app, at least I had to uninstall it because of Broadcasts that where getting in the way sometimes when the LiveView app was installed.
    9

    its not done yet. will need to enable getpixel in chibios gfx in order to have clean alpha overlapping. (well you cant see it anyways on a video)
    9
    Update!

    Here you go, the next update! :)

    Visible changes:
    I added mediacontrols (play/pause, previous track and next track) to the menu.

    Invisible changes (protocol):
    - Implemented brightness controll for the liveview display (off, dim and on)
    - Implemented ClearDisplay command
    - Implemented DisplayBitmap command

    Invisible changes (gui):
    - Added mediacontrolls like in the sony app when you long press the select key.

    Now the problem I am currently experiencing:
    The LiveView does not send back the navigate commands for left, right and select (short press) when in menu mode AND when out of menu mode (zero menuitems).

    My question to the original developer of the "net.sourcewalker.olv" app is if he can tell me how to make the liveview send those keypresses to the service.



    Something that I found out:
    the device sends DEVICESTATUS_ON back in stead of DEVICESTATUS_MENU when there are zero menu items, in that mode you have full controll over the screen (blanking and sending bitmaps).


    EDIT:
    Small bugfix (next button didn't work)
    9
    I'm sorry for being a noob again but what is OLV?
    Can there be a rom for the LiveView in the coming years?
    Is the LiveView open source?
    + can anyone provide me a detailed spec sheet of the LiveView... Like the processor and alll..

    Sent from my ST25i using Tapatalk 2

    1. OLV means: OpenLiveView wich is our project name (we have a custom android app that fully replaces sony's app)
    2. a rom is currently in developement as you can see within this post.
    3. the liveview itself is not opensource. our stuff however is.
    4. i cannot provide you a detailed spec sheet right now but will do it when i have some time digging out that info.

    so.. now to what i want to post:



    current snapshot of my firmware folder in attachments.

    current binary of the firmware is also in the attachments. (for thoose who just want to try it without compiling and know what they do)


    how to use the firmware folder:
    http://forum.xda-developers.com/showpost.php?p=38341041&postcount=731

    (yes, i suck at english. digg through it or wait till i explain it on http://openliveview.com)



    stuff that is on my todo:

    • display timeout (aprox 5 minutes to implement it)
    • bluetooth (need help)
    • write access to the internal storage (need help)
    • access to the current battery charge info (need help)
    • basic menu system (i'm on it)
    • stopwatch (i'm on it after the menu)
    • digital clock (will do it after i did the stopwatch)
    • other stuff
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone