No graphics - Port to Samsung Galaxy Tab A 9.7 (gt510wifi) stalled



  • Greeting UBports Forum,

    I've been having a great deal of fun in my attempted ut port to the gt510wifi. Lots of great guides and info spread across ubports, halium, hybris, and pm have brought me this far.

    I have a successful ssh connection to the device, lxc-info shows that my container is running, and my android partitions appear to be mounted correctly, yet nothing shows on screen.

    The advice in the guide under "Getting more Mir logs" fails because the unity-system-compositor command(s) hang(s). Any attempt to get information from /system/vbin/logcat fails unless run as root, and the only info there is a reference to "debuggerd: Connection refused" and "CANNOT LINK EXECUTABLE "/system/bin/vold": library 'libboringssl-compat.so' not found", both of which seem unrelated.

    From my host machine I cannot see any adb devices.

    I'm stumped at this point. Any advice?



  • Additional info: I cannot figure out how to get info from /proc/last_kmsg. The only way I know to reboot the devices (without using hardware key combos) is to issue a reboot command from the ssh session. Doing so sends the device from a state that looks visually like the bootloader (with the "Samsung Galaxy Tab A" graphics) to a strange state that says "Charging: ??/100". The only way to exit this mode is to reboot with the hardware key combo which, I believe, clears /proc/last_kmsg.



  • does pm work?



  • I've been trying this today with different configurations with no luck. I'm slightly confused as to whether I should be following the pm porting guide (https://community.kde.org/Plasma/Mobile/Porting) and setting up the rootfs in /data/lxc/containers/system/rootfs or just targeting pm in the halium-install script (which puts the rootfs image in /data). Following the latter I can almost reach the same state I was in with ut, meaning I can get ssh but still no graphics or adb, and I see that the lxc container is not running.

    /proc/kmsg showed me two interesting things:

    • init: 307] mkdir: can't create directory '/root/android': Read-only file system
    • exe: 255] EXT4-fs (mmcblk0p28): mounted filesystem with ordered data mode. Opts: errors=remount-ro

    It seems like my userdata partition is being mounted as read-only so nothing gets created in /root. My fstab doesn't specify this option.



  • @diesputnikdie said in No graphics - Port to Samsung Galaxy Tab A 9.7 (gt510wifi) stalled:

    I've been trying this today with different configurations with no luck. I'm slightly confused as to whether I should be following the pm porting guide (https://community.kde.org/Plasma/Mobile/Porting) and setting up the rootfs in /data/lxc/containers/system/rootfs or just targeting pm in the halium-install script (which puts the rootfs image in /data).

    halium guide. The kde.org page hasn't been updated for 1.5 yrs. I think kde's approach today is: either halium, or postmarket os. I have no experience with postmarket os.

    Following the latter

    good!

    I can almost reach the same state I was in with ut, meaning I can get ssh but still no graphics or adb, and I see that the lxc container is not running.

    ssh: good
    adb: that's expected, rootfs don't offer adb
    lxc: that's a problem

    /proc/kmsg

    Are you really looking in /proc/kmsg? I've never heard of it before. I see now that it actually exists on my laptop, but it's empty.

    In my experience /proc/last_kmsg for the log from the previous boot and dmesg for the current boot

    showed me two interesting things:

    • init: 307] mkdir: can't create directory '/root/android': Read-only file system
    • exe: 255] EXT4-fs (mmcblk0p28): mounted filesystem with ordered data mode. Opts: errors=remount-ro

    It seems like my userdata partition is being mounted as read-only so nothing gets created in /root. My fstab doesn't specify this option.

    1. did you add the udev rules to pm rootfs?
    2. reboot to ssh
    3. pastebin the output of mount
    4. and of dmesg (everything)

    PS: another thing
    @diesputnikdie said

    Lots of great guides and info spread across ubports, halium, hybris, and pm have brought me this far.

    I guess I know what you are referring to with the first two guides, but what resources are you using for pm and especially hybris?



  • I believe that dmesg is fed by kmsg but I've gone ahead and ran dmesg for the following.

    UT:

    PM:

    I was referencing the pm porting guide in your last comment and ignore the hybris reference. The halium and ubports Porting pages reference hybris so often I managed to confuse myself. Sorry about that.



  • @diesputnikdie said in No graphics - Port to Samsung Galaxy Tab A 9.7 (gt510wifi) stalled:

    I believe that dmesg is fed by kmsg but I've gone ahead and ran dmesg for the following.

    UT:

    seems some android partitions are being mounted ok, others fail, e.g.

    initrd: moving Android system to /android/system
    mount: mounting /root/android/system/lib/modules on /root/lib/modules failed: No such file or directory
    

    not sure whether that's a problem though :-P

    Did you do the udev rules?

    Can you try this http://docs.halium.org/en/latest/porting/debug-build/early-init.html#the-device-reboots-after-leaving-hybris-recovery to make the lxc container not start automatically, but then later start it manually and paste the output of that

    PM:

    looks like you are using pm with halium-boot that doesn't work. pm needs hybris-boot

    I was referencing the pm porting guide in your last comment and ignore the hybris reference. The halium and ubports Porting pages reference hybris so often I managed to confuse myself. Sorry about that.

    clear. no worries. its A LOT of jargon :)



  • I have done the udev rules for both platforms, though I had to enter them manually for pm because the standard way of generating them from /var/lib/lxc/android/rootfs/ueventd*.rc fails because the rootdir directory doesn't exist.

    Thanks for the hybris-boot tip. With that I can no longer get an ssh session, but telnet works and diagnosis.log states: CONFIG_DUMMY=y found in /proc/config.gz, must be disabled
    That flag was unset so I went ahead and set it explicitly to false and rebuilt the kernel. After flashing I can see in my host dmesg that it appears to boot normally (I get GNU/Linux Device on rndis0 10.15.19.82) but after a few seconds it reboots. Can't get any logs because it's too quick and mysteriously /proc/last_kmsg is gone. I did set the ANDROID_RAM_CONSOLE* flags in the kernel config.

    Following your advice I booted hybris-recovery, established a telnet session, disabled and masked lxc@android, then echo continue > /init-ctl/stdin. At this point I had ssh, then ran the unmask and start commands and got a reboot again. Ran the commands one more time and captured the following from dmesg: https://paste.ubuntu.com/p/jCpRCMQJ26/

    Going to switch back to ut for now and investigate those potential mounting issues. I appreciate your ongoing help!



  • Hi,

    If your sources have the file init.qcom.rc, with this line:

    export LD_SHIM_LIBS /system/lib/libril.so|libril_shim.so:/system/lib/libcrypto.so|libboringssl-compat.so

    try change this to

    export LD_SHIM_LIBS /system/lib/libril.so|libril_shim.so

    build system.img and install again.

    regards


Log in to reply
 

Looks like your connection to UBports Forum was lost, please wait while we try to reconnect.