[Android]關於手機 Galaxy Nexus Root 在Mac OS上Root

由於要練習FireFox OS跟 Ubuntu OS於是還是做了點小投資買了一檯二手的Android Galaxy Nexus來刷
(由於在FFOS 與 Ubuntu OS 的device list找到比較便宜與容易購買的就是這個)

使用心得:
由於我自己習慣使用iPhone跟設計iPhone的App,其實很不習慣Android的“上一頁”實體按鍵.不過多使用幾次之後其實也還好了. 也發現Android沒有iOS的一些方便的功能如下:

  • Tab bar: 也就是下方的Tab按鍵,這是Android App RD要花心思去搞定的.

  • Storyboard: Android 使用Activity設計概念並且用Intent來溝通,但是沒有StoryBoard的階層觀念.

其他細節等到我其它文章再寫..

 

關於Root 手機

  • 打開Development mode. [開發人員選項]

    • 打開[設定] -> [關於手機] -> 選到[版本號碼] ( 大概點個七下) 啓動  (這是什麼怪東西?)
  • 進入 [設定]->[開發人員選項]-> [USB 偵錯]  啓動

  • 要Root 前,必須要先解開Boot loader lock的限制才能夠Root

  • 解開後,手機的OS會重灌

  • 一樣的步驟

    • 進入 [設定]->[開發人員選項]-> [USB 偵錯]  啓動

    • 進入 [FASTBOOT Mode] 

  • 下載 [Root kit] http://downloadandroidfiles.org/download-updated-galaxynexusroot-gsm-verizon-sprint-zip/

    • 執行先解開 [Boot Loader Lock]

    • 開機 -> 設定 -> USB 偵錯

    • 按下enter繼續跑

    • 選擇(1)  GSM ClockworkMod Recovery (Version 6.0.2.3)

    • 利用 [音量鍵] 改到 [Recovery mode] -> 電源鍵執行

    • 選擇 install from SD card 

    • 安裝位於 目錄 0/UPDATE-SuperSU-v1.45.zip

    • 安裝跑完最後選擇No

    • 重開機

  • 開機完 看到應用程式裡面有 [SuperSU] 代表你Root 成功.

參考資料:

Evernote SDK (2) with Android 2014/01/16

Slide: http://goo.gl/RPbGVn

 

About Evernote SDK API trick or experience discussion: (for iOS/Android.)

Note for Google Develop Group Taipei 2014/01/15- Google Cloud Platform, Google Compute Engine

Google Cloud Platform

  • Slide:

  • What  is google cloud platform

    • Using google storage 

    • Goole bandwidth 

    • Cloud encapsulation 

  • Cloud Platform:

    • Cloud SQL

    • it is MySQL 5.5

    • Cloud Datastore

    • NoSQL (Non-Relationshop SQL) storage. Much faster than normally SQL.

    • Cloud Storage:

    • Protection, similar with Google Drive

    • GAE

    • It much better performance for now.
  • Full Functional Service

    • feature:

    • Scalable 

    • Normally

    • LAMP

    • Apache2 (three apache )with one  DB.

    • Master/Slave DB mapping with Apache2.
  • PaaS (Platform as a Service)

  • GAE (Google App Engine)

    • Language:

    • PHP,JAVA, Python

    • GO: (New language), refer https://developers.google.com/appengine/docs/go/gettingstarted/helloworld

    • Communication:

    • Channel:

      • Using Web socket
    • Mail:

      • Using specific mail alias to pass some email to GAE to parsing.
    • XMPP:

      • message like Facebook and google talk.
    • Outbound socket

      • Only outbound could pass socket to another service from GAE.
    • Process manager:

    • Cron Job: Similar with Crontab.

    • Computation:

    • Image API: For image resizing or scaling.

    • Map-reduce: Like OpenCL or multiple threading.

    • Application:

    • Big Query:

      • Terabyte data analysis 

      • SQL-like

Google Compute Engine:

  • IaaS (Infrastructure as a Service) — all related could be plug as component to add/remove.

    • Instance—  You could create VM via compute engine for this. [Speed]

    • Similar with MSFT Azure setting but faster and support command line.

    • Persistent Disc— PD [Storage]

    • only 1 for R/W. multiple only support read only.

    • Bound by Zone.

    • Security base on AES-128.

    • Networking— It about communication speed.

    • Block port SMTP(port 25) and block SMTP on SSL.

    • No matter your instance is in US or Euro it also could 

    • API

    • JSON, OAuth2, RESTful.
  • Why using Google Compute Engine:

    • Speed

    • Scale

    • The computing power could be change or scale it up according to your request.

      • Using an agent which create by GAE and it could monitor current status

      • And run CLI if working flow is archive the boundary. (Add VM or Add PD).

    • Global footprint:

    • you could easily to expend your business to whole world.s
  • Google has world record about transfer 1TB data and compute it done within 55 sec.

  • Out side is open API outbound, but it could has its own storage, service, internet. All working on API.

  • Every charge is by request:

    • Every request has its own storage and internet transfer.
  • Zone different management:

    • It could be separate to different zone to manage your service.

