[script]replace kingroot's kinguser with supersu - Android Software/Hacking General [Developers Only]

Remove KingRoot’s KingUser with SuperSU using Terminal [Requires Intermediate skills]
This method works for almost all the android devices and works the best, However, it requires some decent skills to follow the instructions and copy the commands listed below into the Terminal app.
The link of the script which is shared below works without a computer system/PC, Hence the steps I’m listing below won’t require a computer PC. So are you ready?
Downloads
This download section has the download links to the files or apps you will require to complete the below listed steps. Ready to shift from KingUser to SuperSU? What are you waiting for?
lets begin.
1.Download & Install Terminal Emulator App
2.Download SuperSu script from here http://www.mediafire.com/file/mxzbt42xypvn2ts/Replace_Kinguser_with_SuperSU-v2.4.zip and unzip it!
Steps to Replace KingUser with SuperSU?
Step 1: Extract the Replace_Kinguser_with_SuperSU ZIP File & Transfer the extracted version to Internal storage of device.
Install the Terminal app for Android and extract the Replace_Kinguser_with_SuperSU file and after extracting the Replace_Kinguser_with_supersu file transfer the “Extracted Folder – MRW” to outermost directory in the internal storage.
Step 2: Open Terminal Android App & Write the Following commands in the Android Terminal.
Open the terminal android app type the command “su” in the terminal, after writing the SU in terminal, you will be prompted with the message box asking you to deny/grant the functions. Granting permission will help you remove the kinguser on your smartphone.
After granting permissions you will have to type one single line of code, The other command will be: sh /sdcard/mrw/root.sh
After writing the above command, it might show some error, but ignore that error, it will automatically launch SuperSU, in case it doesn’t manually open SuperSU.
Once done, Restart your smartphone and you will see that SuperSU works flawlessly on your Smartphone. That’s all, you’ve successfully replaced KingRoot’s KingUser with Chainfire’s SuperSU.
Huge thanks to the Dev of the script
Source and Download link credits goes to Droidmen.com
Thread link of Droidmen: https://www.droidmen.com/remove-kingroot-kinguser-with-supersu/
I shared this guide from droidmen if you found this guide useful PLEASE HIT THANKS BUTTON!​

RESERVED

Good
Sent from my Redmi Note 3 using Tapatalk

can anyone confirm it in above 4.4 ?

sohamsen said:
can anyone confirm it in above 4.4 ?
Click to expand...
Click to collapse
Well it works on 4.4.2 but you need you manually uninstall kinguser in system after.

Arkonite said:
Well it works on 4.4.2 but you need you manually uninstall kinguser in system after.
Click to expand...
Click to collapse
mine uninstalled automatically

Replace kingroot with supersu
Here you can get the most effective way to replace kingroot with supersu;
How to replace kingroot with supersu

King roots

Related

[Q] Terminal Emulator - Permission denied

Hello!
I don't know how to pass this problem. I have downloaded superuser app but it was futile.
TE can install aps from .apk? And other files management?
Sent from my Nexus S using XDA App
Kalimdor said:
Hello!
I don't know how to pass this problem. I have downloaded superuser app but it was futile.
TE can install aps from .apk? And other files management?
Sent from my Nexus S using XDA App
Click to expand...
Click to collapse
did you root your phone? The superuser app relies on the su binary being installed, in other words, just downloading superuser from the market doesn't root you.
Then, in the terminal emulator app, many commands require you to type "su" to enable the terminal to have root access.
To root I have used this topic :
http://forum.xda-developers.com/showthread.php?t=927838
So I can manage my phone from google SDK adb command line but from Terminal emulator I can't.
Now superuser app is asking me to : 'A zip filr (su-2.3.1-bin-signed.zip) has been placed on your sdcard, please reboot into recovery mode and flash it to update your su binary' ...
Well...the superboot method shouldn't need you to install su, it's supposed to do it for you.
The message you're getting is telling you to boot into recovery and install that zip. I don't know if it will flash from the stock recovery, but it will certainly flash from clockwork recovery if you boot into clockwork.
Key I will try from clockw. Stock found problem with certificates.

[Solved] Replace KingUser with SuperSU and Binary Update fix

