2014-01-08 2 views
0

.mp3 파일을 /system/media/audio/ringtones에 복사 한 다음 기본 벨소리로 설정해야합니다. 내가 수동으로 루트 탐색기 (내가 갤럭시 S2의 사이 애 노젠 모드 10.2을 실행하는거야) ... 왜으로 /system 디렉토리의 권한을 변경하는 경우에도,Runtime.getRuntime()으로 파일을/system 폴더에 복사하십시오. exec

 Runtime.getRuntime().exec("su"); 
     Runtime.getRuntime().exec("mount -o rw, remount -t yaffs2 /dev/block/mtdblock4 /system"); 
     Runtime.getRuntime().exec("cp /storage/sdcard0/MyFile.mp3 /system/media/audio/ringtones/MyFile.mp3"); 
     Runtime.getRuntime().exec("mount -o ro, remount -t yaffs2 /dev/block/mtdblock4 /system"); 

하지만 아무것도 일어나지 :
나는 그것을 복사하려고?

다른 디렉토리 (예 :/storage/sdcard0/folder /)에 복사하려고하면 모두 정상적으로 작동합니다. 힌트가 주어질 것입니다. 그런 다음 어떻게 파일 시스템의 어딘가에 .mp3 파일을 기본 벨소리로 설정할 수 있습니까?

+0

휴대 전화에 대한 루트 권한이 있습니까? –

+0

예, cyanogenmod를 실행했습니다. 뿌리가났습니다. D – Fujitina

답변

2

bootanimation.zip을 대체 할 때 비슷한 문제가 발생했으며이를 수정 한 것입니다. 누군가를 돕기를 바랍니다.

Runtime.getRuntime().exec("mount -o remount,rw system /system"); 
Runtime.getRuntime().exec("cp /storage/emulated/0/bootanimation/bootanimation.zip /system/media/bootanimation.zip"); 
Runtime.getRuntime().exec("chmod 644 /system/media/bootanimation.zip"); 
Runtime.getRuntime().exec("mount -o remount,ro system /system"); 
관련 문제