yashsingh1/xdaforums huggingface dataset:
[ONE General] kmarc33:
Thanks, I'm looking to go back to stock except leave /sdcard alone. Besides that being the easiest place to restore my apps from using TiBu, I've already copied over 30+gb of music, pics, etc. Can I do it all again? Sure, but I really just want a clean flash with my /sdcard stuff left alone so that I can do some testing on this annoying wifi problem.

I'm going to do a full backup with TiBu, be sure I have SuperSu on the /sdcard partition, go into TWRP, nandroid (just in case), wipe /system, data, cache, dalvik, boot into fastboot, hook up the usb cable and follow #8 without -w. Wipe cache/dalvik again because it's habit, reboot. If I get in, reboot to TWRP, install SuperSu, wipe dalvik/cache, reboot, restore/configure everything.

Thanks again. I'm not quite sure why CM is posting fastboot zips only. Yes, I've found many other flashable zips, prerooted, etc. But I want to use the official CM stuff to be sure that any bug reports I submit are as valid as possible.
[ONE General] AbhishekS:
Lovely guide ?
[ONE General] s8freak:
Ok I've got my OneplusOne ordered so I'll be using this guide to unlock the bootloader and then root. Man rooting my S4 and S5 was a piece of cake this phone seems to be a tad more intensive so I'm sure I'll be posting here for help. Thanks for the guide and information. I'm looking forward to flashing on a different device.?? it's a challenge I'll gladly except.

"And on that bombshell it's time to end the show!"

Sent from my G900A powered by Pyrana Rom
[ONE General] Heisenberg:
It's super easy to unlock this phone, the hardest part (for the small number of people that do have issues) is usually getting the drivers to work.

Transmitted via Bacon
[ONE General] s8freak:
Super easy is towelroot apk for the S5 but I'm no rookie when it comes to rooting so I'm sure with the fine folks here in the OneplusOne thread I'll get it done. Thanks everyone in advance and Happy Thanksgiving

"And on that bombshell it's time to end the show!"

Sent from my G900A powered by Pyrana Rom
[ONE General] silvagroup:
Thanks great thread. Getting my 1+ hopefully in next few days and I am sure that within a week of testing the phone I'll be making lots of changes to it. Also been roming for awhile now highly recommend Linux for ease of use. Started using Linux almost 20 years ago and never looked back.
[ONE General] playya:
May I suggest something else as well. I usually keep 2 backups on my phone because I have come across where my backup was corrupted and did not restore properly. Thank god I keep 2 on my phone so I was able to use another. Or you should actually try and restore your backup just to make sure there are no issues.

Been doing this since the Evo days and cant say its happened often but it has happened. Also nice guide OP and I read your comments in tamper bit thread and cant say I agree with you guys and the fact people need to leave these toolkits alone and learn. I would say 80% of the crap in Q&A and general is from people who have no clue what they did and used toolkits... :good:

Enjoy your day
[ONE General] rdar_93:
Sorry in advance for the noob question that has been possibly asked already, but....

Do I

need

to follow this guide step by step or can I install a recovery, root, backup my user data and then unlock the bootloader?
[ONE General] Heisenberg:
The bootloader must be unlocked first. It opens the door for the other processes to happen.

Transmitted via Bacon
[ONE General] leximu5:
Having a ROM zip on my /sdcard/ has always be standard practice to me, ever since I completely wiped my Motorola Atrix 2 a couple years ago (lesson learned the hard way). It should be a lot easier to recover from such a disaster now since modern recoveries alert you when your system partition has no OS installed.
[ONE General] Quinnaay:
Legend again [MENTION=4153349]timmaaa[/MENTION] just done my first ADB sideload for the update and it worked flawlessly! cant Thank you enough times.
[ONE General] Heisenberg:
Awesome. Always glad to help when we get good results. Isn't learning this shiz fun?!