Hey everyone,
I'll be showing you the easiest way to replace Kinguser/KingoSuperUser or any other superuser app with SuperSU.
Procedure:
1. Download & Install ES File Explorer
2. In ES File Explorer menu ☰ , scroll down and enable the Root Explorer option
3. Now click on Homepage > Device > System > app
4. Once you're in the system/app folder, look for Kinguser.apk or KingoSuperUser.apk or any other Superuser apk that you have.
5. Delete that Superuser.apk, and go to Playstore and install that same Superuser app. Once installed, uninstall it from Playstore.
6. Now download and install SuperSU and update binaries via normal mode.
7. After 2 to 5 minutes, your binary will be updated, SuperSU will be installed correctly and now reboot your phone.
Note: Do not worry, deleting the SuperUser .apk will not unroot your phone. And this is also a fix for binary update issue.
MSalmanKhan17 said:
5. Delete that Superuser.apk, and go to Playstore and install that same Superuser app. Once installed, uninstall it from Playstore.
Click to expand...
Click to collapse
I don't understand that step. I rooted with KingRoot but this App isn't on playstore.
So I deleted the .apk, installed new from my downloaded apk and uninstalled with Titanium Backup.
The SuperSU still complains that it cannot replace the su-binary.
Any idea?
My phone is a Honor 4X Che2-L11 with an ARM Cortex-A53 Processor.
tosho1 said:
I don't understand that step. I rooted with KingRoot but this App isn't on playstore.
So I deleted the .apk, installed new from my downloaded apk and uninstalled with Titanium Backup.
The SuperSU still complains that it cannot replace the su-binary.
Any idea?
My phone is a Honor 4X Che2-L11 with an ARM Cortex-A53 Processor.
Click to expand...
Click to collapse
I followed the manual steps that Supersu says when installing the app (redirects to a web). It says there are 2 options, the other is installing Supersu-Me, but I haven't tried that (there seems to be issues for Lollipop). Also, in my device there was only one Kingo Superuser app and a Kingo Link app (I have seen webs where Kingo installs up to 3 things).
You need root (Kingo), su binary file, busybox, terminal emulator, ES explorer, supersu app.
Step 1: Install ES explorer with root.
Step 2: Rename Su to .SU
Step 3: Copy .SU to system/xbin
Step 4: Authorize .Su. For that, open terminal and type:
system/bin/su
mount -o rw,remount -t rootfs rootfs /system
chmod 777 /system/xbin/.su
Step 5: delete the other SU files, such as ksu, etc.
# check attributes
busybox lsattr /system/xbin/su
# remove a and i
busybox chattr -a /system/xbin/su
busybox chattr -i /system/xbin/su
# remove su
rm /system/xbin/su
Step 6: Rename.SU to SU
Step 7: Go back to the desktop to delete the other authorization apps, uninstall KingoRoot,
open SuperSU, it should ask to update binaries, choose yes, choose NORMAL, and reboot.
Hope it helps!
where is file ,
pzl upload the su file here,
and ur procedure is not understanding
properly ,
plz give procedure how to do this ,
or upload video,
@tosho1 its because huawei protect system partition on locked bootloader devices.
reflash stock rom, root with kingroot, flash twrp with rashr, unroot inside of kingroot and flash supersu with twrp
(you will be able to unroot because system is still mounted after rooting but after reboot you wont be able to touch it, thats why you have to use kingroot only to flash twrp and then remove it when you are still able to)
(method tested and working on my own che2-l11)
Thanks for your reply MarcoPLs.
Meanwhile I managed to get root working flawlessly. Don't ask me, how It's too long ago.
hijackerdev said:
where is file ,
pzl upload the su file here,
and ur procedure is not understanding
properly ,
plz give procedure how to do this ,
or upload video,
Click to expand...
Click to collapse
What worked for me was finding older version of kingroot app and rooting with that then using super SU me.apk
Replace kingroot with supersu
Here you will learn how to replace kingroot with supersu
Replace Kingroot With SuperSU

[MyPhone My27] Changing from Kingroot to Super User

First of All it's not Mine. I just wanna post it here for I know lots of Android user comes here to get help. Just spreading some little Help.
Requirements:
1. Terminal Emulator App
2. Zip File
3. Working Internet Connection
#-#-#-#-#-#-#-#-#-#---Let's Start---#-#-#-#-#-#-#-#-#-#
1. First download/Install Terminal Emulator (available on Play Store)
2. Extract the Downloaded Zip file in the root of your SD card and copy the extracted file on your internal memory. Means SD card and internal memory has this same file.
3. Open Terminal Emulator and type the command
su
4. Hit enter
5. Then Terminal Emulator will ask for root permission, grant it, and enter the commands
su /sdcard/mrw/root.sh
6. Hit Enter
7. Now, it will start running script and wait for approximately 2-3 minutes. MAKE SURE YOU HAVE YOUR DATA/INTERNET CONNECTION TURNED ON.
8. When it's done, open your app drawer and you'll see a super su app, open it.
9. It will ask you to update binary user binary, click Continue and click Normal Mode
10. It may ask you that other root app/s are already installed, just click OK and it will remove King root app from your phone and replace it with Super Su. (Note: sometimes it takes more than a minute, just be patient)
11. Click reboot if asked and Your Done!!..
Credits:
https://missingtricks.net/replace-kingroot-kinguser-with-supersu-superuser-android-guide/

