yashsingh1/xdaforums huggingface dataset:
[Android Software Development] yuweng:
There is a quick dirty trick i found out a few months back to test whether TWRP build actually does boot by using stock 3e recovery via adb command... :cool:

ro.secure=1 [COLOR="blue"]<= Change to 0[/COLOR]
ro.allow.mock.location=0
ro.debuggable=0 [COLOR="blue"]<= Change to 1[/COLOR]
ro.adb.secure=1 [COLOR="blue"]<= Change to 0[/COLOR]

Edit the 3e default.prop as above then adb should work...

Now what you need to do is while at 3e recovery, push the whole TWRP ramdisk to stock 3e, manually start it & if everything is build correctly then you should see TWRP splash screen... :fingers-crossed:

adb push /home/nepo/cm/out/target/product/X10/recovery/root/ /
adb shell /sbin/recovery &
[Android Software Development] NepoRood:
default.prop comes that way already on this tablet, and adb works fine (it doesn't support fastboot, according to vendor, but I haven't tested that)

The dirty trick didn't work either :(

Kernel source is on GitHub, I think I'm going to clone that and see if it makes a difference

Thanks for Your Help,

Nepo
[Android Software Development] yuweng:
What adb says, you can actually get a recovery.log out of it, this means most probably your TWRP doesn't boot up at all... :cowboy: Just open up another terminal & adb pull /tmp/recovery.log if there is non then confirmed your build doesn't boot... kernel has nothing to do with TWRP whether it boot up or not, that is outside the scope of TWRP, using custom built kernel will complicates it, using prebuilt kernel will do... Source

Try disable exfat, refer to My TWRP doesn't boot for three flags that i know that can cause TWRP not to boot up... :cool: When your build works then it should look like this & after that, you know your builds boot then you can further on to check out what is actually causing it not to boot up when repack as recovery.img...

i notice your BoardConfig.mk doesn't use the cmdline, just follow what AIK or CIK says for repacking it.... :good:
[Android Software Development] NepoRood:
This didn't work, "no such file or directory", but, I'll find the correct path...

Good to know, there's no "def_config" for my particular device anyway :confused:

I updated local and pushed to git, "cmdline" didn't help :(

Maybe it's in my "Minimal" manifest? (55 Projects, and it works fine for a couple other devices)

Thanks again for Your Help and Time,

Nepo
[Android Software Development] yuweng:
i just git clone your device tree & it builds fine on my Part-Source, no error, one thing i did notice is that the init.rc is this instead of this, i think thats the reason it doesn't boot... :cowboy: Remove or remark this line... :cool: And the unpack arguments from AIK, is it exactly the same as your stock 3e... :confused:

Splitting image to "split_img/"...
BOARD_KERNEL_CMDLINE boot_type=0 disp_para=100 fb_base=0x0 config_size=53088 androidboot.serialno=00000000000000000000 androidboot.hardware=sun8i enforcing=1 console=ttyS0,115200 root=/dev/system init=/init vmalloc=384M ion_cma_list=120m,176m,512m loglevel=4 partitions=bootloader@nanda:env@nandb:boot@nandc:system@nandd:misc@nande:recovery@nandf:cache@nandg:metadata@nandh:private@nandi:alog@nandj:UDISK@nandk
BOARD_KERNEL_BASE 40000000
BOARD_NAME
BOARD_PAGE_SIZE 2048
BOARD_KERNEL_OFFSET 00008000
BOARD_RAMDISK_OFFSET 01000000
BOARD_TAGS_OFFSET 00000100

Unpacking ramdisk to "ramdisk/"...

Compression used: gzip
27818 blocks

Done!

Press any key to continue...
[Android Software Development] NepoRood:
I build without errors too, and my part-source works well for my MTK devices.

I originally had the "init.rc" you suggest, since it wasn't booting, I was reading over flags again from OP. It was there that I saw the example to point it to "init.recovery.rc".

