LiveView reverse-engineering effort

Search This thread

GottZ

Senior Member
Sep 20, 2008
170
123
0
32
Cologne
gottz.de
Is there any option to change the timeout to like 2 or 3 hours? It's very important. Hope You can help.
Best regards!

PS: Of course I mean all the LiveView, not just apk files. Or could you modify LiveView app to do that?

what timeout are you talking about?
liveview sleep timeout?

Sent from my HTC Vision using xda app-developers app
 

GottZ

Senior Member
Sep 20, 2008
170
123
0
32
Cologne
gottz.de
I have .txt plugin. For that I need it. :(
Is it possible? I would send you an app.

for plugins its possible to keep the screen alive but this sounds like you use the original liveview app.
we are not the developers of the official liveview app.
the project discussed and developed in this thread is open liveview wich does not yet have a plugin api.

may wait for someone else to respond since i'm not doing the apk developement but i know a notes plugin is on the todo list.

Sent from my HTC Vision using xda app-developers app
 

piterei357

Member
Aug 30, 2012
6
0
0
for plugins its possible to keep the screen alive but this sounds like you use the original liveview app.
we are not the developers of the official liveview app.
the project discussed and developed in this thread is open liveview wich does not yet have a plugin api.

may wait for someone else to respond since i'm not doing the apk developement but i know a notes plugin is on the todo list.

Sent from my HTC Vision using xda app-developers app

I wrote here because you guys have more experience than me. Is there no option for help? :(
I just need to keep this screen alive. I'm begging you.. :(
 

samjam

Senior Member
Dec 18, 2006
442
102
63
Seconds as well as minutes would have been helpful today as my wife was in labour and I needed to time the contractions.

anyway, I now have another son!

Sent from my Ascend G300 using Tapatalk 2
 

GottZ

Senior Member
Sep 20, 2008
170
123
0
32
Cologne
gottz.de
i wrote a simple algorithm now that creates two arrays for image data.

one byte containing the current line number, one byte the start offset in that line and one for the end offset.
when i run it through an image it will create a simple selection of pixels.

the second array simply contains alpha info of each selected pixel.

for the eight hour images it takes around 250 bytes / frame, for the eight minute images around 200 byte / frame


i could reduce it even more if i would do bit shifting to store the alpha data in 5 bit / pixel and the coordinates in 7 bit each.


has anyone here a better idea to store image data or likes the way i do it?
 
Last edited:
  • Like
Reactions: willfck4beer

willfck4beer

Senior Member
Oct 18, 2007
254
42
0
With thirty plugin apps available on the market... Doesn't enabling plugins(either natively or parasitically from a sandboxed liveviewmanager) have to be priority number one? Any way to bring in smart watch apps too?

Sent from my SCH-I605 using xda premium
 
Last edited:

GottZ

Senior Member
Sep 20, 2008
170
123
0
32
Cologne
gottz.de
With thirty plugin apps available on the market... Doesn't enabling plugins(either natively or parasitically from a sandboxed liveviewmanager) have to be priority number one? Any way to bring in smart watch apps too?

Sent from my SCH-I605 using xda premium

i'm not related into coding of the apk but thats what i think from a developers perspective:
  1. plugins are cool. you are right about that.
  2. olv is not based on the sourcecode of the original liveview manager, its based on reverseengineering. its actualy incredible how much it supports already.
  3. since olv does not do certain things the same way as the original manager (wich is good), it will be a pain to set up a plugin api the same way as sony ericsson did. this goal can be achieved but i guess stability of certain other things should have a higher priority right now.

edit:
bout the smartwatch:
can you please tell me how you would emulate a touch screen on a non touch screen? most plugins rely on it so thoose plugins would not be usable at all.
except the touchscreen smartwatch plugins can mostly be implemented i guess but not before 2014

edit2:
update about my analog clocks image compression:

16 images (8 for hour and 8 for minute) have a total size of 1280kb @ 128 x 128px x 5 color bits each.

as i've said, i have two arrays. one for pixel selection and one for pixel data.

the pixel selection goes for all 16 images to 888 byte and can be reduced to 704 through bit shifting (since each info only needs 6 bits as maximum)
this results in 79.28% compression for the selection array.

the pixel data takes 2448 byte and goes down to 1538 byte through bit shifting (cause each pixel only requires 5 bit) wich is a compression rate of 62.83%

do you think i shall give a s**t and use it without bit shifting? the plus in not using bit shifting would be a lower instruction count to render a time.

keep in mind that the original liveview firmware uses png image compression wich takes way more instructions than this bit shifting.


edit3:
HAPPY NEW YEAR!
 
Last edited:
  • Like
Reactions: willfck4beer

kisypher

Senior Member
May 27, 2012
147
31
0
Grand Island, NE
Yhgv

Neither :) Did it from disassembly of the manager - much easier than sniffing and guessing.

If you don't have that option and said gadget connects to an Android phone, put on a decent ROM with the full BlueZ stack (e.g., Cyanogen) and use hcidump. It's really, really useful!

Come to think of it, Wireshark might be good enough - the only thing I found useful about hcidump was the SCO audio dump.
 

tazzix

Senior Member
Nov 12, 2005
119
17
0
Karachi
tazzix.com
With thirty plugin apps available on the market... Doesn't enabling plugins(either natively or parasitically from a sandboxed liveviewmanager) have to be priority number one? Any way to bring in smart watch apps too?

Sent from my SCH-I605 using xda premium

First of all great work, I just joined the party but I liked the device over the smart watch because of simpler controls.

Thirty is not such a high number considering the potential of the device, although the ones I need are not there, so before I start coding them for the LiveView Manager (original app) I am waiting for OLV to have some kind of plugin API so I can implement them as plugins rather than forking OLV and implementing them in-process. I might copy some of the ones on the market.

My mostly used plugin is custom notifier plugin which is irrelevant for OLV

Then I want to send preconfigured messages to recent contacts communicated with (both calls and SMS), Answer-it only solves a small part of the issue. Also would like more interaction with GMail with at least displaying subject and replying with preconfigured messages for urgent ones.

I liked the Speedomeeter, Mode, ViewFinder, TailLamp, plugins and would try to implement copies of them. Not sure if some of "Mode"'s functionality is already in OLV or not but its very handy.

SportyPal is a great app, but the plugin is not separate and hence might not be possible to come up with something like that. However, a minimal cycling computer would be on my cards.
 

renzenicolai

Senior Member
Aug 13, 2012
125
181
0
www.rnplus.nl
...I am waiting for OLV to have some kind of plugin API...
It's the next thing on my To-Do list.

My mostly used plugin is custom notifier plugin which is irrelevant for OLV
Is it possible to integrate your plugin with OLV? The code that catches the notifications currently only catches the title of the notifications and it reacts to everything (including toasts). It would be great if you could help us.
 

tazzix

Senior Member
Nov 12, 2005
119
17
0
Karachi
tazzix.com
It's the next thing on my To-Do list.


Is it possible to integrate your plugin with OLV? The code that catches the notifications currently only catches the title of the notifications and it reacts to everything (including toasts). It would be great if you could help us.

Sorry for the confusion, I am not the developer of CustomNotifier, but its the plugin I use the most. Still I am an Android developer, I already cloned the repository and was reading parts of it to understand how it works.

Now that I know a specific problem you are facing, I would look into it and try to help with this effort as much as possible. I see that most notification related applications (LED color changers, etc.) use Accessibility services because that way you get to know about all notifications and probably is the only way, but the downside is that Accessibility was designed to facilitate people with disabilities and hence will get all sorts of information. I will try to see what work arounds are possible.



EDIT:

Got some interesting code from RemoteDroid:

public static NotificationType getNotificationType(Context context){
String mode = getPref(context).getString(KEY_NOTIFICATION_TYPE, "a");
if(mode.equals("a"))
return NotificationType.ALL;
else if(mode.equals("n"))
return NotificationType.STATUSBAR;
else
return NotificationType.TOAST;
}

Then used in the service code here: http://remoteroid.googlecode.com/sv...roid/service/NotificationReceiverService.java
 
Last edited:

GottZ

Senior Member
Sep 20, 2008
170
123
0
32
Cologne
gottz.de
Analog Clock Project:

i've reduced the info array from 888 byte to 592 byte wich results in 495 byte through bit shifting and removing unrequired data.

so now all the 16 images for hour and minute take 2033 byte in total thats 66.875% through simple bit shifting.


thats my testcode to extract image data for an image:

Code:
#include "aclock.h"
#include <stdio.h>
#include <stdlib.h>

unsigned char bit_read (unsigned int pos, unsigned char bits, unsigned char mask, unsigned char* data) {
	unsigned char* c = data +pos *bits /8;
	unsigned char shift = 16 -bits -(pos *bits %8);
	if (shift < 8) return (c[0] << 8 | c[1]) >> shift & mask;
	else return c[0] >> (shift -8) & mask;
};

int main (void) {
	unsigned char line;
	unsigned char offy, startx, endx;
	
	unsigned int pos = 0;
	
	for (line = 0; line < aclock_info_0_lines; line++) {
		offy = aclock_info_0_starty + line;
		startx = bit_read(line *2, 6, 0x3f, aclock_info_0) + aclock_info_0_offset;
		endx = bit_read(line *2 +1, 6, 0x3f, aclock_info_0) + aclock_info_0_offset;
		printf("off: %d, start: %d, end: %d\ndata: ", offy, startx, endx);
		for (i = startx; i < endx; i++) {
			printf("%d ", bit_read(pos++, 5, 0x1f, aclock_data_0));
		}
		printf("\n");
		
	}
};

this magic works like a charm.

if you want to know how i generated the data simply look up this: https://dl.dropbox.com/u/4451890/static/liveview/201301012305.htm

it requires an browser that supports canvas. overall i prefer webkit based browsers so if something does not work switch to chrome xD

todo:
background image to data convertion
integrating it into the firmware and optimizing code for speed and size.
 
Last edited:

GottZ

Senior Member
Sep 20, 2008
170
123
0
32
Cologne
gottz.de

i will post the source as soon as i have the background image inside.

still this is my goal:
201212261638.png

but i might increase the size of it.
 

Cptnodegard

Senior Member
Nov 24, 2011
484
178
0
Great work so far. Got a LiveView that's literally just collecting dust.

Anyways, has anyone thought about a Tasker plugin for OLV? Seems to me to be the simplest way to get more functionality in there

For instance, I'd like to incorporate this with my Tasker based todo list, so that it send me my shopping list when I leave the house. Right now it "only" puts it on my lock screen. This was/is possible through stock LiveView by using the open watch plugin, but it wasn't great. I can technically do it right now, by simply making it create notifications, but being able to send Notes via Tasker would be epic
 
Last edited:

GottZ

Senior Member
Sep 20, 2008
170
123
0
32
Cologne
gottz.de
Great work so far. Got a LiveView that's literally just collecting dust.

Anyways, has anyone thought about a Tasker plugin for OLV? Seems to me to be the simplest way to get more functionality in there

what actions for?

using tasker or automateit to push android notifications could do that stuff too without implementing it in olv
 

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