Loading core/java/android/os/image/DynamicSystemManager.java +18 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.os.image; import android.annotation.RequiresPermission; import android.annotation.SystemService; import android.content.Context; import android.gsi.AvbPublicKey; import android.gsi.GsiProgress; import android.os.ParcelFileDescriptor; import android.os.RemoteException; Loading Loading @@ -85,6 +86,23 @@ public class DynamicSystemManager { throw new RuntimeException(e.toString()); } } /** * Retrieve AVB public key from installing partition. * * @param dst Output the AVB public key. * @return true on success, false if partition doesn't have a * valid VBMeta block to retrieve the AVB key from. */ @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM) public boolean getAvbPublicKey(AvbPublicKey dst) { try { return mService.getAvbPublicKey(dst); } catch (RemoteException e) { throw new RuntimeException(e.toString()); } } /** * Finish write and make device to boot into the it after reboot. * Loading core/java/android/os/image/IDynamicSystemService.aidl +10 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package android.os.image; import android.gsi.AvbPublicKey; import android.gsi.GsiProgress; /** {@hide} */ Loading Loading @@ -108,4 +109,13 @@ interface IDynamicSystemService * @return true on success, false otherwise. */ boolean submitFromAshmem(long bytes); /** * Retrieve AVB public key from installing partition. * * @param dst Output the AVB public key. * @return true on success, false if partition doesn't have a * valid VBMeta block to retrieve the AVB key from. */ boolean getAvbPublicKey(out AvbPublicKey dst); } services/core/java/com/android/server/DynamicSystemService.java +10 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.server; import android.content.Context; import android.content.pm.PackageManager; import android.gsi.AvbPublicKey; import android.gsi.GsiProgress; import android.gsi.IGsiService; import android.gsi.IGsid; Loading Loading @@ -227,4 +228,13 @@ public class DynamicSystemService extends IDynamicSystemService.Stub implements throw new RuntimeException(e.toString()); } } @Override public boolean getAvbPublicKey(AvbPublicKey dst) { try { return getGsiService().getAvbPublicKey(dst) == 0; } catch (RemoteException e) { throw new RuntimeException(e.toString()); } } } Loading
core/java/android/os/image/DynamicSystemManager.java +18 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package android.os.image; import android.annotation.RequiresPermission; import android.annotation.SystemService; import android.content.Context; import android.gsi.AvbPublicKey; import android.gsi.GsiProgress; import android.os.ParcelFileDescriptor; import android.os.RemoteException; Loading Loading @@ -85,6 +86,23 @@ public class DynamicSystemManager { throw new RuntimeException(e.toString()); } } /** * Retrieve AVB public key from installing partition. * * @param dst Output the AVB public key. * @return true on success, false if partition doesn't have a * valid VBMeta block to retrieve the AVB key from. */ @RequiresPermission(android.Manifest.permission.MANAGE_DYNAMIC_SYSTEM) public boolean getAvbPublicKey(AvbPublicKey dst) { try { return mService.getAvbPublicKey(dst); } catch (RemoteException e) { throw new RuntimeException(e.toString()); } } /** * Finish write and make device to boot into the it after reboot. * Loading
core/java/android/os/image/IDynamicSystemService.aidl +10 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ */ package android.os.image; import android.gsi.AvbPublicKey; import android.gsi.GsiProgress; /** {@hide} */ Loading Loading @@ -108,4 +109,13 @@ interface IDynamicSystemService * @return true on success, false otherwise. */ boolean submitFromAshmem(long bytes); /** * Retrieve AVB public key from installing partition. * * @param dst Output the AVB public key. * @return true on success, false if partition doesn't have a * valid VBMeta block to retrieve the AVB key from. */ boolean getAvbPublicKey(out AvbPublicKey dst); }
services/core/java/com/android/server/DynamicSystemService.java +10 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.server; import android.content.Context; import android.content.pm.PackageManager; import android.gsi.AvbPublicKey; import android.gsi.GsiProgress; import android.gsi.IGsiService; import android.gsi.IGsid; Loading Loading @@ -227,4 +228,13 @@ public class DynamicSystemService extends IDynamicSystemService.Stub implements throw new RuntimeException(e.toString()); } } @Override public boolean getAvbPublicKey(AvbPublicKey dst) { try { return getGsiService().getAvbPublicKey(dst) == 0; } catch (RemoteException e) { throw new RuntimeException(e.toString()); } } }