yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
Your stock recovery is type 0 and has the dtb after the ramdisk too.

I guess that must be ok for your device, but it seems non-standard.

I'll take another look.
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
I'm still scratching my head.

In ye olde times pagesize (quantization on Android images) was 4096.

Then they became appalled at the waste of potentially 2048 bytes on a 30 Meg image.

So some folks changed the pagesize to 4096. (Savings!)

Then people decided to park non-header-referenced things after the image.

Oh, boy.

Like AVB0 signatures. These were quantized to 4096 even if the page size was 2048.

So now your (stock) image puts the DTB after the referenced parts of the image.

It's quantized to 2048 (the page size).

It also has this "DTBH" header that I've never seen before.

But we do find 5 (five) dtbs (just in case you want to load this on another model).

And after that in the stock image, we find (at a 2048 quantization) a "SEANDROIDENFORCESignerVer02".

Who the heck knows what that is.
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
Then there is the obvious issue: Youre recovery is over 32 MB.

Is the partition that big?
[Samsung Galaxy A7 (2018) Questions & Answers] voskresenie:
surely I need to chack partition size.

I'm trying to get root..
[Samsung Galaxy A7 (2018) Questions & Answers] voskresenie:
GPT fdisk (gdisk) version 0.8.4 Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk mmcblk0: 61071360 sectors, 29.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 52444E41-494F-2044-4D4D-43204449534B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 61071326
Partitions will be aligned on 1024-sector boundaries
Total free space is 18365 sectors (9.0 MiB)
Number Start (sector) End (sector) Size Code Name
1 8192 16383 4.0 MiB 0700 BOTA0
2 16384 24575 4.0 MiB 0700 BOTA1
3 24576 65535 20.0 MiB 0700 EFS
4 65536 81919 8.0 MiB 0700 CPEFS
5 81920 90111 4.0 MiB 0700 m9kefs1
6 90112 98303 4.0 MiB 0700 m9kefs2
7 98304 106495 4.0 MiB 0700 m9kefs3
8 106496 108543 1024.0 KiB 0700 NAD_REFER
9 108544 124927 8.0 MiB 0700 PARAM
10 124928 190463 32.0 MiB 0700 BOOT
11 190464 268287 38.0 MiB 0700 RECOVERY
12 268288 272383 2.0 MiB 0700 DTBO
13 272384 452607 88.0 MiB 0700 RADIO
14 452608 453631 512.0 KiB 0700 PERSISTENT
15 453632 455679 1024.0 KiB 0700 MISC
16 455680 463871 4.0 MiB 0700 STEADY
17 463872 475135 5.5 MiB 0700 RESERVED2
18 475136 6422527 2.8 GiB 0700 SYSTEM
19 6422528 7454719 504.0 MiB 0700 VENDOR
20 7454720 7864319 200.0 MiB 0700 ODM
21 7864320 8478719 300.0 MiB 0700 CACHE
22 8478720 8499199 10.0 MiB 0700 HIDDEN
23 8499200 8540159 20.0 MiB 0700 OMR
24 8540160 8550399 5.0 MiB 0700 CP_DEBUG
25 8550400 8591359 20.0 MiB 0700 NAD_FW
26 8591360 61061119 25.0 GiB 0700 USERDATA

as you can see, RECOVERY partition is bigger then 38mb.

