[HELP] - How to disable app services on android

CashZero

New member
Feb 26, 2017
2
0
0
I'm building a program in java, could you tell me what the codes are to disable the services of a program?

So guys I'm starting here working, mainfest like
Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="37" android:versionName="1.6.5" package="cn.wq.disableservice" platformBuildVersionCode="19" platformBuildVersionName="4.4.2-1456859">
	<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19" />
	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
	<uses-permission android:name="android.permission.ACCESS_SUPERUSER" />
	<application android:theme="null" android:label="DisableService" android:allowBackup="true">
		<activity android:label="disableservice" android:name=".MainActivity">
			<intent-filter>
				<action android:name="android.intent.action.MAIN" />
				<category android:name="android.intent.category.LAUNCHER" />
			</intent-filter>
		</activity>
		<activity android:name="cn.wq.disableservice.ServiceListActivity" />
		<activity android:name="cn.wq.disableservice.AboutActivity" />
	</application>
</manifest>

So I was able to disable the services here, but it was in the background (it automatically deactivates when I press to open, but does not open any window only executes the code ...), I want to put a code that only presses a button to deactivate the services Listed in the code list ....

Esse é o código java que mostra a lista de serviços dos aplicativos:
Code:
* Could not load the following classes:
 *  android.content.Intent
 *  android.content.pm.PackageManager
 *  android.content.pm.PackageManager$NameNotFoundException
 *  android.graphics.drawable.Drawable
 *  android.os.Bundle
 *  android.support.v4.app.Fragment
 *  android.support.v4.app.FragmentManager
 *  android.support.v4.app.FragmentTransaction
 *  android.support.v7.a.a
 *  android.support.v7.a.f
 *  java.lang.CharSequence
 *  java.lang.String
 */
package cn.wq.disableservice;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.a.a;
import android.support.v7.a.f;
import cn.wq.disableservice.b.aa;
public class ServiceListActivity
extends f {
    /*
     *Classificação agressiva de blocos ativada
     * Ativado desnecessária exceção poda
     * Ativado agregação de exceção agressiva
     -benzóico.
    */
 tected void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        Bundle bundle2 = this.getIntent().getExtras();
        a a2 = this.a();
        a2.a((CharSequence)bundle2.getString("title"));
        a2.a(true);
        try {
            a2.a(this.getPackageManager().getApplicationIcon(bundle2.getString("packageName")));
        }
        catch (PackageManager.NameNotFoundException var4_5) {
            var4_5.printStackTrace();
        }
        if (bundle == null) {
            FragmentTransaction fragmentTransaction = this.getSupportFragmentManager().beginTransaction();
            fragmentTransaction.add(16908290, (Fragment)aa.a(bundle2));
            fragmentTransaction.commit();
        }
    }
}

GUJ

11 / 12


JvDK
11d
Kkkkk, quero saber qual é o código em java para Android usado para desativar Apiclativos e serviços(Programas) no android

JvDK
10d
Me ajuda, preciso muito dessa ajuda, :frowning:

pfk66
10d
Java é usado para criar aplicativos Android, não para desativa-los.

Frmichetti
9d
Sei que você pode criar seus próprios serviços, listeners , controlá-los.. e fazer oque você quiser ...

Acompanhe aqui.
https://developer.android.com/guide/components/services.html1

Agora se pretende controlar serviços de terceiros , o buraco é mais em baixo...
Tipo um TaskManager...
Ainda não encontrei nenhum material sobre.

...Possível deve ser . mas como alcançar.. não sei nem indicar material...

1 Curtida

JulioCesarSF
7d
Android tem o conceito de sandbox, vai precisar de algumas permissões especiais (nem sei se é possível isso) e nem todos os serviços são passiveis de desativação, fechar uma aplicação é uma coisa, desativar um serviço é outra.

1 Curtida

