RENAME app to OwnDroid

#2
This commit is contained in:
BinTianqi
2024-04-16 18:42:31 +08:00
parent 094399ce19
commit 37ab2e3b1f
11 changed files with 35 additions and 53 deletions

View File

@@ -29,6 +29,8 @@
### Device admin
有时候叫“设备管理器”
权限最小,数量不限
#### 激活
@@ -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

View File

@@ -1,4 +1,4 @@
# Android Owner
# OwnDroid
[简体中文](Readme.md)
@@ -6,6 +6,12 @@
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.
@@ -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

View File

@@ -1,4 +1,4 @@
# Android Owner
# OwnDroid
[English](Readme-en.md)
@@ -6,7 +6,11 @@
使用安卓的Device Admin和Device Owner特权完全掌控你的设备。
_我正在为这个App取一个新的名字......_
这个APP正在从"Android Owner"改名为"OwnDroid"
- [x] 重命名app
- [ ] 修改使用指南
- [ ] 修改仓库名
### 优点

View File

@@ -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 {

View File

@@ -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
@@ -69,7 +69,7 @@ class MainActivity : ComponentActivity() {
registerActivityResult()
displayMetrics = applicationContext.resources.displayMetrics
setContent {
AndroidOwnerTheme {
OwnDroidTheme {
MyScaffold()
}
}

View File

@@ -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
@@ -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))
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))
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))
}
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")}
}
}

View File

@@ -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()

View File

@@ -95,7 +95,7 @@ fun SetDarkTheme(){
}
@Composable
fun AndroidOwnerTheme(
fun OwnDroidTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
content: @Composable () -> Unit
) {

View File

@@ -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>

View File

@@ -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>
@@ -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>

View File

@@ -13,6 +13,6 @@ dependencyResolutionManagement {
}
}
rootProject.name = "Android Owner"
rootProject.name = "OwnDroid"
include(":app")