From OP: TARGET_RECOVERY_INITRC := device/htc/pico/ramdisk/recovery/init.recovery.rc

I changed it back,to init.rc, still no boot.

I also noticed I had an extra MK arg, one from my mt8127 (--second offset), which the X10 doesn't have, lol. Removing that didn't help either, all other args are exact match to 3e from AIK.

I've got the exfat flags added, and about to do another build, will update in a few minutes...

EDIT:

Weird, using these flags:

TW_NO_EXFAT := true

TW_NO_EXFAT_FUSE := true

Tablet won't boot system now, or recovery. "Bricked" again, lol, for the moment anyway.
[Android Software Development] NepoRood:
Finally! TWRP has come to the X10

After many hours of work, and countless builds/unpacks/repacks, I got TWRP woking on my Dragon Touch X10 (Allwinner A83) :D

The reason it wasn't booting before, was an issue with the init.rc file, it wasn't quite right for TWRP. I removed the "target initrc" flag, and it booted (using the one that comes with TWRP) But, recovery was all that booted, no system (re-flash firmware)

After making a "hybrid" of the two (mine and TWRPs) I got it to boot properly, but, had no touch :confused:

After playing around with many, many, many "ko" files, I finally found the right ones needed. Turns out the touch screen driver depends on another driver to work properly. Also, proper placement of "insmod" was required in both init.rc and init.recovery.sun8i.rc

So, now I'm up and running, I need to make some "tweaks" to the build to have a final product, then I'll share it with the world :good:

Regards and Many Thanks,

Nepo

PS, I was determined Not to "cry" for help, lol, I wanted to figure it out on my own :cool:
[Android Software Development] MSF Jarvis:
Trust me, I would have cried. A LOT ;)
[Android Software Development] NepoRood:
Believe me, I wanted to, lol Just kept telling myself, give it one more day...

And today was The Day!
[Android Software Development] dam85:
Hello there! First of all, many many thanks to [MENTION=4478781]yuweng[/MENTION] for the great script! With this script I've managed to build my frist twrp recovery for my tablet.

But, I have a problem. I can't manage to make twrp to operate with touch input. It's only limited to mouse through OTG.

I tried many boardconfig.mk changes, I've tried all possible touch axis orientation combinations, with no luck.

I'd like to ask for help. If there's something crucial that I missed to configure, I'd like to know if it's something obvious of course. I can attach logs for investigation if you want.

Thanks in advance!
[Android Software Development] NepoRood:
I don't know if I, specifically, can help, but, anyone here will need more info. Tablet brand, model and manufacturer, would be a good start. Logs can come later :)
[Android Software Development] dam85:
Of course.

Tablet brand: Alcatel

Model: OneTouch pixi 3 8 wifi 8070

CPU: mediatek 8127
[Android Software Development] NepoRood:
I've built TWRP for a couple of MT8127 devices, both different, and both a pain! :p

Which source are you using to compile, CM or Omni?

Did you use these two flags in combination:

RECOVERY_TOUCHSCREEN_SWAP_XY := true

RECOVERY_TOUCHSCREEN_FLIP_X := true

Those are two I had to use...
[Android Software Development] dam85:
I've tried both omni (all versions) and cm12.1.

I've also used this flags combination I've read in a post.

No luck.

Theoretically, even if the touch axis are wrong, shouldn't be a touch input, even in wrong position?
[Android Software Development] NepoRood:
Ok, I used CM12.1 to build for my devices (I've yet to get Omni to work right, but, that's on me) Answer me this, when TWRP boots, is it landscape or portrait?

Also, can you upload your device tree? I'll need to see BoardConfig.mk and cm_{your device}.mk
[Android Software Development] dam85:
What's wrong with omni? I also couldn't sync the git for omni and then I found out that you have to have a git account in git configure in order to let you sync it.

I've tried all modes, my tablet works at portrait mode as I found out, cause in landscape the twrp theme was messed up. I used both modes, mdpi & hdpi. No luck.

