안녕하세요.

회사에서 뜬금없이 안드로이드 개발로 파견을 나와서 삽질하고 있습니다.

지금 만드는 샘플은 어플 내에서 다른 apk 패키지를 인스톨하는건데요.

자료 찾아가면서 AndroidManifast.xml에 퍼미션을 추가해줘야한다고 해서 아래 퍼미션을 추가했습니다.
<uses-permission android:name="android.permission.INSTALL_PACKAGES"/>

그리고 아래와 같이 간단한 어플을 작성했는데요.

public class APKInstall extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
//        Intent intent = new Intent(Intent.ACTION_PACKAGE_INSTALL);
        File apkFile = new File("/sdcard/FileBrowser.apk");
        Uri apkUri = Uri.fromFile(apkFile);
//        intent.setDataAndType(
//         Uri.fromFile(apkFile),
//         "application/vnd.android.package-archive");
//        startActivity(intent);
        PackageManager pm = getPackageManager();
        pm.installPackage(apkUri);
    }
}

오류 상황을 보면
08-03 07:07:57.178: ERROR/AndroidRuntime(18508): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.test.install/com.android.test.install.APKInstall}: java.lang.SecurityException: Neither user 10028 nor current process has android.permission.INSTALL_PACKAGES.
계속 권한이 없다고 나오네요.
다른 권한이 필요한건지 모르겠습니다..