Will installing TWRP allow adb root? - Xiaomi Mi A2 / 6X Questions & Answers

I just want to run a couple of 'setprop' commands to enable cam2api and eis.
To install twrp, we need oem unlock, of course. Once installed, would I be able to connect via usb and run 'adb root', to then do the setprop commands?
I'm just trying to keep it simple, enable cam2api and eis, and go back to stock, if possible.
Sound do able?

Actually, now that I think about it, maybe twrp isn't needed at all for 'adb root'? Maybe just unlock bootloader, device resets, enable dev and adb, connect usb and then 'adb root'?
without oem unlock (iow, as it is now); 'adb root' returns 'adbd cannot run as root in production builds'. But with oem unlock then it may work?

AsItLies said:
I just want to run a couple of 'setprop' commands to enable cam2api and eis.
To install twrp, we need oem unlock, of course. Once installed, would I be able to connect via usb and run 'adb root', to then do the setprop commands?
I'm just trying to keep it simple, enable cam2api and eis, and go back to stock, if possible.
Sound do able?
Click to expand...
Click to collapse
You do not need twrp. You need root access. Even then you cannot just run "adb root" because debugging and secure flags in the default.prop (which is compiled into vendor and boot images) disable that exact command. I was able to find a workaround though. You still need root (systemless should allow ota updates so don't worry about that) but in place of "adb root" run the following.
adb shell
su
mount -o rw,remount -t ext4 /system
exit
This will do the same thing, just through adb shell instead of straight adb.
If you really want to go stock, (no root) you can root the device and download a build prop editor (tons of them on the play store) edit the values you want, then unroot by flashing the stock boot.img. Just keep your bootloader unlocked. You're welcome!

For those following along on this adventure
One thing you can do now, if you haven't already, is be sure you have the (one of the) recent versions of fastboot installed. Older versions don't recognize multiple 'slots' (The A & B slots on the MiA2). The following link has the packages for Linux, Windoh's, and Mac.
To test your fastboot just use 'fastboot -h' and you'll want to see options like '--slot' and '--set-active[=SLOT]. If you have that already, at least this part is accomplished, if not, need to update your fastboot.
https://developer.android.com/studio/releases/platform-tools
Great info @Daha3ker - looking for a simple systemless root now. Trying to keep it all as simple as possible

AsItLies said:
For those following along on this adventure
One thing you can do now, if you haven't already, is be sure you have the (one of the) recent versions of fastboot installed. Older versions don't recognize multiple 'slots' (The A & B slots on the MiA2). The following link has the packages for Linux, Windoh's, and Mac.
To test your fastboot just use 'fastboot -h' and you'll want to see options like '--slot' and '--set-active[=SLOT]. If you have that already, at least this part is accomplished, if not, need to update your fastboot.
https://developer.android.com/studio/releases/platform-tools
Great info @Daha3ker - looking for a simple systemless root now. Trying to keep it all as simple as possible
Click to expand...
Click to collapse
My tool installs systemless and removes it. If you choose root, do what you need to do, then unroot you should be good. The toolkit is about as simple as it gets right now when it comes to rooting.
https://forum.xda-developers.com/mi-a2/how-to/mi-a2-toolkit-unlock-bootloader-root-t3834585
Otherwise you can use https://forum.xda-developers.com/mi-a2/how-to/guide-how-to-root-xiaomi-mi-a2-magisk-t3831586
root your phone, do what you like then follow the same steps to flash the stock boot.img instead of the rooted version.
P.S. All root options available right now are systemless unless you install a custom rom.
P.P.S. Setprop commands are used systemlessly (Applied at boot using magisk). so if you unroot, your custom values will not stay. You must edit the actual build.prop
A set of steps to try:
1. Root the device. Toolkit or Manually
2. Install https://play.google.com/store/apps/details?id=com.jrummy.apps.build.prop.editor&hl=en_US or similar on your phone.
3. Add the following to the end of the build.prop
persist.camera.HAL3.enabled=1
4. reboot phone and verify it is enabled using https://play.google.com/store/apps/details?id=com.airbeat.device.inspector or similar. If level 3 is green then you are good, if not then I may be missing another value that needs changing.
5. unroot the device using the same method you used earlier to root the device. Toolkit or Manually
6. reboot and see if the settings stuck. I am curious to see if it works..

Related

[Newbie Guide] adb/fastboot/bootloader/android 101

The purpose of this document is to clarify a few basics about HTC Android Phones and basic commands to interface with the phones. Think of this as a beginner's guides to the Android device from a non-traditional user's point of view. I'll keep it simple and plain as much as I can for the new users. I'll also try to keep all the technical aspects true as much as I can while keeping it simple.
Before you go on, please read this and understand the basic concepts and how and why following commands are being used. Do not follow anyone's instructions/tutorials/guides without prior basic understanding of what each command do. I do want to believe it's humans visiting this forum and not lemmings. If you do not understand, feel free to ask here. I will or someone else also knowledgeable will answer your questions. DO NOT QUOTE THIS AS A WHOLE. My pet peeves and a complete waste of screen space.
Sometime, depending on your OS, command names may change (e.g: mouse / mouse.exe / mouse-linux / mouse-mac). For general purpose, we'll use mouse instead of an OS specific commands in this instructions.
So to repeat myself, if you understood the concepts of the commands, and you are on a linux system and someone's guide says touch index.php, you will automatically type touch-linux or whatever the name of your executable is on your system.
​
We shall assume you know how to install needed drivers and where to get android sdk and put the sdk binaries (executables) in the system path. If we need to expend this let me know and I'll expend this here.
Further, if I get any parts wrong, PM me and I'll get those parts corrected.
Android Partition, SPL etc.
Partitions:
Followings are a list of partitions on your android phone.
misc - misc partition -
recovery - Recovery Partition - This is where the original HTC recovery or Amon Ra's recovery or any other Recovery would go. Basically if you reboot into recovery it'll boot from here.
boot - This is your boot partition
system - This is where all your system information (ROM resides)
cache - cache (When you factory reset the phone, this area is wiped)
userdata - user data (like your login, your user settings etc) When you factory reset the phone, this area is wiped)
So, if you replace the recovery image, you are pretty much set for updates provided here at XDA. Note: By replacing your recovery image, you may not be able to have OTA updates.
ROM images will normally replace boot and system images at the same time and often time, userdata and cache too; reseting the phone completely.
SPL/Bootloader/Radio/Bricking Phones:
SPL / Bootloader is like BIOS on a computer. At least I think of it that way. SPL can be updated! SPL comes as either Security-On of Security-Off (S-ON/S-OFF).
Note: It is my understanding that radio will boot first, followed by other systems. So it is IMPORTANT that your radio image/version will work with your SPL image/version. This is the one and only reason for phones being bricked. You can not brick your phone by flashing a ROM or Boot image or recovery image. Once you flash the wrong radio for the SPL, the only known method of recovery is to send the phone back into HTC for repair.
How do I know the phone is bricked? A bricked phone can not boot into bootloader, recovery, or into normal operation modes. You can not connect to a bricked phone via adb or fastboot. You can only see one screen on the phone and it will be the first splash screen.
Commands:
adb - Android Debug Bridge - One of the two things you'll need to know if you ever want to do anything non-conventional on your android based phone.
List of commands that can be used by adb can be prompted by typing adb at the system shell (command prompt or terminal)
Notable adb commands:
adb devices - If you don't know anything, this is the ONE thing you have to know.
adb devices will give you a list of devices connected to the computer. This is also a good way to make sure that your phone is actually connected to the computer.
adb reboot (bootloader|recovery)
adb reboot - this will reboot your phone normally.
adb reboot bootloader - this will reboot your phone back into the bootloader (white screen with the android on wheels)
adb reboot recovery - this will reboot your phone back into recovery console (either default or amon_ra's recovery).
adb shell - this will shell into the phone and you can now explore the phone. Remember phone's native backend os is linux so know your linux commands.
adb remount - remounts the system partition on the phone so you can you read/write to it.
adb push xxx yyy - will push xxx file from computer into yyy location/file on phone (needs rooted access)
adb pull xxx yyy - will pull xxx file from phone into yyy location/file on computer (needs rooted access)
Fastboot is protocol used to update the flash filesystem in Android devices from a host over USB. It allows flashing of unsigned partition images.
Notable fastboot commands:
fastboot devices - If you don't know anything, this is the ONE thing you have to know.
fastboot devices will give you a list of devices connected to the computer. This is also a good way to make sure that your phone is actually connected to the computer.
fastboot reboot - this will reboot your phone normally
fastboot oem unlock - this will unlock your bootloader - NOTE THIS WILL VOID YOUR NEXUS ONE WARRANTY
fastboot erase XXX - Will erase the partition XXX (such as userdata, cache) - mainly used for resetting phone and clearing userdata / factory settings.
fastboot flash XXX YYY - This will flash XXX partitionn with YYY image.
e.g: fastboot flash system system_update.img will flash/update your system partition with an image called system_update
If anyone needs me to dig deep into using anything else, please PM me. I'll add it on here. Hopefully this will help all newbies about the basic commands and what they do.
FAQs (UPDATED Feb 09, 2010)
Q: One question about the Android SDK. Do I need it to flash my N1 or just to program new apps? Where can I get it?
A: Android SDK is not entirely needed to flash the N1. However, there are tools in there that you need. Adb / Fastboot etc. Although they can be downloaded by themselves, the windows version of the SDK also have the Drivers that are needed for android devices for USB connection. So, it is recommended to get it. You can get it from developer.android.com
Q:I have never experienced anything like this when I did a hard-spl on my winmo phone. Radio versions are included with SPL's, right?
A: Official packages from HTC did come with nbh packaging, meaning it is a all in one upgrader that will update Radio, ROM, System etc, it is very much common for active development area here at XDA to get the radio or SPL or ROM separately and independently of one another. And as such, you will most likely flash them seperately (who wants to wait 6-8 months). Also, since this phone is released by google, HTC will most likely not update any major Radios. However, it is very likely that we will be hacking in Radio updates or any other "updates" from HTC from their new device - HTC Bravo.
Q: Is there a guide for snow leopard? I'm kind of stuck.
A: I personally ran android SDK and aforementioned executable on both MAC OS 10.5 and 10.6. Like I posted, the commands and the executable names may be slightly different. I may call adb and you may find it as adb-mac. I am not going to write 3 separate documents for 3 separate OSes. You have to know that adb=adb-mac (on your mac), adb-linux (for linux) etc. And yes the above guide will work universally.
Q: Can i replace the splash image..?? (unlocking related)
A: As of the above date (next to the FAQ) no you can not. Issue is probably a few folds. One of them is that splash1.img is not going in due to security lock. Remember, you unlocked the phone. HTC will not like it. Anyhow, I like the current quad color X. If you are thinking of getting rid of the lock logo, good luck. Even if you can get rid of it, you will still have to overcome the pink text that says ***UNLOCKED*** on your bootloader.
Q: Can you run Windows Mobile on Android Phones?
A: With enough resources given, sure. Will it ever happen? No. Why? Windows mobile compiler and builder cost $. As a matter of fact, as of version 5, it was going to cost me $75 per device. That's one of the reasons why handset makers went to Android open platform. Android is free and universal so as long as you use certain chipsets and certain items, you are good to go. Can it ever be ported? Sure. With right amount of time and money anything can be done. But at this point, it's cheaper for you to go buy a windows mobile smartphone.
Q: How do I know the phone is bricked?
A: You can not brick a phone unless you are flashing Radio/SPL packages. Make sure if you are doing that, you follow directions VERY CAREFULLY. A bricked phone can not boot into bootloader, recovery, or into normal operation modes. You can not connect to a bricked phone via adb or fastboot. You can only see one screen on the phone and it will be the first splash screen.
Q: I have installed the Android SDK however, i cannot seem to get the laptop to detect the nexus. What have i left out?
A: Most common item that people forget to enable is USB Debugging. Settings => Applications => Development => USB debugging [checked]
Q: I have rooted n1. when I go to recovery to do backup, I get the triangle with the little green android guy, but phone is stuck there. I have to remove battery to reboot phone. What have I done wrong?
A: You still have the stock (shipping) recovery. If you want a different recovery (Amon RA's), download it, the from fastboot, run fastboot flash recovery downloaded_recovery.img
Q: Which step of the rooting / recovery procedure does it give root?
A: Root and Recovery are two totally different things. Recovery is a partition that contain recovery information. Stock recovery is what allows OTA updates etc. Normally it will search for update.zip in the root folder of the SD card. Amon_RA's Recovery or any other recovery images are there to enhance the traditional stock recovery. Amon Ra's Recovery for example, contains thing such as ability to update from different zip files, and backup/restore of your data/system.
Rooting is not done by recovery but is a kernel level access (simply put) that will give root or "SU". It is done by patching the boot partition of the your android device.
Q: What are the differences, advantages, disadvantages of the different ROM's?
A: They are all different. Some have some features, some are plain stock, some are made for bleeding edge kernel etc. You'll have to try them out and figure out yourself. I may make a chart of what they are (see the bottom at my signature - wiki) but with too many android devices, I will need some major help. One person alone will not have total knowledge of all the ROM releases. There are just way too many devices and ROMs.
Q: Which ROM will allow OTA updates?
A: Stock ROM WITH Stock Recovery.
Q: If the phone is SIM/carrier unlocked and you root do you have to SIM unlock again?
A: SIM/Carrier unlock has nothing to do with rooting your phone. You can still have root and still be carrier locked. Nexus One comes carrier unlocked from factory.
Q: How much space is there for apps? is using the sd card really necessary? (on Nexus One)
A: Search google? The phone has 512MB or space. That SHOULD be more than enough for you. If not, you have some serious issues. I do not believe you will not App2SD for Nexus One. Google did say during the release conference that they will update Android/N1 so that apps can be run/installed to SD but that requires some system and security changes (mainly to prevent pirated software - Yes if I write something, I deserve to get paid for it).
Q: When you do "flash zip from sdcard" or "fastboot flash image" does this merge and overwrite the files in to the partition?
A: When you update a software (via recovery), software my be merged. However, if you fastboot flash, just like the word flash says, it will flash and overwrite the partition.
Q: Which partition does "flash zip from sdcard" affect?
A: Depends on what you are flashing. It could be any or all of the partitions such as SPL, Boot, System, Recovery, Radio. You should study first before randomly flashing things.
sorry, got it!
blakestimac said:
i apologize if this is the wrong place for this but, but i have adb setup perfectly, but fastboot is not recognized at all. could i have missed something?
Click to expand...
Click to collapse
I need your system info.
What os are you running? where did you get fastboot? what are you trying to do?
Don't forget fastboot boot for testing images. My most used command
I still have no idea how to use or setup adb i have downloaded the sdk and used fastboot and superboot to root my phone and am currently running the cm 5.0 beta 2 rom and want to learn how to use adb so i can enable the ram. Thanks, Joe
really a noob question here.....it wa easier with Hero.
i have installed the Android SDK
however, i cannot seem to get the laptop to detect the nexus.
what have i left out?
wishmaker738 said:
really a noob question here.....it wa easier with Hero.
i have installed the Android SDK
however, i cannot seem to get the laptop to detect the nexus.
what have i left out?
Click to expand...
Click to collapse
Check the FAQ.
dylanfan424 said:
I still have no idea how to use or setup adb i have downloaded the sdk and used fastboot and superboot to root my phone and am currently running the cm 5.0 beta 2 rom and want to learn how to use adb so i can enable the ram. Thanks, Joe
Click to expand...
Click to collapse
Ok. I need to know what you actually did. I am not understanding what you are trying to do.
Can't run adb commands - device not found
Thanks for the info. I am having an issue with running adb commands. My phone is rooted via superboot and I tested it with Nexus Torch which works. Now I am trying to install the new kernel so I can run the wireless tether app... but I can't get any of the adb commands to recognize the phone. I boot the phone by holding the trackball and power button. I am in USB debugging mode. When I run fastboot devices, the phone serial number shows up. When I run adb devices, it says no device detected. And when I try to run any other adb commands they do not work, even though fastboot commands work. Any ideas? Thanks.
Sorry i was pretty vague before i down loaded the sdk and also installed the adb setup file included with the superboot pack but just have no idea how to get it to work and add things through adb. I tried typing adb commands into comand line with the phone connected to the computer but nothing happend. just said not recognised command so i just basically need a rundown of how to setup adb.
dylanfan424 said:
Sorry i was pretty vague before i down loaded the sdk and also installed the adb setup file included with the superboot pack but just have no idea how to get it to work and add things through adb. I tried typing adb commands into comand line with the phone connected to the computer but nothing happend. just said not recognised command so i just basically need a rundown of how to setup adb.
Click to expand...
Click to collapse
I'm a noob so can't offer much help...but I would make sure the usb drivers are installed if you're using windows....this probably should have happened when you installed the sdk, but you can also install it through the device manager and point it to the folder where the usb drivers are located. Also make sure the phone is in USB debugging mode. also you may need to reboot your pc. Make sure you have setup running when you run the adb commands. you need to be in the same directory as the adb file, or in the case of the superboot pack you need to type "adb-windows" not just "adb". you may also need to put .exe, ie adb-windows.exe.
pwnvds said:
Thanks for the info. I am having an issue with running adb commands. My phone is rooted via superboot and I tested it with Nexus Torch which works. Now I am trying to install the new kernel so I can run the wireless tether app... but I can't get any of the adb commands to recognize the phone. I boot the phone by holding the trackball and power button. I am in USB debugging mode. When I run fastboot devices, the phone serial number shows up. When I run adb devices, it says no device detected. And when I try to run any other adb commands they do not work, even though fastboot commands work. Any ideas? Thanks.
Click to expand...
Click to collapse
You run fastboot from the white screen. Android on non-white screen. It's one or the other. It's ADB or Fastboot (depending on the mode of the phone).
dylanfan424 said:
Sorry i was pretty vague before i down loaded the sdk and also installed the adb setup file included with the superboot pack but just have no idea how to get it to work and add things through adb. I tried typing adb commands into comand line with the phone connected to the computer but nothing happend. just said not recognised command so i just basically need a rundown of how to setup adb.
Click to expand...
Click to collapse
Is the directory where ADB/fastboot (SDK) is installled in your system path?
I am guessing it's not. If it was, just by typing adb alone (without commands), it'll give you a list of commands. Click here if you want to know how to change your system path to include a particular folder.
We're now in the age of nintendo pilots and point and click OS that no one knows how to use command lines and system paths anymore.
recovery
I have rooted n1. when I go to recovery to do backup, I get the triangle with the little green android guy, but phone is stuck there. I have to remove battery to reboot phone. What have I done wrong?
umplarry said:
I have rooted n1. when I go to recovery to do backup, I get the triangle with the little green android guy, but phone is stuck there. I have to remove battery to reboot phone. What have I done wrong?
Click to expand...
Click to collapse
Answered in FAQ area.
seraph1024 said:
Answered in FAQ area.
Click to expand...
Click to collapse
I tried that before I posted. I searched the FAQ again. Maybe I am a complete DA, but still can't find answer. I don't mind searching, it will help me to learn, but could you point me in the right direction in FAQ?
umplarry said:
I tried that before I posted. I searched the FAQ again. Maybe I am a complete DA, but still can't find answer. I don't mind searching, it will help me to learn, but could you point me in the right direction in FAQ?
Click to expand...
Click to collapse
Q: I have rooted n1. when I go to recovery to do backup, I get the triangle with the little green android guy, but phone is stuck there. I have to remove battery to reboot phone. What have I done wrong?
A: You still have the stock (shipping) recovery. If you want a different recovery (Amon RA's), download it, the from fastboot, run fastboot flash recovery downloaded_recovery.img
Click to expand...
Click to collapse
There you go.
seraph1024 said:
There you go.
[/B]
Click to expand...
Click to collapse
Thanks for your help
seraph1024 said:
There you go.
[/B]
Click to expand...
Click to collapse
I had it downloaded, just had not flashed it
I've been looking all over, but I probably need to check the HTC Dream forum or something.
How do I install a custom ROM? I know you have to adb push update.zip somewhere, but I can't find any info about this. Please help.

[Q] Moto X forgot it was rooted

I have rooted my phone successfully, and in the beginning apps that required root access would check for root, and request su access, but now that doesn't happen.
1. Anyone know what happened, and how do I get applications to request root access again?
2. How do I update the SuperSU binary, when it asks?
Rooted using SlapMyMoto, on Android 4.4 Stock.
Make sure you have the latest supersu from the play store but when it asks you to update the SU binary, it should show two options, normal and twrp, since i'm assuming you're locked (plus it's just easier), choose normal. Also, i'm not sure what the process is, but you might need to re-run whatever it is that you use to root (i'm unlocked so i'm not familiar with the process) because it sounds like you don't have system mounted as rw. If this is the result of an OTA, because people are losing rw from taking the verizon OTA, you might be out of luck until a new method is found.
-edit- another fix might be to re flash supersu if you have safestrap installed, and just clarification, it will not ask for root for the same app twice unless you tell it to ask again next prompt.
StATicxTW0T said:
Make sure you have the latest supersu from the play store but when it asks you to update the SU binary, it should show two options, normal and twrp, since i'm assuming you're locked (plus it's just easier), choose normal. Also, i'm not sure what the process is, but you might need to re-run whatever it is that you use to root (i'm unlocked so i'm not familiar with the process) because it sounds like you don't have system mounted as rw. If this is the result of an OTA, because people are losing rw from taking the verizon OTA, you might be out of luck until a new method is found.
-edit- another fix might be to re flash supersu if you have safestrap installed, and just clarification, it will not ask for root for the same app twice unless you tell it to ask again next prompt.
Click to expand...
Click to collapse
Thanks for the reply. I took the OTA to 4.4 from 4.2, and I was still rooted. Something happened with SuperSU, and now the phone is behaving as if it is not rooted, or it's half rooted (if that makes sense).
MyBackupPro would always ask for root access, and then SuperSU would grant it automatically. Now this doesn't happen. Also, I'm trying to use Helium backup as well, and when it tries to ask for root access, it fails. Any app that usually requests root access doesn't even ask.
Thanks.
akhenax said:
Thanks.
Click to expand...
Click to collapse
I wouldn't take my word for it, but i remember reading about a downgrade then upgrade process where you would downgrade to 4.2.2 post cam then root then upgrade again, it might help, no guarantee's though.
StATicxTW0T said:
I wouldn't take my word for it, but i remember reading about a downgrade then upgrade process where you would downgrade to 4.2.2 post cam then root then upgrade again, it might help, no guarantee's though.
Click to expand...
Click to collapse
I always thank replies whether it helps or not.
I am trying to retrace the steps I did to root, but not the entire process. Hope to save time from having to redo everything again.
I fixed it.
I did the following steps (not sure if this did anything but...):
uninstall SuperSU
adb reboot bootloader
fastboot flash partition gpt.bin
fastboot flash motoboot motoboot.img
fastboot flash logo logo.bin
fastboot reboot
adb push su /data/local/tmp/su
adb push install.sh /data/local/tmp/install.sh
adb push rec.sh /data/local/tmp/rec.sh
adb push install-recovery.sh /data/local/tmp/install-recovery.sh
adb push setup.sh /data/local/tmp/setup.sh
adb reboot
adb shell
echo "/data/local/tmp/rec.sh" > /sys/kernel/uevent_helper
<-- THIS FAILS, as expected. It worked when I first rooted the device, but doesn't work any longer, but this is OK.
it returns: /system/bin/sh: can't create /sys/kernel/uevent_helper: Permission denied
Once again, this is OK.
Install SuperSU
DO NOT OPEN IT. JUST INSTALL IT.
Apps now request root permission.
adb shell getprop ro.boot.write_protect
returns a value of:1 which means my bootloader is locked write protection is enabled, but I still have proper root access.
Hope this helps the next guy.
akhenax said:
adb shell getprop ro.boot.write_protect
returns a value of:1 which means my bootloader is locked, but I still have proper root access.
Click to expand...
Click to collapse
This actually means that write protection is enabled.
Did you try to reboot into"recovery" to set write protection off?
nhizzat said:
Did you try to reboot into"recovery" to set write protection off?
Click to expand...
Click to collapse
I don't think I'm versed enough in this to answer this question accurately, for the very reason you quoted "recovery". How would you accomplish such a feat, step by step?
akhenax said:
I don't think I'm versed enough in this to answer this question accurately, for the very reason you quoted "recovery". How would you accomplish such a feat, step by step?
Click to expand...
Click to collapse
power down, hold volume down and power, youll get a black screen with blue letters. use volume down button to naviagte and power to select.
xpsychox said:
power down, hold volume down and power, youll get a black screen with blue letters. use volume down button to naviagte and power to select.
Click to expand...
Click to collapse
The question was: Did you try to reboot into"recovery" to set write protection off?
Do your steps allow one to do this?
akhenax said:
The question was: Did you try to reboot into"recovery" to set write protection off?
Do your steps allow one to do this?
Click to expand...
Click to collapse
ahh, my bad miss read it.. lol... oops
akhenax said:
I don't think I'm versed enough in this to answer this question accurately, for the very reason you quoted "recovery". How would you accomplish such a feat, step by step?
Click to expand...
Click to collapse
When in Android, connect the phone to your PC USB port. I hope you've already installed the Android SDK and Moto drivers. Open a cmd prompt with admin privileges and type "adb devices" to check if your PC recognizes the phone. If so, then type "adb reboot recovery". The phone will reboot just as it normally would, only this time write protection is off. Or do the steps below or type "adb reboot bootloader".
xpsychox said:
power down, hold volume down and power, youll get a black screen with blue letters. use volume down button to naviagte and power to select.
Click to expand...
Click to collapse
Volume up to select, actually.

Aishon A19--have root, sort of, need to install SuperSU

Problem: I have an Aishon A19 tablet, which it is very hard to find information about. It is an RK3288 tablet running Android 5.1.1.
It is not really rooted in the normal sense. However, "adb root" works; I can get a root shell and mount /system as writeable, I can push any app I want to the device, etc.
Things that will not work:
-- I tried to put on a /system/xbin/su (from SuperSU 2.76), with mode 6755 (rwsr-sr-x) and it didn't work. I also made symbolic links to /system/bin/su and /system/xbin/daemonsu. Running it from a non-root shell in adb prints a 1 and doesn't give me root. Running it from a non-root shell on the tablet does the same thing. Running it from a root shell gives me no error, but that obviously isn't much use.
-- Running SuperSU as an app gives me the error message about "There is no SU binary installed, and SuperSU cannot install it. This is a problem! If you just upgraded to Android 5....." I have no idea if it actually can't see the ./system/xbin/su or if the error message just isn't that good.
-- Trying to use "adb reboot bootloader" or getting into the bootloader using buttons doesn't work. It reboots the tablet into a blank screen, with the same vendor ID and a new product ID; however, "fastboot devices" shows nothing. This happens both under Windows and Linux, and even when run as root under Linux (thus not having to worry about udev rules). This means that I cannot install TWRP unless someone can explain to me how to install TWRP without using the bootloader.
I *can* use "adb reboot recovery" and get into the recovery menu. And as I mentioned, I can get root access to the tablet and a root shell using "adb root", and push any file I want to it.
Is it possible to use this root shell and/or recovery to install SuperSU somehow, even if I have to just copy files one at a time?
Edit: Moderators., you can lock this. Someone had the same problem in http://forum.xda-developers.com/apps/supersu/how-to-manually-update-su-supersu-file-t3238991 and I was able to folloow that, manually running the commands in update-binary.

[Guide] How to Unlock and Magisk Root on Stock OOS 9.0.7 (For Beginners)

NOTE: Since I am a semi-amateur at unlocking/rooting, this is not independent development. Instead, I noticed these forums don't seem to have a single one-stop guide that lays out the process for safely rooting the latest (9.0.7) Oxygen OS 9.0.7. This process may seem obvious to experts, but for people who are rusty or new to this, I wanted a process that didn't require lots of extra cross-referencing and research. I hope this is ok.
Big thanks to Dameon87 who supplied the patched boot rom, and deserves all the credit for the actual hard work with the patched boot image.
STEP 1: PREPARATION
Check that your phone is on 9.0.7.
On PC: Download patched_boot-9.0.7.img and MagiskManager-v6.0.1.apk from Dameon87's thread ( https://forum.xda-developers.com/oneplus-6t/how-to/9-0-7-patched-magisk-boot-img-t3875498 ) . Download ADB Tools if you don't have them ( https://developer.android.com/studio/releases/platform-tools#download ) and extract to a folder. Copy patched_boot-9.0.7.img to your PC’s ADB root directory (the directory with fastboot.exe and adb.exe).
On phone: Boot into OOS. Navigate to Setup->About Phone. Tap Build Number until you turn on Developer Options.
On phone: Navigate to System->Developer Options. Enable OEM Unlocking and USB Debugging.
STEP 2: UNLOCKING
Connect your phone to your PC. Click ok on the OEM Debugging prompt on your phone.
On PC: Open a command prompt [Windows: Start->type "cmd.exe"], and navigate to the ADB tools directory. Run this command in the command prompt:
Code:
adb reboot bootloader
The phone should reboot to the bootloader.
On PC: When phone finishes rebooting to the bootloader, run this command in the command prompt:
Code:
fastboot oem unlock
IMPORTANT: ALL DATA WILL BE ERASED WHEN YOU DO THIS, INCLUDING ANY PERSONAL DATA, TEXTS, PHOTOS, MUSIC, ETC. If the phone has been used, please move your files off your device first! The phone will take some time to factory reset.
On Phone: Repeat Preparation Steps 3-4 to turn back on OEM Debugging in OOS.
STEP 3: INSTALLING MAGISK
On PC: Copy MagiskManager-v6.0.1.apk to the phone.
On PC: In the command prompt window, run this command (note this .img file should be in the adb.exe and fastboot.exe directory):
Code:
fastboot boot patched_boot-9.0.7.img
Phone will reboot.
On Phone: Use a file manager app to install MagiskManager-v6.0.1.apk (I use Astro or ES, but admittedly there are probably better ones out there).
On Phone: Open the Magisk Manager App, agree to the setup popup, and click install. When prompted, choose Direct Install.
On Phone: Reboot.
On Phone: In the OS, open Magisk Manager again and add MagiskHide exceptions.
This enabled all apps that I typically need SafetyNet for, including Pokemon Go, Netflix and Google Pay, as well as of course all root apps like TItanium Backup.
Again, apologies if this seems basic, but I hope this is useful for some who don't know all of the inner workings of android unlocking and rooting by heart. If you have any improvements, feel free to suggest them.
You need to change adb oem unlock to fastboot oem unlock. Otherwise good job!
Dameon87 said:
You need to change adb oem unlock to fastboot oem unlock. Otherwise good job!
Click to expand...
Click to collapse
Ah, thanks! Fixed.
Does OTA update lock bootloader?
BesoC said:
Does OTA update lock bootloader?
Click to expand...
Click to collapse
No it doesn't, the root will be lost though.
geminium said:
No it doesn't, the root will be lost though.
Click to expand...
Click to collapse
I'm also a semi amateur at unlocking/rooting so I'm the target audience of the OP.
Ready to get my hands dirty and try it out. Last time I rooted it was on my old phone before Magisk was a thing.
I ended up not updating out of laziness.
Does magisk make OTA updates / keeping the phone up to date easier?
What's the best method for doing so if you want to keep your phone rooted?
spudsrus said:
I'm also a semi amateur at unlocking/rooting so I'm the target audience of the OP.
Ready to get my hands dirty and try it out. Last time I rooted it was on my old phone before Magisk was a thing.
I ended up not updating out of laziness.
Does magisk make OTA updates / keeping the phone up to date easier?
What's the best method for doing so if you want to keep your phone rooted?
Click to expand...
Click to collapse
Well there's quite detailed procedure explained on the forum. You'll find easily...
In general, you have to restore images in magisk, then install OOS OTA update, then install magisk to inactive slot... It's one of the easiest steps for keeping root and be up to date .
I've been rooting for almost a decade and I am grateful for this. I don't know why some of these devs always assume you know when their talking about using a PC or running shell commands. Lol. Everyone started as a noob.
Sent from my OnePlus6TSingle using XDA Labs
ScaryBugThing said:
NOTE: Since I am a semi-amateur at unlocking/rooting, this is not independent development. Instead, I noticed these forums don't seem to have a single one-stop guide that lays out the process for safely rooting the latest (9.0.7) Oxygen OS 9.0.7. This process may seem obvious to experts, but for people who are rusty or new to this, I wanted a process that didn't require lots of extra cross-referencing and research. I hope this is ok.
Big thanks to Dameon87 who supplied the patched boot rom, and deserves all the credit for the actual hard work with the patched boot image.
STEP 1: PREPARATION
Check that your phone is on 9.0.7.
On PC: Download patched_boot-9.0.7.img and MagiskManager-v6.0.1.apk from Dameon87's thread ( https://forum.xda-developers.com/oneplus-6t/how-to/9-0-7-patched-magisk-boot-img-t3875498 ) . Download ADB Tools if you don't have them ( https://developer.android.com/studio/releases/platform-tools#download ) and extract to a folder. Copy patched_boot-9.0.7.img to your PC’s ADB root directory (the directory with fastboot.exe and adb.exe).
On phone: Boot into OOS. Navigate to Setup->About Phone. Tap Build Number until you turn on Developer Options.
On phone: Navigate to System->Developer Options. Enable OEM Unlocking and USB Debugging.
STEP 2: UNLOCKING
Connect your phone to your PC. Click ok on the OEM Debugging prompt on your phone.
On PC: Open a command prompt [Windows: Start->type "cmd.exe"], and navigate to the ADB tools directory. Run this command in the command prompt:
Code:
adb reboot bootloader
The phone should reboot to the bootloader.
On PC: When phone finishes rebooting to the bootloader, run this command in the command prompt:
Code:
fastboot oem unlock
IMPORTANT: ALL DATA WILL BE ERASED WHEN YOU DO THIS, INCLUDING ANY PERSONAL DATA, TEXTS, PHOTOS, MUSIC, ETC. If the phone has been used, please move your files off your device first! The phone will take some time to factory reset.
On Phone: Repeat Preparation Steps 3-4 to turn back on OEM Debugging in OOS.
STEP 3: INSTALLING MAGISK
On PC: Copy MagiskManager-v6.0.1.apk to the phone.
On PC: In the command prompt window, run this command (note this .img file should be in the adb.exe and fastboot.exe directory):
Code:
fastboot boot patched_boot-9.0.7.img
Phone will reboot.
On Phone: Use a file manager app to install MagiskManager-v6.0.1.apk (I use Astro or ES, but admittedly there are probably better ones out there).
On Phone: Open the Magisk Manager App, agree to the setup popup, and click install. When prompted, choose Direct Install.
On Phone: Reboot.
On Phone: In the OS, open Magisk Manager again and add MagiskHide exceptions.
This enabled all apps that I typically need SafetyNet for, including Pokemon Go, Netflix and Google Pay, as well as of course all root apps like TItanium Backup.
Again, apologies if this seems basic, but I hope this is useful for some who don't know all of the inner workings of android unlocking and rooting by heart. If you have any improvements, feel free to suggest them.
Click to expand...
Click to collapse
Can you elaborate a bit more on how you got Pokemon Go working.
OS. 9.0.2 Magisk v18. Successfully rooted.
I'm selecting Pokemon Go under Magisk hide. But it still detects it. PoKe will sometimes run for about 30 secs then it gives me the error incompatible os.
Sent from my [device_name] using XDA-Developers Legacy app
Ok I'm new to this as well..I'm trying to understand the patched boot img part...so do u need the patched boot img for whichever oos ur currently running so to install magisk cleanly is that it...also I can't find the tutorial on how to install the ota's after ur rooted to where everything doesn't get erased etc..I need sumone to point me in the right area to look..I found a lil bit on it once but now I can't seem to find it..thx to everyone in this great community for all the time and effort all put into this. It's so easy to overlook all the hard work that gets done behind the scenes..so I just thank u personally for what u do for us...

How To Guide Delete magisk module from bootlooping phone

This guide will be about deleting a magisk module that caused your phone to bootloop. Definetly works with Xiaomi Redmi Note 10 5G, let me know if it works on Poco M3 Pro as well.
Prerequisites:
- rooted phone with magisk installed
- usb data cable
First you have to boot into safe mode which will disable the loading of all magisk modules:
- Turn off the smartphone completely.
- Turn it on normally and when the MIUI logo appears, press and hold the volume down button until the system boots completely, and you see the lock screen, it should also display "safe mode" in the bottom left corner.
Next enable USB debugging on your phone and connect it to a pc, then run
adb devices
If your devices is recognized and authenticated it will output:
List of devices attached
**************** device
where ************* is your device ID. If it writes 'unauthorized' then accept the prompt for authorization on your phone.
Now open an ADB shell from your pc:
adb shell
su
cd /data/adb/modules
ls
This will list all your installed magisk modules. Remove the problematic one with:
rm -r problematic_module
Done, reboot normally!
------------------------- If su command freezes the command line------------------------------
If somehow this does not work, for example you have not granted shell superuser rights before, then you have the following backup options:
run:
adb wait-for-device shell magisk --remove-modules
This should remove all installed modules, and reboot the phone. If it does not work from safe mode, you can try it during the boot animation. (After MIUI logo comes up adb gets enabled (check with 'adb devices' command, if adb is running))
If so far nothing worked you still have a third option to recover you phone/data:
--------------------- Nothing working ---------------------------
You can flash the stock boot.img from your currently installed stock ROM and it should boot your phone without magisk (but also no root). This will enable you to back up your phone/data, but if you want magisk again, you probably have reflash your ROM from fastboot again. This is because with no root access, and magisk not present in your boot image there is no way to remove the module that is causing the bootloop.
Feel free to comment, share your suggestions, and correct me on anything if I am wrong.
Gorg2331 said:
This guide will be about deleting a magisk module that caused your phone to bootloop. Definetly works with Xiaomi Redmi Note 10 5G, let me know if it works on Poco M3 Pro as well.
Prerequisites:
- usb debugging already enabled and authenticated (preferrably)
- rooted phone with magisk installed
- usb data cable
all you have to do is connect your phone to your PC and when it shows the MIUI logo during normal boot run
adb devices
If your devices is recognized and authenticated it will output:
List of devices attached
**************** device
where ************* is your device ID. If it writes unauthorized then skip to the "Other Method" section below. If you get back nothing try to run it a couple times during boot. I am not sure when adb gets enabled during the boot but should be around the MIUI logo appearing.
next write:
adb wait-for-device shell magisk --remove-modules
This will delete all magisk modules from your phone, and it reboot it automatically. It should boot up just fine, and all your magisk modules will be deleted.
---------------- Other method --------------------------
If you really need access to the phone, but do not have adb enabled:
You can flash the stock boot.img from your currently installed stock ROM and it should boot your phone without magisk (but also no root). This will enable you to back up your phone/data, but if you want magisk again, you probably have reflash your ROM from fastboot again. This is because with no root access, and magisk not present in your boot image there is no way to remove the module that is causing the bootloop.
Feel free to comment, share your suggestions, and correct me on anything if I am wrong.
Click to expand...
Click to collapse
just a thought on the above;
i haven't followed this topic anymore since the built-in functionality where modules are disabled if phone is in safe mode so i just thought to post it as a way to remind people that ( i think) most phones have a safe mode and with that , it might get you out of the bootloop.
I guess the above option is a great way too, but i think the use of safe mode makes it a lot easier.
pjottrr said:
just a thought on the above;
i haven't followed this topic anymore since the built-in functionality where modules are disabled if phone is in safe mode so i just thought to post it as a way to remind people that ( i think) most phones have a safe mode and with that , it might get you out of the bootloop.
I guess the above option is a great way too, but i think the use of safe mode makes it a lot easier.
Click to expand...
Click to collapse
That is a great suggestion, tho you cannot use any root applications since they will not be loaded. (Even if you install them during safe mode) But it should help sidestep the adb not authorized issue possibly! I incorporated safe mode in the post.
I used safemode purely to get rid of the troublesome modules( since you still have root access) . Then reboot the phone normal, and all should be fine/ you should be out of the bootloop
And i know the safemode is a bit off topic compared to what you are writing about, but it might help getting back into the phone
pjottrr said:
I used safemode purely to get rid of the troublesome modules( since you still have root access) . Then reboot the phone normal, and all should be fine/ you should be out of the bootloop
And i know the safemode is a bit off topic compared to what you are writing about, but it might help getting back into the phone
Click to expand...
Click to collapse
Oh you are totally right! You can use safe mode to remove the problematic modules with rm -r. But I think this only works if you have previously granted shell superuser rights. (Since in safe mode you will not get prompts to give SU rights)
I confirm, your guide Is correct. Now i have installed a modules called magisk bootloop saver. Works fine. Do the same thing without digit the adb command.
i'd also suggest in case of BOOTLOOP (cause of bad magisk module)
you can still fastboot
Code:
fastboot flash boot boot.img
the ORIGINAL boot.img of your actual ROM ( so everytime you root keep a copy of the original BOOT.IMG)
in that case you'll be able to reboot your phone ( without root ) and without losing any data !
yes, all these suggestions are good and 100% work! great thread
Booting into Safemode, adb shell and deleting the bad module worked great, thank you!

Categories

Resources