Here is the BoardConfig.mk

TARGET_ARCH := arm
TARGET_CPU_ABI := armeabi
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_VARIANT := cortex-a9

BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_FLASH_BLOCK_SIZE := 131072

TARGET_PREBUILT_KERNEL := device/Alcatel/8070/kernel

BOARD_MKBOOTIMG_ARGS := --base 80000000 --pagesize 2048 --kernel_offset 00008000 --ramdisk_offset 04000000 --tags_offset 00000100 --board 1446623930

#MTK common twrp flags
TW_NO_EXFAT := true
TWHAVE_SELINUX := true
#TW_USE_TOOLBOX := true
TW_NO_EXFAT_FUSE := true
TW_THEME := portrait_hdpi
#RECOVERY_SDCARD_ON_DATA := true
TW_USE_MODEL_HARDWARE_ID_FOR_DEVICE_ID := true
TARGET_USE_CUSTOM_LUN_FILE_PATH := "/sys/devices/platform/mt_usb/gadget/lun%d/file"
BOARD_CUSTOM_BOOTIMG_MK := device/Alcatel/8070/boot.mk

and omni_8070.mk

$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)

# Time Zone data Credits to desalesouche => http://xdaforums.com/showpost.php?p=64850444&postcount=1204
#PRODUCT_COPY_FILES += \
#bionic/libc/zoneinfo/tzdata:recovery/root/system/usr/share/zoneinfo/tzdata

PRODUCT_BUILD_PROP_OVERRIDES += \
PRODUCT_MODEL="8070" \
TARGET_DEVICE="Pixi3-8_WIFI"

PRODUCT_NAME := omni_8070
PRODUCT_DEVICE := 8070
[Android Software Development] MSF Jarvis:
Please, full device tree.
[Android Software Development] NepoRood:
There's nothing wrong with Omni, lol, I just don't have any luck with building with it.

As stated above, need to see the whole tree. Use the script to push to GitHub (Option 6) and give us a link, or zip up your device folder and attach it here.
[Android Software Development] yuweng:
AFAIK, there are a few things that can mess up the touch input... :cowboy:

Interfere by other inputs, you'll need to blacklist it, an Eg. here

The touch is actually working but wrong orentation, will need swap or flip as highlighted by Neporood, you will need to touch everywhere on the touch screen to find that out & when any of the button is correctly press then it'll vibrate

Kernel problem, they disable it at recovery :rolleyes: - Nothing much you can do on MTK since most vendor doesn't offer kernel source

Many doesn't know that the kernel required by the recovery is actually absolute minimum, we don't need all of the other sensors, BT, WiFi, GPS, radio & etc & if we take out all those drivers, i believe the kernel would be half the size... :cowboy:

Since many MTK devices is using almost the same kernel source, one thing you can try is unpack with CIK & use the other Pixi kernel here & see if touch works... :fingers-crossed: You can even flash it directly if you know how to unbrick it.... :cool:
[Android Software Development] dam85:
I'm working on it. ;)

Alright, I have an authentication git problem, when I fix it I'll post the tree :) Thanks!

Thanks for your detailed post! I've already tried touching anywhere to find out if it's orientation problem. Nothing happened, so probably it's not the case.

I'll have a look about blacklisting and compiling the generic mt kernel. When I come to a result, I'll let you know!

---------- Post added at 11:00 ---------- Previous post was at 10:52 ----------

[MENTION=7237874]NepoRood[/MENTION] [MENTION=6552280]MSF Jarvis[/MENTION] Here is the git zip of my device.

I'm not sure if the whole tree is listing though. Maybe it's a problem of the script or the device is lacking some info? I'll wait for your response!
[Android Software Development] NepoRood:
Either you're missing some flags, or you need to blacklist, as yuweng suggested (I've never had to to that). You can use my device for an example if you wish, find it here.
[Android Software Development] dam85:
Yeah, thanks. I'll try to compile a twrp using your settings and see if anything good happens. I'll let you know of course :)
[Android Software Development] NepoRood:
Sorry I can't be of more assistance, but, these guys know way more about TWRP (and Mediatek) than I do :good:

PS: You may want to try my CM repo as well...
[Android Software Development] dam85:
Yes, no problem. I'll have some more tests and I'see how it goes. Thanks once more for your help!
[Android Software Development] yuweng:
its a known problem that some MTK Touch won't work on TWRP & nothing much can be done without kernel source.... :cowboy: Hmm, from your log, the boot & recovery path is wrong, it should be this & not mmcblk0boot0/ 1 is the preloader... :cool:
[Android Software Development] dam85:
Alright. I'll try to use the source of the kernel that you suggested previously.

Yes, I had it that way initially and I think that some errors occurred. Then I used the mmcblk0boot and the the boot and recovery sizes are being seen correctly. And full backup/restore works fine too. But I'll have some tests again with the configuration you suggest. Thanks again for your help!
[Android Software Development] NepoRood:
Back On Topic...

This flag doesn't work for me, at all:

TARGET_RECOVERY_DEVICE_DIRS += device/TabletExpress/X10/rootdir <-- Path I use

The only thing I can get to work right is:

PRODUCT_COPY_FILES += \ (blah, blah, for each file I want)

Using AIO, All branches of CM (11-13), and also using my own minimal CM12.1

Regards,

Nepo
[Android Software Development] odrix1:
When selecting the repository in the AIO-TWRP-Compile on BBC Linux - writes Internet status: Down --- ???
[Android Software Development] yuweng:
Quick search found Andreas Blaesius aka Android-Andi that links to this, applicable to Omni too... :cool: As the source code says, it has to be device/TabletExpress/X10/rootdir/recovery/root or just create device/TabletExpress/X10/recovery/root, copy all your files there & it'll work too, no need all those PRODUCT_COPY_FILES or TARGET_RECOVERY_DEVICE_DIRS

Already mentioned, its a simple bash script, just modify it to make it work....:cool: i think its bcos you're not using English language, try changing it from >/dev/null to >/dev/null 2>&1 & see if it works... :cowboy:
[Android Software Development] dam85:
I also have this issue. I'm using english so that's not the case. Personally, I run some of the commands manually and then the script do the rest of the process.

[MENTION=7445345]odrix1[/MENTION] Try and create some dirs from the script. For example:

mkdir -p ~/AIO-TWRP-Compiler

mkdir -p ~/$repo/.repo/local_manifests

And try to initialize the repo manually choosing the version you prefer.

If you're using omni, it requires a git account, so you better register and input your login details through these commands:

git config --global user.name "username"
git config --global user.email "yourmail"
git config --global github.user "username"
[Android Software Development] Van.Fanel:
I am about to try compiling TWRP for the first time. I selected CM part-source, says it takes 1.5 hours but my connection is slow. It has taken 12 hours+ already and it isn't done yet. I checked the size of the CM folder on Home and says it is about 4GB now.

My question is, how big exactly is the CM part-source?
[Android Software Development] MSF Jarvis:
Nearly 8 GB.
[Android Software Development] Van.Fanel:
Thanks. Is the the Omni part-source any smaller?
[Android Software Development] MSF Jarvis:
I'd say no. If you can wait, I will try to make a compressed package available for you, or you can Google for regalstreak's thread on 'Android Sources highly compressed' and download the TWRP source from there. I would recommend that you continue your download though.
[Android Software Development] Van.Fanel:
I found his thread. I should have asked here first. Heh

Anyway, I'll continue with my sync. It's already 4GB. Thanks for the help.
[Android Software Development] Van.Fanel:
I was resyncing my source and found out that my cm folder is now 9GB+! I thought it is only 8GB. Got error while compiling:

So I followed [MENTION=4478781]yuweng[/MENTION]'s tip to fix it.

