Root your android 4.2 , for beginners, all steps - General Topics

ALL DATA WILL BE LOST , BACKUP EVERYTHING
I RECOMMEND USING TWRP CUSTOM RECOVERY
Getting started
In order to root Android 4.2 the following three requirements must be satisfied beforehand:
The Android SDK, which you can download from Google Developers
A custom recovery like ClockworkMod (CWM) or Team Win Recovery Project (TWRP)
SuperSU, which you can download from CF-Root
There are no major differences between the two, but TWRP is more touch-oriented thanks to larger buttons. CWM is also available in a touch-compatible variant, but it has much smaller buttons. It's a matter of personal preference between the two though, but you have to choose one.
Before starting the process I urge you to perform a backup, as all data might be lost afterwards. You can copy the contents of the SD card to a safe external location such as cloud storage service or computer hard drive.
Setting the Stage
The first step that needs to be performed after all the files are downloaded is to install the Android SDK. Afterwards open the Android SDK Manager and select the following two items:
Android SDK Platform-tools -- it contains the required programs to install Android 4.2 Jelly Bean
Google USB Driver -- it contains the necessary drivers for the Nexus device
Then you should create a folder in an easily accessible location within the command line. In this example I will use a folder named "Root" in my C:\ drive in Windows. The path name will therefore be: "C:\Root".
From the folder where Android SDK Platform-tools is installed (in my case it is "C:\Program Files x86)\Android\android-sdk\platform-tools") copy the following files to the previously created "Root" folder:
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
fastboot.exe
The following files must also be copied to the "Root" folder:
CWM-SuperSU-v0.97.zip -- SuperSU file
The custom recovery that you previously downloaded for your specific device (please see below)
For my Samsung-made Google Galaxy Nexus (codename "maguro") I will use TWRP with the name "openrecovery-twrp-2.3.1.0-maguro.img".
Depending on your device the name of the file that you must copy may differ.
In order to make the process smoother for instance the SuperSU file can be renamed to "root.zip" and the custom recovery to "customrecovery.zip". It's a matter of convenience, but for accuracy I will stick to the original naming for this guide.
If the previous steps are completed you must have the following six files in your "Root" folder:
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
fastboot.exe
CWM-SuperSU-v0.97.zip -- SuperSU file
The custom recovery. In my case it is "openrecovery-twrp-2.3.1.0-maguro.img"
From there, you can proceed to install the drivers for "fastboot mode". To install them, follow these steps:
Power off your Nexus device.
Press and hold Volume Up and Volume Down then press and hold the Power button; the device will now enter "fastboot mode".
Go to Device Manager (Computer -> Properties -> Device Manager in Windows 7/8) and identify the device; for me it shows up as Android 1.0.
Right click Android 1.0 and select "Update Driver Software," then select "Browse my computer for driver software".
Select "Let me pick from a list of device drivers on my computer," then click "Next".
From "Have Disk..." option go to the folder where you have Google USB Driver installed (for me it's "C:\Program Files .(x86)\Android\android-sdk\extras\google\usb_driver") and select "android_winusb.inf".
Out of the three options select "Android ADB Interface" and validate any future warning window to install the driver.
Final preparations
Everything is prepared in order to start the installation process, but in order to do so a command window must be opened. Windows Key + R opens "Run"; type in "cmd" and the command window appears. Typing "cd C:\Root" and pressing Enter sets the "Root" folder as the working directory. Pressing the Shift key and right clicking inside the "Root" folder will also deliver the same result.
The device must be turned on in "fastboot mode" which I have explained at step no.2 during the driver installation process, and obviously plugged-in to the computer. You then have to type in the following commands while in "fastboot mode":
fastboot devices -- this is just for verification purposes; if there is no listed device then the drivers have been improperly installed and steps 1 through 7 must be redone.
fastboot oem unlock -> you have to accept the prompt in order to continue -- this command will unlock the bootloader, but it will also erase the data on the device which is why a backup is necessary.
fastboot reboot-bootloader -- this will reboot the bootloader.
fastboot flash recovery openrecovery-twrp-2.3.1.0-maguro.img -- this will flash the custom recovery --please use the specific file and name for your particular Nexus device!
fastboot erase cache -- this will erase the cache -- might not be necessary but it's just as a precaution.
fastboot reboot -- this will reboot the device.
After Android 4.2 is loaded and running the SuperSU file must be copied from the "Root" folder to the internal storage (shows up in Windows Explorer as a Nexus device). A simple copy and paste will do the trick here.
Then you have to power off the Nexus device and enter "fastboot mode" again. Use the Volume Up and Volume Down keys to navigate until you can select "Recovery Mode". After the power button is pressed the device will reboot in the new custom recovery.
Rooting your Nexus device
If you have ClockworkMod installed, you have to perform the following steps:
Select "install zip from sdcard"
Select "choose zip from sdcard"
Select "0" (zero) folder
Select "CWM-SuperSU-v0.97.zip"
Select "Yes - Install CWM-SuperSU-v0.97.zip"
Select "Go Back"
Select "reboot system now"
If you have Team Win Recovery Project installed, you have to perform the following steps:
Press "Install".\
Select "CWM-SuperSU-v0.97.zip" -- for me it's in the "0" (zero) folder
Swipe to confirm flash
Press "Wipe cache/dalvik" (just as a precaution)
Swipe to wipe
Press "Reboot System"
After Android 4.2 loads your device can run apps with elevated privileges (meaning it's rooted). A SuperSU app is installed in order to allow root requests, so please use your judgement on which apps you grant access.
Sent from my Nexus 7 using xda app-developers app

We do not need a new thread on things already here. Make yourself useful and post work that is original or has not already been posted.
Sent from my SGH-T999 using xda app-developers app

Related

[Q] How to root Nexus S 9023 on version 2.3.6 with stock rom

Hi,
Is there any method to keep using stock Rom with root and do not wipe the data?
Thanks
Root nexus s rom 2.3.6
Ehi!
I'm also looking for that!!
I just got the nexus S whit the 2.3.6 rom and I want to root it, but I haven't find any answer online
someone can help us??
thanks!
http://forum.xda-developers.com/showthread.php?t=1007782 read this topic page1 and page 49 very important...
please click thanks button
- -
easiest way
just install from recovery this file
if i didn't upload wrong file...
does not work for me, signature verification failed...
here is the link for your question:
http://forum.xda-developers.com/showthread.php?t=935819
the link does not work for 2.3.6 as google fixed the issue on fasboot boot...
---------- Post added at 04:09 PM ---------- Previous post was at 04:01 PM ----------
Damned what a crap...
Has been two days looking around to find a solution, and seems not possible for the 2.3.6...
What a shame google to pretend having open source system and having no way to unlock your device without loosing your data as
- The data is wiped as you unlock the device.
- To fu**ing backup the data you need to have a fu**ing unlocked device.
WTF, I just got it in my ass..
If someone at last know a way....
New Part 2 - Does NOT wipe everything - Keeps a locked bootloader
1. Make sure Part 1 is completed.
2. Make sure you have downloaded the Clockwork Recovery file and the Superuser file.
3. Move the Clockwork Recovery file to your tools folder within the Android SDK folder, and rename it to recovery.img (for simplicity).
4. Connect your Nexus S via USB to your computer and mount it as USB storage. Copy across the Superuser file to the top level of your sdcard. (So the first window you see, not in any other folders. The sdcard is just where all the files are stored, don't worry about it too much for now).
5. We now need to install PDAnet on our PC so that Windows can see our Nexus S when we are using the Command Prompt. Install PDAnet from here, select Samsung when asked about the Manufacturer, allow the driver to be installed (because the driver is unverified, don't worry about this!). Follow along with any other instructions. You should be set now.
6. With the latest SDK version, some tools have been relocated to another directory, so we need to make a copy and move them back. Navigate to the directory where you unzipped the Android SDK file in part 1. Inside it, go to the platform-tools folder, and copy both AdbWinApi.dll and AdbWinUsbApi.dll. Go back to the main Android SDK directory and find the tools folder. Paste these two files in there, and we are all ready to use 'fastboot boot' (the boot image command) now.
7. Open a command prompt window (Start > Run > cmd.exe).
8. Change to the tools directory within your Android SDK folder by using the following command (without the quotes and replacing *YOUR SDK* with the path to your Android SDK folder) 'cd c:\*YOUR SDK*\tools'.
9. Make sure your Nexus S is still in the Bootloader Interface (refer to step 9, part 1 of it isn't).
10. We now need to use the 'fastboot boot' command to load Clockwork Recovery onto our Nexus S. In the command prompt, type in the following (but without the quotes, as always) 'fastboot boot recovery.img'
11. Once you are in Clockwork Recovery (it may take a couple of tries, don't panic, just redownload Clockwork Recovery, and complete steps 3 and 10, part 2) it should look something like this:
12. Using the Volume buttons and Power button, select install zip from sdcard.
13. Select choose zip from sdcard.
14. Select the su-version#-signed.zip file you downloaded earlier and apply it.
15. Select yes (there are lots of nos).
16. Confirm it says something like this: install from sdcard complete
17. Select Go Back.
18. Select Reboot.
19. Done! You should still have all your data present on your phone, and have root access!
all credits goes to Jonathon Grigg
plipness said:
New Part 2 - Does NOT wipe everything - Keeps a locked bootloader
1. Make sure Part 1 is completed.
2. Make sure you have downloaded the Clockwork Recovery file and the Superuser file.
3. Move the Clockwork Recovery file to your tools folder within the Android SDK folder, and rename it to recovery.img (for simplicity).
4. Connect your Nexus S via USB to your computer and mount it as USB storage. Copy across the Superuser file to the top level of your sdcard. (So the first window you see, not in any other folders. The sdcard is just where all the files are stored, don't worry about it too much for now).
5. We now need to install PDAnet on our PC so that Windows can see our Nexus S when we are using the Command Prompt. Install PDAnet from here, select Samsung when asked about the Manufacturer, allow the driver to be installed (because the driver is unverified, don't worry about this!). Follow along with any other instructions. You should be set now.
6. With the latest SDK version, some tools have been relocated to another directory, so we need to make a copy and move them back. Navigate to the directory where you unzipped the Android SDK file in part 1. Inside it, go to the platform-tools folder, and copy both AdbWinApi.dll and AdbWinUsbApi.dll. Go back to the main Android SDK directory and find the tools folder. Paste these two files in there, and we are all ready to use 'fastboot boot' (the boot image command) now.
7. Open a command prompt window (Start > Run > cmd.exe).
8. Change to the tools directory within your Android SDK folder by using the following command (without the quotes and replacing *YOUR SDK* with the path to your Android SDK folder) 'cd c:\*YOUR SDK*\tools'.
9. Make sure your Nexus S is still in the Bootloader Interface (refer to step 9, part 1 of it isn't).
10. We now need to use the 'fastboot boot' command to load Clockwork Recovery onto our Nexus S. In the command prompt, type in the following (but without the quotes, as always) 'fastboot boot recovery.img'
11. Once you are in Clockwork Recovery (it may take a couple of tries, don't panic, just redownload Clockwork Recovery, and complete steps 3 and 10, part 2) it should look something like this:
12. Using the Volume buttons and Power button, select install zip from sdcard.
13. Select choose zip from sdcard.
14. Select the su-version#-signed.zip file you downloaded earlier and apply it.
15. Select yes (there are lots of nos).
16. Confirm it says something like this: install from sdcard complete
17. Select Go Back.
18. Select Reboot.
19. Done! You should still have all your data present on your phone, and have root access!
all credits goes to Jonathon Grigg
Click to expand...
Click to collapse
As said before, does not work anymore for 2.3.6 as google has fixed this exploit...

[Q] weird problem on Nexus S - please assist

This is going to be pretty long and have had the problem for months so please bear with me, read and see if you could assist.
Borrowed a friends Nexus S a while back. Used it for a few days, turned it on one day and it stays on the black google screen with the open padlock at the bottom
I am able to enter Fastboot mode is shown in image 2; lock state is unlocked.
I followed the instructions as in post 2 on the following thread
HTML:
http://forum.xda-developers.com/showthread.php?t=1787169
and as copied below but when i got to the part where i needed to mount my sdcard i get the error " unable to write to ums lunfile (no such file)".
Originally Posted by SamuelDebruyn View Post
Ok, you'll need a Windows computer to fix this. Linux should work too but if you're using Linux I guess you could figure out what would be the instructions for Linux yourself. Mac would work too but I don't know how.
Download and install the Android SDK on your computer from http://developer.android.com/sdk/index.html
Open the SDK Manager (there should be a shortcut in your start menu) and install "Android SDK Tools" and "Android SDK Platform-tools" and "Google USB Driver" (it's in Extra).
Turn your phone off, take the battery out, look at the bottom of the phone and write down the model number.
Now go to https://developers.google.com/android/nexus/images and download the factory image for your model for version 4.0.4.
You'll need something like 7-Zip (http://www.7-zip.org/) to open it.
Copy image-so....zip, radio-crespo...img and bootloader-crespo...img from the factory image to the platform-tools directory (on most computers it will be C:\Program Files (x86)\Android\android-sdk\platform-tools and you'll need Administrator rights).
Now open the platform-tools directory from the Android SDK and right click on an empty space while holding the SHIFT button and select "Open command prompt here".
Put the battery back in your phone and press Power while holding the Volume-Up button so it will boot into fastboot mode. Then connect it to your pc.
If Windows starts complaining about drivers then point it your SDK installation directory (include subfolders) or use 7-Zip to unpack http://www.mediafire.com/?5a7gou9droidi53 and point Windows to the directory where you unpacked it. More info on http://www.sevenforums.com/tutorials...e-manager.html
When you type "fastboot devices" and press Enter in the command prompt you opened before it should list one device (being your phone).
If you haven't unlocked your phone before type "fastboot oem unlock" and press Enter. Follow the instructions on the screen on your phone to complete the unlock.
Next type "fastboot flash bootloader bootloader-crespo...img" (you can press TAB to auto-complete) and press Enter. (THIS IS THE MOST IMPORTANT STEP, IF THIS GOES WRONG YOUR PHONE IS SCREWED. Don't continue if another step didn't succeed. If this works, then you can do anything with it.)
Now type "fastboot reboot-bootloader" and press Enter and wait for your phone to reboot into fastboot mode.
Next type "fastboot flash radio radio-crespo...img" (you can press TAB to auto-complete) and press Enter.
Now type "fastboot reboot-bootloader" and press Enter and wait for your phone to reboot into fastboot mode.
Next type "fastboot -w update image-....zip" and press Enter.
Now type "fastboot reboot-bootloader" and press Enter and wait for your phone to reboot into fastboot mode.
Next download http://download2.clockworkmod.com/re...0.7-crespo.img and also put it in the platform-tools directory.
Then type "fastboot flash recovery recovery-clockwork-6.0.0.7-crespo.img" and press Enter.
Now type "fastboot reboot-bootloader" and press Enter and wait for your phone to reboot into fastboot mode.
Now use the volume keys on your phone to navigate to the word Recovery and press the Power button to boot into recovery.
You're now in CWM Recovery, use the volume keys and the power button to go to Mounts & Storage > Mount USB Storage (you might have to scroll down). Now it will come up on your pc and you can transfer the update file for Jelly Bean to your phone. You can find it here: http://forum.xda-developers.com/show...68&postcount=1 (use the one for your model for IMM76D).
Unmount the usb storage, go back to the main menu and go to Install Zip from sdcard > Choose zip from sdcard and open the update file you just transferred to your phone.
You can now go back to the main menu and choose "reboot system now". It will ask you if you want to remove the auto recovery installation, do that.
That's all, you now have a clean and working Jelly Bean installation.
Someone else wrote down the same instructions if mine are not clear enough: http://forum.xda-developers.com/show....php?t=1785672
Click to expand...
Click to collapse
This prevented me from putting the stock image on the sdcard for flashing via CWM.
is there another way i can get this working, maybe via fastboot or via ODIN so i can return my friends phone.
Thank you.
Hi I had this problem to, mine was from a bad flash / bad firmware.
First I suggest http://forum.xda-developers.com/showthread.php?t=2284670 better recovery.
After from recovery
select factory reset, wipe cache, and from advance wipe dalvic cache.
then select mount usb, copy to card slim bean 3.1.0 http://www.slimroms.net/index.php/downloads/dlsearch/viewdownload/465-crespo/2505-slim-ns-3-1-0-official plus gaps http://www.slimroms.net/index.php/downloads/dlsearch/viewdownload/461-addonsfullpackages-412/2501-aio-addons, flash them in this order.
After first boot and config u can use http://www.wugfresh.com/nrt/ to write the OEM firmware.
Sorry this didn't work because nothing can be written to system and the sdcard is still not able to mount
Sent from my GT-N7100 using xda app-developers app

Reset lockscreen security on GoClever Tab r76.2

Hello, I get just today a GoClever Tab r76.2 to reset the forgotten pin from the locksreen. Device was used mainly for Pou and Facebook, so there was no root, no usb debugging, my PC was not set as trusted device, just like from the store with PIN set. Installed system is Android 4.1
Because it took me whole morning and I found a lot of answers that "it cannot be done, you have to factory reset" I want to show you my steps to make this process easier for people in need. This method shouldn't erase any data from your device but always remember to have a backup
It is based on the following tutorial: http://forum.xda-developers.com/showthread.php?t=2601933 , but still it was not enough for me so I want to provide more details.
Step 1.
The very important thing is to install drivers for the device. To make this process the easiest I get my old, good Asus netbook with Windows XP installed. You can install it also on VirtualMachine, it is not very mandatory but my next steps will be based on this configuration.
There is a need for two types of drivers: Rockchip drivers to flash the memory and ADB Drivers.
1.1) Rockchip drivers can be found in the thread linked above, I am providing mirror at the bottom of this thread. Just doubleclick on the exe, accept the risk and install, that's all for now.
1.2 ADB drivers are provided in the second package attached. To install adb drivers go to recovery.
To switch tablet to the Recovery Mode you have to switch it off (not reboot), turn it on, just when the BootScreen will appear tap Vol+ until you will see opened Android Robot with exclamation mark. What's interesting, when you double click Vol+ this time you can switch to Android Recovery menu and factory reset the device
In device manager (Win+R, type: devmgmt.msc and press ENTER) install drivers for Tab r76 device manually, by providing direct location to the .ini file from the folder.
Leave tablet in Recovery.
Step 2.
People from some Russian Android forum prepared package with pre-configured adb for rockchip devices. Just download attachment 2.1, extract it, install, open Command Line and "cd" to directory with adb.exe, very useful.
Step 3.
Now we will root the device and install CWM. Download file from the attachment 3.1, unzip it and run "RK29Update.exe", don't click any button (especially the one called "Erase", it will brick your device), don't change any setting, your tablet will be not found at the moment. This package belongs to the author of the original tutorial.
Step 4.
In command line enter "adb devices" to check if your tablet is visible, you should see something like "0123456789ABCDEF recovery", if yes enter "adb reboot bootloader" and press enter. Tablet will reboot, the screen will remain black, system will install the Rockchip driver, RK29Update.exe will find the device (IF NOT just reboot to recovery again and reboot to bootloader from adb again, driver installation might interrupt this process), press Run button in the application it will flash the device with root patch and CWM, device will reboot to CWM recovery.
Step 5.
Download attachment nr 5.1 (original source: http://forum.xda-developers.com/showthread.php?t=2437946) and put the zip to the SD card (card has to be compatible with the device - most secure solution is having FAT32 filesystem), put it to the tablet, install zip from external source (not sdcard, it's internal memory).
After reboot of the device ("restart system now" option in main page of CWM) your device should welcome you without screen locked by any security possible and your settings should remain untouched.
From now everybody should be able to reset it's PIN in the easy way Have fun
CC: You are allowed to copy this tutorial anywhere, mirror the links also, but please leave a link to the original thread.

How To Root Ematic EGP008 Tablet (And possibly other RK3066 Devices)

Hey fellow Ematic EGP008 Tablet owners! This is an fairly easy tutorial on how to install a custom recovery and root your tablet! As always, there is a slight risk of "bricking" your device. I take no responsibility what so ever.
Note: This was tested on my personal Ematic EGP008 tablet, which uses the Rockchip rk3066 chipset. It may work on other devices using the same chipset, but no guarantees. If this your first time doing something like this, please use the XDA Forums (or Google) to do research or ask if there's no answer to your question.
Now, lets begin! We will need the following items:
* The Device
* A good working USB cable
* A computer with Ubuntu OR Ubuntu in a virtual machine
* Download "android-tools-fastboot" & "android-tools-adb" from Ubuntu package manager
* Download rkflashkit https://github.com/linuxerwang/rkflashkit
* Download ClockworkMod: http://crewrktablets.arctablet.com/?wpfb_dl=682
* SuperSU: https://forum.xda-developers.com/apps/supersu
If you have everything listed above, we can continue. First, if you haven't backed up your personal data (pictures, music, SMS, contacts, etc) from the device, now would be the time. Then, when you are ready, have your device on and plugged in to your computer's available USB port. Have your device's USB Debugging enabled and it should be plugged in to an external power source (NOT running on the battery alone).
Now, before we get going, we'll need to do somethings. Take the compressed file you downloaded called: rkflashkit-master.zip. Extract it somewhere you'll remember. Open that extracted folder and open a terminal in that directory (usually right-click) and type: "./waf debian" (without the quotes). It should create a new file: rkflashkit_0.1.5_all.deb. You can close out that terminal. Install this package and then launch it from your menu launcher. *Note: Make sure you have installed "python-gtk2." When launching rkflashkit, it will ask you your password; type your password in and hit enter. You will now see a window with no device information. That's OK, just leave that window open.
Now were ready to get the device ready for flashing. Get terminal running. Type in: adb reboot-bootloader . The device should now reboot into "bootloader mode". In the case with my tablet, the screen remains black. That's normal. Check the rkflashkit window... it should now show an available device and the dialog window (to the right) should have some basic information in it. *Note: It is HIGHLY recommended to backup ALL partitions before flashing ANYTHING!* When your finished backing up everything (again, recommended), click on the drop down arrow under "NAND Partitions" label and select "Recovery" (with some numbers/letters behind it). To flash the image that you downloaded (Oma_RK30_3.0.36+_CWM_6.0.3.1.7z), extract it (anywhere). Then head back over to the rkflashkit window and click the "Choose" button. Browse for the "recovery.img" file (you may need to back out to root ( / ) and navigate to the "home" folder and then your profile name to find it). Once you found it, highlight it and click "OK". *Make sure you are flashing the RECOVERY partition* Now just flash the image by clicking "Flash image". It will ask if you what to do this; click yes. It will flash the image and then verify it. The dialog box will let you know when the operation is done. To continue on with rooting the device, click "Reboot Device" (do NOT disconnect anything at this time).
The device should have booted into the operating system without any issues. Now we need to install SuperSU to give us root privileges. Mount the device as storage so the file we need can be copied to it. Copy the file you downloaded (it's a .zip file) from SuperSU on XDA to the root directory of the android device (do not extract it... leave it as is). Turn "off" storage once the file is copied over (but still leave the USB cable plugged in the computer). Return to your terminal (for adb commands) or start a new terminal. Type in: "adb reboot recovery" (without the quotes). Hit enter and the device should reboot into recovery.
The new recovery you just flashed a little while back is touch-compatible (drag your finger up or down and use the power button to "enter" sub-menus OR use a USB keyboard hooked up using an OTG adapter). Before beginning, it is wise to make a backup of your system (in case you need to restore it); scroll down to "Backup and Restore" and press the power button briefly (or enter on USB keyboard). Then select "Backup" and let it do it's work. When it it finished backing up, select "Install zip from sdcard" from the main menu; then choose "choose zip from sdcard". Scroll till you have highlighted the SuperSU zip that you copied over from the computer. Press the power button (or hit enter on USB keyboard); it will ask if you are sure you want to install this zip... scroll down to "Yes" and press the power button (or Enter) again. It should install without errors. Now navigate back to the main menu and reboot the device.
You should now be rooted! Double check that SuperSU is installed and use a root checker if in doubt. Now you can start using apps that need a rooted OS and debloat your stock system (BE CAREFUL... REMOVING THE WRONG APPS COULD LEAVE YOU WITH A SEMI-BRICKED DEVICE or NON-FUNCTIONING OPERATION SYSTEM). Have fun! Let me know how things went and even though I'm not a developer of any kind, I will try to do my best to help anyone. I'm not always online (I have a life, you know ), so don't take it personally if I don't reply in a timely fashion. Now, go enjoy your newly rooted device!
I would like to thank the following for making this tutorial possible:
- Crew RKTablets: Custom Recovery
- SuperSU Release: SuperSU rooting tool
- linuxerwang: rkflashkit tool
- Canonical Ltd.: Ubuntu Operating System

[GUIDE] UNLOCKING, DOWNGRADING TO A10, TWRP, ROOT

Hello,
I'm posting this guide for those (like me) who can't do without TWRP on their device.
I'm providing only a step-by-step explanation. Credits to @nikamura for his kernel and TWRP: https://forum.xda-developers.com/t/twrp-3-4-0-0-for-sunfish-testing.4179101/
Credits to @Zackptg5 for his guide, from which I've started: https://forum.xda-developers.com/t/guide-unlock-root-safetynet-for-pixel-4a.4153773/
Credits to @topjohnwu for Magisk: https://github.com/topjohnwu/Magisk
DISCLAIMER: I don't take any responsibility if your phone explodes or anything... The guide is provided as is.
FIRST STEP: UNLOCKING THE BOOTLOADER
Download USB drivers for your phone here: https://androidfilehost.com/?fid=8889791610682922010
Download SDK Platform-Tools for Windows here: https://developer.android.com/studio/releases/platform-tools
Extract the SDK Platform-Tools to a directory of your choice.
Open your command prompt, change directory to where you extracted the Platform-Tools and type "fastboot". Depending on your Windows setup (I'm a linux guy, so I've used an ancient win8.1 installation in a VM...) you might receive a message of a missing dll (api-ms-win-crt-convert-l1-1-0.dll): if so, download and install the Universal C Runtime from https://support.microsoft.com/en-us...-windows-c0514201-7fe6-95a3-b0a5-287930f3560c
If you try the "fastboot" command once more, it should now work.
On your phone go to system settings -> About phone -> tap on 'Build number' several times until Developer Options is enabled.
Back out into settings and go to System -> Advanced -> Developer Options -> Enable 'OEM Unlocking'.
Switch off the phone.
Boot into fastboot by holding Vol Down + Power.
Plug the phone into a usb port of your pc.
In your command prompt type "fastboot devices". If there is no output, it means you have to install the USB driver. So, open "Device Manager" on your pc, right click on your Pixel 4A (should be on top of the list with a yellow exlamation mark) and update the driver choosing the USB drivers you previously downloaded. In Device Manger you should now read "Android Bootloader Interface", with no exlamation mark.
Now back to the command prompt, "fastboot devices" should now output a string with "fastboot" written next to it.
Now type 'fastboot flashing unlock' -> Follow prompt on the device to unlock the bootloader (note that this will FACTORY RESET the device).
The bootloader is now unlocked! You can now safely reboot (or it reboots on its own, I don't actually remember).
Note that after you unlock the bootloader you will see a reminder for a few seconds every time you reboot, reminding you that the phone is unlocked. That's normal and we have to live with that, as far as I know.
SECOND STEP: USING THE FACTORY IMAGE TO DOWNGRADE TO ANDROID 10
At present, TWRP is not available for Android 11. So we have to downgrade.
Download A10 factory image (version qd4a.200805.003) here: https://dl.google.com/dl/android/aosp/sunfish-qd4a.200805.003-factory-fac7c08d.zip
If you are paranoid like me, check the SHA-256 checksum of the download with some freeware hashing tool. The SHA-256 checksum should be: fac7c08d3d4cb92078fbcdbcc7e80fc4c438612a1a004d3d12814f51928458f3
Extract the files contained in the downloaded archive into the folder where your fastboot.exe is. To be clear, flash-all.bat should be in the same folder as fastboot.exe.
Place your phone in fastboot mode (Vol Down + Power).
Connect your phone to your PC.
In your command prompt type "fastboot devices" to make sure there is proper connection.
Double click "flash-all.bat".
The phone is going to reboot a few times. Just wait patiently until you read "Press any key to exit..." in the command prompt.
You've now downgraded to Android 10!
THIRD STEP: FLASHING A CUSTOM KERNEL AND TWRP
A custom kernel is needed for TWRP to work, because the stock kernel comes with no LZMA support. Just download the kernel provided by the same developer of TWRP (@nikamura): https://drive.google.com/file/d/1nuXc88t0Iokc0ha-AicOtZEUeGCGwQ-R/view?usp=sharing
And download TWRP, obviously: https://drive.google.com/file/d/1PZaU9PpYmdcAHlyi0zhNwEGnBsAHDW_E/view?usp=sharing
Place both the kernel and TWRP where your fastboot.exe is.
Note that since you just used the factory image you have to boot Android 10 at least once and run the first boot wizard, before you can flash the kernel and TWRP. Also, turn on "USB debug" in Developer Options (see "FIRST STEP" for how to reach Developer Options).
Now, connect your phone to your PC.
In your command prompt type "adb devices". Follow prompt on your phone to permanently allow the adb connection to your pc.
Type the following commands (without quotes):
"adb reboot bootloader"
"fastboot flash boot TKernel-sunfish_V0.1.img"
"fastboot reboot bootloader"
"fastboot boot sunfish_twrp201017-test5.img"
The phone should now boot into TWRP on-the-fly, but it's not been flashed yet.
Place TWRP file on your phone with the following command:
"adb push sunfish_twrp201017-test5.img /sdcard/"
Now in TWRP go to "Install" > "Install Image" > "sunfish_twrp201017-test5.img" > "Install recovery ramdisk" > Swipe.
Now back to the home of TWRP > "Reboot" > "Recovery".
The phone should now boot into TWRP! And this time it's properly installed (not just sideloaded).
You can now reboot into Android 10.
FOURTH STEP: ROOTING WITH MAGISK
Now, you need to grab your current boot image. To do this, boot into TWRP (Vol UP + Power) > "Backup" > flag only "Boot (64MB)" > "Options" tab > unflag "Enable compression" > "Backup" tab > Swipe.
Reboot to Android 10.
Disable "Automatic System Updates" in Developer Options.
Connect phone to PC.
If you browse your phone, in /sdcard/TWRP/BACKUPS/xxxxxxxx/xxxxxxx/ there will be a file named "boot.emmc.win". That's your boot image and you can rename it "boot.img". It should weigh exactly 64MB.
Download Magisk Manager apk (credits @topjohnwu): https://github.com/topjohnwu/Magisk/releases/download/manager-v8.0.7/MagiskManager-v8.0.7.apk
Copy Magisk Manager apk to your device.
Install Magisk Manager apk.
Open Magisk Manager. My locale is not English, so the following commands might slightly differ from what you will see, but still they should be easy to understand. Select 'Install' (Magisk) -> 'Select and Patch File' -> select your boot.img file -> 'Go!' -> it'll output the patched boot image to your Download folder.
Copy the magisk_patched_xxxxxx.img from Download folder to your pc, where your fastboot.exe is.
In your command prompt type:
"adb reboot bootloader"
"fastboot flash boot magisk_patched_xxxxxx.img"
"fastboot reboot bootloader"
You're now rooted!
Enter recovery to make sure TWRP is still working.
Reboot system.
Check in Magisk Manager the resulting installed version of Magisk is 21.4 (=rooted).
This worked great for me - thank you for the post!
Why would you patch the boot.img via Magisk Manager when you can just flash the Magisk v21.4 zip in TWRP?
I;m still confused AF why you would Patch the Boot.img with a working TWRP.img?
BTW: Are you passing safety net, not that it matters, but i figured i'd would on stock Android 10 at least....
Moto_Fan said:
Why would you patch the boot.img via Magisk Manager when you can just flash the Magisk v21.4 zip in TWRP?
Click to expand...
Click to collapse
Yes, that should supposedly work the same, although not personally tested.
Moto_Fan said:
I;m still confused AF why you would Patch the Boot.img with a working TWRP.img?
BTW: Are you passing safety net, not that it matters, but i figured i'd would on stock Android 10 at least....
Click to expand...
Click to collapse
Before flashing TWRP you need custom kernel.
Safetynet is ok, at the moment. Just need to flash this Magisk module: https://github.com/kdrag0n/safetynet-fix/
nor-ric said:
Yes, that should supposedly work the same, although not personally tested.
TESTED AND WORKED PERFECTLY!!!
Before flashing TWRP you need custom kernel.
Safetynet is ok, at the moment. Just need to flash this Magisk module: https://github.com/kdrag0n/safetynet-fix/
Click to expand...
Click to collapse
Yea, I already found out about the module, and it did indeed work and passed safety net after cts profile failed.
Now on too Pixel 4a #2 ON android 12 PDP1, too ROOT or NOT to ROOT??? We'll find out soon enough i guess???
nor-ric said:
Hello,
I'm posting this guide for those (like me) who can't do without TWRP on their device.
I'm providing only a step-by-step explanation. Credits to @nikamura for his kernel and TWRP: https://forum.xda-developers.com/t/twrp-3-4-0-0-for-sunfish-testing.4179101/
Credits to @Zackptg5 for his guide, from which I've started: https://forum.xda-developers.com/t/guide-unlock-root-safetynet-for-pixel-4a.4153773/
Credits to @topjohnwu for Magisk: https://github.com/topjohnwu/Magisk
DISCLAIMER: I don't take any responsibility if your phone explodes or anything... The guide is provided as is.
FIRST STEP: UNLOCKING THE BOOTLOADER
Download USB drivers for your phone here: https://androidfilehost.com/?fid=8889791610682922010
Download SDK Platform-Tools for Windows here: https://developer.android.com/studio/releases/platform-tools
Extract the SDK Platform-Tools to a directory of your choice.
Open your command prompt, change directory to where you extracted the Platform-Tools and type "fastboot". Depending on your Windows setup (I'm a linux guy, so I've used an ancient win8.1 installation in a VM...) you might receive a message of a missing dll (api-ms-win-crt-convert-l1-1-0.dll): if so, download and install the Universal C Runtime from https://support.microsoft.com/en-us...-windows-c0514201-7fe6-95a3-b0a5-287930f3560c
If you try the "fastboot" command once more, it should now work.
On your phone go to system settings -> About phone -> tap on 'Build number' several times until Developer Options is enabled.
Back out into settings and go to System -> Advanced -> Developer Options -> Enable 'OEM Unlocking'.
Switch off the phone.
Boot into fastboot by holding Vol Down + Power.
Plug the phone into a usb port of your pc.
In your command prompt type "fastboot devices". If there is no output, it means you have to install the USB driver. So, open "Device Manager" on your pc, right click on your Pixel 4A (should be on top of the list with a yellow exlamation mark) and update the driver choosing the USB drivers you previously downloaded. In Device Manger you should now read "Android Bootloader Interface", with no exlamation mark.
Now back to the command prompt, "fastboot devices" should now output a string with "fastboot" written next to it.
Now type 'fastboot flashing unlock' -> Follow prompt on the device to unlock the bootloader (note that this will FACTORY RESET the device).
The bootloader is now unlocked! You can now safely reboot (or it reboots on its own, I don't actually remember).
Note that after you unlock the bootloader you will see a reminder for a few seconds every time you reboot, reminding you that the phone is unlocked. That's normal and we have to live with that, as far as I know.
SECOND STEP: USING THE FACTORY IMAGE TO DOWNGRADE TO ANDROID 10
At present, TWRP is not available for Android 11. So we have to downgrade.
Download A10 factory image (version qd4a.200805.003) here: https://dl.google.com/dl/android/aosp/sunfish-qd4a.200805.003-factory-fac7c08d.zip
If you are paranoid like me, check the SHA-256 checksum of the download with some freeware hashing tool. The SHA-256 checksum should be: fac7c08d3d4cb92078fbcdbcc7e80fc4c438612a1a004d3d12814f51928458f3
Extract the files contained in the downloaded archive into the folder where your fastboot.exe is. To be clear, flash-all.bat should be in the same folder as fastboot.exe.
Place your phone in fastboot mode (Vol Down + Power).
Connect your phone to your PC.
In your command prompt type "fastboot devices" to make sure there is proper connection.
Double click "flash-all.bat".
The phone is going to reboot a few times. Just wait patiently until you read "Press any key to exit..." in the command prompt.
You've now downgraded to Android 10!
THIRD STEP: FLASHING A CUSTOM KERNEL AND TWRP
A custom kernel is needed for TWRP to work, because the stock kernel comes with no LZMA support. Just download the kernel provided by the same developer of TWRP (@nikamura): https://drive.google.com/file/d/1nuXc88t0Iokc0ha-AicOtZEUeGCGwQ-R/view?usp=sharing
And download TWRP, obviously: https://drive.google.com/file/d/1PZaU9PpYmdcAHlyi0zhNwEGnBsAHDW_E/view?usp=sharing
Place both the kernel and TWRP where your fastboot.exe is.
Note that since you just used the factory image you have to boot Android 10 at least once and run the first boot wizard, before you can flash the kernel and TWRP. Also, turn on "USB debug" in Developer Options (see "FIRST STEP" for how to reach Developer Options).
Now, connect your phone to your PC.
In your command prompt type "adb devices". Follow prompt on your phone to permanently allow the adb connection to your pc.
Type the following commands (without quotes):
"adb reboot bootloader"
"fastboot flash boot TKernel-sunfish_V0.1.img"
"fastboot reboot bootloader"
"fastboot boot sunfish_twrp201017-test5.img"
The phone should now boot into TWRP on-the-fly, but it's not been flashed yet.
Place TWRP file on your phone with the following command:
"adb push sunfish_twrp201017-test5.img /sdcard/"
Now in TWRP go to "Install" > "Install Image" > "sunfish_twrp201017-test5.img" > "Install recovery ramdisk" > Swipe.
Now back to the home of TWRP > "Reboot" > "Recovery".
The phone should now boot into TWRP! And this time it's properly installed (not just sideloaded).
You can now reboot into Android 10.
FOURTH STEP: ROOTING WITH MAGISK
Now, you need to grab your current boot image. To do this, boot into TWRP (Vol UP + Power) > "Backup" > flag only "Boot (64MB)" > "Options" tab > unflag "Enable compression" > "Backup" tab > Swipe.
Reboot to Android 10.
Disable "Automatic System Updates" in Developer Options.
Connect phone to PC.
If you browse your phone, in /sdcard/TWRP/BACKUPS/xxxxxxxx/xxxxxxx/ there will be a file named "boot.emmc.win". That's your boot image and you can rename it "boot.img". It should weigh exactly 64MB.
Download Magisk Manager apk (credits @topjohnwu): https://github.com/topjohnwu/Magisk/releases/download/manager-v8.0.7/MagiskManager-v8.0.7.apk
Copy Magisk Manager apk to your device.
Install Magisk Manager apk.
Open Magisk Manager. My locale is not English, so the following commands might slightly differ from what you will see, but still they should be easy to understand. Select 'Install' (Magisk) -> 'Select and Patch File' -> select your boot.img file -> 'Go!' -> it'll output the patched boot image to your Download folder.
Copy the magisk_patched_xxxxxx.img from Download folder to your pc, where your fastboot.exe is.
In your command prompt type:
"adb reboot bootloader"
"fastboot flash boot magisk_patched_xxxxxx.img"
"fastboot reboot bootloader"
You're now rooted!
Enter recovery to make sure TWRP is still working.
Reboot system.
Check in Magisk Manager the resulting installed version of Magisk is 21.4 (=rooted).
Click to expand...
Click to collapse
Would like to go this route for reasons you have stated above. Have a few questions:
1: If you use normally use Linux why did you use a Windows VM rather than simply do all operations in a Linux terminal?
2: After the above transition will SU required programs such as Titanium Backup and Adaway install and function as they have in the past? I had previously rooted current P4a and neither of the above programs would install?????
3: Will SuperSuperuser be installed under this environment?
I have rooted several devices in the past using varied methods and things seem to have changed drastically since my previous Nexus 6p
Thanks
CarlInMO said:
2: After the above transition will SU required programs such as Titanium Backup and Adaway install and function as they have in the past? I had previously rooted current P4a and neither of the above programs would install?????
Click to expand...
Click to collapse
I did the above steps and titanium backup, root explorer and other root apps work great.
CarlInMO said:
3: Will SuperSuperuser be installed under this environment?
Click to expand...
Click to collapse
You will NOT use a separate SU app - Magisk has a built-in SU interface that will pop-up and grant SU permission when an app asks for it - just like the old SU app used to do.
JohnC said:
I did the above steps and titanium backup, root explorer and other root apps work great.
You will NOT use a separate SU app - Magisk has a built-in SU interface that will pop-up and grant SU permission when an app asks for it - just like the old SU app used to do.
Click to expand...
Click to collapse
Thanks for the quick response, again!!! I like this phone but it looks at this point as if it has a rather small following here. Are you using the stock build or have you moved on to a custom ROM?
CarlInMO said:
Thanks for the quick response, again!!! I like this phone but it looks at this point as if it has a rather small following here. Are you using the stock build or have you moved on to a custom ROM?
Click to expand...
Click to collapse
Using stock android 10 image from google because TWRP and Edxposed are stable with android 10, not 11.
And what happens to root & TWRP after upgrade back to Android 11. I assume installed apps continue to operate OK
TWRP has now been modded and is working with A11! Details in the TWRP thread!

Categories

Resources