yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Gauravkarki:
Recovery mode issue in honor 4x

Earlier I flash TWRP 3.0v but after flashing it didnt

Open the recovery instead of that it opens the

FASTBOOT mode and now I flash 2.8v of TWRP

after FLASHING this TWRP , now phone get

BLACK SCREEN when I hit the VOL+ AND PWR or

VOL- VOL+ AND PWR or through ADB REBOOT RECOVERY

...nothing works ALTHOUGH my phone working properly

but I want to FLASH CM13

plzzzzzz hellppppppp
[Android Software Development] bigsupersquid:
black screen? can you connect to the phone with adb while it's booted into the black screen? could be partly working.
[Android Software Development] Gauravkarki:
Yeah BLACK SCREEN dont know wat problem is...

Plzz help to sought out
[Android Software Development] NepoRood:
supersquid's right, could be a display issue. Just to make sure, did you flash a compatible TWRP? Meaning, one made for your device (Honor 4x) specifically.
[Android Software Development] Gauravkarki:
I will try ....could any of suggest me for TWRP links....

---------- Post added at 06:56 PM ---------- Previous post was at 06:54 PM ----------

Is there will be any problem to my device after flashing different TWRP RECOVERIES?????????
[Android Software Development] NepoRood:
Can't flash just any TWRP, upper right hand corner of this site is a box that says: Search All Forums

type: TWRP honor 4x

Push enter, and make sure your model matches what you flash :good:
[Android Software Development] bigsupersquid:
if they're not meant for your device they could, potentially, cause problems.

wrong kernel could write to the wrong places and blow Q-fuses (software driven one time only switches, nasty little things) or apply too much power to internal hardware and mess it up...

once i used a kernel from a cousin device with a different chip, knowing better, but being too noob and wanting to experiment. that phone never did seem to work as well again after that, even after putting the right software back.

bottom line, if it's not made for your device, make sure it's got the same hardware at least, or don't even try to use it unmodified.
[Android Software Development] Gauravkarki:
That really help...thnks man

..
[Android Software Development] suraj-b:
[MENTION=912474]Dees_Troy[/MENTION]Troy,sir i ported twrp to my device.everything works in boot.but unable to flash due to extra 5 mb compare to my stock recovery.can you tell me how to reduce the size
[Android Software Development] bigsupersquid:
enable lzma compression in the kernel and use it to compress the recovery img instead of gzip?
[Android Software Development] shoey63:
Also use the flag that gets rid of SuperSU
[Android Software Development] NepoRood:
It's "ported", that's the problem. He's got this post in 2 threads and I'm jumping back and forth, lol

Your answer is correct though, lzma (if supported by kernel) would be the best route :good:

EDIT: Not like you don't know that already ;)
[Android Software Development] papsi177:
Hello guys) I compiled TWRP 3.0 from last source. But i have one ussue, i can not reboot from twrp to system or bootloader, anywere. I tap a button, display binkt and i see again twrp. Can someone provide a solutions for me?? I use the some device tree as for twpr 2.7.0.1, but there was all ok) Please help!)
[Android Software Development] DevUt:
hey is this https://github.com/CyanogenMod/android_bootable_recovery twrp?

becuase one with omnirom gves me : https://gist.github.com/DevUt/414d51aa2de78ab9287d525d5782f2af
[Android Software Development] bigsupersquid:
that's cm recovery. you want

https://github.com/OmniRom/android_bootable_recovery

---------- Post added at 04:11 PM ---------- Previous post was at 04:08 PM ----------

also try fastboot boot recovery.img instead of flashing it just to test.
[Android Software Development] DevUt:
so does cm dont maintain any twrp?
[Android Software Development] MSF Jarvis:
Why would they?
[Android Software Development] Hacker432:
Because the people actually say "I want to port TWRP" instead of "I want to port CWM!" ?
[Android Software Development] MSF Jarvis:
So they are expected to know CyanogenMod is not willing to include a good recovery module into their ROM sources.
[Android Software Development] teemo:
As far as I remember, the HTC/tegra combo prevents that action.
[Android Software Development] DevUt:
MAN IS THAT SOME KIND OF PUNISHMENT FOR MY EVIL DEEDS!

