Saturday, January 17, 2015

Lenovo A806 ROM flash readback

The phone arrived from China with a buggy altered firmware:
Hardware : MT6592
Model : Lenovo A806
Build number : VIBEUI_V2.0_9432_ST_A806
Build date UTC : 20140807-112632
Android  v : 4.4.2
Baseband v: A806.V30, 2014/07/31 14:53
Kernel v : 3.4.67 (buildslave@xmws58) (gcc version 4.7 (GCC) ) #1 SMP  Thu Aug 7 19:24:27 CST 2014


To backup the original firmware you need:

1) Preloader driver for MTK
2) MTK droid tools
3) SP flash tool

Backup process:
1) Get scatter file with MTK droid tool and phone switched on, debugging enabled
2) Eject the cable, power off the phone, eject the battery
3) Open SP flash tool, select the scatter file, go to the "Readback" tab, add new, put the number from the "Cache" partition start into the "Size" field.
4) Press "start readback", insert the battery, attach the cable.

I got a 1.4GB ROM file in 32 minutes.

http://www.theandroidhow.com/2014/05/how-to-backup-rom-dump-mtk-android.html
http://forum.xda-developers.com/showpost.php?p=44509214&postcount=407

Sunday, December 14, 2014

Genius G-Pen 560 on Xubuntu 14.10 via Aiptek driver

install xorg-server-aiptek driver.

create a settings file:

sudo vim /usr/share/X11/xorg.conf.d/70-aiptekmy.conf

Section "InputClass"                                                           
    Identifier "pen"                                                           
    MatchProduct "Aiptek|AIPTEK|aiptek"                                        
    MatchDevicePath "/dev/input/event*"                                        
    Driver "aiptek"                                                            
    Option "SendCoreEvents" "true"                                             
    Option "USB" "on"                                                          
    Option "Type" "stylus"                                                     
    Option "Mode" "absolute"                                                   
    Option "zMin" "0"                                                          
    Option "zMax" "1023"                                                       
EndSection

Saturday, August 30, 2014

Genius G-Pen 560 under Debian 7.6

Download https://launchpad.net/wizardpen sources.
in the README file there are instructions to install dependencies.
Do ./configure, sudo make install.

edit /usr/share/X11/xorg.conf.d/70-wizardpen.conf

Section "InputClass"
   Identifier "wizardpen"
   MatchIsTablet "on"
   MatchDevicePath "/dev/input/event*"
   MatchTag "wizardpen"
   Driver "wizardpen"
   Option               "TopX"          "185"
   Option               "TopY"          "372"
   Option               "BottomX"       "11811"
   Option               "BottomY"       "8793"
   Option               "TopZ"          "32"
EndSection

Restart and enjoy!

Wednesday, July 16, 2014

Opengl 2d

https://www.mapbox.com/blog/drawing-antialiased-lines/

Monday, October 14, 2013

Scheme as embeddable language for C

Tried guile 2.0.9, tinyScheme, chibi-scheme and lua 5.2.

On MacOSX 10.8.5 memory footprint of default interpreter is:

guile 12.4 MB,
tinyScheme 984 KB,
chibi-scheme 2.7 MB,
lua 760 KB.

Executing 'hello world' with 'time' takes:

time guile -c '(display "hello, world!\n")' --- real 0m0.027s
time ./scheme -c '(display "hello, world!\n")' --- real 0m0.007s
time ./chibi-scheme -e '(display "hello, world!\n")' --- real 0m0.046s
 time lua -e 'print("hello, world!\n")' --- real 0m0.004s

 To sum up, for config files tiny-scheme or lua are perfect. Taking into account that lua is a full-featured language while tiny-scheme is a shrinked down one, lua is a clear winner.

Wednesday, September 4, 2013

Inkscape and lessons for 2d art.

Inkscape and lessons for 2d art. http://2dgameartforprogrammers.blogspot.com/

Saturday, June 22, 2013

What every programmer should know about memory

http://lwn.net/Articles/250967/ Software optimization resources http://www.agner.org/optimize/