Transmitted via Bacon
[ONE General] Quinnaay:
Hell yurr, ill be a wiz soon ;) Might be able to help out at some stage lol.
[ONE General] sharp2G:
Couldn't you place the updated CM ROM into your sdcard and flash it via TWRP from there? Uncheck "Update CM Recovery" in Developers setting beforehand of course.
[ONE General] Heisenberg:
Try it if you want to. It isn't how it's meant to be installed though. My directions are for the sideload method.

PS. Please never quote the entire OP, it clogs up the page. It's an unwritten law of XDA.

Transmitted via Bacon
[ONE General] DirtyDroidX:
Nice write up bud. Just a suggestion for those that modified some system files and are getting a error. I rewrote the update-script so it will flash via "adb sideload" . Here you go http://bit.ly/1sw1baq.

Cheers!
[ONE General] Heisenberg:
Thanks, I'll add that to the tutorial.

Transmitted via Bacon
[ONE General] Myrrhman:
Thu......thu....thu.....thank....thu.....thank you, Timmy.

Wow, wha...what a great audience.

-Jimmy

(Sorry, couldn't resist:):o:))
[ONE General] ioneng:
Does it take really long to boot after installing twrp recovery? It's been 5 minutes now, the screen still showing a spinning hexagon. Any idea?
[ONE General] Heisenberg:
What else have you done to the device? It shouldn't take that long to boot. Try holding down the power button to force a reboot.

Transmitted via Bacon
[ONE General] Delve:
Wish I'd had this a couple months ago before I turned it on for the first time!
[ONE General] danny_and_2:
[MENTION=4153349]timmaaa[/MENTION] , just wanted to send a big thanks your way!

Recieved my 1+1 yesterday & after seeing the new CM11S ota was out, I followed your guide to get myself a TWRP Recovery & installed the OTA from androidpolicy!

Thanks for the explantaions under your guides to the different things, very much appreciated! :)
[ONE General] potpit:
Any idea why is TWRP file i downloaded is only a few bytes??? Shouldnt it be around 11mb?

TIA.
[ONE General] Heisenberg:
Try a different browser.

Transmitted via Bacon
[ONE General] potpit:
I tried on chrome, IE & fox. All kept downloadingl in bytes. Any other way?
[ONE General] Heisenberg:
Not sure what's going on there, sorry. Have you tried downloading it with your phone?

Transmitted via Bacon
[ONE General] fuzz_33594:
Excellent Guide

I've had enough "oh crap" moments over the years to consider myself fairly experienced. Wish I had access to something like this when I started. Very nicely done.
[ONE General] Ogawa:
No fastboot format cache

Solved - Thanks
[ONE General] sanjsrik:
HELP!

So, I'm following these instructions, everything went smoothly until I got to fastboot format cache. I was able to flash the TWRP recovery fine, but when I try the following fastboot format cache, I see the following message. I rebooted anyway and all I see is the spinning icon after Powered by android. Please anyone help. Did I just flash a bad recovery? What happened? At this point I'm stuck. At least with my Note 3 i could do a battery pull but not on this device. Help:

C:\androidsdk\adt-bundle-windows-x86_64-20140702\sdk\platform-tools>fastboot for

mat cache

Creating filesystem with parameters:

Size: 536870912

Block size: 4096

Blocks per group: 32768

Inodes per group: 8192

Inode size: 256

Journal blocks: 2048

Label:

Blocks: 131072

Block groups: 4

Reserved block group size: 31

Created filesystem with 11/32768 inodes and 4206/131072 blocks

error: file_write: write: Bad file descriptor

Cannot read image.

erasing 'cache'...

OKAY [ 0.114s]

finished. total time: 0.117s
[ONE General] Heisenberg:
You can simulate a battery pull by holding the power button. Once it's powered off, use the volume down + power button combo to boot into TWRP recovery. Enter the wipe menu and perform a factory reset, then reboot your phone.

Transmitted via Bacon
[ONE General] KhalMinos:
Thanks for the awesome thread!

I will definitely bookmark this one in case I need to refresh my memory or I messed up something lol