Anyway i will download the sources again clean my envirinment fix some stupid selinux
[Android Software Development] bigsupersquid:
bummer. htc Qualcomm it works ok. sorry.

---------- Post added at 06:07 PM ---------- Previous post was at 06:06 PM ----------

they don't support it at all.
[Android Software Development] teemo:
LOL

You know, that device is a hackers wet dream. The first that open the lock, will be regarded as the highest god.

The lower gods already tried... and gave up.
[Android Software Development] DevUt:
im jusr an inch away from marshmallow but .... may my soul BUILD IT IN PEACE
[Android Software Development] Van.Fanel:
For TWRP 3.0.2-0 for Marshmallow, what do I need to add in fstab or edit somewhere so that it can detect the adopted microSD storage?

Just found this out recently after using adoptable storage. It detects the SD card just fine with portable mode.

Thanks.
[Android Software Development] NepoRood:
If I understand you correctly, something along these lines in the recovery.fstab:

# this is an "example" be sure to use proper path
/external_sd	vfat	/dev/block/mmcblk0p1
[Android Software Development] Van.Fanel:
I have it mounted like that. But you have made me review that line. Turns out I have the partition listed wrong! Got it fixed now. Thanks. :cyclops:

Another question: why do external_sd and USB-OTG have to have two dev/block addresses like this:

/dev/block/mmcblk1p1	/dev/block/mmcblk1
/dev/block/sda1	/dev/block/sda
[Android Software Development] NepoRood:
You got me there, lol. I don't know...
[Android Software Development] Van.Fanel:
Haha :highfive:

Just trying to make sense of the fstab file. Hopefully someone could shed some light to this. :)
[Android Software Development] MSF Jarvis:
They're fallback addresses. Now let's pretend you have a microSD card an ancient device. You'd probably make a secondary partition formatted to ext4 and then attach it to the internal storage using any of the numerous reverse mount methods. Then you will have two dev nodes, p1 and p2 but not the standard mmcblk0. In that case the fstab will offer the next location to init.rc for checking for existence and then mounting it to the relevant /sdcard mount point. Same goes with your USB-OTG. You can simply define only the mmcblk0 notation but you are then taking for granted that there is no way in the world any of the users will have more than one partitions on their USB thumb drive and/or their SDCard.
[Android Software Development] Van.Fanel:
That's as clear as day! Thanks for the detailed explanation. :victory:
[Android Software Development] MSF Jarvis:
Now let's hope [MENTION=7237874]NepoRood[/MENTION] also finds it easy to follow ;)
[Android Software Development] NepoRood:
NepoN00b understand, increased current TWRP knowledge to 2.2% :highfive:
[Android Software Development] papsi177:
No one known why is it happen??
[Android Software Development] NepoRood:
Provide link to device tree
[Android Software Development] papsi177:
The some like here https://github.com/surdupetru/cm11-p6/tree/master/device/huawei/hwp6_u06
[Android Software Development] NepoRood:
If using that exact setup, your tree is out dated for TWRP 3. Upload the boardconfig.mk you are using to pastebin or something, and provide a link to that
[Android Software Development] papsi177:
???

http://pastebin.com/cPS525SS

How to compile others guys using this device tree? And all is working, only i have this issue..

If i tap in twrp terminal

busybox reboot

I can reboot to system)
[Android Software Development] NepoRood:
That's a weird one alright, and sorry I don't have an answer for you. Also, I don't see how you are building TWRP 3.0.2 without a theme flag...

