yashsingh1/xdaforums huggingface dataset:
[Android Software Development] iftekharriyad:
Thanks, @DiamondJohn . It worked.
[Android Software Development] iftekharriyad:
The link isn't working. What should I do? @DiamondJohn

this is the link: https://www.google.it/url?sa=t&rct=..._intro&usg=AFQjCNGBwIUXnLmxTMEb6ltZvbVyzW9ybw
[Android Software Development] SourceDash:
Quick question. For A10, is this guide still valid? I have no experience with Linux and coding, but I really need to create a recovery image for my A20e.
[Android Software Development] Aks BRAR SOTHA:
I tried it before some time and it worked

And then my friend tried it few months ago on a10, actually it worked but after lots of efforts and coding taking many days and as u said ur beginner then its so hard for u to use this method.

But u can try some simple method.

Go here for device tree (if u dont have one) : https://t.me/twrpdtgen

U can generate tree here in seconds

If ur tree has pre-built kernel go here : https://github.com/Area69Lab/Recovery-Builder-NoKernel

If ur tree dont have then : https://github.com/Area69Lab/Recovery-builder

Create github acc if u dont have and fork one of the repositories above as required.

Chamge the values in xml file in repository according your device and then just star the repository ( enable github workflows before that (google how to?) And there u go build started. Wait some time for it to build and then download result and try to flash it (90% chance to work)

Note : copy paste links in browser if u can't click them!
[Android Software Development] SourceDash:
Hm, more like 0% chance since this is Greek to me still. Guess I'll just live with Samsung bothering me every day for the rest of my device's life.
[Android Software Development] jasenplay:
Hiya! This is confusing to me as i have no idea. Will Unbuntu WSL work? or do i need full unbuntu for this to work and does this work with android 11?
[Android Software Development] NepoRood:
Wow, resurrection of an old thread I had completely forgot about. At the time of writing this post, I'm pretty sure WSL was not an option.

That was a few years ago, so who knows, if it will work or not today. It's just compiling a recovery/boot image though, so give it a shot, that's the best way to find out if it works or not.

I'd say you got a 50/50 chance of it working and please post back if it does.

I know that wasn't much help, I haven't built TWRP in a few years now, I don't need it with my Pixels

Regards,

Nepo
[Android Software Development] Isrgish:
I have used wsl ubuntu and it worked
[Android Software Development] ComradeWave:
Hey guys! I've been trying to compile TWRP for my device, a Lenovo M10 Tab 3rd gen (TB125FU), however, it seems that the boot.img is too big. Do you guys have any idea how to "shrink" the image?

/bin/bash -c "(out/host/linux-x86/bin/mkbootimg --kernel out/target/product/TB125FU/kernel --ramdisk out/target/product/TB125FU/ramdisk-recovery.img --cmdline \"bootopt=64S3,32N2,64N2 buildvariant=user twrpfastboot=1 buildvariant=eng\" --base 0x40078000 --pagesize 2048 --os_version 12 --os_patch_level 2099-12-31 --header_version 2 --ramdisk_offset 0x07c08000 --tags_offset 0x0bc08000 --dtb device/lenovo/TB125FU/prebuilt/dtb.img --output out/target/product/TB125FU/boot.img ) && (size=\$(for i in out/target/product/TB125FU/boot.img; do stat -c \"%s\" \"\$i\" | tr -d '\\n'; echo +; done; echo 0); total=\$(( \$( echo \"\$size\" ) )); printname=\$(echo -n \" out/target/product/TB125FU/boot.img\" | tr \" \" +); maxsize=\$(( 33554432-69632)); if [ \"\$total\" -gt \"\$maxsize\" ]; then echo \"error: \$printname too large (\$total > \$maxsize)\"; false; elif [ \"\$total\" -gt \$((maxsize - 32768)) ]; then echo \"WARNING: \$printname approaching size limit (\$total now; limit \$maxsize)\"; fi ) && (out/host/linux-x86/bin/avbtool add_hash_footer --image out/target/product/TB125FU/boot.img --partition_size 33554432 --partition_name boot --prop com.android.build.boot.fingerprint:\$(cat out/target/product/TB125FU/build_fingerprint.txt) --prop com.android.build.boot.os_version:12 )"
error: +out/target/product/TB125FU/boot.img too large (34469888 > 33484800)
[Android Software Development] ComradeWave:
Fixed it! Now it compiles, however, when i boot into it, the device is stuck in the Lenovo splash screen, with an accessible ADB, twrp is installed but appears to never start, what might be the issue?
[Android Software Development] Hannibal Smith:
I'm trying to compile twrp from here https://github.com/ast261/twrp_device_motorola_miami for my moto 30 edge neo, but I get :

└──╼ $. build/envsetup.sh; lunch twrp_miami-eng; mka bootimage
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
build/make/core/product_config.mk:160: error: Can not locate config makefile for product "twrp_miami".
14:07:22 dumpvars failed with: exit status 1
Device miami not found. Attempting to retrieve device repository from TeamWin Github (http://github.com/TeamWin).
Repository for miami not found in the TeamWin Github repository list.
If this is in error, you may need to manually add it to your .repo/local_manifests/roomservice.xml
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
build/make/core/product_config.mk:160: error: Can not locate config makefile for product "twrp_miami".
14:07:23 dumpvars failed with: exit status 1
In file included from build/make/core/config.mk:313:
In file included from build/make/core/envsetup.mk:312:
build/make/core/product_config.mk:160: error: Can not locate config makefile for product "twrp_miami".
14:07:23 dumpvars failed with: exit status 1

** Don't have a product spec for: 'twrp_miami'
** Do you have the right repo manifest?

anyone can help me?
[Android Software Development] NepoRood:
Is that link to your git or one you found and are you building Android 12?

What happens when you just type "lunch"?

The problem looks to be that Make is unable to find your device tree, make sure your $PATH is correct and you are building in the correct directory.
[Android Software Development] Hannibal Smith:
it's not mine , I found it on internet
[Android Software Development] jomamal:
This is suppose to be for noobs?behst about super noobs then there must be an easier way
[Android Software Development] Hacker432:
[MENTION=6049290]Pavlex4[/MENTION]

I don't understand why you use that device tree when s3vg3e is officially supported by TeamWin an they already did a recovery only device tree for it
[Android Software Development] Hacker432:
Not my problem
[Android Software Development] Pavlex4:
I accessed site.What to do with that recovery?
[Android Software Development] NepoRood:
Need to see what you are actually using, zip up your current device folder and upload it somewhere please
[Android Software Development] Hacker432:
I have indicated you a code line

In the Boardconfig of the site copy the value of the Recovery partition size and paste it in your local Boardconfig replace the value of course
[Android Software Development] Pavlex4:
I am trying to make recovery image for Multirom.I have problem:TW_THEME is not valid: https://postimg.org/image/m33wfg6nb/
[Android Software Development] Hacker432:
Do you have this in your Boardconfig?

TW_THEME := portrait_hdpi
[Android Software Development] Pavlex4:
I have DEVICE_RESOLUTION := 720x1280

I don't have TW_THEME := portrait_hdpi
[Android Software Development] Hacker432:
Try to space the equal and the portrait_hdpi

Also if there is a dot, remove it
[Android Software Development] Pavlex4:
I added space but still have error!!!!
[Android Software Development] Hacker432:
Open a terminal in the directory of cm sources and type "ls -l bootable" (without quotes)

Post the output here
[Android Software Development] Pavlex4:
I run command in root directory: https://postimg.org/image/umq38wl3b/
[Android Software Development] Hacker432:
THERE AREN'T TWRP SOURCES

Have you at least read my guide?
[Android Software Development] Pavlex4:
Yes, I read it.
[Android Software Development] Hacker432:
And what I said regarding CM sources?
[Android Software Development] Pavlex4:
-CyanogenMod Minimal Sources

Available branches:

twrp-13.0

twrp-12.1

--Open a fresh terminal and type the followng commands.

mkdir ~/NameOfTheFolder It's your choice

cd ~/NameOfTheFolder

repo init -u git://github.com/lj50036/platform_manifest_twrp_cm.git -b BRANCH

repo sync -jN N=numbers of parallel downloads, it depends on your connection Example: repo sync -j2

The download of the sources will take a bit ^^

Device sources are divided in

1)Kernel

2)Device Tree

3)Vendors
[Android Software Development] Hacker432:
I said also that full sources doesn't include TWRP code

Since you used lj50036 minimal sources, TWRP is already included

So, the problems could be two:

1)You didn't lunch correctly for the device

2)You have RECOVERY VARIANT flag in the Boardconfig

If it is so you have two solution

Rename the recovery folder in cmsources/bootable to recovery-twrp or the second solution , you can delete that flag in Boardconfig
[Android Software Development] Pavlex4:
I did't run lunch because on this site it didn't say to run it: https://github.com/Tasssadar/multirom/wiki/Porting-MultiROM

Do I need to run lunch before this commands:

make recoveryimage # builds the recovery image

make multirom # builds multirom binary

make trampoline # builds trampoline - MultiROM's init daemon

make multirom_zip # builds multirom and trampoline and installation ZIP file

make multirom_uninstaller # builds uninstaller ZIP
[Android Software Development] NepoRood:
The device has to be in the lunch menu to build anything, so yes, you must lunch first
[Android Software Development] Pavlex4:
Now I just have error: recoveryimg too large!!!
[Android Software Development] Hacker432:
Of course

Always lunch

It says to the compiler what device tree to use
[Android Software Development] Pavlex4:
What to do with error: recoveryimage too large!!!

I tried to copy recovery sieze from this boardconfig: https://github.com/TeamWin/android_device_samsung_s3ve3g

I still have same error!!!!!!!
[Android Software Development] Hacker432:
Maybe you could try to compress the kernel a bit

But first try to compile now that you solved something
[Android Software Development] Pavlex4:
How to compress kernel?
[Android Software Development] Hacker432:
[MENTION=6049290]Pavlex4[/MENTION] first of all try to modify this value on your Boardconfig

BOARD_RECOVERYIMAGE_PARTITION_SIZE := 11370585

Replace with this

BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00A7DEA0

Try to compile and flash

If it doesn't work provably kernel compression is needed
[Android Software Development] Pavlex4:
I tried to replace and still have error!!!!!

How to compress kernel?
[Android Software Development] Hacker432:
Have you done make clean && mka recoveryimage?
[Android Software Development] NepoRood:
Try the prebuilt kernel...
[Android Software Development] Pavlex4:
I tried make clean && mka recoveryimage but still have error!!!!!!!!
[Android Software Development] Pavlex4:
How to increase recovery partition size?

BoardConfig.mk: https://mega.nz/#!o1hD2JpL!uIuewgp_2Q4OUqAfhCmJF3CkbqWoXRjcRaZVSZ0Spvg
[Android Software Development] Hacker432:
[MENTION=6049290]Pavlex4[/MENTION]

Let's compress the kernel

First of all, in your device tree directory you have Boardconfig.mk~ this file is a "backup" of the changes done to Boardconfig.mk(this is the main faile, changes must be done here) so you can always delete Boardconfig.mk~

For the compression

Go in s3ve3g kernel folder

Then go in arch/arm/configs

Open your defconfig

It should be cyamogenmod_s3ve3g_defconfig(you can check the name in the Boardconfig)

Once opened find these line and modify them as follow

(Remove the space and the hashtag before it) CONFIG_KERNEL_XZ=y

(Add an hashtag before it too)CONFIG_KERNEL_LZO is not set

