yashsingh1/xdaforums huggingface dataset:
[Shield Tablet Android Development] NoDiskNoFun:
Mainline Kernel

Hey,

shouldnt it be possible to install mainline kernel and arch linux since the Acer CB5-311 Chromebook which have a TK1 does work nice with mainline+mesa+nouveau. --> Arch Linux ARM | Acer CB5-311 Mainline.

i tried to boot the kernel i got inside bootfolder of my Acer CB5, but this ended in a black screen. Anyways i didnt do some modification to it and also havnt installed any linux on the shield (hoped for a busybox cmdline or error message). I dont now if fastboot is even capatable of booting a 4.x kernel but if this is possible than we could install an up-to-date linux on this devices, which, for my Chromebook, would run supersmooth.
[Shield Tablet Android Development] NoDiskNoFun:
Chromebook uses coreboot not uboot. :p
[Shield Tablet Android Development] Danny.69:
One question, could I install this on the JXD S192 device with Tegra K1?

What files could I use and which ones not?
[Shield Tablet Android Development] discomilk:
Managed to get everything installed

Hey all, managed to get this all installed and working and I updated the distro to 16.04 LTS by holding back the xorg.core and so far it managed to boot and USB peripherals work so I was able to log in and get everything tested. Firefox works again which is great but touch input is not working, or bluetooth. More might be broken but my battery has died so we'll see when it's back online. Any ideas on how to get touch input working again?

Update: It's giving me the option to update to 18.04 but it wants me to update those xorgs

Update 2: Updated the xorgs and did a dist-upgrade to 18.04, USB mouse "works" and WiFi, able to boot and get to lock screen where I am unable to click or type anything to log in, at least it's not crashing like it did last time I did dist-upgrade without holding back xorg.core
[Shield Tablet Android Development] Bogdacutu:
For touchscreen and BT on Ubuntu 16+, iirc the init scripts for rm-wrapper and some BT service needed to be converted to systemd units - I think they were in separate archives inside the MultiROM installer, so they should be easy to find.
[Shield Tablet Android Development] Samuelgames:
Hey, I'm working on making a clean modern, SD-bootable L4T image for the Shield Tablet, so far haven't been able to get 16.04 (Through do-release-upgrade from the working 14.04 image) or 18.04 (On a clean rootfs) fully booting, it just throws me directly to emergency recovery, are you using systemd or did you roll back to upstart? Could you give the steps you did for upgrading?
[Shield Tablet Android Development] discomilk:
Try holding back xorg.core (sudo apt-mark hold PACKAGE), updating packages (apt-get update && apt-get upgrade), release upgrade to 16.04 (sudo apt-get dist-upgrade), then update xorg and distro at same time. If that does not work I will try repeating and notating my procedure.
[Shield Tablet Android Development] Samuelgames:
Howdy
[Shield Tablet Android Development] LouMinartey:
Nice work! How did you do this? I've got a stock lte shield on 5.4 I'd really like to have native linux on. Also, how well does KDE run?
[Shield Tablet Android Development] fards:
Nice!

Kernel 3.10¿
[Shield Tablet Android Development] dangelo.davide:
Are you going to share your work? I am really interested.
[Shield Tablet Android Development] LouMinartey:
Hey there, looking to replicate this. Did you downgrade from 5.4 (android 7) to a specific one for multirom support or is this primary? Did it require any specific kernels? Just looking for initial setup requirements to make sure I don't brick my trusty Shield and I'll happily write up my experience and instructions for anyone coming after me. I have an OG shield 32gb/LTE. Thanks!
[Shield Tablet Android Development] thelangosta:
Tease
[Shield Tablet Android Development] discomilk:
I flashed the modded kernel and stock rom at the lowest version. Then followed steps in main post and then the holdback method on the xorgs
[Shield Tablet Android Development] fpb4:
No matter

which combination i use (K1 wifi only here), stock 1.5.0, 5.0.0, 5.1.0 using mainly as mrom config. https://xdaforums.com/showpost.php?p=70630140&postcount=400 and BitO-K12-002 patched kernel....when i select L4T (both latest stable and beta from main post) my tablet boots into primary. [MENTION=9654126]discomilk[/MENTION], [MENTION=1160635]Samuelgames[/MENTION] - I am glad to see some recent activity on this thread, I've been following it for a substantial amount of time but please by all mean, would you be able to list your configs, which stock/multirom/kernel combination you've used?

Cheers,

---------- Post added at 04:36 PM ---------- Previous post was at 04:36 PM ----------

No matter

which combination i use (K1 wifi only here), stock 1.5.0, 5.0.0, 5.1.0 using mainly as mrom config. https://xdaforums.com/showpost.php?p=70630140&postcount=400 and BitO-K12-002 patched kernel....when i select L4T (both latest stable and beta from main post) my tablet boots into primary.
[MENTION=9654126]discomilk[/MENTION], [MENTION=1160635]Samuelgames[/MENTION] - I am glad to see some recent activity on this thread, I've been following it for a substantial amount of time but please by all mean, would you be able to list your configs, which stock/multirom/kernel combination you've used?

Cheers,
[Shield Tablet Android Development] LouMinartey:
OG Shield LTE here, running stock nvidia 5.4 with mittorn's tweaked bit0 kernel from here > https://github.com/mittorn/android_kernel_nvidia_shieldtablet

I can get multirom to begin booting linux with this, but the system crashes during initial start with the boot log onscreen and boots back to multirom. Not sure if this will be any help to you, as my shield is a different model. The post I used to get this far is a few pages back, also by mittorn. If you do try, I hope you have more luck than me!

EDIT: This post: https://xdaforums.com/showpost.php?p=76973828&postcount=392
[Shield Tablet Android Development] piyushaggarwal002:
Hey developers and others who want to get on with 18.04, I wrote a blog post about how I get up to 18.04 with 32.1 by Bogdacutu. Please take a look: https://brute4s99 [dot] news [dot] blog/2020/05/06/plasma-tablet/
[Shield Tablet Android Development] LouMinartey:
SNIP
[Shield Tablet Android Development] gadido30:
upgrade to ubuntu 16

[MENTION=5428853]mittorn[/MENTION]

Is it possible to upgrade distro to Ubuntu 16 or 18?

I try to upgrade, fstab is not working , also xorg get stack

any idea?
[Shield Tablet Android Development] gadido30:
I also tried mittorn kernel, I couldn't upgrade to Ubuntu 16.0

I think that you need to flash tablet to the oldest android version 0.0.0.0 , then use Bogdacutu image , It will work
[Shield Tablet Android Development] LouMinartey:
Thank you for the reply, I restored my shield to Lollipop and followed SOME of the advice from this archived copy of another users blog a few posts back, waybackmachine copy here >>> https://web.archive.org/web/20200514181830/https://brute4s99.news.blog/2020/05/06/plasma-tablet/

Using these files, I am able to get 14.04 installed, have tweaked the bluetooth to not automatically start on boot and lowered the default startup brightness. Unfortunately, even holding xserver-xorg-core and performing apt full-upgrade && apt do-release-upgrade results in an unresponsive login screen and a non-working touchscreen (I was also unable to get RM-wrapper working but thats likely just me not understanding the tools) but TTY still works with CTRL+ALT+F1 via OTG'd keyboard.

I'm currently looking to find the best way to perform a backup of the multirom image so I can break more things without wasting time reinstalling and reconfiguring the 14.04 environment. I've tried tarring out the /data/media/0/multirom/roms/Linux4TegraR231/root folder from TWRP's terminal with mixed success. My endgame is to strip out the requirements for this device (tegra drivers and special tweaks and mods to make it chirp) and merge these with a newer rootfs. I see people came before me and seem to have had luck at least getting an arch tty env or even full KDE running, so it must be possible.