When trying to do a repo init, I got this error:
[Android Software Development] MSF Jarvis:
[MENTION=4478781]yuweng[/MENTION], I'm busy right now, can you send a pull request if this indeed is a problem with the script? [MENTION=7237874]NepoRood[/MENTION], you're needed here I think
[Android Software Development] yuweng:
Whoops, i'm kinda busy with my 9 to 5 job too... :o

if its this Miscellaneous Tips => Sync corruption you followed, its a abbreviation, thought everyone would've know it... :o The actual command is...

cd ~/cm
repo init -u https://github.com/cyanogenmod/android.git -b cm-11.0
repo sync
[Android Software Development] NepoRood:
I don't think it's a script issue, my "cm" folder is 13.7 Gb, (".repo" is 11.7 Gb) after using the following Menu options:

5) Clean Up

[ 2 ] 100% clean (After this, use Menu 1 to sync/ extract clean source again)

Above is what I always use when changing devices, or branches, and I haven't had any errors since [MENTION=4478781]yuweng[/MENTION] made the last update to the script. Which used CM11 as default (manual edit required for newer branches)

[MENTION=5151671]Van.Fanel[/MENTION] try the method suggested by [MENTION=4478781]yuweng[/MENTION] for repo init, if you continue to get errors, I can compress my .repo folder for you.
[Android Software Development] Van.Fanel:
Thanks everyone. I will do what [MENTION=4478781]yuweng[/MENTION] suggested. Apparently, my command was wrong.

I am totally new to this. Forgive me. I am trying to figure out things on my own as much as possible.
[Android Software Development] NepoRood:
Forgiveness not required, asking for help, helps others with the same problem. We were all "new at this" at one time, heck, I'm still new ;)
[Android Software Development] Van.Fanel:
I just restarted my sync today. Had to defer it, been busy with other stuff. Now it says it's fetching 40/42 projects and my .repo folder is now 12.4 GB.

I think there's something wrong with my sync. Does anyone have a compressed cm part-source for Android 6.0?
[Android Software Development] NepoRood:
I use Android 4.4.4 (CM11), and even compressed my repo is 11+ Gb...
[Android Software Development] MSF Jarvis:
This should be a script issue. Let me recheck and get back.

Edit: Just had a look at the script, yes, it's using a dynamic system to create a part-source XML for repo syncing which actually isn't needed because super-awesome [MENTION=5123642]lj50036[/MENTION] has minimal manifests for both omni and cm available and I have been personally using the cm13 one for quite sometime myself. Omni one has been used by quite a few people, and reported working too. I'll update it soon.
[Android Software Development] NepoRood:
All of a sudden, my manifest folder is gone :confused:

This what I get with a new init:

[nepo@bbqlinux cm]$ repo init -u https://github.com/cyanogenmod/android.git -b cm-11.0
Illegal instruction (core dumped)

PS: It apparently disappeared between builds, worked fine, I changed some flags in boardconfig, then it stopped working...
[Android Software Development] MSF Jarvis:
This is new to me, and I do TONS of repo inits ("Not building!?!?! rm -rf FTW!")

You might want try killing your python daemon/interpreter/process by typing `killall python` and trying again. If it still fails, try updating repo itself.
[Android Software Development] NepoRood:
Thanks for the tip, turns out, python wasn't even running and Linux couldn't find it :confused:

After a system reboot, everything is back to normal. Weird that it just up and stopped though...
[Android Software Development] MSF Jarvis:
And once in my case, it kept a program running AFTER a reboot. Go figure.
[Android Software Development] Van.Fanel:
Can I use one of regalstreak's uploaded sources? And which should I choose?
[Android Software Development] MSF Jarvis:
Yes, definitely, but I must say that most of the sources there are by other people. regalstreak indexes them from the numerous threads that are out there to help y'all. Whether you choose CM/omni TWRP source depends on which device tree you're making. If it's a cm tree, then go for cm and likewise with omni. I can upload CM13 part source for you whenever you ask for it. Both repo folder and non-repo
[Android Software Development] Van.Fanel:
Will you upload it please? I'm itching to compile my own TWRP. :o
[Android Software Development] MSF Jarvis:
repo or non-repo? repo is larger but will be easily updated if you use repo sync option, while non-repo is smaller and doesn't have updating facility.
[Android Software Development] NepoRood:
Both? lol, I've never had CM13 work right for me, and would like to try yours out (or you can post/pm the init link, that'll work too ;) )
[Android Software Development] MSF Jarvis:
Again, I use [MENTION=5123642]lj50036[/MENTION]'s minimal manifest(I'm kind of official tester for it :p). If my memory serves right this is it :