TW_THEME :=
[Android Software Development] suraj-b:
this my recovery log file..can anyone tell me how to fix the issue. also i ported the twrp didnt compile it
[Android Software Development] Startrek852:
DON'T post logs here!!! Use a paste service!!
[Android Software Development] NepoRood:
:rolleyes:
[Android Software Development] papsi177:
Solved)
[Android Software Development] NepoRood:
In order to help others, don't put: Solved

Please share what you did in order to fix your situation...
[Android Software Development] papsi177:
I used this commit https://github.com/ferhung-mtk/andr...mmit/edd1e2973d45623ce7d31f90b2ad36d235392970

It fixed reboot to system and power off. Reboot to bootloader and to recovery still not working, instread is rebooted to system..
[Android Software Development] papsi177:
Any ideas?
[Android Software Development] Mandy $ingh:
Notice file: external/sepolicy/NOTICE -- /home/mandy/TWRP/out/target/product/j7xeltexx/obj/NOTICE_FILES/src//root/selinux_version.txt

Notice file: external/sepolicy/NOTICE -- /home/mandy/TWRP/out/target/product/j7xeltexx/obj/NOTICE_FILES/src//root/sepolicy.txt

make: *** No rule to make target '/system.prop', needed by '/home/mandy/TWRP/out/target/product/j7xeltexx/obj/ETC/system_build_prop_intermediates/build.prop'. Stop.

make: *** Waiting for unfinished jobs....

Notice file: external/sepolicy/NOTICE -- /home/mandy/TWRP/out/target/product/j7xeltexx/obj/NOTICE_FILES/src//root/service_contexts.txt
[Android Software Development] bigsupersquid:
it says your system.prop is either non-existent or in the wrong location
[Android Software Development] Mandy $ingh:
Export includes file: external/f2fs-tools/Android.mk -- /home/mandy/twrp/out/target/product/j7xeltexx/obj/EXECUTABLES/fsck.f2fs_intermediates/export_includes

Notice file: external/f2fs-tools/NOTICE -- /home/mandy/twrp/out/target/product/j7xeltexx/obj/NOTICE_FILES/src//system/bin/fsck.f2fs.txt

make: *** No rule to make target '/home/mandy/twrp/out/target/product/j7xeltexx/obj/SHARED_LIBRARIES/libfuse_intermediates/export_includes', needed by '/home/mandy/twrp/out/target/product/j7xeltexx/obj/EXECUTABLES/fsck.ntfs_intermediates/import_includes'. Stop.

make: *** Waiting for unfinished jobs....

Notice file: external/f2fs-tools/NOTICE -- /home/mandy/twrp/out/target/product/j7xeltexx/obj/NOTICE_FILES/src//system/lib/libf2fs.so.txt

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use unchecked or unsafe operations.

Note: Recompile with -Xlint:unchecked for details.

make: Leaving directory '/home/mandy/twrp'

#### make failed to build some targets (23 seconds) ####

after that getting this error
[Android Software Development] NepoRood:
Try this and do not "make clean or clobber":

mkdir -p /home/mandy/twrp/out/target/product/j7xeltexx/obj/SHARED_LIBRARIES/libfuse_intermediates
[Android Software Development] Mandy $ingh:
sorry but didn't WORK SAME ERROR
[Android Software Development] NepoRood:
You sure it doesn't say:

STATIC_LIBRARIES instead of SHARED_LIBRARIES

Otherwise, I'm out of ideas, sorry. Hopefully someone else will be able to help
[Android Software Development] bigsupersquid:
After mkdir,

touch /home/mandy/twrp/out/target/product/j7xeltexx/obj/SHARED_LIBRARIES/libfuse_intermediates/export_includes

You can use the same trick on any similar error, but the libraries won't actually get built and may cause other errors down the line on the build or when running the recovery later.

It probably needs libfuse, to access sdcard and stuff, but may finish building without it if you fake the intermediates file and directory like this.
[Android Software Development] MSF Jarvis:
don't paste logs in your post
[Android Software Development] papsi177:
No one here didnt known about SPOILER? Or pastebin service??
[Android Software Development] MSF Jarvis:
Let's just say they don't. I've been trying for long to get the point across, to the extent that I actually get dangerously near to flaming (which I shouldn't at all). Let's just deal with it for now, since there's no other way.
[Android Software Development] axxx007xxxz:
Thanks for the guide! :good:

I'm building TWRP for XiaoMi RedMi 3 (ido) but I get this error: http://hastebin.com/ruhepawoke.pas, I already tried to instal aapt through apt-get (apt-get install aapt) but it doesn't work. Any idea?

Thanks in advance. :)
[Android Software Development] razot:
TWRP touch Flipped to 180 Degrees

Hi,

After i flash the twrp recovery on my mt6592 device, its just working fine but the touch is functioning on 180 degrees, what should i do?
[Android Software Development] NepoRood:
RECOVERY_TOUCHSCREEN_SWAP_XY := true
[Android Software Development] razot:
Thanx,

Sorry, am some how new on this things, can i send you version of twrp am using so that you can compile for me Please!!!

Am using TWRP_Recovery_2.8.1.0, it the one that can run on my mt6592, others can't.

Thanx again.
[Android Software Development] NepoRood:
If you're porting and not compiling, then there's really nothing that can be done about the touchscreen, sorry. You'll need to do some research and compile it on your own. There's some good guides for that if you search...
[Android Software Development] Startrek852:
Like the guide on the first post of this thread, it's a good guide.
[Android Software Development] ashyx:
Are you sure your recovery.img is using the correct kernel?

If it's an older version of twrp it will have an outdated kernel.

Your device may require an up to date kernel touch driver.

Pull it from the current firmware you are using and repack it with the recovery.img.

What build of os is your device running?

DONATE ME HERE IF YOU WANT TO BUY ME A BEER OR HIT THE THANKS BUTTON IF I HELPED YOU
[Android Software Development] razot:
Phone Details

Thanks for reply [MENTION=4899305]ashyx[/MENTION], these are my phone details:

Tecno Phantom Z Mini

MT6592

Android: 4.4.2

Baseband Version: MOLY.WR8.W1315.MD.WG.MP.V35.P5,2014/10/30 19:10

Build Number: PTM-mini-G870-A1-KK-20141209
[Android Software Development] NepoRood:
Cool script bro, maybe some can be added here ;)
[Android Software Development] ashyx:
I know what most of those do but there's loads I've no idea on.

Can you modify your script to show the paths to the flags, so we can get some idea of what they do?
[Android Software Development] Startrek852:
Here it is:

grep -roH '\b\(TW\|TWRP\|RECOVERY\|TARGET\|BOARD\)_[_A-Z0-9]*' bootable/ --include=*.mk | sort | uniq

This will show the full path to the file that the flag is in.
[Android Software Development] MSF Jarvis:
I've got a decent subset indexed in the thread [MENTION=7237874]NepoRood[/MENTION] mentioned above, and will add the missing ones in a few days when free from school :)
[Android Software Development] TimSchumi:
Hi there!

I've been trying to compile TWRP for the device I'm working on. But I get errors which I'm not able to solve. I already tried it with the android-6.0, android-4.4 and android-4.3 branches.

Log files:

TWRP Android 4.3 log: http://hastebin.com/emenigehob.lua

TWRP Android 4.4 log: http://hastebin.com/wuvufopumo.lua

TWRP Android 6.0 log: http://hastebin.com/puyenoyifa.coffee

Device tree: http://www.github.com/TeamFreeDroid/android_device_samsung_cs02ve

Of course I uncommented the RECOVERY_VARIANT line

The local manifest which I download TWRP with is:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<project path="bootable/recovery-twrp" name="omnirom/android_bootable_recovery" remote="github" revision="android-6.0"/>
</manifest>

I did "make clean" between al those builds

Thanks in Advance
[Android Software Development] NepoRood:
For one thing, you need to change your init.rc a bit:

on init
export LD_LIBRARY_PATH .:/sbin

