안드로이드/포팅2013. 12. 1. 08:36

안드로이드에서 settings에 저장되는 여러 값에 대해 궁금하다면 다음과 같이 보면 된다.

우선 settings에 관련된 value들은 db에 저장되는 이는 다음의 위치에 있다.


/data/data/com.android.providers.settings/databases/settings.db


이 db를 접속하려면 console에서 다음과 같이 하자.

#sqlite3 settings.db



그러면 sqlite 콘솔이 뜨는데, 여기서 다음과 같이 해보자.

sqlite>.table



그러면 현재 query가능한 table들이 나온다.

android_metadata system bluetooth_devices secure



여기서 secure의 값들을 보고 싶으면 아래와 같이 하면 된다.

sqlite>select * from system;



해당 sqlite3 명령어에 대해서는 인터넷에 검색하면 잘 나온다.

참고로 sqlite3 에서 나오는 명령어는 .quit이다.


Posted by code cat
안드로이드/포팅2013. 11. 28. 16:59

system 파티션을 RW으로 remount하기 위해서는 다음과 같이 콘솔에서 실행하면 된다.

(system 파티션에 대한 path는 각자 다르니 사용하는 디바이스에 맞추면 된다.)


mount -o rw,remount /dev/block/.../by-name/system


'안드로이드 > 포팅' 카테고리의 다른 글

안드로이드 adb 명령어 리스트  (0) 2013.12.01
안드로이드 settings 데이터 알아보기  (0) 2013.12.01
Android Build System 용어  (0) 2013.10.16
GGLContext 에 대하여  (0) 2013.03.24
pthread_cancel()  (0) 2013.02.04
Posted by code cat
프로그래밍/JAVA2013. 11. 25. 22:12

이제 대충 프로그램이 동작하기 시작한다. 재구조화는 후우...

어쨌든 현재 동작하는 기능은 다음과 같다.

  • OTA Package 정보
  • checksum 생성 및 체크

DB 메뉴까지는 만들었는데 이걸 어떻게 구현할지는 아직 미정이다.

'프로그래밍 > JAVA' 카테고리의 다른 글

Swing desiginer LookAndFeel 종류  (0) 2013.11.19
Java Generics  (0) 2012.10.01
WindowBuilder Pro for Eclipse 3.7(Indigo) 설치 오류  (0) 2012.08.06
ant 빌드가 안될 때  (0) 2011.10.19
Posted by code cat

Encryption은

openssl aes-256-cbc -in input.txt -out output.enc



Decryption은

openssl aes-256-cbc -d -in output.enc -out input.txt

 

 

'리눅스 > 스크립트/유틸' 카테고리의 다른 글

[screen] detached된 세션 죽이기  (0) 2014.02.17
[Makefile] 다른 makefile 포함  (0) 2013.12.30
GDB  (0) 2013.09.24
[Makefile] overriding target 관련 warning 메세지  (0) 2013.09.02
[byobu] vertical line 없애기  (0) 2013.09.01
Posted by code cat
리눅스2013. 11. 25. 08:17

ext4 파일 시스템에 대한 커널 documentation에는 noauto_da_alloc에 대해서 다음과 같이 기술하고 있다.


auto_da_alloc(*)	Many broken applications don't use fsync() when 
noauto_da_alloc		replacing existing files via patterns such as
			fd = open("foo.new")/write(fd,..)/close(fd)/
			rename("foo.new", "foo"), or worse yet,
			fd = open("foo", O_TRUNC)/write(fd,..)/close(fd).
			If auto_da_alloc is enabled, ext4 will detect
			the replace-via-rename and replace-via-truncate
			patterns and force that any delayed allocation
			blocks are allocated such that at the next
			journal commit, in the default data=ordered
			mode, the data blocks of the new file are forced
			to disk before the rename() operation is
			committed.  This provides roughly the same level
			of guarantees as ext3, and avoids the
			"zero-length" problem that can happen when a
			system crashes before the delayed allocation
			blocks are forced to disk.


쉽게 풀어 얘기하자면, rename혹은 truncate같은 operation을 fsync()없이 행했을 경우, auto_da_alloc이 켜져 있으면 data=ordered 모드일 때, 다음 journal commit 시에 강제로 delayed 된 allocation 블럭들을 allocate 한다는 얘기다. (말이 쉽게 풀어 얘기지, 그냥 번역이네..)


따라서 ext3에 있던 "zero-length" 문제(delayed alloction 블럭이 disk에 쓰여지기 전에 시스템이 crash되는 문제)를 해결 할 수 있다.


noauto_da_alloc은 위와 같은 옵션을 꺼버리는 것이다.  이는 퍼포먼스 향상을 가져오지만 위에서 서술한 이점에 대해서는 포기하게 되는 것이다.

Posted by code cat