Related
So, I
got myself an i9023 (yay!),
unlocked the bootloader,
updated it to 2.3.4 (GRJ22),
booted (not flashed) recovery-clockwork-3.0.2.4-crespo.img and applied su-2.3.6.1-ef-signed.zip from there and rebooted --> root.
Then I installed Superuser from Market and verifed that it works and
celebrated ...
... - as it turns out, rather prematurely. Apparently this doesn't give adb root because for that "ro.secure" in default.prop needs to be 0, and that file sits in the ro rootfs, which in turn is a part of the boot image ... ...
I guess my question is, how can I get root access for adb?
Is there an easy way to extract the boot image, change that detail and repack it?
EDIT: Solved, see http://forum.xda-developers.com/showthread.php?p=14219782.
fallenguru said:
So, I
got myself an i9023 (yay!),
unlocked the bootloader,
updated it to 2.3.4 (GRJ22),
booted (not flashed) recovery-clockwork-3.0.2.4-crespo.img and applied su-2.3.6.1-ef-signed.zip from there and rebooted --> root.
Then I installed Superuser from Market and verifed that it works and
celebrated ...
... - as it turns out, rather prematurely. Apparently this doesn't give adb root because for that "ro.secure" in default.prop needs to be 0, and that file sits in the ro rootfs, which in turn is a part of the boot image ... ...
I guess my question is, how can I get root access for adb?
Is there an easy way to extract the boot image, change that detail and repack it?
Click to expand...
Click to collapse
flash a custom rom through the recovery. they all pretty much have root.
I'm sure there's a way to get what you want exactly. I don't know it exactly though.
If it was my phone and i wanted to keep it stock. I would flash ~This Rom~. It's a stock deodexed zipaligned rom with a few minor tweaks.
I'm not 100 percent here but i believe if you just wanted the boot.img you could extract it from that rom then flash it using "fastboot flash boot boot.img" If you're running a stock build the boot image from a stock rom should work for you. but like i said i'm not 100% sure. I'm only a moderately well informed nub.
fallenguru said:
So, I
got myself an i9023 (yay!),
unlocked the bootloader,
updated it to 2.3.4 (GRJ22),
booted (not flashed) recovery-clockwork-3.0.2.4-crespo.img and applied su-2.3.6.1-ef-signed.zip from there and rebooted --> root.
Then I installed Superuser from Market and verifed that it works and
celebrated ...
... - as it turns out, rather prematurely. Apparently this doesn't give adb root because for that "ro.secure" in default.prop needs to be 0, and that file sits in the ro rootfs, which in turn is a part of the boot image ... ...
I guess my question is, how can I get root access for adb?
Is there an easy way to extract the boot image, change that detail and repack it?
Click to expand...
Click to collapse
If you type “su” in a terminal emulator, do you get a “$” or “#”? # means that you have root, otherwise you only have su app installed, nothing more. Same thing goes for “adb shell” "su" in your command prompt (in windows). If this is your situation then you could try this procedure:
-Flash or boot into clockwork recovery
-mount system partition (this part does the trick, I don’t see this steep in you post)
-install su-2.3.6.1-ef-signed.zip
-reboot
-enable USB debugging
simms22 said:
flash a custom rom through the recovery. they all pretty have root.
Click to expand...
Click to collapse
I'd rather stay with the stock ROM (+Voodoo module) for now, I'm not bored yet.
NVMENOR said:
If you type “su” in a terminal emulator, do you get a ...
Click to expand...
Click to collapse
#. Root on the phone and within adb shell is working fine, it's just adb itself that doesn't have root access. I'm used to modifying system files using adb pull - modify - adb push and uninstalling system apps via adb ... ...
Solved, see http://forum.xda-developers.com/showthread.php?p=14219782.
Excellent!
Thank you! Thank you! I've been trying for weeks to figure out why my rooted nexus s 4g was getting permission denied when trying to use push/pull (among other adb commands). Now I can backup my app's sqlite database using pull!
For my own education, what might the downside of flashing this boot image be? I know there is an obvious security vulnerability since adb runs as root by default now on the device. I'm willing to tolerate that for the time being. Are there any other possible issues or gotchas to be aware of?
peterwbeck said:
Thank you!
Click to expand...
Click to collapse
You're welcome.
peterwbeck said:
For my own education, what might the downside of flashing this boot image be?
Click to expand...
Click to collapse
As opposed to just booting it? I don't think there are any but I'm far from sure - maybe some incremental OTA updates won't work, for example.
Since the change only affects adb and you need to connect the phone to a computer for that anyway you might as well just boot the image whenever you need full adb access.
Convert your ZenPad 3s 10 from CN to WW firmware
This guide will show you how to flash the WW firmware to your ZenPad Z500M that came preloaded with the CN (China) ROM. Up until recently, this was problematic because the CN firmware, as well as the 13.x series in general, is locked down. It does not provide flashing access via the common methods like unlocking+fastboot, recovery or SP Flash Tool. But thanks to a MediaTek temporary root tool invented by some evil genius, it's now possible to upgrade your CN ZenPad to the latest WW ROM. It's well known that this variant comes with Google apps and is fully unlockable and rootable.
DISCLAIMER
Any procedures described in this thread are done at your own risk. No one else will be responsible for any data loss, corruption or damage of your device, including that which results from software bugs.
REQUIREMENTS
An ASUS ZenPad Z500M (P027) tablet with 13.x firmware
Either:
A PC with ADB installed to interact with your device, or
A terminal emulator app
Familiarity with ADB (if using PC) and basic Linux shell commands
Familiarity with the Thanks button under XDA posts
INSTRUCTIONS
Read and understand this whole procedure before you start. This is about as dangerous as installing a full OTA update, and you would have to try hard to mess it up in a way that your device cannot be recovered. But keep in mind that it is a possibility. Make sure your battery has decent charge or plug it into the charger.
Go to Amazing Temp Root for MediaTek ARMv8 and read the directions on how to open a root shell in ADB or a terminal emulator app, and make sure you understand them. Download the latest release of mtk-su. Support the developer.
Download and unzip the recovery image to your tablet. Link below.
Open a root shell and flash the image to your recovery partition with:
Code:
dd if=recovery.img of=/dev/block/platform/mtk-msdc.0/11230000.MSDC0/by-name/recovery bs=1048576
You may need to specify the full path of the img file.
Download the latest 14.x WW firmware from ASUS' support site. Link below.
Put the official zip package in the root of your internal storage. Rename the file by changing the letters "WW" to "CN". That is, rename UL-P027-WW-14.0210.1806.33-user.zip to UL-P027-CN-14.0210.1806.33-user.zip. This has to be done in the same boot session as the recovery flashing step.
At this point, the OS updater should detect the file, prepare the upgrade and ask you to reboot. Confirm that you want to reboot to install. Make sure that you have succeeded step 4.
Your tablet will reboot and automatically install the WW 14.x package. You may need/want to do a factory reset after this.
Alternative method to zip file autodetection: reboot to recovery and do an adb sideload install.
NOTES
Do not try to install any 13.x firmware package using this method. That's because if something goes wrong and your device fails to boot, you would not be able to get root access to repair it. It may be next to impossible to recover it. The 13.x releases are locked down, unlike the 14.x (Android 7) ones.
If for any reason you reboot your tablet after doing the dd flashing step but before successfully installing the 14.x ROM, your original recovery will get restored. You will have to flash it again before trying the upgrade.
Do not try to downgrade from a 14.x FW to 13.x via TWRP. It is a fact that this will make your tablet unbootable because the 13.x packages do not provide all the necessary images.
DOWNLOAD
WW-13.x Recovery Image
ASUS Z500M firmware downloads
CREDITS
Thanks to @lemon0o for successfully testing this method. :good:
Read-only file system error - way out?
Hi diplomatic,
Thanks a lot for sharing this beautiful method. I had two of these tablets with CN firmware and had pretty much given up on them until now.
Edit 2: I successfully used the adb sideload method to update to WW firmware. The autodetect did not work for me.
Original post:
I have had success with steps 1-4 (UID 0, selinux: permissive),
but when I am trying to paste the downloaded firmware file in root folder ( / ) I get the error Read-only file system. I pasted the renamed firmware file in /sdcard/ but the autodetection doesn't work.
I tried remounting root '/' with
Code:
mount -o rw,remount /
I was then able to paste the renamed firmware file (WW to CN) to (root) / . The autodetection still doesn't work.
Is there a guide you can point me to for adb sideload install? I have exposure to linux but haven't explored android innards much. I will keep looking.
Thanks again, really hoping I am able to make this work!
@bkmiictian, I'm glad you figured it out. (And finally have someone respond after like 8 months. ) But FWIW, the upgrade package should go into your internal shared storage to be detected. It's just following the standard installation procedure for Asus. Nothing to do with the root dir of the file system.
diplomatic said:
@bkmiictian, I'm glad you figured it out. (And finally have someone respond after like 8 months. ) But FWIW, the upgrade package should go into your internal shared storage to be detected. It's just following the standard installation procedure for Asus. Nothing to do with the root dir of the file system.
Click to expand...
Click to collapse
I had similar issues, was not clear what to do, how to make it recognized.
Here I found great detailed explanation on the asus website (can't put full link as I'm newbie support/FAQ/1011948/ )
Apart from that, great guide !! Thanks a lot!!
Spent hours before that finding a way to either root it or install Google Apps. Tried all rooting apps I could find ...
thanks for the details procedure
Please all noted the file should place under "internal shared storage" not root as seen in adb.
Details steps as provide by Asus in its FAQ:
FAQ/1011948
Hi, Thanks so much for the tutorial.
I'm also having issues with the Z500M with CN firmware.
I followed the steps until getting the selinux: permissive message on ADB.
But I'm lost on what to do with the Recovery.img & the WW 14.x firmware
I copied the files into the root directory, but I don't understand what to do next.
Edit:
Found the procedure to manually install the firmware update from Asus.
Disconnected the USB cable & it told me there was a new update.
After updating, it restarted and showed an android with the message "installing system update" but then it just gave an Error.
Then it restarted saying System update failed. Unknow error. System was restored to previous configuration.
I guess I'm doing something wrong...
I think my issue may be Step 4.
dd if=recovery.img of=/dev/block/platform/mtk-msdc.0/11230000.MSDC0/by-name/recovery bs=1048576
You may need to specify the full path of the img file.
Click to expand...
Click to collapse
That command does not seem to work.
ADB says "No such a file or directory"
If I try with this command I get an error too.
dd if=/root/recovery.img of=/dev/block/platform/mtk-msdc.0/11>
dd: /root/recovery.img: Permission denied
danielfd said:
I think my issue may be Step 4.
That command does not seem to work.
ADB says "No such a file or directory"
If I try with this command I get an error too.
dd if=/root/recovery.img of=/dev/block/platform/mtk-msdc.0/11>
dd: /root/recovery.img: Permission denied
Click to expand...
Click to collapse
Yes, this is the main point of this procedure. Where did you extract recovery.img? If it's, say, in your internal storage, you may need to specify
dd if=/storage/emulated/0/recovery.img of=/dev/block.....
Only reboot to install the FW if you have succeeded with this step.
diplomatic said:
Yes, this is the main point of this procedure. Where did you extract recovery.img? If it's, say, in your internal storage, you may need to specify
dd if=/storage/emulated/0/recovery.img of=/dev/block.....
Only reboot to install the FW if you have succeeded with this step.
Click to expand...
Click to collapse
Thanks Diplomatic
The new code seems to work for me.
dd if=/storage/emulated/0/recovery.img of=/dev/block/platform/mtk-msdc.0/11230000.MSDC0/by-name/recovery bs=1048576
Click to expand...
Click to collapse
I still get an Error when I try to update to the WW firmware.
Will try the whole process from the beginning.
EDIT:
It worked!
Thanks a lot Diplomatic!
I made a factory reset to the tablet & followed again the steps & the update was successful.
So if I had 14x on Android 7, can I just move to the twrp recovery part of the forum, why not just manually update to 14x from 13x if 14x can be unlocked? Am I missing something?
I was in the process of rooting when the update was trying to run. Now I keep getting an install failure and can't seem to get any way to fix it.
Where is this update stored so I can delete it or can I get some advice on how to clear it so I can get it to try again?
I can't find the update for download anywhere :/
Not thing about file/cache. Incremental OTA need unroot frist.
Looking for the full installer package file for
11.0.8.12.KB05AA.
rezapatel said:
Looking for the full installer package file for
11.0.8.12.KB05AA.
Click to expand...
Click to collapse
Same let me know if you find it lol
OK good news I got myself sorted!
1. What I did was use "Oxygen OS updater" (can be found on playstore) with advanced mode enabled and downloaded the latest OS (11.0.8.11.)
2. Use local upgrade under settings to install 11.0.8.11 and restart. This will remove root but not user data or settings.
3. Check for and install update 11.0.8.12 under settings and it should install fine no issues.
4. Re root using your chosen method.
5. Done!
Interesting. How did you get the boot file for x.12? Isn't that required for rooting..
rezapatel said:
Interesting. How did you get the boot file for x.12? Isn't that required for rooting..
Click to expand...
Click to collapse
Boot modified recovery with ADB function, dump boot_a or boot_b, Magisk patch.
ULTRAJC said:
Boot modified recovery with ADB function, dump boot_a or boot_b, Magisk patch.
Click to expand...
Click to collapse
What they said
ULTRAJC said:
Boot modified recovery with ADB function, dump boot_a or boot_b, Magisk patch.
Click to expand...
Click to collapse
Any guide for this?
DroidFreak32 said:
Since we don't have TWRP yet for our 8T, having ADB enabled on the stock recovery can be really helpful if you are unlocked and rooted.
For example, removing problematic magisk modules.
I tried to install the EdExposed module and ended with a boot loop. To get back I had to flash the stock boot.img again and reconfigure all my modules again.
Having ADB enabled in OOS recovery will let us delete the problematic module at /data/adb/modules without having to delete the working modules.
Credit goes to @s3axel for the Post in Oneplus 8 forums
Quoting the procedure to create the modified recovery.img :
Installation Procedure:
Pre-patched files for the lazy (upto 11.0.4.5):
To find your model and build:
Code:
adb shell getprop ro.product.model
KB2001
adb shell getprop ro.build.version.ota
OnePlus8TOxygen_15.I.16_GLO_0160_2010150110
KB2000 / KB05?? - Chinese Variant
11.0.1.2 Hydrogen_15.H.16_OTA_0160_all_2010150101_4101
STOCK recovery.img
adb patched recovery
KB2001 / KB05DA - Indian Variant
11.0.1.2 - OnePlus8TOxygen_15.I.16_GLO_0160_2010150110
STOCK recovery.img
adb patched recovery
11.0.2.3 - OnePlus8TOxygen_15.I.17_OTA_0170_all_2010240047
STOCK recovery.img
adb patched recovery
11.0.3.4 - OnePlus8TOxygen_15.I.18_OTA_0180_all_2011010208
STOCK recovery.img
adb patched recovery
11.0.4.5 - OnePlus8TOxygen_15.I.19_OTA_0190_all_2011101438_3032f.zip
STOCK recovery.img
adb patched recovery
KB2003 / KB05BA - EU Variant
11.0.1.2 - OnePlus8TOxygen_15.E.17_GLO_0170_2010150108
STOCK recovery.img
adb patched recovery
11.0.2.3 - OnePlus8TOxygen_15.E.18_OTA_0180_all_2010240038
STOCK recovery.img
adb patched recovery
11.0.3.4 - OnePlus8TOxygen_15.E.19_OTA_0190_all_2011010157
STOCK recovery.img
adb patched recovery
11.0.4.5 - OnePlus8TOxygen_15.E.20_OTA_0200_all_2011101442_ed5dc.zip
STOCK recovery.img
adb patched recovery
KB2005 / KB05AA - International Variant thanks to @card13
https://drive.google.com/drive/folders/1-i4P8sWPfyqwgYvBsKWAAftQW7m66Z70?usp=sharing
KB2007 / KB05CB - T-Mobile Variant
¯\_(ツ)_/¯
Code:
❯ adb devices
List of devices attached
75317573 recovery
❯ adb shell
# df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 3648448 40396 3608052 2% /
tmpfs 3837328 1160 3836168 1% /dev
tmpfs 3837328 0 3837328 0% /mnt
tmpfs 3837328 0 3837328 0% /apex
tmpfs 3837328 4 3837324 1% /linkerconfig
tmpfs 3837328 24 3837304 1% /tmp
/dev/block/sda11 491464 140484 350980 29% /mnt/vendor/op2
/dev/block/sda20 11760 164 11596 2% /metadata
/dev/block/dm-3 1516540 1511956 4584 100% /vendor
/dev/block/sda2 27632 10452 17180 38% /mnt/vendor/persist
/dev/block/dm-7 110397292 6627020 103770272 7% /data
Click to expand...
Click to collapse
Mpolo87 said:
CAVEAT
I've only tested this on my device (KB2005 / KB05AA), but it should be universally helpful as it's using your own boot.img so there's no need to find a matching package for your variant and os version.
CREDIT
The steps were buried across a few threads, I'm posting this so it'll be easier for others to find the information. All credit goes to xb360, FullOfHell, and TheUnkn0wn.
INFOThe basic rundown is:
Use the semi-broken TWRP package to give yourself temporary su access through adb.
Extract the boot.img your phone is currently using to your pc.
Reboot to OxygenOS, copy over the boot.img you just extracted and then use Magisk to patch it.
Copy the boot.img back to your pc and use adb to temporarily boot your phone with it, giving you root access until reboot.
Use your temporary root access to allow Magisk to patch your internal as-yet unmodified boot.img to give you permanent root.
There seems to be some confusion in the thread, I'll try to clear up what's happening and why:
The primary issue at hand is that you can't root your device without already having root privileges, for security reasons. Without a custom recovery like TWRP, there are a few more steps than usual (but mostly simple stuff).
Because we don't flash anything with this guide, it shouldn't cause any permanent bootloops if you use the wrong boot.img, if you get stuck in one just power cycle your phone.
Updating with OTAs should be the same process as the other guides here.
Because of changes in Android, devices that launched with Android 10 and above will not allow you to modify the system partition, even with root. This is not a fault of this rooting method.
Prerequisites:
ADB and Fastboot installed.
An unlocked bootloader and USB debugging enabled.
________________________________________________________
STEPS:
1. Connect your phone to your pc and boot it into fastboot mode. You can leave it connected throughout this guide.
2. On your computer open a terminal/cmd prompt. Set the directory (on your pc) you want to work from, I'm using the desktop:
for Windows, type cd C:\Users\Yourname\Desktopfor Mac, type cd desktop or cd /Users/yourname/Desktop
Spoiler: How to set up adb and fastboot properly
To usb adb and fastboot commands outside of the folder those programs are located in, you'll need to add their location to the PATH list so your terminal can still find them when it's pointing to a different folder. If you want to skip this step, set the directory to the folder that contains adb instead of the desktop.
3. Next, use the terminal to check which A/B partition is active on your phone:
Code:
fastboot getvar all
a. You'll find it on this line: (bootloader) current-slot:a/bb. For simplicity I'll be referring to boot_a.img throughout the guide, make sure to use boot_b.img if that's the one marked as active on your device.
4. Download the semi-broken TWRP package to your desktop. We'll be using it to extract a copy of your active boot_a.img. It will give you temporary su access via adb, but there won't be a gui. Only boot from it, DO NOT FLASH IT:
Code:
fastboot boot recovery.img
adb shell
dd if=/dev/block/by-name/boot_a of=/sdcard/boot_a.img
exit
adb pull /sdcard/boot_a.img boot_a.img
adb reboot
5. Copy the extracted boot_a.img file to a user accessible area of your phone, like your downloads folder.
6. Install the latest Magisk Canary apk on your phone. Open it and:
a. Select the Install option.b. Use Select and Patch a File on boot_a.img
7. Copy the patched magisk_patched_a.img file back to your computer. In terminal, type adb reboot bootloader to get back to fastboot mode.
8. Temporarily boot with the patched image that corresponds to the active partition, DO NOT FLASH IT:
Code:
fastboot boot magisk_patched_a.img
Spoiler: Why we're booting and not flashing.
You could flash this boot.img, but it's safer to temporarily boot from it without overwriting your existing image in case anything went wrong along the way. The effect is that you still get root access without modifying your device, and then you can use the much safer Magisk direct install option, which has some safeguards in place.
9. By booting with the patched image, you now have temporary root access. To make it permanent open Magisk:
a. Select the Install option.b. Use Direct Install (Recommended) to root your internal boot.img
10. Reboot and verify it worked.
Click to expand...
Click to collapse
Are you guys aware of the zip file @osm0sis created that lets you add ADB to the stock recovery? You'll need to be rooted to use it.
[TWRP][3.4.0-14][instantnoodle]Unofficial TWRP for OnePlus 8/8 Pro Unified(Stable)
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and...
forum.xda-developers.com
It works really well - I've used it on 11.0.8.11 and .12
Thank you sir. I took the plunge and have been rewarded. Appreciate it!
shadowtuy said:
OK good news I got myself sorted!
1. What I did was use "Oxygen OS updater" (can be found on playstore) with advanced mode enabled and downloaded the latest OS (11.0.8.11.)
2. Use local upgrade under settings to install 11.0.8.11 and restart. This will remove root but not user data or settings.
3. Check for and install update 11.0.8.12 under settings and it should install fine no issues.
4. Re root using your chosen method.
5. Done!
Click to expand...
Click to collapse
This looks like a great app but it won't work if you need to downgrade. The current release (11.0.8.12.KB05AA) is so bad (look at OnePlus forums) that OnePlus has even taken it down and is no longer available for download. The current one is the previous one (11.0.8.11.KB05AA). Because I have already installed the "12" release, the OxygenOS System Update will not let me downgrade to the "11" release. It gives a "to avoid booting up failure, downgrading is not allowed" message.
Can I sideload/flash this "11" zip file via ADB and accomplish my goal of downgrading? Or could I change the active slot to the inactive one, reboot and get back to "11" that way?
zzjea said:
This looks like a great app but it won't work if you need to downgrade. The current release (11.0.8.12.KB05AA) is so bad (look at OnePlus forums) that OnePlus has even taken it down and is no longer available for download. The current one is the previous one (11.0.8.11.KB05AA). Because I have already installed the "12" release, the OxygenOS System Update will not let me downgrade to the "11" release. It gives a "to avoid booting up failure, downgrading is not allowed" message.
Can I sideload/flash this "11" zip file via ADB and accomplish my goal of downgrading? Or could I change the active slot to the inactive one, reboot and get back to "11" that way?
Click to expand...
Click to collapse
Well I tried switching slots but the inactive slot was corrupted from earlier. So I do not have an "11" in the other slot.
zzjea said:
Well I tried switching slots but the inactive slot was corrupted from earlier. So I do not have an "11" in the other slot.
Click to expand...
Click to collapse
Since OP 8T OxygenOS does not have a recovery, ADB sideload will not work.
Now that 11.0.8.13 is out and I'm on 11.0.8.12 right now, and so far I haven't come across a full zip for 13 yet. Not sure, if this will work .. but I'm thinking, I will uninstall magisk via the app. Restart to ensure, I'm unrooted and then do an OTA to 13. After the OS has been upgraded, follow the steps to root the boot dump file. Anyone tried this method and if would work? The 2 things I'm worried about are - 1) if I uninstall Magisk via the app, does it fully unroot and allows OTA, 2) will the broken twrp shared above work on the latest OOS x.13?
Thanks!
rezapatel said:
Now that 11.0.8.13 is out and I'm on 11.0.8.12 right now, and so far I haven't come across a full zip for 13 yet. Not sure, if this will work .. but I'm thinking, I will uninstall magisk via the app. Restart to ensure, I'm unrooted and then do an OTA to 13. After the OS has been upgraded, follow the steps to root the boot dump file. Anyone tried this method and if would work? The 2 things I'm worried about are - 1) if I uninstall Magisk via the app, does it fully unroot and allows OTA, 2) will the broken twrp shared above work on the latest OOS x.13?
Thanks!
Click to expand...
Click to collapse
For anyone who's interested. This worked!
Hey little bit of an add in! Keep a backup of your non Rooted boot.img!! It is actually easier to flash the non rooted and update just to reroot again.
I bought a phone (ZTE 2050) that has next to nothing as far as development goes. I have tried to install TWRP recovery but it had never actually worked. I have tried using various tools that port recovery to MTK devices. None of them have worked. I have been able to achieve root through Magisk. However, when I do, I no longer have the stock recovery either. There are several other problems that happen as well, but nothing I cannot work around. What could I be doing that is causing me to lose recovery? The chipset is MTK6771 and it is an ARM-V8 64 bit and it is running Android 9. Literally the only things I'm able to find online regarding this phone is the sites that I believe only copy and paste from other phones whether the root method actually works out not. Almost everything tells me to use MTK Tool but that definitely doesn't work. I have issues with Smart Phone Flash Tool working as well despite all drivers being installed correctly. The only way I have been able to achieve root is through unlocking the Bootloader and flashing. And even though I follow the instructions on commands, I still lose the stock recovery. Any help would be greatly appreciated.
Reflash phone's stock ROM.
xXx yYy said:
Reflash phone's stock ROM.
Click to expand...
Click to collapse
I have flashed the stock system at least 50 times by now. I have tried flashing everything in different orders as well. When I have root, it always removes the recovery. When I open my file manager, I use Solid Explorer, it tells me there is no root file system. I have tried other root file managers as well. They all tell me the same thing.
Android is rooted if su cmdlet is present in Android's filesystem
I've got a $100 Chinese MTK phone and the one redeeming feature is that once the bootloader is unlocked, you can fastboot over USB (bootstrap).
I used SP flash tool to backup the ROM and WwR_MTK to extract the partitions allowing me to make my own custom recovery to boot with fastboot. Briefly, I found a twrp recovery online for another MTK phone and just played around with zImage & initrd.
Shell commands, dmesg, cat /proc/partitions & blkid on the phone come in handy to track down in partition layout. No need to flash anything so don't get issues with /system/bin/install-recovery.sh
xXx yYy said:
Android is rooted if su cmdlet is present in Android's filesystem
Click to expand...
Click to collapse
I got it to hang on to the stock recovery. However, the bootloader remains unlocked. If I lock it again in fastboot, it will not allow me to boot the phone. When I try to flash vbmeta, it tells me there is no such file on the system.
xdabookam said:
I've got a $100 Chinese MTK phone and the one redeeming feature is that once the bootloader is unlocked, you can fastboot over USB (bootstrap).
I used SP flash tool to backup the ROM and WwR_MTK to extract the partitions allowing me to make my own custom recovery to boot with fastboot. Briefly, I found a twrp recovery online for another MTK phone and just played around with zImage & initrd.
Shell commands, dmesg, cat /proc/partitions & blkid on the phone come in handy to track down in partition layout. No need to flash anything so don't get issues with /system/bin/install-recovery.sh
Click to expand...
Click to collapse
I'll give that a shot. I just tried to open my root file system and it told me that BusyBox isn't installed. I thought I had read that BusyBox wasn't necessary with Magisk. Last time I tried to install a BusyBox, it screwed the whole system up. Is there one you would suggest? I've seriously messed with this phone 1000x's now and it's made me giggle shy to do anything to it at the moment.
Some devices have 'toolbox' or 'toybox' as a limited replacement for busybox (ls -al /bin/ls should reveal what binary the sym link points to).
I've used the ru.meefik.busybox app from the play store.
finnroth69 said:
the whole system up. Is there one you would suggest? I've seriously messed with this phone 1000x's now and it's made me giggle shy to do anything to it at the moment.
Click to expand...
Click to collapse
xdabookam said:
Some devices have 'toolbox' or 'toybox' as a limited replacement for busybox (ls -al /bin/ls should reveal what binary the sym link points to).
I've used the ru.meefik.busybox app from the play store.
Click to expand...
Click to collapse
xdabookam said:
Some devices have 'toolbox' or 'toybox' as a limited replacement for busybox (ls -al /bin/ls should reveal what binary the sym link points to).
I've used the ru.meefik.busybox app from the play store.
Click to expand...
Click to collapse
Ok, yeah I just checked it and it says toybox.
xdabookam said:
Some devices have 'toolbox' or 'toybox' as a limited replacement for busybox (ls -al /bin/ls should reveal what binary the sym link points to).
I've used the ru.meefik.busybox app from the play store.
Click to expand...
Click to collapse
I just installed the BusyBox and my whole system froze and started acting up.
xdabookam said:
Some devices have 'toolbox' or 'toybox' as a limited replacement for busybox (ls -al /bin/ls should reveal what binary the sym link points to).
I've used the ru.meefik.busybox app from the play store.
Click to expand...
Click to collapse
I rebooted and it started acting ok once again. When I tried to open my file manager to access to root file system, this is still the message I got even though I have not uninstalled the BusyBox.
xdabookam said:
Some devices have 'toolbox' or 'toybox' as a limited replacement for busybox (ls -al /bin/ls should reveal what binary the sym link points to).
I've used the ru.meefik.busybox app from the play store.
Click to expand...
Click to collapse
I just opened the BusyBox app and it says it isn't installed even though I have not uninstalled it either.
cm
xXx yYy said:
Android is rooted if su cmdlet is present in Android's filesystem
Click to expand...
Click to collapse
"cmdlet" not found. Yet Magisk is installed and I am able to access root.
If you can successfully apply su ( read: Switch User cmdlet ) then it got installed by whatever method.
finnroth69 said:
I just opened the BusyBox app and it says it isn't installed even though I have not uninstalled it either.
Click to expand...
Click to collapse
Busybox is just a tool / binary executable command to replace missing
linux commands. You don't need it installed on the phone, just access to the binary to run commands in the shell (copy it from /data/app/....) - its statically linked so should run without issue in the shell.
xXx yYy said:
If you can successfully apply su ( read: Switch User cmdlet ) then it got installed by whatever method.
Click to expand...
Click to collapse
Ok, I understand that. What I don't understand is why I am now being told that vbmeta cannot be found and installed and my bootloader must remain unlocked. Or why I cannot install recovery without losing recovery.
xdabookam said:
Busybox is just a tool / binary executable command to replace missing
linux commands. You don't need it installed on the phone, just access to the binary to run commands in the shell (copy it from /data/app/....) - its statically linked so should run without issue in the shell.
Click to expand...
Click to collapse
I can't copy it it. It won't allow me into the root file system.
xdabookam said:
Busybox is just a tool / binary executable command to replace missing
linux commands. You don't need it installed on the phone, just access to the binary to run commands in the shell (copy it from /data/app/....) - its statically linked so should run without issue in the shell.
Click to expand...
Click to collapse
I can't copy it it. It won't allow me into the root file system.
xdabookam said:
Busybox is just a tool / binary executable command to replace missing
linux commands. You don't need it installed on the phone, just access to the binary to run commands in the shell (copy it from /data/app/....) - its statically linked so should run without issue in the shell.
Click to expand...
Click to collapse
I just installed another BusyBox and the system is running fine afterwards, but this is the message I get when trying to open the root file system.
xdabookam said:
Busybox is just a tool / binary executable command to replace missing
linux commands. You don't need it installed on the phone, just access to the binary to run commands in the shell (copy it from /data/app/....) - its statically linked so should run without issue in the shell.
Click to expand...
Click to collapse
I pulled up the currently installed binary installed through shell.
I have a new Moto G Stylus 5G 2022 (XT2215-4) that I would like to compile lineage for. However TWRP does not currently support my device and therefore I cannot find any recovery images for my phone. Since I can't use TWRP yet I also can't root my phone yet.
I am willing to attempt to compile TWRP for phone from source but I will need .img's from the stock firmware to do that.
How can I extract the stock firmware off of my phone so that I can create the recovery files for my device?
Without root you can't.
xXx yYy said:
Without root you can't.
Click to expand...
Click to collapse
So if you can't root without recovery, and you can't get recovery without having root, how does anyone ever do anything with their phone?
Quite the catch 22.
I have only found a handful of sites that claim to have the stock firmware available for download. however all of them are essentially skins of each other and in different languages. Not legit at all.
Does Motorola release their own stock firmware?
1. Android Recovery is a minimalistic Android OS what allows you to perform some basic operations, has nothing to do with Root what is an Android OS function.
2. Root since Android version 6 is part of every full fledged Android OS - keyword: Toybox.
If OEM has eliminated su binary from Toybox then you have to add su binary to Android OS at your own.
xXx yYy said:
1. Android Recovery is a minimalistic Android OS what allows you to perform some basic operations, has nothing to do with Root what is an Android OS function.
2. Root since Android version 6 is part of every full fledged Android OS - keyword: Toybox.
If OEM has eliminated su binary from Toybox then you have to add su binary to Android OS at your own.
Click to expand...
Click to collapse
I get #1 and semi understand what you are saying in #2.
Alternatively, I have been able to acquire the stock firmware for my phone from Motorola using their own rescue and assistance tool.
Now I am working on extracting the system image from the super sparse chunk files provided in the firmware.
Tokth said:
I get #1 and semi understand what you are saying in #2.
Alternatively, I have been able to acquire the stock firmware for my phone from Motorola using their own rescue and assistance tool.
Now I am working on extracting the system image from the super sparse chunk files provided in the firmware.
Click to expand...
Click to collapse
Erm actually your firmware should be on the Lenovo Recovery Tool. This is how we got the boot.img for the Moto G Stylus 5G (2021). When you select it to recover your device it downloads the devices firmware. All you have to do is extract the boot.img from the applications download folder and then patch it with magisk and flash it if you have an unlocked bootloader already. Then you can extract whatever vendor blobs you need to create a working TWRP for your device.
Would you let me know if this works?
Tokth said:
So if you can't root without recovery, and you can't get recovery without having root, how does anyone ever do anything with their phone?
Quite the catch 22.
I have only found a handful of sites that claim to have the stock firmware available for download. however all of them are essentially skins of each other and in different languages. Not legit at all.
Does Motorola release their own stock firmware?
Click to expand...
Click to collapse
Without root or TWRP, they don't/can't do anything that requires accessing/modifying anything other than user data. Extracting the "ROM" requires root or TWRP because it resides in the system partition which can't be accessed by the user without root or TWRP.
No, it isn't a "catch 22", it is the way android is designed bacause the manufacturers/carriers never intended for the user to have access to system in the first place.
Droidriven said:
Without root or TWRP, they don't/can't do anything that requires accessing/modifying anything other user data. Extracting the "ROM" requires root or TWRP because it resides in the system partition which can't be accessed by the user without root or TWRP.
No, it isn't a "catch 22", it is the way android is designed bacause the manufacturers/carriers never intended for the user to have access to system in the first place.
Click to expand...
Click to collapse
You are correct.
tnuoccaadx2 said:
If I am rooted, how do I extract the firmware without twrp?
Click to expand...
Click to collapse
With adbshell(not adb) or a terminal emulator using dd commands, you just need to make sure you correct command and location of each partition that you want to pull a copy of.
Do a Google search for:
"How to extract copy of stock recovery via adbshell"
Or
"How to extract copy of stock recovery via Terminal Emulator"
tnuoccaadx2 said:
As for the stock firmware is there a guide for the dd cmds so i may see an example and a guide on how to find partition location?
Click to expand...
Click to collapse
That was the point of doing the searches I suggested. It should get you going in the right direction learning how to use dd command and how to identify your partitions.
Also, you could just download your stock firmware and extract what you need from the firmware file.
You don't always have to make use of
Code:
adb shell "<SHELL-COMMAND-HERE>"
Running
Code:
adb exec-out "<SHELL-COMMAND-HERE>"
does the job as well. The best solution is to use adb exec-out command !
Example:
Code:
adb exec-out "dd if=/dev/block/by-name/whatever of=/sdcard/whatever"
FYI:
exec-in and exec-out are present since Android 5.
exec-in and exec-out can write/read to/from only files, not STDOUT/STDIN.
Important:
If it does not work - it means that your phone does not support the command properly.