JvDK
16h
Então pessoal estou começando aqui o trabalho, mainfest como,

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" // ta vendo aqui galera chamando o pacote pelo servidor... android:versionCode="37" android:versionName="1.6.5" package="cn.wq.disableservice" platformBuildVersionCode="19" platformBuildVersionName="4.4.2-1456859">
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />//PERMISSÃO PARA SUPER SU
<uses-permission android:name="android.permission.ACCESS_SUPERUSER" /> //PERMISSÃO SUPER SU CONCEDIDA
<application android:theme="null" android:label="DisableService" android:icon="res/drawable-mdpi-v4/ic_launcher.png" android:allowBackup="true">
<activity android:label="disableservice" android:name=".MainActivity">//ONDE CHAMA ALGUNS ARQUIVOS JAVA
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="cn.wq.disableservice.ServiceListActivity" />//ONDE CHAMA O ARQUIVO JAVA PARA MOSTRAR OS SERVIÇOS DOS PROGRAMAS
<activity android:name="cn.wq.disableservice.AboutActivity" />
</application>
</manifest>

JvDK
16h
Então eu consegui desativar os serviços aqui, mais foi em segundo plano, tipo quero montar um código que só de aperta o botão desativar os serviços listado na lista do código....

JvDK
16h2
Esse é o código java que mostra a lista de serviços dos aplicativos:
* Could not load the following classes:
* android.content.Intent
* android.content.pm.PackageManager
* android.content.pm.PackageManager$NameNotFoundException
* android.graphics.drawable.Drawable
* android.os.Bundle
* android.support.v4.app.Fragment
* android.support.v4.app.FragmentManager
* android.support.v4.app.FragmentTransaction
* android.support.v7.a.a
* android.support.v7.a.f
* java.lang.CharSequence
* java.lang.String
*/
package cn.wq.disableservice;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.a.a;
import android.support.v7.a.f;
import cn.wq.disableservice.b.aa;
public class ServiceListActivity
extends f {
/*
*Classificação agressiva de blocos ativada
* Ativado desnecessária exceção poda
* Ativado agregação de exceção agressiva
-benzóico.
*/
tected void onCreate(Bundle bundle) {
super.onCreate(bundle);
Bundle bundle2 = this.getIntent().getExtras();
a a2 = this.a();
a2.a((CharSequence)bundle2.getString("title"));
a2.a(true);
try {
a2.a(this.getPackageManager().getApplicationIcon(bundle2.getString("packageName")));
}
catch (PackageManager.NameNotFoundException var4_5) {
var4_5.printStackTrace();
}
if (bundle == null) {
FragmentTransaction fragmentTransaction = this.getSupportFragmentManager().beginTransaction();
fragmentTransaction.add(16908290, (Fragment)aa.a(bundle2));
fragmentTransaction.commit();
}
}
}

This is the MainActivy file:
Code:
 * Could not load the following classes:
 *  android.content.ContentResolver
 *  android.content.Context
 *  android.os.Build
 *  android.os.Build$VERSION
 *  android.os.Bundle
 *  android.provider.Settings
 *  android.provider.Settings$Secure
 *  android.support.v4.view.ViewPager
 *  android.support.v4.view.as
 *  android.support.v7.a.f
 *  android.view.View
 *  android.widget.Toast
 *  java.lang.String
 */
package cn.wq.disableservice;
import android.content.ContentResolver;
import android.content.Context;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.support.v4.view.ViewPager;
import android.support.v4.view.as;
import android.support.v7.a.f;
import android.view.View;
import android.widget.Toast;
import cn.wq.disableservice.MyPagerTabStip;
import cn.wq.disableservice.c;
public class MainActivity
extends f {
    private ViewPager b;
    private MyPagerTabStip c;
    private boolean d() {
    int n2 = Settings.Secure.getInt((ContentResolver)this.getContentResolver(), (String)"adb_enabled", (int)0);
    boolean bl = false;
    if (n2 > 0) {
        bl = true;
    }
    return bl;
}

protected void onCreate(Bundle bundle) {
    super.onCreate(bundle);
    this.setContentView(2130903066);
    this.b = (ViewPager)this.findViewById(2131361861);
    this.b.setAdapter((as)new c((MainActivity)this, (f)this));
    this.c = (MyPagerTabStip)this.findViewById(2131361860);
    this.c.setViewPager(this.b);
    if (Build.VERSION.SDK_INT < 11 && !super.d()) {
        Toast.makeText((Context)this, (int)2131427359, (int)0).show();
    }
}
}

So guys I just want to list and capture the services of the chosen applications and assemble a code with a button to disable the chosen services, "a button that disables various services chosen by me."
As:
"Here is the code that disables this service which can be (" DockService "), help me ..
 

Trending Posts

Members online

Forum statistics

Threads
955,549
Messages
6,965,194
Members
3,163,317
Latest member
ZebasterRaja