yashsingh1/xdaforums huggingface dataset:
[Android Software Development] 4javier:
I'm trying to create the twrp.fstab based on the fstab shipped by my device stock rom. Here it is

/dev/block/platform/mtk-msdc.0/by-name/system /system ext4 ro wait
/dev/block/platform/mtk-msdc.0/by-name/userdata /data ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check,resize,encryptable=footer
/dev/block/platform/mtk-msdc.0/by-name/cache /cache ext4 noatime,nosuid,nodev,noauto_da_alloc,discard wait,check
/dev/block/platform/mtk-msdc.0/by-name/protect1 /protect_f ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,autoformat
/dev/block/platform/mtk-msdc.0/by-name/protect2 /protect_s ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,autoformat

#please add cip or persist on project fstab
#/dev/block/platform/mtk-msdc.0/by-name/persist /persist ext4 noatime,nosuid,nodev,noauto_da_alloc,commit=1,nodelalloc wait,check,autoformat
#/dev/block/platform/mtk-msdc.0/by-name/custom /custom ext4 ro wait
/devices/mtk-msdc.0/11230000.MSDC0 auto vfat defaults voldmanaged=sdcard0:emmc@intsd,noemulatedsd
/devices/mtk-msdc.0/11240000.MSDC1 auto vfat defaults voldmanaged=sdcard1:auto
/devices/bus.2/11270000.USB3_XHCI auto vfat defaults voldmanaged=usbotg:auto
/dev/block/platform/mtk-msdc.0/by-name/frp /persistent emmc defaults

As you can see it's in the "version 2" format, due to the fact that stock rom is Lollipop. I managed to convert it almost completely this way

/boot emmc /dev/block/platform/mtk-msdc.0/by-name/boot flags=display="Boot";backup=1
/nvram emmc /dev/block/platform/mtk-msdc.0/by-name/nvram flags=display="Nvram";backup=1
/recovery emmc /dev/block/platform/mtk-msdc.0/by-name/recovery flags=display="Recovery";backup=1

/system ext4 /dev/block/platform/mtk-msdc.0/by-name/system flags=display="System";backup=1;wipeingui
/data ext4 /dev/block/platform/mtk-msdc.0/by-name/userdata flags=display="Data";backup=1;wipeingui;wipeduringfactoryreset
/cache ext4 /dev/block/platform/mtk-msdc.0/by-name/cache flags=display="Cache";backup=1;wipeingui;wipeduringfactoryreset
/protect_f ext4 /dev/block/platform/mtk-msdc.0/by-name/protect1
/protect_s ext4 /dev/block/platform/mtk-msdc.0/by-name/protect2

#please add cip or persist on project fstab
#/persist ext4 #/dev/block/platform/mtk-msdc.0/by-name/persist
#/custom ext4 #/dev/block/platform/mtk-msdc.0/by-name/custom
[COLOR="Red"]/devices/mtk-msdc.0/11230000.MSDC0 auto auto defaults voldmanaged=sdcard0:emmc@intsd,noemulatedsd[/COLOR]
/external_sd vfat /devices/mtk-msdc.0/11240000.MSDC1 flags=display="Micro SDcard";storage;wipeingui;removable
/usb-otg vfat /devices/bus.2/11270000.USB3_XHCI flags=display="USB-OTG";storage;wipeingui;removable
/persistent emmc /dev/block/platform/mtk-msdc.0/by-name/frp

Highlighted line is the only one I left untouched. It should be the internal sd card, the storage partition on the emmc. How can I create an entry for that in twrp.fstab format?

Obviously, if you see any other error in my file, let me now.
[Android Software Development] hackslash:
You have already mounted the userdata partition which essentially contains Internal Storage also. TWRP will auto detect Internal Storage in userdata so you're all set!
[Android Software Development] fgl27:
Is possible, to add flags to fstab, or to build process, to be able to flash other then boot or recovery image, via TWRP? (using the image of course not a flash zip...)

