ME176C/CX detailed guide on dual-booting linux - MeMO Pad 7 General

Greetings,
i did go through dual-booting linux on our device kind of process and spend a bit of time, trying to figure out the correct steps.
Was not easy, for a newbie like me, i dont know much about linux itself, most of the inscrutions are written in "foreing language" for me, so here is more of a detailed guide.
This guide is only for installation on the SDCARD, i did not try out internal storage
!!! Im not responsible for anything that happens during/using these steps, you and only you are responsible to what happens, use with caution !!!
Requirements:
Unlocked bootloader: https://forum.xda-developers.com/t/...6c-boot-for-asus-memo-pad-7-me176c-x.3780225/
Installed TWRP: https://forum.xda-developers.com/t/...p-3-3-1-for-asus-memo-pad-7-me176c-x.3745190/
Both of these guides are made step by step, so there should be no questions about this
First of all, go to https://images.postmarketos.org/bpo/v22.12/asus-me176c/ , there are 3 different types of UI, the kernel itself should be the same, but i dont know for sure myself
Phosh - very well working on our device, missing a bit of RAM to launch firefox stable for example
Plasma-mobile - i found this one was very hardware heavy, it takes quite alot of more storage aswell, i do not recommend this for our device
Sxmo - this one did boot up just fine, but i wasnt able to get more testing as my hardware inputs were not recognized by the software, i do not recommend this one
There are multiple software version, i did try only the latest one
Possible to try out the lower (outdated) versions yourself
After downloading these files, you should have 2 of the .xz archives, unpack them somewhere, i did put them into the same folder, but thats just my own preference
After unpacking them, you should have
XXX-asus-me176c-bootpart.img
XXX-asus-me176c.img
XXX are reference to date of the build
To have ourself things easier, we will rename both of these build and leave only the "asus-me176c.img/asus-me176c-bootpart.img", you can leave them named as theyre, but it will take you a bit more time in the terminal
After that, we will move one of our images (the non-bootpart one) to the internal storage of the device.
Make sure, to have enough space available. I have the 8GB version and it was kind of struggle for me to install the plasma-mobile version.
I did also try moving that file to USB-OTG and SDCARD, but i had some problems with USB-OTG in TWRP and SDCARD gets wiped when you install the OS.
So, please, use internal storage for the file, the OS IS NOT GOING TO GET INSTALLED ON YOUR INTERNAL STORAGE IN THIS WAY, WE ARE GOING TO INSTALL IT ON A SDCARD.
After moving our file to the internal memory, we will go and reboot our tablet to fastboot mode
when powered off, press volume down + power on, release power when screen lights up
in the custom bootloader menu, using volume keys (power one does not work), we select Fastboot (power down to move and power up to select)
Our phone should boot into fastboot mode, we go and connect our phone to the computer
after connecting the phone, we go to the folder where our xxx asus-bootpart.img is located, go ahead and SHIFT+RIGHTCLICK on empy space in the folder, select Open a terminal/powershell window here
in the terminal/powershell we type in command " fastboot flash APD asus-me176c.img "
let the command process, after its done, go and type in " fastboot reboot-bootloader "
our phone gets rebooted into the bootloader, with volume keys once again, select RECOVERY
when our device gets booted to TWRP, go to Mount -> Tick ESP
anywhere on your PC, open up the default text editor, paste in:
title postmarketOS
volume 80868086-8086-8086-8086-000000000007
linux /vmlinuz-edge
initrd /intel-ucode.img
initrd /initramfs
# Comment this out to get more output on screen while booting
options console=null
this text is only used for the latest version of the OS, for lower versions, please follow https://wiki.postmarketos.org/wiki/ASUS_MeMO_Pad_7_(asus-me176c)
select the file type as "every files" instead of text document
name it pmos.conf and save it anywhere you like
at your computer, download MiniDiskPartition tool, or other partition tool
partition your sdcard using the selected tool
i have 32GB sdcard, i did partition my sdcard roughly 8GB with FAT32 for file sharing between android/linux/windows and the rest with EXT4 for the Linux itself
i believe the partition size for Linux doesnt matter aslong as its over 4GB, the installation itself should resize the partition on sdcard itself, depending on how it needs, BUT im still not 100% how this works
connect your phone to the computer
in TWRP go to MOUNT and tick ESP
in the folder where you saved the pmos.conf, open up a terminal (once again SHIFT+RIGHTLICK and open terminal/powershell here)
type in " adb push pmos.conf /esp/loader/entries/ " , press enter
in TWRP go to Advanced and go to Terminal
type in " df "
then you should see your partitions, we are looking for one that belongs to /external_sd/ , usually dev/block/mmcblkX0Y (X and Y are not specified), it should have it written at the end
mine was " /dev/block/mmcblk0p1 " YOURS CAN BE DIFFERENT! in the original guide, they specify, it can be also SDXY (XY belongs to any number)
after we find our partition that belongs to /external_sd/ , we go into the terminal in TWRP and type in:
dd if=/PATHTOYOURIMGFILE/ of=/PATHTOYOUREXTERNALSDCARDPARTITION/ bs=4m
i did have the IMG file in my internal storage, therefore my command was:
dd if=/sdcard/asus-me176c.img of=/dev/block/mmcblk0p1 bs=4m
make sure to use the bs=4m instead of bs=4M (as specified in the original guide), otherwise you will get "illegal number" error
after this, you should wait! The file is 1,6 - 2,4 GB, it takes time
your result should appear in the terminal
if your installation was succesfull, you can go in TWRP to REBOOT and select BOOTLOADER
you should have postmarketOS option available in the bootloader boot options, select it
you should boot your postmarketOS now
if you didnt, you probably didnt follow the guide correctly, read the steps once again
if you couldnt install the postmarketOS and youre sure you did follow the steps correctly, contact me on XDA (preferably make a comment under this thread)
Original thread:
ASUS MeMO Pad 7 (asus-me176c) - postmarketOS
wiki.postmarketos.org

Related

For All sdcard issues

