Drop system shared uid in ferrochrome app
it doesn't need to use that shared uid and platform signing key.
and also remove unnecessary sleep logic.
but still need to remove sysprop set to move the app to product
partition.
Bug: 348113995
Test: run ferrochrome app
Change-Id: I5fcac560ab91eda8124f55685084487c6ebb1732
diff --git a/ferrochrome_app/Android.bp b/ferrochrome_app/Android.bp
index b3998a7..29a16d0 100644
--- a/ferrochrome_app/Android.bp
+++ b/ferrochrome_app/Android.bp
@@ -12,10 +12,6 @@
privileged: true,
init_rc: ["custom_vm_setup.rc"],
required: ["custom_vm_setup"],
- certificate: "platform",
- static_libs: [
- "apache-commons-compress",
- ],
}
sh_binary {
diff --git a/ferrochrome_app/AndroidManifest.xml b/ferrochrome_app/AndroidManifest.xml
index d0aa62c..62b065d 100644
--- a/ferrochrome_app/AndroidManifest.xml
+++ b/ferrochrome_app/AndroidManifest.xml
@@ -1,9 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.virtualization.ferrochrome"
- android:sharedUserId="android.uid.system" >
+ package="com.android.virtualization.ferrochrome" >
<uses-permission android:name="android.permission.INTERNET" />
+ <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
+ <uses-permission android:name="android.permission.KILL_ALL_BACKGROUND_PROCESSES" />
+ <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
+ <queries>
+ <intent>
+ <action android:name="android.virtualization.VM_LAUNCHER" />
+ </intent>
+ </queries>
<application
android:label="Ferrochrome">
<activity android:name=".FerrochromeActivity"
diff --git a/ferrochrome_app/java/com/android/virtualization/ferrochrome/FerrochromeActivity.java b/ferrochrome_app/java/com/android/virtualization/ferrochrome/FerrochromeActivity.java
index 40af3b6..5006413 100644
--- a/ferrochrome_app/java/com/android/virtualization/ferrochrome/FerrochromeActivity.java
+++ b/ferrochrome_app/java/com/android/virtualization/ferrochrome/FerrochromeActivity.java
@@ -120,6 +120,7 @@
updateStatus("Done.");
updateStatus("Extracting images...");
+ SystemProperties.set("debug.custom_vm_setup.done", "false");
SystemProperties.set("debug.custom_vm_setup.start", "true");
while (!SystemProperties.getBoolean("debug.custom_vm_setup.done", false)) {
try {
@@ -130,14 +131,6 @@
return false;
}
}
- // TODO(jiyong): remove this sleep.
- try {
- Thread.sleep(30 * 1000);
- } catch (Exception e) {
- Log.e(TAG, "Interrupted while waiting for the copy to finish");
- updateStatus("Failed.");
- return false;
- }
updateStatus("Done.");
return true;