yashsingh1/xdaforums huggingface dataset:
[Galaxy Grand Duos i9082 Android Development] Eugeneinbali:
Thanks for getting back with the explanation and suggestions Vip. However, I am not to fond of cm or uc browsers (a bit too noisy for me). My solution up until a couple of days ago was to share the video links to YouTube go. It worked well on all browsers except my favourite, VIA. I did get it to work by installing an app linking app, but this work around was a bit messy. Then I stumbled upon New Pipe (YouTube browser/streaming/downloader) from Fdroid. I installed it and it showed up in the share choices in VIA. It works well enough for a lightweight at about 12.5Mb installed. I can clean out all the overburden now.
[Galaxy Grand Duos i9082 Android Development] aeioo:
[MENTION=8986539]viplavrastogi[/MENTION] ,

Thank you so much for this great Viper OS ROM.

Look forward to the kernel patched to support MagiskHide!
[Galaxy Grand Duos i9082 Android Development] Adithya a:
Will 3g support work in this rom ?
[Galaxy Grand Duos i9082 Android Development] rachitha0753244:
I want oreo rom for GT I9082,Please help...
[Galaxy Grand Duos i9082 Android Development] asyeraphael:
the only nougat rom for i9082 that can screen records smoothly best rom so far :good::D

still waiting for oreo rom tho
[Galaxy Grand Duos i9082 Android Development] :
This is the best ROM I've tried.

Thank you so much.
[Galaxy Grand Duos i9082 Android Development] MDdaddz:
link not work, i nneed this asap ::(
[Galaxy Grand Duos i9082 Android Development] Twisted.Soul:
The download link is not working, do someone have mirror link? i need this rom so much, Thank you.
[Galaxy Grand Duos i9082 Android Development] Mike1432@:
Thanks for the rom bro... I love it😍
[Galaxy Grand Duos i9082 Android Development] Mike1432@:
What supersu version is available in this rom... Its stock on logo when i flash supersu... Thanks for reply😊
[Galaxy Grand Duos i9082 Android Development] ZhafKnight:
Thanks for rom! It run perfectly and I can play PUBG LITE very SMOOTH!
[Galaxy Grand Duos i9082 Android Development] Sayo_Sayoun:
So i was wondering if I put YouTube, Twitter, Instagram, Facebook, Chrome or Gmail on Greenify will the Notification from those will come or not!?
[Galaxy Grand Duos i9082 Android Development] Sayo_Sayoun:
Can you give the Easy screenshot apk your using
[Xiaomi Redmi 5A Guides, News, & Discussion] abdihaikal:
Did you meant: source.codeaurora.org/quic/le/kernel/lk
[Xiaomi Redmi 5A Guides, News, & Discussion] xaacnz:
Yes, they must have removed the original url.

debian@debian:~/lk$ git remote show origin | head
* remote origin
Fetch URL: https://source.codeaurora.org/kernel/lk/
Push URL: https://source.codeaurora.org/kernel/lk/
HEAD branch (remote HEAD is ambiguous, may be one of the following):
aosp/master
github-kernel_lk/aosp/master
Remote branches:
APSS.FSM.3.0 tracked
APSS.FSM.3.0.r5.1.1 tracked
APSS.FSM.3.0.r6 tracked
[Xiaomi Redmi 5A Guides, News, & Discussion] utumno00:
Thank you for the method.

I tried ot and flashed TWRP only, but when I use it to flash custom ROMS, the device wont boot. It will show for a millisecond a picture of penguin and then goes off.

Any ideas??

Thanks
[Xiaomi Redmi 5A Guides, News, & Discussion] xaacnz:
You need to patch boot.img inside those ROMS by appending 4k block which begins with 0x30, 0x83, 0x19, 0x89, 0x64
[Xiaomi Redmi 5A Guides, News, & Discussion] utumno00:
I am amazed and I dont know how to tell that I thank you. Can you help me? I patch and i flash what?
[Xiaomi Redmi 5A Guides, News, & Discussion] xaacnz:
Let's say you want flash https://xdaforums.com/android/development/rom-crdroid-v3-8-5-redmi-5a-t3752066

1 download crDroidAndroid-7.1.2-20180218-riva-v3.8.5.zip

2 extract boot.img from crDroidAndroid-7.1.2-20180218-riva-v3.8.5.zip

3 patch the extracted boot.img just like what you did with twrp-3.2.1-0-riva.img

4 put the patched boot.img back in crDroidAndroid-7.1.2-20180218-riva-v3.8.5.zip

5 flash the modified crDroidAndroid-7.1.2-20180218-riva-v3.8.5.zip
[Xiaomi Redmi 5A Guides, News, & Discussion] utumno00:
Success!!

I tried with Viper ROM though, as it was the one I had already downloaded.

Is the crDroid the one that you suggest?

Have you tried the Oreo one?

I want to thank you one more time for the help.

Greetings from Greece and Colombia.
[Xiaomi Redmi 5A Guides, News, & Discussion] xaacnz:
I'm glad I was able to help.

I have used neither of them, so I can't speak for them.

Currently, I'm using a custom build ROM based on LineageOS 15.1
[Xiaomi Redmi 5A Guides, News, & Discussion] boyrobbie:
Can you share your own rom base on LOS 15.1? Please :)
[Xiaomi Redmi 5A Guides, News, & Discussion] xaacnz:
It's has some custom modifications like swapping back & recent app buttons as I'm left handed, I will try to build a more generic one once I get some free time.
[Xiaomi Redmi 5A Guides, News, & Discussion] SkandaH:
[MENTION=9061995]xaacnz[/MENTION]

