Skip to content

Commit

Permalink
RENAME app to OwnDroid
Browse files Browse the repository at this point in the history
  • Loading branch information
BinTianqi committed Apr 16, 2024
1 parent 094399c commit 37ab2e3
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 53 deletions.
4 changes: 3 additions & 1 deletion Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

### Device admin

有时候叫“设备管理器”

权限最小,数量不限

#### 激活
Expand Down Expand Up @@ -116,7 +118,7 @@ adb shell dumpsys account

MIUI:需要在开发者选项中打开”USB调试(安全设置)“

ColorOS:请使用调试签名的apk(下个release就有了),当前可参考issue [#5](https://github.com/BinTianqi/AndroidOwner/issues/5) [#6](https://github.com/BinTianqi/AndroidOwner/issues/6)
ColorOS:请使用调试签名的apk

小天才电话手表(Android 8.1):完全不支持Device owner

Expand Down
10 changes: 7 additions & 3 deletions Readme-en.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Android Owner
# OwnDroid

[简体中文](Readme.md)

### Description

Use Device admin and Device owner privilege to fully manage your Android device.

I'm renaming this app, from "Android Owner" to "OwnDroid".

- [x] rename app
- [ ] update guide
- [ ] rename repo

### Advantage

- Open source. Device owner privilege could be more dangerous than root, close-source software's security is not guaranteed.
Expand All @@ -29,8 +35,6 @@ This software may not have as many features as Google's official [TestDPC](https

### Implementing features

- App manage: package picker
- App manage: permission picker
- User manage: user picker
- Security logs and network logs

Expand Down
8 changes: 6 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Android Owner
# OwnDroid

[English](Readme-en.md)

### 简介

使用安卓的Device Admin和Device Owner特权,完全掌控你的设备。

_我正在为这个App取一个新的名字......_
这个APP正在从"Android Owner"改名为"OwnDroid"

- [x] 重命名app
- [ ] 修改使用指南
- [ ] 修改仓库名

### 优点

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ android {
applicationId = "com.binbin.androidowner"
minSdk = 21
targetSdk = 34
versionCode = 23
versionName = "4.6"
versionCode = 24
versionName = "5.0-preview"
}

buildTypes {
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/com/binbin/androidowner/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import com.binbin.androidowner.dpm.*
import com.binbin.androidowner.ui.Animations
import com.binbin.androidowner.ui.theme.AndroidOwnerTheme
import com.binbin.androidowner.ui.theme.OwnDroidTheme
import com.binbin.androidowner.ui.theme.SetDarkTheme
import com.binbin.androidowner.ui.theme.bgColor

Expand All @@ -69,7 +69,7 @@ class MainActivity : ComponentActivity() {
registerActivityResult()
displayMetrics = applicationContext.resources.displayMetrics
setContent {
AndroidOwnerTheme {
OwnDroidTheme {
MyScaffold()
}
}
Expand Down
46 changes: 9 additions & 37 deletions app/src/main/java/com/binbin/androidowner/Setting.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,19 @@ import android.content.Context
import android.content.Intent
import android.net.Uri
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme.colorScheme
import androidx.compose.material3.MaterialTheme.typography
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.navigation.NavHostController
Expand Down Expand Up @@ -101,41 +97,17 @@ private fun About(){
val pkgInfo = myContext.packageManager.getPackageInfo(myContext.packageName,0)
val verCode = pkgInfo.versionCode
val verName = pkgInfo.versionName
Column(modifier = Modifier.fillMaxSize().padding(horizontal = 8.dp).verticalScroll(rememberScrollState())){
Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState())){
Spacer(Modifier.padding(vertical = 10.dp))
Text(text = stringResource(R.string.about), style = typography.headlineLarge)
Spacer(Modifier.padding(vertical = 5.dp))
Text(text = stringResource(R.string.app_name)+" v$verName ($verCode)")
Text(text = stringResource(R.string.about_desc))
Spacer(Modifier.padding(vertical = 5.dp))
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.fillMaxWidth()
.clickable { shareLink(myContext, "https://github.com/BinTianqi/AndroidOwner/blob/master/Guide.md") }
.padding(start = 8.dp, bottom = 8.dp)
){
Icon(
painter = painterResource(id = R.drawable.open_in_new),
contentDescription = null,
modifier = Modifier.padding(start = 6.dp, end = 10.dp)
)
Text(text = stringResource(R.string.user_guide), style = typography.titleLarge, modifier = Modifier.padding(bottom = 2.dp))
}
Row(
verticalAlignment = Alignment.CenterVertically,
modifier = Modifier
.fillMaxWidth()
.clickable { shareLink(myContext, "https://github.com/BinTianqi/AndroidOwner") }
.padding(start = 8.dp, bottom = 4.dp)
) {
Icon(
painter = painterResource(id = R.drawable.open_in_new),
contentDescription = null,
modifier = Modifier.padding(start = 6.dp, end = 10.dp)
)
Text(text = stringResource(R.string.source_code), style = typography.titleLarge, modifier = Modifier.padding(bottom = 2.dp))
Column(modifier = Modifier.padding(horizontal = 8.dp)){
Text(text = stringResource(R.string.about), style = typography.headlineLarge)
Spacer(Modifier.padding(vertical = 5.dp))
Text(text = stringResource(R.string.app_name)+" v$verName ($verCode)")
Text(text = stringResource(R.string.about_desc))
Spacer(Modifier.padding(vertical = 5.dp))
}
SubPageItem(R.string.user_guide,"",R.drawable.open_in_new){shareLink(myContext, "https://github.com/BinTianqi/AndroidOwner/blob/master/Guide.md")}
SubPageItem(R.string.source_code,"",R.drawable.open_in_new){shareLink(myContext, "https://github.com/BinTianqi/AndroidOwner")}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ private fun activateDeviceAdmin(inputContext:Context,inputComponent:ComponentNam
try {
val intent = Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN)
intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, inputComponent)
intent.putExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION, inputContext.getString(R.string.activate_android_owner_here))
intent.putExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION, inputContext.getString(R.string.activate_device_admin_here))
startActivity(inputContext,intent,null)
}catch(e:ActivityNotFoundException){
Toast.makeText(inputContext,inputContext.getString(R.string.unsupported),Toast.LENGTH_SHORT).show()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fun SetDarkTheme(){
}

@Composable
fun AndroidOwnerTheme(
fun OwnDroidTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
content: @Composable () -> Unit
) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<string name="support_msg_desc">如果你禁用了某个功能,用户尝试使用这个功能时会看见这个消息(可多行)</string>
<string name="long_support_msg">提供支持的长消息</string>
<string name="transform">转移</string>
<string name="activate_android_owner_here">在这里激活Android Owner</string>
<string name="activate_device_admin_here">在这里激活Device admin</string>

<!--Shizuku-->
<string name="not_primary_user_not_support_shizuku">暂不支持在非主用户中使用Shizuku</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<!--Global-->
<string name="app_name" translatable="false">Android Owner</string>
<string name="app_name" translatable="false">OwnDroid</string>
<string name="disabled">Disabled</string>
<string name="enabled">Enabled</string>
<string name="disable">Disable</string>
Expand Down Expand Up @@ -78,7 +78,7 @@
<string name="support_msg_desc">When you try to use functions disabled by this app, the support message will show. </string>
<string name="long_support_msg">Long message</string>
<string name="transform">Transform</string>
<string name="activate_android_owner_here">Activate Android Owner here. </string>
<string name="activate_device_admin_here">Activate Device admin here. </string>

<!--Shizuku-->
<string name="shizuku" translatable="false">Shizuku</string>
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ dependencyResolutionManagement {
}
}

rootProject.name = "Android Owner"
rootProject.name = "OwnDroid"
include(":app")

0 comments on commit 37ab2e3

Please sign in to comment.