repo init -u [url]https://GitHub.com/lj50036/platform_manifest_twrp_cm.git[/url] -b twrp-13.0

But if you get a 404 then you can always check out his github for it. The branch is most definitely NOT cm-13.0 so don't trip on it. I'll upload both to AFH in a few hours.

Edit:Labs currently experiences issues with URLs, by putting the required tags even inside code tags which breaks copy-paste on mobile. Might wanna check that
[Android Software Development] MSF Jarvis:
My super ****ty way of getting both repo and non repo. rm -rf from top of tree, everything except .repo is gone. tar -xvJf it, then repo sync -l and it'll be back. rm -rf .repo/ and repeat. Then I realize I don't build TWRP anymore and decide to rm -rf the entire folder itself.
[Android Software Development] NepoRood:
I've tried that one before, a month or so ago, and always got an error during a build :confused:

I'll sync it again and give it a shot, I really don't have anything to build TWRP for myself, so I've been looking into themes for it :p
[Android Software Development] NepoRood:
Well great, my internet went out @ 28/64 projects :-/
[Android Software Development] MSF Jarvis:
Mine's out too, forced to use a slow mobile data plan :/
[Android Software Development] MSF Jarvis:
OK guys, just checked my server, it's done compressing, digging up my AFH credentials now :rolleyes:
[Android Software Development] NepoRood:
My internet returned during the night, I finished my sync this morning. About to do a test build with CM13 part-source...

EDIT:

And I got this, a little over 3 minutes in:

host C: libcompiler_rt-extras <= external/compiler-rt/lib/builtins/mulodi4.c
prebuilts/clang/linux-x86/host/3.6/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
build/core/binary.mk:816: recipe for target '/home/nepo/twrp3/cm13/out/host/linux-x86/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.o' failed
make: *** [/home/nepo/twrp3/cm13/out/host/linux-x86/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.o] Error 127
make: *** Waiting for unfinished jobs....
[Android Software Development] MSF Jarvis:
[MENTION=7237874]NepoRood[/MENTION], I guess I'll have to extract and then try building it myself too since it's been some time when I built TWRP with it. You may want to try make otatools before mka recoveryimage as well. otatools bound to fail IIRC(me and [MENTION=5123642]lj50036[/MENTION] tried to fix it, but it needed frameworks/base). Maybe it'll fix your blues.
[Android Software Development] lj50036:
The only real issue here, is if we add back frameworks/base, it would add other dependencies, which seems counterproductive to the project :)

Thx Josh
[Android Software Development] NepoRood:
Thanks guys, it's not really that big a deal though. I can build TWRP with CM11/12/12.1, and I could probably use Omni, if I took the time to learn the little differences between the sources
[Android Software Development] Van.Fanel:
Non-repo should be fine I guess. It should have all the resources I need to build TWRP right? Thanks heaps! :)
[Android Software Development] MSF Jarvis:
Uploading the repo one currently. Will also add the non-repo soon.
[Android Software Development] NepoRood:
Riddle Me This...

TWRP-Men!

I synced Full Omni source, and I mean every project, and still got the same error :confused:

Y'all think it might be a device config issue?

(Please keep in mind, Nepo is a Newbie)
[Android Software Development] MSF Jarvis:
Seems to be a distro issue. I've not had this with Ubuntu 16.04/15.10 till now.