짱구삼촌
14.12.10
조회 수 5183
추천 수 4
댓글 3








1. Dropbox 연결하기


https://play.google.com/store/apps/details?id=os.devwom.smanager.dropbox


드랍박스 연결 애드온 어플을 설치합니다.




스크립트 매니저 초기화면에서 메뉴키를 누르고 맨 위에 있는 Home/Net 클릭합니다.




해당 애드론 어플들을 설치하면 드랍박스, 박스, FTP, SMB등이 가능합니다.

드랍박스를 클릭해서 본인 계정을 설정합니다.






제가 쓰는 2개의 계정이 맨위에 보입니다.

모자이크 처리는 저 부분에 유저 아이디가 숫자로만 보여집니다.

저 아이디 숫자를 알아야 스크립트에서 동작시킵니다.




** 첨부한 스크립트는 본인 폰에 있는 연락처, 일정, 문자, 최근기록, 환경설정, 알람 의 db 파일을 tar 파일로 백업하고 자동으로 드랍박스에 업로드 해주는 기능입니다.


언제나처럼 /sdcard/Download/modding 폴더에서 실행합니다.

반드시 스크립트 매니저를 통해서 실행해야 합니다.

터미널에서는 안됩니다.


실행하면 드랍박스 계정의 이름이 나옵니다.

(애드온 어플의 설정 xml 에서 가져오게 했습니다. 숫자를 외우고 있을 필요도 없고 그래서 ㅋ)




폰에 있는 db 들을 tar 파일로 묶어서 backup_db 라는 폴더에 먼저 저장합니다.

계정을 선택하면 해당 계정의 숫자 드랍박스 아이디를 가져옵니다.




드랍박스 계정에 backup_db 폴더를 만들고 tar 파일을 업로드 합니다.

같은 이름의 파일이 존재하면 덮어쓸지 물어봅니다.




업로드합니다.



드랍박스에 올라갔습니다.




** 참고 자료


Local files


In order to refer to your device local files you need to use the following uri format

file:///path/to/file

note 3 slash between scheme and the path


Boxnet files


In order to refer to your Boxnet files you need to use the following uri format

boxnet://usermail@domain.net/path/to/file

Where usermail@domain.net is your user mail at boxnet account

제 폰은 박스 연결에 문제가 있네요.


Dropbox files


In order to refer to your Dropbox files you need to use the following uri format

boxnet://userid/path/to/file

Where userid is your userid at dropbox account. You can get your userid from your SManager configured connections


Windows/samba, sftp/ssh ftp files


In order to refer to your Windows/samba, sftp/ssh ftp files you need to use the following uri format


shceme://user@host:port/path/to/file


Where scheme is

smb: for Windows/Samba connections

sftp: for sftp/ssh connections

ftp: for ftp connections


user@ and :port are optional


Packed files

- 압축파일도 관리가 되는가봐요 ㅋ


Packed filer refers to file tree that resides inside a single file like compressed files.

NOTE: Packed files are read only files

At this moment SManager supports following schemes for packed files.

zip: browse inside zip/apk and jar files

yaffs2: browse inside basic yaffs2 disk images

tar: browse inside tar files

tgz: browse inside gzip tar compressed files

tbz2: browse inside bzip2 tar compressed files


In order to refer to packed files you need to use the following uri format

scheme:REALFILE!//path/to/file


Where scheme is zip,yaffs2,tar,tgz or tbz

and REALFILE is a real packed uri, including packed files


For example

zip:file:///path/myfile.zip!//path/inside/zip/log.txt

Refers to file /path/inside/zip/log.txt inside /path/myfile.zip in your device file


tgz:sftp://user@myserver/path/myfile.tgz!//path/inside/tgz/to/directory/

Refers to /path/inside/tgz/to/directory/ inside /path/myfile.tgz file stored in myserver host using user user


NOTE: Packed directories always must end on slash character(/)



파일 관리 예제입니다.


Some examples

smc cp -a "dropbox://numeric_user_id/Photos" "file:///sdcard/photos_dropbox"


smc cp -r sftp://user@host:3567/home/user/kk/*a* file:///sdcard/kk/k2


smc mkdir "boxnet://user@domain.net/onefolder" && smc mv "boxnet://user@domain.net/onefolder" "boxnet://user@domain.net/newname"


smc cp "file:///ueventd.mako.rc" "boxnet://user@domain.net/newname/"


smc rm -r "boxnet://user@domain.net/newname"


smc cp -r "ftp://user@ip_dir/home/user/one/directory" file:///sdcard/one/file "boxnet://user@domain.net/newname" smb://guest@other_ip/other/dir sftp://user@mymachine/home/user/destdir/


smc cp -r zip:dropbox://user_id/zipfile.zip!//directory/* sftp://user@host:1234/home/user/directory/





스크립트 매니저 내장된 GUI 팝업 창들입니다.

Implemented dialogs


