Install firmware with app intent
Last updated December 19th, 2024
This document is new for the Knox cloud services 25.01 UAT.
Contact your Samsung administrator to access this feature
Under Device Condition in your Knox E-FOTA campaign, you can choose to only install device firmware when Knox E-FOTA is instructed to do so by a third-party app.
This setting takes priority over other campaign firmware installation conditions. If the setting is enabled and Knox E-FOTA receives a firmware installation intent, it will proceed to install firmware as long as the device battery level is over 20%, there is sufficient storage, and the device isn’t engaged in a phone call. Other firmware installation conditions, such as postpones, time periods, and device charging, are ignored when this setting is configured.
Developer workflow
This content is for third-party app developers looking to implement a trigger for Knox E-FOTA firmware installation in their apps.
Before your app can trigger Knox E-FOTA to perform firmware installations, your app must be authenticated and authorized by Samsung. Please contact Samsung support with your application signature and package name.
To trigger Knox E-FOTA for firmware installation, your app must interface with our install authenticator service using AIDL.
- Add the aidl buildFeature to build.gradle.
<build.gradle>
android {
buildFeatures {
aidl = true
}
}
- Download the IInstallAuthenticator.aidl file and place it in your project at
src/main/aidl/com/samsung/android/knox/efota/
. - Bind with the service, and access its interface to call
verifyCallerAndStartInstall()
, which triggers firmware installation. Here’s a sample implementation that binds with the IInstallAuthenticator and accesses its interface to install firmware:
public class MainActivity extends AppCompatActivity {
private IInstallAuthenticator mService;
private final ServiceConnection mConnection = new ServiceConnection() {
// Called when the connection with the service is established
@Override
public void onServiceConnected(ComponentName className, IBinder service) {
mService = IInstallAuthenticator.Stub.asInterface(service);
}
@Override
public void onServiceDisconnected(ComponentName className) {
mService = null;
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
Button button = (Button)findViewById(R.id.bind);
button.setOnClickListener(mBindListener);
// Bind to the service
Intent intent = new Intent();
intent.setAction("com.samsung.android.knox.intent.action.UPDATE_FIRMWARE");
intent.setComponent(new ComponentName("com.samsung.android.knox.efota", "com.samsung.android.knox.efota.services.InstallAuthenticator"));
bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
}
@Override
protected void onDestroy() {
super.onDestroy();
unbindService(mConnection);
}
private OnClickListener mBindListener = new OnClickListener() {
public void onClick(View v) {
// Trigger firmware installation
mService.verifyCallerAndStartInstall();
}
};
}
Is this page helpful?
Thank you for your feedback!