That's a very informative post :good:

Perhaps you can dump the firmware related partitions before and after unlocking the bootloader 'officially', so that it can be easier for us to find (possible) ways to unlock (not bypass) devices based on Xiaomi's implementation of Qualcomm LK.

I'm tagging [MENTION=4544860]osm0sis[/MENTION] to take part in the discussion.
[Xiaomi Redmi 5A Guides, News, & Discussion] boyrobbie:
Thanks for your kindness, i'm waiting for that ✌️
[Xiaomi Redmi 5A Guides, News, & Discussion] xaacnz:
All stages of bootloader except PBL can be found in fastboot ROM, and PBL can be obtained by using testpoint: https://alephsecurity.com/2018/01/22/qualcomm-edl-1/

The 'official' unlocking process is:

1 submit cpuid which is eFused in soc to Xiaomi.

2 Xiaomi sign the cpuid with it's private RSA key.

3 write the signature to 'devinfo' partition at offset 0xE4.

The verification process is:

1 read the signature from 'devinfo' partition.

2 verify it using public key embedded in aboot.

3 decode the verification result as base64.

4 compare the decoded value with cpuid read from soc, bootloader is unlocked if it's the same.

There are some bugs in verification process:

1 signature is padded using PKCS #1 v1.5, but verification process didn't check plaintext size, thus any plaintext starts with desired prefix will unlock bootloader, effectively reducing the complexity of brute force.

2 any value outside of base64's 64 characters table is treated as 'A', this reduce brute force complexity further.

3 base64 decode will not terminate until '=' is encountered, this create opportunity for buffer overrun, though input(RSA verification result) is hard to control.

4 base64 decode is skipped if first byte of PKCS #1 v1.5 payload is zero, this resulting in comparison of uninitialized stack value to cpuid and maybe exploitable to unlock phone.

I'm shocked that one can write so many bugs in such short function.
[Xiaomi Redmi 5A Guides, News, & Discussion] LordShenron:
Bro! we have been using the build you uploaded on android file host on may 16 2018. The build you uploaded has all bugs fixed in lineage OS 15.1. Some developers of Redmi 5a(RIVA) has been trying to contact you. They need the source of your ROM and kernel you uploaded on 16 may. Please reply.
[Xiaomi Redmi 5A Guides, News, & Discussion] 33bca:
Would you mind sharing your device and kernel sources which you are using? We all have issues with audio which are related to kernel.

It would be great for development on Redmi 5A in general if you could share your sources with the community.

If you don't want to share them for any reason, you could maybe help us fixing the speaker bug on our sources: https://github.com/redmidevs/android_kernel_xiaomi_msm8917
[Xiaomi Redmi 5A Guides, News, & Discussion] xaacnz:
Here it is: lineage-15.1-20180515-UNOFFICIAL-riva.zip

Kernel source: https://github.com/xaacnz/android_kernel_xiaomi_msm8917