Thank you for the information. Im sure the whole xda community appreciated your effort when you put this together!
[ONE General] stockguroo:
Thank you!

Thank you so much for the detailed step-by-step explanation.

I was unhappy with the battery life after updating my OPO to stock 44S. I am a newbie. Never rooted or unlocked a bootloader in my life. This thread helped me to do everything from the scratch. I managed to get a CM nightly plus Franko Kernel using the steps mentioned.

Now what if I want to update to a newer CM nightly or change to a different custom ROM? Can I follow these steps:

1) Using the nandroid backup step, just make a backup of my data

2) install the custom rom and gapps through recovery

3) restore the backed up data from the previous

By Data, I mean App Data. Minimally the settings for the installed Google Apps..

Please suggest if this is possible or if there is any alternate way..
[ONE General] Heisenberg:
The nandroid feature isn't selective enough to just backup the app data, it will backup your entire /data partition. You must not restore data when changing ROMs. If you're going to change ROMs you can use Titanium Backup to backup your apps and then restore them after you've flashed your new ROM (but you can't restore system data like system apps and settings).

But, if you're updating your current ROM, like flashing a more recent nightly, you can do what's called a dirty flash. A dirty flash is installing the newer ROM zip while only wiping cache and dalvik cache, this means your data (apps and settings) will remain through the flash. Be cautious though, dirty flashing can cause problems sometimes, so if you do encounter any issues you'll need to go back and perform a clean flash (wipe system, data, cache, dalvik cache before flashing).

Transmitted via Bacon
[ONE General] stockguroo:
Thank you again.

Even using the dirty flashing, would I be required to install the gapps too again or installing only the newer ROM zip will suffice?
[ONE General] Heisenberg:
These days sometimes ROMs will backup your current installed gapps so all you need to flash is the ROM zip, but sometimes they don't, I believe CM does though.

Transmitted via Bacon
[ONE General] stockguroo:
Makes sense.

Couldn't thank you enough!
[ONE General] s8freak:
[MENTION=4153349]timmaaa[/MENTION] thank you for this thread/guide I had no problem unlocking bootloader and rooting my OneplusOne let the flashing begin woohoo

"All we know is... He's called the Stig!"

Sent from my A0001
[ONE General] DominiCOne:
Very useful guide, got my OPO this morning unlock bootloader, recovery & rooted in 10 min :good:
[ONE General] musheercmr:
as per instructed in number 8, i unlock bootloader and download cm-11.0-XNPH44S-bacon-signed-fastboot.zip. but while running last command with fastboot getting error message :

target reported max download size of 536870912 bytes

archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

failed to allocate 820487604 bytes

error: update package missing system.img

