New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[device-port] [herolte] Samsung Galaxy S7 #48
Comments
The lxc android container seams to run fine now, but all tests result in a segmentation fault
|
An strace later it's clear that only a symlink from /system -> /android/system was missing. Now first tests work :-D |
Hi am trying to do same. I build halium(from main repo) for herolte, install halium-boot and halium reference rootfs and system image. System boots, but after ~30 seconds network disappears. Do you have such problems? Or may be special patches you use? |
The device boots with halium-boot and the ubports rootfs. Graphics, touchscreen, buttons, and wifi works. But there seems to be a lot of stuff is still broken (apps not starting, rotation) and it is currently not clear to me if this is because of the xenial image or the port. Also there is another kernel-checker script in the halium-boot repository which seems to originate from ubports. Should I commit and push this changes to the kernel repository or are they ubports specific? How are such differences between distributions handled without them having to maintain yet another fork? |
Any update on this? |
Unfortunately I accidentally destroyed (physically) my other Ubuntu Touch device so I had to abandon the unfinished port and flash it with Lineage to have a working device again. Last status was that Ubuntu Touch was kinda working. SMS and data worked, but calls didn't because pulseaudio was not working correctly. There where also some issues because a lot of the hardware drivers are 64bit only and there was no working 64bit rootfs to test properly. |
@ZeroPointEnergy |
Hello @alanifotis As mentioned, pulseaudio was constantly crashing so calls are not working and there are multiple other issues with the port that got never addressed before I had to abandon it. Good luck |
I'd love to work on it as well, currently building the Halium Image. |
@ZeroPointEnergy |
I got to the point of the bootanimation but unity8-dash wont start because it cant connect to mir-server, maybe someone is able to figure that out... |
Wish I had a 2nd S7 for developping onto... or a way to dual boot it. |
Do you have a S7 to test releases? I'd be interested to look at the bugs of the code tomjschwanke compiled |
Hi, I've been through this problem too when I was trying to port it to my S7 (I gave up after getting problems with wifi (and permissions to load the kernel module), video playback and other driver-related problems). If I'm not mistaken, this problem is because of the missing dir /run/user/32011 and/or its permissions. To solve that, ssh into the system (with root permission) and add:
Then, reboot the device. These two tips can be found at "Unity-system-compositor starts with spinner but no Unity8" and " |
You could use the halium-install script to flash the rom into the s7 with already installed android without formatting it before (back it up first), given that the script basically copies files (as I recall). Then, switch from TWRP to halium-boot.img, and vice versa, to boot which one you want. |
Heya! i know this might be an old post but i have a problem installing this port, i tried flashing it with heimdall Then installed the ubuntu touch rootfs like so: however when i boot my device it stays at the bootlogo. (if you have a link to prebuild images i would appreciate that too) |
Hi, try this as provisional fix in chroot of the installed device: If you don't know how to enter in chroot, here are some exampling code in how to do it, with the device connected (could be in the stuck booting screen if I'm not mistaken): If it don't work, tell me, so I can send some tips to try to solve this permanently. Here are the test built images: p.s. |
Hi, thx for wanting to help, i appreciate really it. i checked using Again thank you for wanting to help me |
Did you try with my images? Can you send more info about the problems? What is the exactly error message? After running the quoted commands, please paste the return of: |
I connected to twrp with |
When installing the root tarball for ubuntu touch there where usually some files and links missing because it wasn't halium based yet. I'm not sure if they moved to halium by now. I used some esoteric setup with ostree to test the builds, but in that repo (https://github.com/ZeroPointEnergy/halium-ostree-repo/tree/master/overlays/ubports) there is an overlay dir which should contain all the files and links that where missing at that point (at least the one I found). You should be able to tar that dir and merge it with the rootfs tarball before you transfer it to the device: https://github.com/ZeroPointEnergy/halium-ostree-repo/blob/68365cc7b2bde4f4fb8b35449fa828a5d491abdd/update-ubports-rootfs.sh#L37 |
Heya! Thanks for the tip! Would running the script you linked do that automatically? |
To tar the directory and merge it with the rootfs tar you could do something like this:
|
thanks man! will try that when i have time! ill report how it went. |
heya! flashed the merged images but i'm still not able to connect to ssh. when i run ssh here is the output of |
I think enp0s20u8 must be your device network interface. The network address is not set to what I wrote and the link is down. |
Is the screen changing at all or are you stuck on the "samsung s7" logo? because it may be you are still stuck in the initrd or even earlier.
|
Try with |
telnet seems to work, so its probably stuck at the initrd. this is confirmed when i run how would i go about fixing that? or is the rootfs bad? |
I think the most likely explanation is that something has changes since the port was made and now it isn't working. You will have to look at the dmesg output try to figure out what the problem is or where exactly it is stuck. |
alright, will do that |
Heya everyone! i was trying to get the port to work again and i was wondering if maybe i might be using the incorrect rootfs? what rootfs would you guys reccomend me using? |
That still didn't work, i thought the problem might be the mountpoints.
however i get the error: could that be related? edit: forgot to add, the reason i think this is because i get this error after running |
Are you using the old hybris-boot or halium-boot? |
I am using halium-boot, I get the error while creating mkbootimg asi it said in the docs. |
Hi! Me again! Sorry if this is a stupid question.
I thought this might be the problem. |
That was with the halium test rootfs. The ubuntu touch image does not use systemd/journald. |
Hi guys, I followed the documentation I flashed Now i'm stuck at the boot logo and can't connect via ssh. Here i have a screenshot of As you can see there are multiple errors with mounting. Because of that of curse later errors occure like not finding stuff and unset variables. I really have no clue where to investigate from this first. A point where i was unsure if everything is correct was the Also here is my Click to show full kernelconfig.
Is there a chance that one of you guys who got it working would try to build and flash it again with an up to date source to verify that there is maybe an newer issue? I would really get this this working and start porting for my other S2, S4, S5 devices. Thanks, All help is highly appreciated! PS: Below is again the whole stuff i made.(i customized the Click to show content.
|
I've made some progress on this. The journald hang is caused by it polling some battery properties in The above kernel repository also includes an updated defconfig for Halium (disables
Udev rules: Halium/lxc-android@e302295d0 Touch works. WiFi works after starting the Android container. Audio and GPS don't work but I haven't really looked into this yet. I managed to get Phosh running on the device, some screenshots here: https://www.doof.me.uk/2020/04/19/wlroots-and-phosh-on-samsung-s7/ |
Hi all. Anyway, I had no trouble building and installing halium-boot.img and the ubports armhf rootfs. The only thing I needed to do was to fix the kernel config. Then, after some initial difficulties some of you guys have experienced, I managed to get an ssh connection and continue working on it. The current state is that it boots nicely, unity8 starts, I've got wifi and apps start normally. I can install and remove apps from the Openstore. The morph web browser works fine and including playing video streams, but sound doesn't work. The camera doesn't work and neither does the phone. I have a sim installed, but it isn't recognized by the device. I have tried fixing sound by following the steps in the porting FAQ, but no luck. Also, I have kept detailed notes, so anyone can duplicate what I've done. I will post them here (once I'm at the computer where I've got them) and then I hope there's someone amongst you who can possibly help solve the remaining issues! I've had good help from the Telegram group (Ubports porting) but questions there don't always spark an answer... So, let's do this port! :) |
Notes on building UBPorts Ubuntu Touch for Samsung Galaxy S7 (codename herolte) By Ari Börde Kröyer (Telegram @AriBK) May 1, 2020 The following is simply a collection of notes from my porting progress. I hope it encourages more people to build for this device and share progress so we soon can have a fully functional port. I am no expert, but I can read and follow a guide, so that's what I've done and those are the most important skills you will need. If you also have programming experience, much of this will come naturally to you. Thank you to all that have contributed before me, especially @ZeroPointEnergy, whose kernel source tree made it possible to get this far! The main guide to follow is the UBPorts porting guide. https://docs.ubports.com/en/latest/porting/introduction.html# Only AFTER I had successfully installed and booted into Ubuntu Touch did I become aware of the porting FAQ. I recommend reading this carefully also. https://pad.ubports.com/p/porting-faq even though I was unable to solve the problems with pulseaudio using this. The present document is in no way a complete guide. My port is unfinished and not completely tested. Many things work, but many don't as well. (No sound, bluetooth, gps, sms or phone service, to mention a few.) I am just sharing these notes at the moment in the hopes that they will save others the time I had to spend on trial and error as well as searching for things. Please share tips on you progress when you solve issues! (Telegram, UBPorts Porting group) Good luck! Prior to starting this build, I downloaded the source code for Heimdall from gitlab and built I followed the directions and flashed TWRP using the command line version of heimdall. (No fiddling After installing TWRP recovery, I used it to wipe data and cache partitions and format them ext4. I then proceeded to start the work: Started here by doing as told, namely to start with the Halium porting guide: sudo dpkg --add-architecture i386 sudo apt install git gnupg flex bison gperf build-essential mkdir halium && cd halium repo init -u https://github.com/Halium/android -b halium-7.1 --depth=1 repo sync -c -j 16 Repository for the device is located at: Checked the device manifest. It was already in the repository above and was correct, including vendor blobs, so nothing needed to be done there. Next, from directory ~/halium issue the command Building. (This is in effect a test run. If it works, return to the UBports porting guide where we source build/envsetup.sh breakfast herolte Modify kernel source. cd ~ git clone https://github.com/mer-hybris/mer-kernel-check Correct all errors in file exynos8890-herolte_defconfig. Leave all warnings. Check that fixup-mountpoints are OK. Nothing needed to be done here. Now build: cd ~/halium mka mkbootimg export USE_HOST_LEX=yes mka hybris-boot mka systemimage If successful, return to UBPorts porting guide to build halium-boot.img and the UBPorts system.img https://docs.ubports.com/en/latest/porting/building-halium-boot.html Skip fix mounts. Not necessary. Edit kernel config again. Standing in the ~/halium directory issue this command: ./halium/halium-boot/check-kernel-config ~/halium/kernel/samsung/universal8890/arch Repeat the command above until it doesn't report any errors. I found it couldn't correct the last error Now modify source to prevent apparmor from causing apps to crash when you have built and installed. Now build: cd ~/halium This should go smoothly. The files are located in halium/out/target/product/herolte NOTE: After my initial build I started getting errors when building the system image. These were resolved by doing: export USE_HOST_LEX=yes (Reference link: http://docs.halium.org/en/latest/porting/common-system-build-errors.html#flex-locale-error ) Now, after completing the build and with the device in download mode, flash halium-boot.img by issuing: heimdall flash --BOOT <path_to_halium-boot.img> Continue with the steps to install the root filesystem and system.img NOTE: The porting FAQ (https://pad.ubports.com/p/porting-faq) specifies that ARM64 systems need to be based on the xenial-edge rootfs. A link is supplied at the beginning of this guide. However, when I tried this, I was unable to get Unity8 running and in discussions on the UBPorts porting group on Telegram the conclusion was that this rootfs was in fact broken at the moment. I therefore went with the standart armhf rootfs linked in the UBPorts porting guide. Get the halium-install script as described in the UBPorts porting guide. With the device attached to the USB port, first boot the device into TWRP recovery. Check that the device is registered by issuing adb devices The output should confirm this. Now issue the command: <path/to/halium-install> -p ut <path/to/rootfs.tar.gz> <path/to/system.img> After a little while you will be prompted to enter a password which you will need later, when logging in to the device, when doing 'sudo' and so on. After this, I rebooted the device. I got the Samsung bootloader screen, and it stuck there, just as First, as described, do: ip link show Determine which interface (termed 'device' in the commands below) is the one your device (your Samsung S7) is connected to, and use this as follows: ip link set address 02:11:22:33:44:55 Once finished, do the following to log in: ssh phablet@10.15.19.82 Once ssh is established and you have entered your password, get wifi running with this command: nmtui You will get a gui to configure Network Manager. Do so by choosing 'Activate a connection'. Choose SSID, fill in passphrase when prompted. Then exit with quit. Remount root as read/write: sudo mount -o remount,rw / Now update packages: First set up an apt user: adduser --force-badname --system --home /nonexistent (Reference link: https://askubuntu.com/questions/810202/what-is-the-sandbox-user-apt-on-my-system) Add udev rules as described in the UBPorts porting guide: sudo -i # And enter your password In the directory /etc/ubuntu-touch-session.d edit file android.conf by adding the following content: GRID_UNIT_PX=29 Now, get ready for the magic! sudo ubports-qa install xenial_-_fix-dataspace If your device did not reboot by itself, issue sudo reboot Unity8 will now start This is as far as I have gotten. Please share any progress notes if you get further than this! Good luck! |
With some help I have now located the problem that prevents sound. Some parts of audio_policy.conf need to be edited out. However, sound is still not as it should be, but the reason is that the device is operating at a sampling rate of 48 kHz whereas it should be operating at 44.1 kHz. I checked this and confirmed that sound is normal at this sampling rate, but have thus far not managed to make the device set the correct rate at boot time. I can adjust it from the command line, but there has to be a way of setting this in one or more config files. I have tried editing touch.pa, as well as audio_policy.conf, but so far no luck. |
Any news on this port? |
Yes. The sound problem is basically solved (at least the mentioned issue) but I have just experienced a regression. Work on bluetooth is in a bit of a slump. There are also multiple other issues. However sms now works, but calls cannot be made yet, owing to a Java class that needs to be implemented in C instead. With my limited programming skills this might take quite some time, unfortunately.I also have a summary of what works and what doesn't. If you reach out to me on Telegram (@AriBK), I'll share it with you there.Ari10. nov. 2020 10:44 skrev vladvlad12 <notifications@github.com>:
With some help I have now located the problem that prevents sound. Some parts of audio_policy.conf need to be edited out. However, sound is still not as it should be, but the reason is that the device is operating at a sampling rate of 48 kHz whereas it should be operating at 44.1 kHz. I checked this and confirmed that sound is normal at this sampling rate, but have thus far not managed to make the device set the correct rate at boot time. I can adjust it from the command line, but there has to be a way of setting this in one or more config files.
I have tried editing touch.pa, as well as audio_policy.conf, but so far no luck.
Any news on this port?
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe.
|
Hello, Thanks to @ZeroPointEnergy and @abkro for their work. I published the notes I have gathered during my initial build for the S7, if it can be useful for someone else. I also made 2 script to speedup initial configuration: https://notes.iopush.net/blog/2021/01-ubports-part-1/ Now that abkro pointed me to his repo I'll try to go further :) |
https://devices.ubuntu-touch.io/device/herolte/ is missing halium boot.img |
Hi @ungentilgarcon it seems that my URL shortener has been reset :(
If you want to compile hem yourself you can follow UBPort documentation with the repo: |
I managed to push herolte-halium-boot via heimdall |
Ok, on it |
well, it's not really usable as of now...how to improve it is what I'll look at. |
Also trying ot install software from opensoftware ain't working |
Hey @ungentilgarcon, not far away from Grenoble ;) So I had the Bluetooth almost working: I needed to restart the daemon manually; someone else got it working but I am not sure of the state. But I stopped the porting effort because I spent days on the photos without any result: the photo application and Samsung blob are not using the the image encoding and despite all my trials I was not able to make it work. Edit: those comments applies to UBTouch only |
Hi @ungentilgarcon Are you still working on the S7? I started from scratch a couple of months ago trying to port halium-9 instead after having given up halium-7.1 which I worked on for quite some time before that, even though it had reached a certain level of maturity. Anyway, I had halium-9 booting and the ui started, but there were issues with display instability which I at the time was unable to figure out. For this reason, I have since concentrated my efforts on a different device, but it would be nice to fix the S7. |
Hello, I tried to follow the instructions, flashing the boot image in download mode and the system image in recovery mode, both operation were successful, but... now the device just show an orange screen while booting... :S Thanks, |
Yes, if you simply used a build for the S7 (herolte), you can expect strange things to happen. I would set up the whole build from scratch if I were you. |
usb: Manufacturer: GNU/Linux Device
appears indmesg
on host.Notes
heimdall flash --BOOT hybris-boot.img
.The text was updated successfully, but these errors were encountered: