예전엔 그냥 따라하기로 뭔지도 모르고 구현했는데
이번에 제대로 공부하게 된듯 하다.
근데 제대로 공부한거 맞나...;;;
찾은 사이트는 여기!!!
$ mkdir ~/bin
$ PATH=~/bin:$PATH
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
repo init -u https://android.googlesource.com/platform/manifest
| sudo vi /etc/network/interfaces ---------------------------------------------------------------------------------- # and how to activate them. For more information, see interfaces(5). # The loopback network interface auto lo iface lo inet loopback # The primary network interface auto eth0 #iface eth0 inet dhcp iface eth0 inet static address 192.168.0.71 gateway 192.168.0.1 netmask 255.255.255.0 dns-nameservers 168.126.63.1 168.126.63.2 ---------------------------------------------------------------------------------- 아래 실행하여 변경 내용 반영 sudo /etc/init.d/networking restart 2. SSH설정 sudo apt-get install openssh-server sudo /etc/init.d/ssh restart sudo vi /etc/hosts.allow |
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:text="android-er.blogspot.com"
android:autoLink="web"
/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Android CPU Info.:"
/>
<TextView
android:id="@+id/CPUinfo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
</LinearLayout>
package com.systemworks.CPUType;
import! java.io.IOException;
import! java.io.InputStream;
import! android.app.Activity;
import! android.os.Bundle;
import! android.widget.TextView;
public class CPUTypeActivityextends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView strCpuInfo = (TextView)findViewById(R.id.CPUinfo);
strCpuInfo.setText(ReadCPUInfo());
}
private String ReadCPUinfo()
{
ProcessBuilder cmd;
String result="";
try{
String[] args = {"/system/bin/cat", "/proc/cpuinfo"};
cmd = new ProcessBuilder(args);
Process process = cmd.start();
InputStream in = process.getInputStream();
byte[] re = new byte[1024];
while(in.read(re) != -1){
System.out.println(new String(re));
result = result + new String(re);
}
in.close();
} catch(IOException ex){
ex.printStackTrace();
}
return result;
}
}
한빛미디어 <나는 리뷰어다> 활동을 위해서 책을 제공받아 작성된 서평입니다. 올해의 마지막 서평이다. 무엇이 1등 팀을 만드는가.... 시작하기에 앞서 제목이 과하지 않은가 하는 생각이 든다. 1등 팀이라....예전 어느 개그 프로에서 ...