those that I wanna to flash are imagens partition that I can backup/restore, but they don't display on image flashing of TWRP.
[Android Software Development] vampirefo:
You can do that with system, you can have recovery.img, system.img, boot.img
[Android Software Development] hackslash:
I have one small question.

I know that TWRP supports encrypted data partition on Qualcomn based devices. However, how can I add support for encrypted devices (such as for a HiSilicon Kirin SoC) in TWRP as I couldn't mount the data partition. Is it as simple as adding the crypto lib or some modifications are needed in the source. If modifications are needed, can someone point me in the right direction.
[Android Software Development] NepoRood:
Sorry for the "newbie" question here, but where exactly do I send this information?

Also, my device tree is set up to use CM source, will that be a problem?

Big, BIG, Thanks to Team Win, for continual work on this project.
[Android Software Development] pix106:
Hi,

is it possible to mount /system automatically at boot ?

I tried modifying init.rc, but i did not find the correct way...

Thanks !
[Android Software Development] MSF Jarvis:
You'll have to join the #twrp IRC channel, pray to the lords that either [MENTION=2638973]bigbiff[/MENTION] or [MENTION=912474]Dees_Troy[/MENTION] have managed to find enough free time from their super busy lives and then give them a link to the device tree. They'll run a test build, which you'll have to test, if all works, you are set!

Edit: And no, CM is fine.
[Android Software Development] NepoRood:
Use this in BoardConfig.mk:

TW_NEVER_UNMOUNT_SYSTEM := true

---------- Post added at 08:39 PM ---------- Previous post was at 08:32 PM ----------

I guess I should've just PM'd you, lol, Thank You again! I will do as you advise :D
[Android Software Development] NepoRood:
I guess I should've just PM'd you, lol, Thank You again! I will do as you advise :D
[Android Software Development] Preet_:
How can I decrease the recovery.img size for the latest source of android6.0? I am using an old mtk device which has a recovery partition of just 6mb, Help me out [MENTION=912474]Dees_Troy[/MENTION]
[Android Software Development] AlxMAX:
You have to recompile the kernel and choose another compression method. Like LZMA.

Go to your device kernel subdirectory in the ROM source tree and produce the default configuration with make <yourdevice>_defconfig (you must use a working toolchain for that).

Change the configuration with make menuconfig and change the kernel compression method to LZMA. You may also disable EXT2 and EXT3 modules and let the EXT4 module handle those file systems.

Launch a kernel build to see if everything is OK.

If the kernel build went well, copy the .config file to the vendor directory in the ROM source tree (something like vendor/<yourmanufacturer>/<yourmodel>). Name it custom_<yourdevice>_defconfig.

In the same vendor directory, edit BoardConfigVendor.mk and add this line:

TARGET_KERNEL_CONFIG := ../../../../../../vendor/<yourmanufacturer>/<yourmodel>/custom_<yourdevice>_defconfig

Go back to the kernel directory and run make mrproper.

Assuming you already have the build environment variables set up for your ROM, launch mka recoveryimage to start building the recovery image.

You should get a smaller recovery image. I've done it for Nexus 6 and It worked just fine. There's room for further compression. The ramdisk image in the recovery is compressed with gzip. You can always add a variable to BoardConfigVendor.mk in order to change the ramdisk compression method to LZMA (you must ensure at the make menuconfig step that it is supported), but I haven't found it yet. Could you, please, let me know if you find it?
[Android Software Development] bigsupersquid:
it used to be, back in cm11,

MINIGZIP	:= $(shell which lzma)

in your BoardConfig
[Android Software Development] kenymccornick:
Hey, did you manage to reach the devs on the IRC channel? I want to request official TWRP for my device too. We have a fully working unofficial TWRP 3.0.0-0 and I can provide a link to the source on Github, the build.prop, device tree (our device just got official CM 13), etc.
[Android Software Development] MSF Jarvis:
Just join the #twrp channel on http://webchat.freenode.net/ and give the link to device tree there.
[Android Software Development] AlxMAX:
[MENTION=2980661]bigsupersquid[/MENTION]: The MINIGZIP macro is still used. For CyanogenMod, it is assigned some minigzip tool:

MINIGZIP := $(HOST_OUT_EXECUTABLES)/minigzip$(HOST_EXECUTABLE_SUFFIX)

For OmniROM, it is /usr/bin/lzma if another macro, BOARD_NEEDS_LZMA_MINIGZIP, is defined and set to true. If not, it is assigned the same value as for CyanogenMod:

ifeq ($(BOARD_NEEDS_LZMA_MINIGZIP),true)
MINIGZIP := /usr/bin/lzma
else
MINIGZIP := $(HOST_OUT_EXECUTABLES)/minigzip$(HOST_EXECUTABLE_SUFFIX)
endif

[MENTION=5797838]Preet_[/MENTION]: I suspect that setting MINIGZIP to /usr/bin/lzma affects the normal boot image too. If that's what you want, then just go ahead and set it in BoardConfigVendor.mk.
[Android Software Development] Preet_:
[MENTION=5797838]Preet_[/MENTION]: I suspect that setting MINIGZIP to /usr/bin/lzma affects the normal boot image too. If that's what you want, then just go ahead and set it in BoardConfigVendor.mk.[/QUOTE]

Can't we do the procedure with pre-compiled kernel? However it's not a big deal for me to compile a kernel from source but it would cut some time
[Android Software Development] AlxMAX:
You could do it only if the precompiled kernel was already built with lzma compression support and if it was compressed with lzma.
[Android Software Development] lovep10:
http://xdaforums.com/showthread.php?p=65482905
[Android Software Development] croperas:
Hi,

Can i build TWRP if only have the kernel sources?
[Android Software Development] Startrek852:
You need a device tree. You can't do anything without a device tree.
[Android Software Development] DarkFrenzy:
So I need kernel source and device tree .

Anything else I need ?
[Android Software Development] Startrek852:
Yes, obviously you need TWRP source, and CM or Omni source to build it in. I recommend building in Omni 5.1.
[Android Software Development] DarkFrenzy:
Good.everything I have except a high memory

Can I build twrp with 2gb ram?
[Android Software Development] vampirefo:
Yes, might want to make a swap file and mount it though.

I use 8GB of Ram on my computers.
[Android Software Development] croperas:
What can i do with a kernel tree then? and what about select a device tree similar to my device?
[Android Software Development] MSF Jarvis:
You can compile the kernel with a kernel tree. You can use a device tree from a similar device but you may need to update it a bit, as I did for the LAVA Pixelv1 by taking varun.chitre15's device tree for sprout(4|8) and updating the files from my own device.
[Android Software Development] pix106:
Hi,

A few months ago, i built a working TWRP 2.8.7.0 for my Lenovo Tab2 A7-10F, using prebuilt stock kernel.

Now I would like to build TWRP 3.0.

I can't get a booting recovery yet using omni 6.0 source and the prebuilt stock kernel.

Using a clean omni 5.1 source, i only get TWRP 2.8.7, not TWRP 3.0.

Am I missing something ?
[Android Software Development] croperas:
Thanks.

Couldn't find a DT for any amlogic device (guess they are keeping it for themselves), too bad i can't do it with a kernel... :(
[Android Software Development] MSF Jarvis:
It's super easy to make a device tree. Look for the 'TWRP Flags for BoardConfig.mk' thread through my profile or Google it. I have linked to a fantastic script by [MENTION=4478781]yuweng[/MENTION] that can help you with compiling and making device tree. [MENTION=7237874]NepoRood[/MENTION] can confirm that it works brilliantly :)
[Android Software Development] croperas:
Thanks dude!

will defiantly check it out, i am not discouraged :)
[Android Software Development] Wagierek:
Hello everyone!

