yashsingh1/xdaforums huggingface dataset:
[BLU R1 HD Guides, News, & Discussion] bibikalka:
Unpacked the zip files with the updates. V6.6 overwrites tons of partitions, including the preloader :

ui_print("start to update general image");
package_extract_file("lk.bin", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/lk");
package_extract_file("secro.img", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/secro");
package_extract_file("logo.bin", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/logo");
assert(package_extract_file("preloader_p6601.bin", "/tmp/preloader_p6601.bin"),
write_raw_image("/tmp/preloader_p6601.bin", "/dev/block/mmcblk0boot0"),
delete("/tmp/preloader_p6601.bin"));
set_mtupdate_stage("/cache/recovery/last_mtupdate_stage", "1");
),
ui_print("general images are already updated");
);
ifelse (
less_than_int(get_mtupdate_stage("/cache/recovery/last_mtupdate_stage"), "3") ,
(
if less_than_int(get_mtupdate_stage("/cache/recovery/last_mtupdate_stage"), "2") then

ui_print("start to update alt loader image");
package_extract_file("trustzone.bin", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/tee2");
set_mtupdate_stage("/cache/recovery/last_mtupdate_stage", "2");
endif;

The prior updates only had trustzone.bin + uboot.img.

It's a bit of a pain in the @$$ to apply these updates, first I have to restore the stock boot+system, then apply the updates in chain, save boot+system, re-root, etc. The non-prime ROM starts to appear very attractive :D

Update : the updates seem to mostly waste space on some junk, such as lots of user apps which in reality could just be kept as is, and updated via the Google store.
[BLU R1 HD Guides, News, & Discussion] :
Yeah. Most people don't want to bother with a hardmod anyway. I know I wouldn't. (unless it was something super extreme awesome like the unbrickable mod)
[BLU R1 HD Guides, News, & Discussion] :
When you say "user apps" I'm guessing you're referring to system apps. I personally don't really care if system app updates come along with the system updates (as long as that's not the only way they come - updating from the Play Store is a must in 2016), as long as it's not being done purely in an effort to make my life more difficult, which Amazon is known to do.
[BLU R1 HD Guides, News, & Discussion] vampirefo:
Interesting pic.
[BLU R1 HD Guides, News, & Discussion] emc2cube:
As suspected, there is a direct 6.1 to 6.6 update package:

http://hwfotadown.mayitek.com/ota/r....6_GENERIC_6.0_20160823-20201472825884773.zip
[BLU R1 HD Guides, News, & Discussion] bibikalka:
Great find! I was terribly unexcited about messing around with several update zip's, modifying them to avoid updating anything but /system & /boot, and then chain-applying them in TWRP. With the direct zip I can restore 6.1 and just update it all at once.

I still feel that Amazon's ROMs will be better supported than the plain vanilla ROM version of Blue R1, but of course cannot back it up with facts yet.

Do you plan to update to 6.6 (with precautions), and see if it's stable/fast/battery friendly ? Also, your TWRP scripts need to be retested to make sure they still work : http://xdaforums.com/r1-hd/how-to/guide-ad-removal-debloat-block-ota-easy-t3429555
[BLU R1 HD Guides, News, & Discussion] kal250:
So am I to gather you are going to strip the preloader and bootloader updates(and anything else harmful) to make a "safe" 6.1 to 6.6 update? Do you plan to share this? How would it be applied via TWRP?? Lol I know too many questions :laugh:
[BLU R1 HD Guides, News, & Discussion] emc2cube:
As I already hard bricked one phone and this is the second, I will probably pass on testing too much on this one.

I will probably switch to the non-prime rom for now, just to see how it goes. But I agree support seems way better for the prime one, I guess amazon is in charge behind the scene, while BLU don't really care for their devices as usual.

As long as apks in /system are not renamed the scripts should work. But if you find anything non-functional please let me know and I will update them.

I actually released a "beta" version (look in the last posts) that rename the files without removing them, and have a revert script too. This is easier to use as restoring to an OTA friendly state is then easier.

I will work on debloating the "normal" rom tonight, it seems that some files have different names there (mostly for Google stuff), and update everything.
[BLU R1 HD Guides, News, & Discussion] vampirefo:
Simply flash 6.6 ROM via twrp, not OTA, but 6.6 ROM, just like my 6.5 ROM.

Just replace system from my 6.5 ROM with 6.6 ROM, zip and flash.
[BLU R1 HD Guides, News, & Discussion] kal250:
Probably going to revert to OEM and wait to see how this all pans out. I definitely don't want the preloader or bootloader replaced at this point, plus whatever else they snuck in, just seems an awful lot of partitions got replaced for monthly security update....
[BLU R1 HD Guides, News, & Discussion] bibikalka:
I looked up what I did for 6.1 to 6.4 update, and it turns out I was lazier than I thought :D

Basically, for each updated bin/img I just replaced it with 6.1 version. Otherwise the updater script is too large and confusing, so I did not want to make any mistakes.

So with 6.6 the deal is the same - we just need to replace the new images with 6.1 versions.

07/17/2015 12:33 AM 336,128 lk.bin
07/17/2015 12:33 AM 1,257,728 logo.bin
07/17/2015 12:33 AM 148,652 preloader_p6601.bin
07/17/2015 12:33 AM 60,928 trustzone.bin
07/17/2015 12:33 AM 135,424 secro.img
07/17/2015 12:33 AM 332,944 uboot.img

To get replacement images one just uses this post:

http://xdaforums.com/r1-hd/how-to/root-partitions-backup-partition-info-t3426173
[BLU R1 HD Guides, News, & Discussion] vampirefo:
I will provide the ROM in a few days, it will just install 6.6 system, no preloader or anything else.
[BLU R1 HD Guides, News, & Discussion] bibikalka:
[MENTION=6782683]emc2cube[/MENTION]

Actually, any idea why there is both LK and UBOOT stuff ? They do this in a script :

...
assert(package_extract_file("uboot.img", "/tmp/lk.img"),
write_raw_image("/tmp/lk.img", "lk"),
delete("/tmp/lk.img"));
...
package_extract_file("lk.bin", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/lk");
package_extract_file("secro.img", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/secro");
package_extract_file("logo.bin", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/logo");
assert(package_extract_file("preloader_p6601.bin", "/tmp/preloader_p6601.bin"),
write_raw_image("/tmp/preloader_p6601.bin", "/dev/block/mmcblk0boot0"),
delete("/tmp/preloader_p6601.bin"));
...

So what the hell is uboot.img for ???
[BLU R1 HD Guides, News, & Discussion] kal250:
Has that been tested to work? I'm not a stranger to android as a user, but I am no expert on roms etc.... I have been brushing up, but still very much an Android/linux noob as far as development goes. Boot.img carries what? (Kernal?, And ???) and what about system?
[BLU R1 HD Guides, News, & Discussion] vampirefo:
Sure, I run it now, system has all the updates. Boot.img is kernel and ramdisk.

I have a question for you, if you install OEM on a fresh prime, will the bootloader unlock just by booting into fastboot and running commands or is flashing unlock.img via splash tool still need to unlock bootloader on a converted prime phone?
[BLU R1 HD Guides, News, & Discussion] emc2cube:
No idea. I found it strange too.

Seems to me they extract uboot in the temp files under the name lk and basically do nothing with it. But I may be wrong too.
[BLU R1 HD Guides, News, & Discussion] vampirefo:
Uboot.img is the bootloader.

It is written to phone as lk (little kernel).
[BLU R1 HD Guides, News, & Discussion] DarkBlood.:
Uboot gets extracted to temp as lk (little kernel) then it gets written with write_raw_image to the lk partition and the temp file gets deleted
[BLU R1 HD Guides, News, & Discussion] vampirefo:
Correct then lk.bin is the firmware for the bootloader, it's dropped on top of the bootloader, forcing bootloader to lock.

And sets booting to secure, causing phone to bootloop if any partition has been changed.
[BLU R1 HD Guides, News, & Discussion] kal250:
To be honest, im not sure, initially I flashed rootjunkys rom, he sends unlock via lk partition(I believe or just sending the OEM bootloader not sure) I then flashed over to OEM and back to prime 6.1 updated to 6.5 w/ amazon debloat scripts, and back to OEM to test, back to Prime, i have maintained bootloader unlock through all flashes. I know that was no answer but thats the path I followed. [MENTION=5355478]ColtonDRG[/MENTION] can you answer his question?

Correction: I said lk, its frp...
[BLU R1 HD Guides, News, & Discussion] DarkBlood.:
SPFlashTool is disabled by the preloader, there is a string in the bootloader code to disable spflashtool.
[BLU R1 HD Guides, News, & Discussion] emc2cube:
I'm surprised that the lk partition can be accessed by

write_raw_image("/tmp/lk.img", "lk")

I was more expecting something it to be first overwritten by something more like

write_raw_image("/tmp/lk.img", "/dev/block/mmcblk0p5")

That's why I was suspicious that nothing was really done with uboot.img on this one.

BTW [MENTION=7494374]DarkBlood.[/MENTION] is there an easy way to extract/read what's in .*bin and *.img files in these things? I would love to see the all the strings/options in the bootloader from preloader_p6601.bin
[BLU R1 HD Guides, News, & Discussion] DarkBlood.:
You can run the strings command on every bin and img to see the human readable strings, you can use a hex editor to look deeper

---------- Post added at 05:53 AM ---------- Previous post was at 05:52 AM ----------

Actually i look at another mt6735 phone's preloader and lk sources.
[BLU R1 HD Guides, News, & Discussion] fuzzy_:
I unlocked mine by using ADB and fastboot commands. They are in Colton's guide.
[BLU R1 HD Guides, News, & Discussion] :
Good find. Mirrored as usual in the usual place (just for completeness, please don't flash this)

https://na.mirrors.coltondrg.com/coltondrg/r1hd/stockota/
[BLU R1 HD Guides, News, & Discussion] :
On any phone you convert to OEM you can unlock the same way you unlock OEM, go to Developer Options and check OEM Unlock, then reboot to fastboot and run `fastboot oem unlock`.

You could have read that in the conversion thread.
[BLU R1 HD Guides, News, & Discussion] emc2cube:
Scripts on http://xdaforums.com/showpost.php?p=68557388&postcount=19 updated tonight.

They should still work on prime, even on 6.6 and they are now also taking care of non-prime phones.
[BLU R1 HD Guides, News, & Discussion] kal250:
I wasn't sure on that, lol I had run rootjunkys method, prior to yours. Is it actually an unlockable bootloader that ships with prime or did they simply strip the permission option from dev options??
[BLU R1 HD Guides, News, & Discussion] vampirefo:
Yeah, I am still confused on that one myself, if one can unlock bootloader just by flashing non prime why are we using rootjunky's tool?
[BLU R1 HD Guides, News, & Discussion] mrmazak:
That what I've been wondering. Root junkies method uses an frp partition hack he has posted about elsewhere. There is , I think, an article about him pointin out Google safeboot vulnerability in frp . (the system that once your phone is signed in, then you do factory reset, you cannot set it up unless you sign into the same Google account)

I had posted, and got no response, to rootjunky, asking what was done to the frp that allowed it to work and my question went unanswered,. And everybody recognized tomsgt so they just keep flashing without knowing what it was.

That's when I bought my second r1, this time the prime and started swapping sytem images and it just worked , in my opinion, better.

So better= upgrade not downgrade.?
[BLU R1 HD Guides, News, & Discussion] vampirefo:
OK, let me get this straight, on a new prime phone, the bootloader is able to be unlocked via flashing non prime?

Rootjunky's tool isn't needed?

I am just trying to get straight forward answers also.

So possibly an app or settings modification could be made to enable this option in prime, similar to the app used to enable encryption in non prime?

---------- Post added at 09:58 AM ---------- Previous post was at 09:53 AM ----------

Yes, I have read that thread, but as you can see not only myself is confused or not sure others are as well.
[BLU R1 HD Guides, News, & Discussion] bibikalka:
[MENTION=6782683]emc2cube[/MENTION], [MENTION=2472806]vampirefo[/MENTION], [MENTION=7494374]DarkBlood.[/MENTION]

OK, I figured this out a bit. In 6.1 to 6.4 update they only had this command (so I presume it does write things to the LK partition with such terse syntax ???)

assert(package_extract_file("uboot.img", "/tmp/lk.img"),
[COLOR="Red"]write_raw_image("/tmp/lk.img", "lk"),[/COLOR]
delete("/tmp/lk.img"));

In the new 6.1 to 6.6 update, they have the above write_raw_image command, and then also a bunch of commands below where lk.bin is again written to the LK partition :

[COLOR="Red"]package_extract_file("lk.bin", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/lk");[/COLOR]
package_extract_file("secro.img", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/secro");
package_extract_file("logo.bin", "/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/logo");
assert(package_extract_file("preloader_p6601.bin", "/tmp/preloader_p6601.bin"),
write_raw_image("/tmp/preloader_p6601.bin", "/dev/block/mmcblk0boot0"),
delete("/tmp/preloader_p6601.bin"));
...

Interestingly enough, lk.bin is slightly bigger than uboot.img. When I compared the 2, they matched where overlap. But lk.bin also has a bit of junk at the very end (secret code, or just leftover from some longer uboot.img ? :D ) And the 6.6. update will effectively leave lk.bin in LK partition, with that junk tail.

So this seems to be a rush job if nothing else, they forgot they already updated LK via uboot.img, and added another command (and an image file) to update LK again in the same script.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
OK. Yes. For clarification. The root junkie method is not needed.

I don't know enough about the way Android works to comment on if an app can dring the settings back.

I did not try different combinations to narrow down which step was the key. But what I did before sharing the system image. With sptf and the scatter.txt I did a full read back of our of the box non prime r1. And full read back of prime r1.

With those images all backed up. I used spft and loaded scatter.txt and did download with the system.ing, boot.IMG, and recovery.IMG from non prime backup as only partions checked off. Then connected prime phone and it flashed those three. The result was now I had two non prime phones with full Nexus style fastboot commands available. No modified files from root junkie flashed.

I hope I have answered you concerns.
[BLU R1 HD Guides, News, & Discussion] vampirefo:
Thank you.
[BLU R1 HD Guides, News, & Discussion] :
Yes.

Rootjunky's method is a filthy hack (as are most of the things he releases), but it basically does the same thing as that dev option at the end of the day anyway.
[BLU R1 HD Guides, News, & Discussion] :
Yes, well, I thought that it was obvious from the first guide in the second post in that thread, how to unlock the bootloader, where I go over using that method to do it.

As for adding the options in Prime, maybe it would be possible with an altered settings.apk. Enabling encryption is just an APK that launches the encryption activity which has been hidden, but not removed. It's also true that only the option has been removed in Prime, but there is no activity tied to it, and I'm fairly certain that any side loaded app would not have any chance of accessing the part of the system required. Long story short, you need to be rooted to unlock the bootloader in any case I can imagine, which we cannot do now that SPFT is blocked.
[BLU R1 HD Guides, News, & Discussion] vampirefo:
No it wasn't very clear to me, root isn't needed to unlock bootloader via rootjunky's method, that was the method I used.

Any thanks for the info.
[BLU R1 HD Guides, News, & Discussion] kal250:
What kills me with the whole rushed effort to lock down this phone is Amazons attitude towards ownership. I'm not opposed to their ads on lock screen. Personally I dont feel I need them, I utilize Amazons shopping app enough to get all the shopping suggestions I need and as far as online shopping goes, it's been pretty much Amazon only for the past couple years. What I am opposed to is them locking down a phone I purchased, I want the ability to remove apps I don't use, I want the freedom to install custom firmware and options otherwise not available on a locked down phone. It is common knowledge unlocking the bootloader will invalidate your warranty(arguably questionable, but oh well). So why alienate a community that loves this phone, we represent a small percentage of owners who choose to do this. However we spread the word, we make recommendations to our family, friends and colleagues. Amazon prides itself on customer service, but how quickly my perceptions of this customer service model have dwindled, it started with how they treated the loyal base of Fire Phone customers, they ruined great hardware with their crippled Fire OS, and then abandoned us with even a dated "upgrade" to Fire OS 5(which still lags behind current android releases). Anyhow the point is I still use their services. I expect better treatment from a company that benefits from my shopping, ads or not!!!
[BLU R1 HD Guides, News, & Discussion] mrmazak:
Little off topic but kinda related.

Everybody (business) seems to be alienating there customers, lately. Example.

Windows 10 has a "lock screen" that comes up before the sign-in screen. Few months ago my chosen screen image had been changed to an ad from Microsoft. So I googled how to disable the whole screen. It turns out you were able to ad a registry key to disable it. Well in August Microsoft put out an update that makes the registry change invalid(as in it is still set, but system ignores it) unless you are on a corporate or educational release. So end rant.

Basicly all updates at some point will **** up your day and you may be forced to use a device there way and not the way you want. That's how they get you to buy something else. Because if it doesn't break they needed a new way to make you want to replace it. Lol
[BLU R1 HD Guides, News, & Discussion] anbaude:
This is why I use linux almost exclusively and haven't' touched windows in years.
[BLU R1 HD Guides, News, & Discussion] n3kf:
So for any of us that did the OTA to 6.6 it sounds like we will be stuck with a phone that will probably not be rootable? Don't really care about the ads, but do prefer the phone to be rooted. Guess I do a return.
[BLU R1 HD Guides, News, & Discussion] vampirefo:
This is hard to say, but easiest option is to return phone if possible.

I am getting new phone today, will send amazon old phone next week.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
I may have a solution. It needs testing but i am thinking there is hope. I am looking for a willing user with 6.6 update willing to try before makeing return of phone.

im not getting too far with it but i think more experienced user will
[BLU R1 HD Guides, News, & Discussion] vampirefo:
My guess flashing lk, and preloaded from early firmware phone should fix it,

The phone would need bootloader already unlocked, and or rooted, dd or flash via twrp.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
should but how to flash without spft?

i'm looking at mata mode. i'm in meta but will not start with download only. havent tried with firmware upgrade yet.

any ideas?
[BLU R1 HD Guides, News, & Discussion] vampirefo:
Via dd, or via twrp, my connection is bad so phone dropping connection while I am typing.

You would need a good preloader and lk from any version before 6.6.
[BLU R1 HD Guides, News, & Discussion] n3kf:
I can test, but the phone is not unlocked and does not have TWRP. If I had TWRP I probably could get around this. I am on 6.6. Was just going to return it for replacement.
[BLU R1 HD Guides, News, & Discussion] vampirefo:
In your case I don't know, would need some type of exploit to get temp root, then flash via dd, but at this time I don't know if tools like kingroot and so on support android 6.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
for the guidelines of my test, it requires knowledge of using META mode. and i think I have already failed with my tests anyway.

If anybody has knowledge of META mode on mtk, I have found my way into meta but without full firmware may be dead end
[BLU R1 HD Guides, News, & Discussion] vampirefo:
How do you get into meta mode, someone may have or perhaps could do a read back on splashtool and get the full ROM.
[BLU R1 HD Guides, News, & Discussion] mrmazak:
1. power off phone.

2. hold volume down button keep holding

3. plug in usb

4. phone powers on, you see splash screen, release button. then Factory mode menu

5. use the volume keys to scroll down to last option meatboot

6. use on screen button menu to select

7. phone reboots and stays on splash screen with "meta mode" in lower corner

8. to leave meta mode. hold power button 7-10 seconds

so far all of my complete read backs have returned unusable preloader files.
[BLU R1 HD Guides, News, & Discussion] n3kf:
Since I do not know how to mess with meta mode, and I am within the timeframe, I just did a no hassle replacement. Guess I need to totally read forums before I let a phone update. Hopefully an exploit can be found before Amazon starts shipping phones with the new firmware on it. Thanks for all the help. Appreciated.
[BLU R1 HD Guides, News, & Discussion] :
Ok, well, I mean... The guide describes it pretty well, so it should be clear.

As for RootJunky's method not requiring root, it requires *either* root or SPFT (last time I checked) so either way on 6.6 you're ****ed.
[BLU R1 HD Guides, News, & Discussion] vampirefo:
Yes, splashtool required rootjunky method, I will try your method next time, curious to see if bootloader unlocks without hack.

Rootjunky method is used on nexus and other devices, so it is common, nothing wrong with it, however your method is more clean as no partition is modified other than system.
[BLU R1 HD Guides, News, & Discussion] :
It does. I've done it numerous times.

It is? Why? Ok, whatever.

Oh, and anyone who has several bricks attributed to their guides is not exactly "nothing wrong with it" to me, fwiw. ;)

Finally, question for you (not sure if or why you would know this)...

Can you unlock a bootloader on a phone with V6.6, SPFT blocked, no root access, and no already unlocked bootloader?
[BLU R1 HD Guides, News, & Discussion] vampirefo:
No, I don't know how, would require perhaps kingroot, or similar app that could root android 6.

I think you misunderstood my post, I

didn't mean rootjunky's method is great, just I have seen same method used on other devices, so it was common or familiar to me.

Clearly unlocking via developer options would be better.
[BLU R1 HD Guides, News, & Discussion] ramoin:
Update 6.6 successful, now what?

I updated the phone (it was successful after many attempts :mad: now I wish I had not persisted in updating) and came searching for a method to remove the amazon ads. Little did i expect this.

what works now is adb, fastboot, meta mode & factory mode which i learnt in the last few days.

even after the update I once managed to get into recovery menu but now I am not able to get into it again.

I get the picture of the horizontal android icon with the warning triangle and the text "No command"(failed recovery mode)

This is not my main phone and i can try out any steps or flash it. What is the best option? Phone is working properly.
[BLU R1 HD Guides, News, & Discussion] vampirefo:
No command is stock recovery, there is a certain hard key combo to get it to selection screen.

Right now, I don't know of a way to root the phone, hopefully the method others are working on will help you.
[BLU R1 HD Guides, News, & Discussion] :
Fair enough.

As for KingRoot, we already tried that, so the hunt continues.