09/01/2012:
this tutorial may work for those who are having encryption issues on ics or jb roms (the error is related to mmcblk0p2(data))
well, after some months of work, here´s an tutorial about how to fix the mostly common sdcard issues.
1º Of all :***Be sure of what you´re doing,or else you can corrupt the partition table of you sdcard/brick your phone,and I´ll not be responsible of it***
2º-Do Not send me PMs, post here so everyone that have the same problem can now how to fix it.
3º-If you are an starter, you can post here your questions,but be sure that you haven´t found answers on Google or other threads.
and 4º-Read ALL topic before start and try one solution than the other,they´re in order of difficulty and risk of get an "permanent" brick.
0 - Always backup your EFS folder, maybe its not related to this thread but it´s also very important to remember.
I -If you have a folder called "voodoo" in your sdcard, you may have voodoo enabled on your ROM, so be sure of disabling it before trying a new rom or a stock rom.
if you´re on another rom already and having problems in mounting partitions, try to flash you last rom or a kernel that supports voodoo and it´s compatible with your new rom.
II-If you´re getting problems in mounting DBDATA,Download a full rom that contains DBDATA to flash with odin(or only flash dbdata,but you´ll have to do a full wipe later). To see if it haves dbdata.rfs by opening your .tar file in 7zip or others.
III-If you´re getting Can´t mount data (dev/block/mmcblkl0p2) File exists, try to flash an kernel with voodoo suport,if it still the same, format data in the menu of your recovery.
IV-If you´re getting can´t mount sdcard (/dev/block/mmcblk0p1)File exists, try to access it via ADB and send pull file command to recover your files(must have root),if you could do that, so try to format it via recovery.If not work,Download gparted, burn it on cd (it´s an CD with a tool of linux) and go to ADB shell to run this command:
su
echo /dev/block/mmcblk0 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file
now
reboot your PC in gparted and format mmcblk0p1(it´s the first partition) in FAT32.
Done
V-If you´re getting cant mount sdcard (/dev/block/mmcblk0p1) with (invalid argument) You can try the fix IV and see if it works,if not, proceed to VI.
VI-If you´re getting cant mount data(dev/block/mmcblk0p2) or can´t mount sdcard (/dev/block/mmcblk0p1) with (invalid argument) or (no such file or directory) you may have to do this:
***search on google for 'fdisk' commands first***
You MUST*¹ remake your partition table manually,so the phone have the /data partition back to boot.
*¹
In some cases you can use gparted to do this, without doing it manually,
you shoud only mount mmcblk0 before.
you can run this command line on adb shell to mount it:
echo /dev/block/mmcblk0 > /sys/devices/platform/s3c-usbgadget/gadget/lun1/file
You Will have to format it and it MUST have the partitions as said below.
YOU SDCARD MUST HAVE THE FOLLOWING PARTITION TO BOOT ON AND RECOGNIZE INTERNAL SDCARD:
/dev/block/mmcblk0p1
AND
/dev/block/mmcblk0p2
Start:
Open ADB,comnect your phone and proceed.
run adb shell
su
fdisk /dev/block/mmcblk0
p (you should see your partition table,POST HERE BEFORE CONTINUING)
YOU ARE NOW ABOUT TO REMAKE YOUR PARTITIONS:
partition 1 will correspond to mmcblk0p1(SDcard) and partition 2 will correspond to mmcblk0p2 (DATA)
**DO ONLY AS I SAY HERE, UNLESS YOU MAY GOT I/O ERROR ON YOUR SDCARD AND ITS ALL OVER. I say because it happened to me and i had to dissolder the internal sdcard an use only the external.**
**********IF YOU DONT HAVE ANY IDEA OF LINUX COMANDS: DO NOT PROCEED !!!!!!!!!*************
tap on adb:
n (will create a new partition)
1 (partition number)
press enter on keyboard so it selects the first block
get a calculator and estimate the size of the partition 1.IT MUST HAVE around 2GB left.
write the block number you got in calculator(BE SURE OF WHAT YOU TAPE HERE)
t
b (partition 1 is done and formatted as fat 32)
Now again:
n
2
enter on keyboard
enter again so it select the last block
(DO NOT TYPE COMMAND "T" FOR PARTITION 2, IT BY DEFAULT SET TO LINUX EXT FORMAT)
p (you will see you new partition table)
****IT MUST HAVE 2 partitions, partition 1 is in fat 32 format and partition 2 is in linux format(AND MUST HAVE AROUND 2GB)****
w (IT WILL WRITE YOU NEW PARTITION TABLE ON YOU SDCARD,SO BE SURE IT's ALL CORRECT)
Done,
now tap:
q
fdisk /dev/block/mmcblk0
p (you should see your new partition table, if ok reboot your phone, flash an stock rom for vibrant (I sugest an T959UVJFD ROM only to correctly format your partitions),root it,backup it,and enjoy,You can put a custom rom if you want so.)
If You have an error That does not appear here and you think it may me related to you sdcard just ask. In one or two days I or others developers may post here a possible solution.
Thanks For Google and some XDA users who indirectly helped me doing this.
You can try Paragon Hard Disk Manager in place of gparted
but remember: mmcblk0p1 is FAT32 and mmcblk0p2 in EXT2 (in truth it´s not EXT2, its in rfs, but the stock rom T959UVJFD is the only that I have absolute sure that will do the conversion).
Sorry for my bad english, it´s not my native language.
Great post doiiido!
Hay doiiido, you have been thanked and this post has been added to the [REF][KERNEL] ✰ The Official Vibrant Kernel ßible Thread ✰ → 07/05/12.
Great post!
News
Original pos by: ferhanmm
link to it:
http://forum.xda-developers.com/showthread.php?t=1665123
[FIX] Data wipe error or Can't mount /dev/block/mmcblk0p1
Data wipe error, Can't mount /dev/block/mmcblk0p1, or Vibrant screen boot loop even after flashing stock odin JFD phone will not boot. Phone will only boot Eugenes JK2 but internal and external storage will still list as corrupted and Lists 0.00 MB in storage.
Internal storage has been destroyed, I’ve been able to fix a phone using this technique to be mostly working. The external SD card will always have to be in the phone for this to work.
1. Partitioning the MicroSD Card
Get an 8gb(or larger) micro sd card. Class 10 would be better here. Put it into a Card Reader, then run Gparted.
Gparted (usb method is easiest) - http://gparted.sourceforge.net/liveusb.php
Using Gparted, delete everything else and create 2 partitions and :
6000mb FAT32 as PRIMARY
1607mb(remainder) Reiser as PRIMARY
2. Flash to Stock
Open up Odin flash stock JFD with pit file and repartition checked.
After phone boots completely, power off.
3. Flashing CM9
Take MicroSD out of phone an put it in pc, then copy update.zip, GAPPS, Cyanogenmod Rom all to the FAT32 partition that we created earlier. In Windows it should show up where all of your drives are listed in.
update.zip (https://www.dropbox.com/s/ju5eg5ernxcaqpt/update.zip),
GAPPS (http://www.goo-inside.me/gapps/gapps...317-signed.zip)
CyanogenMod Rom Zip(http://download.cyanogenmod.com/get/...mtd-signed.zip)
Enter recovery mode with volume buttons and power.
Reinstall packages twice.
Install zip from sd card select update-cm-9-20120520-nightly-vibrantmtd-signed.zip phone will boot loop on vibrant screen so take out the battery then enter recovery a second time installing the cm9 update again.
Then flash Gapps zip the same way.
When phone boots up camera, and gallery will not work until the next step.
4. Edit Vold.Stab file
Downlad ES File Explorer from play store.
Hit Menu button, settings, Check box for Root Explorer, Check box for mount file system, check box for Up to Root
Press Up once, you should now be at "/"
Open system directory, open etc directory, scroll to bottom and select Vol.fstab, select Text, Select ES Note Editor, update text to the following:
#internal sdcard dev_mount emmc /mnt/sdcard 1 /devices/platform/s3c-sdhci.0/mmc_host/mmc0
#external sdcard dev_mount sdcard /mnt/emmc auto /devices/platform/s3c-sdhci.2/mmc_host/mmc2
After edits, click back and click yes to save changes. Exit out of es file explorer and restart phone. Post results:
Should work with any version of CM9, newer nightlies would obviously be preferred. Will make more detailed guide soon.
Credit to these guys for providing the solution -
http://www.youtube.com/watch?v=zdMhYYdMB08
http://forum.xda-developers.com/show....php?t=1447303
Samsung Vibrant
News
Original post by:
draikz
Link to original post:
http://forum.xda-developers.com/showthread.php?t=848737
** [GUIDE] FIX AND RESCUE YOUR VIBRICK + ODIN SUPPORT! N00b Friendly **
Fixing so-called "Bricks"/Odin Errors
This guide is open to contribution/editing/correcting
I DO REALIZE THAT MOST OF THESE LINKS ARE BROKEN, PLEASE SCAN THE THREAD TO FIND UPDATED LINK. I'M NOT VERY ACTIVE ANYMORE, SORRY!
-----------------------------------------------------------------------------------------------------
BOOT CYCLE
This is where you get the annoying Samsung Screen/Galaxy S screen.
DOWNLOAD REQUIRED (CREDITS TO JUSTANOTHERCROWD):
Quote:
Originally Posted by justanothercrowd
JFD ODIN Images from Samsung (PDA)
www.justanotherdev.slackdev.com/T959UVJFD.tar
MD5:632730f6b637f53e5b10e5cbc8b966a7
512 PIT File (PIT Extract first!)
www.justanotherdev.slackdev.com/s1_odin_20100512.rar
MD5:b5628c8e183fdd8f4c703321ca40e33a
ODIN
www.justanotherdev.slackdev.com/Odin3.rar
ALL 3 Files plues the root update.zip
http://tinyurl.com/2bc5b6r
thx to KopyKatKiller
1. Get into Download Mode (WITH THE PHONE PLUGGED IN) by following the steps below
*Turn off the phone until you get to the charging battery screen (keep in mind, your phone is currently PLUGGED IN)
*Press volume up and down, and power all at once.
*As soon as the screen turns black, release your power button.
2. Unplug phone from USB
3. Open Odin (in Administrator if you're running W7 or Vista), try one of the ones I attached to this post, at least one of them is bound to work, some don't work for me, but works for others, some doesn't work for others, but works for me, whatever floats your boat
4. Load in the files into Odin that you have downloaded from above Just load in the files corresponding to the text field.
DO NOT CHECK REPARTITION.
5. Plug in your phone with the DL mode
6. Click start and wait for the magic
-----------------------------------------------------------------------------------------------------
NO-BOOT PHONES
This is where your phone does NOT turn on, no combo of buttons works and power button does nothing.
DO THIS ONLY WHEN YOU PLUG IN YOUR PHONE AND NOTHING SHOWS UP ON THE SCREEN!!! If else, follow the steps from above.
This method is basically same as above, EXCEPT the way you get into Download Mode as your phone is HARD BROKEN.
1. Download all the files required in the "BOOT CYCLE" section of this post.
2. Remove everything from your phone (SD card, sim, battery).
3. Plug your phone into your computer WITHOUT the battery, as you have already taken it out in the last step.
4. Press and HOLD vol. up and vol. down.
5. As you are HOLDING these buttons, reattach your battery.
6. You should be in Download Mode.
7. Unplug phone from USB
8. Follow steps 4-8 from the "BOOT CYCLE" section.
Troubleshooting:
-Odin stuck at some random process?
*Switch to another odin
*Make sure you did NOT check repartition, if you did, just repeat all the steps over again, except for the downloading parts, obviously.
-Phone not responsive?
*Try "NO-BOOT PHONES"section of this guide
-Phone stuck at Galaxy S logo screen?
*Put it in to DL mode, and run Odin again, it's just a bad install.
-All three ODIN is nonfunctional, stuck or giving "FAILED" errors?
*DO NOT CLOSE ODIN ONCE IT HAS FAILED!
*Unplug your phone
*Replug in your phone, get it into DL mode
* Unplug once it is in DL mode
*Replug and ODIN should recognize your phone
*Leave all the settings the same, then click "Start" again.
-Cannot get into download mode using the method I listed? Use the method(s) below:
Soldering Method
More methods coming soon
-----------------------------------------------------------------------------------------------------
I know how much of a pain posting in the Q/A section can be and the wait time is pretty bad, so if you need help regarding UNBRICKING and ONLY UNBRICKING feel free to post in here.
Hope you enjoy, this is my first guide, please don't flame. Any comments or suggestion is suggest, or if you have your own method I'll also post it
POST YOUR RESULTS!
-Steven
The only forums this guide should be posted on is XDA, DZ, and PHANDROID under the username DRAIKZ and EXPLOSIVE. If it helped you, feel free to donate a coke or two!

[Guide] Ultimate Nexus 4 Root Guide

Post One: Unlocking and Rooting
Post Two: Installing Roms / Kernels / Tweaks
Post Three: Panic Section / FAQ / Miscellaneous
Unlocking The Bootloader And Obtaining Root
*This part of the tutorial is geared towards Windows users. The MAC instructions are very similar, from what I understand. Install the package the same way. All ADB/Fastboot commands may need to start with "adb-mac" (no quotes) rather than "adb" (no quotes). Due to the vast amount of Linux distros available; instructions will vary for your device. Once ADB/Fastboot are set up all command will begin with "./adb" (no quotes) rather than "adb" (no quotes). Once ADB/Fastboot are set up; this guide is relevant to everyone.*
Time required:
20-40 minutes.
Setting up ADB for our device:
Download the AndroidSDK onto your computer.
Note: Google changes their mind every other week as to if this will be distributed as a .zip or an .exe. If you get an .zip file, simply extract the contents to your C:\ drive. For an .exe install it like you would any other program, but set the path directly to the C:\ drive when the installer asks.
Or...you can use this page to download the "ADB for Dummies AIO App."
This will automatically install ADB for you to your C:\ directory. It's very very simple this way.
If your platform-tools folder doesn't have a fastboot.exe, place this fastboot.exe file in your C:\android-sdk-windows\platform-tools (or possibly simply called tools, if you set up ADB ages ago) folder.
Now you have ADB installed! Congratulations.
Unlocking the Bootloader:
***NOTE***
This will perform a factory reset on your device. You will lose all applications. Even the data on your SD Card! I'd recommend making a Backup to your computer BEFORE performing this. There is a method for backing your data up, detailed HERE.
For the time being, there is a method available that will allow you to unlock your device (and root it) without losing your data.
For instructions, click HERE. Please note: this is a hack and isn't the "conventional" and "accepted" way of unlocking your bootloader on a nexus device. The wipe requirement is there for your safety, really, and I'm certain this will be patched in the upcoming releases.
Get the drivers:
Uninstall any previously attempted drivers if they don't work and move to the next.
Option One:
Navigate to the "Device Manager" (Control Panel > Device Manager) in Windows and Select the android device. Open the properties and select the "Install Driver" option. Pick the driver with "Install from disk." Ignore any warnings about the driver not being signed properly.
PDAnet's drivers may work if the above options don't. Simply install PDAnet (after uninstalling any previous attempted driver installations) to get the drivers.
While that is downloading, on your Nexus 4: turn USB debugging on.
To do so; you must first go to Settings>About>Build Number and click seven times.
The actual setting can then be found in Settings>Developer Options>USB Debugging
Once the drivers are installed, navigate to the C:\android-sdk-windows\platform-tools folder on your computer.
Hold shift and right click. Select "Open Command Window Here."
Plug your phone into the computer. Now in this command window type:
Code:
adb reboot bootloader
(Hit Enter)
Your phone should now boot into a screen with a green android with his chest exposed.
Type this:
Code:
fastboot oem unlock
(Hit Enter)
If your Command Prompt displays the message "waiting for device" your driver wasn't successfully installed.
Close the Command Prompt window and open Device manager while your phone is still plugged in. (Search for it using the search option).
Right Click the "Android" option and select Update Driver. Choose to "Browse My Computer" and "Let Me Pick From A List." Pick the Driver with the newest date and install it. Now retry the code above.
Your phone will ask if you want to unlock it. Select "Yes" by using the volume keys and use power to select it.
Now, navigate to "Recovery Mode" with the volume keys. Use power to select.
A screen with another Android will pop up. Press Volume Up and Power at the same time.
Select Factory Reset. This process may take a few minutes. Be patient and let it work.
Once finished, select "Reboot."
Your phone is now unlocked!
Obtaining Root Access and Custom Recovery:
Turn on USB Debugging.
To do so; you must first go to Settings>About>Build Number and click seven times.
The actual setting can then be found in Settings>Developer Options>USB Debugging
Download the following:
SuperSU (CWM .zip)
CWM (Pick the version for your device)
Place the recovery-clockwork-VERSIONNUMBER-mako.img file into your C:\android-sdk-windows\platform-tools folder.
Put the SuperSU.zip on your phone.
Open another Command Prompt if it isn't still open. (Navigate to C:\android-sdk-windows\platform-tools and shift + right click. Select "Open Command Window Here.")
With your phone plugged in type:
Code:
adb reboot bootloader
(Hit Enter)
And wait for your phone to boot into the android again.
Now type:
Code:
fastboot flash recovery IMAGENAME.img
(Change the file name to the correct file name and Hit Enter)
Once that is finished: select the "Recovery Mode" option again on your phone.
You should get a new recovery menu here. Select "install zip from sd card" and "choose zip from sd card."
Find the SuperSU.zip that you transferred earlier and select "Yes" to installing.
Navigate back to "Reboot" and reboot your phone.
You're now rooted!
However, ClockworkMod Recovery won't continue to load after this.
To fix this, find "Rom Manager" from the market. (The free version is fine.) Use the "Flash ClockworkMod Recovery" option.
If your recovery still doesn't stick around after a reboot, you have another couple options. Find a file explorer that allows root access, such as Root Explorer. Use this program to rename /system/etc/install-recovery.sh to /system/etc/install-recovery.bak. You'll need to mount the system as r/w to do this. Root Explorer provides a button at the top to do so.
Or, you can do this completely manually by firing up ADB again and running a few commands:
Code:
adb shell
(Hit Enter)
Code:
su
(Hit Enter)
Code:
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
(Hit Enter)
Code:
mv /system/etc/install-recovery.sh /system/etc/install-recovery.bak
(Hit Enter)
Congratulations!
Your phone is now unlocked, rooted, and has a custom recovery!
Continue reading the next posts for info on getting custom roms, kernels, tweaks, and more!
***I take no responsibility for what happens to your phone due to following this guide! That being said, not only am I sure you'll be fine...but there are an endless amount of users who would be glad to help if you need it.***
Thanks:
Google, for making Android a reality.
VanillaTbone, for the ADB AIO app.
Efrant, for posting about a bootloader locking utility without USB.
ClockworkMod team, for being a part of making our phones as awesome as they are.
The assorted developers, who continue to push out amazing material for us to use.
The awesome community, for endlessly supporting both Android itself and its users.
Installing Custom Roms Kernels and Tweaks
All of the instructions below require your bootloader to be unlocked. Please follow the guide above and return here when you're done.
Backing Your Files Up:
Time required:
15-25 minutes.
Making a Nandroid
The first thing you're going to want to do is back up your phone's entire system. This is done by making a "nandroid."
To do this, boot into ClockworkMod Recovery. To accomplish this: Turn your phone off. Once it is completely off: hold both volume buttons and the power button until the Android with his chest exposed is displayed. Navigate to the "Recovery Mode" option and select "backup."
This will take some time. Be patient and let it finish. This process is important! You should always have a recent nandroid available on your device.
Backing Your Data Up
Install Titanium Backup from the market.
Open Titanium Backup. A Superuser request should pop up. Allow it. Note: if Titanium Backup then says it failed to obtain root access; press the menu button and select more>reload application.
Press menu>batch. Select "Backup all User Apps." Select all and "Run the Batch Operation."
Let the process complete. This may take quite some time: depending on how many applications you have installed.
You can now backup your Text Messages, Bookmarks, and WiFi addresses with Titanium Backup as well.
Press Menu>Backup Data To XML to do so.
Backing Your Contacts Up
Note: This process may or not be useful to you. The Google servers should automatically import any contacts you have stored back whenever you install a new rom. Also note that Facebook/Google+/etc contacts will need to be synced again through their respective applications.
Open the Contacts application.
Press the Menu button.
Select import/export.
Export to storage.
Installing A Rom (Or Kernel/Radios/Tweaks/Themes/etc.)
Time Required:
5-10 minutes.
Note:
Follow the guide above about backing your phone up before attempting!
This guide will also work for flashing kernels/radios/themes/tweaks/etc. Simply ignore the part about wiping data and wipe whatever the thread says you should. You only need to restore data after a rom install.
Find a Rom You'd Like To Try:
Nexus 4 Original Development
Nexus 4 Development
Download the rom you'd like to try on your device.
Most roms also require you to install "gapps" as well.
You can find the correct ones for the rom you're using in the rom thread.
Make sure the Rom and Gapps are on your SD card.
Now, open Google Wallet (if you have it installed) and press Options>Settings>Reset Google Wallet. This will prevent the "Secure Element" errors some users have experienced.
Boot into ClockworkMod Recovery by turning your device completely off. Hold volume up, volume down, and power until the green Android with the open chest is displayed. Navigate to "Recovery Mode" with the volume buttons and select using the power button.
Remember to have a recent nandroid before continuing!
Navigate to "wipe data/factory reset" and select it. Select "yes."
Wait for the process to complete. This may take some time. Be patient!
Once complete: Navigate to "Install Zip from SD card" and "Choose zip from SD card."
Find the rom's .zip and install it. Once that completes install any applicable gapps' .zip.
Select the "Reboot" option.
Congratulations! Your phone should now boot into the custom rom!
Follow the prompts to re-activate your phone.
Restoring Your Applications / Contacts / Nandroid
Time Required:
5-15 minutes.
Restoring Your Applicaions
Install Titanium Backup. Note: you may want the pro key. If you have it, you won't have to manually click "install" on each application. The process is completely automated. Open Titanium Backup (grant root access. If titanium says it failed to obtain root access, press menu>more>reload application). Press menu>batch>restore missing apps with data. Now, here you have a choice to make. Do you want a completely clean install? Select "app only" and run the batch operation (Deselect Google Wallet first. We don't want to risk restoring wallet in any way. Install it manually through the Play Store.). Do you want all of your application data (saved games/settings/etc)? Select "app+data" and run the batch operation (Deselect Google Wallet first. We don't want to risk restoring wallet in any way. Install it manually through the Play Store.). This MAY cause you problems or it may not. Personally, I often restore application data and seldom run into any trouble. If you do find that restoring data caused problems, follow the guide above to re-install your rom and restore without data. This process will take some time. Be patient (I'd suggest turning your screen off so the screen doesn't burn, but that's just me.) It will vibrate upon completion.
You can now restore your Text Messages, Bookmarks, and WiFi addresses if you backed them up by pressing Menu>Restore Data From XML.
Note:
Overclocking/CPU tweaking applications should never be restored with data. Simply deselect it from the list.
Facebook/Haxsync/Google+ may have problems restoring your contacts when installed through Titanium Backup. Simply uninstall and reinstall through the market (and be sure to log in and select to sync your contacts again).
Also, if you have NFC Task Launcher successfully launching Tasker tasks with your stickers: they may not immediately work.
Through my testing, it's as simple to fix as uninstalling NFC Task Launcher and Tasker. Restore Tasker first. Then restore NFC task launcher.
Restoring Your Contacts
If google fails to restore your contacts (not facebook/haxsync/google+/etc) you may import them manually if you backed them up.
Open the contacts application and press menu>import/export>import from storage.
Restoring A Nandroid
If your phone is acting funny or won't boot...restore a nandroid from a previous rom or working set-up.
You may also use a Nandroid to switch back to a previous rom if you decide you don't like the one you're on.
Do this by booting into ClockworkMod Recovery (hold volume up, volume down, and power while your phone is off and navigate to "Recovery Mode").
Simply select "restore" and find the most recent (or relevant) backup.
This process will take some time. Be patient and let it complete! Once done, select "Reboot."
Note:
Nandroids are stored in the "clockworkmod" folder on your SD card. They take up quite a bit of space. ALWAYS have at least one recent one on your SD card. However, since these are huge files: you may like to delete old ones to save space. You must delete backups by booting into CWM and navigating to Backup and Restore>Delete.
Important Notes About Restoration
I outline the method of using Titanium Backup above for a reason. Restoring system applications and data is the most common cause of problems on custom roms. For this reason, always ONLY restore "missing applications" from "user applications" that were backed up when restoring onto a new rom. Every time you restore system data or applications a narwhal sodomizes your favorite childhood cartoon. This is FACT.
Installing Alternate Custom Recoveries
If you find a custom recovery (such as the touch-recovery options) that came as a .img file:
Use these instructions to flash. Plug your phone into the computer. Open up ADB. Move the .img to the C:\android-sdk-windows\platform-tools folder.
Type the following:
Code:
adb reboot bootloader
(Hit Enter)
You can also manually boot to the bootloader by powering off and holding volume down, volume up, power buttons until the green Android with his chest exposed is displayed.
Then type:
Code:
fastboot flash recovery FILENAME.img
(Replace the file name with whatever the .img is called and Hit Enter).
Wait for the process to complete and reboot.
***I take no responsibility for what happens to your phone due to following this guide! That being said, not only am I sure you'll be fine...but there are an endless amount of users who would be glad to help if you need it.***
Panic Section! (Something is Wrong)
Q: My phone won't boot!
A: The easiest option is to get into recovery and restore a nandroid using the above guide (pull battery to put phone in an off-state if needed).
However, more advanced options are available if you don't have a nandroid available (You're naughty).
Do you have another rom .zip available on your SD card? If so, simply use the above guide for installing a rom to get you booting again.
If not, you can download one on your PC. Boot into fastboot (the green Android with open chest menu). Navigate to recovery and select it with the power button.
Move the .zip to the C:\android-sdk-windows\platform-tools folder.
Open ADB.
Change the NAMEOFZIP.zip below to the correct file name...and perform the action.
Code:
adb push NAMEOFZIP.zip /sdcard/NAMEOFZIP.zip
(Hit enter)
You may have to reboot recovery to get the file to show up. Now follow the guide above for flashing a rom to get you booting again.
Did you install a tweak that modified only a file or two on your phone? (Find this out by opening the .zip and looking in the folders (ignore META-INF). Good news! We MAY be able to recover you completely. If this doesn't work...you'll have to follow another method.
Get your phone into fastboot (the boot-menu that allows you to select recovery/reboot/etc). Navigate to Recovery. Start up ADB. Pull the files that were modified out of the stock rom's .zip (using whatever tweak you were installing as reference to find what was changed) that you're on into the C:\android-sdk-windows\platform-tools folder. Now we're going to push these files onto your phone...replacing the tweaked ones and hopefully getting you booted again. Use this code, but change the values of the file name and where it should reside. This is only an example!
Code:
adb shell
(Hit Enter)
Code:
su
(Hit Enter)
Code:
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
(Hit Enter)
This will mount your system so you can write to it.
Code:
exit
(Hit Enter)
This should exit shell and allow the use of adb commands again. You may need to type it a couple of times (until the #_ changes back to the platform_tools> prompt).
Code:
adb push framework-res.apk /system/framework/framework-res.apk
(Press enter after each file that you need to replace).
Note: This last option probably won't work. I'd just skip over it unless you're absolutely adamant about restoring your current setup and want to try everything possible.
Q: I want my SDcard files from my phone...but I'm in a situation where I need to flash stock images! This will erase my SD content. What can I do to save it?
A: Do you have a custom recovery installed? If not, download a custom recovery from post one in this guide and flash it using those instructions. You'll need to be in a custom recovery in order to obtain ADB access without booting your phone. Boot into recovery (With phone turned off: hold Power and Volume+ and Volume- until the bootloader pops up and navigate to "Recovery"). Run the command:
Code:
adb pull /sdcard/ /SDCARD/
(Hit Enter)
This will put all of your files into a folder called "SDCARD" in your C:\ drive. Keep in mind that this will take a LONG time. Maybe a couple of hours.
To restore once you're booting again:
Move the "SDCARD" folder you created from your C:\ drive to the platform-tools folder. *Then input:
Code:
adb push SDCARD /sdcard/
(Hit Enter)
Q: How do I make an "ADB Backup?"
A: An ADB Backup will backup your phones data (applications and their settings). Follow the guide HERE about ADB Backups.
Q: My phone gets really sluggish and often turns off or reboots on its own.
A: Without knowing anything about your situation...I'd say you either have severely bad data somewhere or some bad kernel tweaks. Use the rom install guide above, paying close attention to the part about backing up and restoring if you haven't already. In the case of a kernel problem, you're likely undervolting too low. Restore the stock kernel values and see if your problems subside.
Q: My phone screen won't turn on! This requires a battery pull to fix.
A: This is called a "Black Screen of Death" or BSOD. This is generally due to using a hotplug governor (one that turns cores off with the screen off) or possibly undervolting your device too low. Change governors or up your slots a bit.
Q: My phone is doing really weird things. Regardless of kernel/rom and even if I don't restore any data at all! Either that or I simply cannot boot up! My phone is possessed no matter what I do!
Download the stock IMAGES for your device and extract the files using 7-zip. Move all of the extracted files to your platform-tools folder. Open the flash-all.sh file with a text editor. Copy and paste the commands (one by one) and wait for each process to complete for continuing.
FAQ
Roms/Kernels
Q: What is the best rom?
A: The "best" rom is a matter of opinion. Do you like a certain customization and can't live without it? Use a rom that has that option.
Q: What is the best rom for battery life?
A: Roms themselves really shouldn't impact your battery all that much. They can have an impact, but if you're really looking for better battery I'd suggest swapping kernels or tweaking yours.
Q: What is the best rom for stability?
A: All of the roms out are "stable." They may have options that don't work correctly, but generally: this is user error. If you follow my advice on installing a rom, you'll end up with MUCH fewer bugs.
Q: What is the best kernel?
A: The best kernel is a matter of opinion. Some users may love one, while others swear by another. Find one you like and tweak it accordingly.
Q: How do I tweak a kernel for better battery?
A: Generally, you'll want to either change your governor and or undervolt and or underclock your kernel. This is done either by using SetCPU or similar apps, or with an option in your rom (usually labeled "performance" or something similar). Take note: extremely high/low voltages may cause instability. Never "set at boot" until you've thoroughly tested the options you've set. Testing includes low strain (like turning your screen off for an hour) and high strain (like playing a game for an hour) scenarios. To be extra safe: run the values for a couple days before setting them at boot. Follow the users ideas in the kernel's threads for some guidelines. However, remember that not all values will play nicely with all phones.
Miscellaneous
Q: Why isn't Google Wallet working at [store]?
A: I'm not sure if it's a Google Wallet problem, or a problem with the terminal. But I personally struggle to find a terminal that consistently works in my area. Something that has generally worked for me is to open wallet and go to Options>Reset Google Wallet. You must then re-add any cards you had.
Q: Does my ass look good in these shorts?
A: Yes.
Neat Ideas / How to Show Off the Nexus 4
-Get some NFC stickers. Tagstand has them available.
You can use these to make your phone perform certain tasks when you touch the sticker. Use NFC Task Launcher to define the tasks. These are capable of doing simple things like muting your volume to the more complex like turning on Tasker tasks that do things like auto-reply to text messages while you're at work.
-Do you have any suggestions? Submit them below!
***I take no responsibility for what happens to your phone due to following this guide! That being said, not only am I sure you'll be fine...but there are an endless amount of users who would be glad to help if you need it.***
ADB Backups:
SDcard backup:
Code:
adb pull /sdcard/ /sdcard/
(This will pull all of your sdcard contents to an "sdcard" folder in your C:\ directory)
Applications and their data:
Take note, that you'll need to be using CyanogenMod's method for setting up ADB to do this. The ADB AIO application installs an older SDK without this functionality. First, get your drivers installed (detailed in post one). Once you get ADB installed (post one), navigate to the C:\android-sdk-windows\platform-tools folder on your computer. Hold shift and right click. Select "Open Command Window Here."
Input this while your phone is turned on and USB Debugging is Enabled:
To do so; you must first go to Settings>About>Build Number and click seven times.
The actual setting can then be found in Settings>Developer Options>USB Debugging
Type this:
Code:
adb backup -apk -noshared -all -nosystem
(Hit Enter)
Your phone will ask for a password. Input one and remember it.
Once the process completes: continue with unlocking and rooting your phone.
Restoration:
Upon unlocking and rooting your phone: open up ADB again.
Enter this code:
Code:
adb restore backup.ab
(Hit Enter)
Input the password you saved to this file earlier, and wait for the restore to complete.
To restore your SDcard backup, first move the "sdcard" folder that was made in the backup process to your platform-tools folder.
Then run:
Code:
adb push sdcard /sdcard/
Do you have to install "ADB" ?
As far as like...clicking it and letting the windows installer install...no.
The exe file will read the commands in cmd without "installation."
Nice Work!
I've just added this guide to the Nexus 4 Complete Index
Sent from my GT-I9100 using xda premium
Great work!!! nice and clean reading!
Can this guide include information on how to re-lock bootloader and unroot the device? Does this informaiton exist?
I need to RMA my phone due to dead pixels and I want to make sure I dont have any issues with the warranty.
jayluke said:
Can this guide include information on how to re-lock bootloader and unroot the device? Does this informaiton exist?
I need to RMA my phone due to dead pixels and I want to make sure I dont have any issues with the warranty.
Click to expand...
Click to collapse
Post 3.
fastboot oem lock
Locks the device.
How long is the first boot, after unlocking the bootloader, supposed to take? Mine's sitting there for quite a while already. (I had a lot of stuff installed, but still, this is really long.)
EDIT: When rebooting the custom recovery, you have to say "yes" to the message it gives you, something about keeping some recovery. I had originally said no because I didn't flash it, I just booted it once.
I just got my nexus yesterday, and this isnt the first phone that I have rooted.... however... my settings on the thing are extremely basic..
How do I enable usb debugging if I dont have the option in the settings?
Thanks
Chris
---------- Post added at 03:19 PM ---------- Previous post was at 03:14 PM ----------
I just got my nexus yesterday, and this isnt the first phone that I have rooted.... however... my settings on the thing are extremely basic..
How do I enable usb debugging if I dont have the option in the settings?
Thanks
Chris
Edit: Got an app to enable it... still not in the menu though.
wizshaw said:
I just got my nexus yesterday, and this isnt the first phone that I have rooted.... however... my settings on the thing are extremely basic..
How do I enable usb debugging if I dont have the option in the settings?
Thanks
Chris
---------- Post added at 03:19 PM ---------- Previous post was at 03:14 PM ----------
I just got my nexus yesterday, and this isnt the first phone that I have rooted.... however... my settings on the thing are extremely basic..
How do I enable usb debugging if I dont have the option in the settings?
Thanks
Chris
Edit: Got an app to enable it... still not in the menu though.
Click to expand...
Click to collapse
Oh geeze!
I forgot.
Settings>about>version number I think...
Click 7 times to enable developer options.
Will update op soon.
Quick question: is there a reason the first post links to SuperSU version 0.98, when version 0.99 is the most recent? If version 0.99 has known issues with the Nexus 4, I don't want to use it on my device.
The 0.99 version came out after this guide was posted. I was offered to upgrade to the new version of supersu from 0.98 and so far no problem at all.
Does this work on the latest version of JB (4.2.1)?
When installing a new ROM it says to perform a factory reset through CWM, which will remove all apps and data but should keep all your pictures, videos, songs etc.
It doesn't mention to wipe the System partition as well. Is this not necessary when flashing ROMs on a Nexus?
Prior to owning the N4 I had the Galaxy S 2 and it was always stated in the OP instructions to wipe data/factory reset, wipe system, clear cache, clear dalvik and then flash ROM and Gapps.
However, I don't notice in any guides or instructions for N4 ROMS to wipe the system partition, just the data partition. Is there a reason for this or is it not necessary to wipe the system partition? Thanks. Great guide by the way.
Peace
thank u for ur effort
Chochiwpg said:
When installing a new ROM it says to perform a factory reset through CWM, which will remove all apps and data but should keep all your pictures, videos, songs etc.
It doesn't mention to wipe the System partition as well. Is this not necessary when flashing ROMs on a Nexus?
Prior to owning the N4 I had the Galaxy S 2 and it was always stated in the OP instructions to wipe data/factory reset, wipe system, clear cache, clear dalvik and then flash ROM and Gapps.
However, I don't notice in any guides or instructions for N4 ROMS to wipe the system partition, just the data partition. Is there a reason for this or is it not necessary to wipe the system partition? Thanks. Great guide by the way.
Peace
Click to expand...
Click to collapse
I actually have a question along these lines.
I just came from a LG G2X so things were different for me whenever I flashed ROM's/kernels. For one thing, I had an external sd card so whenever CWM made it's backups, they went to that automatically and I didn't have to worry about wiping since everything was on the external. This phone doesn't have an external so where do the backups go? From the looks of the new CWM 6.0.2.0, the backups (and blobs now apparently) go to /data/media/clockworkmod. Well I guess my question here is if you have to wipe /data for installing new ROM's, how would I restore a backup because they would have been deleted off the /data partition. I tried adb pulling /data/media/clockworkmod to my computer but it won't go. Don't know if it's because that partition is mounted while the phone is in use or what. I tried the mount/umount command that OP listed but it won't work for me. Don't want to flash ANYTHING on this phone until I know for a fact I can get to the backups that I'm creating.

Quick question on the guides to root the N7

I just got an N7 32GB tablet, very nice. I plan on rooting this device. Mine still on 4.2.1. What guide you guys recommend, both seem good so I'm undecided.
Thanks
Aut0botK1lla said:
I just got an N7 32GB tablet, very nice. I plan on rooting this device. Mine still on 4.2.1. What guide you guys recommend, both seem good so I'm undecided.
Thanks
Click to expand...
Click to collapse
Do you know how to use adb/fastboot ? if you know you can use that to easily root the N7.
Here's the link on how to use adb/fastboot to unlock and root the Nexus 7.
If not, then use this toolkit by following the link below:
http://forum.xda-developers.com/showthread.php?t=1766475
Download the program and install it.
After that, watch this tutorial first once and then start rooting with the toolkit.
http://www.youtube.com/results?sear...0.219.737.0j3j1.4.0...0.0...1ac.1.NbcxhPx0ZLs
IMPORTANT NOTE: You must unlock your Nexus 7's bootloader in order to proceed with the rooting process. As a result, everything in your tablet will be erased. So backup what you can and put it back later.
I would recommend using adb fast boot method, it is very simple if you follows it correctly, I will give you full instructions on how to unlock boot loader and root
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 8 GB nexus 7 wifi(codename "grouper") I will use TWRP with the name "openrecovery-twrp-2.3.1.0-grouper.img".
You can easily find the codename for your devoice by looking into Google
The custom recovery file differs for each device, please make sure you download the correct file
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-grouper.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-grouper.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.
If you experiences any problem, please reply and I will look into it.
Sent from my Nexus 7 using xda app-developers app
+ Above.
Way to wordy and not easy to follow
Basically:
Boot into recovery (yes i know you don't properly have one)
Get Android SDK from HERE
Once downloaded/installed.
Navigate to the "Platform-tools" folder, where you should see ADB/FASTBOOT
Hold shift, right click and "open command prompt here"
type fastboot devices
(if your device is listed, move on)
Unlock your bootloader
type fastboot oem unlock
Download THIS(supersu)
Download TWRP from HERE
Place the SuperSU download file on your SD CARD (Nexus has a virtual SD, place it there)
Place the recovery in the "Platform-tools" folder with your ADB/FASTBOOT files.
Reboot to fastboot again (Power and volume down)
fastboot devices
if listed continue:
fastboot flash recovery openrecovery-twrp-2.4.1.0-grouper.img
Reboot back into recovery (which should now be twrp) (POWER AND VOLUME DOWN)
Then from TWRP menu choose "Install"
Find the 2 files you downloaded and placed on SD card
Install them using TWRP.
Reboot
Profit.
Wilks3y said:
+ Above.
Way to wordy and not easy to follow
Click to expand...
Click to collapse
Well... I liked it... for a guy with only 2 posts to his/her name to explain (perhaps in TOO much detail) how to root takes b**ls:!
Keep it up, naman14... but be a little more judicious in what you include (and choose to exclude) in your walkthrou's.
Writing instructions is art in itself... and requires practice. Succinct and pithy is the way to go.
Rgrds,
Ged.
Thank you all, the last thing i ever rooted was my sprint htc hero a yr or so ago

Adoptable Storage and Root SM-G935T -- Having issues

I dont know if the T-Mobile version of the s7 Edge just doesn't work with this root or I have some isolated issue. Anyways when I flashed the boot file it doesn't boot and stuck on the t-mobile screen.
Then I format the OS and it loads then I enabled adoptable storage stuff crashes and again it wont boot.
Try starting from scratch. There are plenty of posts detailing how to do this.
Here is what I did:
1) Back everything up
2) Boot into recovery (Power+Home+VolUp)
3) Factory reset
4) Boot to Download mode (Power+Home+VolDown)
5) Connect to computer and flash stock PD8 firmware via Odin (links are all over)
6) Wait until phone loads set up screen
7) Boot into recovery (Power+Home+VolUp)
8) Factory reset
9) Wait until phone loads set up screen, then minimally set up phone - i only added Google account, i did not add Samsung account
9.1) Now is a good time to install certain apps that don't like root - like SnapChat​10) Boot to Download mode (Power+Home+VolDown)
11) Connect to computer and flash custom bootloader via Odin (links are all over)
12) Wait for phone to load, then connect to computer
13) Browse to where you put the root package, hold SHIFT and right click, then select "Open command window here"
14) Run root.bat (part of the root package) and phone will restart
15) After phone loads, there are a few tweaks that can be done (you can search for these)
15.1) If running slow, download kernel modifier and change to interactive/ondemand governor​15.2) Disable samsung/knox packages (lists can be found in root threads)​16) NOW YOU ARE ROOTED!
17) For adoptable storage, connect to computer and run adb (how to do this is everywhere)
18) In adb, type:
Code:
adb shell
Then run the following, which will output a name of a disk, such as "disk:188,3"
Code:
sm list-disks
Then run the following, but put in your disk name for DISKNAME and for METHOD, put the way you want your storage set up (private makes the whole microSD adopted, mixed ##[/] splits the microSD by a percentage so if ## is 50, then it is split 50/50 adopted and external, or public which makes it all external (WARNING, THIS WILL DELETE ANYTHING ON THE CARD, SO BACK IT UP FIRST):
Code:
sm partition DISKNAME METHOD
For example, i did mine full adopted, so i ran the following:
Code:
sm partition disk:188,3 private
snpalavan said:
Try starting from scratch. There are plenty of posts detailing how to do this.
Here is what I did:
1) Back everything up
3) Boot into recovery (Power+Home+VolUp)
4) Factory reset
5) Boot to Download mode (Power+Home+VolDown)
6) Connect to computer and flash stock PD8 firmware via Odin (links are all over)
7) Wait until phone loads set up screen
8) Boot into recovery (Power+Home+VolUp)
9) Factory reset
10) Wait until phone loads set up screen, then minimally set up phone - i only added Google account, i did not add Samsung account
10.1) Now is a good time to install certain apps that don't like root - like SnapChat
11) Boot to Download mode (Power+Home+VolDown)
12) Connect to computer and flash custom bootloader via Odin (links are all over)
13) Wait for phone to load, then connect to computer
14) Browse to where you put the root package, hold SHIFT and right click, then select "Open command window here"
15) Run root.bat (part of the root package) and phone will restart
16) After phone loads, there are a few tweaks that can be done (you can search for these)
16.1) If running slow, download kernel modifier and change to interactive/ondemand governor
16.2) Disable samsung/knox packages (lists can be found in root threads)
17) NOW YOU ARE ROOTED!
18) For adoptable storage, connect to computer and run adb (how to do this is everywhere)
19) In adb, type:
Then run the following, which will output a name of a disk, such as "disk:188,3"
Then run the following, but put in your disk name for DISKNAME and for METHOD, put the way you want your storage set up (private makes the whole microSD adopted, mixed ##[/] splits the microSD by a percentage so if ## is 50, then it is split 50/50 adopted and external, or public which makes it all external (WARNING, THIS WILL DELETE ANYTHING ON THE CARD, SO BACK IT UP FIRST):
For example, i did mine full adopted, so i ran the following:
Click to expand...
Click to collapse
Can this be done from the phone with a terminal app?
noobiedev83 said:
Can this be done from the phone with a terminal app?
Click to expand...
Click to collapse
You can try running the sm commands from terminal. When i tried it, it wouldn't work - it just gave an error. But theoretically, it should :fingers-crossed:
snpalavan said:
Try starting from scratch. There are plenty of posts detailing how to do this.
Here is what I did:
1) Back everything up
3) Boot into recovery (Power+Home+VolUp)
4) Factory reset
5) Boot to Download mode (Power+Home+VolDown)
6) Connect to computer and flash stock PD8 firmware via Odin (links are all over)
7) Wait until phone loads set up screen
8) Boot into recovery (Power+Home+VolUp)
9) Factory reset
10) Wait until phone loads set up screen, then minimally set up phone - i only added Google account, i did not add Samsung account
10.1) Now is a good time to install certain apps that don't like root - like SnapChat​11) Boot to Download mode (Power+Home+VolDown)
12) Connect to computer and flash custom bootloader via Odin (links are all over)
13) Wait for phone to load, then connect to computer
14) Browse to where you put the root package, hold SHIFT and right click, then select "Open command window here"
15) Run root.bat (part of the root package) and phone will restart
16) After phone loads, there are a few tweaks that can be done (you can search for these)
16.1) If running slow, download kernel modifier and change to interactive/ondemand governor​16.2) Disable samsung/knox packages (lists can be found in root threads)​17) NOW YOU ARE ROOTED!
18) For adoptable storage, connect to computer and run adb (how to do this is everywhere)
19) In adb, type:
Code:
adb shell
Then run the following, which will output a name of a disk, such as "disk:188,3"
Code:
sm list-disks
Then run the following, but put in your disk name for DISKNAME and for METHOD, put the way you want your storage set up (private makes the whole microSD adopted, mixed ##[/] splits the microSD by a percentage so if ## is 50, then it is split 50/50 adopted and external, or public which makes it all external (WARNING, THIS WILL DELETE ANYTHING ON THE CARD, SO BACK IT UP FIRST):
Code:
sm partition DISKNAME METHOD
For example, i did mine full adopted, so i ran the following:
Code:
sm partition disk:188,3 private
Click to expand...
Click to collapse
Lol where is step two.
Frostkitty97 said:
Lol where is step two.
Click to expand...
Click to collapse
whooooops, fixed
snpalavan said:
whooooops, fixed
Click to expand...
Click to collapse
Lol

*UPDATED**UNLOCK TOOL (4-2019) for ALL Versions of BLU R1-HD

BLU R1-HD bootloader unlock script tool, and TWRP install tool.
Download is a zip file, unpack it to somewhere you will remember. Run the dirty-cow-tool.bat // mtk-su-tool.bat
The included files and folders are set to hidden, in effort to keep them safe from accidental delete.
Must have adb+fastboot + drivers installed and setup prior to using tool
Easiest method to install adb + fastboot on windows is with "15 second adb + fastboot install TOOL"
LINK==>ADB+FASTBOOT
It is for windows
In linux :
"sudo apt-get install android-tools-adb"
"sudo apt-get install android-tools-fastboot" Some fastboot commands were missing when i used this one ie "fastboot flashing get_unlock_ability"
"sudo apt-get install fastboot" worked better when I tried. ( i used that command as a check before doing the unlock, so it was needed only for that check)
Using Tool
On Windows?
Unzip the downloaded file to a new folder, open new
folder and click on "dirty-cow-tool.bat". // "mtk-su-tool.bat"
Do the steps in order (1-2-3-4) to be unlocked, then
Step (5) to get to second page where step (1) is root
The rest is optional
On Linux?
Unzip downloaded file to new folder folder .
Open folder. Then open R1-Linux-tool-v2 folder
Open terminal from that folder and type
" . R1-HD-TOOL.sh "
Same order of steps (1,2,3,4) step (5) for extra
Steps (1 on second menu) for superSU root.
Second menu steps (2,3,4,5,6,7,8) are optional.
**Linux Note**
The tool uses "fastboot flashing get_unlock_ability" as one of the methods to check before doing the unlock.
The version of fastboot that installed with "apt-get install android-tools-fastboot" did not recognize
this command. But "apt-get install fastboot" updated some version and then the command was recognized.
******OTHER NOTES****
--- this has been mentioned in the general thread and the modified v17 thread, but It has come up again so I wanted to make note of it.----
--- The newest blu versions (V7.4.2 and V17) Have made changes to "toolbox" and this effects things like "adaway" and "titanium backup"
--- The suggested fix is to install busy-box. I have had success with the version from play store, some prefer to use f-droid version. Either one will do. Install it and open the app. From in the app you need to do an install.
CHANGE LOG
V1:. Initial release : removed
V2:. : fixed typos preventing proper function
V3:.: switch file verification to md5 check instead of "ls-l" comparison.
V4: current version: add extras page, add SU flash, de-bloat script, Added Fm Radio, Added pre-loader roll back
V5: Fixed wrong loop "goto" line that made preloader rollback do "MTK_BLU Debloat v2" instead
V6: Added manual pause to script for mods that need recovery (Extra's 5) . Added redundent recovery flash command .
Few reports of recovery "not Sticking" and needed to run the flash commands manually one by one. Maybe the redundent
flash will make it survive. If still having problem with recovery "staying install" try manually flashing
here is link to the steps needed. FLASH RECOVERY
V7 Improved logs Added line to make batch run as sub-process so if error occurs , will not close
V7.1 : Updated the fm radio install zip and include the needed selinux mode changer app
V8: fixed dependency of needing to be unzipped to location w/o spaces in name. (when used from location with spaces, tool used to fail to push needed files).
.. added more time to allow dirtycow to "spawn" its root shell. Recent testing has shown sometimes it takes longer than the 60 seconds allowed in the script. Now it is looped 3 times.
V9 Added full path to abd push lines for recovery flash files. included fastboot.exe file to address some version issue where user s version would not output text file I coded into script for a verification ( included file is called by script, no need to do anything different with it)
V10: Moved zip file to included folder to help preserve locations when unpacked, added device check before running tool; So tool not used on wrong device, Rearranged order of operations on extra's page. (recovery installed options) Push files while in android before rebooting to recovery( should improve reliability for multiple reports of not automatically installing options for some)
******I have received some reports that some devices are reporting "ro.build.product =R1_HD and not "BLU_R1_HD" like mine, so the added device check is blocking tool from starting If this happens to you , you can make edit to the .bat file like below.
Change this line
Code:
:next_check
find "BLU_R1_HD" "%~dp0workingproduct.txt"
To this
Code:
:next_check
find "R1_HD" "%~dp0workingproduct.txt"
it is line #23
V11: Updated device model verification lines
MTK-SU: Replaced all dirty-cow part with New MTK-SU binary(elf) from @diplomatic
source
Click to expand...
Click to collapse
Credits to @Diplomatic for his work on the Mtk_su that I used used to make this tool work again after Dirty-Cow was patched.
DOWNLOAD LINK
Preferred to use the Downloads tab of this thread.
Archived downloads on android file host also == link
XDA:DevDB Information
R1-HD Dirty-cow Unlock Tool, Tool/Utility for the BLU R1 HD
Contributors
mrmazak, vampirefo for his recovery, lopestom for his recovery, emc2cube for his debloat zips, christianrodher for his dirtycow method,
Source Code: https://github.com/mrmazakblu/DirtyCow-R1_HD
Version Information
Status: Testing
Current Stable Version: V11
Stable Release Date: 2017-04-11
Current Beta Version: MTK-SU
Beta Release Date: 2019-04-14
Created 2017-02-22
Last Updated 2019-04-18
Reserved
Items planed to be addressed in next release:
--Add few more file integrity checks to the extra's page
--Add copy log to clipboard option so it is easier to post log entry if needed-------*********----already-_added to github copy of batch file
--Add a verification step that checks what recovery is installed( to prevent trying to do steps on extra's page with stock recovery)
--Possibly move to a "fastboot boot recovery" instead of "adb reboot recovery" for the same reason as above
--Add wget or similar to the extra's items so initial "TOOL" size is smaller (not that 40-50MB is big, but to some it may be )
--Add additional "selinux mode changer apk" for fm radio install rather than just the note that says it needs to be found.
Reserved
Works great on OEM 6.6, thanks for the tool!
So I got the one-click-root.sh done, maybe. Can some linux users go over it, make sure I didn't do anything stupid? I don't exactly have a device to check it with atm, and I am not pro with scripting, barely novice, so it is a pretty basic conversion of the batch file. Still, it might work . Just would like a few eyes on first.
https://github.com/theredbaron1834/Scripts/blob/master/one-click-root.sh
Also, I looked at dirty-cow-tool.bat. However, wow, more an advanced batch file, and I am not sure what the first half does, so not sure how to convert . However, it seems if anyone does get it, the eqiv of goto for linux is funtions. simple cheatsheet:
Code:
function stuff {
echo "this stuff is run via the function"
{
stuff #goes to stuff and runs function
theredbaron1834 said:
So I got the one-click-root.sh done, maybe. Can some linux users go over it, make sure I didn't do anything stupid? I don't exactly have a device to check it with atm, and I am not pro with scripting, barely novice, so it is a pretty basic conversion of the batch file. Still, it might work . Just would like a few eyes on first.
https://github.com/theredbaron1834/Scripts/blob/master/one-click-root.sh
Also, I looked at dirty-cow-tool.bat. However, wow, more an advanced batch file, and I am not sure what the first half does, so not sure how to convert . However, it seems if anyone does get it, the eqiv of goto for linux is funtions. simple cheatsheet:
Code:
function stuff {
echo "this stuff is run via the function"
{
stuff #goes to stuff and runs function
Click to expand...
Click to collapse
thank you for your input.
As far as the begining of the batch, It is adding a few folders to the "path" variable so help ensure the "adb push" commands find the files it is trying to push. Then it sets some folder "flags" to hidden so that the files the batch needs don't get accidentally moved or changed. Then the large section with mostly "echo" that is to set up the "simulated" G.U.I.
The lines of just "::::::::::" are simply used to help with reading the batch file. i use them to seperate functions. They are not needed.
The lines with only 2 "::" are standard windows comment / remark line entries
The lines with 1 ":" are the beginning line of the loop/ function == the line that "goto *" searches for
Does Works to unlock 7.4.2?
khyr said:
Does Works to unlock 7.4.2?
Click to expand...
Click to collapse
It is supposed to. It is the same base codes used from original script, and that one was confirmed to work. I Do not have first hand use of V7.4.2 so it is only confirmed through other users.
The dirty-cow being used has been patched by google in Dec but blu has not rolled out the patch. So there is no reason for it not to work.
edit:
I have the linux version ready.
-the first step, (ADB Push) is ready. including md5 file checks
-step 2 is ready= running dirty-cow with md5 check before final writing to mmcblk device
-step 3 is ready unlocking bootloader = including check if unlock is done, but need to fix the "unlock_adility" check
I can make to file to compare and grep the line needed, but cannot "sed" the extra information or do a > < comparison
-step 4 is ready .--flash twrp
Finished 90% of tool.
still need to tweek the log feature.
I ran tests on the lop back to menu and test ran
1. push files for dirty-cow and md5 check . then made push fail to verify the check method was valid ==pass
2. run dirty cow commands and md5 verification on resulting file. ==pass
3.unlock bootloader --- I ran it (needed to fake the already unlocked check) it works == pass
4 . flash twrp --installed both version i have, both install fine ===pass
5 extra menus -- ran . install su-----debloat---rebloat--- add fm radio--- preloader roll back =====all pass
(bootloader roll back needs manual intervention to re-enter fastboot during the boot loop that is unavoidable)
6. instruction ====not written yet
7. exit yes it closes == pass
8. logs --- needs completeing
I just loaded this on my OTA updated 7.4.2 device. I would note that the batch file does not actually create the /sdcard/Download folder so you might need to go into the terminal and actually create this on your sdcard... also worth noting that this batch file **requires** an sd card in the device to do any of the loads in the "5" menu.
torchredfrc said:
I just loaded this on my OTA updated 7.4.2 device. I would note that the batch file does not actually create the /sdcard/Download folder so you might need to go into the terminal and actually create this on your sdcard... also worth noting that this batch file **requires** an sd card in the device to do any of the loads in the "5" menu.
Click to expand...
Click to collapse
no it does not.
the /sdcard is the internal memory and the Download folder is already there.
you might be having issues but the folder is already part of normal system
mrmazak said:
no it does not.
the /sdcard is the internal memory and the Download folder is already there.
you might be having issues but the folder is already part of normal system
Click to expand...
Click to collapse
Fair enough, my restore didn't have /sdcard/Download and I made an assumption that /sdcard was my mounted card. Thanks for the insight.
OOPS
found typo on V4 of tool. batch files sets variables for "return", from loop functions. And two returns were set to same label9, so if you had tried to do extra's menu option #8. "ROLL Back Preloader" , instead it was running option # 5. " MTK_BLU Debloat v2"
fixed and still reading and re-reading to search for errors.
This looks bad.
The reason I put together this tool was I felt it was important to make a way to minimize the problems usually associated with android modifications. By making "typo's" a thing of the past, and I found them in my own script.
re-posted V5 combined with linux V2--
torchredfrc said:
I just loaded this on my OTA updated 7.4.2 device. I would note that the batch file does not actually create the /sdcard/Download folder so you might need to go into the terminal and actually create this on your sdcard... also worth noting that this batch file **requires** an sd card in the device to do any of the loads in the "5" menu.
Click to expand...
Click to collapse
I'm a total noob, and I'd like to know how to proceed with the supersu and all the other parts of step 5. Thank you
gabriel986 said:
I'm a total noob, and I'd like to know how to proceed with the supersu and all the other parts of step 5. Thank you
Click to expand...
Click to collapse
Ok. After you have completed upto twrp install. You can do the options on #5. It is all programed and automatic. What is does is put zip files onto the phone and reboots phone into recovery, then recovery installs them.
mrmazak said:
Ok. After you have completed upto twrp install. You can do the options on #5. It is all programed and automatic. What is does is put zip files onto the phone and reboots phone into recovery, then recovery installs them.
Click to expand...
Click to collapse
I get up to the recovery installation, but then I can not access such recovery on the phone, If I turn it on with power+vol up, it takes me to the default factory recovery by blu.
And If I try to the super su step with the phone on, it resets it, and get it to the screen with the dead android, while the script just shows the ADB DETECTED message.
In case it's needed, my R1 HD is running on
BLU_R0010UU_V7.4.2_GENERIC 09-11-2016 13:38
gabriel986 said:
I get up to the recovery installation, but then I can not access such recovery on the phone, If I turn it on with power+vol up, it takes me to the default factory recovery by blu.
And If I try to the super su step with the phone on, it resets it, and get it to the screen with the dead android, while the script just shows the ADB DETECTED message.
Click to expand...
Click to collapse
You missed a step in the process.
As tool finishes the recovery install it comes to a "pause" in the script, you need to hold the volume up button on phone "before" pressing button on pc keyboard to continue.
If phone does a normal reboot at this point then the system will replace the newly installed recovery with the stock one.
Giving you the situation you have now.
This step I cannot control, you must press volume button on phone to get the boot menu, and directly boot into recovery to ensure that the install sticks.
mrmazak said:
You missed a step in the process.
As tool finishes the recovery install it comes to a "pause" in the script, you need to hold the volume up button on phone "before" pressing button on pc keyboard to continue.
If phone does a normal reboot at this point then the system will replace the newly installed recovery with the stock one.
Giving you the situation you have now.
This step I cannot control, you must press volume button on phone to get the boot menu, and directly boot into recovery to ensure that the install sticks.
Click to expand...
Click to collapse
trying again....
for how long should I press the volume up key?
gabriel986 said:
trying again....
for how long should I press the volume up key?
Click to expand...
Click to collapse
When tool says Hold button , keep it held. Then continue the script. Phone should reboot to the boot menu. Then let go of volume
Some phones do not accept the fastboot reboot command, on those phones need to hold power to shut off. Then volume and power together to come on, release power when screen come on
mrmazak said:
When tool says Hold button , keep it held. Then continue the script. Phone should reboot to the boot menu. Then let go of volume
Some phones do not accept the fastboot reboot command, on those phones need to hold power to shut off. Then volume and power together to come on, release power when screen come on
Click to expand...
Click to collapse
ok.. trying again
---------- Post added at 02:00 PM ---------- Previous post was at 01:46 PM ----------
gabriel986 said:
trying again....
for how long should I press the volume up key?
Click to expand...
Click to collapse
it beat me!
I get stuck in that part of the process, If anyone uploads a video to check what i'm doing wrong, I'll be grateful.

Categories

Resources