Remove the space and the hashtag before it)CONFIG_RD_XZ=y

(Add an hashtag before it too)CONFIG RD_GZIP is not set

Now open a new terminal in your cm sources directory

Recall the envsetup

Lunch for your device

make clean && mka recoveryimage
[Android Software Development] Pavlex4:
I changed boardconfig but I still have error!!!

I opened terminal inside root directory!

---------- Post added at 03:45 PM ---------- Previous post was at 03:15 PM ----------

Do I have to change something more?

---------- Post added at 04:05 PM ---------- Previous post was at 04:04 PM ----------

What else do I need to change?
[Android Software Development] Pavlex4:
How to fix this error: https://postimg.org/image/4kqv4d8s7/

I fixed this.
[Android Software Development] Pavlex4:
I have new error: https://postimg.org/image/otg2vubmv/
[Android Software Development] suraj-b:
sir,how do i get my device tree
[Android Software Development] MSF Jarvis:
You make it
[Android Software Development] suraj-b:
how do i make it?also how big are the minimal sources for omnirom?and can i use moto g turbo device tree?
[Android Software Development] MSF Jarvis:
1) Learn

2) 8 gigabytes on repo sync

3) NFI
[Android Software Development] suraj-b:
MSF JARVIS,sir by any means can you compile a twrp for me.its a humble request been trying to do that for a month but no success.i can provide stock files

---------- Post added at 02:31 PM ---------- Previous post was at 02:30 PM ----------

MSF JARVIS,sir by any means can you compile a twrp for me.its a humble request.i have been trying to do that for a month but no success.i can provide u stock files.
[Android Software Development] NepoRood:
[MENTION=7532677]suraj-b[/MENTION]

No, he won't.

Just FYI, It took me a couple months to get a successful build, you have to keep trying. The info in the OP is very informative, just don't give up.

Did you try searching for a TWRP for your device? There's a lot of builds for Motorola out there...
[Android Software Development] suraj-b:
No its not for Motorola. It's for micromax canvas knight 2. Problems that I face

1. Repo

2. Device tree
[Android Software Development] NepoRood:
1) OP tells specifically how to setup build environment, repo (full and part source), and build TWRP

2) Snapdragon 615, Moto G device tree may work, but may also need some changes. You'll need a similar device, same chip and same resolution (720x1200). You can also search for other Micromax devices that use qcom chips, and compare similarities.

Other Options:

Port a working TWRP from a similar device (you can search on XDA on how to "Port TWRP")

Or,

If you're having trouble with the repo stuff, as long as you have Linux (of some sort) installed, and a proper build environment, you can use this tool: AIO TWRP Compiler, it'll build for you with just inputting a few options.
[Android Software Development] suraj-b:
i actually did port twrp.heres what it happens,the twrp boots successfully but display doesnt respond and after 2 seconds the device reboots normally.
[Android Software Development] NepoRood:
Hmm, sorry that didn't work out, I don't know what else to tell you, other than: Keep Trying :good:
[Android Software Development] suraj-b:
[MENTION=7237874]NepoRood[/MENTION],sir how to find out the block size,inode size,inode ratio,which is in make2fs.conf.,of my device
[Android Software Development] MSF Jarvis:
Why to recalculate if it's already there?:confused:
[Android Software Development] suraj-b:
[MENTION=254405]mfs[/MENTION] JARVIS,yeah got it
[Android Software Development] MSF Jarvis:
Of course, "MSF Jarvis" is the toughest word yet. No one gets it right :crying:
[Android Software Development] suraj-b:
oops sorry [MENTION=6552280]MSF Jarvis[/MENTION],now desperately trying to port..whats happening is twrp says unmodified system partition and device doesnt respond and then reboots normally.
[Android Software Development] NepoRood:
Sorry, but I'm not familiar with your device, or any Micromax (I don't own any)
[Android Software Development] suraj-b:
[MENTION=7237874]NepoRood[/MENTION] [MENTION=6552280]MSF Jarvis[/MENTION],i ported twrp to my device suceesfully.everything works now but in boot .i am not able to flash it.fastboot says failed(remot data too large).can u guys guide me how to compress ramdisk using android image kitchen with xz compression
[Android Software Development] NepoRood:
Did you port or build this TWRP?

