접속하려는 곳의 RSA키가 변경되어 일어나는 문제(보통 서버의 리눅스가 재설치 될 경우)
아래와 같이 입력한 후 다시 접속하면 된다
ssh-keygen -R 서버IP
2013년 9월 29일 일요일
2013년 9월 25일 수요일
2013년 9월 24일 화요일
안드로이드 빌드
#!/bin/sh echo create R.java aapt package -m -J src/ -M AndroidManifest.xml -S res/ -I "/home/tkmaster/data/sdk/platforms/android-17/android.jar" echo compile R.java #javac -d bin/ -classpath bin/ -bootclasspath "/home/tkmaster/data/sdk/platforms/android-17/android.jar" src/exam/AndroidExam/AndroidExam.java javac -d bin/ -classpath bin/ -bootclasspath "/home/tkmaster/data/sdk/platforms/android-17/android.jar" src/exam/*/*.java #echo compile *.java #javac -d bin -classpath bin -bootclasspath "/home/tkmaster/data/sdk/platforms/android-17/android.jar" src/exam/AndroidExam/AndroidExam.java #javac -d bin -classpath bin -bootclasspath "/home/tkmaster/data/sdk/platforms/android-17/android.jar" src/exam/*/*.java echo convert .class to Dalvik JVM rm ./bin/*.apk #if apk file exist, error occured by zip problem dx --dex --output="./bin/classes.dex" --positions=lines "./bin" echo create .apk aapt package -f -M AndroidManifest.xml -S res/ -I "/home/tkmaster/data/sdk/platforms/android-17/android.jar" -F bin/AndroidExam.apk echo check package contents #aapt list bin/AndroidExam.apk echo create debug.apk using apkbuilder apkbuilder bin/AndroidExam-debug.apk -z bin/AndroidExam.apk -f bin/classes.dex -rf src -rj libs echo check package contents #aapt list bin/AndroidExam-debug.apk #echo sign apk #jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore bin/tk.keystore bin/tk-debug.apk tktest echo uninstall existed exam.AndroidExam package adb uninstall exam.AndroidExam echo install exam.AndroidExam package adb install bin/AndroidExam-debug.apk
2013년 9월 23일 월요일
안드로이드 리스트뷰 90도 회전
public class ListFlipper extends Activity {
private static final int DURATION = 1500;
private SeekBar mSeekBar;
private static final String[] LIST_STRINGS_EN = new String[] {
"One",
"Two",
"Three",
"Four",
"Five",
"Six"
};
private static final String[] LIST_STRINGS_FR = new String[] {
"Un",
"Deux",
"Trois",
"Quatre",
"Le Five",
"Six"
};
ListView mEnglishList;
ListView mFrenchList;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.rotating_list);
//FrameLayout container = (LinearLayout) findViewById(R.id.container);
mEnglishList = (ListView) findViewById(R.id.list_en);
mFrenchList = (ListView) findViewById(R.id.list_fr);
// Prepare the ListView
final ArrayAdapter adapterEn = new ArrayAdapter(this,
android.R.layout.simple_list_item_1, LIST_STRINGS_EN);
// Prepare the ListView
final ArrayAdapter adapterFr = new ArrayAdapter(this,
android.R.layout.simple_list_item_1, LIST_STRINGS_FR);
mEnglishList.setAdapter(adapterEn);
mFrenchList.setAdapter(adapterFr);
mFrenchList.setRotationY(-90f);
Button starter = (Button) findViewById(R.id.button);
starter.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
flipit();
}
});
}
private Interpolator accelerator = new AccelerateInterpolator();
private Interpolator decelerator = new DecelerateInterpolator();
private void flipit() {
final ListView visibleList;
final ListView invisibleList;
if (mEnglishList.getVisibility() == View.GONE) {
visibleList = mFrenchList;
invisibleList = mEnglishList;
} else {
invisibleList = mFrenchList;
visibleList = mEnglishList;
}
ObjectAnimator visToInvis = ObjectAnimator.ofFloat(visibleList, "rotationY", 0f, 90f);
visToInvis.setDuration(500);
visToInvis.setInterpolator(accelerator);
final ObjectAnimator invisToVis = ObjectAnimator.ofFloat(invisibleList, "rotationY",
-90f, 0f);
invisToVis.setDuration(500);
invisToVis.setInterpolator(decelerator);
visToInvis.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator anim) {
visibleList.setVisibility(View.GONE);
invisToVis.start();
invisibleList.setVisibility(View.VISIBLE);
}
});
visToInvis.start();
}
}
안드로이드 터치이벤트
public boolean onTouchEvent(MotionEvent event){
touchX = (int) event.getX();
touchY = (int) event.getY();
touchAction = event.getAction();
if (touchAction == MotionEvent.ACTION_MOVE){
// 드래그 처리
}
return true;
}
2013년 9월 12일 목요일
vim 설정하기
"--------------------------------------------------" " set private "--------------------------------------------------" set hlsearch "add block to a word searched set nu "show number syn on set ts=8 set sw=4 set sts=4 "--------------------------------------------------" " set basic variable "--------------------------------------------------" set cindent "들여쓰기 set smartindent set autoindent set nowrap set ff=unix set bg=dark set ruler "--------------------------------------------------" " set ctags database path "--------------------------------------------------" set tags=/home/master/linux/tags "--------------------------------------------------" " set cscope database path "--------------------------------------------------" set csprg=/usr/bin/cscope set csto=0 set cst set nocsverb cs add /home/master/linux/cscope.out /home/master/linux set csverb "--------------------------------------------------" " set Tag List "--------------------------------------------------" filetype on nmap:TlistToggle let Tlist_Ctags_Cmd = "/usr/bin/ctags" let Tlist_Inc_Winwidth = 0 let Tlist_Exit_OnlyWindow = 0 let Tlist_Auto_Open = 0 let Tlist_Use_Right_Window = 1 "--------------------------------------------------" " set Source Explorer "--------------------------------------------------" nmap :SrcExplToggle nmap h nmap j nmap k nmap l let g:SrcExpl_winHeight = 5 let g:SrcExpl_refreshTime = 100 let g:SrcExpl_jumpKey = " " let g:SrcExpl_gobackKey = " " let g:SrcExpl_isUpdateTags = 0 "--------------------------------------------------" " set NERD Tree "--------------------------------------------------" let NERDTreeWinPos = "left" nmap :NERDTreeToggle "--------------------------------------------------" " vim option " "--------------------------------------------------" if &t_Co > 2 || has("gui_running") syntax on colorscheme ko2 endif "--------------------------------------------------"
2013년 9월 10일 화요일
Handle Errer : insufficient permissions for device
http://stackoverflow.com/questions/5510284/adb-devices-command-not-working
On my Gentoo/Funtoo linux system I am having similar problems:
I gotting always not the correct device description and insufficient permissions:
# sudo ./adb devices
List of devices attached
???????????? no permissions
# ./adb usb
error: insufficient permissions for device
For me helps the howto from Google. In my case I needed to add the udev rule:
# cat /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
and setting up the filesystem rights
# chmod a+r /etc/udev/rules.d/51-android.rules
After replugging my smartphone the access to the phone was successful, it also appears now in Eclipse' Android Device Chooser:
# sudo ./adb devices
List of devices attached
3XXXXXXXXXXXXXC device
# sudo ./adb usb
restarting in USB mode
You also have to check the membership of your user to the plugdev-group.
USB Vendor IDs
This table provides a reference to the vendor IDs needed in order to add USB device support on Linux. The USB Vendor ID is the value given to theATTR{idVendor} property in the rules file, as described
above.| Company | USB Vendor ID | ||||
|---|---|---|---|---|---|
| Acer | 0502 |
||||
| ASUS | 0b05 |
||||
| Dell | 413c |
||||
| Foxconn | 0489 |
||||
| Fujitsu | 04c5 |
||||
| Fujitsu Toshiba | 04c5 |
||||
| Garmin-Asus | 091e |
||||
18d1 |
|||||
| Haier | 201E |
||||
| Hisense | 109b |
||||
| HTC | 0bb4 |
||||
| Huawei | 12d1 |
||||
| K-Touch | 24e3 |
||||
| KT Tech | 2116 |
||||
| Kyocera | 0482 |
||||
| Lenovo | 17ef |
||||
| LG | 1004 |
||||
| Motorola | 22b8 |
||||
| MTK | 0e8d |
||||
| NEC | 0409 |
||||
| Nook | 2080 |
||||
| Nvidia | 0955 |
||||
| OTGV | 2257 |
||||
| Pantech | 10a9 |
||||
| Pegatron | 1d4d |
||||
| Philips | 0471 |
||||
| PMC-Sierra | 04da |
||||
| Qualcomm | 05c6 |
||||
| SK Telesys | 1f53 |
||||
| Samsung | 04e8 |
||||
| Sharp | 04dd |
||||
| Sony | 054c |
||||
| Sony Ericsson | 0fce |
||||
| Teleepoch | 2340 |
||||
| Toshiba | 0930 |
||||
| ZTE | 19d2 |
2013년 9월 8일 일요일
2013년 9월 4일 수요일
망고보드 펭귄로고 바꾸기
png 그림파일을 보드 첫화면 로고로 넣기위한 가공(망고보드 최대화면 800 * 480)
# pngtopnm image.png | pnmtoplainpnm > image.ppm
# pnmquant -fs 223 image.ppm > image_256.ppm
# pnmnoraw image_256.ppm > logo_linux_clut224.ppm
우분투 테마설정
우분투 컬러테마를 고르는중 koheler scheme을 입맛대로 수정해보았다..
vi ~/.vim/colors/(any name).vim 에 넣으면 된다
vi ~/.vim/colors/(any name).vim 에 넣으면 된다
" local syntax file - set colors on a per-machine basis: " vim: tw=0 ts=4 sw=4 " Vim color file " Maintainer: Ron Aaron" Last Change: 2006 Dec 10 hi clear set background=dark if exists("syntax_on") syntax reset endif let g:colors_name = "koheler" hi Normal guifg=white guibg=black hi Scrollbar guifg=darkcyan guibg=cyan hi Menu guifg=black guibg=cyan hi SpecialKey term=bold cterm=bold ctermfg=darkred guifg=#cc0000 hi NonText term=bold cterm=bold ctermfg=darkred gui=bold guifg=#cc0000 hi Directory term=bold cterm=bold ctermfg=brown guifg=#cc8000 hi ErrorMsg term=standout cterm=bold ctermfg=grey ctermbg=red guifg=White guibg=Red hi Search term=reverse ctermfg=white ctermbg=red guifg=white guibg=Red hi MoreMsg term=bold cterm=bold ctermfg=darkgreen gui=bold guifg=SeaGreen hi ModeMsg term=bold cterm=bold gui=bold guifg=White guibg=Blue hi LineNr term=underline cterm=bold ctermfg=darkcyan guifg=Yellow hi Question term=standout cterm=bold ctermfg=darkgreen gui=bold guifg=Green hi StatusLine term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white hi StatusLineNC term=reverse ctermfg=white ctermbg=lightblue guifg=white guibg=blue hi Title term=bold cterm=bold ctermfg=darkmagenta gui=bold guifg=Magenta hi Visual term=reverse cterm=reverse gui=reverse hi WarningMsg term=standout cterm=bold ctermfg=darkred guifg=Red hi Cursor guifg=bg guibg=Green hi Comment term=bold cterm=bold ctermfg=darkgray guifg=#80a0ff hi Constant term=underline cterm=bold ctermfg=magenta guifg=#ffa0a0 hi Special term=bold cterm=bold ctermfg=red guifg=Orange hi Identifier term=underline ctermfg=brown guifg=#40ffff hi Statement term=bold cterm=bold ctermfg=darkyellow gui=bold guifg=#ffff60 hi PreProc term=underline ctermfg=darkmagenta guifg=#ff80ff hi Type term=underline cterm=bold ctermfg=green gui=bold guifg=#60ff60 hi Error term=reverse ctermfg=darkcyan ctermbg=black guifg=Red guibg=Black hi Todo term=standout ctermfg=black ctermbg=darkcyan guifg=Blue guibg=Yellow hi CursorLine term=underline guibg=#555555 cterm=underline hi CursorColumn term=underline guibg=#555555 cterm=underline hi MatchParen term=reverse ctermfg=blue guibg=Blue hi TabLine term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white hi TabLineFill term=bold,reverse cterm=bold ctermfg=lightblue ctermbg=white gui=bold guifg=blue guibg=white hi TabLineSel term=reverse ctermfg=white ctermbg=lightblue guifg=white guibg=blue hi link IncSearch Visual hi link String Constant hi link Character Constant hi link Number Constant hi link Boolean Constant hi link Float Number hi link Function Identifier hi link Conditional Statement hi link Repeat Statement hi link Label Statement hi link Operator Statement hi link Keyword Statement hi link Exception Statement hi link Include PreProc hi link Define PreProc hi link Macro PreProc hi link PreCondit PreProc hi link StorageClass Type hi link Structure Type hi link Typedef Type hi link Tag Special hi link SpecialChar Special hi link Delimiter Special hi link SpecialComment Special hi link Debug Special
2013년 9월 1일 일요일
set number
1. /arch/arm/boot/compressed/misc.c
3. /init/version.c
13.
14. /arch/arm/mach-s5pv210/clock.c
decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p,
int arch_id)
{
output_data = (uch *)output_start; /* Points to kernel start */
free_mem_ptr = free_mem_ptr_p;
free_mem_end_ptr = free_mem_ptr_end_p;
__machine_arch_type = arch_id;
arch_decomp_setup();
makecrc();
putstr("(1)Uncompressing Linux...");
gunzip();
putstr(" (1-e)done, booting the kernel.\n");
return output_ptr;
}
2.
3. /init/version.c
/* FIXED STRINGS! Don't touch! */
const char linux_banner[] =
"(3)Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
const char linux_proc_banner[] =
"%s version %s"
" (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ")"
" (" LINUX_COMPILER ") %s\n";
4. /arch/arm/kernel/setup.c
static void __init setup_processor(void)
{
struct proc_info_list *list;
/*
* locate processor in the list of supported processor
* types. The linker builds this table for us from the
* entries in arch/arm/mm/proc-*.S
*/
list = lookup_processor_type(read_cpuid_id());
if (!list) {
printk("CPU configuration botched (ID %08x), unable "
"to continue.\n", read_cpuid_id());
while (1);
}
cpu_name = list->cpu_name;
#ifdef MULTI_CPU
processor = *list->proc;
#endif
#ifdef MULTI_TLB
cpu_tlb = *list->tlb;
#endif
#ifdef MULTI_USER
cpu_user = *list->user;
#endif
#ifdef MULTI_CACHE
cpu_cache = *list->cache;
#endif
printk("(4)CPU: %s [%08x] revision %d (ARMv%s), cr=%08lx\n",
cpu_name, read_cpuid_id(), read_cpuid_id() & 15,
proc_arch[cpu_architecture()], cr_alignment);
sprintf(init_utsname()->machine, "%s%c", list->arch_name, ENDIANNESS);
sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS);
elf_hwcap = list->elf_hwcap;
#ifndef CONFIG_ARM_THUMB
elf_hwcap &= ~HWCAP_THUMB;
#endif
cacheid_init();
cpu_proc_init();
}
5. /arch/arm/kernel/setup.c
static void __init cacheid_init(void)
{
unsigned int cachetype = read_cpuid_cachetype();
unsigned int arch = cpu_architecture();
if (arch >= CPU_ARCH_ARMv6) {
if ((cachetype & (7 << 29)) == 4 << 29) {
/* ARMv7 register format */
cacheid = CACHEID_VIPT_NONALIASING;
if ((cachetype & (3 << 14)) == 1 << 14)
cacheid |= CACHEID_ASID_TAGGED;
} else if (cachetype & (1 << 23))
cacheid = CACHEID_VIPT_ALIASING;
else
cacheid = CACHEID_VIPT_NONALIASING;
} else {
cacheid = CACHEID_VIVT;
}
printk("(5)CPU: %s data cache, %s instruction cache\n",
cache_is_vivt() ? "VIVT" :
cache_is_vipt_aliasing() ? "VIPT aliasing" :
cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown",
cache_is_vivt() ? "VIVT" :
icache_is_vivt_asid_tagged() ? "VIVT ASID tagged" :
cache_is_vipt_aliasing() ? "VIPT aliasing" :
cache_is_vipt_nonaliasing() ? "VIPT nonaliasing" : "unknown");
}
6. /arch/arm/kernel/setup.c
static struct machine_desc * __init setup_machine(unsigned int nr)
{
struct machine_desc *list;
/*
* locate machine in the list of supported machines.
*/
list = lookup_machine_type(nr);
if (!list) {
printk("Machine configuration botched (nr %d), unable "
"to continue.\n", nr);
while (1);
}
printk("(6)Machine: %s\n", list->name);
return list;
}
7. /arch/arm/kernel/setup.c
static void __init parse_tags(const struct tag *t)
{
for (; t->hdr.size; t = tag_next(t))
if (!parse_tag(t))
printk(KERN_WARNING
"(7)Ignoring unrecognised tag 0x%08x\n",
t->hdr.tag);
}
8. /arch/arm/mm/mmu.c
switch (cp->pmd) {
case PMD_SECT_WT:
mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WT;
break;
case PMD_SECT_WB:
case PMD_SECT_WBWA:
mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB;
break;
}
printk("(8)Memory policy: ECC %sabled, Data cache %s\n",
ecc_mask ? "en" : "dis", cp->policy);
for (i = 0; i < ARRAY_SIZE(mem_types); i++) {
struct mem_type *t = &mem_types[i];
if (t->prot_l1)
t->prot_l1 |= PMD_DOMAIN(t->domain);
if (t->prot_sect)
t->prot_sect |= PMD_DOMAIN(t->domain);
}
9. /arch/arm/mm/mmu.c
/*
* Check whether this memory bank would partially overlap
* the vmalloc area.
*/
if (__va(bank->start + bank->size) > VMALLOC_MIN ||
__va(bank->start + bank->size) < __va(bank->start)) {
unsigned long newsize = VMALLOC_MIN - __va(bank->start);
printk(KERN_NOTICE "(9)Truncating RAM at %.8lx-%.8lx "
"to -%.8lx (vmalloc region overlap).\n",
bank->start, bank->start + bank->size - 1,
bank->start + newsize - 1);
bank->size = newsize;
}
10. /arch/arm/plat-samsung/init.c
void __init s3c_init_cpu(unsigned long idcode,
struct cpu_table *cputab, unsigned int cputab_size)
{
cpu = s3c_lookup_cpu(idcode, cputab, cputab_size);
if (cpu == NULL) {
printk(KERN_ERR "Unknown CPU type 0x%08lx\n", idcode);
panic("Unknown S3C24XX CPU");
}
printk("(10)CPU %s (id 0x%08lx)\n", cpu->name, idcode);
if (cpu->map_io == NULL || cpu->init == NULL) {
printk(KERN_ERR "CPU %s support not enabled\n", cpu->name);
panic("Unsupported Samsung CPU");
}
cpu->map_io();
}
11. /arch/arm/plat-samsung/clock.c
int __init s3c24xx_register_baseclocks(unsigned long xtal)
{
printk(KERN_INFO "(11)S3C24XX Clocks, Copyright 2004 Simtec Electronics\n");
clk_xtal.rate = xtal;
/* register our clocks */
if (s3c24xx_register_clock(&clk_xtal) < 0)
printk(KERN_ERR "failed to register master xtal\n");
if (s3c24xx_register_clock(&clk_mpll) < 0)
printk(KERN_ERR "failed to register mpll clock\n");
if (s3c24xx_register_clock(&clk_upll) < 0)
printk(KERN_ERR "failed to register upll clock\n");
if (s3c24xx_register_clock(&clk_f) < 0)
printk(KERN_ERR "failed to register cpu fclk\n");
if (s3c24xx_register_clock(&clk_h) < 0)
printk(KERN_ERR "failed to register cpu hclk\n");
if (s3c24xx_register_clock(&clk_p) < 0)
printk(KERN_ERR "failed to register cpu pclk\n");
return 0;
}
12. 13.
14. /arch/arm/mach-s5pv210/clock.c
apll = s5p_get_pll45xx(xtal, __raw_readl(S5P_APLL_CON), pll_4508);
mpll = s5p_get_pll45xx(xtal, __raw_readl(S5P_MPLL_CON), pll_4502);
epll = s5p_get_pll90xx(xtal, __raw_readl(S5P_EPLL_CON),
__raw_readl(S5P_EPLL_CON_K));
printk(KERN_INFO "(14)S5PV210: PLL settings, A=%ld, M=%ld, E=%ld\n",
apll, mpll, epll);
clk_fout_apll.ops = &s5pv210_fout_apll_ops;
clk_fout_mpll.rate = mpll;
clk_fout_epll.rate = epll;
15 - 26. /arch/arm/plat-s5p/bootmem.c
void s5pv210_reserve_bootmem(void)
{
struct s3c_media_device *mdev;
int i, nr_devs;
nr_devs = sizeof(media_devs) / sizeof(media_devs[0]);
for (i = 0; i < nr_devs; i++) {
mdev = &media_devs[i];
if (mdev->memsize <= 0)
continue;
mdev->paddr = virt_to_phys(__alloc_bootmem(mdev->memsize,
PAGE_SIZE, meminfo.bank[mdev->bank].start));
printk(KERN_INFO "(%d) s5pv210: %lu KB system memory reserved "
"for %s at bank[%d] 0x%08x\n", i+15,(unsigned long) mdev->memsize/1024,
mdev->name, mdev->bank, mdev->paddr);
}
}
27. /mm/page_alloc.c
/*
* Disable grouping by mobility if the number of pages in the
* system is too low to allow the mechanism to work. It would be
* more accurate, but expensive to check per-zone. This check is
* made on memory-hotadd so a system can start with mobility
* disabled and enable it later
*/
if (vm_total_pages < (pageblock_nr_pages * MIGRATE_TYPES))
page_group_by_mobility_disabled = 1;
else
page_group_by_mobility_disabled = 0;
printk("(27)Built %i zonelists in %s order, mobility grouping %s. "
"Total pages: %ld\n",
nr_online_nodes,
zonelist_order_name[current_zonelist_order],
page_group_by_mobility_disabled ? "off" : "on",
vm_total_pages);
28. /init/main.c
/*
* Interrupts are still disabled. Do necessary setups, then
* enable them
*/
lock_kernel();
tick_init();
boot_cpu_init();
page_address_init();
printk(KERN_NOTICE "%s", linux_banner);
setup_arch(&command_line);
mm_init_owner(&init_mm, &init_task);
setup_command_line(command_line);
setup_nr_cpu_ids();
setup_per_cpu_areas();
smp_prepare_boot_cpu(); /* arch-specific boot-cpu hooks */
build_all_zonelists();
page_alloc_init();
printk(KERN_NOTICE "(28)Kernel command line: %s\n", boot_command_line);
parse_early_param();
parse_args("Booting kernel", static_command_line, __start___param,
__stop___param - __start___param,
&unknown_bootoption);
29 - 31. /mm/page_alloc.c
if (!table)
panic("Failed to allocate %s hash table\n", tablename);
int nNumber = getNumberByTableName(tablename);
printk(KERN_INFO "(%d)%s hash table entries: %d (order: %d, %lu bytes)\n",
nNumber,
tablename,
(1U << log2qty),
ilog2(size) - PAGE_SHIFT,
size);
if (_hash_shift)
*_hash_shift = log2qty;
if (_hash_mask)
*_hash_mask = (1 << log2qty) - 1;
피드 구독하기:
글 (Atom)