Related
Hi all o/
To celebrate two weeks of my successful CM12 building and hacking, I'm starting this thread. Its purpose is to discuss general CM12 building steps for beginners like myself, bugs and fixes, applying @JustArchi's optimisation flags, solving the resulting build failures.... and all the other CM12/S4Mini-related questions that don't belong to F4k's [ROM] thread but end up there (I was guilty of that).
First of all, my thanks go to:
@arco68 for making it possible to build ROMs for our S4mini
CyanogenMod team for the ROM itself
@F4k for his kernel and all the other excellent contributions to this forum
@JustArchi for finding what he found
In this first post I will outline the steps needed to build a vanilla unofficial CM12 for serranoltexx. serranoltexx is the only device I have so this is what I'll introduce. I suspect building serrano3gxx is just as simple (just replace the device name in all the relevant steps). I don't know what to do to build for i9192, if you do please contribute
Building your own CM12 ROM
Main article: http://wiki.cyanogenmod.org/w/Build_for_serranoltexx
The article above tells you how to build CM11, but CM12 builds just as well with minor modifications I'll outline here. To follow those steps you need a Linux installation. I will write how you can make an example Lubuntu-based virtual machine on your Windows box in a post below.
Modifications to the build steps:
"Install the SDK" -- you can skip that, because in the end we will not use any SDK tools.
"Install the Build Packages" - replace jdk6 with jdk7 everywhere, as Java 7 is needed to build Lollipop.
"Create the directories" - I will assume you've followed those steps and everything is under ~/android/system/
"Initialize the CyanogenMod source repository" replace "cm-11.0" with "cm-12.0" of course
"Extract proprietary blobs" we will do this completely differently. If you try to use extract-files.sh, the script will fail, and when I finally fixed the script my camera didn't work...
So, do this instead (credit to @F4k and @kyrillos13 for answering my question on page 90 of F4k's ROM thread)
* Go to https://github.com/TheMuppets/proprietary_vendor_samsung
* Switch branch to cm-12.0
* Use the "Download ZIP" button to get the copy of the entire thing. The zip is big (500 MB? ish) and 95% of it useless for us, so if you're trying to save some bandwidth you can try to do this trick to get only the "serrano-common" folder. If you do, make a post here with exact steps for others
* Copy the "serrano-common" folder to ~/android/system/vendor/samsung/ (to clarify, final directory structure should include ~/android/system/vendor/samsung/serrano-common/proprietary/app/ folder among others)
"Turn on caching to speed up build" - sounds like a good idea but we're going to be playing with compiler options, which diminishes its usefulness. It also uses a lot of disk space. Only follow it if you want your daily increments to build fast, and you don't expect to be doing global changes such as optimisation flag changes often. I didn't do this step.
This concludes my first post in this thread. I personally have never had problems with building after this part (except when I had not enough space or memory) and the resulting vanilla builds always worked for me fine. Feel encouraged!
Next post: some tricks and useful commands
A random selection of interesting things:
What recovery is good for applying my builds
Well they're all good, and they all work I bet. What I use is Phil's Touch and I'm on version 6.48.4 and it's worked perfectly.
How do I dirty flash my build on top of another CM12 build
I keep doing that since early F4k's builds and have no problems (yet!!). The trick is to only keep /data, while wiping everything else:
* Copy your newly build .zip file to your sdcard (you'll want to have a large enough sd card, I think)
* (if you want to) copy F4k's kernel and/or gapps too.
* Reboot your phone, go to recovery
* Backup your current phone. Seriously, never miss that step.
* Format /system (in Phil's Touch that's under "mounts and storage")
* Format /cache (as above)
* Select "install zip from sd card" and choose your ROM
* (if you want to) repeat "install zip from sd card" for F4k's kernel and/or gapps.
* Reboot your phone. It will take ~5 minutes or so for ART to re-compile all your apps
Soo my build didn't work. Wat do??
* Reboot to Recovery
* What I do is another backup. This gives me a nice archive containing my broken build, which I can later investigate
* Use recovery to restore the backup you've made before applying your build
* Reboot. You're back on a build that worked. Phew~
* (if you want to investigate) copy both backups (one that works and one that doesn't) to your PC. Uncompress the contents of /system for both, see if they obviously differ (such as one having binary blobs and one not lol).
Use F4k's kernel if you want to
Up to you, but here it is: https://s.basketbuild.com/devs/F4k/kernel_f4k-lp
I use it and as a result, I don't bother to optimise/improve CM12 kernel. I also don't care if I ever mis-compile CM12 kernel (not that it ever happens).
Gapps location
I use "mini" from here: https://s.basketbuild.com/devs/TKruzze/Android 5.0.1 GApps and all I can say is that it worked for me so far.
I made some changes and I forgot what I did
Command "repo status" will give you a list of all the files you've modified across all the git repositories.
I made some changes to a file and I forgot how it looked before
Go to that file's directory (or at least its git repository, but it's somewhat hard to figure out what is the repository structure in your workspace) and issue "git diff" command. It will produce a diff file with all your changes.
I made some changes to a file and I want to undo that
Go to that file's directory and issue "git checkout [filename]" command. It will drop your changes and replace the file with original.
My build finished and I want to make a new, fresh, one
You want to say "make clean" before you do "brunch serranoltexx" again.
Coming up: Basic JustArchi-inspired optimisations
Main article: http://forum.xda-developers.com/showthread.php?t=2754997
In the mid of 2014, @JustArchi recognised that all of Android has always been built with -Os option - meaning that the binaries are optimised for small size and not for execution speed. -Os is sometimes necessary (as it was on very early Android devices), but the "usual" build optimisation has always been -O2 meaning optimise for speed. Or -O3, which runs even more optimisations for speed (which might or might not help relative to O2 and will always make compilation slower).
Applying those optimisations has never been easier, because Lollipop is already built with GCC 4.8 (which was very highly recommended, but not in default toolchain, before). So all we need to do is activate -O3 by modifying some makefiles.
Does it do anything
In 0xbenchmark, several graphics-related tests (draw-arc, draw-circle) are up to six times faster. Does it matter? Dunno! But it's fun to see such a thing anyway!
What is THE most important file to modify?
Here: ~/android/system/build/core/combo/TARGET_linux-arm.mk
Line 70 defines "TARGET_arm_CFLAGS", this is the base compiler flags for *kernel* and starts with -O2. You can change that -O2 to -O3 if you want, but if you use F4k's kernel then it will do nothing in practice.
Line 77 defines TARGET_thumb_CFLAGS, this is the base compiler flags for android binaries. It clearly has -Os staring you in the face. Aha!! Change that to -O3 (or -O2) and you've just applied 90% of all compiler optimisations you can make. Build again. Your zip will be larger, this means it worked.
So I did that and it didn't finish building
Heh you're right, I lied. Unfortunately GCC is not as perfect as we'd wish and it will produce new errors or warnings with -O3 flag. Some of them make sense, some baffle me... Here's a list of what I had to change:
Error building android/system/frameworks//media/libstagefright/codecs/amrwbenc/src/isp_az.c, compiler detects array index out of bounds
It doesn't make any sense if you ask me (and I stared at the code a lot). There are two arrays f1 and f2. f1 has size [NC16k + 1] and f2 has size [NC16k], and if f1 is big enough then f2 should be big enough, but GCC disagrees.
For an off chance that GCC is right, I made f2 bigger [NC16k + 1]. Since nobody does sizeof(f2) it causes no change in logic, it marely allocates one extra (unused) word on stack. Made GCC happy.
[edit] this fix is unnecessary on gcc 4.8.5; see "Using SaberMod toolchain to build your CM12" on page 3 for how to use updated gcc[/edit]
Error building android/system/frameworks/av/media/libstagefright/codecs/m4v_h263/dec/src/deringing_[chroma|luma].cpp, cryptic "assuming when assuming" message
Another weird one. It *seems* to me that GCC unrolled a loop, and then looked at the unrolled loop index condition and concluded it's dumb after the unrolling, and complains. Modify:
android/system/frameworks/media/libstagefright/codecs/m4v_h263/dec/Android.mk
Find line: Local_CFLAGS += -Werror
Replace with: Local_CFLAGS += -Werror -Wno-error=strict-overflow
Error linking libhwcomposer, symbols "configRotator", "configMdp" and "updateSource" not found
Those three functions are defined with |inline| in the cpp files, while a compiler option tells gcc that inline implies static (dunno why it works with -Os, it really should never work). Open:
~/android/system/hardware/qcom/display-caf/msm8960/libhwcomposer/hwc_utils.cpp
Line 1238, remove "inline"
Line 1309, remove "inline"
Line 1335, remove "inline"
That is all, should build now!
Anything else uses -Os?
Yes, there's a bunch of Android.mk files that locally override the -O3 flag we just set with -Os (or -O2). You can make a global search, but here's a list of some important ones:
* every makefile under external/chromium_org/. This is the built-in web browser and unfortunately every single makefile does the override, and there's over9000 of them. If you want to change them all, you probably want to write a script of some sort. If you do, share one here lol.
* third_party/android_crazy_linker/src/Android.mk, adds -Os to LOCAL_CFLAGS. I do not know what crazy linker is, but if you want that to be bigger and faster, change that to -O3.
* third_party/zlib/zlib.target.linux-arm.mk, adds -Os to MY_CFLAGS_Release. Zlib sounds like something that should be fast, change that to -O3.
* modules/audio_processing/ lots of .mk files use -Os. How weird. You're only interested in *.target.linux-arm.mk, other targets do not apply to us.
* external/... some of the Android.mk files there use -Os. Some seem to matter.
Phew ~ next up: some more interesting optimisations that worked for me.
Compile for cortex-a15 target
The CPU in our S4mini is called Krait. It's neither Cortex-A9 nor Cortex-A15, but it's supposed to be similar to A15. However, the CM12 build system does not have an appropriate entry for Krait and defaults to generic A7+Neon, a choice that is not VERY bad but presumably not optimal either.
Go to file: ~/android/system/build/core/combo/arch/arm/armv7-a-neon.mk
Find the line that detects a15-compatible architectures (cortex-a15 and denver):
ifneq (,$(filter cortex-a15 denver,$(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)))
add krait to the list:
ifneq (,$(filter krait cortex-a15 denver,$(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)))
Activate neon vector extensions
[edit] see "Activate neon vector extensions, for real this time" on page 3 for a working, but hacky, solution[/edit]
Activate linker optimisations
In the in file: build/core/combo/select.mk there's room for some linker parameters.
Find the line that says:
$(combo_var_prefix)GLOBAL_LDFLAGS :=
and change it to:
$(combo_var_prefix)GLOBAL_LDFLAGS := -Wl,-O1
(that's: dash whiskey lima comma dash oscar one, no spaces, in case it's not readable)
I do not know what kind of optimisations linker makes, but this parameter asks it to make them.
Thanks a lot for this helpful and informative how-to. This is really appreciated if one likes to build the rom on his own.
Regards!
where can i download YOUR build of cm12?
well done!
This is a great write up. Anybody contributing for necessary mods required for duos will value add
I'm glad you guys like it I'll post some more tomorrow.
Howdareme said:
where can i download YOUR build of cm12?
Click to expand...
Click to collapse
Mine? I don't upload them anywhere because I don't see much point, making a near-identical copy of F4k's rom. Plus I am very lazy ;ppp
Now, to say something useful: if you're building any time soon, you might want to include this patch: http://review.cyanogenmod.org/#/c/82572/
It seems like there's a serious resource leak any time you switch your screen off.
Thanks for sharing this wonderful information!
sysKin said:
* Go to https://github.com/TheMuppets/proprietary_vendor_samsung
* Switch branch to cm-12.0
* Use the "Download ZIP" button to get the copy of the entire thing.
Click to expand...
Click to collapse
You might wanna consider adding that repo to a local manifest instead. See also @k2wls excellent guide: How to make your own CM-11.0 for your S4 mini
you can save the 500mb download by just adding this to .repo/local_manifests/roomservice.xml
Code:
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" />
although perhaps we should be using arco's repo instead of the muppets?
https://github.com/arco/proprietary_vendor_samsung
also we should make a list of recommend patches from gerrit.
arco doesn't seem to be doing anything s4mini-specific at the moment, tonnes of work on bluetooth it seems:
http://review.cyanogenmod.org/#/q/owner:"Arne+Coucheron"+branch:"cm-12.0",n,z
sej7278 said:
you can save the 500mb download by just adding this to .repo/local_manifests/roomservice.xml
Code:
<project name="TheMuppets/proprietary_vendor_samsung" path="vendor/samsung" remote="github" />
although perhaps we should be using arco's repo instead of the muppets?
https://github.com/arco/proprietary_vendor_samsung
Click to expand...
Click to collapse
Wooo thanks, this is exactly the kind of knowledge I'm hoping we can put in one place, and I'm a noob when it comes to android build system (and |repo| script).
also we should make a list of recommend patches from gerrit.
Click to expand...
Click to collapse
Yup!
sysKin said:
Wooo thanks, this is exactly the kind of knowledge I'm hoping we can put in one place, and I'm a noob when it comes to android build system (and |repo| script).
Click to expand...
Click to collapse
well it won't actually save you a 500mb download, it'll just download it using repo, but at least it'll keep it up-to-date this way (as i recall there is a way to just checkout the directories you want, but i can't remember it, think you have to list every directory you don't want and remove it).
you can also add revision="cm-12.0" to the end of the tag, but cm-12.0 is the default now anyway.
i'd say USE_CCACHE=1 is worth doing, unless you're making major changes for every build, it defaults to only using 1Gb these days.
also if like me you've already checked out the cm-11.0 branch, you can switch to cm12 using:
Code:
repo init -b cm-12.0
repo sync -j16
built ok after a second repo sync (think i was in the middle of a merge window) and it turns out you don't need to get the prebuilts anymore, the terminal app is part of the source now.
oh and the screen off memory leak patch has been merged now.
it did take my 3.2ghz core-i5 with ccache on an ssd and 12gb ram about 2.5 hours to build, so a lot longer than cm7/9/10 (30-45mins) and a bit longer than cm11 (1.5-2 hours)
edit: actually a warm ccache only saved 5-10mins it seems, much more java than c/c++ in android these days i guess.
stop "settings > device > buttons" from crashing: http://review.cyanogenmod.org/#/c/83030/ (merged)
still looking for how to:
1. enable editting quick settings tiles
2. unmount usb mass storage,
3. take a screenshot from reboot menu / edit the reboot menu
4. edit the lockscreen settings
For those of us suffering from network-derived timezone resetting to GMT+0 (not a fun thing to happen overnight when you need your alarm clock!), there is this possible solution:
http://review.cyanogenmod.org/#/c/83219/
Love this thread.......
Thanks @sysKin., have you try diffrenent toolchain ?
happyta5 said:
have you try diffrenent toolchain ?
Click to expand...
Click to collapse
Not yet, not on this build. I did use a different toolchain when I compiled CM 10.2 but without any knowledge about how repo works it was just one huge mess. Many guides here only deepened my misunderstandings by showing me how to replace kernel toolchain (ie what builds the kernel) saying nothing about rest-of-android toolchain (and I don't even remember some details of that anymore...).
Also, I never managed to successfully compile CM 10.2 with contemporary GCC 4.9 - too many weird internal compiler errors and other strangeness. Do you have any information about successes with current tools? There wouldn't be much point using different toolchains if GCC/clang/etc remain the same (well, GCC 4.8.4 was released on 19th of December, might be worth trying).
With some pointers from this thread, I'm able to build CM12 using ArchiDroid linaro 4.8 and 4.9 ToolChain with -O3 Optimized. CM seems run faster. I'm using @F4k kernel for the moment since I like the undervolt alot. May be I'll try SaberMod ToolChain later .....
Cheers ...
happyta5 said:
With some pointers from this thread, I'm able to build CM12 using ArchiDroid linaro 4.8 and 4.9 ToolChain with -O3 Optimized. CM seems run faster.
Click to expand...
Click to collapse
Could you share more about what you did? In particular, did you change the "android-eabi" toolchain or the "arm-eabi" toolchain?
The only instructions I've seen which explain how to use linaro toolchain refer to the "android-eabi" one, and if my understanding is correct, that's used only for building the kernel...
Hi,
I get an increasing amount of pms asking me how to build for chagalllte. If I would answer all that questinons en detail I could stop developing, and just answer emails. So I decided to publish some of the most basic and detailed answers I gave here in this forum.
I also hope, that people trying to build for chagalllte can find each other and build up a team for the task of getting cm to chagalllte. TEAM: together everybody achieves more...
Hope, this helps:
Hello,
Devices are said to be equal... As t700 and t800 are being equal but screen size. That's NOT true. They differ verry subtile. (t700 vs. t800 i.e. differ in sound and touchscreen drivers...).
That being said I would start like this:
learn git - not github, but git on the command line
get both: most current sammy rom for t800 and t805 and put them both untared side by side to you disc
compare them thoroughly - learn the differences
from opensource.samsung.com get kernel sources for both devices: again - learn the differences
start from my gits (device, vendor, kernel) - fork them on github, clone locally
put the differences to the three gits: step by step - commit every change with long comments (wil save your as)
before flashing your first build take a look at /system/etc/wifi of running device with sammy rom, take a look at updater-script of flashable sammy-rom zip, take a look at my git repackrom.sh and use it on your flashable zip.
don't be frutrated, iron out my errors, sammy errors and your errors - build next time...
Good morning,
to get this straight: driver refers to kernel code (statically build in or build as module), blobs (or prorietary binaries) refers to already build binaries from sammy rom: these are libs (i.e. libGLES_mali.so), compiled executables (i.e. gpsd, sswap), loadable firmware for hardware (i.e. /system/etc/wifi/*), some ascii files (some keymaps if I remember right) and all that I forgot...
Of course the mali drive (kernel) interacts ditectly and closly with some of the blobs (in this case libGLES_mali.so, and some people refer to leb_GLES_mail.so as mali driver. This doesn't matter for most people - for you IT DOES MATTER to know of which part I'm speaking...
I recommend usimg the kernel sour8ce from opensource.samsung.com fot T805, but cherry-pick at least the commits from my git or crpalmers picassowifi to make it build inline cm (so if you haven't learned git you are lost here the first time).
For the versions: yeah, you make with sammy's 4.4.2 blobs a cm-11.0 (aka 4.4.4) build. We have to take what we we get - we have no 4.4.4 blobs and propably nver wil get... Sorry.
For cm-12.0 I build at the moment with a mix of sammy 4.4.2, widevine 5.0 (taken from manta) and a hexedit patched libGLRS_mali.so from picassowifi - thats fun, mage. But relax, for cm-11.0 you will come along with the blobs from sammy 4.4.2 rom. You have to find out which blobs you need in addition to the ones I have taken from 800 rom to get modem running.
For the build environment: there are several setup guides for cm. Use google. I use gentoo amd64 build from scratch - but I think you won't want that... *lol*
Add this
Code:
[alias]
lg1 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white) %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative
lg2 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white) %an%C(reset)' --abbrev-commit
lg = !"git lg1"
to the end of /etc/gitconfig, clone my three gits, cd to them (one after the other) and type each time "git lg1"... "git show [hash]" will show you a single commit. I know it must be boring and anoying for you, but: learn git.
May the source be with you, Nvertigo
thanks so much for posting this, i just hope someone with skills can pick this up
TheLoverMan said:
thanks so much for posting this, i just hope someone with skills can pick this up
Click to expand...
Click to collapse
Just did a quick count: got 27 pms from 8 different people regarding this subject. So if we calculate that only half of this are really interested in giving up their sparetime, partnerships and all other activities, there could be a team of 4 people...
Code long and prosper, Nvertigo
Im also going to try cm forums see if anyone has come up with something
I will try to build and see if i can use your help, if needed. Thanks for the tutorial though.
I would be so grateful for CM12 on LTE model. I don't have knowledge myself, but I thouht maybe we all users of T805 could donate for NVertigo to collect money for him to buy LTE variant? What do you guys think?
Hello all,
As an effort to unify all our productions under our own brand, Alphasquare, we have transferred all Android development-related repositories to https://github.com/Alphasquare.
So change all your local manifests or clone origins to point to that URL, should be a simple CTRL-H.
Or, if you'd like to grab a pre-cooked roomservice, which I update accordingly to development, very frequently, go ahead and visit the repository https://github.com/Alphasquare/build-extras.
That's it for all, also remember that all Android 4.4 branches in the Alphasquare repository have been EOL'd. I merged the last commits to device and kernel repos from the Lollipop bringup, so that is the last update since we now switched to the lollipop branch.
Device tree EOL commit:
https://github.com/Alphasquare/andr...mmit/034ec74b0d6f2f8b87c3466353d43e523d1eedff
Kernel EOL commit:
https://github.com/Alphasquare/andr...mmit/1f519afcf9f20046e99e0cd5cd7fc982ed9b81d4
Click to expand...
Click to collapse
Lollipop is bleeding-edge though, exercise caution
That's all devs!
-
Signed-off-by: Jelixis (sergio[at]alphasquare.us)
Jelixis said:
Hello all,
As an effort to unify all our productions under our own brand, Alphasquare, we have transferred all Android development-related repositories to https://github.com/Alphasquare.
So change all your local manifests or clone origins to point to that URL, should be a simple CTRL-H.
Or, if you'd like to grab a pre-cooked roomservice, which I update accordingly to development, very frequently, go ahead and visit the repository https://github.com/Alphasquare/build-extras.
That's it for all, also remember that all Android 4.4 branches in the Alphasquare repository have been EOL'd. I merged the last commits to device and kernel repos from the Lollipop bringup, so that is the last update since we now switched to the lollipop branch.
Lollipop is bleeding-edge though, exercise caution
That's all devs!
-
Signed-off-by: Jelixis (sergio[at]alphasquare.us)
Click to expand...
Click to collapse
thnx for your hard work
This is a real possibility.
Have managed to compile and sort out some auto build scripts (work to do).
Need to get hold of some TWRP flash-able binaries. Current device state is bootloader locked and unrooted. Waiting for return period to expire........... Hoping current rooted users here can answer a few questions and provide any info so I can progress until I have rooted and personally flashed the kernel.
There are no promises or guarantees here.
https://forum.xda-developers.com/showpost.php?p=73794953&postcount=6
EDIT: waited a week, now applied for bootloader unlock code, unfortunately I have to wait 14 days after creating Huawei ID............ stupid !! I don't wish to unlock via any other method.
Might lose interest in that time .......... and work probably get in the way.
Don't really wish to move on blindly if it does not flash, nor stable as stock build. I need to flash on my own device first. In the mean time, I'll get my auto build scripts in order and do a little research. Was hoping to unlock and pull running STOCK official 307 boot.img from device. Downloaded the official firmware package from Huawei, but couldn't find any boot.img ......
We will be very thankful if you could develop a kernel for us. Hopefully you won't lose your interest on it!
carlchan31 said:
We will be very thankful if you could develop a kernel for us. Hopefully you won't lose your interest on it!
Click to expand...
Click to collapse
What I require is :
boot.img partition size. Check /proc/partitions ............. I'm not sure which it is on DL09 device. I don't want to build a boot.img larger than the actual partition. So need a Huawei user to point his out.
boot directory. check something like /dev/block/platform/_________/by-name/boot ?
Require a stock unmodified boot.img for 307 firmware
As I said, I'm unrooted for the next 14, now 13 days.......... Obtaining the above will assist to finish my build environment, and auto build scripts etc. Then can start on a few commits to fix some build warnings.
Help me to help you
Edit: installed the 'disc info' app, and still no joy to locate the boot.img directory and partition size. Will have to wait another couple weeks unless someone helps out.
Hi!
I just downloaded and compiled the nougat kernel source, but the repacked kernel failed to boot. I'm not sure wheather I should make some modifications prior compiling. I have the wifi version with C100B302. Will investigate when I have more time. @Lazing_About are your sources available on github? I'll push mine once I can sort out the issues.
Edit:
The initial huawei sources are already up in case anyone wants to clone or contribute.
https://github.com/TaRsY/android_kernel_huawei_BTV-W09
TaRsY said:
Hi!
I just downloaded and compiled the nougat kernel source, but the repacked kernel failed to boot. I'm not sure wheather I should make some modifications prior compiling. I have the wifi version with C100B302. Will investigate when I have more time. @Lazing_About are your sources available on github? I'll push mine once I can sort out the issues.
Edit:
The initial huawei sources are already up in case anyone wants to clone or contribute.
https://github.com/TaRsY/android_kernel_huawei_BTV-W09
Click to expand...
Click to collapse
Unfortunately no one provided what I hoped for so I could continue. I presume lack of interest, so whilst waiting for my 14 days, I have decided to buy a Note 8 (considered OnePlus5) and have spent time developing a private kernel for that. Work commitments have now got in the way with that too. At least I managed to patch to the latest Linux mainstream and quite a few patches too. Haven't yet rooted that either (of flashed). So I'll be out of action for all October afraid. My sources are still private until actual collaboration or public release. No need for anyone pulling / cherry-picking **** that is unstable if I haven't tested (at least method) first. Hopefully I'll have some time next month to take a further look at both projects, and eventually filter that work here
movie downloader for huawei mediapad M3
Thread closed at OP request
LineageOS 18.1 UNOFFICIAL for 2015 Samsung Galaxy Tab S2 SM-T715 ONLY​Model: SM-T715 (LTE) - gts28ltexx - 8" screen, Exynos 5433 SoC, LTE
This is the ONLY model that the ROM will work on.
There is NO ROM for the T710, T810 or T815 in this thread. Questions about T710, T810 or T815 will be completely IGNORED.
For T710 please use the equivalent ROM at its separate XDA forum thread.
For T810 please use the equivalent ROM at its separate XDA forum thread.
You MUST READ posts 1-3 (about 10 minute read) before deciding to install this ROM. If you think this is an unreasonable request, then stop reading now and find another ROM. Thank you.
DISCLAIMER
I am not responsible for lost data, identity theft, lost money, security vulnerabilities, bricked devices or any other hardware or software malfunctions that comes as a result of flashing this ROM.
All involved in bringing this build to you are working voluntarily on it in very limited spare time, and their other life commitments have much higher priority. Don't expect a prompt, or even any, response to questions and bug reports.
Before attempting to install this ROM
1. Ask yourself: would bricking your device be a disaster for you? If yes, don't try this ROM! It can't be guaranteed stable and reliable enough to depend on for daily use.
2. BACKUP YOUR DATA AND EXISTING ROM. Be prepared for a complete restore if anything goes wrong.
3. RESEARCH adb, fastboot, Odin/heimdall, and TWRP and how to use them, if not already familiar with these.
What works
bluetooth
wifi
GPS
brightness
audio through loudspeaker
audio through headphone jack
audio over bluetooth
SELinux enforcing
DRM level 3 (SD definition)
deep sleep
RIL - mobile data and telephony/SMS/Cell Broadcast - some limitations for telephony audio options apply, see below
vibration and haptic feedback
hardware buttons and lighting
What doesn't work
fingerprint. As retiredtab wrote in post 1891 at
https://forum.xda-developers.com/t/...t810-t815-t815y.3879302/page-95#post-85533725
the team will not spend anymore time looking at fingerprint. If you need fingerprint to work, stay with stock Samsung ROM.
DRM level 1 (no HD definition). There's more detail in post 1891 above. I will not be trying to achieve level 1 for HD definition. If you need HD definition for your streaming media, stay with stock Samsung ROM.
If you charge the device while it's powered off and then want to power it on, you MUST wait at least 30 seconds AFTER disconnecting the charger cable before pressing the power button otherwise you might run into strange boot problems such as the touch screen not working. While recent builds solved the touchscreen issue, you still might see excessive battery drain until you perform another reboot.
For telephony audio, currently only the loudspeaker option is working. If you try to use/switch to bluetooth audio during a phone call, the audio stack will go wild and afterwards loudspeaker will stop working too until you perform a reboot.
Please note that for an incoming call, it might take a couple of seconds until both sides can hear each other.
I have invested a lot of time trying to troubleshoot the audio routing, and this is for sure a device-specific issue most likely due to the the old Samsung binaries so chances are almost zero to get that fixed.
Possibly other features that I haven't tested or do not use.
Source Code
See FAQ 1 for links in post #2.
Thanks
LineageOS team for the upstream source code.
@retiredtab, @ananjaser1211, @lpedia, @Yogi555 and @CuckooPenguin for spending nearing 1 month fixing the 2 most biggest bugs in 17.1 that plagued users for nearly 10 months: the wifi instability and random reboots. These are discussed in detail at
https://forum.xda-developers.com/t/...rs-running-any-version-of-android-10.4308193/
https://forum.xda-developers.com/t/...rs-running-any-version-of-android-10.4308203/
A special shout out to retiredtab for providing the T710 ROM and code here which is the base for this ROM. Also this ROM would not have been possible with all the help and mentoring he provided during the past 6 months of development. Also many thanks to lpedia and bluess57 for their outstanding hints and tips.
All past contributors of the exynos5433 code, especially ananjaser1211 for his major contributions and @ripee for working on prior gts2 builds until end of 2021.
@rINanDO for his lmkd spam fix in 18.1.
Alpha testers: simon-edwards for the many hours testing and helping troubleshooting RIL, SELinux policies and various gapps options; Don K and Sir Thopas for addional RIL model testing.
@bluess57 for his excellent code donations for the gts2 LTE models.
retiredtab and lpedia for providing the blueprint for this forum entry and the FAQ in post #2 and constantly improving it. This work is just a little contribution standing on strong shoulders of previous contributions.
Frequently Asked Questions. You MUST READ this before posting any questions. Thank you.
QuestionAnswerQ1. Can I build this ROM for myself? Where are the source and kernel source files?A1. Yes, you can. The source files are listed below.
Kernel
https://github.com/metterschlg/android_kernel_samsung_universal5433
Device Tree
https://github.com/metterschlg/android_device_samsung_gts2-common-selinux
https://github.com/metterschlg/android_device_samsung_gts28ltexx
Vendor
https://github.com/metterschlg/proprietary_vendor_samsung
In addition, there is a repo diff file for device-specific tweaks needed to work and a roomservice.xml (local manifest file) file so you can build this rom yourself. The other patch required for tcp/ip is at https://github.com/DerpFest-11/pack...mmit/22fd53a977eeaf4e36be7bf6358ecf2c2737fa5e
Build manifest can be found at
https://github.com/metterschlg/local_manifests/blob/lineage-18.1/gts28ltexx.xml
Build environment setup is docmented (as code) at
https://github.com/metterschlg/los-devel-scriptsQ2. Is this ROM suitable as a daily driver?A2. It might be, depending on your requirements. You would need to try it yourself, with your preferred apps, to see if suits your purposes. I've been using it myself since mid April 2022 with no major issues.Q3. What do I do if my app xyz doesn't work?A3. I can't help diagnose problems with random apps I know nothing about. If the app is critically important to you and it doesn't work on this ROM, go back to a ROM where it did work.Q4. Why is this ROM laggy and/or buggy?A4. The device will be noticeably slower if you're using any Gapps package. Consider going gapps-free. A lot of apps will work without Google's services, or there exist alternatives that will. Check out F-Droid, Aurora Store, NewPipe, etc.Q5. What TWRP should I use?A5. I use official TWRP 3.6.1_9. Get it from
https://twrp.me/samsung/samsunggalaxytabs280ltexx2015.htmlQ6. Why should I use this ROM?A6. You don't have to! If you don't like it, go back to your old ROM.Q7. Will you offer monthly updates with security patches?A7. I plan to do so. I will try to update the ROM with the monthly security patches after LineageOS has released them, free time permitting. Each monthly build will be quickly tested to make sure the ROM still works, before it's made available (which might in some cases delay the release).Q8. I'm a newbie. Can you provide step by step instructions?A8. We simply don't have the time to do this, but there are lots of tutorials, videos, etc online showing how to flash custom ROMs and how to deal with common problems. Newbie questions are also accepted in the XDA General Questions and Answers forum. Having said that, @pflyaz has kindly make a guide in post #37.Q9. Can I report a bug with respect to the ROM?A9. Yes, but you need to supply the following information. If you don't, I won't look at it.
Provide an adb logcat of the problem, and if possible describe how to reproduce it. Note that I can't help if it involves downloading any app I don't already use that requires payment or creating a userid/password.
To get a logcat, open a terminal window on your PC, connect your device to it via USB, and do this:
Bash:
# clear the logcat first
adb logcat -c
# start logcat trace
adb logcat > problem.txt
# reproduce problem
# wait until problem has occurred,
# then stop trace by hitting ctrl-c then zip the problem.txt file
# before uploading it.
Q10. How long will you build 18.1 for this device?A10. For now, 18.1 will be built for all of 2022. After that, we will make a decision depending on a number of factors.Q11. Do I need to erase everything and format my data before installing this ROM for the first time?A11. Under most circumstances, yes.
If you're coming from stock Samsung Android, or an earlier version of LineageOS, or a different custom ROM, you MUST 'clean flash': boot to TWRP recovery, wipe system, data, dalvik/art cache, and cache partitions, then Format Data, then install this ROM.
If you don't do this you're likely to run into problems, such as getting stuck at the boot animation for more than 5 minutes.Q12. What Gapps should I use?A12. Your choice! There are several well-known Gapps packages, such as NikGapps, BiTGapps, OpenGapps, and MindTheGapps. OpenGapps is being removed as per this post. Do your own research as to what is the most reliable gapps option for you.
I recommend installing the SMALLEST version of any of these, preferably with just the minimum Google services needed to access the Play Store and run apps that depend on Google services.
You could also consider Google alternatives, such as Aurora Store, which mirrors the Google Play Store apps but doesn't need any Google services itself. Many Play Store apps do not actually depend on Google services.
If you are going to install any Gapps package, follow the installation instructions given for that particular package.Q13. I'm having problems with Gapps. Can you tell me why it's not working?A13. I can't answer any questions about Gapps, because I don't use them. Ask your questions on the XDA thread for the Gapps package you're using.Q14. Why isn't my post answered?A14. There are several possible reasons: the question is answered in the FAQ (in which case it will be ignored completely); or it involves apps or operating systems that I don't use; or it's about Gapps, which I don't use; or I simply have not had time to answer any questions.Q15. What speed up/optimization tips do you suggest?A15. These steps can make a big difference to performance:
Turn off animations. Go to Settings > System > Developer options, scroll down to the Drawing section, and set Window, Transition and Animator scale all to "Animation off".
Don't install Gapps unless you depend on something that only Google is providing. Use Aurora Store to get your preferred Play Store apps - they will all be available on Aurora Store. You can choose to access this anonymously or use a Google account.
Don't run more than two apps at the same time. You can probably listen to music in the background and use a web browser at the same time.
Use a web browser with built-in adblock and privacy features, such as Brave.
Use NewPipe to watch your streaming content. It has built in adblock so you don't have to watch forced ads.
Look for apps that are open source, ad-free and lightweight.
Q16. Does this ROM support Magisk so I can root my device?A16. Magisk works with this ROM and I'm using it, but that could change with any revision and changes by Google. However I can't help with any related issues. Direct any questions about Magisk to the XDA Magisk forum.Q17. Will this ROM ever become official?A17. Never. Official maintainers have onerous responsibilities, and I know my device trees, code organization and git commits will NOT meet LineageOS standards. I'm not able or willing to take on the responsibilities and commit the extra time to supporting an official build.Q18. What is the difference between this ROM and others?A18. This ROM tries to be pure LineageOS with little or no modification. Other ROMs may come with a different UI, different bundled apps, etc.Q19. Will there be any major 18.1 code modifications in the future?A19. I don't anticipate any major modifications. There may be some slight tweaking to the SEpolicy, small bug fixes and minor code cleanup, but all the hard work - getting the ROM up and running, and fixing all the major bugs - has been done. This doesn't mean the code is perfect or well organized, but I won't be making any major changes.Q20. Why did you fork the trees?A20. I wanted my own private branch where I could make changes that would only affect my own personal builds.Q21. Can you build a variant of this device? For example, a S-pen version?A21. I cannot and will not try to build for a variant device if I don't physically have that device. I have to be able to boot and test it myself, and there's no guarantee that I can get those variant features working. So I will NEVER build T710, T810 and T815.Q22. Does this ROM have any wifi connection issues?A22. This ROM's wifi has been stable on the specified device ever since lpedia and retiredtab determined the root cause of the wifi problems back in July 2021 and re-installed the original S2 network 'blobs' with LOS 17.1.Q23. Is this ROM secure so I can do financial transactions?A23. Although Android monthly security patches do improve general security, this ROM's outdated kernel and old proprietary vendor blobs/drivers will NEVER get updates of any kind, and could have significant security holes.
In addition, although the ROM is SElinux enforcing, there's a good chance that the rules written (about 800+ lines of code) have some errors.
If the device is rooted, this would further weaken the security.
With this information, it's up to you to make an informed decision about whether you trust this ROM to be secure enough for your financial transactions.Q24. Okay, I understand the consequences and willing to take the risks outlined, now where can I find the BETA ROM?A24. Downloads are at
https://sourceforge.net/projects/los4sgt/files/los18.1/
Please note that there are two builds for every date. Start with the enforcing build, if you hit issues, flash the permissive boot image to determine if your issue is related to SELinux. If you have Magisk installed, you first need to patch the permissive boot image with the Magisk app before flashing.
If your initial enforcing build install does not have working RIL, you might need to fix SELinux labeling of your EFS partition. To do so, use ADB in root mode. Please note that ADB root needs to be enabled in the developer options of your device. Then use the following commands from a PC connected via ADB:
Bash:
adb root
adb shell
# Check if SELinux relabeling is required, do not modify anything
restorecon -R -v -n /efs
# If you see some "Relabeling..." output, run the real relabeling
restorecon -R -v /efs
Release notes
June 18, 2023 Release
June 2023 LineageOS & Android security fixes. >5500 files changed.
May 14, 2023 Release
May 2023 LineageOS & Android security fixes. >5600 files changed
April 23, 2023 Release
April 2023 LineageOS & Android security fixes. >4600 files changed.
March 26, 2023 Release
March 2023 LineageOS & Android security fixes. >27000 files changed.
February 18, 2023 Release
February 2023 LineageOS & Android security fixes. >21000 files changed.
January 22, 2023 Release
January 2023 LineageOS & Android security fixes. >4200 files changed.
December 17, 2022 Release
December 2022 LineageOS & Android security fixes. >3800 files changed.
November 13, 2022 Release.
November 2022 LineageOS & Android security fixes. >4000 files changed.
Kernel improvements by Ananjaser
Starting with these builds I will only publish the SELinux enforcing ROM. If you encounter issues that might be SELinux-related, please first flash the boot_permissive-<date>.img as boot image and re-try to help me identify if the issue is SELinux-related.
October 22, 2022 Release.
Initial public release. First 18.1 T715 ROM with working RIL, also first 18.1 T715 ROM with SELinux in Enforcing mode. T710/T715 common code based on retiredtab's work for T710 so all his latest changes apply as well.
Reserved #3
Reserved #4
Reserved #5
Congratulations on this release @metterschling and @retiredtab , great to see!
@metterschling If you don't mind a couple of comments about your scripts, you need not have created a patch for my script. You could have just forked mine and pushed your changes to it. No need to complicate things for novice builders. Secondly, I'm sure your gts28lte tree can be a source of inspiration for the other 3 variants so as to build a complete set. Thirdly, you may be able to let gts28wifi users flash your builds if you add gts28wifi as a TARGET_DEVICE, to make it easier to cover more users in the meantime. Fourthly, you clone so many repos when it could be cleaner to fork then substitute your forks in the roomservice. This could avoid potential repo syncing errors.
ripee said:
@metterschling If you don't mind a couple of comments about your scripts, you need not have created a patch for my script. You could have just forked mine and pushed your changes to it. No need to complicate things for novice builders. Secondly, I'm sure your gts28lte tree can be a source of inspiration for the other 3 variants so as to build a complete set. Thirdly, you may be able to let gts28wifi users flash your builds if you add gts28wifi as a TARGET_DEVICE, to make it easier to cover more users in the meantime. Fourthly, you clone so many repos when it could be cleaner to fork then substitute your forks in the roomservice. This could avoid potential repo syncing errors.
Click to expand...
Click to collapse
Thank you @ripee. Just to be sure: all you above comments are related to my build environment setup script here, correct?
I agree with regards to the patch, this is how I started and just wanted to document my steps as code. During my next free cycle, I'll be looking at reworking this.
Regarding 2) as mentioned in the opening post my work is already the result of synergies between code trees for the other devices, mainly based on retiredtab's trees, and we keep the common set wherever possible.
So there is no need for 3) as gts28wifi users can directly use the equivalent one linked on the top of post #1.
For 4) I'm open for suggestions which clones you are referring to. As an example, I don't want to fork the entire LineageOS tree just to apply the small NetworkStack patch.
metterschling said:
Thank you @ripee. Just to be sure: all you above comments are related to my build environment setup script here, correct?
I agree with regards to the patch, this is how I started and just wanted to document my steps as code. During my next free cycle, I'll be looking at reworking this.
Regarding 2) as mentioned in the opening post my work is already the result of synergies between code trees for the other devices, mainly based on retiredtab's trees, and we keep the common set wherever possible.
So there is no need for 3) as gts28wifi users can directly use the equivalent one linked on the top of post #1.
For 4) I'm open for suggestions which clones you are referring to. As an example, I don't want to fork the entire LineageOS tree just to apply the small NetworkStack patch.
Click to expand...
Click to collapse
@ripee I've pushed a new version of the build environment setup script, following your guidance. Please let me know if there are more areas of improvement, very much appreciated!
November build lineage-18.1-20221113-UNOFFICIAL-gts28ltexx.zip uploaded. Please see FAQ #24 for the download link.
November 13, 2022 release notes:
November 2022 LineageOS & Android security fixes. >4000 files changed.
Kernel improvements by Ananjaser
Starting with these builds I will only publish the SELinux enforcing ROM. If you encounter issues that might be SELinux-related, please first flash the boot_permissive-<date>.img as boot image and re-try to help me identify if the issue is SELinux-related.
Enjoy!
metterschling said:
Thank you @ripee. Just to be sure: all you above comments are related to my build environment setup script here, correct?
I agree with regards to the patch, this is how I started and just wanted to document my steps as code. During my next free cycle, I'll be looking at reworking this.
Regarding 2) as mentioned in the opening post my work is already the result of synergies between code trees for the other devices, mainly based on retiredtab's trees, and we keep the common set wherever possible.
So there is no need for 3) as gts28wifi users can directly use the equivalent one linked on the top of post #1.
For 4) I'm open for suggestions which clones you are referring to. As an example, I don't want to fork the entire LineageOS tree just to apply the small NetworkStack patch.
Click to expand...
Click to collapse
If gts28wifi users get an error that their device is not gts28ltexx, then yes it would be necessary to add it as a target device in the tree. Lineage uses the networkstack repo from google, which you can tell cuz they track the aosp remote, so in this case we have nothing to fork and substitute. Only a patch of google's own repo would be convenient.
Just to clarify, since there has been discussion about the WiFi version (t713), can this ROM be safely flashed on one?
Also I believe I have a t715Y... Would this t715 ROM work on it?
(I have three Tab S2 units -- two t713 models and a t715Y.)
Thanks
KeepingItCuttingEdge said:
Just to clarify, since there has been discussion about the WiFi version (t713), can this ROM be safely flashed on one?
Also I believe I have a t715Y... Would this t715 ROM work on it?
Click to expand...
Click to collapse
The T713 and T715 have completely different chipsets. T713 is msm8976 and T715 is exynos5433.
If your T715Y is known as "gts28ltexx" OR "gts28lte" as described in post #1, then you can flash this rom on it. You can download an utility called devcheck by flar2 to verify. Your device name will be shown in the system tab under device.
https://play.google.com/store/apps/details?id=flar2.devcheck
metterschling's code checks for gts28lte,gts28ltexx using this below
https://github.com/metterschlg/andr...s28ltexx/blob/lineage-18.1/BoardConfig.mk#L17
KeepingItCuttingEdge said:
Also I believe I have a t715Y... Would this t715 ROM work on it?
Click to expand...
Click to collapse
Most likely, ROMs for the T715 work on the T715Y according to some XDA posts. Like this one. I don't own a T715Y, so can't test myself.
December build lineage-18.1-20221217-UNOFFICIAL-gts28ltexx.zip uploaded. Please see FAQ #24 for the download link.
December 17, 2022 release notes:
December 2022 LineageOS & Android security fixes. >3800 files changed.
If you are coming from a previous version of these builds, you can dirty flash, otherwise please perform a factory reset and format data before installing this ROM.
Enjoy
Hi friends, after loading from TWRP twrp-3.7.0_9-0-gts28ltexx.img.tar on my SM T710, my tab gets stuck on booting with lineageos graphics. I made the backup with TWRP if I upload the files can I repair the tab as before?
mikelosat said:
Hi friends, after loading from TWRP twrp-3.7.0_9-0-gts28ltexx.img.tar on my SM T710, my tab gets stuck on booting with lineageos graphics. I made the backup with TWRP if I upload the files can I repair the tab as before?
Click to expand...
Click to collapse
If I understand correctly, you picked the gts28ltexx version which is for the SM-T715. If your device is the SM-T710 (gts28wifi) I'd strongly recommend to use the ROM and matching TWRP linked in this thread.
If your device is SM-T715, please see FAQ #5 in post #2 of this thread. I use the downlevel TWRP because newer ones did not work for me.
I use a SAMSUNG SM-T715 device just as described:
Model: SM-T715 (LTE) - gts28ltexx - 8" screen, Exynos 5433 SoC, LTE.
To be able to install the ROM I used "TWRP twrp-3.7.0_9-0-gts28ltexx.img.tar"
After several attempts I could neither restore the BACKUP nor start the operating system. I had to do a complete WIPE and at that point lineageos advanced, now I'm having problems, I don't have the gapps I downloaded version 11 for ARM but despite having enough space it gives me an error "70" not enough space. I have no google services and no PLAYSTORE, I am in a critical situation, how can I install the google PlayStore? I can't even add gmail account from settings, it's a disaster.
metterschling said:
If I understand correctly, you picked the gts28ltexx version which is for the SM-T715. If your device is the SM-T710 (gts28wifi) I'd strongly recommend to use the ROM and matching TWRP linked in this thread.
If your device is SM-T715, please see FAQ #5 in post #2 of this thread. I use the downlevel TWRP because newer ones did not work for me.
Click to expand...
Click to collapse
Finally I come to the conclusion, after fully formatting my SAMSUNG SM T715 the ROM started up, the problem was the wrong recovery, using the version indicated in the guide above everything started up correctly.
Unfortunately this ROM is full of bugs and its use is useless, below I will list all the problems it causes during use:
1. 4g calls don't work, during the call you can't hear anything either incoming or outgoing.
2. Bluetooth only works with music while in call it remains mute.
3. the only way to call is to keep the speakerphone open otherwise the call will be silent.
4. Whatsapp is impossible to use and only allows you to use it in beta.
5. Smart Switch as for whatsapp does not work with custom ROMs
6. Does not sync contacts even though sync has started.
It's really a shame after all these hours to find that you've only wasted so much time.
Maybe I've done something wrong, I don't rule it out, maybe someone will be able to give me some advice.