I have no idea what the problem is :(
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
Ok, looking around it seems like that error is just what it says.

There seems to be some hard limit on the size of ramdisks for recovery.

ramdisk 14,940,546
ungzipped ramdisk 34,343,936

I'm not sure if they mean the gzipped ramdisk or the ungzipped ramdisk (raw cpio).

You've got the kitchen sink in there.

How about getting rid of 99% of that terminfo junk?

You really want the Python stuff?
[Samsung Galaxy A7 (2018) Questions & Answers] voskresenie:
I tried to make ramdisk smaller today, but I failed.

I couldn't figure out which files were important and which ones weren't.

Actually, I'm used to using linux, but I know very little about Android system

Can you tell me what I should do or search?
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
@voskresenie

Well, here's a shot for you. I removed all the terminfo and Python stuff.

I had to manually extract the DTB and stick it on the end.

Give it a shot. It weighs in at less than 32MB
[Samsung Galaxy A7 (2018) Questions & Answers] voskresenie:
now it doesn't say "could not do normal boot invalid ramdisk length", but I can see black screen and irregularly flashing backlight.

is it possible that I solve the ramdisk size problem in the source code?

I think I need to change setting and rebuild TWRP..
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
Hmm, did you check to see if you had ADB?
[Samsung Galaxy A7 (2018) Questions & Answers] voskresenie:
adb doesn't work.

actually, windows says USB device recognition failure :(
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
It could be that I screwed up or that there was an actual problem in your TWRP build.

Are you testing this by fastboot boot recovery.img?

Or are you doing fastboot flash recovery recovery.img?

If you are doing the first one have you tried with the stock recovery image to make sure that works?
[Samsung Galaxy A7 (2018) Questions & Answers] voskresenie:
most of samsung devices don't have fastboot.

instead of fastboot, they have download mode.

I think the work that i do is play same role fastboot flash recovery recovery.img

It probably looks like separating partitions by file name.

If I use a name other than recovery.img or boot.img, the flash fails.
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
Did I mention that I hate Samsung and wouldn't take one if you gave it to me?

I did mention that the stock has some custom signature at the end.

Try booting the stock recovery file that you posted like you are trying to boot your TWRP. Does it work?

If it works you can try truncating it yourself to 27,123,712 bytes, 0x019DE000

See if that runs.

If you can't truncate it, I could post it.
[Samsung Galaxy A7 (2018) Questions & Answers] voskresenie:
Stock recovery work whan flashed like twrp.

I tried to cut them but my binary editor say "cut block too large".

is there any other way to cut this?
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
This is the stock recovery image with the last 544 bytes removed.

The removed bit is the "SEANDROIDENFORCESignerVer02"

I've never run into that.
[Samsung Galaxy A7 (2018) Questions & Answers] voskresenie:
truncated file work well.
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
I'm thinking that there is something wrong with your TWRP itself.

The kernel and the dtb are identical to stock.

You wouldn't know where/if your device has a UART output?

That would make life easier.

Mmm, I might try to knock you out a custom recovery if I get around to it. Maybe.
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
Erm, I looked at your stock.img. They're still using /proc/kernel/config.

I don't know how much I want to get mixed up with this.

In any case, here is a stock recovery modified to give you rooted? ADB.

Please confirm if you see ADB and if it's rooted (#).
[Samsung Galaxy A7 (2018) Questions & Answers] voskresenie:
adb is work, but adb shell doesn't work.

anyway, I didn't expect to be able to run adb in the stock recovery.

that's surprising!

platform-tools_r33.0.3-windows\platform-tools>adb shell
adbd F 01-05 04:01:44 2596 2596 shell_service.cpp:363] Could not set SELinux context for subprocess
libc: Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 2596 (adbd), pid 2596 (adbd)

platform-tools_r33.0.3-windows\platform-tools>adb devices
List of devices attached
000007541d3bf434 recovery
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
Getting a rooted ADB running in recovery is about all that I ask of a recovery.

I just did some trivial patching on prop.default, mostly as a test.

I usually use a patched adbd.

I'm scratching my head over that shell error. Try these:

C:\>adb pull system/usr/keychars/Generic.kcm
C:\>adb pull data/system/packages.xml
[Samsung Galaxy A7 (2018) Questions & Answers] voskresenie:
sadly both of them don't work :(

C:\platform-tools_r33.0.3-windows\platform-tools>adb pull system/usr/keychars/Generic.kcm
adb: error: failed to stat remote object 'system/usr/keychars/Generic.kcm': No such file or directory

C:\platform-tools_r33.0.3-windows\platform-tools>adb pull data/system/packages.xml
adb: error: failed to stat remote object 'data/system/packages.xml': No such file or directory
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
Try this:

Edit: Oh, yeah, those adb pulls, probably nothing was mounted anyway.
[Samsung Galaxy A7 (2018) Questions & Answers] voskresenie:
adb2.img show black screen and don't work anything.
[Samsung Galaxy A7 (2018) Questions & Answers] voskresenie:
I think so too. I used device tree which created by script.

I should have paid more attention...

I have no idea about my device have UART (I know about UART, but I've never used it on an Android device. and I don't have UART cable now.)

My vacation will start soon. I'll be able to spend a lot of time on this work.

I really want to complite this.
[Samsung Galaxy A7 (2018) Questions & Answers] Renate:
Well, don't waste it all on this!

I just spent the last few hours trying to fix my own recovery.

I have a new system for automatically building images when new updates come along.

Switching over from the old system slipped in a bug.

No, this was not what happened with your adb2.img

That had a patch to adbd and init.rc

I'm not sure what went wrong.
[Samsung Galaxy A7 (2018) Questions & Answers] voskresenie:
@Renate

Finally i did it!!!!

There was not only one problem.

I was work on wrong branch because I refered wrong device infomation on internet.

The device was released in 8.0, not 9.0

and dt.img and kernel extracted from stock recovery didn't work.

I just successfully booted with dt.img and kernel built from 8.0 source code.

I couldn't have done this without your help. thank you so much!
[Android Q&A, Help & Troubleshooting] slx23:
I am trying to install a custom ROM on a Huawei P Smart FIG-LX1. I have a system.img that i should flash to the system partition.

So when i try to flash the image i have two system partitions:

Ona named "System" and one named "System Image".

If i try flashing it to the "System" partition i get this error:

[IMAGE FLASH STARTED]
Image to flash: '/external_sd/system.img'
Calculating restore details...
E:Cannot flash images to file systems

If this can help i have wiped the system partition containing the original ROM.
[Android Q&A, Help & Troubleshooting] alecxs:
useless double posts

https://xdaforums.com/t/cant-flash-...led-remote-sparse-flash-write-failure.4536295

https://xdaforums.com/t/size-of-image-is-larger-than-the-target-device-in-twrp.4536645
[Redmi Note 11 (spes/spesn)] LolFlasherNoob:
<Moderator Edit>: Combined four How To Guide threads into one.

Post #2 - LATEST FLASHING GUIDE FOR TWRP AND OTHER RECOVERY [Spes/Spesn] Redmi Note 11[WINDOWS-Only]

Post #3 - LATEST FLASHING GUIDE FOR TWRP AND OTHER RECOVERY [Spes/Spesn] Redmi Note 11[LINUX-Only]

Post #4 - UNIVERSAL ROM FLASHING GUIDE FOR ALL ROMS [Windows-Only]

Post #5 - UNIVERSAL ROM FLASHING GUIDE FOR ALL ROMS [Linux-Only]
[Redmi Note 11 (spes/spesn)] LolFlasherNoob:
View attachment 5808473

First of all unlock bootloader of your device . Search net for more info.

After this install adb drivers from here: https://xdaforums.com/t/tool-window...reborn-v2-0-adb-fastboot-and-drivers.3854109/

Choose skip install for adb and install google drivers.

Connect your device in fastboot mode to your pc.

Go into device manager , right click on unrecognized android device , choose update drivers , let me pick from a list of drivers , select adb drivers and click install.

Then go to your custom rom download thread and check the date of rom file(In this case derpfest).View attachment 5808621

View attachment 5808619

Check the date of file.

Then go to xiaomifirmwareupdater.com and select rom archive and select your device.View attachment 5808625

Then MIUI downloads page will appear. type fastboot in search and look for a MIUI global version released

as the same or very close to the Custom ROM date (in this case it is this)View attachment 5808641

Download the fastboot version according to the date.

Go into the stock rom folder and double click on flash_all.bat(all data will be lost) .

Or open cmd in the folder and type flash_all.bat in cmd and hit enter.(This method allows to look for errors)

View attachment 5808645

A cmd window will popup with fastboot commands automatically and after complete flashing of rom will close automatically. (approx. 20-25 mins)

Let the device boot into MIUI.

Once it boots power it off . Then press the vol down + power button until fastboot in orange letters appear.

Then follow the twrp flashing guide from here

Then flash the ROM according to the instructions.

NOTE:

Make sure to always extract and move the stock rom folder in root of C: drive (this helps avoid flashing errors)The path should look something like this:

C:\spes_global_images_YourVersionhere

Then flash the stock rom.

Clean Flashing a ROM:

I hope you have followed the entire guide above before doing this step.

Reboot to recovery.

Format data.

Flash ROM file.

Wipe Dalvik Cache.

Reboot and enjoy.

Everytime you do a clean flash, you must redo all the steps above.

If a rom does not include flashing instructions, it requires a clean flash.

If rom mentions clean flash and not wiping of anything else then dont be smart to wipe anything unecessary.

If you get a error like this: assert failed _dynamic partitions package_extract_file(dynamic_partitions_op_list) ERROR 1

Then re do this guide from start and re do all the steps in the guide and when it comes to flashing twrp, then use twrp 3.6.1 to flash rom(if your rom mentions to use a specific recovery then use that instead)

Always flash magisk after the first boot of your rom

If mtp not working or device not getting detected as a portable device in any recovery then watch this guide here: GUIDE

Do not replace the recovery or try to update recovery that comes with roms. This can brick your device

Enjoy!
[Redmi Note 11 (spes/spesn)] LolFlasherNoob:
Prerequisites:

Ubuntu/Debian/Ubuntu-Based Distros:

Open terminal

Type sudo apt install adb

Once that is installed.

Type sudo apt install fastboot.

Done.

Fedora:

Open terminal.

Type sudo dnf install android-tools.

Let it install and done.

OpenSUSE:

Download this official package from here according to your version :

https://software.opensuse.org/download.html?project=hardware&package=android-tools

(Use either one the add repository and install manually or grab binary packages directly options.)

First of all unlock bootloader of your device . Search net for more info.

Then go to your custom rom download thread and check the date of rom file(In this case derpfest).

Check the date of file.

Then go to xiaomifirmwareupdater.com and select rom archive and select your device.

Then MIUI downloads page will appear. type fastboot in search and look for a MIUI global version released

as the same or very close to the Custom ROM date (in this case it is this)

Download the fastboot version according to the date.

Go into the stock rom folder and right click in empty area then select open terminal here then type this command:

./flash_all.sh

A terminal window will popup with fastboot commands automatically and after complete flashing of rom will close automatically. (approx. 20-25 mins)

Let the device boot into MIUI.

Once it boots power it off . Then press the vol down + power button until fastboot in orange letters appear.

Then follow the twrp flashing guide from here

Then flash the ROM according to the instructions.

NOTE:

Make sure to always extract and move the stock rom folder in root of home directory (this helps avoid flashing errors)The path should look something like this:

home\spes_global_images_YourVersionhere

Then flash the stock rom.

Clean Flashing a ROM:

I hope you have followed the entire guide above before doing this step.

Reboot to recovery.

Format data.

Flash ROM file.

Wipe Dalvik Cache.

Reboot and enjoy.

Everytime you do a clean flash, you must redo all the steps above.

If a rom does not include flashing instructions, it requires a clean flash.

If rom mentions clean flash and not wiping of anything else then dont be smart to wipe anything unecessary.

If you get a error like this: assert failed _dynamic partitions package_extract_file(dynamic_partitions_op_list) ERROR 1

Then re do this guide from start and re do all the steps in the guide and when it comes to flashing twrp, then use twrp 3.6.1 to flash rom(if your rom mentions to use a specific recovery then use that instead)

If mtp not working or device not getting detected as a portable device in any recovery then watch this guide here: GUIDE

Always flash magisk after the first boot of your rom

Do not replace the recovery or try to update recovery that comes with roms. This can brick your device.

Enjoy!
[Redmi Note 11 (spes/spesn)] NeoSDAP:
Title: Windows-only

Prerequisites: Linux-based OS

What?
[Redmi Note 11 (spes/spesn)] LolFlasherNoob:
edited thanks!
[Redmi Note 11 (spes/spesn)] roirraW "edor" ehT:
@LolFlasherNoob Please see the PM I just sent you and let me know your response.

@notBradPitt Please help us in the future by using the "Report" button near the bottom right corner of a post.

Thank you,

@roirraW "edor" ehT
[Redmi Note 11 (spes/spesn)] xiasanx:
after i just flash TWRP. can i just install the magisk there?
[Redmi Note 11 (spes/spesn)] LolFlasherNoob:
What do you mean ?
[Redmi Note 11 (spes/spesn)] Waltuh:
Does this work on Android 11?

My last phone became a brick.
[Redmi Note 11 (spes/spesn)] LolFlasherNoob:
what twrp ? yes
[Redmi Note 11 (spes/spesn)] luistro:
Twrp no mtp no detect SD card intall conecting pendrive with USB c yo USB adapter
[Redmi Note 11 (spes/spesn)] LolFlasherNoob:
which twrp , sd card must be formatted as fat32. yeah mtp works check mtp fix link in twrp.sd detect work on my spes.
[Redmi Note 11 (spes/spesn)] wasteoinc:
Hi, I have a remdi note 11 unlocked bootloader, flashed MIUI13 (android 12) and then fastbooted to twrp . From there I tried to flash TWRP 3.7 (for android 12) using Method 2 , it flashed ok but now phone only boots to fastboot , and when I do again fastboot boot twrp.img it goes to TWRP but says no OS installed.

Could you guide me on what I have ****ed up??
[Redmi Note 11 (spes/spesn)] notBradPitt:
AFAIK, this phone doesn't have a Recovery partition and TWRP has to be booted from Fastboot. Maybe that's what's causing the problem?
[Redmi Note 11 (spes/spesn)] wasteoinc:
But in the guide which is for this phone it clearly states you can "semi-permanently¨ install TWRP. Booting from bootloader is no deal breaker for me, but know Im getting concerned about magisk and other stuff I want to install :)
[Redmi Note 11 (spes/spesn)] LolFlasherNoob:
Sorry for inconvenience! I suggest that you boot twrp 3.6.2 from fastboot and then flash 3.6.2 instead from method 2 as some MIUI roms and custom roms have problems with 3.7.0 which can brick your device. Hope that resolves your issue !

Regards,

LolFlasherNoob
[Redmi Note 11 (spes/spesn)] Psyb3rN4ut:
I seem to be having issues with the bootloader unlocking, I am not receiving verification SMS to my number to associate my device and number with xiaomi account before using the unlock tool. I have tried the official help checklist, and have asked support, however even though my issue is about verification SMS for adding my number to my xiaomi account, they said that because I am trying to unlock the device, that basically they refuse to give me support at all, even with association of my number to mi account. Quite the FU from xiaomi! Any advice about how to receive the verification SMS so i can continue with unlocking the bootloader, or any additional methods for bootloader unlocking would be appreciated.
[Redmi Note 11 (spes/spesn)] LolFlasherNoob:
Try resetting the device then make a new mi account with a different sim and use that different (the different sim use used to make new mi account) sim for associating the device.
[Redmi Note 11 (spes/spesn)] LolFlasherNoob:
You can also try mi assistant.

Mi PC Suite: Download latest version Mi Phone Assistant

Download latest version Mi PC Suite. Why Tool not detecting phone. Mi Phone Assistant Chinese version and English language.

miuirom.org
[Redmi Note 11 (spes/spesn)] wasteoinc:
Thank you very much for the advice, I will backup everything from TWRP and then try again. Should I have also issues with Magisk??
[Redmi Note 11 (spes/spesn)] LolFlasherNoob:
If you want to flash magisk from twrp . Then you won't have any problems. Beware that if a rom mentions to use a specific version of twrp , then use that instead. Still some roms might still not work with 3.6.2 , so my advice is that if a rom supports twrp , you may use it to your liking. But if a rom doesn't mention it , I would suggest you to use the aosp recovery included with that rom instead . Still , roms don't mention it that often (twrp ver) ,you can still try flashing 3.6.2 on roms.

It's a hit or miss. Beware if it bricks the device again , you will have to start over with the flashing. Also , you must use twrp 3.6.2 only with custom roms (any) unless mentioned .

Regards,

LolFlasherNoob
[Redmi Note 11 (spes/spesn)] DARK7BEAST:
Question:

I am new 😅 I don't know what to do, I need to run root apps.

Will doing this let me use them ?

Or I have to follow some more/less steps.
[Redmi Note 11 (spes/spesn)] LolFlasherNoob:
Are you on stock / miui rom ?
[Redmi Note 11 (spes/spesn)] LolFlasherNoob:
Twrp 3.7 sometimes causes problems . Start from the beginning, flash miui and flash 3.6.2 instead of 3.7, hope this works :)
[OnePlus Nord 2T] DonAurelius:
Hi,