I tried to compile TWRP for my device (LG d390n aka F60). The only way to access fastboot in this device is to nuke one of the partitions (dd if=/dev/zero of=...) and boot into it. I decided to nuke recovery partition. I compiled TWRP and tried booting it (fastboot boot recovery.img) and it just rebooted into fastboot (so it looks like it just made recovery reboot). What am I doing wrong?
[Android Software Development] #Vangreen:
Why you just not flash it like normal recovery?
[Android Software Development] Wagierek:
I tried it as well, didn't make any difference.
[Android Software Development] vampirefo:
Most devices can't boot recovery, I am pretty sure that was phase out in kitkat.
[Android Software Development] Startrek852:
Wrong, all my devices boot recovery.
[Android Software Development] vampirefo:
Nope they don't, you have an Ares 8 right? It doesn't boot recovery.
[Android Software Development] Startrek852:
No I don't, my friend does.
[Android Software Development] vampirefo:
What devices do you have after kitkat that boots recovery?
[Android Software Development] Startrek852:
2012 Nexus 7, and an LG G2.
[Android Software Development] Wagierek:
My device actually runs KitKat.

TODO: Try out on LP
[Android Software Development] vampirefo:
Your bootloader unlocked? Have You unpacked stock recovery ported twrp over to it repacked and flashed?

Recovery isn't always packed correctly sometimes, manual unpacking and repacking is required.
[Android Software Development] Wagierek:
I built TWRP from source, what do you mean by "repacked"?

On Lollipop, after flashing compiled recovery, the phone just stays black and reacts to nothing.
[Android Software Development] vampirefo:
Building from source only means you compiled twrp, doesn't mean packed it correctly.

Unpack both your stock recovery and twrp recovery to see if they are packed correctly.
[Android Software Development] Wagierek:
How can I find out whether my recovery is packed correctly or not?
[Android Software Development] pcwizzy37:
Cheap cheap cheap.
[Android Software Development] NepoRood:
Yes, in fact I can confirm that...

---------- Post added at 11:57 PM ---------- Previous post was at 11:43 PM ----------

After you compile, use the following example:

cm/out/target/product/YOUR_DEVICE/recovery/root/YOUR_FILES

Make sure everything is where it's supposed to be, IE: init.rc and recovery.fstab <-- 2 most important, in my limited experience

Note: CM 11 seems to work best using the AIO by [MENTION=4478781]yuweng[/MENTION]
[Android Software Development] Wagierek:
Everything seems to be on its place.

EDIT: There seems to be something wrong with the compilation process, not with my config or recovery or anything. I found the recovery which works on my phone (well, maybe not "works", but it does boot). I also found the device tree with which it was compiled. I tried to compile it bym my own, changing absolutely nothing, and it behaved exactly like my modded recovery (I was basing on that device tree). I synced with the whole OmniROM sources, what is wrong with my compilation?
[Android Software Development] Maqbool.Safiya:
LG l bello d335

Lollipop

Can anyone make it ?

Thanks
[Android Software Development] Startrek852:
http://xdaforums.com/general/general/guide-how-install-recovery-lg-l-bello-t3120030
[Android Software Development] pcwizzy37:
I am having difficulty making TWRP work on my LG Lucid (vs840), It compiles, but it will not let me boot into CM10, every time I turn it on, it goes into TWRP.
[Android Software Development] MSF Jarvis:
Don't quote the whole OP!!
[Android Software Development] pcwizzy37:
Whoops, sorry.
[Android Software Development] MSF Jarvis:
At least edit out the quote now, it takes too much space.
[Android Software Development] Maqbool.Safiya:
Ok ??
[Android Software Development] pcwizzy37:
Happy now?
[Android Software Development] MSF Jarvis:
I'd say so:)
[Android Software Development] Pavlex4:
Can someone help me build TWRP for s3 neo I9301I?

Can I use this device tree: https://github.com/MSM8226-Samsung/android_device_samsung_s3ve3g/tree/twrp
[Android Software Development] pcwizzy37:
The OP forgot to mention CM10 and CM10.1, CM10.1 is my favorite.
[Android Software Development] pix106:
Hi,

my post was in the middle of a long discussion, it got lost... :)

Maybe someone can give me a hint on what i am probably missing when trying to build v 3.0 instead of 2.8, using omni 5.1 sources ?

