FAILED (remote: Command not allowed) - Xperia Z2 General

Hello,
I'm pretty new to rooting Sony devices and I can't seem to install custom roms on my Xperia Z2 using fastboot. My bootloader is unlocked (i've checked several times), USB debugging is checked and it believe my drivers are properly installed (fastboot devices cmd recognizes my device) but when i try to run "fastboot flash zip rom.zip" i get this annoying FAILED (remote: Command not allowed) message. I've looked through several threads but I can find any solution that applies to my case.
Any ideas would be welcome.
Thanks

I called Sony. Their official story is they do not support unlocking their own phones.
I asked her why, she said we just dont support unlocking the bootloader on some phones.
Im going to go break this phone and never recommend or buy sony products ever again

What exactly are you trying to flash?
Fastboot doesn't flash .zip files (I think). Whatever you are trying to flash must be extracted from the .zip file, then flashed via fastboot.
If you are trying to flash a custom kernel, you must have the boot.img file extracted from the .zip file in the same folder as the adb_fastboot folder, then hold in Shift then right-click and select, 'Open command window here' then type in cmd, 'fastboot flash boot boot.img'.
Once it says, 'Waiting for device', hold in the volume-up button on the phone and insert the USB cable into the phone.
Hope this helps.

I'm trying to flash android lollipop. I've tried extracting the boot.img flash it and then try to boot on recovery. A few times nothing happened and I couldn't force restore even using adb. Other times I just got stuck on the splash screen or in a loop reboot.
From what I've found online you can flash with flashboot using "flashboot flash zip Rom.zip" it starts transferring the room but it immediately does to the failed remote command not allowed error.
Sent from my D6503 using XDA Free mobile app

Where did you find that this command works for Xperia devices? I don't say that it can't work, but I see it for the first time (reading XDA for several years). All ROMs which I flashed were via flashtool or recovery, never through fastboot.
The best solution is to follow installation instruction of the given ROM.

RoamenCota
As far as I know most brands don't really support development but have you tried this the Sony Boot loader unlocking website?
_mysiak_
As for the cmd I found it online but I think it was an HTC forum. I guess it might not work in Xperia devices. I'm able to flash with flashtool but so far I've only managed to brick the phone.
Sent from my D6503 using XDA Free mobile app

Which ROM exactly are you trying to flash and what steps have you done?

_mysiak_ said:
Which ROM exactly are you trying to flash and what steps have you done?
Click to expand...
Click to collapse
I've tried flashing the [ROM][WIP]AOSP 5.0 Beta v2.0 from krabappel and the [ROM][SIRIUS][LP][5.0.1][SM-4.9] CyanogenMod 12 Unofficial [NIGHTLY BUILDS] from infected_ (sorry i'm not allowed to post links). As for the first one the process seems a bit more complex since there is a v2 plus an OTA to install. I've tried the second one first with flashboot but it didn't really work. With flash tool i've ended up bricking the phone.

CM is usually flashed via recovery (CWM, TWRP,..) - download ZIP, put it on SD card, boot into recovery, flash from there, reboot. Flashtool or fastboot should not be required. I would advise you to continue in ROM specific topics about any special installation steps/instructions.

_mysiak_ said:
CM is usually flashed via recovery (CWM, TWRP,..) - download ZIP, put it on SD card, boot into recovery, flash from there, reboot. Flashtool or fastboot should not be required. I would advise you to continue in ROM specific topics about any special installation steps/instructions.
Click to expand...
Click to collapse
For some reason that rom isn't able to be installed in TWRP recover. There's some install error may due to the fact that's a beta and not completely stable. If it doesn't work i'll just wait for a more stable version.
Just curious, even if it's a zip file, if I extract the complete package to the fastboot/adb folder and run "fastboot flash boot boot.img" there's no reason not to work right?

amrcardoso said:
For some reason that rom isn't able to be installed in TWRP recover. There's some install error may due to the fact that's a beta and not completely stable. If it doesn't work i'll just wait for a more stable version.
Just curious, even if it's a zip file, if I extract the complete package to the fastboot/adb folder and run "fastboot flash boot boot.img" there's no reason not to work right?
Click to expand...
Click to collapse
I don't think that it's worth the effort to flash those ROMs, unless you are really curious. Otherwise you should stick to verified and fully working ROMs.
It depends what you expect from that command. It will work, but it'll flash only kernel. System and other partitions remain untouched. Most probably you'll get bootloop with such combination.

_mysiak_ said:
I don't think that it's worth the effort to flash those ROMs, unless you are really curious. Otherwise you should stick to verified and fully working ROMs.
It depends what you expect from that command. It will work, but it'll flash only kernel. System and other partitions remain untouched. Most probably you'll get bootloop with such combination.
Click to expand...
Click to collapse
I'll probably stick with the zip flashing via recovery. But what step am I missing to flash a rom thorugh fastboot?

That most probably it's not possible to flash ROM via fastboot on Xperia devices. You have to use flashtool for FTF files and recovery for custom ROMs. Fastboot is used to flash kernel only.

_mysiak_ said:
That most probably it's not possible to flash ROM via fastboot on Xperia devices. You have to use flashtool for FTF files and recovery for custom ROMs. Fastboot is used to flash kernel only.
Click to expand...
Click to collapse
I have been able to flash the stock FTF but never a ROM using flashtool. Maybe that's why.
Thanks

Related

Going back to Sense from [RUU] Google Edition Conversion.Graffixync UPDATE 12th May

EDIT - UPDATED INSTRUCTIONS 12th May 2014
Due to the partition sizes being different in the GPE RUU it is not simply a case of flashing a sense rom in recovery. You will experience problems if you do this. This might involve getting the storage encrption message, bootloops, freezing etc etc.
This thread is specifically for users who have problems getting back to sense. Solution is below. If you have alternative solutions that have worked without issues please post.
I have tried to make them as simple as possible. This guide assumes you are S-Off otherwise how did you get here. (
This does not apply if you have installed a GPE ROM. You can flash as normal through recovery. (using instructions of new rom)
Thanks to @exad for his continuing support/assistance throughout the thread, as well as @graffixnyc for the GPE RUU and both he and @navalynt for finding the initial fixes.
It will be much easier if you have your new Rom on your external sdcard prior to starting this. It will also stop a number of problems if you have SuperCID (11111111) If you don't know how to - FASTBOOT Commands
1. Enter the command "fastboot oem readcid". Make and KEEP a note of your original CID.
2. Enter the command "fastboot oem writecid 11111111"
3. Enter the command "fastboot read cid" [it should confirm your CID is 11111111]
4. Press the volume down button twice on your phone and navigate to reboot bootloader, then hit power button to reboot the bootloader.
5. Bootloader will also say "CID-11111111" now to confirm (Thanks to @xl VipeR lx ) Also to @umjammerlammy for the GENTLE reminders to include this
Make sure the firmware file and twrp recovery are in your Android directory on your PC - Mine is
C:\Users\Grentuu\AppData\Local\Android\android-sdk\platform-tools\
During this process you may find that when you reboot the phone starts to boot into android. Mine did but simply had the GPE animated logo but never entered GPE. All you do is press Vol up and power for about 10 seconds to reset. As soon as it resets press vol down and power to get back to bootloader.
Flash 1.54.401.5 firmware from Here
Fastboot Method
Boot device into FASTBOOT mode either by adb reboot bootloader or Vol down & Power (device should show FASTBOOT USB)
Make sure the firmware file to be flashed is in your android folder
Open a command prompt from the folder where fastboot resides. (Hold shift key/right click in the dir to get menu - left click on Open Command Prompt here.)
Run the following commands:
fastboot oem rebootRUU (this will reboot the device into RUU mode in preparation for zip flashing)
fastboot flash zip 1.54.401.5-W_Splash.zip (the name of the zip should EXACTLY match the name of the file you're flashing)
It will fail the first time. Run the same command AGAIN until you see it has flashed successfully.
I repeat - Run the same command TWICE until you see it has flashed successfully.
Once complete, type fastboot reboot-bootloader The hyphen is required.
Some users have stated this firmware (1.54.401.5) did not work for them as they weren't GSM and reboots just threw them back to recovery. If this happens try a stock (your original e.g. T-mobile) firmware then follow the rest of the process.
Boot into stock recovery
Factory reset
Reboot into bootloader
Flash TWRP - command = fastboot flash recovery openrecovery-twrp-2.7.0.2-m8.img (The must match exactly the name of the recovery you are flashing and remember the recovery file must be in your android folder)
Boot into TWRP
Go into Wipe menu
do a full factory reset wipe
Reboot back into recovery
Install rom
Profit
These have worked for me everytime (Change count =19)
Thanks for this. I'm about to give it a shot now.
Sent from my HTC One_M8 using XDA Premium 4 mobile app
---------- Post added at 05:08 PM ---------- Previous post was at 04:40 PM ----------
For some reason the firmware wont flash in twrp. Should I sideload the firmware?
Sent from my GT-P5210 using XDA Premium 4 mobile app
To flash a firmware you must be in bootloader/fastboot mode.
Fastboot oem rebootRUU
Fastboot flash zip firmwarefilename.zip
Then again
Fastboot flash zip firmwarefilename.zip
Fastboot reboot-bootloader
exad said:
To flash a firmware you must be in bootloader/fastboot mode.
Fastboot oem rebootRUU
Fastboot flash zip firnwarefilename.zip
Then again
Fastboot flash zip firnwarefilename.zip
Fastboot reboot-bootloader
Click to expand...
Click to collapse
Thanks. Understood, I was just reviewing my steps for the conversion. I really just want to try out that new Sense rom and then I'll probably revert back. BRB...I'll let you know how it goes.
Bear in mind you must have S-off to flash a firmware that way.
exad said:
To flash a firmware you must be in bootloader/fastboot mode.
Fastboot oem rebootRUU
Fastboot flash zip firmwarefilename.zip
Then again
Fastboot flash zip firmwarefilename.zip
Fastboot reboot-bootloader
Click to expand...
Click to collapse
Those are the instructions in post 1 the original thread.
The issue is with people wanting to go back to sense
This thread is about returning to sense. Flashing a firmware is always the same. It's the firmware itself that's different...
Here is where I am at..
I converted to GP easily and it worked well.. I wanted to convert back so I installed twrp first, then through twrp installed the 1.54.401.5 firmware.
Installing that firmware removed twrp and the rom. So I am without an OS at all, and have stock recovery.
Is there anyway I can flash a custom recovery or a rom via the stock firmware/recovery?
My computer will not recognize adb devices. But it used to obviously.
I have an SD card.
Any help and I will be sooo grateful. (maybe even donate)
Thanks!
You can't flash a firmware through recovery... You can flash a stock recovery after the steps listed above if you like. See the stock backup thread.
You can flash any recovery through fastboot... Adb only works with the rom booted or with custom recovery booted.
Thanks will try it out.
exad said:
You can't flash a firmware through recovery... You can flash a stock recovery after the steps listed above if you like. See the stock backup thread.
You can flash any recovery through fastboot... Adb only works with the rom booted or with custom recovery booted.
Click to expand...
Click to collapse
So what do I do in this situation with no rom installed only 1.54 firmware and stock recovery.
Flash twrp
exad said:
Flash twrp
Click to expand...
Click to collapse
I have no rom installed, so it wont show in adb devices.
PunchLick said:
I have no rom installed, so it wont show in adb devices.
Click to expand...
Click to collapse
You flash recovery via fastboot, no need for a rom.
Just make sure you have the proper fastboot drivers from htc.
Dmaxon said:
You flash recovery via fastboot, no need for a rom.
Just make sure you have the proper fastboot drivers from htc.
Click to expand...
Click to collapse
ADB devices shows no devices. If i had custom recovery this would be so much easier, but im using 1.54.401.5 firmware with stock recovery and no ROM.
Just dont know what to do to get a working device again. All i can do is boot into stock recovery, hboot and fastboot.. but computer shows no device.
PunchLick said:
ADB devices shows no devices. If i had custom recovery this would be so much easier, but im using 1.54.401.5 firmware with stock recovery and no ROM.
Just dont know what to do to get a working device again. All i can do is boot into stock recovery, hboot and fastboot.. but computer shows no device.
Click to expand...
Click to collapse
I would recommend the All-In-One Toolkit. This will allow you to fastboot the recovery, even though the pc doesn't recognize it. This has worked for me in the past.
Meanwhile, I get the following error message when attempting to flash the 1.54...
Any suggestions guys???
Problem solved. I had not supercid. After I did that, I was able to successfully flash 1.54...
Why post steps if your not willing to help?
The steps in the OP can still cause issues for some people.
Sent from my HTC One_M8 using Tapatalk
Ideas4ya said:
I would recommend the All-In-One Toolkit. This will allow you to fastboot the recovery, even though the pc doesn't recognize it. This has worked for me in the past.
Meanwhile, I get the following error message when attempting to flash the 1.54...
Any suggestions guys???
Problem solved. I had not supercid. After I did that, I was able to successfully flash 1.54...
Click to expand...
Click to collapse
Can you elaborate a little on which options etc, because that sounds fantastic and would help me so much!
PunchLick said:
Can you elaborate a little on which options etc, because that sounds fantastic and would help me so much!
Click to expand...
Click to collapse
When you open the all in one...the 3rd option on the top right is what you need. Follow the step, even if fastboot says device is not connected, this will still send the recovery to your device as long as you're in the bootloader.
I will never understand why people play with there phones and have no understanding of adb and fastboot commands with the bootloader. if people would learn that first there wouldn't be so many threads when they get stuck. tool kits are bad it makes people lazy. but I appreciate the devs who make them

[Q] [Mi2S] Impossible to flash custom recovery on MIUI 5.5.15 Beta

Hi everyone,
I've run out of ideas on this one and other threads couldn't really help me/were closed already.
I tried CM, stock android by Ivan and M1cha as well as some others, but about a month ago, I was curios for MIUI 6 based on Lollipop for my Mi2s and changed from M1cha's CM12 5.0.1.
Now that I've seen that Ivan published his 5.1.1 I wanted to try it out. He also provides us with a modified custom recovery that I wanted to flash.
First, I renamed the file to update.zip and tried to flash it in Mi-Recovery 2.0.1, which didn't work due to the failing signature verification.
Also, choosing update package in the Updater app in MIUI didn't work out, it immediately tells me something went wrong.
Then I thought, why not use fastboot? That worked before.
Not this time. I tried the simple way, meaning just fastboot flash recovery recovery.img: Then, bc it didn't work, I first erased the recovery partition and then flashed the recovery.img, which was still unsuccessful.
Whenever I try to enter recovery mode, my phone just gets stuck showing the MI logo and not doing anything.
I can reenter fastboot mode or simply reboot to the system as usual, except for when no system is installed.
When I gave up on the custom recovery thing, I simply tried to flash the ROM via update.zip methods, as well as via fastboot. None of them worked, either because the signature verification fails (stock recovery) or because the zip file does not contain the android-info.txt and the other txt file.
As mentioned above, upon entering fastboot -w and then flashing the recovery.img, I can suddenly enter recovery mode. This sucks!
TL;DR: No usual method of flashing either custom rom or recovery works (to my knowledge)
Can anyone help me? I know its stupid but I start feeling kind of boxed in on MIUI.
Thanks in advance
fastboot oem unlock
fastboot flash recovery recovery.img
unfortunately, that didn't work either...
leonfromotown said:
unfortunately, that didn't work either...
Click to expand...
Click to collapse
Do fastboot devices and tell us the output
SkiFire13 said:
Do fastboot devices and tell us the output
Click to expand...
Click to collapse
5b799fb fastboot
looks just the way it did before

[X01BD] Can't install TWRP after unlocking with Official UnlockTool

Hi guys,
I am using Zenfone Max Pro M2. I wanted to install a custom rom and I tried to unlock bootloader but I unlocked it through official unlocktool. Now I can't flash anything or send any command through fastboot, whenever I do then it restarts the device.
When I try to keep the fastboot command running and then connect phone - it throws errors like "Fail - Too many links", "Fail - Write to device fail (No such file or directory)" or "Fail- Unknown command".
I tried unlocking bootloader with the unofficial way provided in https://forum.xda-developers.com/max-pro-m2/how-to/unlook-bootloader-root-asus-zenfone-max-t3885457
but it isn't working either, any fastboot command is rebooting the device although bootloader is unlocked.
How do I fix this?
EDIT: Things I have tried:
- Changing USB Cable and Port
- Reinstalling ADB and device driver
- Reunlocking bootloader from UnlockTool (don't know why I did that again)
- Unofficial way to unlock bootloader
None of it helped.
Thanks
Mr147 said:
Hi guys,
I am using Zenfone Max Pro M2. I wanted to install a custom rom and I tried to unlock bootloader but I unlocked it through official unlocktool. Now I can't flash anything or send any command through fastboot, whenever I do then it restarts the device.
When I try to keep the fastboot command running and then connect phone - it throws errors like "Fail - Too many links", "Fail - Write to device fail (No such file or directory)" or "Fail- Unknown command".
I tried unlocking bootloader with the unofficial way provided in https://forum.xda-developers.com/max-pro-m2/how-to/unlook-bootloader-root-asus-zenfone-max-t3885457
but it isn't working either, any fastboot command is rebooting the device although bootloader is unlocked.
How do I fix this?
EDIT: Things I have tried:
- Changing USB Cable and Port
- Reinstalling ADB and device driver
- Reunlocking bootloader from UnlockTool (don't know why I did that again)
- Unofficial way to unlock bootloader
None of it helped.
Thanks
Click to expand...
Click to collapse
Guys, no one to help or assist?
Mr147 said:
Guys, no one to help or assist?
Click to expand...
Click to collapse
Did u try running the command at the adb folder?shift+right click in adb folder?
Is Usb debugging enabled in developer options?
X10MINISTER said:
Did u try running the command at the adb folder?shift+right click in adb folder?
Is Usb debugging enabled in developer options?
Click to expand...
Click to collapse
Yes, everything done.
Still no success.
Mr147 said:
Yes, everything done.
Still no success.
Click to expand...
Click to collapse
Did ur unlocking bootloader succeed?
Did you try relocking the bootloader ?
1) Try relocking the bootloader using the methods described here :
https://forum.xda-developers.com/max-pro-m2/how-to/unroot-relock-bootloader-max-pro-m2-t3885870
See if it successfully relocks...
If it does, then next time unlock using the unofficial method only...
2) If not then maybe try contacting ASUS... Tweet them on Twitter... Companies usually respond very fast on Twitter, since their reputations are at stake...
3) All else fails then try rooting it using something like Kingroot... Once rooted, flash TWRP Recovery using Flashify... then flash any custom ROM u want...
I hope your problem gets solved... Next time be a little more cautious when taking such a risky step... See what are all the options you have before jumping into something...
X10MINISTER said:
Did ur unlocking bootloader succeed?
Click to expand...
Click to collapse
I guess it did because when I reboot it I get that bootloader unlocked splash screen.
Tyakrish said:
Did you try relocking the bootloader ?
1) Try relocking the bootloader using the methods described here :
https://forum.xda-developers.com/max-pro-m2/how-to/unroot-relock-bootloader-max-pro-m2-t3885870
See if it successfully relocks...
If it does, then next time unlock using the unofficial method only...
2) If not then maybe try contacting ASUS... Tweet them on Twitter... Companies usually respond very fast on Twitter, since their reputations are at stake...
3) All else fails then try rooting it using something like Kingroot... Once rooted, flash TWRP Recovery using Flashify... then flash any custom ROM u want...
I hope your problem gets solved... Next time be a little more cautious when taking such a risky step... See what are all the options you have before jumping into something...
Click to expand...
Click to collapse
Tried everything except 2, none worked. I'll drop them a query over twitter like you say, let's see what their reply is.
I am on stock recovery, non working bootloader but unlocked, and stock rom unrooted.
I think Pie update may give some insight on fixing this.
Mr147 said:
I guess it did because when I reboot it I get that bootloader unlocked splash screen.
Click to expand...
Click to collapse
I see.. did u've try using another laptop/pc? Sometimes antivirus blocking the tools that are needed for unlocking bootloader..
X10MINISTER said:
I see.. did u've try using another laptop/pc? Sometimes antivirus blocking the tools that are needed for unlocking bootloader..
Click to expand...
Click to collapse
I unlocked using official bootloader apk provided by asus. Now I have encrypted phone which isn't decrypting and can't flash twrp.
Mr147 said:
I unlocked using official bootloader apk provided by asus. Now I have encrypted phone which isn't decrypting and can't flash twrp.
Click to expand...
Click to collapse
Hey you said phone is encrypted ? Maybe this might work :
1) Download and install the latest Magisk Manager apk
2) Extract boot.img from stock firmware
3) Put boot.img in your internal storage and open magisk app.
4) Click on install and select patch boot Image.
5) Select stock boot.img file placed in phone memory.
6) Magisk will automatically patch the stock Image and this patched image can be installed using fastboot using this command:
fastboot flash boot patched_boot.img
This will root your phone. After that you can install Flashify to flash TWRP or PBRP
Note:
- This method is highly experimental... There are 50% chances of bootloop. I would not have recommended this method, but situation seems to demand it.
- Your data will most probably be formatted, so keep a backup.
- If it falls in a bootloop, then you need to flash original stock firmware to restore your phone.
Credits: @#ArtFuL
Who came up with this method, but removed it from the main guide, because of being experimental... (I guess)
Mr147 said:
I unlocked using official bootloader apk provided by asus. Now I have encrypted phone which isn't decrypting and can't flash twrp.
Click to expand...
Click to collapse
After going through the errors, I strongly believe that the problem is with your drivers. If reinstalling doesn't works, try a different pc. If your pc detects your device on MTP or your are able to perform adb operations without any hassle, it's not the problem with your phone.
You can decrypt the device only after flashing custom recovery.
---------- Post added at 09:35 PM ---------- Previous post was at 09:31 PM ----------
Tyakrish said:
Hey you said phone is encrypted ? Maybe this might work :
1) Download and install the latest Magisk Manager apk
2) Extract boot.img from stock firmware
3) Put boot.img in your internal storage and open magisk app.
4) Click on install and select patch boot Image.
5) Select stock boot.img file placed in phone memory.
6) Magisk will automatically patch the stock Image and this patched image can be installed using fastboot using this command:
fastboot flash boot patched_boot.img
This will root your phone. After that you can install Flashify to flash TWRP or PBRP
Note:
- This method is highly experimental... There are 50% chances of bootloop. I would not have recommended this method, but situation seems to demand it.
- Your data will most probably be formatted, so keep a backup.
- If it falls in a bootloop, then you need to flash original stock firmware to restore your phone.
Credits: @#ArtFuL
Who came up with this method, but removed it from the main guide, because of being experimental... (I guess)
Click to expand...
Click to collapse
Yes this method is highly experimental. Also in this situation, he cannot use any fastboot commands. So this method won't work
#ArtFuL said:
After going through the errors, I strongly believe that the problem is with your drivers. If reinstalling doesn't works, try a different pc. If your pc detects your device on MTP or your are able to perform adb operations without any hassle, it's not the problem with your phone.
You can decrypt the device only after flashing custom recovery.
---------- Post added at 09:35 PM ---------- Previous post was at 09:31 PM ----------
Yes this method is highly experimental. Also in this situation, he cannot use any fastboot commands. So this method won't work
Click to expand...
Click to collapse
This method didn't work, as fastboot isn't accepting any command. I tried giving command before connecting phone and then connecting, it gives me error of "File size is more than max allowed".
So is it done?
Mr147 said:
This method didn't work, as fastboot isn't accepting any command. I tried giving command before connecting phone and then connecting, it gives me error of "File size is more than max allowed".
Click to expand...
Click to collapse
See I recommend please use Linux (Manjaro or Ubuntu) , Windows will have driver issues forever and ever
had same issue after fota update UL-ASUS_X01BD-WW-15.2016
Tyakrish said:
Hey you said phone is encrypted ? Maybe this might work :
1) Download and install the latest Magisk Manager apk
2) Extract boot.img from stock firmware
3) Put boot.img in your internal storage and open magisk app.
4) Click on install and select patch boot Image.
5) Select stock boot.img file placed in phone memory.
6) Magisk will automatically patch the stock Image and this patched image can be installed using fastboot using this command:
fastboot flash boot patched_boot.img
This will root your phone. After that you can install Flashify to flash TWRP or PBRP
Thanks , this method work me. had same issue after fota update UL-ASUS_X01BD-WW-15.2016.1902.192-user
Click to expand...
Click to collapse
I've the same problem too. Let me know if you've configure it out. Thanks.
Okay @Mr147, I've fix this. I checked Windows Update and there was a pending ASUS driver update. I downloaded it and now I can use the fastboot commands.
Anyone that can fix this problem? I also experience this.
Mr147 said:
Hi guys,
I am using Zenfone Max Pro M2. I wanted to install a custom rom and I tried to unlock bootloader but I unlocked it through official unlocktool. Now I can't flash anything or send any command through fastboot, whenever I do then it restarts the device.
When I try to keep the fastboot command running and then connect phone - it throws errors like "Fail - Too many links", "Fail - Write to device fail (No such file or directory)" or "Fail- Unknown command".
I tried unlocking bootloader with the unofficial way provided in https://forum.xda-developers.com/max-pro-m2/how-to/unlook-bootloader-root-asus-zenfone-max-t3885457
but it isn't working either, any fastboot command is rebooting the device although bootloader is unlocked.
How do I fix this?
EDIT: Things I have tried:
- Changing USB Cable and Port
- Reinstalling ADB and device driver
- Reunlocking bootloader from UnlockTool (don't know why I did that again)
- Unofficial way to unlock bootloader
None of it helped.
Thanks
Click to expand...
Click to collapse
I suggest to Unlock with unofficial step, or read the post https://www.blocknesia.com/2019/04/unlock-bootloader-dan-install-twrp-asus-zenfone-max-pro-m2.html

[RECOVERY] TWRP for Onn Android Tablets (unofficial) - 2019-11-30

TWRP Custom Recovery for the Onn Android Tablet series​
This is the first fully-featured custom recovery for Walmart's MediaTek-based Onn tablets: ONA19TB002, ONA19TB003 and ONA19TB007. TWRP needs no introduction. If you have come here, you probably have some idea of what it is and what it's used for. This TWRP build does not need the bootloader unlocked or VBMeta verification disabled, although it's recommended that you at least unlock the bootloader.
DISCLAIMER
Everything described in this thread is 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 bugs in this software.
FEATURES
Decrypted data partition
All USB modes functional: MTP, ADB, Mass Storage, OTG, Charging
Fast boot time
Adoptable storage mounting
Firmware image backup and restore
Works under locked bootloader
Android 9 build fits within the 16MB recovery partition -- no compromises or partition resizing necessary
INSTALLATION METHOD 1
Download the recovery to your PC and unzip the image
Unlock the bootloader (skip if you have already done this)
Enable OEM Unlock in Developer Options in Android Settings
Boot into fastboot mode either by holding vol. up+power to power it on and selecting "Fastboot mode", or by running the 'adb reboot bootloader' command from within Android.
Install fastboot and appropriate drivers on your PC if you have not set those up
Unlock the bootloader with the command
Code:
fastboot flashing unlock
...and follow the instructions on the screen. This will wipe your data.
Flash the custom recovery with
Code:
fastboot flash recovery twrp-3.3.1-ONA19TB002.img
(use the right file name path for your device)
Reboot to recovery with
Code:
fastboot oem reboot-recovery
INSTALLATION METHOD 2
This assumes you are familiar with SP Flash Tool or can figure it out on your own
Download the recovery to your PC and unzip the image
Get the appropriate scatter file for your device. The scatter file may be found in the device's firmware under /system/data/misc.
Set up SPFT Download tab as Download Only. Load your scatter file.
Under the recovery line, double-click Location and open your TWRP image.
Click Download and connect your powered-off tablet to your PC. SPFT will automatically flash the recovery to the emmc and disconnect when finished.
INSTALLATION METHOD 3
Head over to Amazing Temp Root for MediaTek ARMv8, read the requirements and directions, and grab the latest mtk-su.
Open a root shell with mtk-su
Flash the (unzipped) recovery with the command:
Code:
dd bs=1048576 if=twrp-3.3.1-0-ONA19TB002.img of=/dev/block/by-name/recovery
(replace the if= file name with your appropriate recovery image path)
Exit root shell
START RECOVERY
Three methods:
On a powered off tablet, hold Vol. up+power for about 3 seconds. In the menu that appears, select "Recovery mode"
With Android ADB, use the command 'adb reboot recovery'
From Android root shell, use the command 'reboot recovery' or just use any root app with OS reboot features
NOTES
Kind of important: Make a backup of your Crypto Footer as soon as you can. This is the encryption key to your data partition. When accessed from TWRP, this key can get "upgraded" so that you will get locked out of Android. TWRP uses a hacky workaround that saves and restores the original footer on every /data decrypt. But that method is not what I would call 100% reliable.
Make sure you have a backup of the untouched stock system and vendor images. There are no official firmware packages available to download.
Only mount system/vendor partitions in read/write mode if you have unlocked the bootloader. It is recommended to choose to leave system read-only at the startup prompt unless you have a specific reason to modify it. If the bootloader is locked, then dm-verity is enforced.* So merely mounting it once in r/w will cause a boot loop.
It's currently not possible to install incremental OTA updates using this TWRP. Use the stock recovery to update the FW. That will only work if you have never mounted system/vendor in write mode.
DOWNLOAD (Nov. 30, 2019)
Current version: 3.3.1-1
ONA19TB002 - Onn 8" model
ONA19TB003 - Onn 10.1" model
ONA19TB007 - Onn 10.1" w/keyboard model
Source code
ONA19TB002 | ONA19TB003 | ONA19TB007
ACKNOWLEDGEMENTS
The team behind TWRP & OmniROM
@tek3195 for testing and feedback on the 8" model
Please post feedback since these are still pretty new and not exhaustively tested. Let me know if I should port it to other models in the series.
Reserved also
grabbing this one too cuz why not
Very nice! I'll download and test the 003 one soon.
I also have a 007 model to experiment with.
I tried about a dozen times to build TWRP and failed miserably LOL. Closest I got was one that would boot but the rotation was all messed up, USB wouldn't work, didn't mount some partitions... Yeah, it was a hot mess.
Do you happen to have sources available?
Hi @NFSP G35,
I'll have the source code soon. Most of the tricks involved patching bootable/recovery. So I need to commit those changes and include the proper patch set from my tree....
Amazing!! Gonna install and test 8" right now.
Has anyone tried a GSI on these tablets yet?
MishaalRahman said:
Has anyone tried a GSI on these tablets yet?
Click to expand...
Click to collapse
I do know @tek3195 , the Onn 8 thread starter, has tried many of them as well as others here, somewhere on that thread he listed his tests and opinion of several of them.
I'm pretty sure others on that thread have also tried GSI's.
MishaalRahman said:
Has anyone tried a GSI on these tablets yet?
Click to expand...
Click to collapse
I did try both Phhuson vanilla and also Liquid Remix (I'm keeping this one for now). I didn't flash them through twrp, but using fastboot via bootloader.
WoW! AwEsOmE! I cannot wait to try this! THANK YOU!!!!!!
Hey,
This is a neat thing to see for the Onn tablets. I have a question though. I own a device based on the mt8163, and am trying to help people with another device I don't own (the powkiddy x18 which also uses the mt8163). One of the things I wanted to do was to make a custom rom for the x18, since it's stock firmware is horrible. And of course, one of the first steps to custom roms is twrp. So I have a question for you that I hope you can answer for me. How did you make this build of twrp? I have seen no device trees for this device so I was kinda curious. If you can help me in any way, I'd be so grateful, and I'm sure the other people with the x18 would be grateful for help.
@diplomatic
Is there a different procedure for installing TWRP on a locked bootloader?
I can confirm that using SP Flash to load your TWRP.img will produce a bootloop when installing to a device with the BL locked. Reflashing the original recovery.img makes the problem go away. You mentioned in the OP that this TWRP will work on a locked BL so I thought I would share my case study with you in following the procedure you defined.
MY SINCERE GRATITUDE FOR YOUR EFFORTS IN PORTING THIS TO THE ONN!
You're welcome, @Spatry.... Can you describe how you ended up with a locked BL? Was it unlocked before? Have you ever tweaked vbmeta? Also, when you say bootloop, do you mean for Android or just for recovery? I'm not going to insist that it works under locked BL. I tested it once and it did boot up...
diplomatic said:
You're welcome, @Spatry.... Can you describe how you ended up with a locked BL? Was it unlocked before? Have you ever tweaked vbmeta? Also, when you say bootloop, do you mean for Android or just for recovery? I'm not going to insist that it works under locked BL. I tested it once and it did boot up...
Click to expand...
Click to collapse
Presently, I am running stock with Magisk patched BOOT on locked bootloader, stock vbmeta. The boot loop was at the ONN Android screen, I could not get it to even boot into recovery.
At one time I did run with the bootloader unlocked (with --disable-verification on stock vbmeta) and I ran Phusson's AOSP, Liquid Remix and Bliss. I found there was no benefit to me in running the other mods so I reverted back to stock courtesy of @CaffeinePizza and the bootloader re-locked to get rid of that annoying 5 second orange state.
In each instance, I always used SP Flash tools to load all .img files. I only used fastboot to install magisk_patched.img onto the stock installation. Unlocking the bootloader erases all data and I did not feel like reinstalling everything again, so I figured I would try to install TWRP per your instruction to see if it would work while the BL was still locked... Restoring the original recovery got rid of the bootloop. I do want to try your TWRP so I will try it with BL unlocked when I get some free time to do so.
Spatry said:
Presently, I am running stock with Magisk patched BOOT on locked bootloader, stock vbmeta. The boot loop was at the ONN Android screen, I could not get it to even boot into recovery.
Click to expand...
Click to collapse
This sounds like you might have flashed a wrong/corrupt image to recovery. It may have to do with AVB checks rather than bootloader lock. But those conditions might be interdependent somehow so I can't tell you for sure. The fact that you are able to boot a patched image on a locked BL says it doesn't care too much about verification. I can tell you for sure that any recovery image must have avb metadata, not necessarily the required hash, for both Android and recovery to boot. Can you try to unzip the image file and flash it over again?
Hmm, the situation with the bootloader lock sounds eerily similar to the Nabi SE. The latter also had a similar implementation where there's not much in the way of locking things down, other than an (easily circumvented) SP Flash Tool signature check and different preloader keys. And here's the real kicker: the nearly-identical Fisher Price Nabi also ran on the MT8163, so it makes me wonder if it's possible to boot Pie on it, or perhaps a GSI assuming that Treble can be tacked onto it.
Also, do you have the source repo to this TWRP port of yours?
If anyone here gave me an XDA ad-free subscription, thanks a lot! I didn't get a notification of who it was. Using this site is a lot more bearable now.
diplomatic said:
If anyone here gave me an XDA ad-free subscription, thanks a lot! I didn't get a notification of who it was. Using this site is a lot more bearable now.
Click to expand...
Click to collapse
Where do I find crypto footer to backup
diplomatic said:
If anyone here gave me an XDA ad-free subscription, thanks a lot! I didn't get a notification of who it was. Using this site is a lot more bearable now.
Click to expand...
Click to collapse
Kinda cool without the ads isn't it. I know I sent one about a week ago or so. I think everybody ought to send you one, you deserve it. THANKS and AWESOME work.

Custom Rom / rooting Options vor TB-125FU (Lenovo Tab M10 Plus 3rd Gen)

Hey everyone,
I've been looking for options to Install a custom Rom or root since I bought the Tablet several month ago. It seems like there are some options for the Full Hd Version, but I have a hard time finding anything useful for the 125FU. Are there any recommendations like compatible GSI roms or TWRP/magisk?
Thanks in advance for your help!
You should just be able to install matiek form my understanding
I need some information, too. Bootloader unlock is different. Device doesn't respond to bootloader commands with Minimal ADB Fastboot 1.4.3.
holmesmalone said:
I need some information, too. Bootloader unlock is different. Device doesn't respond to bootloader commands with Minimal ADB Fastboot 1.4.3.
Click to expand...
Click to collapse
I just got an tb125fu
Bootloader unlock was no problem, maybe it works for you now with the latest versions?
art99 said:
I just got an tb125fu
Bootloader unlock was no problem, maybe it works for you now with the latest versions?
Click to expand...
Click to collapse
The issue I had, and resolved, was the lack of the latest fastboot drivers. Gained root with Magisk successfully.
holmesmalone said:
The issue I had, and resolved, was the lack of the latest fastboot drivers. Gained root with Magisk successfully.
Click to expand...
Click to collapse
I installed corvus os gsi on it. i have no custom recovery.
peteonu said:
I installed corvus os gsi on it. i have no custom recovery.
Click to expand...
Click to collapse
TWRP is convenient, but not absolutely necessary. Would like a Lineage rom though.
holmesmalone said:
TWRP is convenient, but not absolutely necessary. Would like a Lineage rom though.
Click to expand...
Click to collapse
Agreed. I've been looking into compiling TWRP myself but this is all new to me. The only device with TWRP with this chipset is the Redmi 9. I've compared both boot.img's and they are both setup differently. If I had more knowledge ont he subject I could easily achieve this I believe.
If I have time I'll compare Gen 2 vs Gen 3 boot.img's, that may help understand the folder and file structure better.
holmesmalone said:
The issue I had, and resolved, was the lack of the latest fastboot drivers. Gained root with Magisk successfully.
Click to expand...
Click to collapse
What process did you use with magisk to gain root after bootloader unlock? was it as simple as installing magisk manager and flashing root through the manager?
Thanks
el7145 said:
What process did you use with magisk to gain root after bootloader unlock? was it as simple as installing magisk manager and flashing root through the manager?
Thanks
Click to expand...
Click to collapse
The same process worked for me.
holmesmalone said:
The same process worked for me.
Click to expand...
Click to collapse
How did you obtain the boot.img to patch??? I cant find the stock firmware anywhere, and im not clear on pulling the stock boot.img (getting permission denied errors when attempting via adb)
el7145 said:
How did you obtain the boot.img to patch??? I cant find the stock firmware anywhere, and im not clear on pulling the stock boot.img (getting permission denied errors when attempting via adb)
Click to expand...
Click to collapse
Select and download your preferred rom. Then unzip the rom and in the unzipped folder select the boot.img file and use it.
With some devices and roms, under some circumstances, the vbmeta.img file can and should be used. If I can recall correctly, Magisk will specify.
holmesmalone said:
Select and download your preferred rom. Then unzip the rom and in the unzipped folder select the boot.img file and use it.
With some devices and roms, under some circumstances, the vbmeta.img file can and should be used. If I can recall correctly, Magisk will specify.
Click to expand...
Click to collapse
ok, so ur just pulling the boot img from one of the GSI roms...im just trying to pull the stock boot img...do you happen to know where one can download the stock firmware for this device, this is my 1st lenovo tablet
el7145 said:
ok, so ur just pulling the boot img from one of the GSI roms...im just trying to pull the stock boot img...do you happen to know where one can download the stock firmware for this device, this is my 1st lenovo tablet
Click to expand...
Click to collapse
LMSA. https://pcsupport.lenovo.com/us/en/downloads/ds101291-rescue-and-smart-assistant-lmsa
Use this tool. Install and explore the file and folder structure it creates. Interrupt the process before it flashes your tablet for it will erase the files you need from your computer if you don't. Use trial and error here.
Since the original question was about root, Ill keep this going
I was able to download the most recent ROM from Lenovo rescue which was super simple, it downloads the ROM first and wont start the flash till you click the button. I did retrieve the stock boot.img, patched it, and flashed it, rebooted and had root. Heres where the many hours of fun started...I realized my wifi wasnt working (good sign something was messed up during flash). I realize the ROM downloaded from the Lenovo Rescue was newer then my old ROM. So I had flashed the newer boot.img over the old ROM (not good). I went back to Lenovo rescue to actually make use of the rescue and flash a full ROM. After completion I became stuck in fastboot mode. I could boot to recovery but not system and every restart or shutdown and restart would go straight to fastboot.
I did try to manually flash the ROM using what i thought was the right files and order (using flashinfo.txt as the order and MT6768_Android_scatter.txt for the partition names for each image). Everything flashed successfully, but upon reboot I was still stuck in fastboot mode. I tried everything I could think of and even ran the Lenovo Rescue a few times.
After many hours, I came across this command for fastboot..."fastboot set_active a" which finally allowed me to boot into system. I assume this tablet uses the A/B slot partitions, but I think they only make use of the A for boot? Thats my thought
So next is too try to patch the correct disc.img for my current rom (which is the latest from Lenovo Rescue) and flash again making sure to flash to the boot_a partition and hopefully everything goes like it should
Hopefully that command helps someone save many hours if they find themselves stuck in fastboot mode while rooting and/or flashing.
el7145 said:
Since the original question was about root, Ill keep this going
I was able to download the most recent ROM from Lenovo rescue which was super simple, it downloads the ROM first and wont start the flash till you click the button. I did retrieve the stock boot.img, patched it, and flashed it, rebooted and had root. Heres where the many hours of fun started...I realized my wifi wasnt working (good sign something was messed up during flash). I realize the ROM downloaded from the Lenovo Rescue was newer then my old ROM. So I had flashed the newer boot.img over the old ROM (not good). I went back to Lenovo rescue to actually make use of the rescue and flash a full ROM. After completion I became stuck in fastboot mode. I could boot to recovery but not system and every restart or shutdown and restart would go straight to fastboot.
I did try to manually flash the ROM using what i thought was the right files and order (using flashinfo.txt as the order and MT6768_Android_scatter.txt for the partition names for each image). Everything flashed successfully, but upon reboot I was still stuck in fastboot mode. I tried everything I could think of and even ran the Lenovo Rescue a few times.
After many hours, I came across this command for fastboot..."fastboot set_active a" which finally allowed me to boot into system. I assume this tablet uses the A/B slot partitions, but I think they only make use of the A for boot? Thats my thought
So next is too try to patch the correct disc.img for my current rom (which is the latest from Lenovo Rescue) and flash again making sure to flash to the boot_a partition and hopefully everything goes like it should
Hopefully that command helps someone save many hours if they find themselves stuck in fastboot mode while rooting and/or flashing.
Click to expand...
Click to collapse
I'm trying to solve the fastboot issue but I can't find fastboot drivers for the tablet. Have any suggestions?
Siege9929 said:
I'm trying to solve the fastboot issue but I can't find fastboot drivers for the tablet. Have any suggestions?
Click to expand...
Click to collapse
im assuming in device manager, you have a yellow exclamation by "Android"? you need the mediatek drivers.
Go here https://developer.android.com/studio/run/oem-usb
scroll down, dont make the misake of clicking on "Lenovo", you are clicking on the section labeled "MTK" download the zip, go to device manager and manually update the driver, once updated fastboot should work
at cmd run "fastboot devices" to make sure your device is recognized
el7145 said:
im assuming in device manager, you have a yellow exclamation by "Android"? you need the mediatek drivers.
Go here https://developer.android.com/studio/run/oem-usb
scroll down, dont make the misake of clicking on "Lenovo", you are clicking on the section labeled "MTK" download the zip, go to device manager and manually update the driver, once updated fastboot should work
at cmd run "fastboot devices" to make sure your device is recognized
Click to expand...
Click to collapse
Manually selecting the "Android Bootloader" driver fixed it. Thanks!
I just got my TB125FU to replace my 7-year-old Google Pixel C on its last legs.
Its Hardware ID is USB\VID_0E8D&PID_201C&REV_0100
I found a pack of Mediatek drivers here.
It's a bloated pack, so I extracted just the files needed for the TB125FU and attached to this post.
Once installed, my tablet appeared with a "fastboot devices" command.
I have also had good luck with the latest firmware for Motorola/Lenovo devices here.
hugehead83 said:
I have also had good luck with the latest firmware for Motorola/Lenovo devices here.
Click to expand...
Click to collapse
just an fyi: thats not the most recent firmware, the lenovo rescue tool had the latest, which at the moment for my device a few days ago was TB125FU_S000118_220927_ROW

Categories

Resources