Recently ive been trying to root my OnePLus nord 2t CPH2399 (256gb version) using this guide: https://xdaforums.com/t/recovery-unofficial-twrp-3-7-0_12-0-for-oneplus-nord-2t-karen.4503617/

though i failed with the 3rd step as no boot.img will appear when i click install. Every time i try to boot out of TWRP it puts me right back in it, is there a way to escape this bootloop?

thanks
[OnePlus Nord 2T] garylawwd:
You probably should have asked this question on the relevant thread rather than opening up a new topic.

Did you download the boot.img you need to flash after flashing twrp?
[OnePlus Nord 2T] DonAurelius:
oh, i didnt realize i had to download that, it said nothing about it so i assumed that i find it there, might you be able to send a link to where i can download this?

thanks
[OnePlus Nord 2T] DonAurelius:
Ok so ive continued the guide, using the appropriate boot.img but is still cant get out of the twrp bootloop, anything i try just reboots into either twrp or fastboot and then into twrp, is there any way to fix this?
[Samsung Galaxy A52s 5G] trananhdat2710:
Step 1: Download LineageOS Image from link below.

Step 2: Extraxt the file to get file .img

Step 3: Reboot phone to TWRP Recovery

Step 4: Wipe > Advanced Wipe (Dalvik, Cache, Data) and swipe to wipe