[HOWTO] Root ZB690KG

Normally, we would root device(s) with SuperSU|Phh|Magisk through a customised TWRP|CWM recovery.
Currently, there's no known custom recovery available and the only root solution is through Kingroot app.
* To the moderator(s), please move this to "asus zenfone go" thread per intention.
Updated: [20171210]
1. ROOT
To root this device, go to Kingroot's xda thread and install app-v5.3.0. Just follow the rooting[*] instructions accordingly and that's it.
* Be warned that internet access (data or wifi) is required! So before installing the app, do consider backing-up your personal data and doing a factory reset. Fyi, it can be done without sim card attached.
2. REPLACE KINGROOT WITH SUPERSU
The various scripts (mrw) available on the internet does not work with Kingroot-v5.3.0.
After going through SuperSU's ZIP script and further readings, I was able to replaced it with SuperSU-v2.76.
I made a simplified script[*] specifically targetting this device[**] with this root version.
* To be executed on a terminal window session (or ADB).
** CPU architecture is "armv7" and API level is "sdk22".
Steps:
2.1 Download supersu.zip and extract ZIP -> place "supersu" folder in device's internal storage
2.2 Download and install Terminal Emulator -> open it and type "su" -> grant root permission and type "sh /sdcard/supersu/ku2su.sh"
Code:
su
sh /sdcard/supersu/ku2su.sh

What is the right way to turn an app into a system app under Android Oreo and above ?