I tried to post this ROM on https://xdaforums.com/xiaomi-redmi-5a/development , but my account don't have permission to do that, so I have to post it here in case anyone is interested.
[Xiaomi Redmi 5A Guides, News, & Discussion] LordShenron:
We have been trying to get around a bug in our builds. Your sources will be a great help for whole riva community :) Thank you so much. :)
[Xiaomi Redmi 5A Guides, News, & Discussion] alok pupun:
Thanks

Thanks again.
[Xiaomi Redmi 5A Guides, News, & Discussion] SaiFeRr:
Hello!

I am not very familliar with programming or ROM development.

Could you please explain a bit more specific about NOTE1, how to append 4K block?

I don't quite understand where should I add it. At the beginning of the image, at the end or at the specific place in that file?

And 4k block means 4 kilobytes? Like 4096 bytes?

And if I need to flash custom room should I change something in xml files to? Or just append will be sufficient?

Please help, I need to flash that Riva finally!
[Xiaomi Redmi 5A Guides, News, & Discussion] boyrobbie:
Thank you so much, im facing a few bugs :

- Can't install magisk (cannot mount /vendor)

- Screen recorder laggy, sometimes can't record

- Audio have some noise on the first launch

- GPS config must be manually write out
[Xiaomi Redmi 5A Guides, News, & Discussion] jasonhelene:
Can someone please create a tool that unlocks xiaomi redmi 5a? or something? because man their new unlock system is totally bad and i cant unlock mine no matter what.
[Xiaomi Redmi 5A Guides, News, & Discussion] Ripper1412:
Need a video guide •-•

Can you make a video guide? I am not a dev and cuz of that I've no idea where I've to put these commands to use :'):confused:
[Xiaomi Redmi 5A Guides, News, & Discussion] yeutaodi:
you need file UNBL redmi 5a riva . You can share for me ?
[Xiaomi Redmi 5A Guides, News, & Discussion] lz4:
Good day!

Thanks for your job. Please tell what recovery you use? How you flash it? A have a problem phone with locked b.loader and bloked miacc.
[Xiaomi Redmi 5A Guides, News, & Discussion] glasseffects:
To the developer, please offer us some assitance with unlocking bootloader of Redmi 5A. If its possible to post a tutorial or a video, it would be a great help!

Thanks for sharing.
[Xiaomi Redmi 5A Guides, News, & Discussion] ash_pipaliya:
Can you make modded emmc_appsboot.mbn like in redmi note 3 like this ?

???????????????

http://en.miui.com/thread-253680-1-1.html

Bcoz I can not unlock my redmi 5A (86012 while account bind)
[Xiaomi Redmi 5A Guides, News, & Discussion] dakocha:
Append where? At the end of the file?? Because it didn't work. It maybe because I'm on MIUI 9.5?? Please update the post with some relevant answers.

P.S I'd be really glad if you uploaded MIUI 8.5 files (aboot and boot)

TIA
[Xiaomi Redmi 5A Guides, News, & Discussion] ArbaniZain:
NOTE1: append should work in most case, but not always. the corrected place to write

still i cant understand man, do you mean editing pagesize from 2048 to 13072 or how :confused: ?

please reply
[Xiaomi Redmi 5A Guides, News, & Discussion] ArbaniZain:
bypass bootloader redmi 5a

bro , have you done with this ? please teach me
[Xiaomi Redmi 5A Guides, News, & Discussion] abdihaikal:
I hope and i'm sure you have time to learn about low-level programming language.

So we can discuss more deeply about this
[Xiaomi Redmi 5A Guides, News, & Discussion] ArbaniZain:
Okay bro, but atleast, what should i do and how please tell me
[Xiaomi Redmi 5A Guides, News, & Discussion] SileneliS:
Unsuccessful

Hi there.

First, thank you xaacnz for sharing the reverse engineering process. Very interesting !

There is a tiny typo, this command requires a backslash at the end :

QSaharaServer.exe -p \\.\COM10 -s 13:prog_emmc_firehose_8917_ddr.mbn -b tmp[B]\[/B]

All steps went without any error, flashing via edl seems to work:

23:48:21: INFO: ==============================================================
23:48:21: INFO: Files used and their paths
23:48:21: INFO: 1 'C:\...\port_trace.txt'
23:48:21: INFO: 2 'C:\...\twrp.xml'
23:48:21: INFO: 3 'C:\...\recovery.img'