Step 4: Select Install > Install Image

Step 5: Select the LineageOS IMG file and choose System Image, then swipe to flash image

Step 6: Wait until flashing is complete

Step 7: Flash GApps if you want (Skip this step if you don't want to flash GApps)

Step 8: Reboot System and enjoy it. 😍

Link Download File:

LineageOS: https://tinyurl.com/4shwyh52

GApps (NikGApps): https://tinyurl.com/bde22xfy

TWRP: https://twrp.me/samsung/samsunggalaxya52s5G.html

VBMETA DISABLED: https://tinyurl.com/5n7fvvcu

Thanks:

@AndyYan for the LineageOS GSI

@BlackMesa123 for the TWRP
[Samsung Galaxy A52s 5G] Deleted member 9527140:
Bugs? Hotspot and volte working?
[Samsung Galaxy A52s 5G] ShaDisNX255:
VoLTE will never work on AOSP ROMs for Samsung devices. It will only work on OneUI.
[Samsung Galaxy A52s 5G] Deleted member 9527140:
And what is this due to? Thank you for bringing this phone to life.And what is this due to? Thank you for bringing this phone to life.
[Samsung Galaxy A52s 5G] Kofa1:
Will you take the responsibility if my device gets bricked?
[Samsung Galaxy A52s 5G] fraxi:
work but googe play store not after install gapps nothing