Monday, August 11, 2014

mibox install/uninstall apps

./adb install <-r> blablabla

./adb shell
pm list packages|grep <your app keyword>

./adb shell am start -a android.intent.action.DELETE -d package:<your package name>

Sunday, August 3, 2014

msysgit ssh mintty hang when password required

It works find in windows cmd, but not in mintty. I change the following config.
git config --global core.askpass "git-gui--askpass"

This workaround makes git-gui prompt.

Tuesday, July 15, 2014

google play services kill battery

Setting -> privacy -> privacy guard -> setting -> show built-in apps -> long press google play services -> deny keep awake

It saves my battery.

evo 3d cdma switch between stock and custom roms

Assume you have your phone  unlocked and s-off on it.

Back to stock

Get imgs here, http://forum.xda-developers.com/showthread.php?t=1447839.

(hboot 1.40 one is broken, won't unzip, 1.58 one works fine)

relock your phone.(you need driver in window. I just use linux as everything works out of box)

adb reboot bootloader
fastboot oem lock
adb reboot bootloader (shows relocked)
put your PG86IMG.zip at the root of your sd card. Let it update.
adb reboot bootloader
fastboot flash unlocktoken Unlock_code.bin

stock kernel needs hboot 1.58, custom ones need hboot <= 1.4.

flash custom roms
flash hboot first, using PG86IMG.zip with hboot only in it.
reboot to recovery, flash roms.

kindle fire hd 7 custom recovery

1 root "Root_with_Restore_by_Bin4ry_v33"
2 flash recovery with  "Fire Flash"

No factory cable required, but you might need it in case.

google now launcher on kindle fire hd 7 with cm11

I installed google now launcher from play. It kept asking for newer version of google search, but my search is up to date. Googled a lot, and found a work around. Some steps may not be necessary, but they worked for me.

remove google search apk form system, uninstall google now launch, install nova, uninstall cm11 default txxxxx launcher

reboot

install google now launcher

reboot

install google search

reboot

load google now launcher, ask for newer search again. load google search. uninstall google now launcher. re-install google now launch.

Then, it works.

Monday, June 23, 2014

VTK python object garbage collection

VTK use smart pointer to handle objects in c++. It is garbage collection in python. All the objects will be unavailable out of scope unless you keep ref count on them.

I return those objects in functions. So far, it works for me.

All the regular objects in vtk module work. But I also use vtk.util.numpy_support for the conversion between numpy data and vtk data. I have to use deep = True to make a deep copy. Otherwise, numpy arrays are garbage collected out of the scope.