[WIP] Enhanced kernel for CherryTrail devices (tablets/convertibles) - 4.14 - Chromebooks

Hi, there!
Now that we can use Project Croissant to get ChromeOS running or non-Chromebook devices, what is missing is a better kernel for improved compatibility.
Thanks to the threads by @nabil2000 I was able to successfully build a chromeos-4.14 kernel that boots on my test device (Lenovo MIIX320-10ICR - Z8350 processor) using a CONFIG from FydeOS 5.31 with most hardware enabled (WiFi, Bluetooth, sound), but it has the same issue as latest ATB builds: it freezes after a while. This doesn't happen with latest FydeOS or CloudReady builds (CloudReady bought FlintOS so I guess they are using some of their code now), so my guess if that their kernels have some patches that aren't included in the Chromium git. FydeOS is open-sourced only for RaspberryPi and TinkerBoard, there are no sources available for the PC or VMWare versions (PC version is not open source as many say, so be aware).
I already have some ideas to make the trackpad as well as the battery meter and brightness work, but it is not useful if the kernel isn't as stable as FydeOS (virtually no freezes or crashes once booted). I have already checked, and the issue is not the intel_idle.max_cstate issue that plagued most BayTrail/CherryTrail devices in the past (using value 1 doesn't change anything).
So any ideas how to get FydeOS kernel source? Patches to make the current chromeos-4.14 kernel stable?
UPDATE: As @nabil2000 reported, it seems that FydeOS is not willing to release their kernel source. But it is possible to get kernel config from v5.31 using configs.ko module, which is missing in the next version (v6.0). Using FydeOS v5.31 as base it is possible to build a very stable kernel for CherryTrail devices.
Thanks