화면 아래부분에 팝업창 띄우는거 2개


showToastShort

Shows a Toast with short time.


Arguments: Desired message to show

Return value: none


showToastLong

Shows a Toast with long time.


Arguments: Desired message to show

Return value: none


에스/노 대화창 띄우기


showYesNoDialog

Shows a yes/no dialog.


Arguments:

Number of allowed arguments 1 or 2

1 argument => only shows message

2 arguments => first argument title. Second argument is the message


Return value: y , n or empty string if the dialog was cancelled.


확인 대화창 띄우기


showOkDialog

Available from SManager 2.7.0 version


Shows a dialog only with Ok button.

IMPORTANT: when Ok is pressed, new line is written to SM_GUIFD stream, so always is needed read from it

Example always add these two lines


echo showOkDialog "This is my title" "This is my message" >&$SM_GUIFD

read res <&$SM_GUIFD


Arguments:

Number of allowed arguments 1 or 2

1 argument => only shows message

2 arguments => first argument title. Second argument is the message


Return value: y , n or empty string if the dialog was cancelled.


입력창 및 패쓰워드 입력창 띄우기


showInputDialog and showInputPasswordDialog

Shows an input box dialog. if action is showInputPasswordDialog the typed text will be hidden.


Arguments:

Optional arguments [ -d "default_value" ] adds default value for Input field, not requiring 4 arguments. Available from SManager 2.7.0 version


Number of allowed arguments 1, 2, 3 or 4

1 argument

only shows message

2 arguments

first argument title

Second argument message

3 arguments

first argument title.

Second argument message.

Third argument hint text

4 arguments

first argument title.

Second argument message.

Third argument hint text

Fourth default text

return value: typed string or empty string if dialog was cancelled


선택창 (단수 및 복수 선택창 2개)


showSpinnerDialog (single select option)

Shows a dialog with an array of options. Only is possible select one option.


Arguments:

Optional arguments [ -s "default_selection_index" ] set as checked default_selection_index item, starting at 1. Available from SManager 2.7.0 version


Number or arguments 2 or more

First argument: title

Rest of arguments: options

return value: selected index option. (First option is 1)

Empty string if dialog was cancelled


showSpinnerMultiselectDialog (multiple select option)

Shows a dialog with an array of options. It is possible select multiple options.


Arguments:

Optional arguments [ -s "default_selection_index" ] [ -s "default_selection_index" ] …

Set checked default_selection_indexes item or items, starting at 1. Available from SManager 2.7.0 version


Number or arguments 2 or more

First argument: title

Rest of arguments: options

return value: space separate selected options. (First option is 1)

Empty string for no selections or cancelled dialog.


Extra Form
첨부
141210003.png  [File Size:184.6KB/Download:1]
backup_essential_db_dropbox.sh  [File Size:3.7KB/Download:0]
141210007.png  [File Size:55.1KB/Download:0]
141210005.png  [File Size:160.6KB/Download:0]
141210006.png  [File Size:158.8KB/Download:0]
141210004.png  [File Size:158.3KB/Download:0]
141210002.png  [File Size:140.1KB/Download:0]
141210001.png  [File Size:128.2KB/Download:0]
댓글을 남겨야 다운로드가 가능합니다. 감사의 댓글을 달고 오른쪽 확인버튼을 눌러주세요.
다운로드시 일주일에 한개 이상의 게시물 작성이 필요합니다. 지금 자유게시판에 회원님의 하루를 남겨보세요.
추천♡버튼을 잊지 마세요. 추천인과 회원님 모두 포인트가 적립됩니다.

짱구삼촌 님의 SIGNATURE

profile

그래도 아직은 사랑이, 낡은 외투처럼 너덜너덜해져서 이제는 갖다 버려야 할, 그러나 버리지 못하고...

"신은 그저 질문하는 자일 뿐... 운명은 내가 던지는 질문이다. 답은 그대들이 찾아라."

댓글 3
  • profile
    드랍박스, FTP, SMB 등록하고 보니깐 BOX 안되는게 좀 아쉽네요 ㅋ SMB 이용해서 동일 와이파이 접속 컴퓨터에 파일 이동 및 복사 기능을 쓰면 좀 재미난게 나올지도 몰겠네요.
  • ?
    아무리봐도 뭐가뭔지 도통 알수가없네요ㅜㅜ
  • profile
    일단 드랍박스 연결을 설정해두면 스크립트에서 언제든지 복사 이동 등을 할 수 있다는 말이지요. 저 숫자 아이디 값만 알면 smc cp -a "dropbox://12345678/Photos" "file:///sdcard/photos_dropbox" 이렇게 할 수 있습니다. 드랍박스 Photos 폴더 파일을 /sdcard/photos_dropbox 폴더로 복사하라는 명령이 되는 겁니다. ^^*
댓글 쓰기 권한이 없습니다.
정렬 목록 검색 쓰기
등록된 글이 없습니다.
1 - 2