[HOWTO] Moto Z Play Unlock/Root and Optimization
Firstly: I am not responsible for damage to your phone through this guide, follow at your own risk.
That being said, I have attempted the following and much more, without hard bricking my phone .
What is this?
Currently this is a guide to :
Unlocking
Attaining Root
Flashing Xposed
Restoring back to stock for OTA
Battery optimization
Audio Mods
Using the 'hidden' Notification Light
I just got my Moto Z Play two days ago and was very enthusiastic about its hardware. Getting root on this phone was a different story however, as the normal SuperSu zips do not work, and bootloops happen when the normal systemless SuperSu is installed. Finally I have found a method that should work consistently after searching through all the forum posts here and my previous rooting experience.
BOOTLOADER UNLOCK
Mentions: @copkay
WARNING: You cannot re-lock your bootloader without signed images from Lenovo, as of right now, these are not available.
At this stage, I would recommend you to the official Moto unlock guide from Lenovo, as you need the unlock key sent to you.
https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a
Important note:
Remember that when you run the unlock command, your /data/ partition excluding /data/media will be WIPED. Either use the built in Google backup service to keep a copy of your data or you could try the following adb backup method. This should work for Android M but I have not tested it:
http://forum.xda-developers.com/galaxy-nexus/general/guide-phone-backup-unlock-root-t1420351 by @copkay
ROOTING
Mentions: @FreedFromDeath, @bricky23, @aeestrada21, /u/CollateralFortune
Thanks to the people on the other rooting guide along with the redditor in the mentions, I've managed to put together my own rooting steps that should work reliably. Obviously I haven't been able to test on more than one device.
Requires fastboot.
Important note:
You need to set up a pin on your device to change the unknown encryption password, otherwise your /data/ partition will not mount in TWRP, so you must have booted to system and set that up.
I recommend taking a nandroid backup before you mount system as r/w, so follow the guide below to step 5, without flashing recovery and backup the appropriate partitions (usually /system, /boot, /data). You might want to back up your /efs as well, and put that somewhere safe.
Apparently there's still instances where the below method gets stuck somewhere. If it doesn't work, you can attempt the same process a second time after the first failure, or restore back to stock and attempt it again.
METHOD #1 using Chinese TWRP - Everything working (nothing's broken... yet)
Hold POWER and VOL DOWN on the phone to access the fastboot mode. Try to release the power button first before the VOL DOWN in case you trigger the system boot accidentally.
Connect USB cable to PC.
Boot or flash the Chinese TWRP from this thread or from this (MEGA) mirror.
Code:
fastboot boot recovery.img
or
Code:
fastboot flash recovery recovery.img
Press the button on the right to change language, and enter your encryption PIN/Password.
If TWRP asks to mount system as read only, swipe to allow modifications.
Open the Advanced menu and open the Terminal.
Type the following lines:
Code:
echo "SYSTEMLESS=false" > /data/.supersu
echo "BINDSYSTEMXBIN=true" >> /data/.supersu
Exit the terminal and go back to Advanced.
Install SU from TWRP.
You can now flash other ZIPs.
Reboot.
METHOD #2 using patched boot.img - Mobile Data doesn't work (for me, apparently works for some others)
Edit: Method 2 removed, just use the first one as it's more reliable.
XPOSED
One of the more popular android flashables, the only caveat here is that you must use the system ZIP with arm architecture, SDK 23. Systemless does not seem to work on our device. You should be rooted with TWRP from above, if not, please do that first.
http://forum.xda-developers.com/showthread.php?t=3034811
Unbricking / Stock Restore
Mentions: @Khanov
Thanks to @Khanov, we now have a few (unsigned) stock images available for use should something go wrong. If you want to download these, I recommend using JDownloader.
EDIT: More available here.
RETEU version available here (MEGA) also.
Code:
---------------------------
Checksum information
---------------------------
Name: XT1635-02_ADDISON_RETEU-EMEA_MPN24.104-25_cid50_subsidy-DEFAULT_regulatory-XT1635-02_CFC_EMEA.xml.zip
Size: 1576594494 bytes (1503 MB)
CRC64: 71BAB4F5EB8032F0
SHA256: B539E9EFC07A0907E18A6F199585F574CFC539F0671BD251A851FE0ECE63123A
To restore these, you will need fastboot.
Restore for OTA
Extract folder on PC.
Hold POWER and VOL DOWN on the phone to access the fastboot mode. Try to release the power button first before the VOL DOWN in case you trigger the system boot accidentally.
Connect USB cable to PC.
Flash in the following order:
Code:
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash oem oem.img
Complete restore
WARNING: May wipe device, and has not been personally tested.
If you've never flashed over these before, it's likely you won't need to restore these.
Before flashing the above, flash these first:
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.bin
fastboot flash dsp adspso.bin
fastboot flash logo logo.bin
Battery optimization
The following was from my experience of using the Galaxy S4 for about four years, trying to get a good balance between battery and functionality on the old hardware. This should work on all android systems in general since most of them are just app installs.
Most of these will require Root, Xposed, and a few dollars to support the devs and unlock app goodies.
Maximum Battery
To squeeze the most out of your Android device at the cost of performance and push notifications, I recommend the following:
Apps:
Boot Manager
Greenify (Free)
Deep Sleep Battery Saver
Kernel Adiutor
First use Boot Manager to turn off anything that doesn't need to start on boot, this will reduce the amount of applications initially sucking up battery.
Following this, use Greenify's App Analyser to shut down apps that should only run on demand such as Facebook. Apps such as the Facebook Messenger should not be Greenified with the free version as this will prevent it from syncing. If Greenify has trouble closing apps, check the settings and make sure it's working in Root or Boost (Xposed) mode.
Using Kernel Adiutor, make sure your CPU minimum frequency is as low as it can be. You can also throttle your CPU or choose a more conservative CPU governor.
Lastly set Deep Sleep Battery Saver to keep the phone asleep, waking up every X minutes as required to sync.
Balanced
My personal preference, the following settings will increase the latency of push notifications, but should save some battery by doing so whilst still keeping the phone fairly responsive when asleep.
Apps:
Boot Manager
Greenify (Paid)
Amplify (Paid)
As with above, Boot Manager should be used to disable anything you don't want to run on startup. Personally I've disabled apps such as Kindle, Chromium, Facebook.
The paid version of Greenify is well worth it, you are now able to greenify system apps, which works very well on stock ROMs where many apps are installed in /system. In addition to this, the option for GCM push for greenified apps means that push notifications work with greenified apps.
I currently have enabled Shallow Hibernation, Aggressive Doze, Wakeup Timer Coalescing, Telephony Wakeup, Don't Remove Notification, Deep Hibernation and GCM push for greenified apps.
Note that these options require Greenify to be running in Boost (Xposed) mode.
With application background activity blocked through Greenify, there's still the problem of wakelocks from GCM applications firing too often, and other apps that aren't suited to being greenified. That's where Amplify comes in.
With Amplify, you can reduce the frequency of app wakelocks. The paid version lets you select which wakelocks to block.
As a general rule, leave Amplify running and collecting stats for at least a day, then start by limiting the rate at which alarms fire first. Start with the list of 'safe' alarms, then moving on to applications you recognize by name such as "com.skype.android.push" for skype push notification alarms. Then move on to the wakelocks list.
You should not limit any wakelock within "*"s, unless they are on the safe list. Wakelocks caused by *alarm* should be fixed within the alarms list.
Balanced (Free)
Don't want to spend a dollar? Well, I lived off this setup for a while.
Apps:
Boot Manager
Greenify (Free)
Amplify (Free)
AppOpsXposed
As with the previous few optimisation schemes, disable apps you don't want to start on boot with Boot Manager.
With the free version of Greenify however, push notifications will NOT wake up your apps, so disable them with care. System apps also cannot be greenified.
Amplify will also not help much, but its default settings do stop some wakelocks, so we install it.
We can limit the effects of power consuming apps without greenifying them by using App Ops, available here. After installing, head into the app and on the 'Device' tab, turn off the 'Keep Awake' permission for offending apps.
Audio Mods
Only the newest mod from A.R.I.S.E. seem to work on our device. I've tried to flash previous versions of ViPER with no success (The driver seems to install fine but no processing occurs).
Possible Bug:
Audio processing from Viper and Atmos stops after an interruption (call etc.)
This is actually a known issue from the old Viper4Android XDA post, and I seem to have encountered it. A temporary solution is a reboot or to just switch the effects on and off.
However there is a more permanent fix I am currently testing. In the meantime, if you are having issues with sound processing, look to the bottom of the first post here.
Notification Light
The Moto Z Play has a hidden white LED light called the 'charging' LED just between the front speakers and camera. It seems to come on when flashing firmware. Some LED control apps including this are able to utilize it for a more useful purpose.
lichking21st said:
Firstly: I am not responsible for damage to your phone through this guide, follow at your own risk.
That being said, I have attempted the following and much more, without hard bricking my phone .
What is this?
Currently this is a guide to :
Unlocking
Attaining Root
Flashing Xposed
Battery optimization (Working on it)
Audio Mods? (Working on it)
Restoring back to stock for OTA
I just got my Moto Z Play two days ago and was very enthusiastic about its hardware. Getting root on this phone was a different story however, as the normal SuperSu zips do not work, and bootloops happen when the normal systemless SuperSu is installed. Finally I have found a method that should work consistently after searching through all the forum posts here and my previous rooting experience.
BOOTLOADER UNLOCK
Mentions: @copkay
WARNING: You cannot re-lock your bootloader without signed images from Lenovo, as of right now, these are not available.
At this stage, I would recommend you to the official Moto unlock guide from Lenovo, as you need the unlock key sent to you.
https://motorola-global-portal.custhelp.com/app/standalone/bootloader/unlock-your-device-a
Important note:
Remember that when you run the unlock command, your /data/ partition excluding /data/media will be WIPED. Either use the built in Google backup service to keep a copy of your data or you could try the following adb backup method. This should work for Android M but I have not tested it:
http://forum.xda-developers.com/galaxy-nexus/general/guide-phone-backup-unlock-root-t1420351 by @copkay
ROOTING
Mentions: @FreedFromDeath, @bricky23, @aeestrada21, /u/CollateralFortune
Thanks to the people on the other rooting guide along with the redditor in the mentions, I've managed to put together my own rooting steps that should work reliably. Obviously I haven't been able to test on more than one device.
Requires fastboot.
Important note:
You need to set up a pin on your device to change the unknown encryption password, otherwise your /data/ partition will not mount in TWRP, so you must have booted to system and set that up.
I recommend taking a nandroid backup before you mount system as r/w, so follow the guide below to step 5, without flashing recovery and backup the appropriate partitions (usually /system, /boot, /data). You might want to back up your /efs as well, and put that somewhere safe.
METHOD #1 using Chinese TWRP - Everything working (nothing's broken... yet)
Hold POWER and VOL DOWN on the phone to access the fastboot mode. Try to release the power button first before the VOL DOWN in case you trigger the system boot accidentally.
Connect USB cable to PC.
Boot or flash the Chinese TWRP from this thread or from this (MEGA) mirror.
Code:
fastboot boot recovery.img
or
Code:
fastboot flash recovery recovery.img
Press the button on the right to change language, and enter your encryption PIN/Password.
If TWRP asks to mount system as read only, swipe to allow modifications.
Open the Advanced menu and open the Terminal.
Type the following lines:
Code:
echo "SYSTEMLESS=false" > /data/.supersu
echo "BINDSYSTEMXBIN=true" >> /data/.supersu
Exit the terminal and go back to Advanced.
Install SU from TWRP.
You can now flash other ZIPs.
Reboot.
METHOD #2 using patched boot.img - Mobile Data doesn't work (for me, apparently works for some others)
Hold POWER and VOL DOWN on the phone to access the fastboot mode. Try to release the power button first before the VOL DOWN in case you trigger the system boot accidentally.
Connect USB cable to PC.
Flash the patched Mexican boot.img from this thread, or use this mirror (MEGA).
Code:
fastboot flash boot boot.img
Continue Method #1 to step 5, but feel free to use the alternate english TWRP by @Alberto97.
Sideload, or copy over and flash the SYSTEM SuperSU ZIP available from here.
You can now flash your other ZIPs.
Reboot.
XPOSED
One of the more popular android flashables, the only caveat here is that you must use the system ZIP with arm architecture, SDK 23. Systemless does not seem to work on our device. You should be rooted with TWRP from above, if not, please do that first.
http://forum.xda-developers.com/showthread.php?t=3034811
Unbricking / Stock Restore
Mentions: @Khanov
Thanks to @Khanov, we now have a few (unsigned) stock images available for use should something go wrong. If you want to download these, I recommend using JDownloader.
EDIT: More available here.
RETEU version available here (MEGA) also.
Code:
---------------------------
Checksum information
---------------------------
Name: XT1635-02_ADDISON_RETEU-EMEA_MPN24.104-25_cid50_subsidy-DEFAULT_regulatory-XT1635-02_CFC_EMEA.xml.zip
Size: 1576594494 bytes (1503 MB)
CRC64: 71BAB4F5EB8032F0
SHA256: B539E9EFC07A0907E18A6F199585F574CFC539F0671BD251A851FE0ECE63123A
To restore these, you will need fastboot.
Restore for OTA
Extract folder on PC.
Hold POWER and VOL DOWN on the phone to access the fastboot mode. Try to release the power button first before the VOL DOWN in case you trigger the system boot accidentally.
Connect USB cable to PC.
Flash in the following order:
Code:
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash oem oem.img
Complete restore
WARNING: May wipe device, and has not been personally tested.
Before flashing the above, flash these first:
Code:
fastboot flash gpt.bin partition
fastboot flash bootloader.img bootloader
fastboot flash NON-HLOS.bin modem
fastboot flash fsg.bin fsg
fastboot flash adspso.bin dsp
fastboot flash logo.bin logo
Click to expand...
Click to collapse
Rally appreciate you taking the time to put a guide like this together for our phones!
I do have a question though. For some reason in Method #2, you state to type into terminal those two lines of code, then to exit out of terminal and go back in and "install su from twrp." Is there supposed to be a blatantly obvious button to press to make this option appear, or is that the purpose of the two lines of code? I've never been this stumped in my life. Every blog I've read states to "just install su from TWRP" yet it doesn't appear on my screen as an option. I've confirmed I have an Addison, and I've tried two versions of TWRP without success. Hopefully you can point me in the right direction. Thanks!
Hey there, are you referring to method #1 by chance? Method #2 uses a patched boot.img which doesn't require the terminal lines, and you can flash whatever system mode SuperSU you want.
If you are referring to #1, then in the Chinese version of TWRP, check the Advanced menu, there's an option to install SU. See this crappy photo I took: http://imgur.com/a/SjZLa.
On the bottom right is that button, just above RM Forceencrypt.
The terminal lines force SuperSU system mode, because systemless doesn't work for us as far as I'm aware. It's only needed sometimes when the auto detection goes for a systemless install, which will fail and sometimes hangs me at the install screen.
Did the battery apps work better for you? Coz i used them for a little while and they made things worse actually. Odd i know. Maybe my phone does not like Greenify and Amplify all that much.
It was really noticable on my S4, I went from half a day of battery to about a full day's worth with those apps.
However, I've not been too strict on the Greenify settings on my Moto Z Play, it's large battery means that any savings will only be noticeable if you like to leave your phone uncharged for more than three days.
At the moment, screen time is using up most of the battery, followed by cellular, so that's pretty good.
The SOT was fine if i used it continuously but the standby drain got worse. Like double digits worse overnight compared to like maybe 1 or 2 % that im getting now.
SOT? I'm not familiar with that term.
Also that sounds like phone insomnia, I've never had the apps I use cause that, it's usually used to solve it.
Android L for me was notorious for draining battery and not sleeping, but if I used Amplify, it'd fix it mostly.
SOT would be Screen on time.
I got desperate and reflashed the stock firmware and installed only the necessary and apps i use the most.
Hindsight it could also have been one of the other apps causing the drain, so I'll install those later one at a time and see if they were causing it, but right now everything seems to be good.
You can easily diagnose wakelocks with Amplify, the paid version anyway, that's what I've been doing.
I've also gotten BetterBatteryStats, but that doesn't seem to help as much.
lichking21st said:
Hey there, are you referring to method #1 by chance? Method #2 uses a patched boot.img which doesn't require the terminal lines, and you can flash whatever system mode SuperSU you want.
If you are referring to #1, then in the Chinese version of TWRP, check the Advanced menu, there's an option to install SU. See this crappy photo I took: http://imgur.com/a/SjZLa.
On the bottom right is that button, just above RM Forceencrypt.
The terminal lines force SuperSU system mode, because systemless doesn't work for us as far as I'm aware. It's only needed sometimes when the auto detection goes for a systemless install, which will fail and sometimes hangs me at the install screen.
Click to expand...
Click to collapse
Wow thanks for posting that picture! Yeah, mine looks COMPLETELY different!! I don't get it, I installed the exact one I got from the OP and mine looks just like a standard TWRP but only in Chinese, not compressed like yours. And yes, you're correct, I meant Method #1, I'm sorry.
Doesn't matter now, I'm stuck in a boot loop and I can't flash anything. I can't even get TWRP to load without boot looping. I've got no idea what to do. I can't flash the stock firmware because it keeps saying "Image not signed or corrupt". I also can't get RSD Lite to recognize my phone.
I can get the bootloader to come up and it does recognize fastboot, so I've got that going for me, I just don't know what to try next.
Flash back on the stock image with Fastboot. I had to do that as I ended in a pickle like you. Decided to hold off on root for the time being.
Just follow my 'Restore to stock for OTA' portion of the guide if you want to revert using fastboot, it's amazingly hard to hard brick phones.
Hi how we can install arise sound system in moto z play , I saw the XDA thread but can't understand which .zip file need to be flash ??
I used this one.
https://www.androidfilehost.com/?fid=24651442761498767
lichking21st said:
I used this one.
https://www.androidfilehost.com/?fid=24651442761498767
Click to expand...
Click to collapse
Direct flashing this zip in twrp should work Na ?? Or some more steps needed before flashing ?? How's the performance really improved the sound ??
aneeshmbabu said:
Direct flashing this zip in twrp should work Na ?? Or some more steps needed before flashing ?? How's the performance really improved the sound ??
Click to expand...
Click to collapse
Just flash the zip and try it for yourself, I can't listen to music without Viper.
Yep, just flash the zip - sound is awesome. I tried a different version of VIPERforArise (Deuteronomy) and that one didn't work for me. The link to Leviticus is the one that worked for me.
lichking21st said:
Just flash the zip and try it for yourself, I can't listen to music without Viper.
Click to expand...
Click to collapse
So is it possible to undo or uninstall this Arise if required?
You will need to restore from backups, although the effects are manually enabled in apps so you could just turn it off.
Related
Disclaimer and Warning: By attempting any of the processes outlined below, you accept full responsibility for your actions. Neither the contributors of this thread or XDA are responsible for any damage caused. Some of the actions may void your warranty.
Click to expand...
Click to collapse
I recently went through all of this and it took me quite a while to dig through dozens of threads so I decided to make a new one bringing all of these great things together specifically for the H815. Brace yourselves for the Android right of passage...
LG G4 H815 Marshmallow 6.0 Guide.
1. Unlock the Bootloader
2. Install the custom recovery: TWRP
3. Root
4. Install Xposed
5. Install Viper4Android
6. Unbrick Guide
7. Debloat
8. Battery Optimisations
- Quicklinks:
Drivers: http://oceanhost.eu/e4h2px4e0hkd/LGMobileDriver_WHQL_Ver_4.0.4.exe.htm
Minimal ADB: https://www.androidfilehost.com/?fid=24521665358595410
LG Bootloader Unlock: https://developer.lge.com/resource/mobile/RetrieveBootloader.dev?categoryTypeCode=ANRS
TWRP: https://forum.xda-developers.com/attachment.php?attachmentid=4387389&d=1515789045
SuperSU: https://www.androidfilehost.com/?fid=24369303960690845
System Image Complete: http://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503
Xposed Framework: http://forum.xda-developers.com/attachment.php?attachmentid=3848457&d=1471691646
Xposed Installer App: http://forum.xda-developers.com/showthread.php?t=3034811
Viper4Android: https://www.dropbox.com/s/lvcxffdqimbi78b/V4A_Poweramp_Lollipop_v3.zip?dl=0
SELinux Mode Changer App: http://forum.xda-developers.com/devdb/project/dl/?id=12506
LG Bridge Unbrick Tool: http://www.lg.com/us/support/product-help/CT10000025-1438110404543-preinstall-apps
IMPORTANT | IMPORTANT | IMPORTANT | IMPORTANT | IMPORTANT
Backup any personal files because everything will be deleted! Make sure you have at least 50% battery remaining.
1. Unlocking the bootloader officially
This is the first step in voiding your warranty so is the point of no return. I've read in some places that you may be able to do this without voiding your warranty but I did not look into this.
WARNING - This will delete everything on the phone so make sure to backup important personal files.
i) Visit the official LG website to obtain a bootloader unlock file. First click the 'How to Unlock the Bootloader' tab and then the button 'Starting Unlocking the Bootloader' at the bottom of the page: https://developer.lge.com/resource/mobile/RetrieveBootloader.dev
ii) Sign up to a free developer account using a real email address (it's needed)
iii) Enter your IMEI number which you can find on your box, under the battery or by dialing *#06# on the phone. Keep this tab open
iv) On your phone, go to settings -> About phone -> Software info and then tap on Build number 7 times. Go back to Developer options under general settings and enable 'USB debugging' and 'Enable OEM unlock'.
v) Install the LG G4 drivers from here: http://oceanhost.eu/e4h2px4e0hkd/LGMobileDriver_WHQL_Ver_4.0.4.exe.htm
vi) Download and install minimal adb 1.4 from here: https://www.androidfilehost.com/?fid=24521665358595410
vii) Browse to where you installed this and then right click and select 'Open command window here'. By default, this is in C:\Program Files (x86)\Minimal ADB and Fastboot
viii) Plug in your phone to your computer using a reliable USB port and cable (USB 3.0 doesn't seem to work). Enter "adb reboot bootloader" into the command window without quotations. Wait for it to reboot and then type "fastboot oem device-id"
ix) This fastboot command will return a character string. This is the Device ID which is needed to generate your unique unlock key. It will look like this:
Code:
Example Device ID (PC User)$ fastboot oem device-id
(bootloader)-----------------------------------------------------------------
(bootloader) Device-ID
(bootloader) CD58B679A38D6B613ED518F37A05E013
(bootloader) F93190BD558261DBBC5584E8EF8789B1
(bootloader)-----------------------------------------------------------------
To generate your unlock key, you will need to paste together the 2 lines of output into one continuous string without "(bootloader)" or white spaces. In the example above, the Device ID would be:
CD58B679A38D6B613ED518F37A05E013F93190BD558261DBBC5584E8EF8789B1
Paste this into the LG website form and confirm. It will email you an unlock.bin file which you need to put in the same folder as your adb.exe file.
x) Now enter "fastboot flash unlock unlock.bin" into the command window. This should take seconds.
xi) Now check it is unlocked. By entering “fastboot reboot” and waiting for it to reboot. Then enter "adb reboot bootloader" again and then "fastboot getvar unlocked" and verifying that the response is "unlocked: yes".
Your bootloader should now be unlocked.Keep this command window open for the next step.
Thanks to shimp208 for minimal adb http://forum.xda-developers.com/showthread.php?t=2317790
2. Installing TWRP Custom Recovery
This will install a custom recovery allowing you to make backups and flash zip files.
i) With your bootloader freshly unlocked, you can boot up the device and set it up. Go through the startup guide thoroughly without skipping as these settings are going to stay.
ii) Download the latest TWRP img file from https://forum.xda-developers.com/attachment.php?attachmentid=4387389&d=1515789045 and place it in the same folder as your adb.exe file and unlock.bin. Now rename it to lgg4-twrp.img without changing the file extension!
iii) Now also copy the lgg4-twrp.img file to your phone's SD card using a USB cable.
iv) Enable USB debugging again
v) Open up a command window again by Shift+Right clicking in the folder with adb.exe.
vii) In the command window, type "adb reboot bootloader". Wait to enter the bootloader and then type "fastboot boot lgg4-twrp.img" and hit enter. The device should now restart in TWRP but it is not installed yet.
vii) Once TWRP starts, select 'install' and then tick 'images' at the bottom.
viii) Find the lgg4-twrp.img file and select it. Then in the next menu select 'recovery' and swipe the bar at the bottom to confirm flash.
ix) You should then see 'Image Flash Complete' so can select back then reboot and system.
(If installing from an external SD card, go to 'mount' from the main screen and then tick to mount your ext SD card. Go back and continue as normal)
Thanks to TeamWin for TWRP https://twrp.me/
Thanks to Adam Myczkowski for TWRP install corrections.
3. Root
By now, you should have an unlocked bootloader and a custom recovery installed.
If you use snapchat, you won't be able to log in with a rooted phone. So it would be a good idea to install it now and log in. You remain logged in rooting and installing Xposed. Quicklink: https://play.google.com/store/apps/details?id=com.snapchat.androidi) Download SuperSU from https://www.androidfilehost.com/?fid=24369303960690845 and place it on your phones internal storage.
(this works fine but you can get the latest from here: http://forum.xda-developers.com/showpost.php?p=64161125&postcount=3
ii) Make sure you have USB debugging enabled again.
iii) Now with your phone on and plugged in, enter recovery by opening adb as before and entering "adb reboot recovery".
If you have problems, see the end of this sectioniv) Once in the recovery, hit install and browse to the SuperSU file we just downloaded.
vii) Swipe flash and then reboot into the system.
The phone should now boot and be rooted. If not, see the notes at the end of this section.
You can use https://play.google.com/store/apps/details?id=com.joeykrim.rootcheck to verify if you have root.
• If your phone does not turn on then pull out the battery and USB cable and then put just the battery back in. Now Press and hold the volume down and power buttons together. Then first LG logo should appear. Now continue holding the down button but release the power button for one second and then press it again and hold.
You should now see a screen asking you to wipe everything. Navigate with the down arrow and press the power button for both screens. This should now take you to TWRP recovery and NOT actually wipe the phone.
• If you had a bootloop then follow the above steps to get into the recovery and then you will need to download the following onto the phone: http://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503 [1.5GB]
Once in the recovery, you are able to connect the phone to the computer for regular data transfer in order to transfer the file. (I had problems with the microSD card so I would avoid it).
This system image seems to be missing the FM Radio, LG Remote and SmartSettings, Voice Recorder and Quickmemo apps. To get these back, go to general settings -> About phone -> Update centre -> App updates and download/install as necessary.• If you still could not get into the recovery at all then follow the unbrick steps below in section 6.
Thanks to autoprime for the system images [url[http://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503[/url]
Thanks to Chainfire for SuperSU http://forum.xda-developers.com/showpost.php?p=64161125
4. Installing Xposed
i) Download Xposed from here: https://forum.xda-developers.com/attachment.php?attachmentid=3848457&d=1471691646 and place it on your phone or SD card
ii) Enter recovery using the methods shown before. (You can also now enter recovery using this root app: https://play.google.com/store/apps/details?id=com.antaresone.quickreboot)
iii) Use the recovery menus to flash the zip file. Reboot.
iv) Download and install the Xposed installer app, XposedInstaller_3.0_alpha4.apk, from the post attachment here: http://forum.xda-developers.com/showthread.php?t=3034811
Thanks to rovo89 for Xposed and Follow_and_Feel for sharing the G4 Xposed link http://forum.xda-developers.com/showthread.php?t=3034811
5. Installing Viper4Android (this breaks FM radio!)
WARNING - The FM radio app will not work after installing this.
i) Download Viper4Android from here: https://www.dropbox.com/s/lvcxffdqimbi78b/V4A_Poweramp_Lollipop_v3.zip?dl=0
ii) Place the zip file on your phone or SD card and flash it in recovery. Reboot.
iii) Open the ViperFX app. From the menu and install the driver.
iv) You need to get Viper4Android to run in enforcing mode so flash this zip in recovery: https://www.dropbox.com/s/k9cnruw2e1t1d4t/ViPER4Android-supolicy.zip?dl=0
Install it. Open the app and set selinux to permissive. Reboot.
v) Install BusyBox from here: https://play.google.com/store/apps/details?id=stericson.busybox
Thanks to the ViperFX developers and zhuhang for Viper4Android http://forum.xda-developers.com/showthread.php?t=2191223
Thanks to Choristav for the Viper4Android file http://forum.xda-developers.com/lg-g2/general/guide-poweramp-viper4android-lollipop-t3133935
Thanks to maximumentropy for the SElinux enforcing zip http://forum.xda-developers.com/showthread.php?p=61242973#post61242973
Once all this is done and you're happy. It would be a good idea to enter recovery and make a full backup so that you can restore to the clean rooted state.
6. Unbrick Guide
If something messed up while flashing something and can't boot. Open up the recovery and restore your backup. If you don't have one, flash the v20d system image from an external SD card [1.5GB]. Download here: http://forum.xda-developers.com/g4/development/stock-h815-20g-images-kdz-flashable-t3450503
If you cannot get to the recovery then follow these steps:
i) Make sure you have the LG Drivers installed from here: http://oceanhost.eu/e4h2px4e0hkd/LGMobileDriver_WHQL_Ver_4.0.4.exe.htm
ii) Download the LG Bridge software from here: http://www.lg.com/us/support/product-help/CT10000025-1438110404543-preinstall-apps
iii) Remove the battery and reinsert it so the device it is fully off.
iv) While holding the up volume button, insert your USB cable.
v) You should enter download mode. Go to the Software Update tab of the LG Bridge. It will say connecting and then should say your device is up to date. Click on the recovery text on the bottom right and then follow the instructions. The software will download the system image for you and this is roughly 1.6GB so make sure your firewall doesn't block this connection.
This shouldn't delete your data (no guarantees) but you will have to grant app permissions again and reapply any changes to system files e.g. root, viper4android, xposed ect.
If you have problems try this method instead:
http://forum.xda-developers.com/g4/general/guide-lg-g4-stock-firmware-to-stock-kdz-t3107848
7. Debloat
Here is a list of apps and services an XDA user has suggested removing: https://forum.xda-developers.com/g4/general/bloatware-tool-t3141890/post61509537#post61509537
Removing these won't break the phone but of course be smart about it; removing Weather will mean you don't have the weather app. I only removed Google apps I don't use and redunadant apps from LG.
You can remove bloat apps using the Titanium Backup app from here: https://play.google.com/store/apps/details?id=com.keramidas.TitaniumBackup
I would advice you to make a backup of them first in case you want them back. It's the easiest way to get the apps back.
If you do need a guide for using Titanium Backup, head over to this excellent guide: http://forum.xda-developers.com/showthread.php?t=2717159
8. Battery Optimisations
The aim is to get maximum battery life without compromising speed, user experience, features or notifications.
(I'm just going to use the following space as a log of things I've done. I will tidy this up when complete. Please do suggest if any of these things are ineffective or detrimental.)
Read through this guide: http://forum.xda-developers.com/g4/general/guide-g4-lag-free-marshmallow-t3327878
1. Disable Activity Logs: General Settings -> About phone -> Activity Logs at the bottom.
Also try following the steps on here; users report better battery life: https://www.reddit.com/r/lgg4/comments/4fb4uf/psa_free_up_some_ram_up_to_300mb_and_maybe_gain_a/
2. Disable Smart Settings under General Settings
3. Disable Bluetooth and Wi-Fi scanning location service: General Settings -> Location -> Menu -> Scanning -> Untick both. (I honestly can't believe these exist. I wondered why I have bluetooth wakelocks)
4. Disable Open Wi-Fi scanning: Network Settings -> Wi-Fi -> Menu -> Advanced -> Untick Wifi notification. Toggle this on and off as it should also fix random white LED blinking.
5. Greenify 2.9 beta to enable aggressive doze.
6. Follow this guide for processor tweaks http://forum.xda-developers.com/nexus-5x/general/guide-advanced-interactive-governor-t3269557
Please note that this is my first thread and I'm not a developer. I hope the instructions are as complete and accurate as possible and they are what I followed for my H815 602. If there are any things I forgot or updates, please do let me know.
Superb guide. Thanks. Should be stickied.
Official LG don't unlock bootloader for H815P
Only europe is eligible for service
when i try to get my device id it just hangs at:
Code:
C:\ADB>adb reboot bootloader
C:\ADB>fastboot oem device-id
< waiting for any device >
any ideas?
running win10, with the drivers installed.
-LE-
found out the problem. usb3.0 does not work used usb2.0 and work flawlessly
On 6.0 Android is more secured and so to install recovery you have to either boot the recovery, flash custom kernel, then flash recovery or unpack boot.img from a custom kernel, flash it via fastboot, then flash recovery and lastly full kernel package in recovery. Better if you include this in your guide because many people will be asking "why my recovery is not booting?" and that's what we don't want. I've repeated this about 50 times or more and finally I will not have to.
Hi! Thanks for this guide!
Just found a "typo"
ii) Now with your phone on and plugged in, enter recovery by opening adb as before and entering "adb fastboot recovery". (You will need to enable USB debugging again)
I'm sure it should say "adb reboot recovery" : )
It could be worth saying that after installing root, there will be a boot loop or two, it even say so when you install the latest SuperSU.
I am also interested in your battery optimization, the most I've done so far is to disable NFC and location and disable some of my google account syncs that I don't use or use very rarely.
Redgoblin said:
Hi! Thanks for this guide!
Just found a "typo"
ii) Now with your phone on and plugged in, enter recovery by opening adb as before and entering "adb fastboot recovery". (You will need to enable USB debugging again)
I'm sure it should say "adb reboot recovery" : )
It could be worth saying that after installing root, there will be a boot loop or two, it even say so when you install the latest SuperSU.
I am also interested in your battery optimization, the most I've done so far is to disable NFC and location and disable some of my google account syncs that I don't use or use very rarely.
Click to expand...
Click to collapse
Thanks for the correction.
In addition to what you've done, I have installed greenify and hibernated Snapchat, Viber and Facebook apps. WhatsApp isn't hibernated.
I have the donate version and xposed so till gcm push notifications.
I haven't done anything else. I had better battery stats installed for a few days and I kept checking it and was annoyed that I'd always have ~30% awake time with the screen off. There were no kernel wake locks, it was just app alarms mainly from android and Google.
I was getting 4 hours SOT and 20 hours use out of the box. Now I'm down to 3 hours 30.
I really wish the Autostarts app would work but it has no effect: https://play.google.com/store/apps/details?id=com.elsdoerfer.android.autostarts
This would allow me to stop many apps from waking up everytime the connectivity changes or the screen is unlocked.
I have Greenify with the donate Xposed settings. Coalescing, Deep Hibernation and GCM push enabled only. Here are the apps I have greenfied:
Maps
Skype
Viber
Messenger
Snapchat
Whatsapp
Gmail with 1 Google and 1 Yahoo account
CF.Lumen
Lux Autobrightness
Spotify
Viper4Android in High quality mode. Enabled are playback gain control; Equalizer; Dynamic System; Fidelity Control; Auditory System Protection and gain limiter.
Is anyone else not getting any sound from the radio app? It starts and even tunes to frequencies with channel name and now playing I hear no sound through headphones or speakers.
I've tried removing the app and installing from the update centre again.
The NextRadio app is incompatible (even when sideloading the apk) https://play.google.com/store/apps/details?id=com.nextradioapp.nextradio&hl=en
Well, I tried to unlock the H815 Taiwan version (bought on Amazon as a USA unlocked cellphone... ) but is not supported.
Damn it!
thanks...
i am wondering: if I go to settings / general / backup&reset, and then LG backup and perform a full backup on my SD card, will I be able to restore it all after rooting and get the system as it was previously?
joriq said:
i am wondering: if I go to settings / general / backup&reset, and then LG backup and perform a full backup on my SD card, will I be able to restore it all after rooting and get the system as it was previously?
Click to expand...
Click to collapse
I haven't tried it myself but have gone with the tried and trusted TWRP backup: http://www.howtogeek.com/240582/how-to-back-up-and-restore-your-android-phone-with-twrp/
And ADB backup which also works without root: http://forum.xda-developers.com/galaxy-nexus/general/guide-phone-backup-unlock-root-t1420351
These work great; you end up booting exactly where you left off and even with browser tabs still open as you left them.
From my understanding, you would need to boot into the phone and then perform the restore in the LG app. So this would require a bootable phone. The only times I restore would be after bootloops. For general app restore and settings, I use Titanium Backup. This provides the added benefit of being able to restore on different phones.
just to update all of you: I did root my 20d g4 and LG backup managed to restore almost everything. All apps are back, but I needed to agree to permissions for all of them and some returned with saved data, some did not. For example, none of my BT devices were recognised, so I have to pair all of them, which is tricky for moto 360, since it needed to be factory reset. However, I am very pleased with how things went in the end.
Also, my phone was not recognised when rebooting to fastboot, it took me an hour of changing ports and drivers, but then I decided to install the driver manually via device manager (win 7). I made an educated guess and nailed it
Also, I had a really hard time unlocking the bootloader, because LG site kept providing "service unavailable" message, so I had to fool the server that I am in Singapore (like in this guide https://youtu.be/O64GfQORCaE )...
it is work for H815-L?
and i will be glad if you post a guide how to unlocking the bootloader without voiding my warranty
and how about a guide to unlock the free money printing machine in our G4s? LOL
warranty will be void
Question will this work on sprint variants
I've updated the Viper4Android install method. You can flash this zip file: http://forum.xda-developers.com/showthread.php?p=61242973#post61242973
This will allow you to run Viper4Android without having to set SELinux to permissive. This is better for security but I also had issues with the SELinux mode changing back so would sometimes have to reboot or reinstall the viper driver to get it to work again. After doing this, you don't need the SELinux mode changer app.
will this work on v20e?
Murtagh92 said:
will this work on v20e?
Click to expand...
Click to collapse
You can try to follow the steps in this thread or install v20d as I believe they are basically the same but for different region.
Alternatively, follow this guide for v20e http://forum.xda-developers.com/g4/general/guide-root-h815-v20e-installing-twrp-t3354668
Please read this thread thoroughly and carefully. Do this at your own risk. The following had worked for two of the same devices. I've made this guide partly for my own notes and because other guides out there seemed incomplete.
Aim of this guide is to have an unlocked bootloader with a custom recovery for flashing root, Xposed and other things while possibly preserving the ability to get official OTA updates. The following is a summary of what this guide entails.
Official Mi FlashUnlock was used to unlock the bootloader. It will take 3-4 days before Xiaomi grants unlock permission on your account. This guide does not touch the emmc for unlocking since that method causes -2% or 50% battery bug. This is the same bug that most CM flashers are running into. In the meantime, prepare your computer and phone for when you do get permission.
Recovery TWRP Alka is a good recovery to use since it's already patched (boot.img) so that it can flash MIUI recovery ROMs (OTA) as well as CM based ROMs. It also has the ability to backup the entire phone (EFS partition). I would strongly suggest backing up all partitions and moving it to your computer or SD card after. You may choose Cofface TWRP if you're never going to try CM based ROMs. Helpful links from other guides will be posted at the end. I have yet to receive an OTA update yet so this part is not tested.
Root, Xposed and DPI instructions are all outlined below. Flash and configure these as you normally would.
Debloating is a big thing that I do to stock ROMs. This essentially prevents the ROM from running the apps, slimming the ROM and hopefully extending daily usage. There are few things that broke though. The only thing I could care about is that I'm not able to change the wallpaper via the Settings (lockscreen + homescreen) anymore. However, the rest that broke were the features that I don't use such as Cleaner (sponsored by Cheetah), dual apps and etc. Debloat accordingly. Be cautious, as I won't be necessarily explaining what each item does.
OTA updates does work. However, recovery, root, DPI, Xposed and debloat all needed to be done again.
Prep work
Sign up and login to all the neccessary accounts
Sign up for unlock: http://en.MIUI.com/unlock/, this will take 3-4 days.
Make sure you're also signed into your Mi account on your phone and that you can find your phone at http://i.mi.com/.
Prepare your computer for drivers and software
Enable Windows TESTSIGNING first: https://msdn.microsoft.com/en-us/library/windows/hardware/ff553484(v=vs.85).aspx
The TESTSIGNING boot configuration option is enabled or disabled through the BCDEdit command. To enable test-signing, use the following BCDEdit command:
Bcdedit.exe -set TESTSIGNING ON
To disable test-signing, use the following BCDEdit command:
Bcdedit.exe -set TESTSIGNING OFFRestart your computer and then install the following:
Mi PC Suite (http://pcsuite.mi.com/)
Mi ROM Flashing Tool and drivers for fastboot & ADB (http://en.MIUI.com/a-234.html)
Mi FlashUnlock tool (http://en.MIUI.com/thread-202290-1-1.html)
Fastboot EDL, just in case (http://forum.xda-developers.com/redmi-note-3/how-to/guide-reboot-to-edl-mode-fastboot-test-t3398718)
Prepare your device
Enable developer mode by going to Settings > About phone > Tap on MIUI Version repeatedly until you get a toast that Developer Mode is enabled
Go back to Settings and then tap on Additional Settings > Developer options
Enable Developer options
Enable OEM unlock
Enable USB debugging
Plugin your phone into your computer, it should now install all the drivers
Turn TESTSIGNING OFF and restart your computer
Signs of computer recoginizing your phone properly (for ADB, Fastboot and etc)
In Device Manager, you should see under Android Phone: Android Composite ADB Interface and Xiaomi Composite MDB Interface
You phone should have also asked you to allow debugging from your computer (check always allow)
Unlocking your phone
Log in from time to time to check your unlock permission from the MiFlash Unlock Tool. You'll just need to follow the instructions to unlock your bootloader.
Boot into fastboot by holding volume-down + power
Run MiFlash Unlock and follow the onscreen instructions
If you're curious to see if it's unlocked, boot back into fastboot and type fastboot oem device-info
Using MiFlash tool to flash another MIUI ROM (China to Global, skip if you already like your MIUI version)
Boot into fastboot by holding volume-down + power, you will get the fastboot bunny
Download your desired fastboot version: http://en.MIUI.com/a-234.html, you can check the changelog and description from here: http://en.MIUI.com/download-301.html
Or you can use MIUI 8 Global Beta: http://forum.xda-developers.com/redmi-note-3/development/MIUI-8-global-beta-redmi-note-3-t3417423
Extract the fastboot ROM (.tgz) twice, the first extract you'll be left with .tar file, the second should leave you with a directory of files
Place that directory in the root of your drive (or somewhere with a short location)
Launch the MiFlash tool, browse to your extracted fastboot ROM and click on refresh. You should now also see your device listed
Click on Flash All and click on refresh once more
Now flash your device, it should take upwards of 170s
Let your device boot, which should take 5m or longer. Set it up as you normally would and redo all the steps outlined in the "Prepare your device" section (don't need the TESTSIGNING part).
Flashing TWRP (Alka) & Root
Download the following files:
TWRP https://dl.twrp.me/kenzo/
Alka http://www.mediafire.com/download/febttn8piu0vfae/recovery+Alka+Update.zip
Universal Boot Img Patcher http://forum.xda-developers.com/redmi-note-3/how-to/modified-twrp-deleting-emmcappsboot-t3371667
SuperSU https://download.chainfire.eu/969/SuperSU/
You should now be working in an administrator command prompt in this directory: C:\Program Files (x86)\Xiaomi\MiPhone\Google\Android. Take this chance to extract fastboot-edl into this same directory. Also place twrp and alkarecoveryupdate img files into this directory. You should have the Universal Boot Img Patcher and SuperSU copied to your phone.
Follow these, don't reboot in between unless stated:
Enter fastboot (volume-down + power)
Type fastboot boot twrp.img
Swipe to allow modifications
Flash universal boot img patcher zip
Flash twrp.img by selecting "Select Image" option.
Select recovery partition & flash it
For some reason twrp has to be flashed this way or else recovery will be reverted to stock MIUI recovery. You can try Alka directly to see if it works for you.
Now reboot to recovery
Flash alkarecoveryupdate.img by selecting "Select Image" option.
Select recovery partition & flash it
Reboot to recovery
Flash SuperSU
Reboot system and let it boot MIUI, it may take longer than usual
You should now test root, configure SuperSU & install Busybox.
Flashing Xposed
Download the latest SolarWarez Xposed: http://forum.xda-developers.com/xposed/unofficial-xposed-MIUI-t3367634
Download Material Xposed Installer: http://forum.xda-developers.com/xposed/material-design-xposed-installer-t3137758
Download Xposed uninstaller, just in case: http://forum.xda-developers.com/showthread.php?t=3034811
A few posts suggests that the latest official Xposed v86 works with MIUI, but doesn't seem to be the case for me.
Install the Xposed Installer of your choice (apk install)
Enter recovery (volume-up + power)
Flash v86-sdk22-arm64 (LP, sdk23 is for MM)
Clear cache and dalvik
Reboot the phone, this should take 5m or longer since we wiped the cache
If you notice bootloops or crashing services, use the uninstaller. Worst case, flash it back to stock using MiFlash.
Xposed modules that I use:
App Settings
MIUI Brightness Fix
Mobile Radio Active Fix
Power Nap
Play Store Fixes
Spotify Skip
TextLinkify
WhatsApp Tuner
xMIUI
xInsta unfortunately does not work well.
Changing DPI
Using FX Explorer (Root access enabled) or any explorer you feel fit.
Go to system/ and edit build.prop
Add this line in between persist.hwc.downscale_threshold=1.15 & #ro.hdmi.enable=true
ro.sf.lcd_density=370
Reboot your phone
You should be able to use a DPI changer such as texdrodier_dpi to change it to whatever you like after
ROM Debloating, should get around 1.8GB of free memory on boot
Using FX Explorer (Root access enabled) or any explorer you feel fit.
Create the backup location:
Create a folder in system named _backup
Create subfolders named app, data-app, priv, vendor
Debloat app folder as you wish but here's my list:
Go to system/app
Cut the following into system/_backup/app
AGPSTestMode
AmapITS
AnalyticsCore
AntHalService
BasicDreams
BrowserProviderProxy
BugReport
CalendarLocalAccount
CalendarWidget
CloudService
Drive
Email
FileExplorer
FM
Galaxy4
GuardProvider
HTMLViewer
HiddTestApp
HoloSpiralWallpaper
KSICibaEngine
KingSoftCleaner
LatinImeGoogle
LiveWallpapers
LiveWallpapersPicker
LunarInfoProvider
MiDiscover
MiLivetalk
MiuiVideoPlayer
MiWallpaper
MSDC_UI
NoiseField
Notes
OmaDownload
OmaDrmEngineApp
PartnerBookmarksProvider
PhaseBeam
PhotoTable
QtiBackupAgent
QtiFeedback
SampleAuthenticatorService
SapClientApp
SecureSampleAuthService
SoundRecorder
SecProtect
StaProxyService
StepsProvider
Stk
SystemAdSolution
TouchAssistant
TranslationService
Videos
VisualizationWallpapers
WAPPushManager
WfdClient
xdivert
fastdormancy
imstests
jjcontainer
jjhome
jjknowledge
jjstore
Go to system/data-app
Cut the following into system/_backup/data-app
Facebook
klobugreport
Go to system/priv
Cut the following into system/_backup/priv
AndroidForWork
AutoTest
BackupRestoreConfirmation
Browser
Calendar
CleanMaster
FM2
GoogleBackupTransport
GoogleFeedback
Mipub
Music
MusicFX
SpacesManagerService
SpacesTrustAgent
Velvet
xtra_t_app
Go to system/vendor
Cut the following into system/_backup/vendor
CTA
ChinaMobile
ChinaTelecom
ChinaUnicom
CmccPower
MPCS
app
Helpful posts if you have other issues
Flashing to CM: http://forum.xda-developers.com/redmi-note-3/how-to/guide-step-step-guide-flash-cm13-build-t3391839
TWRP Explained: http://forum.xda-developers.com/redmi-note-3/how-to/guide-redmi-note-3-available-twrps-t3406708
Fastboot EDL for softbricked phones: http://forum.xda-developers.com/redmi-note-3/how-to/guide-reboot-to-edl-mode-fastboot-test-t3398718
IMEI Repair: http://en.MIUI.com/thread-245598-1-1.html
MIUI Unlock guide: http://en.MIUI.com/thread-202290-1-1.html
If using alka twrp and officially unlocked the bootloader, universal boot image patcher was not necessary for flashing any official miui rom.
Sent from my Redmi Note 3 using Tapatalk
timberwolf60 said:
If using alka twrp and officially unlocked the bootloader, universal boot image patcher was not necessary for flashing any official miui rom.
Sent from my Redmi Note 3 using Tapatalk
Click to expand...
Click to collapse
i had to do what i did because the recovery wouldn't stay flashed. alka has the boot image built in anyways, so really it's the same thing.
I think DPI should be ro.sf.lcd ? you've written ro.sf.ldc??? Is that correct?
rayulove69 said:
I think DPI should be ro.sf.lcd ? you've written ro.sf.ldc??? Is that correct?
Click to expand...
Click to collapse
fixed. typo
What if i directly boot and flash alka recovery?
What if i directly boot or flash alka recovery? instead of first flashing twrp official and then flashing alka through it
RavdeepAurora said:
What if i directly boot or flash alka recovery? instead of first flashing twrp official and then flashing alka through it
Click to expand...
Click to collapse
try it. like i said in my post, i had to do what i did or else alka wouldn't stay flashed. if it stays flashed for you then great, you've saved 5 steps.
The only thing I could care about is that I'm not able to change the wallpaper via the Settings (lockscreen + homescreen) anymore
Click to expand...
Click to collapse
For what it's worth, I haven't done anything yet aside from bootloader, MIUI 8 and install nova launcher; the wallpaper/lock screen error only happens when I've got nova set as default. When I go back to the stock launcher, I can change both without error. Then I set nova back to default, I can still change wall/lock until I actually restart the phone.
So hopefully that might give you an idea as to what's going on and maybe it'll help.
Do appreciate the guide, something I'll have to do eventually when CM13 works out the kinks.
Thanks the dpi edit works great.
capitak said:
For what it's worth, I haven't done anything yet aside from bootloader, MIUI 8 and install nova launcher; the wallpaper/lock screen error only happens when I've got nova set as default. When I go back to the stock launcher, I can change both without error. Then I set nova back to default, I can still change wall/lock until I actually restart the phone.
So hopefully that might give you an idea as to what's going on and maybe it'll help.
Do appreciate the guide, something I'll have to do eventually when CM13 works out the kinks.
Click to expand...
Click to collapse
Thanks! Good to know it wasn't from the debloating.
I just want to have "write access" to my MicroSD card, so I plan to unlock/root my device.
If I follow the guide just to unlock, is all my personal data/setting/profiles/installed apps still be there after unlock?
Pls advice.
Just waiting on my RN3 to arrive, so this post is perfect timing.
I'll report back once I've followed your steps.
should i install SolarWarez Xposed and Material Xposed Installer or just one of them?
same240 said:
I just want to have "write access" to my MicroSD card, so I plan to unlock/root my device.
If I follow the guide just to unlock, is all my personal data/setting/profiles/installed apps still be there after unlock?
Pls advice.
Click to expand...
Click to collapse
Don't know. Unlocking bootloader usually wipes the device.
doganmanis said:
should i install SolarWarez Xposed and Material Xposed Installer or just one of them?
Click to expand...
Click to collapse
You need both, as usual.
I'm getting this problem in cmd prep work
Bcdedit.exe -set TESTSIGNING ON
AN error has occured setting the element data.
The value is protected by Secure Boot policy and cannot be modified or deleted.
RexMi6 said:
I'm getting this problem in cmd prep work
Bcdedit.exe -set TESTSIGNING ON
AN error has occured setting the element data.
The value is protected by Secure Boot policy and cannot be modified or deleted.
Click to expand...
Click to collapse
You may need to disable driver signing instead. Google that for your windows 8 or 10 machine. My method ensures it's disabled.
I used your guide.
Thank you!
everything is working, on stable-globe rom.
I'm using Titanium backup to uninstall system apps
I'm using the official MIUI Global Stable 7.5.3.0 and have unlocked the bootloader using the official way as well. I just now installed alka recovery directly using fastboot commands and it seems to work fine. It's still there after rebooting a couple of times and I already took a full backup of the phone. Haven't tried restoring it yet, which I will probably do later and post the results, but I guess that will work as well.
Edit: I tried to restore a backup just now, but I got an error when it tried to restore the firmware partition. The error was "extractTarFork() process ended with error : 255" if I'm not mistaken. Still everything seems to be working fine regardless of that error.
Thanks !!! Amazing post!!! Helped me a lot !
I have a Note 3 Pro , couldn't unlock the Phone with Global Version (even with permission) always stoping in 50%, tried to change to Chinese Version, but I couldn't, so I tested with Global Developer Version (Miui 8) and I got the unlock
I'm doing same process you said after unlocking boot loader officially. I'm trying to flash mokee rom and open gapps pico arm 64. After booting rom is crashing saying com.android.phone is stopped and when i check for oem device info it is locked. plz help where am I going wrong
I dont take responsibility for possible damages!'
1. When you unlock the bootloader, all your data will be erased!
2. When you try to lock the bootloader, your data will be erased and you will lose the API.
3. YOU CAN RECEIVE OTA UPDATES WITH THE BOOTLOADER UNLOCKED!
Download the tool: https://forum.xda-developers.com/mi-a2/how-to/mi-a2-toolkit-unlock-bootloader-root-t3834585
1. Unlock the bootloader (I will not go into detail, the tool is intuitive, follow the tool's instructions!.)
2. Start your phone and enable USB debugging.
3. Put your cellphone in Fastboot.
4. In the tool, use option 4 (This will not install TWRP, just start) (follow the tool's instructions!)
5. When entering TWRP, if prompted, check "Keep system read only".
6. Open in the tool folder "Open CMD here"
7. Run the command: adb shell
8. Now enter the following command: "setprop persist.camera.HAL3.enabled 1" without quotation marks, and enter. - This command enables the required core API for GCAM.
9. Now type "exit" to exit adb.
10. Go back to the phone, in TWRP -> Reboot -> System -> Do Not Install
Ready.
I did this tutorial quickly. Any questions, use the comments!
Just a note. That tool is working with August security patch, but a lot of us received already September Security patch. And how do you know that we will receive OTA. Did you test by yourself? And btw, looks very easy and clear explained. For now I will wait for stable patch from Xiaomi, and updated Tool from the link you recomended. Thank you.
kaiwanted said:
Just a note. That tool is working with August security patch, but a lot of us received already September Security patch. And how do you know that we will receive OTA. Did you test by yourself? And btw, looks very easy and clear explained. For now I will wait for stable patch from Xiaomi, and updated Tool from the link you recomended. Thank you.
Click to expand...
Click to collapse
The tool just has the August picture. But the functions used for the gcam works in the September patch.
Yes. I have.
when i want to launch the TWRP, my device already plugged in and in fastboot mode, but it says "could not detect the active partition used, please ensure your phone is plugged in and in fastbook mode". How to fix this? tks
asuturo said:
when i want to launch the TWRP, my device already plugged in and in fastboot mode, but it says "could not detect the active partition used, please ensure your phone is plugged in and in fastbook mode". How to fix this? tks
Click to expand...
Click to collapse
I'm stuck at this too, i got the september update, already unlocked the bootloader but still can't install the twrp
"could not detect the active partition used, please ensure your phone is plugged in and in fastbook mode"
Rafaelboxer said:
I'm stuck at this too, i got the september update, already unlocked the bootloader but still can't install the twrp
"could not detect the active partition used, please ensure your phone is plugged in and in fastbook mode"
Click to expand...
Click to collapse
I think the September update change the active partition from A to B ( the August is A). Thats why it doesn´t work.
I´m also with September Update, and camera2api is the only thing i want to enable on Mi a2 ( don´t want to root and lose OTA) until a relliable TWRP is relleased.
This command should tell you which slot is active:
fastboot getvar current-slot
ki69 said:
I think the September update change the active partition from A to B ( the August is A). Thats why it doesn´t work.
I´m also with September Update, and camera2api is the only thing i want to enable on Mi a2 ( don´t want to root and lose OTA) until a relliable TWRP is relleased.
Click to expand...
Click to collapse
I got the september boot.img from another topic and rooted
Still no working solution for the ones that have setember update, and don´t want to root or use magisk??? I think the problem is that TWRP does not work with september update. Any easy way to downgrade to August again??
I'm thinking of installing Camera2API/GCamera, but I wonder if it's worth it. What are the real benefits? Does this make the camera compatible with more applications (eg Snapchat), avoiding them from making a screen of the camera ?
Hey guys i have some doubts.
I saw many threads saying to flash twrp into a partition (A or B) but i don't get why we have to flash it... So can someone clarify for me some stuff?
1 - fastboot boot twrp.img
I don't recall where the persist properties are stored but i believe it's not a partition that the OEM or google will constantly modify, right? So why making changes to the persist props in TWRP doesn't make it persist when booting into system? Is it possible to make it store it not temp?
Why there are people saying that flashing TWRP into, eg. part A, and booting into it, and then changing to part B, is working to enable the camera2 API? This should be the same as fastboot boot TWRP and then reboot it.
2 - As far as i remember, su permissions might be allowed in boot.img (.props file), so i thought that magisk patched image would have some su privilegies, but after booting from a patched image, su doesn't return anything. Does anyone knows what is the patched image from magisk? I heard about an app showing up after booting, so the patch is just a runnable with root?
3 - I also saw many threads changing sys build.prop directly. Horrible choice, but, does anyone knows if it possible to have a build.prop in OEM partition? From what i know, the build.prop will be concat. from all the folders related to the booting process. Has anyone tried to throw a build.prop into OEM with the persist enable? I believe that, since the folder is related to OEM only, and since we have no OEM making apps or whatever in an Android One phone, i think it is more safe than other partitions
ricardohnn said:
Hey guys i have some doubts.
I saw many threads saying to flash twrp into a partition (A or B) but i don't get why we have to flash it... So can someone clarify for me some stuff?
1 - fastboot boot twrp.img
I don't recall where the persist properties are stored but i believe it's not a partition that the OEM or google will constantly modify, right? So why making changes to the persist props in TWRP doesn't make it persist when booting into system? Is it possible to make it store it not temp?
Why there are people saying that flashing TWRP into, eg. part A, and booting into it, and then changing to part B, is working to enable the camera2 API? This should be the same as fastboot boot TWRP and then reboot it.
Click to expand...
Click to collapse
If you did a search on that 'persist' command, you'd find that it does persist, to many of the tables that type of information is stored in. It does not change the info in the properties file in 'System'. It does change the 'Data' partition, but that's okay, as there's only 1 of those (used no matters which slot boots up). The reason for booting on the non-active partition is a twrp / dual slot phone type of thing. I know it works as I've done it, but the 'setprop persist' changes the one and only Data partition, which both slots use, that's why it works.
ricardohnn said:
2 - As far as i remember, su permissions might be allowed in boot.img (.props file), so i thought that magisk patched image would have some su privilegies, but after booting from a patched image, su doesn't return anything. Does anyone knows what is the patched image from magisk? I heard about an app showing up after booting, so the patch is just a runnable with root?
Click to expand...
Click to collapse
I thought the patched image would have some su capabilities also, but it doesn't. It only installs the Magisk stub, which you can further install magisk from. Magisk is a great and sophisticated app. Has numerous Magisk modules which do a wide variety of things. But if you don't need any of those things, and don't need root, it's pretty over the top for just setting the cam2api, imho.
ricardohnn said:
3 - I also saw many threads changing sys build.prop directly. Horrible choice, but, does anyone knows if it possible to have a build.prop in OEM partition? From what i know, the build.prop will be concat. from all the folders related to the booting process. Has anyone tried to throw a build.prop into OEM with the persist enable? I believe that, since the folder is related to OEM only, and since we have no OEM making apps or whatever in an Android One phone, i think it is more safe than other partitions
Click to expand...
Click to collapse
If you change 'System' directly you will not get any OTA updates, so yer right, don't change that. There's no need to consider changing it anywhere else, as the 'setprop persist etc' command populates all the tables for you. 'System' is not affected and OTA updates will continue. There's no removing Magisk, restoring boot image, reinstalling etc etc etc.
One thing I would warn others about, using the various 'Tools'. You don't know what commands they are running, so you can't be sure what they will do. I say that because one of the tools I recently downloaded and went through and found the commands in it. The first thing it did after booting TWRP was to mount 'System' as Read / Write!! Why does that matter? From what I've read, doing that stops OTA from happening. Just mounting it R/W will change the date stamp on it concerning modifications, and that's all the OTA needs to know to say 'it's been modified'.
good luck, cheers
Agree with the data persist, but why do you need to flash into the different partition and not only boot from it?
I don't disagree that it will work, i just want to know why not boot from fastboot directly instead of flashing into one of the backup partition. I know that fastboot boot command triggers different code than usual flow. But not that i remember that it would affect something.
Getprop | grep camera would return if enabled right? Or nope?
ricardohnn said:
Agree with the data persist, but why do you need to flash into the different partition and not only boot from it?
I don't disagree that it will work, i just want to know why not boot from fastboot directly instead of flashing into one of the backup partition. I know that fastboot boot command triggers different code than usual flow. But not that i remember that it would affect something.
Getprop | grep camera would return if enabled right? Or nope?
Click to expand...
Click to collapse
The dual partition thing is new to everyone, I only understand bits and pieces, like everyone. But we do know there's no more 'recovery' partition, like we use to know. And we also know the way the dual works is that when an update occurs, if the device then try's to boot it and fails, it will automagically switch to the previous partition and boot it. Pretty sure we also know that booting and flashing are different with dual slot devices, but I'm not 100% sure how different.
I've tried booting twrp and just ended in bootloops. And that may be because of diff versions of TWRP, or it may be because of basic code all TWRP's have, not sure. But TWRP is a recovery, not a boot image with the proper kernel, like the patched boot images.
I do know for sure I didn't want to brick my phone (duh). So when I found a Magisk install guide, mentioned in my Guide thread, they used TWRP to install it. It sounded like an authoritative guide to me, re the part of getting TWRP to work. So I used that just to be able to run the setprop commands. Worked perfectly. Having to use the other (non active) partition **may** have something to do with avoiding triggering any automatic code to switch partitions unnecessarily, not sure, but not going to experiment any further to find out
Again, do some research on that setprop command, one of the things you'll find is that it doesn't populate all the appropriate tables until 'after' the device has been rebooted. So doing a getprop directly after doing the setprop won't work, not until it's been rebooted.
cheers
AsItLies said:
I've tried booting twrp and just ended in bootloops. And that may be because of diff versions of TWRP, or it may be because of basic code all TWRP's have, not sure. But TWRP is a recovery, not a boot image with the proper kernel, like the patched boot images.
Click to expand...
Click to collapse
I did manage to boot the last version of TWRP only first time, every other time ended in bootloops.
And I can sorry say that ADB did not work in booted TWRP, adb did not recognized the phone, so no commands could be typed.
For me, it is easier to flash patched_boot.img and install root temporarily, and then when job is done with activating camera2, uninstall root.
But hey, there are two easy ways, and everyone can choose which one is best suitable for them to try.
It would be of course easiest to just boot TWRP and enable camera2, but it doesn't work for now.
minnuss said:
I did manage to boot the last version of TWRP only first time, every other time ended in bootloops.
And I can sorry say that ADB did not work in booted TWRP, adb did not recognized the phone, so no commands could be typed.
For me, it is easier to flash patched_boot.img and install root temporarily, and then when job is done with activating camera2, uninstall root.
But hey, there are two easy ways, and everyone can choose which one is best suitable for them to try.
It would be of course easiest to just boot TWRP and enable camera2, but it doesn't work for now.
Click to expand...
Click to collapse
Yes, just 'booting' twrp has been problems for everyone, "that" doesn't work (not just now, but probably never).
But, following the Guide I wrote, and 'flashing it' does work. Right Now.
AsItLies said:
The dual partition thing is new to everyone, I only understand bits and pieces, like everyone. But we do know there's no more 'recovery' partition, like we use to know. And we also know the way the dual works is that when an update occurs, if the device then try's to boot it and fails, it will automagically switch to the previous partition and boot it. Pretty sure we also know that booting and flashing are different with dual slot devices, but I'm not 100% sure how different.
I've tried booting twrp and just ended in bootloops. And that may be because of diff versions of TWRP, or it may be because of basic code all TWRP's have, not sure. But TWRP is a recovery, not a boot image with the proper kernel, like the patched boot images.
I do know for sure I didn't want to brick my phone (duh). So when I found a Magisk install guide, mentioned in my Guide thread, they used TWRP to install it. It sounded like an authoritative guide to me, re the part of getting TWRP to work. So I used that just to be able to run the setprop commands. Worked perfectly. Having to use the other (non active) partition **may** have something to do with avoiding triggering any automatic code to switch partitions unnecessarily, not sure, but not going to experiment any further to find out
Again, do some research on that setprop command, one of the things you'll find is that it doesn't populate all the appropriate tables until 'after' the device has been rebooted. So doing a getprop directly after doing the setprop won't work, not until it's been rebooted.
cheers
Click to expand...
Click to collapse
About the setprop, even after the reboot isn't returning the prop, so that's why i am not sure if it is actually keeping it after twrp boot.
About the AB partition... well...
it's more or less like this...
let's say some simple partition scheme....
Preloader
Boot
System
Vendor
ODM
Data
So the phone will probably have many boot images type... like the usual boot.img or recovery.img (before treble) etc.
The boot.img will have the kernel image bla bla bla... since this is a google update, i believe that the AB partition procedures starts here (meaning all the relevant code of checking whether is A or B)
Google wanted to make things faster for the OEM (Samsung, LG etc) so they wanted to separate their ****s from google's one.
So (if things didn't change) you will have the following partitions now (actually i am not sure if they kept the system AB, but i believe so, since it seems to be working in other phones like that )
BootA
BootB
SystemA
SystemB
VendorA
VendorB
OEMA
OEMB
Data
So let's say google wants to update some security patches, from kernel til android, it will have to update boot and system. So in a OTA (changes if it is a google phone or a branded phone) before treble, it would update like... download the image containing boot and system into cache partition or data partition (depending the OTA size), after the download the update manager apk would set as a update booting and reboot your phone. Once booted, the phone would copy the partitions to the correct place (not being detailed) and rereboot. After the rereboot, if everything went normal, it would delete the downloaded image from your data/cache partition.
Now it's different like... instead of sending the update to the data partition and copying. It has a flag to set whether you are in A or B partition.
If you are (for eg.) in A partition, it will download the OTA to the B partition. (consider that in an untouched phone, A and B would have identical copies). So after downloading it, the flag is set to the B partition and reboot the phone. When booting, this time, it will not follow the A booting flow, like...
Before the update booting process would be
BootA
SystemA
VendorA
ODMA
Data
After the update the boot process will be
BootB
SystemB
VendorB
ODMB
Data
But i didn't update the vendor or ODM... why not keep in A? Because it's too hard to manage it.
So if anything fails in this update, it can easily go back into A booting process (which means you have a backup of your old boot).
Since system is too big, i am not sure if the system AB exists (it would just take up too much space... but anyway...).
It is also not a way to prevent bootloop, it is related to update. If an update fails (say, the image is corrupted or has no signature etc) the boot will change back, but if the update is "correct" it will boot as it should, even if the image is bad.
So again... when we do the fastboot boot boot.img, we are copying this boot into some cache or data to boot up, instead of our original boot. When we reboot, it will use the original boot. So, is there a difference from using twrp flashed and booted?
I know that fastboot boot will trigger different booting process (meaning signatures verifying etc) but don't think that it will not mount a partition or something...
Well... anyway... so after the reboot, when you setprop in TWRP, the getprop returned the prop correctly? I recall something about getprop not returning the prop but camera2 was enabled anyway with the setprop... well... can you just confirm one thing for me?
The steps you used was... fastboot flash patchboot and then reboot into twrp and then reboot back to usual partition.
You didn't do fastboot boot patched boot -> twrp -> reboot
Right?
---------- Post added at 09:44 AM ---------- Previous post was at 09:42 AM ----------
AsItLies said:
Yes, just 'booting' twrp has been problems for everyone, "that" doesn't work (not just now, but probably never).
But, following the Guide I wrote, and 'flashing it' does work. Right Now.
Click to expand...
Click to collapse
Oh didn't see this one. OK...
Damn... hmm... strange... well thanks anyway...
---------- Post added at 09:50 AM ---------- Previous post was at 09:44 AM ----------
AsItLies said:
The dual partition thing is new to everyone, I only understand bits and pieces, like everyone. But we do know there's no more 'recovery' partition, like we use to know. And we also know the way the dual works is that when an update occurs, if the device then try's to boot it and fails, it will automagically switch to the previous partition and boot it. Pretty sure we also know that booting and flashing are different with dual slot devices, but I'm not 100% sure how different.
I've tried booting twrp and just ended in bootloops. And that may be because of diff versions of TWRP, or it may be because of basic code all TWRP's have, not sure. But TWRP is a recovery, not a boot image with the proper kernel, like the patched boot images.
I do know for sure I didn't want to brick my phone (duh). So when I found a Magisk install guide, mentioned in my Guide thread, they used TWRP to install it. It sounded like an authoritative guide to me, re the part of getting TWRP to work. So I used that just to be able to run the setprop commands. Worked perfectly. Having to use the other (non active) partition **may** have something to do with avoiding triggering any automatic code to switch partitions unnecessarily, not sure, but not going to experiment any further to find out
Again, do some research on that setprop command, one of the things you'll find is that it doesn't populate all the appropriate tables until 'after' the device has been rebooted. So doing a getprop directly after doing the setprop won't work, not until it's been rebooted.
cheers
Click to expand...
Click to collapse
Oh by the way, i saw one part
"But TWRP is a recovery, not a boot image with the proper kernel, like the patched boot images. "
I think this is wrong (at least if TWRP team didn't change stuff), but all images are bootable images... (by all images i mean... boot.img recovery.img Flashing.img).
I once thought that they used a common kernel image, but in fact, all the booting process image has the kernel image copied (literally) to prevent brick. So even with a corrupted boot img, you still can boot into recovery or into download mode.
So that's why TWRP must have a kernel.
@ricardohnn, you seem hell bent on getting twrp to boot. Good luck. Let me know how that works out for you. In the meantime I'll be enjoying my cam2api working
cheers
AsItLies said:
@ricardohnn, you seem hell bent on getting twrp to boot. Good luck. Let me know how that works out for you. In the meantime I'll be enjoying my cam2api working
cheers
Click to expand...
Click to collapse
Actually TWRP boots fine with fastboot boot...
ADB runs smooth, but it just won't keep.
But you've made me envy LOL
I will think about flashing... later...
ricardohnn said:
Actually TWRP boots fine with fastboot boot...
ADB runs smooth, but it just won't keep.
But you've made me envy LOL
I will think about flashing... later...
Click to expand...
Click to collapse
What version of TWRP did you use, there is now two versions, I used last one, from a few days ago, and in first try I did manage to boot from fastboot, not flash it, but ADB did not worked.
So, if adb did work for you, maybe it was earlier version ?
Anyway, as you say, it is not permanent setprop, maybe because the twrp is not stable one, or maybe it needs to be flashed to work, not just booted.
I personally do not have doubts that this tutorial works, I just did not want to flash twrp. :good:
Hello guys,
after testing around for days i thought it might be helpfull to post the honestly pretty easy procedure to install stock Oreo, root it and remove encryption if needed.
Disclaimer:
I am not responsible for bricked devices, dead SD-cards, lost data, etc.
Back up your data, app settings, be sure you remember your passwords, your device will be empty!
Edit: It seems, theres a bug that, if you read this post on XDA labs, won't show you everything, it seems like it randomly skips some parts.
What you need:
Unlocked Bootloader
Motorola USB drivers
15 sec adb and fastboot uploaded by myself since the original links aren't working anymore https://multifilemirror.com/hgxxyrfyd7rx.
I originally got them from here (you may have to go into your device manager and select the adb drivers for your phone f.e. when you want to use adb push in recovery, see original xda site).
This will also install the google drivers.
TWRP 32bit (v.3.2.3-0)
TWRP 64bit (v.3.2.1-0)
Disable Dm-Verity & ForceEncrypt from here
Magisk and MagiskManager. Newest should probably work, i used Magisk-18.0 and MagiskManager-6.1.0
Most recent Oreo firmware (edit 08.19)
(I used this Oreo firmware found in this post)
Steps:
Be sure you backed up your data and app settings, your pictures, downloads, etc. It will all be lost!
Please read all steps before you begin.
Extract the firmware into your adb folder (where you installed adb, should contain 4 files), copy both twrp (32 & 64 bit) in there, too.
Boot into bootloader (hold power+vol down) and open a terminal inside your adb folder (shift+rightclick) and type in
Code:
fastboot flash recovery name_of_twrp64bit_file.img
Boot into recovery (select recovery with vol buttons, then press power) and make a backup of EFS partition and persist folder (use file manager under advanced) and make another backup of system, boot and data and save both backups and persist to your SD-card or better your computer, too.
reboot into bootloader and check if your bootloader version is B.8.31 or above.
If it is B.8.31 or above DON'T FLASH BOOTLOADER!!! Because if you flash bootloader of the same version or below, it would hardbrick your device!
That also means if you f.e. want to downgrade to Nougat, just ignore following lines:
Code:
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
Also, unless youre sure your persist is absolutly ok (check here), please also omit the following lines:
Code:
fastboot erase modemst1
fastboot erase modemst2
They would reset your IMEI and usually it gets restored from your persist, but only if its not buggy.
Even if your persist is fine, as far as i know theres no harm in not using this commands (my persist is fine and i didnt use them).
Now paste following commands in your command promt in adb, in case you are BELOW B.8.31, add the bootloader commands from above between the first and second line:
Code:
fastboot oem fb_mode_set
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash dsp adspso.bin
fastboot flash oem oem.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase cache
fastboot erase userdata
fastboot erase customize
fastboot erase clogo
fastboot oem fb_mode_clear
fastboot reboot
Please make sure that it really flashed all sparsechunk 0-8.
Let your phone reboot itself after installation is done, then return to bootloader and flash twrp 64bit:
Code:
fastboot flash recovery name_of_twrp64bit_file.img
Boot into recovery, since your device is encrypted it will ask for a password, click cancel, then go to WIPE and click on FORMAT DATA and confirm with yes.
This will remove the encryption of your data partition.
Go back to twrp main page and click on REBOOT then RECOVERY.
Once back in twrp, either copy Disable Disable_Dm-Verity_ForceEncrypt.zip and Magisk-18.zip and MagiskManager-6.1.apk to your SD-card or use
Code:
adb push name_of_file /external_sd
or
adb push name_of_file /sdcard
to copy the files to your SD-card (external_sd) or Internal-Storage (sdcard). For this you may have to manually configure your adb drivers in device manager, see here under Notes.
In twrp go now to INSTALL and flash "disable-dm-verity&encrypt" an then REBOOT and SYSTEM.
Return to recovery and flash "Magisk-18.0.zip", wipe Cache/Dalvik at the end and reboot System
Once System has rebooted, install MagiskManager-6.1.0.apk from your SD-card.
MagiskManager should say that Magisk is installed and in settings under security, your phone should be decrypted.
Note: MagiskManager will only show full information when it has internet access, all you see without is if Magisk is installed.
If you want to encrypt your device again, do it but flash twrp 32bit, too, if it asks for a password, it should be your usual password which you also have to enter on every boot.
Some explanation:
Why twrp 64bit?
Because twrp 32bit is able to bypass encryption, however, it causes some problems:
In fact, probably every twrp without the bypass encryption feature would work f.e. older 32bit version 3.1.0. but 64bit offers some features as EFS backup.
If you flash 32bit directly it can bypass the standard encryption but formatting data fails every time when you booted System previously.
When you reboot recovery and format data again it works, but it needs to fail first, just rebooting into recovery 2 times doesnt work.
I dont know what would happen if you (after using your phone normally) reboot recovery and f.e. want to do a backup from data, though im sure i testet it out, but i probably forgot.
You need it later when you want to encrypt your phone again, for me it didnt decrypt data after i reencrypted my phone using my password.
Why reboot System between flashing Disable-encryption and Magisk?
If you do not, you get heavy lags in the first 2 minutes after rebooting System, MagiskManager will say that Magisk isnt installed and then your phone will crash and reboot. But after that 2. reboot everything works fine again, Magisk is back, no lags.
I remembered this post from Johny Cipeli, between flashing no-verity and magisk he wrote to reboot, so i tried and it worked without lags and crash.
You don't need to remove encryption:
You can root your phone without flashing Disable_dm-verity_and_force-encrypt, use then twrp 32bit, dont format data, just flash magisk.
I can say that it should work, because that was one of my first attempts (and it worked for me), however i didnt write down what i was doing so i cant tell you step by step.
Additional:
In case you're searching Viper4Arise for Oreo, the Aroma installer won't work, use the Magisk module and install in MagiskManager. You can download it here from Zackptg5
If youre also annoyed by that One-Nav vibration, you can try using ExKernelManager app and activate the powersave mode. Although i think its officially not for G5, the app works, maybe that only refers to the Kernel and not to the app.
I tried Flyhigh Kernel, it didnt boot after flashing it, if you know a working Kernel for G5 which can disable One-Nav vibration, please write an answer.
My device:
Rooted Stock Oreo 8.1.0: OPP28.85-16
Bootloader: B.8.31
Model: XT1676 reteu
Stock Kernel
Thanks to:
Snoop05 for 15 sec adb and fastboot.
TheFixItMan for twrp.
Zackptg5 for "Universal DM-Verity, ForceEncrypt, Disk Quota Disablers".
topjohnwu for Magisk.
freeZbies for Official Oreo 8.1.0 OPP28.85-16 Fastboot Firmware.
Wolfcity, woozie.2007 and TheFixItMan for answering many of my questions!
- reserved -
ok friend, thank you for this. I think you dont need to flash twrp 64, i only flash official twrp 32, which indeed doesnt have the option for backup persist, but only efs. Maybe is someone else that will try your method to decrypt, I will try next time when I flash the stock, maybe to the next patch update. Good luck and A happy new year !!!
---------- Post added at 01:31 AM ---------- Previous post was at 01:26 AM ----------
LE: You cant root without format data partition, because flashing twrp, when twrp decrypt data you cant see anything on data partition, so you need to format it even if dont need to decrypt the phone
Nice guide @G5-User7080 .
For me everything seems to be correct, I can´t say anything device specific as I own a potter but there shouldn´t be big differences.
There´s one sentence I´m not sure about:
G5-User7080 said:
Because if you flash bootloader of the same version or below, it would hardbrick your device!
That also means if you f.e. want to downgrade to Nougat, just ignore following lines.....
Click to expand...
Click to collapse
It´s clear that downgrading the bootloader can hardbrick your device but why should there be any risk in flashing the same bootloader?
If I flash the fastboot firmware I´m on shouldn´t it be ok? Where did you get that information from?
I´m about to do that on a device of a friend of mine , he is rooted on 7.0 and wants to go the way to flash the firmware he´s on and after that take the OTA up to Oreo.
He could flash the Oreo firmware directly but he prefers to use the firmware from which he knows it´s working and is the correct one.
Very careful guy.
Edit: I just recognized that the part you called steps incl.the part I quoted isn't visible in XDA Labs, I'm only able to see it in mobile browser. Also some download links aren't there, on XDA Labs there is only the one for the 64bit recovery visible, not the one for 32bit. Maybe it's some kind of format problem, bb codes or else.
Some screenshots from XDA Labs and Chrome mobile to show the differences.
Wolfcity said:
It´s clear that downgrading the bootloader can hardbrick your device but why should there be any risk in flashing the same bootloader?
If I flash the fastboot firmware I´m on shouldn´t it be ok? Where did you get that information from?
Click to expand...
Click to collapse
I read this more then one time, although i could just find one source for now: "Flashing bootloader of equal or minor version will hardbrick your device" from Oreo Fastboot firmware.
I dont know why flashing bootloader of the same version would do lead to a hardbrick, but didnt want to try it out myself, also i see no problem in not flashing the bootloader when you already have the same version.
Wolfcity said:
Edit: I just recognized that the part you called steps incl.the part I quoted isn't visible in XDA Labs, I'm only able to see it in mobile browser. Also some download links aren't there, on XDA Labs there is only the one for the 64bit recovery visible, not the one for 32bit. Maybe it's some kind of format problem, bb codes or else.
Click to expand...
Click to collapse
Thats weird, i dont have XDA labs (thats the mobile app, right?), i wrote it on XDA desktop version and only used the size, code, color and list tags, hmm maybe it has problems with the sorted list, for every other part i used the unsorted ones with dots instead of numbers.
Quick test:
Test One:
this is made
in an unordered
list, using
list tags
Test Two:
this is now made
in an ordered list
counting from one to four
using list=1 tags
Can you read both lists with each four points?
And thanks for mentioning the bootloader thing,.. i realized i forgot to paste the lines in to flash bootloader in case you are below b8.31 ehee..
Wolfcity said:
Some screenshots from XDA Labs and Chrome mobile to show the differences.
Click to expand...
Click to collapse
wtf, it just skips random parts ?!!!
I have no idea what could cause this.. ill better add a note at the beginning of the post...wow
To flash the same vers of bootloader is not a problem, only the below one will hardbrick the phone
G5-User7080 said:
wtf, it just skips random parts ?!!!
I have no idea what could cause this.. ill better add a note at the beginning of the post...wow
Click to expand...
Click to collapse
Your lists are both readable.
I took a look at the BB codes as it's known that some of them are not working on XDA Labs like SIZE or HIGHLIGHT. In that case the BB codes are shown in the text but there's nothing missing.
Maybe it has something to do with the use of
[*] in your text?
Edit: Have you changed something in your text now? It seems to be complete on XDA Labs now too...
Wolfcity said:
Your lists are both readable.
I took a look at the BB codes as it's known that some of them are not working on XDA Labs like SIZE or HIGHLIGHT. In that case the BB codes are shown in the text but there's nothing missing.
Maybe it has something to do with the use of
[*] in your text?
Edit: Have you changed something in your text now? It seems to be complete on XDA Labs now too...
Click to expand...
Click to collapse
the [*] just create new lines for a list, and yes, i edited it two times, first, i added that one should use the bootloader commands in case of being below b831 and then i added the info about missing things on xda labs, but i didnt change anything on the lists itself,...
Red Magic 5G Bootloader Unlock Guide: OR get ROOT & TWRP without unlocking the BL!!!
***Bootloader Unlock Instructions for the Nubia Redmagic 5G + installing TWRP:***
WARNING: ANY BOOTLOADER UNLOCK METHOD INVOLVES THE RISK OF BRICKING YOUR DEVICE PERMANENTLY. WHILE THERE IS USUALLY A WAY TO RECOVER, DO NOT ATTEMPT THIS PROCEDURE IF YOU DO NOT KNOW WHAT YOU ARE DOING. BAD THINGS CAN HAPPEN. YOU HAVE BEEN WARNED!!! YOU MAY BE LEFT WITH A USELESS BRICK!!! READ ALL FURTHER WARNINGS EXPERIMENTAL METHOD IN ORIGINAL DOWNLOAD FILE WORKS, I'M USING IT
If you want a NOOB guide look at this post: https://forum.xda-developers.com/nu...beginner-tutorial-unlock-bootloader-t4131585/
Also note a user has managed to fix the FP sensor post BL unlock, see this post here: https://forum.xda-developers.com/nu.../guide-calibration-finger-print-loss-t4132961
Still, I suggest root bypass it's better.
MegaNZ Link for Root without unlocking the Bootloader, and without breaking the FP, also includes instructions for installing BlackMagic5G (explanation below), adding HD VOLTE, how to restore from a brick, and some other cool tricks: https://mega.nz/file/igphSCTD#OybJo9t1zwvJ0bdbAcN2BCqxWXAfHdhk3JFB4_5xkVc
I suggest you flash my BlackMagic5G and don't unlock your bootloader at all - just root. It's CN 2.52 ROM based. You'll get VOLTE, , GApps installed, Rooted with Magisk, TWRP, debloated, YouTube Vanced, AdAway, SmartPack Kernel Manager, etc. - looks like the Global / NA variant of the ROM. Almost perfect except still uses Messages and Phone from Nubia. Plus you will enable Face Unlock not available in the Global or NA versions of the ROM, and FP will still work! Click on the Google Search bar widget and the mic icon takes you to the Google Assistant, the left icon is Google Feed, type in the middle bar for a Google Search. Has 1Weather Free weather widget that looks great, and Google Calendar widget for your whole month of activities. Translate, Lens, Chrome, all the Google Apps are there. And the Chinese Nubia apps are nearly all GONE!
MegaNZ Link for BlackMagic5G Beta - IT'S ONLY THE DATA PARTITION + ROOTED KERNEL + NA SPLASH SCREEN, you NEED to 1) install the Red Magic 2.52 ROM below FIRST 2) Root using the first link posted above 3) Flash restore this from TWRP: https://mega.nz/file/r9hF2BwS#RrAXiFWSBNX8dLqfrH8nNHo_uigPC8uYXonwhALhGbo
MegaNZ Link for the Red Magic 5G CN 2.52 ROM: https://mega.nz/file/aoxBFAqY#EDt2OZBGTME4ZGKnERKpK_t-aJT_rWgD0aqBFkilRcY
*** NOW THE BOOTLOADER UNLOCK INSTRUCTIONS ***
Go to Settings / About phone / Build Number (NX659_J_ENCommon_V3.08 on North American Variant), click 7 times, Now you are a developer message appears, go back a menu to Settings / Other system settings / Developer options.
Enable:
OEM unlocking "Allow the bootloader to be unlocked"
USB debugging "Debug mode when USB is connected"
Install Minimal ADB and Fastboot (Windows 10 in this example): https://www.androidfilehost.com/?fid=746010030569952951
Default install path is:
C:\Program Files (x86)\Minimal ADB and Fastboot\
Go to the Search button on the bottom on Windows 10, type cmd, Command Prompt will appear in the menu. Right click it and Run as Administrator. All commands to be typed will be run in this Command Prompt window (referred to as terminal) unless otherwise stated to run on the phone.
Now Terminal window appears (it says Administrator: Command Prompt in the heading):
Text displayed is:
Microsoft Windows
(c) 2020 Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>
Typed in terminal:
cd "c:\Program Files (x86)\Minimal ADB and Fastboot"
I now connected the phone to a USB port on the PC.
On the phone, a Window appeared:
"Allow USB debugging?"
The computer's RSA key fingerprint is:
[36 digit code] Example:
C8:A17:E2:01:F6:A1
:368:10:E8:33:20:FB:
93:7D
Always allow from this computer (it's my computer so I clicked it since I trust the computer)
CANCEL / ALLOW (I clicked ALLOW)
Typed in terminal:
adb reboot bootloader
The phone reboots. Once the phone screen boots, in the center it says: Now you are in fastboot mode.
From the terminal I typed:
fastboot oem nubia_unlock NUBIA_NX659J
The terminal now displayed:
...
(bootloader) START update nubia fastboot unlock flag!!!
(bootloader) START set state to 1 ok!!!
In the terminal I typed:
fastboot flashing unlock *** DO NOT TYPE THIS IF YOU WANT TO KEEP A WORKING FP!!! READ TOP OF POST!!! AVOID THIS WITH THE EXPERIMENTAL METHOD OF ROOT WITH NO BL UNLOCK ***
Now a screen appeared on the phone with a big <!> red icon in the left corner. The rest in white text is a warning message. "By unlocking the bootloader, you will be able to install custom operating system on this phone. A custom OS is not subject to the same level of testing as the original OS, and can cause your phone and installed applications to stop working properly-
Software integrity cannot be guaranteed with a custom OS, so any data stored on the phone while the bootloader is unlocked may be at risk.
To prevent unauthorized access to your personal data, unlocking the bootloader will also delete all personal data on your phone.
Press the Volume keys to select whether to unlock the bootloader, then the Power Button to continue."
I selected UNLOCK BOOTLOADER and my device was completely erased. The factory OS loaded then. This process takes some time to complete.
Now the device rebooted with a warning message, and a big <!> yellow icon in the left corner.
"The boot loader is unlocked and software integrity cannot be guaranteed. Any data stored on the device may be available to attackers. Do not store any sensitive data on the device.
Visit this link on another device:
g.co/ABH"
Now the device reloads the firmware apparently and wipes all user data. Upon setting up the phone, the fingerprint display registration comes up and asked to place my finger on the back of the phone. There is no fingerprint sensor on the back of the Redmagic 5G! It is under the screen! So this step must be skipped. The ROM setup is corrupt or incomplete, a beta possibly. I setup the phone then went into Settings / Security to try to add a fingerprint. The button to add fingerprint then appears. Once I click the button, I get this error:
Loss of fingerprint calibration data
Loss of fingerprint calibration data was detected.
Currently unable to complete fingerprint entry,
please contact Nuia after-sales service via
4007006600
See the XDA post for recalibrating the FP: https://forum.xda-developers.com/nu.../guide-calibration-finger-print-loss-t4132961
ROOT FOR ALL DEVICES:
(These files are included in the tools download zip, Magisk 20.4 and MagiskManager-v7.5.1.apk, but this is the official source as updates post): Go to XDA and Download Magisk Manager and install the APK. Download the latest Magisk as well from the Manager. You can then reboot to Recovery (volume up + power, release the power button once the screen shows it loading, hold the volume up down until you see TWRP pop up). Flash Magisk from TWRP Install / Zip / sdcard / Magisk.zip reboot and you'll have root.
BL unlock first method was tested on North American variant and it works. But it breaks your FP sensor and gives you an annoying boot prompt.
If at any time you want to remove the OEM Bootloader unlock, you plug into the PC, go to the terminal for Minimal ADB and Fastboot, type:
adb reboot fastboot
fastboot oem nubia_unlock NUBIA_NX659J
fastboot flashing lock (screen will prompt to relock BL, choose to Relock)
The phone should reboot and install the original software. BUT...
If it says you are corrupted well, you have more issues.
You'll have to reflash the stock recovery.img, reboot to stock recovery, wipe data, wipe cache, and flash the CN update.zip rom to a flash drive FORMATTED TO FAT32 (annoying as hell) But you NEED a USB-C to OTG Adapter to attach a Flash Drive / SDCARD this way). If you don't have one, you better reflash TWRP using the prior instructions and flash the update.zip from there. Install, select the update.zip, flash. Wipe Data, Cache, ART/Dalvik. Reboot.
Now it should WIPE the entire phone and be back to normal Android 10 setup non rooted, no unlocked bootloader. Always beware of data loss doing root functions!!! Always be prepared to setup your phone entirely over again. Google Backup is very good to turn on before you do any of this stuff if you have already installed apps.
*** WARNING - THIS BYPASS METHOD COULD GO AWAY AT ANYTIME. IT SHOULD EVENTUALLY BE FIXED BY NUBIA ***
mslezak said:
{Mod edit}
***Bootloader Unlock Instructions for the Nubia Redmagic 5G + installing TWRP:***
Settings / About phone / Build # click 7 times, now your a dev message appears, good back a menu, go to Additional Settings / Developer Options
Enable:
ADB debugging, + OEM unlock
Connect phone to PC, approve device on phone RSA key for USB debugging
From Minimal ADB and Fastboot:
adb reboot bootlader
fastboot oem nubia_unlock NUBIA_NX659J
fastboot flashing unlock
(approve on phone with volume keys to unlock and hit the power button, now you'll get an annoyng mesage on boot as insecure unlocked BL) *ALL YOUR DATA WILL BE WIPED*
Next:
fastboot flash recovery recovery-TWRP-3.4.1B-0324-NUBIA_REDMAGIC_5G-CN-wzsx150.img
fastboot reboot recovery
Enter TWRP, set to not be removed by updates if prompted.
Boot up the device, setup as a new device. You're on stock ROM / kernel now unlocked.
Once you get up and running you'll want APK Mirror app to install stuff on the China Variant it's in the Nubia Playstore. Gboard download as well and set as default it's a lot easier than the Chinese keyboard that swaps between Chinese and English. Set size extra tall for this huge phone (I prefer anyhow). Chrome go download it from APK Mirror app as well. Then go to XDA and Download Magisk Manager and download it and install the APK. Download the latest Magisk as well from the Manager. You can then reboot to Recovery (volume up + power). Flash Magisk from TWRP reboot and you'll have root.
Note on my testing the fingerprint did not work after unlocking the bootloader. It says to contact Nubia support at some odd number. Hopefully they fix this.
Click to expand...
Click to collapse
You were able to actually install TWRP? Not just boot it? I thought A10 devices cant have twrp permanently installed?
That is a very good question my friend. I had to reflash it several times while rooting so it appears you are correct.
Now a window when I FIRST installed popped up and said make Recovery read only so a system update. can't overwrite it, to this I didn't even pay attention. So assuming that question does lock down recovery, it should stick.
mslezak said:
That is a very good question my friend. I had to reflash it several times while rooting so it appears you are correct.
Now a window when I FIRST installed popped up and said make Recovery read only so a system update. can't overwrite it, to this I didn't even pay attention. So assuming that question does lock down recovery, it should stick.
Click to expand...
Click to collapse
So its not permanent? Thats what I thought.
Well it could be permanent...
VZTech said:
So its not permanent? Thats what I thought.
Click to expand...
Click to collapse
What I was trying to say is that I've never had a phone where I had to select "prevent recovery from being overwritten" so I just clicked off the message. Had I selected "keep TWRP from being overwritten" then possibly it sticks. It's just a matter of making the recovery partition READ ONLY.
mslezak said:
What I was trying to say is that I've never had a phone where I had to select "prevent recovery from being overwritten" so I just clicked off the message. Had I selected "keep TWRP from being overwritten" then possibly it sticks. It's just a matter of making the recovery partition READ ONLY.
Click to expand...
Click to collapse
The issue with that could be any future updates though. Rm uses there own recovery for that. They don't provide fastboot images either I believe
Can anyone send me backup of the super partition?
I accidentally flashed an image to the super partition with twrp thinking it was the system partition (it technically is tho) and it bricked my phone and messed up twrp.
Only stock recovery works but the stock recovery cannot fix it by installing a full ota from a otg drive.
I do have a backup on my phone but it is inaccessable.
Could anyone please send me a backup of the super partition or have any idea on how to fix this?
(I tried to use edl and backup my data to recover my backup of the super partition but it seemed like it needed a programmer binary from qualcomm)
Future updates...
VZTech said:
The issue with that could be any future updates though. Rm uses there own recovery for that. They don't provide fastboot images either I believe
Click to expand...
Click to collapse
Yes what I've been told by prior Redmagic Users 3 and 3S is the ROM is released, as long as your boot.img is not patched with Magisk, it can be installed through the menus in Settings / About Phone / Update or someplace like that. You just download the ROM to the appropriate folder on the phone.
So far I have 1 link to a China ROM update here: https://ui.nubia.cn/rom/detail/65
Now on how to install the ROM, I use the Chrome browser set to autotranslate webpages. Most of the Chinese will be translated from here: https://bbs.nubia.com//thread-1136030-1-1.html
Basically it's going to wipe your device clean, and you can use a Nubia backup tool which will save all your items to a folder. Which then you should copy to your PC before installing the new ROM. Then it gives you instructions to get that data back onto your updated device.
apersomany said:
I accidentally flashed an image to the super partition with twrp thinking it was the system partition (it technically is tho) and it bricked my phone and messed up twrp.
Only stock recovery works but the stock recovery cannot fix it by installing a full ota from a otg drive.
I do have a backup on my phone but it is inaccessable.
Could anyone please send me a backup of the super partition or have any idea on how to fix this?
(I tried to use edl and backup my data to recover my backup of the super partition but it seemed like it needed a programmer binary from qualcomm)
Click to expand...
Click to collapse
Your probably screwed. I had this issue on a rm3s. You will need an unbrick tool. It was released for the rm3s about 4 mos after release. NUBIA should have true fastboot images available for download, but they dont.
VZTech said:
Your probably screwed. I had this issue on a rm3s. You will need an unbrick tool. It was released for the rm3s about 4 mos after release. NUBIA should have true fastboot images available for download, but they dont.
Click to expand...
Click to collapse
That's because of the super (dynamic) partition, see from the latest (and only) ROM:
Excerpt of the ROM installation script where it delineates the dynamic vs non dynamic partitions - you have product w/ a file transfer list, then vendor, system, and odm, The other files (boot.img, dtbo.img, splash.img, etc. and other various files) should be flashable with fastboot.
# Update dynamic partition metadata
assert(update_dynamic_partitions(package_extract_file("dynamic_partitions_op_list")));
unmap_partition("product");
block_image_update(map_partition("product"), package_extract_file("product.transfer.list"), "product.new.dat.br", "product.patch.dat");
unmap_partition("vendor");
block_image_update(map_partition("vendor"), package_extract_file("vendor.transfer.list"), "vendor.new.dat.br", "vendor.patch.dat");
unmap_partition("system");
block_image_update(map_partition("system"), package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat");
unmap_partition("odm");
block_image_update(map_partition("odm"), package_extract_file("odm.transfer.list"), "odm.new.dat.br", "odm.patch.dat");
# --- End patching dynamic partitions ---
apersomany said:
I accidentally flashed an image to the super partition with twrp thinking it was the system partition (it technically is tho) and it bricked my phone and messed up twrp.
Only stock recovery works but the stock recovery cannot fix it by installing a full ota from a otg drive.
I do have a backup on my phone but it is inaccessable.
Could anyone please send me a backup of the super partition or have any idea on how to fix this?
(I tried to use edl and backup my data to recover my backup of the super partition but it seemed like it needed a programmer binary from qualcomm)
Click to expand...
Click to collapse
You should be able to flash the latest ROM via EDL mode if you've ever used EDL mode before, it usually requires shorting pins together in the device, although some recoveries will let you just boot into EDL mode if the phone still boots. It will be detected. Although on this device with the dynamic partition, I don't know how you would flash these in EDL mode... dynamic partitions - you have product w/ a file transfer list, then vendor, system, and odm that do not look like fastboot flashable parts. Possibly the unbrick tool for Redmagic 3/3S could be modified to do this for you.
mslezak said:
That's because of the super (dynamic) partition, see from the latest (and only) ROM:
Excerpt of the ROM installation script where it delineates the dynamic vs non dynamic partitions - you have product w/ a file transfer list, then vendor, system, and odm, The other files (boot.img, dtbo.img, splash.img, etc. and other various files) should be flashable with fastboot.
# Update dynamic partition metadata
assert(update_dynamic_partitions(package_extract_file("dynamic_partitions_op_list")));
unmap_partition("product");
block_image_update(map_partition("product"), package_extract_file("product.transfer.list"), "product.new.dat.br", "product.patch.dat");
unmap_partition("vendor");
block_image_update(map_partition("vendor"), package_extract_file("vendor.transfer.list"), "vendor.new.dat.br", "vendor.patch.dat");
unmap_partition("system");
block_image_update(map_partition("system"), package_extract_file("system.transfer.list"), "system.new.dat.br", "system.patch.dat");
unmap_partition("odm");
block_image_update(map_partition("odm"), package_extract_file("odm.transfer.list"), "odm.new.dat.br", "odm.patch.dat");
# --- End patching dynamic partitions ---
Click to expand...
Click to collapse
Yes those .img files can easily be fastboot flashed. Unfortunately it wont solve his problem. He needs the nubia unbrick tool, which is tough to get. I dont understand why Nubia makes things difficult. They should provide proper Fastboot files.
I already tried edl (not to flash, but to recover my backup of the super partition) but it seems like it needed a firehose binary. I still can use bootloader, fastbootd, recovery. It's just that the recovery fails at assert dynamic partition update thing with a error 7 (probably because my super partition turned into a normal partiton). I tried to flash a super empty image made with lpmake and try flashing the ota but that didn't work. I think if someone gives me a backup of the super partition I could flash that and that could work. I also had an idea of flashing a super partition of another devices factory image to make my super partition a dynamic partition, but I couldn't find any online.
apersomany said:
I already tried edl (not to flash, but to recover my backup of the super partition) but it seems like it needed a firehose binary. I still can use bootloader, fastbootd, recovery. It's just that the recovery fails at assert dynamic partition update thing with a error 7 (probably because my super partition turned into a normal partiton). I tried to flash a super empty image made with lpmake and try flashing the ota but that didn't work. I think if someone gives me a backup of the super partition I could flash that and that could work. I also had an idea of flashing a super partition of another devices factory image to make my super partition a dynamic partition, but I couldn't find any online.
Click to expand...
Click to collapse
I get a Global Device on Monday. I'll try to use Qualcomm tools to make a brick restore image of Global. If I get one made I'll post all the tools to restore the device on Mega.nz. Because of the super partition it has to be done this way. Not via TWRP as you know. I'm working on Dev tools for this device as fast as possible.
mslezak said:
I get a Global Device on Monday. I'll try to use Qualcomm tools to make a brick restore image of Global. If I get one made I'll post all the tools to restore the device on Mega.nz. Because of the super partition it has to be done this way. Not via TWRP as you know. I'm working on Dev tools for this device as fast as possible.
Click to expand...
Click to collapse
Thank you so much!
Okay I can't add anything special but daaamn this community is amazing. So much help I love you all
To relock BL repeat the instructions with 1 different command
Just replace
fastboot flashing unlock
with
fastboot flashing lock
Again you approve to lock on the phone prompt with the volume keys and your phone will be wiped and all will be back to normal, you'll be locked. And back to phone setup.
I'd edit the original post but the moderators took away my rights!!! Because I posted a Telegram link WHY - how do you expect development to get better???
BTW anyone with a NEW phone arriving that can record the FP failures and all errors please contact me so I can send to Nubia. They are waiting for me to reproduce the error but I already setup my new phone... Thinking I wouldn't be the ONLY ONE to contact [email protected] ... Guys you want developer support on this phone or not. Contribute please.
mslezak said:
{Mod edit}
***Bootloader Unlock Instructions for the Nubia Redmagic 5G + installing TWRP:***
Settings / About phone / Build # click 7 times, now your a dev message appears, good back a menu, go to Additional Settings / Developer Options
Enable:
ADB debugging, + OEM unlock
Connect phone to PC, approve device on phone RSA key for USB debugging
From Minimal ADB and Fastboot:
adb reboot bootlader
fastboot oem nubia_unlock NUBIA_NX659J
fastboot flashing unlock
(approve on phone with volume keys to unlock and hit the power button, now you'll get an annoyng mesage on boot as insecure unlocked BL) *ALL YOUR DATA WILL BE WIPED*
Next:
fastboot flash recovery recovery-TWRP-3.4.1B-0324-NUBIA_REDMAGIC_5G-CN-wzsx150.img
fastboot reboot recovery
Enter TWRP, set to not be removed by updates if prompted.
Boot up the device, setup as a new device. You're on stock ROM / kernel now unlocked.
Once you get up and running you'll want APK Mirror app to install stuff on the China Variant it's in the Nubia Playstore. Gboard download as well and set as default it's a lot easier than the Chinese keyboard that swaps between Chinese and English. Set size extra tall for this huge phone (I prefer anyhow). Chrome go download it from APK Mirror app as well. Then go to XDA and Download Magisk Manager and download it and install the APK. Download the latest Magisk as well from the Manager. You can then reboot to Recovery (volume up + power). Flash Magisk from TWRP reboot and you'll have root.
Note on my testing the fingerprint did not work after unlocking the bootloader. It says to contact Nubia support at some odd number. Hopefully they fix this.
Click to expand...
Click to collapse
Just in case if somebody need a Chinese version of official ROM v2.46 for RedMagic 5G.
Code:
https://mega.nz/file/vc0DiabR#npahTop-JXZ9Mwv-lA7G6DxTG2qqOOAf6AwW8NdEEKw
mslezak said:
Just replace
fastboot flashing unlock
with
fastboot flashing lock
Again you approve to lock on the phone prompt with the volume keys and your phone will be wiped and all will be back to normal, you'll be locked. And back to phone setup.
I'd edit the original post but the moderators took away my rights!!! Because I posted a Telegram link WHY - how do you expect development to get better???
BTW anyone with a NEW phone arriving that can record the FP failures and all errors please contact me so I can send to Nubia. They are waiting for me to reproduce the error but I already setup my new phone... Thinking I wouldn't be the ONLY ONE to contact [email protected] ... Guys you want developer support on this phone or not. Contribute please.
Click to expand...
Click to collapse
we found out that using the cn rom it all works without even unlocking the bootloader, even while oem unlock was disabled in dev options but there is some kind of vbmeta img required. a full guide is incoming.
VZTech said:
The issue with that could be any future updates though. Rm uses there own recovery for that. They don't provide fastboot images either I believe
Click to expand...
Click to collapse
You can flash their NX659J-update.zip files directly from TWRP that's how we restored our bricked devices already. So OTA updates no, but you can download them anyway and flash from TWRP directly. Yes we have to figure out a concrete restore method which isn't 100% working yet. I.e. all your data is lost this way apparently AT THIS MOMENT... MORE TO COME.