I have tried several methods to turn an app into a system app but even if in some case I managed to install the app inside /system/priv-app the app was not running as a system app as I could figure out by checking running the command "adb shell ps".
So please could someone tell me if I missed something or if there is some limitation link to Lineage or may be Magisk or TWRP to have an app runing as a system app ?
I have tried with Lineage 15.1 (Oreo) and magisk 21.2 the phone is a Samsung S5 using TWRP 3.5.0_9-0 as system Recovery
First method was to
1 making a copy of the app folder to the internal storage
2 renaming that copied Folder with a short name without dot (like renaming com.example.myapp folder to Myapp Folder)
3 renaming the apk from base.apk to Myapp.apk
4 uninstalling the app
5 under TWRP recovery mode mount the system partiton and copying the Myapp folder to system/priv-app directory
6 chmod 755 Myapp Folder
7 chmod 644 Myapp.apk
8 wipe Dalvilk Cache and rebooting
Steps 2 and 3 might be useless it was just because I noticed the Priv-app directory used these naming Scheme for apps inside this folder
I tried this method also under Lineage 17.1 and Magisk 21.4 but then the phone was not able to reboot until I delete the newly created folder inside Priv-app
I also tried another method using Magisk Systemize (Terminal) module but the result was the same (the app was running but not as a system app)
As I have never seen that it was mentionned in any posted method explaning how to turn an app into a system app, the installed app was not signed with the platform key and the manifest was not including android:sharedUserId="android.uid.system"
Thanks in advance to those that will try to help.
Have you tried copying it to /system/app ?
Droid_76 said:
Have you tried copying it to /system/app ?
Click to expand...
Click to collapse
Yes and unfortunately the result was exactly the same
If DM-Verity & AVB are enabled these locks must get disabled before trying to operate on /system partition
jwoegerbauer said:
If DM-Verity & AVB are enabled these locks must get disabled before trying to operate on /system partition
Click to expand...
Click to collapse
Thanks but I don't think I have these enabled as I can mount write on the system partition, how do you check whether they are enabled or not ?
Newer Android versions have these locks by default enabled - they are set within file vbmeta.img : If enabled then phone's bootloader always loads device's Stock ROM, not any modded ROM where it doesn't matter whether partitions temporarily got mounted - by you - as RW or not.
Long story short: You've to unlock phone's bootloader, if not done yet, then disable the locks
Example code:
Code:
adb devices
adb reboot fastboot
fastboot devices
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
I wonder what's the difference between a system app and a common app.
James_Watson said:
I wonder what's the difference between a system app and a common app.
Click to expand...
Click to collapse
Apps developed as system app / system privileged app can access System APIs whereas common user app cannot.
Simply installing a common user app as system app / system privleged app makes NO SENSE at all.
jwoegerbauer said:
Newer Android versions have these locks by default enabled - they are set within file vbmeta.img : If enabled then phone's bootloader always loads device's Stock ROM, not any modded ROM where it doesn't matter whether partitions temporarily got mounted - by you - as RW or not.
Long story short: You've to unlock phone's bootloader, if not done yet, then disable the locks
Example code:
Code:
adb devices
adb reboot fastboot
fastboot devices
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
Click to expand...
Click to collapse
Thanks but correct me if I'm wrong I could not have installed LineageOS TWRP and Magisk if Dm-verify was active so I don't think it is the issue here. I'm still looking forward what is preventing the app to run as a system app when it is installed in system/priv-app. The app is then running but as a standard app.
Lisadev said:
I'm still looking forward what is preventing the app to run as a system app when it is installed in system/priv-app. The app is then running but as a standard app.
Click to expand...
Click to collapse
Must admit I don't understand your problem: an app either runs or runs not where it doesn't matter where it's located. That's also true if an app has root rights granted.
IMO only thing of interest is what Android app's permissions are granted. A permission SYSTEM / ALLOW_ALL what I think you expect to be there doesn't exist. See also here:
https://developer.android.com/reference/android/Manifest.permission#public-constructors_1
I ran into problems with a couple of methods as well. People said they would work, but they were no good. But do you know what has worked for me, reliably and consistently?
App Systemizer.
Just search for App Systemizer through Magisk. Download and install, then reboot. Now, open up a terminal with superuser privileges. Yeah, gotta use a terminal for this one. Open terminal and enter the command su (in case you didn't know how to get superuser privileges through a terminal). Once you've done that, enter the command systemize and then follow the prompts.
I had problems with other methods. This was the one that worked. Give it a try.
Start command prompt on your computer to navigate where the APK file is located. Enable USB debugging on your device and connect it to the computer via USB cable. Your phone will automatically rebooted and your app will now be saved as a system app.
jwoegerbauer said:
Must admit I don't understand your problem: an app either runs or runs not where it doesn't matter where it's located. That's also true if an app has root rights granted.
IMO only thing of interest is what Android app's permissions are granted. A permission SYSTEM / ALLOW_ALL what I think you expect to be there doesn't exist. See also here:
https://developer.android.com/reference/android/Manifest.permission#public-constructors_1
Click to expand...
Click to collapse
Fore instance there is some permissions like REBOOT that require a system app you will not be able to reboot through PowerManager otherwise even if I know you can rebbot by other means on a rooted phone using some su command.
FailSafeNow said:
I ran into problems with a couple of methods as well. People said they would work, but they were no good. But do you know what has worked for me, reliably and consistently?
App Systemizer.
Just search for App Systemizer through Magisk. Download and install, then reboot. Now, open up a terminal with superuser privileges. Yeah, gotta use a terminal for this one. Open terminal and enter the command su (in case you didn't know how to get superuser privileges through a terminal). Once you've done that, enter the command systemize and then follow the prompts.
I had problems with other methods. This was the one that worked. Give it a try.
Click to expand...
Click to collapse
Yes thanks but if you read my first post you will see that I have tried Systemizer and it works in the sense that the app in installed inside system/priv-app folder and is able to run but it does not run as a system app
nihitthakkar said:
Start command prompt on your computer to navigate where the APK file is located. Enable USB debugging on your device and connect it to the computer via USB cable. Your phone will automatically rebooted and your app will now be saved as a system app.
Click to expand...
Click to collapse
I don't get it, you probable forgot to post something in your message
Lisadev said:
Yes thanks but if you read my first post you will see that I have tried Systemizer and it works in the sense that the app in installed inside system/priv-app folder and is able to run but it does not run as a system app
Click to expand...
Click to collapse
It doesn't? How can you tell? Maybe I've been missing something all this time. Maybe I only think App Systemizer works.
Lisadev said:
Não entendi, provavelmente você se esqueceu de postar algo em sua mensagem
Click to expand...
Click to collapse
Hello Friend! This question is a mystery to me. A while ago I created a thread explaining how to turn the Cerberus app into a system app and still survive a factory reset. I can guarantee you that my method worked until about 4 months ago.
This is the thread:
[GUIDE] [CERBERUS] [MAGISK] How to install Cerberus as System app.
Hello friends, I bring good news. Yes! It is possible to install Cerberus as a system app. (Even if it's rooted with Magisk) Yes, Cerberus will survive a factory reset. And your device will be traceable after a factory reset. Obviously the...
forum.xda-developers.com
For some reason now I also can't make an apk stay in Priv-app after reboot.
Even after I successfully flash vbmeta.img as described in the link below, I can't get it to work.
How to disable dm-verity or Android Verified Boot (AVB)
This is a quick guide showing how to disable dm_verity or Android Verified Boot (AVB). Disabling dm-verity / AVB is only important if you intend to flash custom images such as patched boot, custom rec
forum.hovatek.com
The question that everybody wants to hear. Did any methods work for you?
At the time of posting this (9th oct, 2021), this method works in my Android 10 (dunno 11, but most prob.)
Used Magisk root
1) First step, make /system writable (google made it read-only) by applying instruction from this thread - https://forum.xda-developers.com/t/script-android-10-universal-mount-system-read-write-r-w.4247311/
This will make sure that folders moved into /system/app or /system/priv-app are permanent across reboots.
2) Install Lucky Patcher (search google to download)
3) Go to Magisk manager and install Lucky Patcher Module for moving apps to system.
4) Normally install the app you are aiming for. Grant it all necessary permissions by going to apps settings. (don't skip this particular step. Skipping it can make permissions not able to grant later on)
5) Go to Lucky Patcher and select the app, select tools option and then select move to /system/priv-app. Tick the use Magisk module checkbox
( No, not done yet. Remember, module only mounts the app, not truly move it to /system/priv-app )
6) Turn off the Lucky Patcher Module in Magisk and reboot. You will notice app has disappeared from system (expected behaviour)(don't skip this step)
7) Open a terminal app.
Type-
su
mount -o remount,rw /
After success (may need to reboot),
open a root file manager, go to folder /data/adb/modules/luckypatcher_apps/system
Here, you would find the real apk folder for /system/priv-app as well as the permission configuration for /system/etc/permissions
Copy both folders to respective /system directories.
(we use Lucky Patcher here since it generates correct files with the right permissions, but of course, App Systemizer may also be used, but the steps change and I don't use it, so continue)
8) Go to /data/data folder and delete the app data folder for the app that was moved to /system/priv-app (prevents bugs if any)
9) Reboot phone. Now the app you wanted is fully system privileged with it actually existing in /system/priv-app (can check with TWRP's file manager).
There is no modules like App Systemizer or Lucky Patcher module mounting it. Done.
10) As an aside, just delete the /data/adb/modules/luckypatcher_apps/system folder. Like this, no problem will arise even if you enable this module again for whatever reason.
That's it, all done. Survival across reboots is already a sure thing. Now try to Factory Reset if you want to test if it survives across resets.
*Note - Of course, just make a Nandroid and internal SD backup in case.
Who doesn't want a "Save Game" option in life?
System App is not easily uninstalled by user, so it is a type of must have app as a android OS for a specific vendor(HTC, MOTO, Samsung).
Now how we can make an app as a system App.
Have source code
Have .apk Only
Step 1 Create a folder inside packages/apps/
First create a folder for your app ( Let say MyTestApp) inside packages/apps/ of your android AOSP downloaded source code.
Then create a Android.mk file inside the folder(MyTestApp).
Step 2 open Android.mk file and add folowing code Snippet and save this mk file.
Step 3 put your app name in build/target/product/ folder
open core.mk file from build/target/product/ folder and add your app name(MyTestApp) in
PRODUCT_PACKAGES tag at the bottom MyTestApp.
Now step by step procedure for .apk file
Step 1 will be same like above
only change is that in place of src, res folder just put your .apk file.
step 2 open Android.mk file and add folowing code Snippet.
Step 3 will be same as above mention for Android source code (a)
This is all about how to make an android app as a system App.
Jeffrey A. Hancock said:
System App is not easily uninstalled by user, so it is a type of must have app as a android OS for a specific vendor(HTC, MOTO, Samsung).
Now how we can make an app as a system App.
Have source code
Have .apk Only
Step 1 Create a folder inside packages/apps/
First create a folder for your app ( Let say MyTestApp) inside packages/apps/ of your android AOSP downloaded source code.
Then create a Android.mk file inside the folder(MyTestApp).
Step 2 open Android.mk file and add folowing code Snippet and save this mk file.
Step 3 put your app name in build/target/product/ folder
open core.mk file from build/target/product/ folder and add your app name(MyTestApp) in
PRODUCT_PACKAGES tag at the bottom MyTestApp.
Now step by step procedure for .apk file
Step 1 will be same like above
only change is that in place of src, res folder just put your .apk file.
step 2 open Android.mk file and add folowing code Snippet.
Step 3 will be same as above mention for Android source code (a)
This is all about how to make an android app as a system App.
Click to expand...
Click to collapse
This means to compile the ROM yourself?

Categories

Resources