What size is your recovery partition?
[Android Software Development] suraj-b:
i port the twrp.ill upload the guide on xda.but i have to reduce the size first.

how do i check recovery partition
[Android Software Development] NepoRood:
I don't know how to "shrink" one that's already been compiled, dropping the supersu folder (if it exists) will shave off a little...

As for your partition size, you'll need to google that info for your particular device
[Android Software Development] MSF Jarvis:
No need for the guide, they've been done earlier.

When you unpack the recovery.img using osm0sis' AIK, you'll see multiple files inside the split_img folder. I do not remember which exactly, since it's been a long time, but there's a compression algorithm configuration there. It should be gzip for you, change it to xz
[Android Software Development] NepoRood:
Just plumb chock full of useful infromation (<-- not at typo) I didn't know you could change that, lol. More valuable info for Nepo! :highfive:

After checking, it's:

recovery.img-ramdiskcomp (if the name of the "recovery.img" is different, apply accordingly)
[Android Software Development] MSF Jarvis:
Blame [MENTION=4544860]osm0sis[/MENTION], he simply can't stop being awesome :D
[Android Software Development] NepoRood:
OK, I will, but not publicly :p

Oh wait, you said "Awesome", sorry, then YES, it's his fault!!
[Android Software Development] suraj-b:
guys i used xz compression and repackind just doesnt add the ramdisk folder to .img
[Android Software Development] MSF Jarvis:
WTF? Simply edit recovery.img-ramdiskcomp to change gzip to xz and then repack it using AIK. What else is there to mess up?
[Android Software Development] suraj-b:
Did the same but ramdisk folder goes missing after repacking

---------- Post added at 12:27 PM ---------- Previous post was at 12:05 PM ----------

okay guys it worked, xz compression.but now recovery wont work.
[Android Software Development] MSF Jarvis:
Then your kernel probably never supported XZ compression
[Android Software Development] suraj-b:
ok guys,thanks for all the help,decided to use twrp in boot mode itself.will there be any problem(i used it to make a backup and it did).and which version of super su.zip is stable?
[Android Software Development] suraj-b:
Guys thanks a lot i have uploaded a guide on how to root my device.Now if you can tell how to increase recovery partition it would be of great help.

Already googled but didnt find it anywhere.
[Android Software Development] MSF Jarvis:
You can't increase the recovery partition size. I maintain TWRP for a device with only 5 mB in the recovery partition using LZMA, but apparently most stock kernels do not support it :(
[Android Software Development] suraj-b:
no no i have seen many posts where they have increased the recovrry partitions
[Android Software Development] NepoRood:
Re-partitioning the internal storage is dangerous work, you could permanently brick you device. Upload your TWRP, and I'll see what I can do with it (probably nothing). I'll give it a shot though, when I get back home
[Android Software Development] Hacker432:
You'll not get an answer from me until you modify your message

Use a paste service! Or use hide tag!
[Android Software Development] MSF Jarvis:
Well you're not helping either by retaining the entire log in your quote
[Android Software Development] Hacker432:
Modified

I was thinking to... I don't know xD
[Android Software Development] suraj-b:
any help people?
[Android Software Development] MSF Jarvis:
No one will help if you continue being dumb and not using a paste service for logs
[Android Software Development] suraj-b:
i was asked to use hide tag or paste service.i used hide tag.
[Android Software Development] MSF Jarvis:
Well the instructions just got updated.
[Android Software Development] NepoRood:
You're new to XDA, as am I. Common courtesy is to post large log files on a separate site, there are several free services out there, so everyone doesn't have to read/scroll through it. If you look back (before using the "hide" tag) you're TWRP log took up most of the page...