Installation v71/v72 - kernel 4.14
FydeOS has the best support for the MIIX320-10ICR, with some caveats:
It will boot to a black screen, but you just need to wait until it finishes loading the hit Ctrl+Alt+Fn+F2, the screen will blink and then hit Ctrl+Alt+Fn+F1 to go back to ChromeOS (for some reason, the developer shell is blank in 5.31 but it seems to work fine on 6.0). Use Ctrl+Shift+Fn+F3 to rotate the screen manually;
WiFi works out of the box, Bluetooth is detected but audio does not work (Chromium misses a library for audio over Bluetooth);
Sound works too, but you need to install some UCM files (more about this later);
Camera does not work, and the trackpad works very well, with gestures, but does NOT click (tap to click work with a custom conf file, see below - the trackpad actually sends two events when clicking the physical button, as some Windows devices do, and this doesn't work with cmt driver).
First I tried to build the ChromeOS file using the chromium.img from FydeOS v5.31. It booted fine and I was amazed to see the ChromeOS logo and Google enrollment, but PlayStore setup didn't finish (low space?) and there was no way to install it to another driver: many GPT errors and the installer failed...
Then I tried to do everything on place:
Booted to FydeOS on USB drive;
As I could not get to the dev shell in v5.31, I had to login then use crosh and shell, then installed it on a second external disk (120GB SATA on USB, /dev/sdb):
PS: your device may be a different one, check the correct device name using "lsblk" or "fdisk -l" and be aware that this installation erases the whole disk!
Code:
sudo chromeos-install --dst /dev/sdb
After installing, I have used option 2A from GitHub page (very detailed, thanks!) with the script, soraka (or pyro) and caroline recoveries (both versions 11151.113 = v71) on another disk:
PS: FydOS v5.31 kernel does not have support to VTPM_PROXY, while v6.0 does, it means you cannot use swtpm.jar with FydeOS v5.31 and chromefy. For nocturne or Android Pie ARC, you must use FydeOS v6.0, otherwise ARC won't work.
Code:
sudo bash ./chromefy.sh /dev/sdb recovery.bin caroline.bin
Answered YES to use the local installation, YES to resize partitions and NO in the end to keep SELinux as enforced (it may work fine if you keep it to enforced with nocturne recovery tho when using FydeOS v6.0);
Rebooted using the final installation, logged in and everything seemed fine, but then Play Store would not show installed apps even after a reboot, so I tried a powerwash and it seems it fixed the issue, now it seems to be working fine.
Original post: https://forum.xda-developers.com/showpost.php?p=78891386&postcount=729

Post installation fixes v71/v72 - kernel 4.14
1. Sound
You need to install UCM files using linuxium-install-UCM-files.sh script after remounting rootfs as RW.
Code:
sudo remount -o rw,remount /
sudo bash ./linuxium-install-UCM-files.sh
2. Headphone jack
You must send this quirk to the rt5645 module when loading it, so while rootfs is still RW, as root add a file named "miix320.conf" to /etc/modprobe.d with this line:
Code:
options snd_soc_rt5645 quirk=0x1030
PS: if you have used the correct UCM files then the audio should change between speakers and headphones, but not mic. To enable internal mic:
Code:
sudo alsaucm -c chtrt5645 set _verb HiFi set _enadev DMic
and to enable mic from headset:
Code:
sudo alsaucm -c chtrt5645 set _verb HiFi set _enadev HSMic
3. Tap to click with trackpad
While rootfs is still RW, as root add a file named "50-mixx320.conf" to /etc/gestures:
Code:
Section "InputClass"
Identifier "MIIX320 conf"
MatchUSBID "048d:*"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Option "Tap Minimum Pressure" "1"
EndSection
PS: for this to work, make sure "tap-to-click" is enabled in trackpad section of system Settings. If you have another device, use "dmesg | grep input:" with "lsusb" to find your device USB id instead of "048d:*".
Still needing fixes:
- chrome://flags is blank for some reason, so any special flags should be added manually to "chrome_dev.conf" instead;
- Trackpad physical button click;
- Brightness control;
- Battery meter;
- Rotation;
- Automatic change between tablet/desktop modes;
- Cameras (hardly they will work as they rely on ATOMISP, which was abandoned and does not work even on newest kernels).
Original post: https://forum.xda-developers.com/showpost.php?p=78978577&postcount=757

reserved

Good news! With chromeos-4.19 it is possible to fix most problems:
- trackpad button click;
- battery meter;
- accelerometer sensor module is loaded, it needs to be tested;
- possibly brightness can be fixed too.
Using FydeOS v5.31 kernel config as base I could get a very stable build, but it broke loading ARC somehow, and I have no idea why. Maybe it's a permissions/signatures issue? I will try to run chromefy again, with the new kernel already in place to see if it works.

lfom said:
Good news! With chrome-4.19 it is possible to fix most problems:
- trackpad button click;
- battery meter;
- accelerometer sensor module is loaded, it needs to be tested;
- possibly brightness can be fixed too.
Using FydeOS v5.31 kernel config as base I could get a very stable build, but it broke loading ARC somehow, and I have no idea why. Maybe it's a permissions/signatures issue? I will try to run chromefy again, with the new kernel already in place to see if it works.
Click to expand...
Click to collapse
Nice to see you do some kernel work.
Care to share link to Chromium OS Kernel 4.19 source code, I would like to get a crack at using menuconfig to add drivers..

nabil2000 said:
Nice to see you do some kernel work.
Care to share link to Chromium OS Kernel 4.19 source code, I would like to get a crack at using menuconfig to add drivers..
Click to expand...
Click to collapse
Sure. I should post a full guide as soon as I get ARC working without issues, the new kernel is awesome.
I have used the same base procedure as you did:
https://github.com/dnschneid/crouton/wiki/Build-chrome-os-kernel-and-kernel-modules
I then cloned (duplicated) the kernel source (chromeos-4.14) so I could then checkout the newer version while keeping the old one:
Code:
$ cd ~/kernel_new
$ git reset --hard origin/chromeos-4.19
PS: I am building on Xenial (not chroot), so I had to install libssl-dev in order to successfully build it.

lfom said:
Sure. I should post a full guide as soon as I get ARC working without issues, the new kernel is awesome.
I have used the same base procedure as you did:
https://github.com/dnschneid/crouton/wiki/Build-chrome-os-kernel-and-kernel-modules
I then cloned (duplicated) the kernel source (chromeos-4.14) so I could then checkout the newer version while keeping the old one:
Code:
$ cd ~/kernel_new
$ git reset --hard origin/chromeos-4.19
PS: I am building on Xenial (not chroot), so I had to install libssl-devel in order to successfully build it.
Click to expand...
Click to collapse
I am a lazy billy - thanks - I like copy & paste, & think as little as I can afford

Could you help me patching it on my GPD pocket?
it uses cherry tail
https://forum.xda-developers.com/ha...gpd-pocket-t3928828/post79496417#post79496417
thank you

Related

Google Android Development

TIME TO MOVE ON
i wil be on xperia section
i am happy that i could help this section
Best Regards, Happy Cookling and Programing!
Hy all
I started this tread because the interest to android is growing
I invite all people with linux knowledge or C programing skills to join
If you know some hardware programing is better
We need
- developpers
- testers
i will not post an guide how to setup the compiler and set variables
if you dont know this stuff please stick to Google Android thread and dont post here stupid questions as IT IS READY / WHEN WILL IT BE READY
WE DO THIS IN OUR SPARE TIME AND WE HAVE FAMILY AND LIFE
So shell we invite the penguin to our phones?
WIKI Page
(Thanks Bikor_gj)
http://wiki.xda-developers.com/index.php?pagename=Niki_Android
GIT Trees
Vogue
http://git.linuxtogo.org/?p=groups/mobile-linux/kernel.git;a=shortlog;h=refs/heads/htc-vogue
MSM
http://git.linuxtogo.org/?p=groups/mobile-linux/kernel.git;a=shortlog;h=refs/heads/htc-msm-2.6.25
Reserved For Messages
Build Instructions for the ones that want to help
- Create working dir:
Code:
mkdir ~/android-kernel
- Go to the dir:
Code:
cd ~/android-kernel
- Clone the Linuxtogo GIT:
Code:
git clone git://git.linuxtogo.org/home/groups/mobile-linux/kernel.git
- Go into newly created dir:
Code:
cd ~/android-kernel/kernel
- Create a new branch, call it htc-msm and link it to the official htc-msm development branch:
Code:
- Descend into the "main" android dir:
Code:
cd ~/android-kernel
- Get toolchain:
Code:
wget http://www.codesourcery.com/gnu_too...-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
- maybe you need to rename the just downloaded file (because after .tar.bz2 wget has added ?lite=arm). (HINT FOR LINUX-NEWBIES: USE TAB TO COMPLETE KNOWN FILENAMES!! - In this case type: mv arm(TAB) arm(TAB) -> backspace till 'bz2' is the last word)
Code:
mv arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2\?lite\=arm arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
- unpack the toolchain:
Code:
tar -xjf arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
- ascend again into the 'kernel' directory:
Code:
cd ~/android-kernel/kernel
- make the kernel:
Code:
git checkout -b htc-vogue origin/htc-vogue
You also have to use
Code:
make vogue_defconfig ARCH=arm
- export path so the newly downloaded toolchain will be used instead of your default compiler (which would compile for your computer instead of your phone):
Code:
export PATH=~/android-kernel/arm-2008q1/bin:$PATH
- make the zImage-file:
Code:
make zImage ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
Now the zImage file is created inside the directory kernel/arch/arm/boot.
When uploading this to your phone, remember that you only have to replace the zImage after each kernel build - the Linux environment on top of the kernel can just stay the same, so initrd (which is the ramdisk filesystem) can stay the same.
BR
Reserved For Kernel Status
Kernel status
no more power button //thanks biktor_gj
nike mtype added
audio working
call working
data working
sms unknown //due to keyboard and ts
keyboard screwed // somethings not right needs investigation
OnSreenKeyboard working
Touch screwed // SOLVED
when this kernel probelms will be solved i will release the new kernel
I have knowledge of both C and linux so I vollunteer
hi,
i can be a tester... also i have some little linux knowledge...
I have limited knowledge of both c and linux, so I possibly could help.
It seems useful however to setup an SVN or something, so even 'non-registered' developers can write patches and submit them for review. You can set up such an SVN for free at assembla.com, together with a wiki, TRAC and more. They even say you can ask for more storage space and stuff if your project is an open-source project.
If you have such an SVN developers like me can help without making any false promises of some sort.
I hope you know what I mean, it sounded better in my head
i know linux and i can do beta tester. i'm studying engineering too.
i also know linux and a bit of C...i can do testing too.
as you already know, I'm in too for development...
i will try the new kernel asap...
I tried this kernel and indeed, the keypad works on mine!
(touched the TS though, just because you said I wasn't allowed ) It froze, so reboot...
awesome! keys work all good! numbers work and also dpad and enter works!
(by the way: how will you make it possible to enter text? android is coded to enter numbers...
the_fish said:
awesome! keys work all good! numbers work and also dpad and enter works!
(by the way: how will you make it possible to enter text? android is coded to enter numbers...
Click to expand...
Click to collapse
I believe by the end of this year or somewhere in the beginning of 2009 Google is making a system for creating software input methods, which would theoretically allow us to write an application that would reroute direct hardware input. I think. We'll have to see what the future will (or the talented developers here) bring.
man, awesome!!! good job, jerpelea. keys work great!!
graey said:
I believe by the end of this year or somewhere in the beginning of 2009 Google is making a system for creating software input methods, which would theoretically allow us to write an application that would reroute direct hardware input. I think. We'll have to see what the future will (or the talented developers here) bring.
Click to expand...
Click to collapse
ok... the onscreen keyboard would be ok for the time we have to wait
Jerpelea: Why do you want Ubuntu as dev os? I'm using OpenSuSE and am able to build the kernel.
I am thinking (since 2 weeks) to try Ubuntu again (used to use it), but may take while before I get to it...
Boylen said:
Jerpelea: Why do you want Ubuntu as dev os? I'm using OpenSuSE and am able to build the kernel.
I am thinking (since 2 weeks) to try Ubuntu again (used to use it), but may take while before I get to it...
Click to expand...
Click to collapse
I think he is just saying that because it's easier for people to use??
works fine for me on vanilla debian
new kernel works fine screen still too responsive keys work calls work
it works! but after few minutes my nike is auto-turned off :O
garsim said:
it works! but after few minutes my nike is auto-turned off :O
Click to expand...
Click to collapse
i guess we have turn the auto turn off in wm to unlimited or run it on usb plug...

Gkernels 1.5 FINAL

For use with Streak Gingerbread Roms
Edit 12-7-11
This is the marked end of Gkernels project,
Gkernels 1.5 FINAL
but the marked beginning of Gxkernels!
Changes to 1.5 include:
Bumped the Dell source to 2.6.35.14 -Stable
Removed QoS in networking for reasons clear to my mind
Flashable zip here: http://db.tt/JuCSscC8
Developer tar.gz here: http://db.tt/pNkHIPRQ
Special thanks to you, the user of Gkernels!
-G
Edit 12-4-11
Gkernels1.4.3.1 now a flashable zip from your recovery, for easy installs!
lex parsimoniae
Special thanks going to _n0p_ for this method!
Download link here:http://db.tt/XrDJQ6Jv
to install:
copy the zip to sdcard, launch recovery in your streak, flash the zip file
for future releases, I will include the standard Gkernels tar.gz for rom developers, and also the flashable zip file, as two separate links for the community.
-Greg
Edit 12-3-11
GKERNELS1.4.3.1
Built with an older toolchain arm-eabi-4.3.1
Changes from 1.4.0.1 include:
<*> General filesystem local caching manager
<*> Filesystem caching on files
Wifi-
<*> Common routines for IEEE802.11 drivers
--- Bluetooth subsystem support
[*] L2CAP Extended Features support (EXPERIMENTAL)
networking options-
[*] IP: multicasting
[*] IP: ARP daemon support
Qos service changed-
<*> Hierarchical Fair Service Curve (HFSC)
---removed from 1.4.0.1 version---
adjust priority to speedup resume thread, (seems to help with wifi issue, special thanks DSC-Team)
Again, no overclocking;
Download Link here: http://db.tt/0vlfvlaI
Edit 11-27-11
1.4.0.1
changes since 1.3.3:
Suspend sleep mode (Power collapse suspend)
Control the low power modes of memory
Default Memory Low Power Mode during Idle (Memory in retention)
Default Memory Low Power Mode during Suspend (Memory in deep power down)
Enable standalone power collapse
Android RAM Console Enable error correction
Virtual Contiguous Memory (VCM) Layer
Download link: http://db.tt/ZnaqJ9qH
I am fairly certain wifi freeze issue is resolved. Further testing is needed to prove this;
Enjoy!
-Greg
Gkernels 1.3.3 still attached below
Gkernels 1.3.3
changes from Gkernels1.0
Enable WiFi control function abstraction
Preallocate memory for WiFi buffers
Enable KSM for page merging
Use kernel mem{cpy,set}() for {copy_to,clear}_user() (EXPERIMENTAL)
I've got some under-volting going on with static voltage regulator
kernel switched to low resolution timer
Cross-Compiled using arm-eabi-4.4.3 from Dell 4.05 source, thanks given to Dj Steve for his tip with wifi practices. Thanks going out to kernel cross-compiling sources and books; thanks to all the rom chefs;
To me, Streak kernel work is more of an art than a science. Include Gkernels in your rom; do what you feel with it, all is permitted.
Installation Instructions
Method 1:Assumption is on a linux distro,
obtain a prebuilt fastboot and adb binary, and get them into your /bin folder, to use the commands from anywhere within your system
download Gkernels1.3 and extract, if you have not already done so.
attach streak to computer with usb cable;
from the extracted archive directory run this command in terminal:
sudo adb reboot bootloader
the streak will then boot into the fastboot mode
Then:
fastboot -i 0x413c flash boot boot.img
Then:
fastboot -i 0x413c reboot
then from same directory, run this command as phone is rebooting:
sudo adb push dhd.ko /system/lib/modules
I then recommend rebooting one more time.
Method 2: Any system
Re-substitute the boot.img and dhd.ko in the archive, by replacing same files, in your chosen rom's update zip;
transfer to the device
then flash as you would, the rom using your prior flashed recovery.
Thanks to Delirium77!
Method 3: Bypass for adb with root explorer/total commander app from the market
flash the boot.img with fastboot per method 1-
copy the dhd.ko file to your sd card, unplug your device, and using root explorer/total commander, navigate to the file on the sdcard, then move it to:
/system/lib/modules
ensure the dhd.ko file has correct permissions, then your wifi will function after a reboot.
-Greg
Thanks for your work!
can you build for your kernel few modules?
cifs.ko, slow-work.ko
for slow-work there is some kind of manual editing and preparing.
or if you give me your .config i will try this myself?
EDIT:
also you can statically compile CIFS filesystem into kernel
mind if i ask what advantage/s does this kernel have over Steve's gingerstreak kernel?
I can provide a .config file, sometime this evening, as I am away-
Gkernels is a project based on the 4.05 Dell source;
It is not better than another kernel in that regard, I am trying to get all I can out of it, without overclock. Changes to my knowledge, that differ from the Steve kernel, are listed above;
Thanks to _n0p_ 's tip 1.3.3 solves the RTC issue- Thanks _n0p_
I believe this was done by changing to the low resolution timer.
-Greg
.config
Sorry for the delay, I was detained-
attached is the .config for 1.3.3
Working with an attempt to solve the wifi issues-
one environment seemed to work during my testing, yet at a great sacrifice to battery life, by enabling:
control the low power modes of memory -->
Default Memory Low Power Mode during Idle (Memory active)
Default Memory Low Power Mode during Suspend (Memory active)
I am still uncertain-
before I release a 1.4, I will trial more of these modes
-Greg
Can this modes be switched by detecting if external power supplied?
--
I've also recieved some requests, saying that power (and maybe other) buttons sometimes "flickers". Is there any way to filter key events a little?
--
Thank you for your devotion,
Sergei
I will look into this.
Hi, there seems to be some screen tearing , I suspect that it has something to do with vsync. Could this be fixed with a new kernel update or is this ROM related?
Sharptv-
This may be kernel, rom or both related;
you may try and experiment with different roms and kernels-
This could also be screen density related, on my device there is minimal tearing on default density
I had some screen tearing on power rom but none on DSC....
Good work on the kernal
May bishnu grant you many donkeys and wives
@Roy
are u indian
Hi GSpecial!
I'd like to ask you to join forces with ltrifonov.
You both are advanced system builders, i think Streakers community would really benefit from your teamwork!
That's an awesome job you are doing. Never was able to crack more than 1500 upload until now!
Sent from the SuperStreak!
borijess said:
That's an awesome job you are doing. Never was able to crack more than 1500 upload until now!
Sent from the SuperStreak!
Click to expand...
Click to collapse
Is this considered a good score?? I just did the test and got 10ping, 15162kbps down and 8912kbps up
Sent from my Dell Streak using xda premium
Greg, your new kernel 1.4.0.1 (can say after a day of tests), is absolutely fantastic.
Fast, responsive even with conservative governor waking from 128Mhz - and WiFi is simply excellent!
Thank you!
Nop can you make a flashable zip plz???
You might pay attention to Downloads section for DSC ROM (not ad )
greekunit690 said:
Is this considered a good score?? I just did the test and got 10ping, 15162kbps down and 8912kbps up
Sent from my Dell Streak using xda premium
Click to expand...
Click to collapse
I guess compared to u rs no but normally I was getting around 1000 up. So its 3 times as fast now for me.
Sent from the SuperStreak!

Looking to create your own custom kernel? Start here!

INTRODUCTION
I create this guide in the hope to jump start development on our lovely Exynos devices.
I expect that before you start, you have a Linux installation in either a virtual machine or on a physical PC.
Debian Jessie, Kali Linux, Mint, or Ubuntu are excellent choices and what I'm familiar with, so if you get stuck it'll be easier for me to help you if you use these.
PREREQUISITES
WARNING: Custom kernels on the Note 7, S7, and S7 edge currently require encryption to be disabled in order to boot. They also have to disable some secure MobiCore firmware. You will have to format your entire data partition when going from stock kernel to a custom kernel! Once you're on a custom kernel with non-encrypted data, you shouldn't have to wipe it going to another custom kernel.
Be careful not to disable developer options or OEM unlock, otherwise all your data will be destroyed! Back up your data partition whenever you flash stock. (for upgrades, etc.)
First off, you'll want to download some tools necessary for building and downloading kernel sources:
git-core - you'll want git for downloading and maintaining your sources
build-essential - native gcc & tools for building (needed for build commands)
libncurses5-dev - needed to build menuconfig
diff - used to compare config changes
colordiff - used by diff to provide colorful human readable diff output
Code:
apt-get install git-core build-essential libncurses5-dev diff colordiff
PREPARING YOUR ENVIRONMENT
Once you've got that out of the way, you should create an organized environment for working. I like to use ~/build.
Code:
mkdir -p ~/build/toolchain ~/build/kernel
DOWNLOADING & INSTALLING A TOOLCHAIN
You'll want to download a toolchain for kernel building. I recommend using Linaro's optimized ARM toolchains.
The Exynos 8890 benefits from the Cortex-A53 code compiling optimizations.
GCC 4.9: https://releases.linaro.org/components/toolchain/binaries/4.9-2016.02/aarch64-linux-gnu/
GCC 5.X: https://releases.linaro.org/components/toolchain/binaries/latest-5/aarch64-linux-gnu/
The actual file that you want ends in -x86_64_aarch64-linux-gnu.tar.xz (assuming you have a 64-bit Linux install, seriously, 32-bit needs to go! )
We'll use the GCC 5.3.1 2016.5 toolchain in this example.
Let's download and extract it now:
Code:
cd ~/build/toolchain
wget "https://releases.linaro.org/components/toolchain/binaries/latest-5/aarch64-linux-gnu/gcc-linaro-5.3.1-2016.05-x86_64_aarch64-linux-gnu.tar.xz"
tar xf ./*linux-gnu.tar.xz
rm ./*linux-gnu.tar.xz
That's it for installing the toolchain, easy right?
DOWNLOADING THE KERNEL
Rather than download your kernel sources directly from Samsung full of wacky issues when you change a single configuration option, you can grab it from my GitHub!
Using this method, you have an already working stock kernel prepared to be modified and built at your leisure.
You're also able to grab updates and fixes from me should you want them. I'll be committing new kernel source updates from Samsung to the opensource branch.
The stock-6.0 branch will be rebased on top of opensource when that happens, then stock-6.0.y (stock, with Linux updates) will be rebased on top of that.
Cool concept, right?
First, you'll want to create a GitHub account if you don't have one already.
This will allow you to upload your changes and share your kernel with other interested users and developers.
Once you've got your account, and you're logged in, browse to:
https://github.com/jcadduono/android_kernel_samsung_universal8890
You want to fork the sources to your own account, to do this simply click the [Fork | ] button near the top right of the page:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now you've got your own copy of the Note 7 / S7 / S7 edge kernel sources on your GitHub!
The next step is to use git to download it to your PC.
Replace "your_username" with your actual GitHub username. Using [email protected] you can avoid being asked for your username each time you push new changes.
Code:
cd ~/build/kernel
git clone https://[email protected]/your_username/android_kernel_samsung_universal8890 samsung_universal8890
cd samsung_universal8890
The default branch is stock-6.0. This is what most users will want. If you wish to start on a kernel that is updated to the latest Linux minor version, then simply:
Code:
git checkout stock-6.0.y
There's a twrp-6.0 branch that's used for building the kernel inside the official TWRP for Note 7 / S7 / S7 edge.
There's also a nethunter-6.0 branch used to build the kernel used by Kali NetHunter on those devices.
You can use git log <branch> to view commits, and git cherry-pick <commit id> to copy commits from those branches into yours if you like.
CONFIGURING GIT
Before you start working on your kernel, you will need to set up your git profile.
The user values show up in commit messages to tell people who authored them.
Code:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
git config --global push.default simple
YOUR FIRST COMMIT
We'll want to check out a new branch, and give it your own cool name. I suggest adding a -6.0 suffix to it because you'll probably want to start a new branch when Android 7.0 comes out.
We're going to use "coolname" as our example, so be sure to replace that with what you really want it to be called in the next steps.
Code:
git checkout -B coolname-6.0
Next we'll need to modify the build scripts to fit our setup.
Open build.sh, menuconfig.sh, and dtbgen.sh.
You'll want to set the TOOLCHAIN= path in all 3 scripts. If you're following this guide, then it's already correct!
In menuconfig.sh and build.sh, you'll want to set your default target config name.
See the line:
Code:
[ "$TARGET" ] || TARGET=samsung
You'll want it to look like this:
Code:
[ "$TARGET" ] || TARGET=coolname
Now you want to copy the default samsung kernel configuration so you have your own to work with:
Code:
cp arch/arm64/configs/samsung_defconfig arch/arm64/configs/coolname_defconfig
Now you'll have prepared your kernel source for starting work on your own custom kernel!
Let's turn that into a commit, but first look at the changes you've made using:
Code:
git diff
Does that look good? If not, fix what's broken before proceeding.
Next you'll want to add files that will be part of your commit.
For simplicity's sake, let's just add all of the changed files into the commit.
Code:
git add .
Now to make your commit:
Code:
git commit -m "My first commit, setting up my coolname kernel!"
You've done it!
CONFIGURING YOUR KERNEL
We'll use the menuconfig.sh script to launch the kernel menuconfig.
Code:
./menuconfig.sh
Change whatever options you're interested in, but don't change a lot all at once, otherwise when or if you run into issues, you won't know which option caused it.
Once you're done playing in the menuconfig, exit and save.
You'll be shown a colorful difference between your old configuration and your new one.
It will ask you if you want to save it, and you just have to type "y" and press enter for it to be saved.
At this point it's a good idea to make another commit to save your configuration changes.
If you need to edit the commit, you can easily use git commit --amend to fix it up.
BUILDING YOUR NEW KERNEL
Let's take your new config for a test drive.
To build your kernel, simply run:
Code:
./build.sh gracelte xx
gracelte = Note 7
herolte = S7
hero2lte = S7 edge
xx = International N930F & N930FD
kor = Korean N930K, N930L, & N930S
Yes, you can compile your kernel to all 3 of those devices using just your single config!
The power of device specific config additions.
Once your kernel is finished building, the resulting files will be located at:
Code:
build/arch/arm64/boot/Image
build/arch/arm64/boot/dtb.img
build/modules/*.ko (if modules are enabled)
INSTALLING YOUR NEW KERNEL
The LazyFlasher project comes to the rescue here. It's the swiss army knife of kernel flashing in TWRP.
There's a specific branch for the Note 7 called kernel-flasher-gracelte. (use kernel-flasher-herolte instead if building for S7/S7 edge!)
To download it (feel free to fork it so you can have a copy on your GitHub to modify instead!):
Code:
cd ~/build
git clone -b kernel-flasher-gracelte https://github.com/jcadduono/lazyflasher.git
cd lazyflasher
To use LazyFlasher, you'll probably want to take a look at the Makefile, config.sh, and META-INF/com/google/android/update-binary (a shell script).
There's a few things you can change there to personalize it to your needs.
You should also enter the patch.d folder and delete 060-f2fs-fstab if you don't have f2fs enabled in your kernel, and edit the io_scheduler in 070-kernel-settings if you don't have fiops enabled either.
(make another git commit to save your setup!)
Once the installer is set up to your liking, all you have to do to build it is copy the Image and dtb.img from your build output into the lazyflasher folder.
If you have any modules (.ko files) to install, place them in the modules folder.
Now simply run:
Code:
make
A TWRP flashable zip and sha1sum is created!
At this point, you will need to use the [Format Data] button in TWRP if your device is encrypted! There is no known way around this.
This will wipe all data from your phone, including your internal storage, essentially making it like new.
Transfer it to TWRP and flash away, you've just lost your custom kernel development virginity.
Go have a few beers to celebrate, or to drown your sorrows in the case of a boot loop.
You should consider taking a look at the patch.d scripts sometime so you know what it's actually doing.
PROBLEMS?
Post a reply here and I'll try to find a solution and add it to this post.
RESOURCES
Need a text editor for coding? I use gedit. It's pretty, light, and you can get some decent plugins for it.
It's a minimal editor, so don't expect anything really fancy. Configure it and enable plugins before you decide to trash it.
Code:
apt-get install gedit gedit-plugins
Here's an awesome git starter guide: http://rogerdudler.github.io/git-guide/
THANKS
If not for @Tkkg1994 finding out what changes are needed to get custom kernels up and running, we wouldn't have this lovely guide here!
Thanks for the amazing guide, i got it compiled successfully but the problem comes after the device boots up, it asks for my Pattern and when i enter it, it keeps saying incorrect and wont let me in, any help?
Ather said:
Thanks for the amazing guide, i got it compiled successfully but the problem comes after the device boots up, it asks for my Pattern and when i enter it, it keeps saying incorrect and wont let me in, any help?
Click to expand...
Click to collapse
Sorry, I forgot to add to the guide that custom kernels don't support encryption. You should flash your stock kernel & supersu, install something like titanium backup, and back up all your things to an external SDcard.
I've added a warning in the thread and included it in the instructions now.
that's weird, I disabled lockscreen security and reinstalled the kernel, booted up fine with selinux enforcing http://i.imgur.com/IVSTfV1.png
Ather said:
that's weird, I disabled lockscreen security and reinstalled the kernel, booted up fine with selinux enforcing http://i.imgur.com/IVSTfV1.png
Click to expand...
Click to collapse
Are you still encrypted?
Maybe it's just one of the secure mobicore firmware that were removed that your lock screen depended on. You might be able to set up the lock screen again now, and this time it won't require that specific piece of firmware.
no i had already wiped data when i installed hydra kernel so after flashing my custom kernel i tried to setup the fingerprint and it gave an error that the fingerprint sensor isn't available try later, do you have any idea how to make a decrypted kernel like hydra?
Ather said:
no i had already wiped data when i installed hydra kernel so after flashing my custom kernel i tried to setup the fingerprint and it gave an error that the fingerprint sensor isn't available try later, do you have any idea how to make a decrypted kernel like hydra?
Click to expand...
Click to collapse
Oh, I'm not sure why that happened then. There shouldn't have been anything extra removed on top of what HydraKernel removes.
My device is working with both Iris and Fingerprint unlock right now.
Can you post the output of:
Code:
ls /system/app/mcRegistry
can you test out my kernel? i see hydra zip has some files that it replaces, and the lazyflasher has similar files, could that be the problem?
Ather said:
can you test out my kernel? i see hydra zip has some files that it replaces, and the lazyflasher has similar files, could that be the problem?
Click to expand...
Click to collapse
try backing up your system/data to !!external sdcard!! in twrp, saving your internal storage to pc, then formatting data.
restore your stock kernel and system before flashing your custom kernel.
then see if it works from scratch.
if it's all fine, try restoring your data backup.
Ather said:
no i had already wiped data when i installed hydra kernel so after flashing my custom kernel i tried to setup the fingerprint and it gave an error that the fingerprint sensor isn't available try later, do you have any idea how to make a decrypted kernel like hydra?
Click to expand...
Click to collapse
This sounds exactly like you did not patch /system/app/mcRegistry files
Sent from my SM-N930F using XDA Labs
Tkkg1994 said:
This sounds exactly like you did not patch /system/app/mcRegistry files
Sent from my SM-N930F using XDA Labs
Click to expand...
Click to collapse
They shouldn't be patched though, the installer simply removes the secure ones that the device is unhappy with.
It works fine for me, so I know the offending ones are being removed, but maybe somehow it deleted all of his tlbins?
Be nice if he provided the contents of his mcRegistry :/
jcadduono said:
They shouldn't be patched though, the installer simply removes the secure ones that the device is unhappy with.
It works fine for me, so I know the offending ones are being removed, but maybe somehow it deleted all of his tlbins?
Be nice if he provided the contents of his mcRegistry :/
Click to expand...
Click to collapse
Hello @jcadduono,
I am one of your "orphan" users of Idlekernel. It is the very best kernel for the Note 3.
Would you produce a blind update of it, please, please.
I would be more than happy to test it before you upload to general public.
Sorry guys for the OT.
Need help for finalisation kernel
Hello and thank you OP for the tutorial, I have done everything and no worries except when I want to flash the kernel does not boot, then I would like to know how to get a boot.img with the dtb.img files and the image create after Compilation, if someone can help I will be grateful
Thank you
Help on Kernel modules and patches
{MY QUESTIONS ARE ABOUT BOLD ITEMS BELOW}
Once your kernel is finished building, the resulting files will be located at:
Code:
build/arch/arm64/boot/Image
build/arch/arm64/boot/dtb.img
[B]build/modules/*.ko (if modules are enabled)[/B]
INSTALLING YOUR NEW KERNEL
The LazyFlasher project comes to the rescue here. It's the swiss army knife of kernel flashing in TWRP.
There's a specific branch for the Note 7 called kernel-flasher-gracelte. (use kernel-flasher-herolte instead if building for S7/S7 edge!)
To download it (feel free to fork it so you can have a copy on your GitHub to modify instead!):
Code:
cd ~/build
git clone -b kernel-flasher-gracelte https://github.com/jcadduono/lazyflasher.git
cd lazyflasher
To use LazyFlasher, you'll probably want to take a look at the Makefile, config.sh, and META-INF/com/google/android/update-binary (a shell script).
There's a few things you can change there to personalize it to your needs.
You should also enter the patch.d folder and delete 060-f2fs-fstab if you don't have f2fs enabled in your kernel, and edit the io_scheduler in 070-kernel-settings if you don't have fiops enabled either.
(make another git commit to save your setup!)
Once the installer is set up to your liking, all you have to do to build it is copy the Image and dtb.img from your build output into the lazyflasher folder.
If you have any modules (.ko files) to install, place them in the modules folder.
Now simply run:
Code:
make
Got a few question for anyone that is familiar with the exynos8890-gracelte BUILD. This in regards to files output after compilation of kernel code; specifically with editing patches and providing module support.
Where are the *.ko files located if default output is used(using your ./build.sh gracelte xx)? By the way...Your tutorial is awesome, first and foremost...but I want to be sure that I am pulling the files from the correct location (being a newbie at this android kernel building stuff). I found my modules under "~/build/kernel/samsung_universal8890/build/lib/modules/3.18.14-dee-gracelte-xx-0.1" which is the parent folder to other folders/files that seem to be of interest. After digging deeper there are even folders within the previously mentioned (named) one that have items of question as to whether they are needed in my "flasher" module folder. Such as pictured https://drive.google.com/open?id=0B-3GHX6_T7lYRkRUUVVORE1OM1k
I just want to have a functioning kernel with module support/modules in there proper place. Another item is patches. Would it be possible to just change "070-kernel-settings" patch to "io_scheduler=noop" if I changed default setting to such? If so, what other, if any, items in this file would need editing? Where else can I find patch files located on the web or is this something home-brewed? Thanks for all your hard work.
I also assume that by changing to the proper package manager commands, this procedure will work for pretty much most Linux distros.
Windows 10 Support Number

[ROM][6045][ /!\ Not Android /!\ ] SailfishOS 3.2.1.20 (20200309)

SailfishOS (SFOS) is a GNU+Linux system using libhybris to leverage Android drivers from LineageOS.
About everything should work (except NFC, no userspace support for now).
You're root and you've SSH, set password in developer-mode settings. Use devel-su like you'd use sudo !
To use/flash SFOS (no wipe needed), you should already be using LineageOS 14.1 20181031 build or newer,
and have booted it at least once (otherwise WLAN problems).
See latest release post for OTA update instructions, or flash ZIP download link.
Warning : flashing zip over previous SFOS install erases it ! So use OTA to avoid that, or use integrated backup app...
Note : SFOS only flashes boot partition and install itself in /data/.stowaways/sailfishos/ so :
you can go back to LineageOS only by flashing the LOS boot image
you can reclaim diskspace used SFOS by removing /data/.stowaways/sailfishos/
Reference Wiki page on merproject.org
Kernel | Device | Vendor source trees
Feeling adventurous ?
This is a SailfishOS community port for the 6045 idol3.
This is not Android (just re-using the lower layers), Android apps can't run on it and there's no support for official-ports-AlienDalvik-emulator.
So please don't ask.
During installation, you'll be asked to create a Jolla account, to have access to basic apps (notes, mediaplayer, documents, etc.).
This is not mandatory (though prefered for the full experience) : should you choose not to register (and even if you do),
you still can install an alternative store using OpenRepos client Storeman
Reserved
Hello, installed version 3, everything works fine, data transfer, wifi, all sensors (including case), location, mtp, calls and SMS. There were only problems with the store, some applications are not installed the first time, you have to install again, and so great work is another alternative for the smartphone, thank you.
andrejchern said:
Hello, installed version 3, everything works fine, data transfer, wifi, all sensors (including case), location, mtp, calls and SMS. There were only problems with the store, some applications are not installed the first time, you have to install again, and so great work is another alternative for the smartphone, thank you.
Click to expand...
Click to collapse
I have installated seilfish os some time ago in my moto g2 and the battery life and boot speed its superior then any version of android ... ?
A very fast, fluid, and consistent UI in this ROM. An interesting one to play with. (However, for my needs, I need the PlayStore apps.)
I now understand how your work on Lineage was a foundation for this one.
I am curious Vknecht, what is your interest in this one?
tess1 said:
A very fast, fluid, and consistent UI in this ROM. An interesting one to play with. (However, for my needs, I need the PlayStore apps.)
I now understand how your work on Lineage was a foundation for this one.
I am curious Vknecht, what is your interest in this one?
Click to expand...
Click to collapse
It's all politics, also it's the system I use daily
some sort of hommage to a french industry of old (1898), rough-rided by financialization (see, can't build idol3 themselves)
fighting planned obsolescence
taking the power back on a device
powering it with an OS independent from GAFAM
having closer to classical GNU+Linux distro, though not totally open in the case of SFOS
Since 2010 I've been a Nokia N900 then N9 user (which ran with Maemo, resp. Meego, predecessors to SailfishOS) until summer 2017 when I got a Xperia X for the SailfishX release. Only ever used Android for a month, until the build-SFOS-for-X documentation was released and dived in the OS-building fun...
At the beginning of 2018 I looked for a cheap and decent french-branded-androphone (2Gb RAM, HD display) with a working LineageOS port and found the idol3 to begin a new SFOS port. It's been a long 8 months journey, where rebuilding LineageOS if only for the patch-level was not much, then also wanted to "upstream" some fixes or upgrades (eg. kernel) I wanted in SFOS...
I started using my idol3 again and I love Sailfish OS as soon as I figure out android apps im gonna use it alot more
Everything work fine, but the double tap to wake up the telephone.
Hi vknecht, great job, how can I contribute (donation) to your work? I've installed everything except Anbox, but I think I'll do it anyway, most of my contacts use Wzap ... Everything works fine except for the double tap to wake up the phone, do you know what it can depend on? Is it a function of hardware or software? With Lineage it worked, with Sailfish no. It's not dramatic, but definitely inconvenient to have to use the power switch every time. Thank you.
Best regard.
Antonio from Italy.
vknecht said:
Feeling adventurous ?
This is a SailfishOS community port for the 6045 idol3.
This is not Android (just re-using the lower layers), Android apps can't run on it* and there's no support for official-ports-AlienDalvik-emulator.
So please don't ask.
It's a systemd-based GNU/Linux with 32bits-userspace system, and about every basis function should work.
You're root, set password in developer-mode settings. Use devel-su like you'd use sudo !
To use/flash SFOS (no wipe needed), you should already be using LineageOS 14.1 20181031 build, and have booted it at least once (otherwise WLAN problems).
During installation, you'll be asked to create a Jolla account, to have access to basic apps (notes, mediaplayer, documents, etc.). This is not mandatory (though prefered for the full experience, for now) : should you choose not to register (and even if you do), you still can install an alternative store using OpenRepos client Storeman
*basic Anbox support was added, but don't count on it for now (plz contribute if you can), it may be broken.
If you really want to try it : (don't just copy/paste, fix the URLs !)
Code:
### As root (devel-su), on the phone via SSH :
# Add mal's Anbox for SFOS repository
ssu ar home_mal_anbox [url]http://repo.merproject.org/obs/home:/mal:/anbox/sailfish_latest_armv7hl/[/url]
pkcon refresh
pkcon install anbox-sailfishos anbox-sailfishos-image-mixed-32-64-bit
rm -f /var/lib/anbox/overlay/system/lib64/libGLESv*
cp /vendor/lib/egl/libEGL_adreno.so /var/lib/anbox/overlay/vendor/lib/egl/
# Install a keyboard APK, eg [url]https://f-droid.org/fr/packages/rkr.simplekeyboard.inputmethod/[/url]
mkdir -p /var/lib/anbox/data/app
cp *apk /var/lib/anbox/data/app
### Networking is broken at the moment... ###
### Comment anbox-bridge.sh lines (ExecStartPre and ExecStopPost) ###
### in /lib/systemd/system/anbox-container-manager.service ###
# Restart Anbox
systemctl restart anbox-container-manager
# There's no "back" button for now
# Run Anbox from app screen again to go back to Anbox app launcher
This is a simultaneous release of SFOS 2.2.1.18 and 3.0.0.8, if you have problem with one version, try the other
SFOS 2.2.1.18
SFOS 3.0.0.8
Sorry no screenshot or video for now, you can find for other devices, looks should be the same.
SailfishOS fir idol3 Wiki page
Kernel | Device | Vendor source trees
Click to expand...
Click to collapse
Any chance of seeing it on the Idol 3 4.7 ? It would give me a good reason to use it again. It's okay if not it's just sad that there's no updated ROM for this version... I could beta test it if you ever do that
zorro_tj said:
Hi vknecht, great job, how can I contribute (donation) to your work? I've installed everything except Anbox, but I think I'll do it anyway, most of my contacts use Wzap ... Everything works fine except for the double tap to wake up the phone, do you know what it can depend on? Is it a function of hardware or software? With Lineage it worked, with Sailfish no. It's not dramatic, but definitely inconvenient to have to use the power switch every time. Thank you.
Click to expand...
Click to collapse
Hello, and thank you for the heads up on dt2w... so I had a look, and found how to enable it
(make sure developer mode is enabled and you've set or checked the password)
Code:
host $ ssh [email protected]
,---
| Sailfish OS 3.0.1.11 (Sipoonkorpi)
'---
[[email protected] ~]$ devel-su
Password:
[[email protected] nemo]# echo 1 > /sys/class/tp_gesture/tp_device/tp_gesture_id
[[email protected] nemo]# printf "[EVDEV]\nKEY_APP_SWITCH=KEY_POWER\n" > /etc/mce/99-doubletap-idol3.ini ; systemctl restart mce
The echo command has to be issued when the screen is on, and each time you reboot, for now (don't know why it's not already set to 1 like in LOS)
The printf and systemctl are only needed once to create the configuration file and restart the service.
Hopefuly you'll see no battery drain, so it can be enabled by default in the future...
For donations, maybe it will be possible later.
h3cat3 said:
Any chance of seeing it on the Idol 3 4.7 ? It would give me a good reason to use it again. It's okay if not it's just sad that there's no updated ROM for this version... I could beta test it if you ever do that
Click to expand...
Click to collapse
One thing I could do is try building LOS 14.1 with idol347 defconfig, but afaik it's not really working.
Otherwise one could follow the SailfishOS HADK using a working CyanogenMod base and I'd be glad to help, but don't have time to start it myself at the moment.
Thanks!
vknecht said:
Hello, and thank you for the heads up on dt2w... so I had a look, and found how to enable it
(make sure developer mode is enabled and you've set or checked the password)
Code:
host $ ssh [email protected]
,---
| Sailfish OS 3.0.1.11 (Sipoonkorpi)
'---
[[email protected] ~]$ devel-su
Password:
[[email protected] nemo]# echo 1 > /sys/class/tp_gesture/tp_device/tp_gesture_id
[[email protected] nemo]# printf "[EVDEV]\nKEY_APP_SWITCH=KEY_POWER\n" > /etc/mce/99-doubletap-idol3.ini ; systemctl restart mce
The echo command has to be issued when the screen is on, and each time you reboot, for now (don't know why it's not already set to 1 like in LOS)
The printf and systemctl are only needed once to create the configuration file and restart the service.
Hopefuly you'll see no battery drain, so it can be enabled by default in the future...
Thanks a lot, it worked! I will pay attention to the the battery drain and will informe you. Just another question: i see your OS version is 3.0.1.11, mine is 3.0.0.8 (Lemmenjoki) is it convenient for me to update it? if yes, in what way? The device is a Idol 3 6045K dual-sim, no external sdcard on board.
Thanks again, greet from Italy.
Click to expand...
Click to collapse
zorro_tj said:
Thanks a lot, it worked! I will pay attention to the the battery drain and will informe you.
Just another question: i see your OS version is 3.0.1.11, mine is 3.0.0.8 (Lemmenjoki) is it convenient for me to update it?
if yes, in what way? The device is a Idol 3 6045K dual-sim, no external sdcard on board.
Thanks again, greet from Italy.
Click to expand...
Click to collapse
You're welcome For now I don't see any drain, let's hope it stays like this.
I found out that the ini file is not necessary if one sets tp_gesture_id to 2, but still have to set this value on boot
and/or find why it's not the same as in LineageOS by default.
3.0.1.11 release for idol3 is still in devel phase, once it's ready (~ one week or so) it will be published in testing phase and then you'll be able to do
OTA through commandline.
One can flash a devel-image, but then can't rely on OTA : will have to re-flash a testing-image or do risky/unsupported repository-switch.
Those are generally built using SailfishOS porters' Gitlab-CI group, latest being the 20190227 devel image
SailfishOS 3.0.1.11 beta3
Backup...
Update using OTA : the integrated graphical updater doesn't work for community ports
Easiest is to install sfos-upgrade either through Storeman or direct RPM dowload.
Flash image : (erases previously installed SailfishOS)
sailfishos-idol3-release-3.0.1.11-20190321-beta3.zip
Changes :
SailfishOS 3.0.1.11 release notes (points specific to officially supported devices don't apply)
Kernel : enabled Yama security module
Enabled doubletap to wake
Sorry, Anbox confirmed to NOT work, have to check required overlayfs support, maybe broken with the kernel updates.
SailfishOS 3.0.1.11 beta3 beta2 Constant reboots, hangs and reboots.
andrejchern said:
SailfishOS 3.0.1.11 beta3 beta2 Constant reboots, hangs and reboots.
Click to expand...
Click to collapse
Sorry to hear that... does it happen regularly/systematically and quite early after boot, or after (somehow) extensive usage, especially browser ?
I supposed you tried with flashing as well as OTA ?
A known cause for reboot is fixed in this build (and beta2 iirc) by an updated connman package ("rpm -qi connman" shows ip6tfix in version).
Maybe it's related to Yama security, will make a build without it...
Arbitrary reboots, after the introduction of the account and login starts hanging and rebooting, I immediately rolled back to the backup and did not understand why this is happening.
andrejchern said:
Arbitrary reboots, after the introduction of the account and login starts hanging and rebooting, I immediately rolled back to the backup and did not understand why this is happening.
Click to expand...
Click to collapse
Could you try flashing the ZIP inside the artifact from this devel build ?
It uses the same kernel as 3.0.0.8, ie. without yama, pstore and iirc RTC write support...
This build works fine, no reboots. Thanks.
SailfishOS 3.0.1.11 beta4
Update from any previous betas using OTA :
has to be done from commandline (on device or through SSH, USB prefered) since the graphical client in settings doesn't support community ports.
Code:
# Install sfos-upgrade package like this, or through Storeman
curl -O https://openrepos.net/sites/default/files/packages/5928/sfos-upgrade-2.4-1.noarch.rpm
devel-su
pkcon install-local sfos-upgrade-2.4-1.noarch.rpm
sfos-upgrade 3.0.1.11
reboot
# Patience, it takes an additional reboot to flash boot partition
# Go to commandline again and run :
devel-su post_sfos-upgrade
or install by flashing sailfishos-idol3-release-3.0.1.11-20190329-beta4.zip
(this replaces previously installed SailfishOS and SailfishOS-data, backup if needed)
Changes
Fall back to previous kernel
Hey mate, great job! Everything worked fine with sfos-upgrade from command line! Thanks a lot!!!
Just a question... I haven't prediction text, it's normal? Thanks again.
Antonio from Italy.

[ROM][UNOFFICIAL] Testing LineageOS 14.1 Image for Dell Venue 8 3830

Testing ROM for Dell Venue 8 3830 (LineageOS 14.1)
Most of resources are available. But has some bugs.
It could be used for fun (Retroarch, E-book readers, etc)
Was build using as base Asus T00F lineage source files
I'm posting here asking for help to implement/fix missing features (if anyone still interested on such old device)
All source code to build is available on github (links bellow).
Working
Boots
Display
Touchscreen
Wi-FI
Virtual Navigation Buttons
Sound
Rotation
Bluetooth (since 2023-05-10)
Not working:
Camera
Known issues:
- ARM apps not working due mismatches with libraries (Houdini)
- Observed battery is draining quicker than expected.
# Testing Image (should be flash using FASTBOOT)
# updated 2023-06-13
# WARNING: MAY BRICK YOUR DEVICE PERMANENTLY! USE AT YOUR OWN RISK!!!!
https://drive.google.com/drive/folders/16iG6I-X83USPGPR13yUbg54S3Mn0Y7Ff?usp=share_link
Boot tablet in fastboot mode (volume down + Power) and use "flash_cmds.sh" (Linux) / "flash_cmds.bat" (Windows) to flash files through fastboot (note that proper driver drivers and fastboot must be installed)
If you wish to submit cmds manually:
fastboot oem start_partitioning
fastboot flash /tmp/partition.tbl partition.tbl
fastboot oem partition /tmp/partition.tbl
fastboot erase system
fastboot erase cache
fastboot erase config
fastboot erase data
fastboot erase logs
fastboot erase factory
fastboot oem stop_partitioning
fastboot flash dnx CLVP_CYAB_P801_FwDnX_vF9.6C_ww42_005.bin
fastboot flash ifwi CLVP_CYAB_IFWI_vF9.6C_ww42_005_P801_wifi_uos.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system_img.img.gz
Source Files
# LOCAL MANIFEST
GitHub - pstglia/local_manifests at DELL_VENUE_LOS_14.1
Contribute to pstglia/local_manifests development by creating an account on GitHub.
github.com
Init a NEW repo
(repo init -u https://github.com/LineageOS/android.git -b cm-14.1)
Copy local manifest to .repo/local_manifests and sync it.
repo sync -c --no-tags --no-clone-bundle -j$(nproc --all)
# Kernel
GitHub - pstglia/linux: Linux kernel source tree
Linux kernel source tree. Contribute to pstglia/linux development by creating an account on GitHub.
github.com
NOTE: must be build using gcc 4.7 [1]. Checkout commit c7931763d41be602407ed9d71e2c0292c6597e00, update prebuilts link to this gcc
and build using kernel_build.sh script. If everything goes as expected, You'll have a new_boot.img created
# device/dell/P801_NoModem
GitHub - pstglia/android_device_dell_P801_NoModem: general device configuration for Dell Venue 8 (P801_NoModem)
general device configuration for Dell Venue 8 (P801_NoModem) - GitHub - pstglia/android_device_dell_P801_NoModem: general device configuration for Dell Venue 8 (P801_NoModem)
github.com
# vendor/dell/P801_NoModem
GitHub - pstglia/android_vendor_dell_P801_NoModem: Vendor files (configs, libs, etc)
Vendor files (configs, libs, etc). Contribute to pstglia/android_vendor_dell_P801_NoModem development by creating an account on GitHub.
github.com
# hardware/libaudio
GitHub - pstglia/hardware-libaudio at DELL_VENUE_LOS_14.1
hardware/libaudio repo (forked from Android-x86.org) - GitHub - pstglia/hardware-libaudio at DELL_VENUE_LOS_14.1
github.com
# external/boringssl
GitHub - pstglia/android_external_boringssl: Boring ssl (libcrypto & friends)
Boring ssl (libcrypto & friends). Contribute to pstglia/android_external_boringssl development by creating an account on GitHub.
github.com
# system/core
GitHub - pstglia/system-core at DELL_VENUE_LOS_14.1
system/core repo (forked from Android-x86.org). Contribute to pstglia/system-core development by creating an account on GitHub.
github.com
# external/tinyalsa
GitHub - pstglia/android_external_tinyalsa: tinyalsa 1.0.2
tinyalsa 1.0.2. Contribute to pstglia/android_external_tinyalsa development by creating an account on GitHub.
github.com
# external/icu
https://github.com/pstglia/android_external_icu/tree/DELL_VENUE_LOS_14.1
# external/external/apache-http
GitHub - pstglia/android_external_apache-http: android_external_apache-http
android_external_apache-http. Contribute to pstglia/android_external_apache-http development by creating an account on GitHub.
github.com
NOTES:​- openssl 3.0 (Mint 21.1 - Vera) will not generate a compatible x509 sign key for kernel modules.
OpenSSL 1.1.1f generates an accepted key
Credits / Thanks:
- The LineageOS Team
- Android-x86 Team / Chih-Wei Huang for the amazing project and repositories (used one of them here so far)
- vampirefo for providing CWM recovery and valuable information
- Social-Design-Concepts for providing unlocked firmwares (required to boot custom Image)
- Fabio Júnior Chaves da Silva (again, owner of this tablet)
- Dell for providing kernel source (wouldn't hurt to include some AOSP code also, but it's better than nothing )
- AlaskaLinuxUser AKLU from Youtube. Lot's of explanations about Android & Lineage.
[1] - https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/x86/i686-linux-android-4.7/
How can one Help?
ikram.senguen said:
How can one Help?
Click to expand...
Click to collapse
Hi,
This is the list of missing features / issues:
Choose one of your preference and hands on!
update 2022-05-31: Audio and Rotation were fixed.
kernel display driver was updated. Experience is smoother
-[FIXED] Wi-fi is not working:
Help wanted: Fix code and make it work:
Status so far: Fixed.
It will work on boot if you keep it enabled. If you disable Wi-fi from settings and try to re-enable (or switch on/off airplane mode), it will stop working until you boot it again.
update 2022-06-02: Discovered that you can't ioctl wlan0 to up state when you disable it (using root + proper capabilities).
However, if you rmmod bcm4330 and insmod it again, you can enable it.
It seems a driver issue.
update 2022-06-03: Using stock kernel module for network, no issues with ioctl after disbling wi-fi
update 2023-06-13: Using T00F bcmdhd source with some changes to enable 4330, it runs ok.Now it's using compiled drivers for wi-fi instead of stock ones (except for firmwares)
-[FIXED] Sound is not working:
Help wanted: Investigate what's wrong and fix it
Status: Fixed [working since updated 2022-05-29]
Note: libaudio from stock image couldn't be loaded, so generated one from Android-x86 libaudio code (see [2]).
Maybe adjusts are needed on source, config and Boardconfig files.
update 2022-05-22: all libs are being loaded, but there are some errors when trying to load codecs. Config files must be checked (as well libs);
- [FIXED] Navigation menu is not being displayed:
Help wanted: Discover why is not being shown and fix it
Status: Fixed (created a overlay on device tree and made "def_force_show_navbar" to be enabled - see commit 8768b512c08b5fc60a7d7674ffce7c3a23a7857a)
- Camera is not working:
Help wanted: Make it work
Status so far: HALs must be copied. Possibly lot's of shims and Voodoos/Mojos required.
- [FIXED] Sensors are not working:
Help wanted: Make it work
Status: Fixed (replaced sensor_hal_config files)
- [FIXED] Bluetooth is not working:
Help wanted: Make it work
Status do far: Fixed (used harware/broadcom/libbt instead of vendor lib)
- [FIXED] Port/Enable zram to kernel:
Help wanted: Porting
Status: Enabled from stage tree (it was there all the time).
Seems to be working (at least swap was mounted using it)
- [FIXED] Sometimes backlight doesn't light up after resume
Status: Fixed. This ocurred when an out of range bright level was used ( > 100)
Edited liblights code (device/dell/P801_NoModem/liblights) and included a small check to ensure/force valid values ( from 0 to 100)
- [FIXED] ADB only works using network. Not working using USB
Status: Fixed. Copied drivers/usb/gadget changes from T00F Asus kernel and applied to Venue kernel
- Elevated Battery draining (specially on suspend attempt)
Something is blocking system from suspend. If you check dmesg, it keeps an infinite loop of suspend process (disable tasks, disable CPU's) and abort.
At first, wakeup reason is the "misterious" NETLINK. However, even blocking it and some other wakeup_sources it wakes.
This shows suspend backtrace (got from dump_stack):
Code:
[ 697.149972] Call Trace:
[ 697.149984] [<c19f90f3>] dump_stack+0x16/0x18
[ 697.149990] [<c12bc9c1>] resume_irqs+0xa1/0xe0
[ 697.149996] [<c12bca2f>] resume_device_irqs+0xf/0x20
[ 697.150004] [<c156a151>] dpm_resume_noirq+0x1a1/0x2b0
[ 697.150010] [<c156a8d0>] dpm_resume_start+0x10/0x20
[ 697.150015] [<c1288945>] suspend_enter+0xa5/0x260
[ 697.150022] [<c1a03cbd>] ? sub_preempt_count+0x3d/0x50
[ 697.150028] [<c1a03cbd>] ? sub_preempt_count+0x3d/0x50
[ 697.150034] [<c19f4646>] ? printk+0x3d/0x3f
[ 697.150040] [<c1569adc>] ? dpm_show_time+0xbc/0xf0
[ 697.150046] [<c156b952>] ? dpm_suspend+0x132/0x1e0
[ 697.150052] [<c1288baf>] suspend_devices_and_enter+0xaf/0x220
[ 697.150057] [<c1288fb8>] pm_suspend+0x298/0x300
[ 697.150063] [<c1289935>] try_to_suspend+0xa5/0xc0
[ 697.150069] [<c1a0091d>] ? _raw_spin_unlock_irq+0x1d/0x40
[ 697.150076] [<c125ebad>] process_one_work+0x11d/0x3d0
[ 697.150082] [<c14b091e>] ? __delay+0xe/0x10
[ 697.150088] [<c125f239>] worker_thread+0xf9/0x320
[ 697.150093] [<c1a00966>] ? _raw_spin_unlock_irqrestore+0x26/0x50
[ 697.150099] [<c125f140>] ? rescuer_thread+0x2b0/0x2b0
[ 697.150104] [<c1264cf4>] kthread+0x94/0xa0
[ 697.150112] [<c1a07077>] ret_from_kernel_thread+0x1b/0x28
[ 697.150117] [<c1264c60>] ? kthread_create_on_node+0xc0/0xc0
[ 697.150121] Wakeup from IRQ 32 penwell_otg
/sys/kernel/debug/mid_pmu_states and other files can give hints about the root cause.
Anyway, if you want to adventure yourself on trying to solve the problem, be my guest
[1] - https://github.com/pstglia/linux/tree/DELL_VENUE_LOS_14.1/modules/wlan/PRIVATE/bcm43xx
[2] - https://github.com/pstglia/hardware-libaudio/tree/DELL_VENUE_LOS_14.1
Additional info for those interested on improve this:
1) Added a debug service that collects dmesg & logcat 3 times every boot
output is recorded on /data/log_debug_venue8_3030.txt
2) ADB from usb cable is not working, but is working from network. This way, I suggest you enable these on "Developer options":
- Root acess: Select "ADB only".
- Android debugging
- ADB over network (note: You must connect to a network prior - IP and port will be displayed when enabling this option)
Once done, from PC, you can connect to adb:
# (will connect to tablet)
adb connect TABLET_IP_ADDR
# (will restart adbd on tablet, to root mode)
adb root
# (will connect again, now with root acess)
adb connect TABLET_IP_ADDR
Click to expand...
Click to collapse
3) If you want to make any change to /system on living image, you must remount /system with write privileges:
- Ensure you enabled adb over network as described on step 2
- connect to table and remount /system:
adb shell
mount -o rw,remount /system
Click to expand...
Click to collapse
How difficult would it be to port to the 7840? Or alternatively, would it be possible to help me learn how I could build it myself?
theabnormalguy said:
How difficult would it be to port to the 7840? Or alternatively, would it be possible to help me learn how I could build it myself?
Click to expand...
Click to collapse
Hi,
It has a medium/high level of difficult, depending how "perfect" do you want your port.
And more than difficult, it's *extremelly* time consuming. You must be prepared to spent weeks/ months in order to try to make something work.
And before starting anything, be sure is viable. A crucial point is having kernel source files for your device.
without it, don't waste your time.
In your case, take a look at opensource.dell.com
Learning: As a start, I'd recomend you to watch these videos:
https://www.youtube.com/c/AlaskaLinuxUserAKLU/playlists
You'll need to learn all of these (not limited to):
- Learn some C/C++ and java. You'll have to read source code to understand basicallyhow it works
- Learn Unix/Linux terminal commands. I'll need lots of find, grep, cd, cat, etc....
- Learn shell script
- Learn git
- Learn how to compile and cusomize a kernel
- Understand how Android source code/components are strutured (AOSP)
During your development, you'll need to carefully look at log files, include debugging info on scripts/codes, think,research, deduce, test, retest, test again,back some steps an try new appoaches.
And finally, I won't be working on any other device. After finishing this one I'm working on (or giving it up), not going to waste my time on custom roms sonner.... I have a life to live
Good luck
Project die?
FYA_EXel said:
Project die?
Click to expand...
Click to collapse
Not yet. I'm just looking for courage to go on.
If you see courage nearby, tell her that I'm looking for her
I intent to make bluetooth work and improve battery life. Camera is not a priority.
Remember everyone that source code is available. Everyone is free and invited to help improving this image.
Regards
pstglia
When I flash this rom, I get to the Lock Screen and it hard freezes. Anyone else get this problem? Thanks for all your work @pstglia
Update: I fixed it by wiping the data partition. This is incredible; this tablet has never been so smooth. Any advice on adding GAPPs?
the_Victorian said:
When I flash this rom, I get to the Lock Screen and it hard freezes. Anyone else get this problem? Thanks for all your work @pstglia
Click to expand...
Click to collapse
You are able to boot it but when locking screen you can't return to operation, having to boot it again.
Is this your issue?
If so, it's a known issue where backlight bright level goes to zero. If you blindly move the bright slider, you can have image again (or changing bright values bellow /sys using adb)
pstglia said:
You are able to boot it but when locking screen you can't return to operation, having to boot it again.
Is this your issue?
If so, it's a known issue where backlight bright level goes to zero. If you blindly move the bright slider, you can have image again (or changing bright values bellow /sys using adb)
Click to expand...
Click to collapse
Wow, thanks for your quick reply! I was just dumb and didn't wipe my android 4.4 data before installing; that fixed it. I have been tinkering trying to get GAPPs installed but run into error 70 in CWM when I do. Have you had success?
the_Victorian said:
Wow, thanks for your quick reply! I was just dumb and didn't wipe my android 4.4 data before installing; that fixed it. I have been tinkering trying to get GAPPs installed but run into error 70 in CWM when I do. Have you had success?
Click to expand...
Click to collapse
I have installed opengapps (x86, 7.1, pico). Don't remember having issues installing it.
But makes tablet really slow most of time.
pstglia said:
I have installed opengapps (x86, 7.1, pico). Don't remember having issues installing it.
But makes tablet really slow most of time.
Click to expand...
Click to collapse
Hmm that's interesting. I'm trying the same file but every recovery I try has given me error 7. Will continue tinkering. Something to do with system mount permissions maybe?
the_Victorian said:
Hmm that's interesting. I'm trying the same file but every recovery I try has given me error 7. Will continue tinkering. Something to do with system mount permissions maybe?
Click to expand...
Click to collapse
Afaik error 7 means package doesn't match the device. On Lineage images I bypass it by editing update-binary/updater-script inside META dir.
However I think opengapps does not perform these checks...
Have you tried formatting your cache partition before applying opengapps package?
Which recovery version are you using? Is the thethered one from SDC/Vampirefo?
I thought this moment would never come , I always dreamed of a custom rom for this device, I hope you can continue developing it
quevon24 said:
I thought this moment would never come , I always dreamed of a custom rom for this device, I hope you can continue developing it
Click to expand...
Click to collapse
Hi, I'll try to. But my limited knowledge doesn't allow me to advance the way I wish.
So, do not expect something perfect, fast and stable...
If we had some developer that could help on this, maybe you could have a really nice rom.
Note: All sources are available on github. See 1st post.
If I achieve some progress I'll share here.
The image I have is bootable and you can test anything if you understand the risks of potentially brick your device.
If you have nothing to lose, give a try
pstglia said:
Hi, I'll try to. But my limited knowledge doesn't allow me to advance the way I wish.
So, do not expect something perfect, fast and stable...
If we had some developer that could help on this, maybe you could have a really nice rom.
Note: All sources are available on github. See 1st post.
If I achieve some progress I'll share here.
The image I have is bootable and you can test anything if you understand the risks of potentially brick your device.
If you have nothing to lose, give a try
Click to expand...
Click to collapse
I just install the rom using Windows 11, i have the stock rom(android 4.2.2, 4.3 and 4.4.2) in case i brick the tablet.
I used apkmirror to install chrome x86 version, i can't use youtube because the lack of google play services
quevon24 said:
I just install the rom using Windows 11, i have the stock rom(android 4.2.2, 4.3 and 4.4.2) in case i brick the tablet.
I used apkmirror to install chrome x86 version, i can't use youtube because the lack of google play services
Click to expand...
Click to collapse
You can use opengapps for youtube & google stufff.
But at the current stage of this rom, it will make tablet really slow...
pstglia said:
Hi,
This is the list of missing features / issues:
Choose one of your preference and hands on!
update 2022-05-31: Audio and Rotation were fixed.
kernel display driver was updated. Experience is smoother
-[FIXED] Wi-fi is not working:
Help wanted: Fix code and make it work:
Status so far: Fixed.
It will work on boot if you keep it enabled. If you disable Wi-fi from settings and try to re-enable (or switch on/off airplane mode), it will stop working until you boot it again.
update 2022-06-02: Discovered that you can't ioctl wlan0 to up state when you disable it (using root + proper capabilities).
However, if you rmmod bcm4330 and insmod it again, you can enable it.
It seems a driver issue.
update 2022-06-03: Using stock kernel module for network, no issues with ioctl after disbling wi-fi
-[FIXED] Sound is not working:
Help wanted: Investigate what's wrong and fix it
Status: Fixed [working since updated 2022-05-29]
Note: libaudio from stock image couldn't be loaded, so generated one from Android-x86 libaudio code (see [2]).
Maybe adjusts are needed on source, config and Boardconfig files.
update 2022-05-22: all libs are being loaded, but there are some errors when trying to load codecs. Config files must be checked (as well libs);
- [FIXED] Navigation menu is not being displayed:
Help wanted: Discover why is not being shown and fix it
Status: Fixed (created a overlay on device tree and made "def_force_show_navbar" to be enabled - see commit 8768b512c08b5fc60a7d7674ffce7c3a23a7857a)
- Camera is not working:
Help wanted: Make it work
Status so far: HALs must be copied. Possibly lot's of shims and Voodoos/Mojos required.
- [FIXED] Sensors are not working:
Help wanted: Make it work
Status: Fixed (replaced sensor_hal_config files)
- [FIXED] Bluetooth is not working:
Help wanted: Make it work
Status do far: Fixed (used harware/broadcom/libbt instead of vendor lib)
- [FIXED] Port/Enable zram to kernel:
Help wanted: Porting
Status: Enabled from stage tree (it was there all the time).
Seems to be working (at least swap was mounted using it)
[1] - https://github.com/pstglia/linux/tree/DELL_VENUE_LOS_14.1/modules/wlan/PRIVATE/bcm43xx
[2] - https://github.com/pstglia/hardware-libaudio/tree/DELL_VENUE_LOS_14.1
Click to expand...
Click to collapse
sry, lack of response due to lack of knowledge: thought this is about Venue 7840
ikram.senguen said:
sry, lack of response due to lack of knowledge: thought this is about Venue 7840
Click to expand...
Click to collapse
Nope, this is for Venue 8 3830

Categories

Resources