[Android]學習心得 (1) - 環境設定與EvernoteSDK

記錄一下,本來是寫英文後來還是決定改成中文的

  • 我的環境:

    • MBA (Mac Book Air 2012 Ivy-Bridge) with 8G Ram, 128G SSD.
  • 環境設定與準備:

    • 主要有兩種方向可以給Android開發者,我兩種都有試試看來決定最容易與方便使用的IDE.

    • Eclipse with ADT (Android Development Tool)

      • 最常使用的開發環境,設定算簡單,不過個人覺得界面使用起來總是哪裡怪怪的,可能因為Eclipse本身屬於開放式架構的關係.

      • 下載 http://developer.android.com/sdk/index.html

    • Android Studio

      • 2013年發佈的Android Studio,我覺得開發新的應該會很棒.不過似乎在打開一些舊的檔案會因為檔案架構的原因出現一些問題.

      • 這個部分對於剛開始學習開發得人是比較麻煩的,可能要等後面版本在修改得時候看看能不能解決得好.

  • Android 模擬器 – AVD (Android Virtual Device)

    • AVD 就是一個Android的模擬器可以來執行你的程式.

    • Android Development Tool所提供的模擬器,其實相當不好用.我發生以下的一些問題:.

      • 啟動這個ADT的模擬器(AVD)時間相當的久.在我的環境裡面大概需要3~5分鐘才能夠開完Android的模擬器.更別說把App部署(deploy)到模擬器上面,當然如果要debug那就更殘忍了.

      • 可能是因為需要太多的系統資源,所以常常在編輯過後要重新部署的時候都容易發生錯誤.

    • 利用虛擬機器 Virtual Box所執行的模擬器  Genymotion 

  • 關於Evernote SDK in Android:

    • 這篇文章是官方的文章,其實可以很快地建立出Evernote的程式 http://www.evernoteapi.com/tagged/android

    • 除了裡面的範例程式之外,其實只剩下一些需要注意的地方

    • Evernote API key 申請

      • 可以去這裡申請 (http://dev.evernote.com/doc/) 不過要注意的是裡面的API 是對應另外一台伺服器的帳號 (Sandbox.evernote.com).跟你所平時在用的並不相同,除非你有寄出Production Server的申請

      • 由於是Sandbox的伺服器上面,所以你可能需要另外在這個伺服器上面去註冊你的帳號(Evernote的帳號)才能用你在Sandbox的API Key去存取他.

    • 申請好之後其實很快速就可以寫出一個login與logou的範例程式.

    • 關於Login/Logout的部分:

      • 不過這邊還有一個可以註記一下的是由於登入Login 是透過OAuth的方式來登入,所以App會離開後然後再度回來,在這裡要注意到的是會由 OnResume回來

      • 但是Logout卻不會遇到這樣的狀況.這是可以注意的.

 

接下來應該要努力嘗試 Android Development Tool with Eclipse 的程式 porting 到 Android Studio了…

[Parallel Programming][C++AMP] Survey summary

Basic requirement:

  • VS2012 runtime

  • DX11 runtime

  • Use test program “VerifyAmpDevices” to verify it

Advantage:

  • Compatible with any GPU which could run DX11 with one EXE.

    • NVIDIA GPUs

    • AMD GPUs (and APUs)

    • Intel GPUs (Ivy Bridge and later)

    • ARM GPUs from various IHVs (soon, e.g. see Mali design)

  • Could use Visual Studio IDE for GPU threading debugging

  • Could use Visual Studio IDE for GPU profiling

  • Base on C++ and STL

Performance Comparison: (refer here)

**
** Video Clip:

Code Resource:

[OpenCL] Some survey summary about OpenCL

  • Related code survey found:

    • Debugging in Intel is easy refer Using the Intel® OpenCL SDK Debugger

      • Add file path when you build cl program

        • Note: Must using original path not copy path.

          • EX: If you copy your CL file in post build process, need add original path not debugging CL code path.
        • Note: Path need full path

      • Enable Intel OpenCL SDK debugging in toolIntel SDK

        • Note: Work item set 0,0,0 as default is enough.
  • OpenCL kernel need warm up

    • Run any other kernel code first (even not the same application), it will speed up your major CL kernel code

    • AMD’s magic number is to run “twice” on dump kernel

      • Testing result: (SW/CPU 160ms)

        • Intel:

          • 1st time setup 700ms, effect 160
        • AMD:

          • 1st time

            • setup 6000ms

            • effect 16ms

          • 2nd time

            • setup 160ms

            • effect 16ms  (it might goes to 0ms some time)

      • It could be reduce time to pre-load *.cl file but no way to not reduce clBuildProgram. (Program will cache result as previous one, even you reset twice the argument.

      • Run two times the same kernel code:

        • After second time, (no matter the same program or not) the CL kernel will cache it and very fast.

        • Run second time, the CL setup code will faster the first time (Found on AMD GPU)

        • Note: IVB don’t have such issue.

  • Refer: