android定义启动唯一apk

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.ender.mylauncher">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />




                    <category android:name="android.intent.category.LAUNCHER" />
                     <category android:name="android.intent.category.HOME" />
                    <category android:name="android.intent.category.DEFAULT" />

            </intent-filter>
        </activity>
    </application>

</manifest>

 

 编译成apk后安装,位置在/data/app目录下

备份/system/app目录到/system/apk

清楚/system/app下所有文件

把/data/app/mylauncher.apk拷贝到/system/app

chmod 777 /system/app/mylaucher.apk

 

重启。

 

以android.4.2为条件

http://www.cnblogs.com/playing/archive/2011/04/13/2014705.html

 

posted @ 2016-08-21 17:05  Ender.Lu  阅读(275)  评论(0)    收藏  举报