you path is pointing to wrong place (AFAIK anyway, I've never built for Samsung ;))

Another, create a "recovery/root" path in your device tree and put all of the files from the "ramdisk" folder in there. This will automagicly copy every thing into the final build for you.

add the TARGET_RECOVERY_FSTAB flag to BoardConfig and point it to your recovery.fstab (which needs to be "TWRP'ified before next build) There's an example of that in the OP.

Regards

Nepo
[Android Software Development] ashyx:
Where's all the arguments for mkbootimg?

You can't use android 6 branch, your kernel isn't compatible.

Is this building with CM or Omni rom sources?
[Android Software Development] TimSchumi:
Thanks for the help. I researched and found that /sbin is a valid path. I think you thught about /system/sbin, which also exists.

In the OP there is mentioned that you should create twrp.fstab in the device tree root and copy it to recovery/root via PRODUCT_COPY_FILES. What about creating the twrp.fstab directly in recovery/root.

And should the TARGET_RECOVERY_FSTAB point to the twrp.fstab or the recovery.fstab.

And in which makefile should I include the PRODUCT_COPY_FILES if needed?

And should I keep the ramdisk folder?
[Android Software Development] NepoRood:
No need for twrp.fstab, it's just extra work, lol. Just TWRP your recovery.fstab, re-order like this:

#<mnt_point> <type> <src> <twrp flags> [STRIKE]<fs_mgr_flags>[/STRIKE]

/system ext4	/dev/block/platform/msm_sdcc.1/by-name/system	flags=backup=1;wipeingui

Repeat above for all partitions :good:

Then place in this path: recovery/root/etc/recovery.fstab

In BoardConfig.mk: TARGET_RECOVERY_FSTAB := device/samsung/cs02ve/recovery/root/etc/recovery.fstab

Also, [MENTION=4899305]ashyx[/MENTION] has a point, you should be using CM 11 sources (4.4.4) (I have a "minimal manifest" for this, if you want it let me know)

Regards,

Nepo
[Android Software Development] TimSchumi:
I already made the twrp.fstab now :(

Yes, I am using CM 11 sources

Should I keep the ramdisk folder or should I delete it?

And about the old recovery.fstab in the device tree root... Should I delete it too?

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

And why does the android-4.4 branch fail too?

---------- Post added at 10:28 AM ---------- Previous post was at 09:58 AM ----------

I now made the changes in my GitHub repository. Is it correct like this: http://www.github.com/TeamFreeDroid/android_device_samsung_cs02ve
[Android Software Development] NepoRood:
The "ramdisk" folder basically needs to be renamed to recovery/root

For the fstabs:

1) Place twrp.fstab in the recovery/root/etc folder, then rename it to recovery.fstab

2) Keep original recovery.fstab where it is (for reference, until you're sure you don't need it)

Once we get the device tree in better order, we'll track down errors :good:

EDIT:

Don't forget the TARGET line in BoardConfig I mentioned earlier
[Android Software Development] TimSchumi:
Git client didn't pust to cm-11.0 branch, but to master branch. Now you should be able to view my changes
[Android Software Development] NepoRood:
Target flag needs full path, like this:

device/samsung/cs02ve/recovery/root/etc/recovery.fstab

Fix that, then try a build.
[Android Software Development] TimSchumi:
I am building at the moment with the android-4.4 branch

---------- Post added at 11:26 AM ---------- Previous post was at 11:19 AM ----------

Still the same error as in the beginning
[Android Software Development] NepoRood:
Which version of TWRP are you using?

EDIT:

Looking back, it appears to be the android 6 branch (TWRP 3.0), try dropping back to the 5.1 branch (TWRP 2.8)
[Android Software Development] TimSchumi:
I used the 4.4 branch
[Android Software Development] NepoRood:
Last I tried to build for KitKat, I had to use 5.1 branch from Omni, every thing else, above and below, gave me errors of one sort or another. That's why I suggest trying that.

Other than that, I'm out of ideas, :crying:

My limited knowledge has been used up, hopefully someone more knowledgeable will stop by soon.

Good Luck,

Nepo
[Android Software Development] ashyx:
You only need the recovery.fstab to be in the device folder for it to be picked up You dont need to set the target path.

Is there a specific reason why you need to use a custom ramdisk?

All my Samsung builds compile and boot fine using the ramdisk created by twrp. I also compile with Omni sources, much faster.

https://github.com/ashyx/TWRP_Samsung_klimtlte?files=1
[Android Software Development] TimSchumi:
Building for android 5.1 fails even faster:

/bin/sh: 1: arm-linux-androideabi-gcc: not found
make[3]: *** [applets/applets.o] Error 127
make[2]: *** [applets_dir] Error 2
make[1]: *** [prepare] Error 2

---------- Post added at 12:22 PM ---------- Previous post was at 12:11 PM ----------

You mean I should revert all the changes I made?
[Android Software Development] ashyx:
How are you setting up your environment before compiling?

Are you compiling in the root of the CM source folder and then doing

source ./build/envsetup.sh

and then lunching for your device before make recoveryimage?
[Android Software Development] TimSchumi:
Yes.
[Android Software Development] ashyx:
I also notice your cm.mk file doesn't have the device name

cm_cs02ve.mk
[Android Software Development] :
It's not dial-up its 4Mb/s down but that's still slow :D

Anyway its still syncing, I started it ~8h ago. Hope it will done by tomorrow morning...
[Android Software Development] yuweng:
After many many moon, finally i'm able to compile out a fully working CWM for my MTK device, many many thanks to the ONLY DEV that i pm'ed who is willing to teach & continuously guiding me to the right direction, my Master Shifu carliv...

With that, i'm able to compile out a fully working TWRP & to my surprise we only need 57 out of 363 of the complete CM10.1 projects to compile out a fully working TWRP on 2.5 branch... This means the rest is junk...

Credits to bhargz16 AKA #define but i donno how to interpret the whole compile.log end up deleting the remaining projects one by one, use up alot data on my broadband syncing CM sources, uncountable compiling & flashing & this has taken alot of my time identifying it...

Syncing full CM10.1 sources on my 5Mb FiberOptic broadband took more than 7 hours initially & is now shorten to only One & a half hour...

Full complete CM10.1 source for .repo is 7.8GB shrink to only 1.9GB you don't need the remaining 5.9GB... :cowboy:

Hopefully these findings will benefits for those just started to learn how to compile TWRP but reluctant to sync full CM sources that you don't need for compiling TWRP... :cool:

Cheers...

Added on Apr 05, 2014

Compiling from source has never been easier, i recommend building TWRP using BBQLinux with jellybean source, it only takes 3 minutes to complete building it . . . :good:

For android devices with no kernel source/ using prebuilt kernel

Download & unzip the script to your [HOME]. Start Mate Terminal & follow below command.

chmod 777 ~/twrp
./twrp[COLOR="Red"] <- Execute it by typing[/COLOR] [COLOR="Blue"]dot forward-slash twrp[/COLOR]

Dependency

BBQLinux Java Switcher -> Oracle JDK 6

Latest updates bricks the above, TWRP can't be built on jellybean repo anymore as of Nov 2014 . . .

Updates

TWRP can still be built on jellybean repo thanks to Master Shifu Dees_Troy . . . Commit (1) (2)
[Android Software Development] BENETNATH:
so, you've got a listing of the needed resources for TWRP compiling ?

if yes, you should put that here, to help the whole TWRP community ;)
[Android Software Development] Anon9mouz:
Omg ima try this BC cwm is killing me on this device and its not even touch lol
[Android Software Development] Terr20114:
I've seen a xda user ported TWRP to the infuse 4G, if I can convince him to talk to you do you think you can make TWRP official for the Infuse 4G? I love TeamWin and wish the Samsung Infuse had TWRP too...