What is the easiest way to delete everything on the device except bootloader?
There are several reasons someone might want to do this
The device was compromised and I want to be sure there is not a root kit installed
To guarantee there are all persona files are removed before reselling the device
So it's then possible to see exactly what effect flashing an image has - where does the img file go to?
To see which parts of the custom rom must be installed before installing a custom rom
I guess the process could be:
Boot into bootloader
Flash TWRP
Boot into recovery
Root device
Open terminal
Delete everything that is not recovery or bootloader
Verify that everything is deleted
Boot into bootloader
Flash stock rom
Raises a lot of questions:
Is there already a .sh script that deletes everything? if not, would it be a lot of recursive file and directory deletes?
How do I make sure I don't damage bootloader and brick the device?
How do I confirm everything is deleted? I guess it's not possible to do ls / and see no files or directories, because at least the ls executable must exist and what else?
Maybe a rootkit could copy itself between bootloader/recovery/system. How can I make sure that does not happen?
Whenever a PC is infected, it is best-practice to reformat the hard drive and reinstall the OS from scratch, because otherwise you can never be sure the virus has really gone. How to do the same - or as close as possible - with Android?
Thanks!
Flash twrp, reboot to it and delete what you want. U don't need root.
Before unlocking bootloader'a you hadn't any virus or rootkit. It is impossible.
jul17pri said:
What is the easiest way to delete everything on the device except bootloader?
I guess the process could be:
Boot into bootloader
Flash TWRP
Boot into recovery
Root device
Open terminal
Delete everything that is not recovery or bootloader
Verify that everything is deleted
Boot into bootloader
Flash stock rom
Click to expand...
Click to collapse
As already commented in the previous post, for deleting partitions from TWRP you don't need root.
On the other side, if you want to root (and delete partitions from Terminal emulator app), you don't need TWRP for that (you can root by Magisk without having TWRP)
And one more comment: You delete "everyrthing", so you delete Persist, and you loose Widevine L1 certificate.
(But your phone, your reasons to delete everything, so you probably know what and why you want to do)
Related
Hello, I flashed PA 4.4.4 on my i9250 and now I wanted to go back to 4.3. Unfortunately I have a problem because my 4.3 backup isn't visible anymore, directories are messed up by 4.4.4. Found a way to make it visible (had to put an old backup to /data/media/clockworkmod/backup/) but I get an error while trying to restore it. I even flashed my previous cwm and installed cm 10 (the one that I've got my last backup from) but now all i get is a bootloop... I think it's caused by messed directories. How to get rid of those f***ing 0 emulated location?
1. Download JB factory image for your NExus from here: https://developers.google.com/android/nexus/images
2. In the recovery make swipe data/factory reset
3. power off and boot into fastboot mode...
3. Flash system partition through fastboot. (You need Fastboot drivers for Windows..) (system.img):
fastboot flash system system.img
and flash boot.img :
fastboot flash boot boot.img
4. Boot.
Nb. You have to extract the img files from the zip package.. if you want you can use flash all batch file (.bat) or script file (.sh) (depends of the OS...) but if you use it, then it'll flash everything automatically and wipes everything from the phone.
Hm I hoped that will do without going back to stock. I suppose this operation will relock my bootloader?
casioman1 said:
Hm I hoped that will do without going back to stock. I suppose this operation will relock my bootloader?
Click to expand...
Click to collapse
Only fastboot oem lock command locks your nexus's boot loader.
About "0" and some other directories, these are new on JB 4.2 or 4.3... you can remove them but it's useless... so I recommend to keep them.. 0 is like the current user,, for e.g 3 is the second user (multi user)...
CWM backups: I am not really sure... you can remove md5 stuff and maybe recovery lets you flash the files.. Also use the recovery with what you made the backup if newer CWM recoveries won't flash it
Hell yeah! Finally got it done. This it how:
1. flashed an old recovery (the one that I've got my last backup from) but still got a bootloop with an old cm10.
2. installed the newest working wersion of CM just to put my backup into different directory and make it visible (make sure you copy both folders with a date of your backup AND blobs because without the latter one it won't restore giving you an error)
3. voila, you've got a fully restored system
Thanks Carlos_Manuel for your help
Even simpler root than Invisiblek's method for the older versions: If you have already tried that method and now have broken wireless, see Post #2.
Note: A more detailed and user-friendly version of these instructions can be found at: http://www.oppoforums.com/threads/n5206-international-root-instructions.24159
Download http://lum.uk/n3/files/recmodn3.img and http://lum.uk/n3/files/Root_ColorOS_by_tantrums_v2.zip
Copy the rooter onto your SD card.
Boot into fastboot by holding volume up while powering on the phone.
fastboot oem unlock
fastboot flash recovery recmodn3.img
fastboot boot recmodn3.img
Flash the root coloros zip file, reboot and you're rooted.
Note: This is a modified stock recovery that can flash OTAs as well as zips not signed by Oppo. If you prefer TWRP then that is available here: https://dl.twrp.me/n3/. Note that at the time of writing TWRP is unable to flash OTAs.
Thanks to [email protected] for the original root method, Arvin A. [email protected] for the fixing SuperSU to work on ColorOS, and [email protected] for providing the modified N3 recovery.
Restoring stock firmware
Download your chosen firmware and recovery from this thread
Copy the firmware to the root of the internal storage
Take a nandroid backup using TWRP
Reboot to bootloader from within TWRP
Code:
fastboot flash recovery recovery_N3.img
fastboot reboot
adb reboot recovery
Use the stock recovery to flash your chosen firmware
If you are downgrading then wipe data and cache (you did remember to take a nandroid, right?)
Reboot
You are now on stock fimware. Follow the rooting instructions in post #1, and if you wiped you may optionally restore only the data partition from your nandroid backup.
Will memory be erased?
Hi,
So i'm looking forward to root my beautiful Oppo N3.
On my last Phones memory (data and so on) was erased alongside with unlocking the phone.
Will it be the same on this phone so that I have to backup all my data?
Your data will not be erased when rooting or unlocking. Also your warranty will not be invalidated like it is with other manufacturers.
It is, however, always wise to take a backup before anything like this, just in case something does go wrong.
Hi,
I tried rooting my N3 now but i made a mistake by not executing the commands after falshing SuperSU.
That's why my phone is always booting into TWRP. There i tried executing your commands, but apparently the shell refuses to su by throwing exception: "command not found"
Going on with mount-command, it is also giving back an error: "can't find /system in /proc/mounts"
Hope sb could help me now...
EDIT: Solved by installing stock recovery, booting system, and the reflash twrp.
Lum_UK said:
Even simpler root than Invisiblek's method for the older versions: If you have already tried that method and now have broken wireless, see Post #2
Download http://teamw.in/project/twrp2/282 and http://download.chainfire.eu/supersu
adb reboot bootloader
fastboot oem unlock
fastboot flash recovery openrecovery-twrp-2.8.4.0-n3.img
fastboot reboot
adb reboot recovery
Flash Super SU from within TWRP. Then boot the OS
adb shell
su
mount -o remount,rw /system
echo "/system/xbin/su --daemon &" >> /system/etc/init.qcom.post_boot.sh
Reboot and you're rooted.
By default ColorOS doesn't let apps auto-start themselves, so go into security centre and allow SuperSU to auto-start, otherwise you won't get prompts for root when other apps need it.
Thanks to invisiblek for the original root method and babelmonk for the fix. I have shamelessly copied these and adapted them for the new firmware.
Click to expand...
Click to collapse
Quoted from your post in oppo forum
Wait for the phone to boot:
adb reboot recovery
It should boot into TWRP recovery flash the SuperSU zip you downloaded but do not reboot as we need to fix a small bug in SuperSU due to Oppo not using the expected startup scripts.
adb shell
su
mount -o remount,rw /system
echo "/system/xbin/su --daemon &" >> /system/etc/init.qcom.post_boot.sh
Reboot and congratulations. You are now rooted.
Sorry , quite new in fastboot command so i apologize if I misunderstood you but I'm running on N5206_EX_23_150208 , which should i follow ? to boot up after flashing SuperSU or not to boot up ?
It doesn't matter which way around you do it, just that root won't work outside of ADB until it's done.
I assume that XDA folk are more familiar with ADB etc. than on the Oppo forums so the instructions skip over more detail here.
Updated the method to use fastboot boot instead of fastboot flash.
This should work around the issue with phones that can't flash twrp, and also leave the stock recovery in place which is more useful to have until we get some custom roms.
Lum_UK said:
Updated the method to use fastboot boot instead of fastboot flash.
This should work around the issue with phones that can't flash twrp, and also leave the stock recovery in place which is more useful to have until we get some custom roms.
Click to expand...
Click to collapse
I was using modified boot.img to get root and then edit init.qcom.post_boot.sh. Now my wi-fi is broken. Can I fix it without wiping? Maybe flash some other boot img?
Anilexis said:
I was using modified boot.img to get root and then edit init.qcom.post_boot.sh. Now my wi-fi is broken. Can I fix it without wiping? Maybe flash some other boot img?
Click to expand...
Click to collapse
Fixed it by flashing boot.img from 150208, root still there due to script edit.
Updated the OP to use the modified stock recovery (Wmjan's recovery for the N5207) as this will be friendlier to noobs and also make it easier to install OTAs.
Anyone know where to get the root coloros file? Link doesn't seem to work for me...
http://www.oppoforums.com/attachment..._v2-zip.31142/
cowabunga said:
Anyone know where to get the root coloros file? Link doesn't seem to work for me...
http://www.oppoforums.com/attachment..._v2-zip.31142/
Click to expand...
Click to collapse
Sorry for the delay in replying. I've re-hosted the file for you.
http://lum.uk/n3/files/Root_ColorOS_by_tantrums_v2.zip
You could also try this. It worked on my girlfriend's R5 running a similar version of ColorOS. Didn't need modified recovery or anything, install it, run, click the root button, and it'll reboot to recovery and root for you.
http://lum.uk/n3/files/ForceRoot.apk
can this root work with Chines n5207
Hello,
I'm from Malaysia,
I got problem with my N3 / N5206 after update the newest version of software...now it cannot detect any line signal and open a wifi...what the problem,can u help me...
I can't make the WiFi to work again. Installed all versions of firmware and no luck....
Update: I was using the wrong tool to flash the firmware.
Don't update the phone with Msm8974DownloadTool !!!!
You have to download and install QPST_2.7.460 and place the phone in download mode by pressing volume + and power button and then in QPST load the firmware N5206EX_11_A.11_150528_SVN6225 or Oppo_N3_N5206_EX_11_A.13_151230 or N5206EX_11_A.10_150519_SVN6196
After flashing the wifi is working but you gonna loose the NV ram backup for the IMEI numbers..
Then you have to open dealpad with *#801# and anable Full-port ON
In QFIL(QPST) click on Tools then click QCN Backup Restore
Choose the qcn file and press restore.
Everything will work again after reboot the phone...
I, foolishly, forgot to do so after flashing the TWRP recovery and rooting with SuperSU for Wear. I was just experimenting and don't really need to have the watch rooted. I'd kind of like to go back to stock, if only for any future updates. Please tell me someone has a copy of the stock system partition.
If you used SuperSU you can try this using the file explorer on twrp or adb from twrp. Make sure you backup your current system first. Make sure you remove the su binary from \system\bin, \system\xbin, or \system\sbin... wherever it ended up. You also want to follow the directions here to remove the SuperSU apk.
http://forum.xda-developers.com/showpost.php?p=26027562&postcount=2
hecksagon said:
If you used SuperSU you can try this
Click to expand...
Click to collapse
Oh, I can and have removed SuperSU, but for some reason there was no install-recovery.sh backup to restore. I really just want to re-flash the system partition, but no one seems to have a copy.
I will make a backup for you if you teach me how to root my zenwatch. im not usually a noob like this but its been a while since ive rooted anything, and ive never rooted a smartwatch.
yes_thisis_joey said:
I will make a backup for you if you teach me how to root my zenwatch.
Click to expand...
Click to collapse
I think the following is right. It's been a few months since I rooted mine.
The first step will be to unlock the bootloader. This will wipe the watch, but of course there's probably not anything there that won't be automatically restored when you set it back up. Unlocking the bootloader (and really this whole process) is just like doing it on a phone.
Fastboot mode on the watch:
Restart the watch. At the Asus logo, swipe from top-left to bottom-right. That should get you to fastboot mode, then you swipe up and down to change menu items, and swipe right to select. Alternatively, if you already have developer options enabled on the watch and have up-to-date USB drivers and ADB working on your PC, you can use "adb reboot-bootloader" to get to fastboot mode on the watch.
Install TWRP on the watch:
See http://forum.xda-developers.com/zenwatch/orig-development/recovery-twrp-2-8-7-0-t3205196
Swipe up/down/right to start TWRP from the fastboot menu. Use TWRP to make a backup of the system partition. And share it here, please!
Push this Wear version of SuperSU to the watch, and flash it with TWRP:
http://rootjunkysdl.com/getdownload.php?file=LG G Watch/Root/Wear-SuperSU-v2.40.zip
Reboot the watch. It should now be rooted!
help need my zenwatch!!!
did you ever make a copy of the stock system.. as really need one can you help!!
I reinstalled the factory image to my Nexus 7 from Google's website. without any issue using ADB. My bootlogger is still unlocked.
I recall when I rooted my KitKat using TWRP, I didn't have to wipe out my data, it rooted just fine.
Now, I am uncertain if this is the case with Marshmallow as I have loaded all my 150+ apps (manually) back onto my tablet .
Also, what's the best site/link for rooting to Marshmallow. It's been quite sometime since I rooted. I just want to make sure I follow the sequence correctly.
Thanks
Gaining root access is very simple.
Flash twrp with fastboot.
Then from twrp flash the su zip of your choice, phh's superuser or SuperSU.
That's it. No loss of data. Of course make a nandroid first just in case of any problem.
Edit: In your other thread that you link to this one in (didn't see it earlier) you may not have needed the clean install. Either flashing the boot.img and system.img for that os version with fastboot OR deleting the "-w" from the flash-all script in the factory image would have kept your apps/data. Just for future reference if you choose to stay on 6.0.1 and something goes wrong.
I think there is some confusion and there are different variations on how to flash to TWRP. What is the most recommended flash process?
Michael Carleone said:
I think there is some confusion and there are different variations on how to flash to TWRP. What is the most recommended flash process?
Click to expand...
Click to collapse
I just did this the other night, though I did go from one MM build to another.
1a) Grab the factory image from Google in ZIP form from the developer site
1b) Grab the latest version of TWRP for the 2013 N7 Wifi (flo) from their website
1c) Grab an appropriate super user app flash-able from TWRP. I prefer SuperSU, but the choice is yours. Make sure it supports systemless installation, as traditional SU installs can run afoul of Marshmallow's new integrity checks. (Yes, there are permissive kernels available, but I prefer to stay as stock as possible)
2) Unpack ZIP from 1a into a folder on your PC. I tend to drop a minimal copy of fastboot/adb into the folder to make things easy, but you can just use whatever is in the path.
3) You can choose to use the batch file or not, but if you do, remember to remove the -w from the fastboot command that flashes the OS image unless you want truly clean install. I personally prefer to flash the bootloader separately, then flash the system, rather than using the batch file, but they are equivalent. The tablet will automatically restart after the image is uploaded.
4) Kick back and relax while all your apps get recompiled. When it finally comes up, make sure everything is working okay.
5) Copy your SU flashable image to the tablet. If you have ADB debugging turned on, you may have to toggle MTP mode in developer options to re-enable it.
6) After everything is nice and stable, and everything you need is on the tablet already, reboot to bootloader.
7) Flash the TWRP image from 1b using 'fastboot flash recovery twrp_<version>.img'
8) Reboot into your shiny new recovery and install the SU package from 1c
9) Reboot again into the new, newly rooted, system and verify SU works.
10) Enjoy!
hi,
my oneplus 3 has been rote since i got it (i bought it on launch day) but since i updated it to the beta 19, my phone is no longer rooted : when i put the phone in fastboot it says that my bootloader it unlocked but all the apps who requier root are saying that the phne is not rooted and i cant get twrp to work. i tryied with the official app on my phone and with a program called "tool all in one" (https://forum.xda-developers.com/on...ol-tool-one-driversunlocktwrpfactory-t3398993) and when i flash twrp from the program, i can boot into twrp but then i can't access my files and after i boot the phone, i can no longer boot to twrp
does anyone have a solution that doesn't involve me wiping the phone?
You loose root after updating. Try installing twrp again and then rooting it. Use the toolkit for oneplus 3. Simplifies the process
what do you mean by "then rooting it" ?
the program i use does the same thing as the toolkit and when i install twrp, as i said, it can boot on twrp one time and in twrp i can't access my files and after i boot the phone i can't get back to twrp ,i get the stock recovery
Unless your ROM has built-in root, after flashing TWRP, you have to flash SuperSU or Magisk to obtain root. Mere flashing of TWRP will not give you root.
I know but i can't get to the folder when the magisk file is : when in boot into twrp i cant see my files
Few details... it's quite difficult to help you.
What's the root method? Magisk, SuperSU or Kingroot? Which version?
Ps TWRP recovery is not depending by root, you just need to unlock bootloader (surely it's already unlocked) and flash the same recovery, from PC, via the command "fastboot flash recovery filename.img".
Now enter in TWRP:
1) Wipe /system and /cache;
2) Flash another time Open Beta 19;
3) Flash Magisk or SuperSU (be sure to have latest release);
4) Move TWRP img file from computer to device, then flash it another time (because firmware provides the OOS stock recovery);
5) Reboot and wait 5-10 minutes, because of cache rebuilding.
Tell me if you solve
I am using magisk
Yes my bootloader is unlocked
My problem is that when i flash twrp i cant access my files so i don't want to wipe system if i cant reflash something after
I think that I'll wait for the next update, maybe then it will work
But thank you for your help
Which version of TWRP do you have? Try eng.stk's latest version.
I tryied 3.1.1-2
The eng.stk is not available anymore
Your phone is encrypted, so you have to format data ( but your internal storage wiped by formating data, so back it up ,then only twrp read files in your storage)and flash custom kernel then boot restore backup .
how do you know that my phone is encrypted? i never encrypted it
i use titanium backup so i can't back my phone up until i get rot back
Whenever you flash stock ROM it encrypt if you boot into system directly . So twrp could not read internal storage. Whenever you flash stock ROM you must flash custom kernel or any other method to avoid encryption. This is happened to me and what I'd done is flash custom kernel before boot into rom
To save your data try this
https://forum.xda-developers.com/oneplus-3/how-to/unencrypt-oxygenos-loosing-data-t3412228
Who said that? Check this: https://forum.xda-developers.com/devdb/project/?id=15934#downloads
Edit: If you want to save items in internal storage, you can use ADB commands instead of TWRP. You can also simply copy and paste if your PC recognises the internal storage of your phone.
I succeeded but i had to clean everything and use the last backup i made a week ago
Thank you all for your help