I'll post my methods if I manage anything new, and hopefully maybe even end up with an installable rootfs.
[Shield Tablet Android Development] gadido30:
I also tried to hold xserver-xorg-core and got same results after upgrade to 16.0,

Did you downgrade to Android 5.1?
[Shield Tablet Android Development] LouMinartey:
Yes, downgraded to Shield LTE Recovery Img 3.1.1 (Lollipop 5.1 Stock) first. As far as i know, its impossible to boot any of the L4T (or possibly anything else that needs an older kernel) on anything newer than 5.1. Only Android roms will boot on 6 and newer
[Shield Tablet Android Development] gadido30:
Ok

Maybe someone that did upgraded to 16.0 and 18.0 ,

can help with some tips?

---------- Post added at 03:21 PM ---------- Previous post was at 02:47 PM ----------

With mittorn kernel and Multirom patch, I could boot Android 7.0

But couldn't upgrade to Ubuntu 16.0

---------- Post added at 03:22 PM ---------- Previous post was at 03:21 PM ----------

With mittorn kernel and Multirom patch, I could boot Android 7.0

But couldn't upgrade to Ubuntu 16.0
[Shield Tablet Android Development] LouMinartey:
Yeah me too, what I meant was versions of android newer than 5.1 seem to break something to do with "appended DTBs" (see earlier in this thread, I don't know much about it let alone enough to fix it). It won't boot Ubuntu though. Did you get Ubuntu 14.04 to boot as secondary with an Android 7 Primary? Every time I used mittorn's kernel + mrom patch w/ Android 7 Primary Rom Ubuntu 14 would start booting but crash while starting services
[Shield Tablet Android Development] gadido30:
It boot into Ubuntu 14.0 , You need to copy zImage (download from github) to Linux4Tegrara/boot folder
[Shield Tablet Android Development] LouMinartey:
Any chance you have a link to the zImage in question? And do you get visual glitches in android 7 while playing video (youtube etc, sporadic) with said kernel? If I remember this was the dealbreaker for me
[Shield Tablet Android Development] gadido30:
I use his instractions:

https://github.com/mittorn/android_kernel_nvidia_shieldtablet/releases/tag/first_ubuntu_release
[Shield Tablet Android Development] LouMinartey:
Oh yeah I did this too. May I ask, what version of shield are you using? K1 or OG LTE w/ pen?

EDIT: Yup, tried that again for 'unable to open an initial console' during ubuntu 14.04 boot resulting in reboot back to android
[Shield Tablet Android Development] gadido30:
I have Tablet K1

---------- Post added at 07:01 AM ---------- Previous post was at 07:00 AM ----------

Did You replace the zImage in boot folder?
[Shield Tablet Android Development] LouMinartey:
I did, I'm gonna try it again as it was 4am when I tried and I could've made mistakes. I'm using the OG Shield LTE, hoping its not a compatibility issue
[Shield Tablet Android Development] LouMinartey:
So I can confirm certain video playback (youtube etc) glitches out often (green video desync) and random rebooting on android 7 stock nvidia when using multiboot + mittorns patches on the OG Shield Tablet LTE w/ pen, this was why I chose to downgrade. I'd be very interested to know if you get the same behaviour on your K1, as this might point to an important difference in our devices and i've been treating them as the same minus the LTE + stylus from a software perspective.

I did however notice that /opt/touchscreen/rm-wrapper CPU usage spikes to 25-35% for 5 seconds when you touch the touchscreen. This is on Ubuntu 14.04 L4T, is this normal or something we're having to do to get the touchscreen working? I'm making a list of all the files and tweaks I've made for QoL so whoever finds this thread and falls down the rabbit hole after us has a little less work to do for an enjoyable experience. I feel if I fix up 14 I might have a better chance at getting 16 to work

Also I cracked the touchscreen on my Shield Tablet (dropped it half asleep fiddling with packages lmao, still usable) and have discovered that yes, its pretty hard to get replacement screens for a recalled device. I found out it was recalled 2 years after the recall ended so no luck for me there, so rather than going through the faff of waiting to buy a dead OG Shield Tablet for the touchscreen and subassembly as its all glued together I'll just replace it. I don't really care about taking risks with it now. Time to fire up the BBQ, try grill up a frankenkernel and poke its brain with a stick I think. I'll post back with my findings
[Shield Tablet Android Development] gadido30:
Ubuntu 18.0 Working (Latest Android)

Step By Step:

I use this:

https://github.com/mittorn/android_kernel_nvidia_shieldtablet/releases

[MENTION=5428853]mittorn[/MENTION] Thank You:)