23:48:21: INFO: _ (done)
23:48:21: INFO: | |
23:48:21: INFO: __| | ___ _ __ ___
23:48:21: INFO: / _` |/ _ \| '_ \ / _ \
23:48:21: INFO: | (_| | (_) | | | | __/
23:48:21: INFO: \__,_|\___/|_| |_|\___|
23:48:21: INFO: {All Finished Successfully}

23:48:21: INFO: Overall to target 2.324 seconds (14.53 MBps)

btw, you are 10 years younger than me, from the date you put into the spashscreen first bytes :p

But when starting in recovery mode, the phone is stuck with the penguin splash image. :rolleyes:

An "adb reboot recovery" sends it into MI-recovery tool, not twrp.

As I get penguin splash screen, I guess splash screen modification is OK.

Maybe I did something wrong with the twrp image ?

I added 4096 bytes to twrp-3.2.1-0-riva.img , beginning with 0x30, 0x83, 0x19, 0x89, 0x64, and then only 0x00. Resulting in a 35,409,920 bytes file (still a multiple a 4096 bytes).

Here are my files (temporary 30 days links)

twrp: dl.free.fr/j5bfYspMC

splash: dl.free.fr/q1bYPAEoU

Any help to figure out what is wrong with these files is welcome !

Note: my redmi 5a is brand new. Maybe Xiaomi fixed some bugs into aboot ?
[Xiaomi Redmi 5A Guides, News, & Discussion] r6680jc:
Isn't it possible to just patch/ modify the bootloader itself (emmc_appsboot) to ignore/ skip the check altogether?

Or maybe just get bootloader (emmc_aboot) dump/ backup from an unlocked Redmi 5A then flash it to a locked Redmi 5A to get "instant" bootloader unlock?

EDL mode can be accessed without test point; by using modified USB cable, reboot to EDL from fastboot mode.
[Xiaomi Redmi 5A Guides, News, & Discussion] SileneliS:
I guess aboot is write protected one way or another, even from EDL ?

Copying stuff from an unlock phone would not help : When Xiaomi unlock bootloader, they sign the *unique* phone identifier fused in the chip with their private key. Each signature is specific to one phone and won't work for any other.

I am so disappointed not being able to unlock this phone: I "get a error[-1]:unknown error" with the official unlocker tool immediately after connection (tried 2 accounts, 2 labptops, a bunch of VPN, all guides).

And this exploit does not work for me neither. :confused:

I am considering reselling it for a more hackable one.

Note: always the same same issue with the unlocker, connecting is fine, retreiving info from the phone is fine, and then fail to connect to "unlockApi" :

DEBUG <12:19:01.759,T:9484> : product: riva
finished. total time: 0.002s
DEBUG <12:19:23.150,T:23428> : check right function start
DEBUG <12:19:23.155,T:23428> : Begin login unlockApi
ERROR <12:19:33.171,T:23428> : curl error[56]: Failure when receiving data from the peer
ERROR <12:19:33.171,T:23428> : Fail to login unlockApi
ERROR <12:19:33.171,T:14088> : code:-1 error:Couldn't get info[-1:Unknown error]
[Xiaomi Redmi 5A Guides, News, & Discussion] r6680jc:
Aboot isn't really write protected, that's why we can relock Xiaomi phones by flashing official ROMs that contain aboot image file.

I'm aware of that, with unlocked aboot from other phones or even patched aboot we would also need patched SBL (or is it XBL on Redmi 5A?) so the signature of aboot won't matter.

I haven't try this exploit, but it could possibly be patched on newer MIUI version.

So you've waited 360 hours (15 days) and end up cannot unlocking your phone?

I'm still waiting about 280 hours (waiting time got reset because I tried stupid things).
[Xiaomi Redmi 5A Guides, News, & Discussion] arwazpasha786:
any one videos tutorials for this ...help...i want to unlock my bootloder...without permission....i open back cover for edl ponit
[Xiaomi Redmi 5A Guides, News, & Discussion] R00f:
it is possible?
[Xiaomi Redmi 5A Guides, News, & Discussion] adityam0338:
Will this method work with MIUI 10?? Or the latest build?? I cant seem to overcome this error in the MI flash tool "Current Account can not unlock this device." Its so frustating!!! Plz provide some instructions if possible!
[Xiaomi Redmi 5A Guides, News, & Discussion] gyarados025:
Is ut still on MIUI20 developer rom..? I am stable build , and my mi account cant bide to my device (checkt all the things and find my device show online). MI Unlock tool gives this error at 99%.
[Xiaomi Redmi 5A Guides, News, & Discussion] adityam0338:
Yes I am still using MIUI 10 "Beta" or as the l MI website said beta build. But i tried it on MIUI 9.5.2 stable as well as 9.6.2.0 stable. It didn't work though. Got the same error in flash tool that "Current account cant unlock this device."
[Xiaomi Redmi 5A Guides, News, & Discussion] Ripper1412:
I won't ask for much but can you post a video guide please?
[Xiaomi Redmi 5A Guides, News, & Discussion] raisaab198:
Complicated

Its very complicated for me.. Please make a video and share a link in this forum... Thank you

---------- Post added at 04:51 AM ---------- Previous post was at 04:50 AM ----------

Please make a video
[Xiaomi Redmi 5A Guides, News, & Discussion] Ripper1412:
Wish people were actually helpful, I don't think making a guide will take a lot of time but no one cares. :')
[Xiaomi Redmi 5A Guides, News, & Discussion] Crukk11:
can someone make a video.hehehhe im newbie
[Xiaomi Redmi 5A Guides, News, & Discussion] SileneliS:
I managed to unlock my Redmi 5a following the official procedure, but using another laptop: with windows 10 and not behind a firewall. My advice if you are stuck: try with other PCs.
[Xiaomi Redmi 5A Guides, News, & Discussion] kaitozaki:
Please...make a video...or a simple file to push from edl mode...i have been waiting for a week...
[Xiaomi Redmi 5A Guides, News, & Discussion] pcjoshua:
Cannot unlock!!!!!!!!

Hi, I followed your steps and the qsaharaserver gave this messages:

13:38:33: ERROR: function: sahara_start:458 Matching input image for ID 13 not found

13:38:33: ERROR: function: sahara_main:924 Sahara protocol error

13:38:33: ERROR: function: main:303 Uploading Image using Sahara protocol failed

and after these I'm stuck...

does the version of MIUI matter? help...
[Xiaomi Redmi 5A Guides, News, & Discussion] Anshu lakra:
Help ( redmi 5a )

Plz send the modified ( emmc_appsboot.mbn ) of redmi 5a so i can unlock bootloader . Please help guys
[Xiaomi Redmi 5A Guides, News, & Discussion] Karan1605y:
Please make a video about unlocking the bootloader of Redmi 5a with your XDA method and give me the video link in my email kk4458839@gmail.com please please please do it
[Xiaomi Redmi 5A Guides, News, & Discussion] saurabh6377:
SOLVED

Solved

I didn't understood perquisites,

1. How to see device state green/red/yellow?

2. Which magic number is to be changed?
[Xiaomi Redmi 5A Guides, News, & Discussion] saurabh6377:
Thank you, I successfully edited splash.img and twrp and boot image files.

I used hex editor to edit the files (xxd on Linux and hxd on windows)

This guide worked very well. Now flashed custom ROM.
[Xiaomi Redmi 5A Guides, News, & Discussion] isonupandit11:
Can you please help me.i can not understand how to append 4k block:confused:.I am new in programming.I had read this post at least 20 times in 2 months.please help if you can.
[Xiaomi Redmi 5A Guides, News, & Discussion] saurabh6377:
I recommend you to first get familier with hex editors and know how they works to prevent any damage to your device, YOU ARE DOING EVERYTHING HERE AT YOUR OWN RISK

First make sure you flashed the rom he said (riva_images_V8.5.7.0.NCKCNED_20171025.0000.00_7.1_ cn) using edl

Download any hex editor, it is available for linux/windows/android (I used HxD for windows), append simply means add.

open splash.img in HxD and look at right side, in the beginning replace "SPLASH!!" with the number in the guide ("19890604") and save

To edit twrp and boot image, open them in hex editor, scroll to end. On left hand side you will see numbers written in hexadecimal base. Switch to insert mode (using keyboard key). Then add the numbers (DO NOT TOUCH THE EXISTING NUMBERS) he said (0x30, 0x83, 0x19, 0x89, 0x64) followed by zeroes (0x00) until you write 4096 digits. Save the files then follow the process.

Note that flashing custom kernels or magisk will brick your device, you can revert by restoring a twrp backup or flashing already patched boot image. To root you need pre rooted boot image, then edit the rooted boot image so it can boot.

I attached reference file which contains everything you have to add at the end to the image files (twrp and boot), so that you understand how you gonna edit.
[Xiaomi Redmi 5A Guides, News, & Discussion] isonupandit11:
Thanks i will try it soon.:)
[Xiaomi Redmi 5A Guides, News, & Discussion] isonupandit11:
Successfully installed pixel experience rom but how can i patch the boot.img to get root working because i could not find any pre rooted rom for this device.

Suggest if you now any rom which is pre rooted.
[Xiaomi Redmi 5A Guides, News, & Discussion] alecxs:
Did you try SuperSU-v2.79-SR3.zip or Magisk? Magisk should work when you modify patched_boot.img like you did with boot.img
[Xiaomi Redmi 5A Guides, News, & Discussion] elemefaaoo:
https://xdaforums.com/xiaomi-redmi-5a/how-to/guide-custom-kernel-root-unlocking-t3911660
[Xiaomi Redmi 5A Guides, News, & Discussion] isonupandit11:
Thanks it worked with patched_boot.img.succesfully installed magisk.:)
[Xiaomi Redmi 5A Guides, News, & Discussion] lavishdeveloper:
Stuck in penguin image.

Help me dude! I am stucking in penguin image. Boot to recovery is working . Twrp is working. But device not booting. Help guys!:(
[Xiaomi Redmi 5A Guides, News, & Discussion] saurabh6377:
You need to append to boot image also. If you like miui you may try xiaomi.eu if you want. And one thing why don't you wait 15 days and unlock instead of messing up your device.
[Xiaomi Redmi 5A Guides, News, & Discussion] lavishkumar:
Not unlocking.

I have already waited for 6 months. But by bootloader still locked. Mi unlock tool always shows "Current account cannot unlock this device". And error in developer option when adding the account Couldn't add error 86012 or can't verify....
[Xiaomi Redmi 5A Guides, News, & Discussion] saurabh6377:
I understand the frustration since I had the same issue I even flashed persist.img and unlocked but then realised fastboot commands won't work but mi unlock status showing unlocked, and then used this guide.

Were you able to boot stock miui after flashing twrp?

If you see penguin for a millisecond then you need to append 4k block to boot image. On Linux just do

printf '\x30\x83\x19\x89\x64' | dd of=/path/to/boot.img ibs=4096 conv=fsync,notrunc oflag=append

, and if you are on windows just install a small Linux distro or emulator which should do the job, I didn't need any emulator since I use Ubuntu as my default OS.

And flash the modified boot image with twrp. And if you are in bootloop then flash another custom ROM (or stock miui) after doing usual wipe and don't forget to append 4k block.
[Xiaomi Redmi 5A Guides, News, & Discussion] lavishkumar:
Yes. I see the penguin image but not for a millisecond. It shows penguin image till i remove battery or boot my device again.

Sorry for my English.
[Xiaomi Redmi 5A Guides, News, & Discussion] saurabh6377:
Hmm, it is due to dm-verity. Use rooted boot image (magisk) or a custom kernel compatible with miui, here is my guide to flash magisk (or custom kernel) with locked bl https://xdaforums.com/xiaomi-redmi-5a/how-to/guide-custom-kernel-root-unlocking-t3911660
[Xiaomi Redmi 5A Guides, News, & Discussion] lavishkumar:
Sensors not working.

Successfully installed pixel xperience 9.0 rom and installed magisk and edxposed. But when i tried out sensors Accelerometer and compass . They are not working. I downloaded sensor box it shows "x" icon on these sensors. Now tell me how to fix.
[Xiaomi Redmi 5A Guides, News, & Discussion] alecxs:
wrong thread. ask the developers of your ROM
[Xiaomi Redmi 5A Guides, News, & Discussion] isonupandit11:
Flash fixsensors.zip

You can find on

REDMI 5A | OFFICIAL™

Redmi 5A (riva) - Official Telegram Group

https://t.me/Redmi_5a