$ adb pada Sony Experia M2

Use adb tool to do something you can not do from phone directly.

Kunci pencarian: “sony experia m2 delete whats new app from adb

Seperti sudah kita tahu, salah satu tools untuk melakukan kontrol terhadap Android adalah adb. Biasanya koneksi adb via usb di HP harus diaktifkan dulu pada menu Settings > About > Build Number , klik sekian kali (5 atau 7) sampai muncul kira2, “you are developer now”. Setelah itu akan muncul menu baru Settings > Developer options  aktifkan USB debugging , ketikkan $ adb logcat di terminal maka aktifitas hp akan dikirim ke PC.

Pada M2 ada aplikasi yang tidak bisa didelete dari Android, untuk melakukan disable/remove bisa dilakukan dengan command :

ok@X456:~$ adb shell
shell@D2302:/ $ pm block com.sonymobile.advancedwidget.entrance
Package com.sonymobile.advancedwidget.entrance new blocked state: true

Reboot. Done.

Untuk disable aplikasi lain ,  kunci pencarian: “adb shell pm

ok@X456:~$ adb shell pm list packages | grep blitz
package:com.blitz.blitzandap
ok@X456:~$ adb shell pm block com.blitz.blitzandapp
Package package:com.blitz.blitzandapp new blocked state: true

shell@D2302:/ $ pm uninstall -k com.blitz.blitzandapp
Success

shell@D2302:/ $ pm block com.google.android.youtube 
Package com.google.android.youtube new blocked state: true

Untuk lakukan backup folder, bisa dilakukan dengan

ok@X456:/data/android$ adb pull /storage/sdcard0/Pictures .
pull: building file list...
pull: /storage/sdcard0/Pictures/Screenshots/Screenshot_2017-12-25-20-48-57.png -> ./Screenshots/Screenshot_2017-12-25-20-48-57.png
pull: /storage/sdcard0/Pictures/Screenshots/Screenshot_2017-12-23-06-07-55.png -> ./Screenshots/Screenshot_2017-12-23-06-07-55.png

Terimakasih untuk:

https://talk.sonymobile.com/t5/Xperia-Z-ZL-ZR/Disable-remove-What-s-new-in-4-4-4/td-p/823607
http://adbshell.com/commands/adb-shell-pm-list-packages
https://stackoverflow.com/questions/12949609/adb-shell-command-to-make-android-package-uninstall-dialog-appear

Advertisements

Printing booklet, 2 side 2 sheet xubuntu 14

print_booklet-with-evince

Here is my python script to successfully print booklet.

  1. thanks to : http://askubuntu.com/questions/214538/printing-in-booklet-format

page = 8 # how many page do you have? minimum is 1
start = 35 # book start from page? 3-18, 19-34, 35-66
p = []
for i in range( page*4) :
  p.append( i+start )

l = (len( p ) / 4)
dl = len(p)-1
out = ""
for a in range( l ) :
out = out + str(p[dl-a*2]) + "," + str(p[a*2]) + "," + str(p[a*2+1]) + "," + str(p[dl-a*2-1]) +","

print out[:-1] # ommit last comma

# array to check wether that algorithm accurate
def confirm() :
  v4 = [ 4,1,2, 3 ]
  v8 = [ 8,1,2, 7, 6,3,4, 5 ] # booklet 8 pages, 2 sided, 2 sheet per page
  v16 = [16,1,2,15, 14,3,4,13, 12,5,6,11, 10,7,8,9 ]
  v32 = [32,1,2,31, 30,3,4,29, 28,5,6,27, 26,7,8,25, 24,9,10,23, 22,11,12,21, 20,13,14,19, 18,15,16,17]

  s8 = [ 1,2,3,4, 5,6,7,8 ] # sorted
  s16 = [ 1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16 ] # sorted
  s32 = [ 1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16, 17,18,19,20, 21,22,23,24, 25,26,27,28, 29,30,31,32 ] # sorted

Deconstruct the skill: on Video Processing

Bismillah.

Always start as simple as possible to feel confortable. For example you can implement correct h264 format in 30 lines. Then you can move to making video player on 1000 lines. If you want expand the app with SDL, tutorial also available.

Here are some usefull links for your journey:

https://trac.ffmpeg.org/wiki/CompilationGuide/CrossCompilingForWindows
http://ffmpeg.gusari.org/viewtopic.php?f=8&t=1663
http://superuser.com/questions/675876/ffmpeg-minimal-requirements-configuration-for-encoding-and-decoding-h264-files
https://www.ffmpeg.org/platform.html#Native-Windows-compilation-using-MinGW-or-MinGW_002dw64
https://ffmpeg.zeranoe.com/forum/viewtopic.php?t=1789
http://tech.yipp.ca/linux/how-to-statically-link-sdl-dll-into-your-application/
http://stackoverflow.com/questions/18805155/tdm-gcc-w64-script-to-change-windres-for-32bit
https://forums.libsdl.org/viewtopic.php?t=9667&sid=338f32cd7496c76e929558321ae63c38
https://drangertuts.wordpress.com/2011/05/07/introduction/
https://forums.libsdl.org/viewtopic.php?t=5278&sid=f3f11d4313b69575c57ec570a65f89d4

VC++6 : Mix C and C++ header rule

Its just my hypotesis . C++ need  “filename.h”  in header file while  C  can accept <filename.h>

How can we mix code that contain C and C++

My best solution until now is having 2 include file. One with <filename.h>  format and one with  “filename.h ” although

the content is exactly same

Any better idea?