/etc/fstab

/android/system/ /system/ auto bind,ro 0 0

none /media tmpfs auto 0 0

(this is for ubuntu 16.0 or 18.0)

I install openssh-server (sudo apt-get install openssh-server) and use ssh

I use this instruction to upgrade:

sudo apt-mark hold linux-image-* linux-headers-*

sudo apt-get update && sudo apt-get upgrade -y

sudo apt-mark hold xserver-xorg-core

sudo do-release-upgrade

After upgrade the login screen will be black (its only appear in Ubuntu 16.0) ,

it take about 10 min for login screen or use ssh client

Add those line:

/etc/group

inet:x:3003:root

net_raw:x:3004:root

and run:

sudo usermod -g 3003 _apt

sudo usermod -G bluetooth -a <username>

reboot

for upgrade to ubuntu 18.0:

There are pkgs that will need manual install :

sudo apt list --upgradable

sudo apt install <pkg name>

If all ok, run:

sudo apt-get update && sudo apt-get upgrade -y

sudo do-release-upgrade

To Fix DNS Resolution

Add this line to the end of /etc/rc.local to fix your internet:

echo "nameserver 8.8.8.8" | tee -a /etc/resolv.conf

And run

rm -f /etc/resolv.conf

To Fix BlueTooth

Add this lines to the end of /etc/rc.local to fix your bluetooh:

rfkill block 0 && rfkill unblock 0 && /usr/bin/brcm_patchram_plus --enable_hci --use_baudrate_for_download --scopcm=0,2,0,0,0,0,0,0,0,0 --baudrate 3000000 --patchram /system/etc/firmware/bcm43241.hcd --no2bytes --enable_lpm --tosleep=50000 --bd_addr `cat /mnt/factory/bluetooth/bt_mac.txt` -d /dev/ttyTHS2 &

systemctl restart bluetooth

Ubuntun 18.0 perfect working
[Shield Tablet Android Development] LouMinartey:
Woah, legend. Is touch working with this? I'll try reflashing back to 7 and report my findings, hopefully this is compatible with K1 + OG w/pen + LTE.

I've been using indicator-cpufreq on 14.04 to manually set the cpu governer, might be of some use to you.

Also to get around the lack of a functional accelerometer, i've bound the following keyboard shortcuts to help rotate the screen. Confirmed working on 14.04 & 16.04:

CTRL+LEFT (Portrait): "xrandr --output DSI-0 --rotate inverted"

CTRL+RIGHT (Landscape): "xrandr --output DSI-0 --rotate left"
[Shield Tablet Android Development] gadido30:
Wifi - working

Touch - not working (checking)

Sound - not working (checking)

BlueTooth - working (fixed in tutorial)

I still checking it
[Shield Tablet Android Development] LouMinartey:
Login screen rotation fix for L4T R23.1 (U14.04) (Only tested on this version)

Log in, set desired screen rotation and type the following into a terminal:

EDIT: I've finally managed to safely upgrade 14 to 16 with functional touch and loginscreen without bricking my install due to running out of RAM during the upgrade. Once I've isolated whether some of the steps are luck or repeatable, I'll report back with my steps. I think if I'd set up a swapfile before the upgrade it might've gone smoother on my previous attempts. Now to break it and try again!
[Shield Tablet Android Development] LouMinartey:
Enabling SWAP

Initial Setup:

sudo su
cd /data/media/0/

(Change to directory for swapfile, this changes to device internal storage)