help me please.... :(
[ONE General] Heisenberg:
Your version of adb/fastboot is outdated, how did you install it on your PC?

Transmitted via Bacon
[ONE General] musheercmr:
I installed ADB/FASTBOOT as unstructured in 1st post, and i download from following link.

http://xdaforums.com/showthread.php?t=2317790
[ONE General] Heisenberg:
Ok, you'll need to download the full Android SDK from here:

http://developer.android.com/sdk/index.html#download

Grab that and it'll give you the most updated version of adb/fastboot, and then you should have no problems flashing the CM11S fastboot images.

I'm going to change the OP because using the minimal adb and fastboot installs an older version of adb/fastboot, which is clearly problematic.

Transmitted via Bacon
[ONE General] doc_fx:
I am confused regarding one of the things..i have had my opo since a day..i tried a couple of ROMS but the thing is after i copied my music and files to the phone and flashed another rom my data was gone, i am sure i did something stupid but not sure what, luckily i have my old phone as well as the back-up on the laptop, but i want to know unlike other devices opo doesnt have a internal storage and phone storage? if not.! how do i ensure a clean install of new roms and keep my safe data safe.! Please advice.
[ONE General] Heisenberg:
That means you're not following the guide correctly. You should only wipe system, data, cache, and dalvik cache before installing a ROM. You don't need to wipe internal storage, that's your virtual sd card, and this guide never states to wipe that.

Transmitted via Bacon
[ONE General] doc_fx:
Thank You sir, i did not do that i am sure, might have lost the data when i went back to KK from LP using a toolbox. Maybe. Still Thank You.
[ONE General] Heisenberg:
Very possible. A word of advice: delete the toolbox. They're unnecessary, and cause more problems than they're worth. Plus, they allow the user to do things to the phone without actually knowing what's going on. It would be much more beneficial for you to learn to use fastboot manually, it's vital knowledge that every phone modder should have.

Transmitted via Bacon
[ONE General] musheercmr:
I have downloaded SDK and installed, but still i am getting same system.img missing error message :(

help me please. my ADB version is "Android Debug Bridge version 1.0.32"
[ONE General] Heisenberg:
Please copy/paste all of the text from the command prompt on a flash attempt here so I can see. What happens when you reboot the phone?

Transmitted via Bacon
[ONE General] musheercmr:
here is the full log. then advice me please.

____________________________________________________

C:\Users\Musheer\Desktop\OnePlus>adb version

Android Debug Bridge version 1.0.32

C:\Users\Musheer\Desktop\OnePlus>fastboot flash modem NON-HLOS.bin

target reported max download size of 536870912 bytes

sending 'modem' (56369 KB)...

OKAY [ 1.768s]

writing 'modem'...

OKAY [ 1.053s]

finished. total time: 2.821s

C:\Users\Musheer\Desktop\OnePlus>fastboot flash sbl1 sbl1.mbn

target reported max download size of 536870912 bytes

sending 'sbl1' (295 KB)...

OKAY [ 0.016s]

writing 'sbl1'...

OKAY [ 0.016s]

finished. total time: 0.031s

C:\Users\Musheer\Desktop\OnePlus>fastboot flash dbi sdi.mbn

target reported max download size of 536870912 bytes

sending 'dbi' (11 KB)...

OKAY [ 0.000s]

writing 'dbi'...

OKAY [ 0.016s]

finished. total time: 0.016s

C:\Users\Musheer\Desktop\OnePlus>fastboot flash aboot emmc_appsboot.mbn

target reported max download size of 536870912 bytes

sending 'aboot' (376 KB)...

OKAY [ 0.016s]

writing 'aboot'...

OKAY [ 0.016s]

finished. total time: 0.031s

C:\Users\Musheer\Desktop\OnePlus>fastboot flash rpm rpm.mbn

target reported max download size of 536870912 bytes

sending 'rpm' (185 KB)...

OKAY [ -0.000s]

writing 'rpm'...

OKAY [ -0.000s]

finished. total time: 0.016s

C:\Users\Musheer\Desktop\OnePlus>fastboot flash tz tz.mbn

target reported max download size of 536870912 bytes

sending 'tz' (283 KB)...

OKAY [ 0.016s]

writing 'tz'...

OKAY [ 0.016s]

finished. total time: 0.031s

C:\Users\Musheer\Desktop\OnePlus>fastboot flash LOGO logo.bin

target reported max download size of 536870912 bytes

sending 'LOGO' (9591 KB)...

OKAY [ 0.297s]

writing 'LOGO'...

OKAY [ 0.188s]

finished. total time: 0.484s

C:\Users\Musheer\Desktop\OnePlus>fastboot update -w cm-11.0-XNPH44S-bacon-signed

-fastboot.zip

target reported max download size of 536870912 bytes

archive does not contain 'boot.sig'

archive does not contain 'recovery.sig'

failed to allocate 820487604 bytes

error: update package missing system.img

C:\Users\Musheer\Desktop\OnePlus>fastboot reboot

rebooting...

finished. total time: -0.000s

C:\Users\Musheer\Desktop\OnePlus>
[ONE General] Spannaa:
Something is failing with the 'fastboot update' command so flash everything manually:

fastboot flash modem NON-HLOS.bin
fastboot flash sbl1 sbl1.mbn
fastboot flash dbi sdi.mbn
fastboot flash aboot emmc_appsboot.mbn
fastboot flash rpm rpm.mbn
fastboot flash tz tz.mbn
fastboot flash LOGO logo.bin

And as 44S contains static_nvbk.bin, this needs flashing too ( [MENTION=4153349]timmaaa[/MENTION] - the guide needs updating for 44S )

fastboot flash oppostanvbk static_nvbk.bin

Then manually flash the imgs too:

fastboot flash boot boot.img
fastboot flash cache cache.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash userdata userdata_64G.img (or userdata.img for 16G version)
fastboot reboot
[ONE General] musheercmr:
[MENTION=2948558]Spannaa[/MENTION], it's help me. update successfully using manual method. many thanks.
[ONE General] rowbaggie22:
Manual method u mean u followed instructions or done it another way
[ONE General] musheercmr:
I follow the method exactly what Spannaa advised. thanks again to Spannaa.
[ONE General] Heisenberg:
I'm glad to see you're up and running again, not sure why the update command wasn't working for you but you got there in the end.

Transmitted via Bacon
[ONE General] anandbibek:
Just backed up efs partition by both the methods as said in OP. Noticed that modemst1.bin and modemst1.bak have different md5. Is that normal? If yes why? Aren't they the same partiton backed up?
[ONE General] Heisenberg:
They're in different formats and therefore have different md5 hashes. [MENTION=5427631]Vonnegut[/MENTION] can hopefully confirm that.

Transmitted via Bacon
[ONE General] anandbibek:
I know we can fastboot flash the bin file. But I haven't found how we'd restore from those .bak files.
[ONE General] Heisenberg:
[MENTION=5427631]Vonnegut[/MENTION], could you kindly answer this question?

Transmitted via Bacon
[ONE General] Spannaa:
I'm not [MENTION=5427631]Vonnegut[/MENTION] but you flash them in fastboot the same way as the bin/mbn/img files.

The files are named after the partitions you need to flash them to.

For example the modem:

Instead of fastboot flash modem NON-HLOS.bin you'd fastboot flash modem modem.bak
[ONE General] anandbibek:
OK that answers it. But my first question still holds. If we can flash them with same command, how come .bin and .bak have different md5?
[ONE General] anandbibek:
Just backed up again, and md5 is different from last two. I guess that modemst partitions are not static and content changes
[ONE General] Vonnegut:
Yep, that might happen. I noticed that too a while ago .

Basically, a script, a shell command and the TWRP use the dd binary.

The script uses the dd binary coming with the TWRP/kernel:

run_program("/sbin/dd", "if=/dev/block/platform/msm_sdcc.1/by-name/modemst1", "of=/data/media/0/MyBackup/modemst1.bak");
run_program("/sbin/dd", "if=/dev/block/platform/msm_sdcc.1/by-name/modemst2", "of=/data/media/0/MyBackup/modemst2.bak");

A shell command uses the dd available in the system.

I think different versions of the dd binary give a slightly different output (maybe just the header). That's why we see different HASH.

Anyway, don't worry about that...they all work flawlessly. For instance, you might compare the HASH of the persist.bak with the one obtained by using the following shell command:

dd if=/dev/block/mmcblk0p15 of=/sdcard/persist.bin

They will likely be different. Anyway, since the persist is an EXT4 partition (as much the system or the userdata), you can mount both images in windows (using a program like this one http://www.diskinternals.com/linux-reader/).

...and they both works fine.

---------- Post added at 08:22 PM ---------- Previous post was at 08:16 PM ----------

Exactly! :good:
[ONE General] anandbibek:
Guess I am covered now. Time to start flashing stuffs
[ONE General] TheDj408:
So after backing up efs, are we like completely brick proof ?
[ONE General] Heisenberg:
There's no such thing as being brick-proof, but by having an EFS backup you're insuring yourself against that particular problem.

Transmitted via Bacon
[ONE General] amb07:
Hey guys,

So I'm following the guide to flash the fastboot image (#8) and everything's going without a hitch. Until at the very last step (where I'm supposed to wipe my data and all), when I hit the command I am greeted with this on cmd:

error: failed to load '-w'

I believe I did follow the instructions well and I tried googling this but no luck. If anybody knows what I did wrong and what I should do, the help would be greatly appreciated. Thanks.
[ONE General] anandbibek:
Get us a screenshot of what you are typing?
[ONE General] amb07:
Hey Thanks for responding, certainly here's a screenshot of what was typed on cmd:
[ONE General] anandbibek:
I'm not an expert but I'll say check if you are using latest adb and fastboot binary.

And try without -w. Instead, if you want, do a full factory reset from recovery before booting
[ONE General] amb07:
I installed Android Studio with all its SDK and etc.

I performed the same actions again from the new fastboot folder and this is the result I now get at the last step:
[ONE General] Spannaa:
This seems to be happening a lot recently - try doing the update section manually

Sent by bacon...
[ONE General] amb07:
OMG Thank you so much your solution worked, I really wonder why this problem was occuring...

Also did this re-lock my bootloader? It un-rooted my phone so I just wanted to make sure. Thanks again!
[ONE General] Spannaa:
Unless you manually re-locked it then no.

Glad you're sorted ;)

Sent by bacon...
[ONE General] tensaiko:
I'm an idiot. I can't even get past step one. I don't have a fastboot folder... I downloaded everything. oh boy.

This guide looks good, but I guess I need more noob-proof instructions.
[ONE General] Heisenberg:
Have you downloaded the Android SDK? Your fastboot folder is just wherever fastboot.exe is located on your PC, it isn't necessarily named fastboot.

Transmitted via Bacon
[ONE General] anandbibek:
Use this https://www.dropbox.com/s/8s2db3rs47askda/platform-tools.rar?dl=0
[ONE General] angelossssss:
hello to everyone and merry christmas!

I currently have my oneplus on latest cm11s rom but i want to try colorOS. Is there a TWRP flashable stock colorOS ? i've been trying to find one but i can't seem to find a total stock one.

Thanks in advance !
[ONE General] Heisenberg:
I have no experience with flashing ColorOS as I have zero interest in it. But, there are several threads for it in the dev section and also in the general section for this phone too.

Transmitted via Bacon
[ONE General] shadeofgrey:
I've read countless pages on multiple threads and I'm certain I'm just overlooking this...but is there a flashable zip of the 44s kernel? Thanks in advance.
[ONE General] Heisenberg:
Not that I'm aware of, why not just flash the image file like normal?

Transmitted via Bacon
[ONE General] shadeofgrey:
That's what I wound up doing. I didn't want to have to download the whole image...just laziness I guess :innocent:
[ONE General] angelossssss:
I've noticed them too but can you indicate a stock - stable one ?
[ONE General] Heisenberg:
The image (boot.img) is the same size as a flashable zip would be.

Transmitted via Bacon
[ONE General] CBpbxEcmecmBeH:
Seems that color OS 1.2 is what you want, based on android 4.3 www.oneplusbbs.com/forum.php?mod=viewthread&tid=604565&extra=page=1&mobile=2 and should be "stable", however the "beta" versions are not crashing all the time, in fact I haven't experienced anything like that. Try the beta from [MENTION=2326824]relic242[/MENTION] his version, not ANYSYS, it's good :)
[ONE General] DGX_Goggles:
Can I ask how I would go about extracting the recovery image and ROM on the OPO? I just had mine repaired (The Chinese tech was actually rather understanding and even activated China Unicom 3G/4G for me), and I want to do a backup of the entire phone in case something happens when I go and install TWRP and PA on it. Do I need to root before the extraction steps?
[ONE General] Heisenberg:
You don't need to do it, both are contained in the fastboot images which you'll find in section 8.

Transmitted via Bacon