Thanks !
[Android Software Development] Captain_Throwback:
You have to use android_bootable_recovery from the android-6.0 branch, as that's the current branch for TWRP. It'll still build fine in the 5.1 tree.
[Android Software Development] pcwizzy37:
Did you clone the TWRP 3.0 branch into bootable/recovery?
[Android Software Development] Wagierek:
I'm trying to make my recovery using kernel source, but it's missing something, and I don't know what does it mean:

Anyone?
[Android Software Development] bigsupersquid:
try moving your kernel source from the directory it's in to the one it's complaining at the end about being missing. just a guess.

in my cm builds it goes in kernel/vendor_name/SoC_name instead of anywhere under recovery/ or device/ folders.

but that is set by variables in BoardConfig.mk, like

TARGET_KERNEL_CONFIG := cm_a5_defconfig

TARGET_KERNEL_SOURCE := kernel/htc/msm8974
[Android Software Development] Wagierek:
But my kernel is indeed in kernel/vendor_name/SoC_name. "recovery/" is the base folder in which I have all the source code needed.
[Android Software Development] Startrek852:
Then check your BoardConfig.mk to make sure there is no TARGET_PREBUILT_KERNEL variable and that TARGET_KERNEL_SOURCE is set to the correct directory.
[Android Software Development] Wagierek:
Of course it is, this was the first thing I checked out.

This error doesn't appear straight after running "make recoveryimage", no - it seems to appear after the whole kernel compilation process passes.
[Android Software Development] Wagierek:
Well, I changed the config a little bit and there are compilation errors right now. Damn you, LG, how could it release the source code of kernel, which doesn't compile?!
[Android Software Development] MSF Jarvis:
Oh don't worry, even Samsung does that. Ask [MENTION=5672995]jcadduono[/MENTION] :silly:
[Android Software Development] Wagierek:
This is ridiculous, even chpset drivers fail to compile.

Is it possible to include a single driver, while using prebuilt kernel?
[Android Software Development] bigsupersquid:
my old lg phone vanilla kernel source wouldn't compile because of some harmless-looking config changes but would with the included defconfig

(at least after developers complained to lg about compile-time errors)

you could try building a different kernel source of the same version number which includes that driver, build the driver as a module, and then see if punchmod works

but that's a real long shot.
[Android Software Development] pcwizzy37:
Number one, Remove Unity, and install LXDE, you will see a huge performance boost!
[Android Software Development] vampirefo:
Why would one even install Unity? Mate us were it's at. Used to be gnome, then along came Mate, LXDE is a watered down version of Mate, LOL.
[Android Software Development] Wagierek:
LXDE is indeed muuuuch faster. The sloppiness of Ubuntu was pissing me off to be honest.
[Android Software Development] pcwizzy37:
Because Unity comes default with Ubuntu (12+, I think) I have Ubuntu 14.04 with Unity removed, and LXDE instead, I Should have installed Lubuntu Instead. btw, Linux is my primary OS, not a VM!

---------- Post added at 03:56 PM ---------- Previous post was at 03:53 PM ----------

Even better, Don't use a desktop environment. Like my Pentium II 333MHz machine, (256MB RAM).
[Android Software Development] NepoRood:
The Linux "Flavor" really doesn't mean anything, it's all a matter of personal choice. DE's are changeable on all distros, whatever works best for you is what works best for you...

Personally, I say take the "plunge" and dual boot or just overwrite Windows ;)
[Android Software Development] vampirefo:
Now, now windows is suppose to be good for something, not sure what, but it's suppose to be.

I am testing Ubuntu 16.10, I upgrade every two years, that's the life cycle of Ubuntu.

I started using mate 3 or 4 years ago, when GNOME started the crazy stage.
[Android Software Development] Startrek852:
I need to keep Windows installed for Steam games and Odin. But Kubuntu is my primary OS.
[Android Software Development] NepoRood:
Windows has it's usage, I use it at least once a week, or so. Most of the time I'm on Linux though :good:
[Android Software Development] sdeft:
Hello to all the experts here

I Need your help:). I am trying to build latest recovery for g3 d855 just for fun and to learn.