dd if=/dev/zero of=/data/media/0/swapfile bs=1024 count=2097152

(Set 'of=' to desired storage, I'm using androids internal storage folder. Set 'count=' to desired swap size, Mine creates 2gb)

chmod 600 swapfile

(Only allow root to write to file)

mkswap swapfile
swapon swapfile

(enable swapfile)

Check swap is in use:

sudo swapon --show

OR

sudo free -h

To make permanent:

sudo su
nano /etc/fstab

Add new line at bottom:

/data/media/0/swapfile swap swap defaults 0 0

Change swappiness value:

sudo nano /etc/sysctl.conf

Add new line at bottom (default 60):

vm.swappiness=30

---------- Post added at 05:58 PM ---------- Previous post was at 05:45 PM ----------

Brightness Fix (Ubuntu 16.04)

Brightness UI adjustment is broken in unity after 16.04, to manually set brightness perform the following:

Set Brightness (temporary):

sudo su
nano /sys/class/backlight/pwm-backlight/brightness

Change number to desired value (0-255) (Default 191)

Save (ctrl+o), exit (ctrl+x)

Set Brightness (Permanent, on boot. Working in 14.04 & 16.04):

Add to /etc/rc.local BEFORE exit 0, replacing 100 with your desired default brightness

echo 100 > /sys/class/backlight/pwm-backlight/brightness
[Shield Tablet Android Development] gadido30:
I think that from Ubuntu 16 -> 18 it break Nvidia Driver

I can't upgrade from 16 -> 18 without update xorg-core , mybe there is workaround
[Shield Tablet Android Development] LouMinartey:
Not sure if this will help you, but it's a start:

https://demotomohiro.github.io/hardware/jetson_tk1/index.html

https://demotomohiro.github.io/hardware/jetson_tk1/updating_driver.html
[Shield Tablet Android Development] Jokte:
Linux4Tegra R24.1 beta works on Shield Tablet K1?
[Shield Tablet Android Development] Stickman89:
We need a CoreElec build for the Shield already! ...Wouldn't that be awesome.
[Shield Tablet Android Development] LouMinartey:
Just checking in, I haven't given up on the dream though so far I've focused on fixing bugs and making 16.04 a decent experience. If anyone can share with me information on how I'd repackage this back into an MROM installer it'd be really appreciated. I've mapped out the archives inside the MROM file but not sure on how to make it installer friendly.

Just a little carrot on a stick for anyone still interested in working on this but not enough motivation, Box86 by ptitSeb works astoundingly well on shield tablet running 16.04, allowing x86 linux programs and games to run on ARM at decent speeds with fairly low powerdraw. I also managed to get Wine working on the shield by following instructions on the box86 wiki, allowing you to run wine86 with box86 to run windows apps and older games on arm linux at fairly decent speeds!
[Shield Tablet Android Development] LouMinartey:
A potato quality pic of linux x86 FTL running on the shield tablet, since gotten fullscreen working.

Main GIT URL: https://github.com/ptitSeb/box86

Compile instructions, use Other ARM Linux Platforms and compile directly on the Shield: https://github.com/ptitSeb/box86/blob/master/docs/COMPILE.md

Wine setup instructions, extra instructions needed for this to work fully on our tablet but I'll post them soon (still haven't gotten winetricks working): https://github.com/ptitSeb/box86/blob/master/docs/X86WINE.md
[Shield Tablet Android Development] SmashMan4:
Hey,

Any chance you can send me the mromm file so I can update to 16.04? I keep trying to do it myself, but the wifi keeps asking for a password, and bluetooth and touchscreen doesn't work. Neither do the fixes.
[Shield Tablet Android Development] LouMinartey:
Haven't compiled an MROM file yet as I haven't figured out how to extract and package any of it properly so far. I'll post back later with my own instructions to get from 14 to 16 with bluetooth + touchscreen working etc

