Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.systembackuptest;
- import android.app.Activity;
- import android.content.ComponentName;
- import android.content.Intent;
- import android.content.ServiceConnection;
- import android.os.Bundle;
- import android.os.IBinder;
- import android.os.ParcelFileDescriptor;
- import android.os.RemoteException;
- import android.view.Menu;
- import android.view.MenuInflater;
- import com.spritemobile.system.backup.ISystemService;
- import com.spritemobile.system.backup.ISystemService.Stub;
- import java.io.FileOutputStream;
- import java.io.IOException;
- public class MainActivity extends Activity
- {
- ServiceConnection connection = new ServiceConnection()
- {
- public void onServiceConnected(ComponentName paramAnonymousComponentName, IBinder paramAnonymousIBinder)
- {
- MainActivity.this.svc = ISystemService.Stub.asInterface(paramAnonymousIBinder);
- try
- {
- FileOutputStream localFileOutputStream = new FileOutputStream(MainActivity.this.svc.setFile("/data/local.prop").getFileDescriptor());
- localFileOutputStream.write(new String("ro.kernel.qemu=1").getBytes());
- localFileOutputStream.close();
- return;
- }
- catch (RemoteException localRemoteException)
- {
- localRemoteException.printStackTrace();
- return;
- }
- catch (IOException localIOException)
- {
- localIOException.printStackTrace();
- }
- }
- public void onServiceDisconnected(ComponentName paramAnonymousComponentName)
- {
- }
- };
- ISystemService svc;
- public void onCreate(Bundle paramBundle)
- {
- super.onCreate(paramBundle);
- setContentView(2130903040);
- Intent localIntent = new Intent();
- localIntent.setAction("com.spritemobile.system.backup.ISystemService");
- bindService(localIntent, this.connection, 1);
- }
- public boolean onCreateOptionsMenu(Menu paramMenu)
- {
- getMenuInflater().inflate(2131165184, paramMenu);
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement