» 2013 » February の記事

openssl sha1 [full path to file]

 

~ ALC 888 and ALC 1200 with VoodooHDA ~

connie 2013.02.13 | Mac OSX | | No Comments

VoodooHDA 有時會同nvidia 等display card 的hdmi audio out 撞左

VoodooHDA 會以為display card 個張先係main audio card

以下方法可以解決問題

[1]先確定graphic card 安裝成功,無有問題

到system report.. Hardware>graphics/Displays check 一下graphic card 的vendeor id and device id

Screen Shot 2013-02-13 at 8.12.10 PM

 

先到 /system/library/extensions 找VoodooHDA.kext

右click show package content 入到去folder 改以下 file ./contents/Info.plist

<key>IOMatchCategory</key>
<string>VoodooHDADevice</string>

在這code 下加入vendeor id and device id for skipping

<key>VoodooHDAVidSkip</key>
<string>0x10de</string>
<key>VoodooHDADivSkip</key>
<string>0x1244</string>

之後clear caches

sudo -i
cd /system/library/Caches 
rm -r com.apple.kext.caches

 

   

Apache cordova 前身係phonega, 用來將HTML5 + jQuery web apps 變成native apps 用的

本文將記錄如何setting 及製作native android apps

[1]initiation

[1]ADT bundle for windows

先到http://developer.android.com/sdk/index.html

ADT bundle for windows or MAC, 已經包括了Eclipse 同android sdk , download 爆開佢就完成。

double Click 就可以用。

[2]apache cordova

是次主角, 先到http://phonegap.com/download/ ,下載後爆開佢備用

[2]Create project

-入到Eclipse , create new porject, FIle>new Android Application Project

01

-Application Name 最好upper case

02

-Next

03

-Next

04

-Next

05

-Next

06

-Finish

[3]Copy File to the Project

去返之前爆開個file 個folder , phonegap-2.3.0\lib\android

  1. 將cordova-2.3.0.jar 抄去eclipse project 既/libs 內
  2. Create a new folder in eclipse project 的assets,named "www",  再將cordova-2.3.0.js 抄去eclipse project 既/assets/www 內

07

-之後右Click /libs/cordova-2.3.0.jar , 將這個library 加入去尼個project 到 Build Path>Add to Buld Path

08

-之後將所有webapps file 抄去 assets/www 內,注意不可以有server side script(php/asp/jsp) , 只support js , html

[4]Edit src/MainActivity

  1. 先加入此句 import org.apache.cordova.DroidGap;
  2. 刪除這句import android.app.Activity;
  3. public class MainActivity extends Activity { 改成 public class MainActivity extends DroidGap {
  4. protected void onCreate(Bundle savedInstanceState) { 改成 public void onCreate(Bundle savedInstanceState) {
  5. setContentView(R.layout.activity_main); 改成 super.loadUrl("file:///android_asset/www/examples/01-default.html");

This is before

09

This is After

10 

-通常會係super.loadUrl("fileL///android_asset/www/index.html")

[5]edit rights for apps

最後修改apps之權限

-到eclipse project 既androidManifest.xml 右click >open with > text editor

11

[A]搵以下的code

android:versionCode="1"
android:versionName="1.0" >

加入以下的code

<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"
android:anyDensity="true"
/>
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

[B]再找以下的code

android:name="hk.connie.webapps.MainActivity"
android:label="@string/app_name" >

改成

android:name="hk.connie.webapps.MainActivity"
android:label="@string/app_name" 
android:configChanges="orientation|keyboardHidden">

完成

 

首先download unibeast 1.7.0(SH1:f304ad812a6dc66037038673132b590fb9aabf9d (app)|fa373a007b624506154d00ce23fd3d1a026b029e (zip))

http://www.tonymacx86.com/downloads.php

以及用你的方法 download InstallESD.dmg(mountain Lion) 🙂 , mount installESD.dmg(SH1 HASH : e5dd2bf5560033cade7dd7d7da5ceec49f701b0e)

Screen Shot 2013-02-03 at 4.12.26 PM

之後將install OS X mountain Lion.app 抄去 /Applications

Screen Shot 2013-02-03 at 4.15.12 PM

之後右click select Show Package Contents

入去Contents, create 新folder "SharedSupport" ,將InstallESD.dmg抄入去,聞說要unmount 左InstallESD.dmg先

之後到applications folder 按cmd+shift+u 開terminal 輸入以下東東

cd /Applications/
cd "Install OS X Mountain Lion.app"
mkdir -p "_MASReceipt"
echo -e '\000com.apple.InstallAssistant.MountainLion' > _MASReceipt/receipt

下一部係修改unibeast app

unibeast抄到desktop

到terminal 輸入以下東東,請改左個username 去= =

pkgutil --expand /Users/<username>/Desktop/UniBeast\ -\ Mountain\ Lion\ 1.7.0.pkg UniTemp

之後desktop 會多左個Unitemp folder

double click 會見到dsmos.pkg , 右click select Show Package Contents

Screen Shot 2013-02-03 at 4.30.07 PM

有個folder 叫scripts , 入面有個叫preinstall file , 用any kind of code editor 開佢( 小妹用TextWrangler )

Screen Shot 2013-02-03 at 4.32.17 PM

將以下的code delete

if [ "$(file -b /Applications/Install\ OS\ X\ Mountain\ Lion.app/Contents/_MASReceipt/receipt)" != 'data' ]; then
	echo " "
	echo "No MAS receipt found, exiting";
	echo " "
	exit 1
fi

if [ "$(md5 -q /Applications/Install\ OS\ X\ Mountain\ Lion.app/Contents/_MASReceipt/receipt)" = 'f4747dbc07df72ad92a84186e2b5488d' ]; then
	echo " "
	echo "User created MAS receipt found, exiting";
	echo " "
	exit 1
fi

if [ "$(stat -f%z /Applications/Install\ OS\ X\ Mountain\ Lion.app/Contents/_MASReceipt/receipt)" -lt 4600 ]; then
	echo " "
	echo "MAS receipt too small, exiting";
	echo " "
	exit 1
fi

if ! grep -q com.apple.InstallAssistant.MountainLion /Applications/Install\ OS\ X\ Mountain\ Lion.app/Contents/_MASReceipt/receipt ;then
	echo " "
	echo "Wrong MAS receipt found, exiting";
	echo " "
	exit 1
else
	cp /Applications/Install\ OS\ X\ Mountain\ Lion.app/Contents/_MASReceipt/receipt "${3}/.receipt"
fi

save 完之後返去terminal pack返個pkg, 

pkgutil --flatten UniTemp Unibeast_Fixed.pkg

下一部係準備usb 

到/Applications/Utilities/Disk Utility

1

按partition

  • Partition : choose 1 Partition
  • option : choose MBR
  • Format : Mac OS Extended (Journaled)

Apply , 等佢format

之後到Finder 右手邊right click usb drive to get infoScreen Shot 2013-02-03 at 4.39.54 PM

premission setting 改做如下

Screen Shot 2013-02-03 at 4.42.01 PM

double click Unibeast_Fixed.pkg  就可以install 了

 

| HOME |

Smiley face

February 2013
S M T W T F S
 12
3456789
10111213141516
17181920212223
2425262728