Please don't take my response the wrong way, I'm just trying to provide you with a little information.

Regards,

Nepo
[Android Software Development] suraj-b:
[MENTION=1087143]nepo[/MENTION] Rood,no i didnt take it in a wrong way.

heres the link for my recovery log

http://pasted.co/06385c1b
[Android Software Development] MSF Jarvis:
First up your USB OTG configuration is wrong, please provide a link to your device tree, if any.
[Android Software Development] suraj-b:
i am not worried about thAT.ill delete those line in recovery.fstab,but im worried about the permission denied thing.no device tree sir.
[Android Software Development] NepoRood:
Then zip your device folder and upload that, no one can really help much without looking at your tree
[Android Software Development] MSF Jarvis:
Looks like this is a ported version. [MENTION=7532677]suraj-b[/MENTION], I'm afraid this guide only deals with compiling TWRP from source, so we cannot be of much help on a copy-pasted TWRP build. If you can contact me on Hangouts I can possibly create your device tree and start official support. My email is msfjarvis@gmail.com
[Android Software Development] suraj-b:
thanks a lot sir [MENTION=6552280]MSF Jarvis[/MENTION],ill do that.
[Android Software Development] suraj-b:
Finally got aa stable working twrp.thanks a lot guys@NepoRood [MENTION=5650219]msja[/MENTION]rvis [MENTION=6829336]Hacker432[/MENTION]
[Android Software Development] MSF Jarvis:
You got me and Hacker432 wrong
[Android Software Development] apoorv852:
can you plzz share the link..............

i am in need of that.......
[Android Software Development] MSF Jarvis:
Which goddamn link????????????????????????

The post you quoted isn't even about you
[Android Software Development] apoorv852:
twrp link of knight 2 e471
[Android Software Development] MSF Jarvis:
Ask [MENTION=7532677]suraj-b[/MENTION], he managed to do a stable port before I could get time to make the device tree
[Android Software Development] apoorv852:
re is not responding to me..............
[Android Software Development] MSF Jarvis:
I've already told you, I didn't make it, so I don't have the TWRP build for your device. If he's not responding means he is busy
[Android Software Development] suraj-b:
YOU shouldnt have posted here.search for how to root knight 2
[Android Software Development] Sudarshankakoty:
My device don't have kernel sources.. can I compile only with device sources, not kernel and vendor sources ?

---------- Post added at 10:02 AM ---------- Previous post was at 09:59 AM ----------

I have my device tree in my desktop. Can you add support to my device officially ?

Device tree : https://drive.google.com/file/d/0B377TLFOgWdsRjlMMzFPbFdzV2s/view?usp=docslist_api
[Android Software Development] Hacker432:
Kernel is fundamental

If you don't have kernel sources you can use a pre built one
[Android Software Development] Sudarshankakoty:
How ?
[Android Software Development] Hacker432:
Well, extract it from a ROM
[Android Software Development] Sudarshankakoty:
By giving which command ? I got a zimage file while unpacking the bootimage. Is that the kernel ? I am sure,its kernel, not kernel sources... Can I extract kernel sources from this one ? My stock ROM comes in .pac format firmware
[Android Software Development] Sudarshankakoty:
Getting this error while trying to compile TWRP (see attachment)
[Android Software Development] elektrik2001:
I get to step 3 below:

repo init -u git://github.com/omnirom/android.git -b BRANCH

and then this is what my terminal window says:

Get git://github.com/omnirom/android.git

fatal: Couldn't find remote ref refs/heads/BRANCH

fatal: Couldn't find remote ref refs/heads/BRANCH

fatal: cannot obtain manifest git://github.com/omnirom/android.git
[Android Software Development] teemo:
repo init -u git://github.com/omnirom/android.git -b android-5.1

... or whatever branch you will use.