EDIT: If anyone here knows how to do it drop me a PM and I'll get a file out as soon as I can
[Shield Tablet Android Development] SmashMan4:
One thing this guide hasn't addressed is my initial problem with wifi. Once I connect to wifi (no matter when) it gives me an error saying the wifi discovery mode is off.
[Shield Tablet Android Development] LouMinartey:
I don't get this problem. It just works

Can you send me some logs?
[Shield Tablet Android Development] SmashMan4:
so I forgot to install stock, and now I can't even choose an internet connection. Says, "device not ready"
[Shield Tablet Android Development] LouMinartey:
What model are you installing on? OG? K1? WiFi only or LTE? And did you use the right ones?
[Shield Tablet Android Development] SmashMan4:
I'm using the K1 and installing the 0.0.0.0 image.
[Shield Tablet Android Development] LouMinartey:
Can't really help, I'm running this on an OG LTE
[Shield Tablet Android Development] wertus33333:
here is updated kernel for touchscreen to work on 18.04

maybe system.d services to replace rc.local are needed...

unfortunately i cant seem to upgrade from 16.04 to 18.04 with xserver-xorg-core on hold, any ideas?

Nouveau driver works but opengl4.5 would be nice...

install xserver-xorg-input-evdev and remove xserver-xorg-input-libinput then apply the tweaks to /usr/share/X11/xorg.conf.d/10-evdev.conf for propperly configured touch

tweaks:

Section "InputClass"
Identifier "evdev touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "InvertX" "yes"
Option "InvertY" "yes"
Option "Calibration" "0 1199 0 1919"
EndSection

kernelsource: https://github.com/wertus33333/STLinux-Kernel
[Shield Tablet Android Development] LouMinartey:
I'll have a crack and let you know how I get on, nicely done!
[Shield Tablet Android Development] wertus33333:
here are my system.d services if needed, usbup forces a set ip for easy ssh after reboot or other problems. be sure to update rcloo with your username and disable/remove the rc-local scripts (touch wont work if rmwrapper runs twice)

was also experimenting with archlinux, multiplatform armhf works great on command line (but couldn't get to X) http://os.archlinuxarm.org/os/ArchLinuxARM-armv7-latest.tar.gz (just remove root inside a l4t multirom installation and extract the tar to root, then optionally run the driver installer from another l4t multirom prefix). Modified Linux_for_Tegra_r21.8 for arch, i'll also attach that. Never tried without nvidia l4t proprietary drivers, maybe with the non free package and open source gpu driver it would work (like on ubuntu 18.04).
[Shield Tablet Android Development] LouMinartey:
Thank you very much, I was able to get 18.04 working albeit with Nouveau + touch for the first time. Baby steps, hopefully there's a way to get OpenGL working also
[Shield Tablet Android Development] wertus33333:
maybe by compiling the new nouveau driver into kernel we can get opengl4.2/3

this is for jetson tk1 arch:

GitHub - Gnurou/nouveau: Clone of http://cgit.freedesktop.org/~darktama/nouveau

Clone of http://cgit.freedesktop.org/~darktama/nouveau - Gnurou/nouveau

github.com

GitHub - Gnurou/linux: Linux kernel source tree

Linux kernel source tree. Contribute to Gnurou/linux development by creating an account on GitHub.

github.com
[Shield Tablet Android Development] LouMinartey:
The Jetson TK1 is the gift that keeps giving! Gonna have a crack when I've got some spare time, if you manage let us know
[Shield Tablet Android Development] Jokte:
Hi, I'm trying to upgrade to 20. I installed 14, prepared this, upgraded to 16, applied the fixs, upgraded to 18 and after upgrade to 20, thought I would search the fixs later but the first problem was the rotation screen. Although I use xrandr, Xorg -configure and other commands or solutions finded on Internet, nothing worked.

I would like install the latest ubuntu version on my Shield Tablet K1 but I dont know how do it. Im a noob in this, for that, can somebody tell me if it is possible and how I can do this, please?

Sorry for my bad english.
[Shield Tablet Android Development] yeoldeusrename:
Did you try this?

Post #385