顯示具有 「Android 學習專區」 標籤的文章。 顯示所有文章
顯示具有 「Android 學習專區」 標籤的文章。 顯示所有文章

2013-10-04

Android 上的 Firefox APP 爆發安全漏洞請盡速更新(含影片示範)

Android 上的 Firefox APP 爆發安全漏洞請盡速更新(含影片示範)


行動裝置安全分析研究員 Sebastián Guerrero 於 2013/9/30 在其 Twitter (https://twitter.com/0xroot) 上指出,新發現在 Android 的 Firefox 漏洞,這個漏洞將允許攻擊者可以自由瀏覽 SD 卡的內容和瀏覽器內隱私資料。

當攻擊生效時,被駭的使用者可能被偷裝一些惡意APP或者開啟具有惡意 Javascript 的HTML檔案。

該漏洞已經提交給 Mozilla 並且在最新的一次更新(v24)已經修復漏洞。

所以還未將 Android 上的 Firefox APP 更新至 v24 版的使用者動作要加快了。



轉載自《網路攻防戰》

2013-09-27

Android WebView exploit 的漏洞示範

Android WebView exploit 的漏洞示範

在 Android 的 SDK 中封裝了 WebView 控制項。在程序中載入 WebView 控制項,主要用於設置屬性(顏色,字體等)。

而在 WebView 下有一個非常特殊的函數 addJavascriptInterface (Object object, String name) method 能實現 Java 和 JavaScript 之間的交互作用,因此可以利用 addJavascriptInterface 這個函數來實做透過 WebView 安裝惡意程式藉此控制 Android 手持式裝置。

在原文的範例中使用具有漏洞的應用程式,需具有 SMS 權限(android.permission.SEND_SMS),並利用惡意的 JavaScript 來發送詐騙的SMS簡訊。





























原文出處:http://blogs.avg.com/mobile-2/analyzing-android-webview-exploit/
轉載自《網路攻防戰》

2013-07-31

Android 編譯時遇到 LOCAL_MODULE_TAGS 的錯誤

Android 編譯時遇到 LOCAL_MODULE_TAGS 的錯誤


編譯時載入模組有時會出現錯誤.....

如果在編譯時出現下列訊息:

build/core/base_rules.mk:74: *** Module name: 01-test
build/core/base_rules.mk:75: *** Makefile location: external/dhcpcd

build/core/base_rules.mk:76: *
build/core/base_rules.mk:77: * Each module must use a LOCAL_MODULE_TAGS in its
build/core/base_rules.mk:78: * Android.mk. Possible tags declared by a module:
build/core/base_rules.mk:79: *
build/core/base_rules.mk:80: * optional, debug, eng, tests, samples
build/core/base_rules.mk:81: *
build/core/base_rules.mk:82: * If the module is expected to be in all builds
build/core/base_rules.mk:83: * of a product, then it should use the
build/core/base_rules.mk:84: * "optional" tag:
build/core/base_rules.mk:85: *
build/core/base_rules.mk:86: * Add "LOCAL_MODULE_TAGS := optional" in the
build/core/base_rules.mk:87: * Android.mk for the affected module, and add
build/core/base_rules.mk:88: * the LOCAL_MODULE value for that component
build/core/base_rules.mk:89: * into the PRODUCT_PACKAGES section of product
build/core/base_rules.mk:90: * makefile(s) where it's necessary, if
build/core/base_rules.mk:91: * appropriate.
build/core/base_rules.mk:92: *
build/core/base_rules.mk:93: * If the component should be in EVERY build of ALL
build/core/base_rules.mk:94: * products, then add its LOCAL_MODULE value to the
build/core/base_rules.mk:95: * PRODUCT_PACKAGES section of
build/core/base_rules.mk:96: * build/target/product/core.mk
build/core/base_rules.mk:97: *
build/core/base_rules.mk:98: *** user tag detected on new module - user tags are only supported on legacy modules. Stop.

只需要看第二行 『Makefile location: external/dhcpcd』 的 external/dhcpcd 路徑下,
修改 Android.mk ,
找到第一行的 『Module name: 01-test』的 LOCAL_MODULE := 01-test,
在下面加入 LOCAL_MODULE_TAGS := optional 即可

或是
有找到 LOCAL_MODULE_TAGS := user 的話
改成 LOCAL_MODULE_TAGS := optional

2013-07-29

Eclipse Import Existing Projects into workspace

Eclipse Import Existing Projects into workspace


I've been using Eclipse for many years, originally with JAVA and for the last few years with Flex.  We have one project that has around 20 projects in it since it uses a lot of modules and different developers work on different modules.  We use eclipse work spaces extensively since we use linked resources to define paths so that the project files can be shared by developers regardless of where they put the source code and regardless of them being on the OSX or Windows.

This has worked well for years but whenever we setup a new machine its a bear since you have to import around 20 projects, one after the other..... until now.

It appears I'm a fool, and have never noticed this wonderful feature in eclipse hidden away on the the import -> other menu.

Lets suppose I have all my projects under

clientname/trunk/project1

clientname/trunk/project2

clientname/trunk/project3

etc..

Instead of importing those projects one at a time, however, instead you can do

File - > Import - > Other -> General - > Import existing projects into workspace


Then I browse to

clientname/trunk

The dialog then populates with all the projects it finds under the trunk folder and child folders.

Check the projects you want and click "ok", and now all those projects are imported into your workspace.

Wish I'd known this feature was available about 2 years ago :)  But its great to learn something new.


2013-07-11

Android ADT 出現 :Could not open: AVD

Android ADT 出現 :Could not open: AVD


最近
Win 8 一次當機後系統一整個用起來怪怪的﹐開應用程式變慢﹑連網也變慢﹐有時網頁要下載檔案也失敗﹐拿另一台Win 8 卻沒這個問題﹐想來系統應該是有些問題﹐不過懶得探究是什麼原因﹐還是整個系統重裝吧﹐反正之前為了測試一些東西﹐許多程式東裝西裝的﹐系統早就很凌亂了。


作業系統重新安裝最痛苦的是在於許多軟體也要跟著重新安裝﹐環境重新設定。這次在重新安裝android的開發環境時﹐一切都順利﹐不過在啟動模擬器時碰到了一個以前不曾遇過的問題﹐出現了PANIC: Could not open: AVD 的錯誤。


















上網查了一下﹐解決的方式很簡單﹐不過在過去安裝時並沒有這個問題﹐是不是Google 在新版中有做了什麼變更嗎?

首先﹐原因是 Windows系統對使用者的profile放置的位置是 C:\Users\使用者帳號名稱﹐然而有些人會將位置移至不同的地方﹐以我自已為例就是移到 E:\Users\使用者帳號名稱﹐通常這麼做是為了未來重新安裝作業系統時比較不會不小心將一些重要的東西刪除了。

PANIC: Could not open: AVD 就是找不到AVD 所以無法開啟﹐然而從畫面根本不會想到是這個原因。

在AVD Manager的畫面所呈現的跟徑是對的﹐但事實上就是不會到這個路徑去找到ADV檔。















解決的方法很簡單﹐只要在環境變數中加上 ANDROID_SDK_HOME 的設定就可以了























加上之後 AVD Manager 必須重新開啟﹐如果 AVD Manager 是由 eclipse 上的工具列圖示所開啟的﹐則連 eclipse 都要重新開啟才行。