0
0
Fork 0
mirror of https://github.com/YTVanced/VancedManager synced 2024-11-26 05:05:15 +00:00

small updates

This commit is contained in:
Xinto 2020-11-16 15:52:23 +04:00
parent d076466f8f
commit 48f376a246
6 changed files with 17 additions and 3 deletions

View file

@ -82,7 +82,7 @@ object VancedDownloader: CoroutineScope by CoroutineScope(Dispatchers.IO) {
"arch" -> "$installUrl/apks/v$vancedVersion/$variant/Arch/split_config.$arch.apk"
"stock" -> "$themePath/stock.apk"
"dpi" -> "$themePath/dpi.apk"
"lang" -> "$installUrl/apks/v$vancedVersion/$variant/Language/split_config.${lang?.get(count)}.apk"
"lang" -> "$installUrl/apks/v$vancedVersion/$variant/Language/split_config.${lang[count]}.apk"
else -> throw NotImplementedError("This type of APK is NOT valid. What the hell did you even do?")
}

View file

@ -42,6 +42,7 @@ class GrantRootFragment : BindingFragment<FragmentGrantRootBinding>() {
private fun grantRoot() {
if (Shell.rootAccess()) {
getDefaultSharedPreferences(requireActivity()).edit { putString("vanced_variant", "root") }
navigateToFirstLaunch()
} else {
Toast.makeText(requireActivity(), R.string.root_not_granted, Toast.LENGTH_SHORT).show()
}

View file

@ -466,7 +466,7 @@ object PackageHelper {
private fun linkApp(apkFPath: String, pkg:String, path: String): Boolean {
Shell.su("am force-stop $pkg").exec()
val umountv = Shell.su("""for i in ${'$'}(ls /data/app/ | grep $pkg | tr " "); do umount -l "/data/app/${"$"}i/base.apk"; done """).exec()
Shell.su("""for i in ${'$'}(ls /data/app/ | grep $pkg | tr " "); do umount -l "/data/app/${"$"}i/base.apk"; done """).exec()
val response = Shell.su("""su -mm -c "mount -o bind $apkFPath $path"""").exec()
Thread.sleep(500)
Shell.su("am force-stop $pkg").exec()

View file

@ -44,6 +44,16 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/grant_root_fab"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nonroot"
android:textSize="15sp"
app:layout_constraintBottom_toTopOf="@id/grant_root_finish_fab"
app:layout_constraintEnd_toEndOf="@id/grant_root_finish_fab"
app:layout_constraintStart_toStartOf="@id/grant_root_finish_fab"
android:layout_marginBottom="8dp"/>
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/grant_root_finish_fab"
android:layout_width="wrap_content"

View file

@ -6,6 +6,9 @@
<string name="microg" translatable="false">Vanced microG</string>
<string name="music" translatable="false">YouTube Music</string>
<string name="root">root</string>
<string name="nonroot">nonroot</string>
<!-- prefs -->
<string name="firebase" translatable="false">firebase</string>
<string name="use_custom_tabs" translatable="false">use_custom_tabs</string>

View file

@ -21,7 +21,7 @@
<string name="select_apps_music">Vanced, but for YouTube Music!\nrelatively less feature-rich but fulfills your needs.</string>
<string name="select_apps_vanced">YouTube Vanced is the stock Android YouTube App, but better!</string>
<string name="lets_get_started">Let\'s get started</string>
<string name="willing_to_use_root">Willing to use the root version? Just hit the button below, else tap to continue</string>
<string name="willing_to_use_root">Don\'t know what this is or don\'t want to use the root version? just click the blue arrow below!</string>
<!-- Home Page -->
<string name="about_app">About %1$s</string>