I followed the guide in the op but I am getting some errors. What I did after setting up my building

environmemt is listed below

1. repo init -u git://github.com/lj50036/platform_manifest_twrp_omni.git -b twrp-6.0

(used the minimal tree as I was only interested in building recovery)

2. Added to the manifest/default.xml the below line

<project path="device/lge/d855" name="android_device_lge_d855" remote="TeamWin" revision="android-4.4" />

3. performed repo sync --force-sync device/lge/d855 had to do this as I was getting an error using

just repo sync

3. lunch omni_d855-userdebug and got the below Warning

WARNING: device/lge/d855/omni.dependencies file not found

I guess this is just warning as it is also in TWRP jenkis build messages

4. make clean && make -j3 recoveryimage which did not finish due to a sizing error

/home/android/twrp/out/target/product/d855/recovery.img maxsize=16729152 blocksize=135168 total=16850944 reserve=270336

error: /home/android/twrp/out/target/product/d855/recovery.img too large (16850944 > [16999488 - 270336])

make: *** [/home/android/twrp/out/target/product/d855/recovery.img] Error 1

make: *** Deleting file `/home/android/twrp/out/target/product/d855/recovery.img'

I can fix the above by changing the sizes in BoardConfig.mk but I don't want to do it as I am using the

device tree from TWRP so it should work.

Do you see any mistakes in above steps ? Any advice ?
[Android Software Development] MSF Jarvis:
No mistakes there, but you might wanna implement something like this in your device tree : https://github.com/TeamWin/android_device_htc_pico/commit/611e674bb398bf4e212671c7d523f9837be36efc

I use it on a device I maintain with only 5 mB recovery partition and it hasn't failed me yet to reduce recovery size.
[Android Software Development] vampirefo:
Looks good but kernel needs to support that compression. Twrp has flags to reduce the size of recovery, by not adding su and so forth.

But if kernel supports, that compression, that would be the route to go.
[Android Software Development] pcwizzy37:
Ubuntu 14.04 (or Lubuntu) is the sweet spot. I am not interested in Newer stuff.

btw, my computer's specs are:

2.26GHz Intel Core 2 duo P8400, 4GB RAM, Nvidia GeForce 9600M GS 1GB, Expresscard slot. Linux runs much better than Windows!
[Android Software Development] vampirefo:
That's close the specs of a dell PC, I just bought on eBay, just got it yesterday setup up dual boot on it.

My main machine is a custom build AMD, built it in 2007. CPU fan fell off, did some damage so decide to buy refurbished computer rather than build another due to lack of money, LOL.

Anyway got a nice computer for $169, similar specs as yours.

http://m.ebay.com/itm/291693336928?_mwBanner=1

---------- Post added at 12:13 PM ---------- Previous post was at 12:09 PM ----------

Look at twrp flags, to reduce size of recovery.

http://mobile.techforums.space/mobile/twrp-flags-for-boardconfigmk-7f2f7ad2.html
[Android Software Development] MSF Jarvis:
That thread is mine and is located at http://xdaforums.com/android/software/twrp-flags-boardconfig-mk-t3333970

Please link to that rather than some cheapskate cloning website.
[Android Software Development] Startrek852:
Do NOT link to tech forums, it's a crappy ripoff that steals posts and puts them on its own site.
[Android Software Development] sdeft:
Thanks for the quick replies. So I incorporated the suggestions and reduced the size a bit and flashed it but recovery does not start.

Any clues ?

Also I noticed that the increase in size is due to the sbin/ directory which contains a lot more stuff than the one from an official older version.

TWRP and other people here are building with ether KK or LP. However with the min tree in OP I am building with MM.

What do you think ? Could this be the reason ?

Shall I proceed with building the kernel too ? The device tree from TWRP I am using has a prebuilt kernel.
[Android Software Development] Android-Andi:
[MENTION=1364858]sdeft[/MENTION] if you switched to a lzma compressed ramdisk you need to make sure the kernel supports it.

Gesendet von meinem LG-H815 mit Tapatalk