Galaxy Note headless usage possible without much effort? - Galaxy Note GT-N7000 Q&A, Help & Troubleshooting

Hi,
Before a few month the display of my note died. Now I need a device for controlling my quadrocopter via inet. My idea was to use my note for this task(The flightcontroller is Arduino based, so I should be able to control it via usb). The problem is, I need to drive it headless. Concrete, I need to use gps, the camera and to put software onto the device without using the display.
I think the best way would be to install a linux into a chroot environment but it's questionable if I'm able to access the camera and gps from inside the chroot env, so I'm open for better ideas.
Kind Regards
Ralph

can no longer see the display so needing tips on how to use android headless!
debian kit seems to work pretty well for using linux applications but I need to solve the problem of how to start that (or anything else) after a reboot without needing to use the Android gui.
a few days ago I had access to that gui but now my hdmi->vga box died
(hardware failure - not related to debiankit or any Android app )
so now I have an Android minipc with those nice debian extras on it that I can't risk shutting down for feat of not being able to use it at all!
- unless I can find what I need to edit to get it to at least start sshd after boot!
vnc/xrdp would be nice too but ssh would be the minimum -
.. after a week still hoping .. please someone please suggest *something*!
btw connectbot is on there (like debiankit it was installed while I could still see the display) and I have seen posts suggesting that you can add scripts in that to execute after boot, but how do I do that without using the gui?
I found an sqlite3 file that looks like it contains the connectbot settings .. can I add something in there directly using sqlite3 via the shell?
sooner or later that reboot will come - the question for me now is will this device still be usable at all after that!
headless Android (on real devices) info needed URGENTLY!

Related

[Q] Android development capabilities

Hey guys,
I'm in the very very early stages of my masters work and I was toying around with the idea of using an Android tablet for part of it. I want to ask you devs what can be done when modifying the Android OS itself specifically in terms of a few things.
1. Logins - I would like to implement a classic user/password combination with levels of access for user, administrator, and some sort of superuser.
2. Restriction of User account - I would like to lock the user into one particular application. It must be relaunched when the device is booted and if the application crashes (hopefully not!) it must be restarted. Additionally, no market access, web access, etc.
3. Remote management if possible
4. Data encryption if possible
5. Prevent anything from being introduced from USB ports, SD slot, etc if unwanted.
I guess this brings me around to - is Android even the most suitable platform for such an endeavor. I'm not sure, to be honest, but I would love to get into development myself and this seems like a great way to learn. This is all just one part of a much larger project that I don't want to discuss just yet so sorry for being lax on details.
Thanks guys!
Android runs a virtual machine system called dalvik, in which each application gets it's own insuranceof the machine. It's implemented in such a way that each application gets assigned a user id, which unfortunately for you means each app is a different user, at least to the system. That's going to be a major wrench in the multi user plans. taking that into consideration, to have the same level of control over your tablet you'd have to give even the most basic user level "root" access or else the apps will start crapping their collective pants. As far as unwanted usb, there are a few apps that implement this functionality freely available through the market. Same with remote management. What I haven't seen yet is total encryption and I don't know enough about it to say it's possible or not. Seems feasible though.
My advice: write a custom login screen widget and then bake all these features into a pretty rom.

[Q] Making My Phone Compile Itself: JDK vs Apache Ant, other questions

I'm undertaking a stupid project and would like to ask some questions of some more experienced developers. Yes I know there's no practical reason for this, and no you cannot talk me out of it.
I would like to create a sort of "super nerd" adaptation of CyanogenMod for command line Linux junkies, or at least for Comp Sci grad students like myself. I want my phone to be able to recompile and reinstall nearly everything it runs. Yes I know that's a painful and slow operation: I did "emerge tightvnc" on a chroot Gentoo install and the command took about 18 hours. I remain undeterred.
Questions:
Sun JDK is apparently not available for arm7a. Am I reading the docs correctly, and one can indeed use Apache Ant to compile Android? Or is Ant not what I think it is? I'm not opposed to creating a small Bochs VM that boots, mounts a network filesystem, executes some JDK task, and then signals to terminate. I'd rather not if I can help it though.
How much access does the radio hardware get to the rest of the system? If I were to store something personal in an encrypted loopback partition, could someone abuse direct memory access to read from memory without the host OS knowing about it?
Has anyone played with adapting the Android boot process to use System V type init scripts? I'd like to make it easy for Tasker to say "we're running out of memory -- go from init level 5 to something arbitrary, say 7, which stops some services. Oops, still low, go init level 8, which disables more services.
I definitely plan on sharing my work. What do you guys think of the name CyanoGentoo?
Thanks all.
Apparently Apache Ant is not what I thought it is.
How about this then: does anyone know where I might find a community for people interested in general purpose computing on an Android phone?
Michael Spencer said:
Apparently Apache Ant is not what I thought it is.
How about this then: does anyone know where I might find a community for people interested in general purpose computing on an Android phone?
Click to expand...
Click to collapse
Don't know if you're still around but I'm very interested in helping and believe I may already have some solutions for you. If you're still running chroot or another form of ARM Linux distro (Debian based is what I'm coding for at the moment) then check my github
https://github.com/S0AndS0/Debian-Kit-Mods
The readme file has directions on how to clone and run the main modding script which curently has at least one if not two options that'll peek your interest for sure.
One set of options will download and install Java's JDK (either hard float or soft float) and another will download and install jMonkey (a user friendly programing SDK built on eclips) which will get you one step closer to compiling things on an Android device for Android devices. However, I've yet to crack running "Android SDK" because they have yet to reliece an ARM compatible source and "wine" (a Linux package for emulating other CPU's) is still under heavy development, so building Android from source and such is still out of the scope of what I've been able to script up for easy use.
On a side note; a quick google search of my user name and the key words guide, linux, jdk, arm and xda will result in links of what I've written up on enteracting with Linux on Android if you get stuck anywhere.
And if you search "raspberry pi android adb similar:xda" you'll find what I'll likely be working on bringing to Android; after debugging the script I'm working on to set up a Brendle (one of many methods of "cloud computing" availible for ARM) node/network through all availible network interfaces (bluetooth, 3G/4G, wifi) on Android.
Sent from my SPH-D700 using xda app-developers app
I am still around, and when I get a chance I'll take a look. I think I'm mostly satisfied with AIDE and chroot Ubuntu.
And those worried about dma exploits via radio hardware need only use a wifi-only device with a portable hotspot, I've concluded. No way to prevent these exploits otherwise.
Thanks again.
Michael Spencer said:
I am still around, and when I get a chance I'll take a look. I think I'm mostly satisfied with AIDE and chroot Ubuntu.
And those worried about dma exploits via radio hardware need only use a wifi-only device with a portable hotspot, I've concluded. No way to prevent these exploits otherwise.
Thanks again.
Click to expand...
Click to collapse
Indeed AIDE has been a fantastic tool for me as well.
Heh dma was indeed a concern of mine among other security issues with running Linux over 3/4G but its to bad there's no solution yet. I'm using old phones and tablets for most tests but try as I might I can't break into them from out side my hotspot network... even though I can connect to the divice running the hotspot remotely if it is running Linux too.
hmm, I'm working on a new script of examples for networking now, lots of building blocks to my latest project, which may help new scripters with some networking tedium of finding and assigning specific IP's to variables so they can be shared or saved or modified into other commands quickly. This will upon compleation will be one of the references for other scripts I'm working on for getting openstack and MPI running on multiple devices swiftly.
Speaking of MPI; the installer for Bramble on Android now works (install option 2 within for Debian Kit users) for getting that software package installed and all that is left to work on is the setup for machine files and sshkeys for multi-node quick set-up.
Two questions; seeing as how you have AIDE, perhaps you might be able to help with my other project that I'm working on? I've another github repo where I'm working to incorporate a; soft/hard float Linux installer, terminal emulator, rdp/vnc client, scripter, and forwarding of Linux GUI to a second device and/or Chromecast of a specific desktop or Linux window with x11... Currently stuck on the terminal but still very new to Java for Android.
or because that's a bit much to ask; perhaps some help with Android scripting for installing Linux on Android that uses Debian Kit's methods to provide hard float or soft float?
I'll be around and have modified my sig for easier tracking and will be pushing more updates to github today, hopefully by the end of the day have a sshkey passer script for quickly setting up passwordless remote login. After that will be some work on setting up bridges between USB, Bluetooth, Wifi, and any other network interface available for faster transfer of large data sets.
Edit 03192014
Michael Spencer said:
Has anyone played with adapting the Android boot process to use System V type init scripts? I'd like to make it easy for Tasker to say "we're running out of memory -- go from init level 5 to something arbitrary, say 7, which stops some services. Oops, still low, go init level 8, which disables more services.
Click to expand...
Click to collapse
Check out the Debian Kit app, from what I have found it exposes all of the Linux processes and file system to Android and if running as root user on Linux then the full Android file system is exposed too. Debian Kit doesn't use chroot to run Linux so it's "possible" to run a chroot environment at the same time. And running "ps" commands on Android or Linux terminals, produce nearly identical output, of both Linux and Android processes happily running meaning that if Tasker can't see these processes then a script can run the "ps" command and run a command to shut down Linux processes; likely it's a bit more complex because re-starting those services or even suspending some could cause un-wanted behavior. Still though with testing and time it is possible to have the memory better managed.
Update 03312014- Back on making your phone compile itself subject; I'm working on using(/scripting an installer for) OpenStack on Android, which has QEMU for emulating CPU processors which will eventually allow us to install Android SDK on Android(s) running Linux. I'm using OpenStack because to emulate a normal PC processor one even a quad core ARM processor is really slow (use to be an app for this called Limbo PC emulator but last I searched the market place this app was gone) so using OpenStack will allow us to throw what ever extra Android phones into a pool of sharable CPU power; essentially I'll be creating a 7 or 8 (virtual) core processor out of networked Android phones and then emulate a 2 or 4 core x86 processor within and install the tool kits for android that have CPU requirements.
I've other plans for OpenStack too but those will require that I incorporate mesh networking and google translate. So that users anywhere can build a cloud of shared processing power.
Sent from: SPH-D700 or myTouch3Gs or Sero 7 Pro
Linux Install guide for Android devices that I'm writing:
http://forum.xda-developers.com/showthread.php?t=2240397
Or
https://docs.google.com/document/d/1ssVeIhdBuuy8CtpBP1lWgUkG6fR6oHxP20ToYPPw6zI/edit?usp=drive_web
And my script pack for installing; Java's JDK, node.js and more to your Linux OS
https://github.com/S0AndS0/Debian-Kit-Mods
Note: if you're new to Linux/scripting/command line; check readme file for instructions.
http://www.timelesssky.com/blog/building-android-sdk-build-tools-aapt-for-debian-arm
http://www.timelesssky.com/blog/develop-app-on-android-with-android-sdk
Hey all found the ^answer^ if you've not already found this blog then you all are in for a treat dig around on that above site and you'll find some other really cool stuff for Linux Android systems.
Sent from: SPH-D700 or myTouch3Gs or Sero 7 Pro
Linux Install guide for Android devices that I'm writing:
http://forum.xda-developers.com/showthread.php?t=2240397
Or
https://docs.google.com/document/d/1ssVeIhdBuuy8CtpBP1lWgUkG6fR6oHxP20ToYPPw6zI/edit?usp=drive_web
And my script pack for installing; Java's JDK, node.js and more to your Linux OS
https://github.com/S0AndS0/Debian-Kit-Mods
Note: if you're new to Linux/scripting/command line; check readme file for instructions.

[Guide] Installing Arch Linux (updated 11/4/2013) bluetooth+KDE

I've began to write up a guide for getting Arch usable on the Nexus 7. I just threw it up on google docs because I'm too lazy to try to do the wiki thing until it's more complete. Hopefully it is far enough along to get things rolling for people who are looking to experiment with arch.
Anyway, it's a work in progress, if anyone has suggestions, correction, completions, criticisms, etc then holler.
Linkies
Changelog
========
2013-07-20
--Added instructions for installing the platform tools on an arch host pc
--Added references to wicd and network manager as alternatives to netctl
2013-10-20
--Updated instructions to reflect new *-grouper.zip naming scheme for MultiROM files
--Added instructions for updating the kernel to include kexec
--Got bluetooth 90% working. Interface comes up and can find devices with scan. Can’t get it to pair yet though.
2013-10-24
--Got the bluetooth device to power up on boot by adding a udev rule. Unfortunately the bluetooth daemon seems to be failing as it starts.
2013-10-28
--My keyboard is pairing on boot now. Ugly ugly things to get it working, but it works.
2013-11-03
--Updated the guide to get X working.
2013-11-04
--Tweaked xorg.conf files to get kde and e17 working.
--Added instructions to get Touchégg working to provide more tablety experience
Todo/Bugs
Problems/Bugs/Todo
The following is a list of things that need to be addressed or that I want to address. These things will be tackled in no particular order but hopefully over time the number bugs and problems will go down relative to the number of features I want to add.
Feel free to comment with your own ideas or bug reports.
Fix slow shutdowns after enabling networking with netctl
Fix whatever extremely verbose crash shows up on shutdown after setting up bluetooth
Get bluetooth working without hacks and under bluez5
Get a graphical login working
On screen keyboard (especially at login screen)
Set up an aur and/or googlecode project to automate some of the scripting required to get things working
Automate the process with some kind of setup tool
Replace the google doc with a wiki page in a relevant place
Make a custom spin that works more out of the box
Sound
GPS
Accelerometer
Magnetometer
Hardware buttons
Any other sensors that I forgot or am unaware of
Auto screen rotation
For the section on setting up fastboot and adb...it's safe to assume someone installing arch on the nex7 probably has arch on their pc too. For arch, you need to set up access to the AUR, with a package manager that has access to it, i.e. yaourt. Then you can get android-sdk-platform-tools. The rest of the guide looks good. I personally like wicd for my network manager as it is easier to add and remove networks when you go to new locations, and I installed e17(enlightenment desktop).
joeG78 said:
For the section on setting up fastboot and adb...it's safe to assume someone installing arch on the nex7 probably has arch on their pc too. For arch, you need to set up access to the AUR, with a package manager that has access to it, i.e. yaourt. Then you can get android-sdk-platform-tools. The rest of the guide looks good. I personally like wicd for my network manager as it is easier to add and remove networks when you go to new locations, and I installed e17(enlightenment desktop).
Click to expand...
Click to collapse
Thanks for the feedback
I don't have arch on my pc at the moment, so it's not a given, but i think you are right that people are probably more likely to have arch if they are looking at this guide. I updated the guide with info on how to install the tools from AUR. Also added links to wicd and Network Manager in the arch wiki so people are aware of some options if they don't like netctl, and mentioned that e17 works.
Xorg with alarm on nexus 7
Okay, got ALarm installed on my nexus 7 8GB.
For Xorg, I used files from "plasma active" nexus 7 distribution.
Just take them from the plasma active and put them into your /etc/X11 and X should work.
(I can't post a link, must wait 10 posts, I'll link the files later or you can PM me)
My only problem now is to put a cross-compile toolchain on my computer to be able to compile e17 with illume modules. Tried to compile on my tablet but it's too slow and I've not enough disk free to finish. If anybody can help on this point…
What distribution are you using on your PC? Also you can pm me the link for the xorg configuration and I'll post it for you
OK so I have come as far as installing multirom and I installed the archlinux rom and got this error when I tried to boot it
"kexec-hardboot support required to boot this kernel"
How do I resolve this?
thecrimsonfukr said:
OK so I have come as far as installing multirom and I installed the archlinux rom and got this error when I tried to boot it
"kexec-hardboot support required to boot this kernel"
How do I resolve this?
Click to expand...
Click to collapse
Go back and reread the multirom thread, then install a kexec-hardboot patched kernel in your internal rom.
Sent from my SGH-T679 using xda premium
joeG78 said:
Go back and reread the multirom thread, then install a kexec-hardboot patched kernel in your internal rom.
Sent from my SGH-T679 using xda premium
Click to expand...
Click to collapse
Thank you! I didnt realize it was that simple... for some reason i find the original multirom post difficult to follow.
thecrimsonfukr said:
Thank you! I didnt realize it was that simple... for some reason i find the original multirom post difficult to follow.
Click to expand...
Click to collapse
Hello
i want install arch linux on nexus 7 , but i confuse about it . is arch linux on nexus 7 fast and stable ?
can i watch hd video in arch linux withot lag ? before days i install ubuntu desktop on N7 but when i open video HD ( not full) with vlc , it somtimes play withot sound and it have lag . unity is heavy for nexus 7 , i want install arch + lxde . is it fater ?
sorry for english .
For me Arch works without any problems but when I type startx xserver freezes after the first image of xfce or e17.
Has anybody a solution?
? How to install e17 ?
joeG78 said:
For the section on setting up fastboot and adb...it's safe to assume someone installing arch on the nex7 probably has arch on their pc too. For arch, you need to set up access to the AUR, with a package manager that has access to it, i.e. yaourt. Then you can get android-sdk-platform-tools. The rest of the guide looks good. I personally like wicd for my network manager as it is easier to add and remove networks when you go to new locations, and I installed e17(enlightenment desktop).
Click to expand...
Click to collapse
e17 is the fast
so , i want to installing to my nexus 7
thanks .
Why ? my bluetooth not work?
not find the device ????
ylixir said:
I've began to write up a guide for getting Arch usable on the Nexus 7. I just threw it up on google docs because I'm too lazy to try to do the wiki thing until it's more complete. Hopefully it is far enough along to get things rolling for people who are looking to experiment with arch.
Anyway, it's a work in progress, if anyone has suggestions, correction, completions, criticisms, etc then holler.
My bluetooth not working
cannot find the device ??
Nexus 7 32GB Wifi
Click to expand...
Click to collapse
bluetooth
I have bluetooth (almost) working. I've put instructions in the guide. They aren't really a final solution, but maybe people who are running gui's can tell me if they work. I know I have the hardware working because I can see my keyboard when I scan for it, but I can't figure out how to get bluez5 to pair from the command line. Hopefully someone has better luck with a gui?
bluetooth
I've got Bluetooth working. I even have it pairing automatically on boot with a keyboard. Its an ugly solution but it works. The guide has been updated. I'll tackle X next
My Arch Install
Hey just wanted to add my install experience to the thread hopefully to help others. First of all I want say thanks for all documentation from the previous posters. I tried to follow the instructions as close as possible for a kde install, but I ran into some trouble with lightdm, so I tried kdm instead. And I can happily report it has worked swimmingly. Instructions on how to setup kdm, navigate to /usr/share/config/kdm. First edit the kdmrc to turn off the themed greeter. Then add the xvkbd to the XSetup file as in the lightdm setup. Another thing I did was utilize the plasmaboard widget on my main kde panel for my on screen keyboard once I log in. It seems to work much better than xvkbd for me. I can also confirm flash is working great.
So this really close to totally replacing my linux laptop, especially when I am on the go, in fact I am writing this post on the device in arch. However one key piece is still missing for me is sound. I can't seem to coax any sound out the device with my arch install, and amarok crashes on startup, even though both these items were working perfectly in ubuntu. If any one has any ideas how to make audio and amarok work I would be immensely grateful. Also thanks again, I am so happy to be rid of the X11 touch race condition. I have added a screenshot of me editing this post for those interested as well.
Figured out sound!
I think i found a solution to all of my troubles from my previous post. Amarok started working after a pacman update. My general audio problems seem to be caused by the linux for tegra audio drivers lack of head phone jack detection, I found a workaround the ubuntu nexus 7 launchpad bug tracker: https://bugs.launchpad.net/ubuntu-nexus7/+bug/1068804/comments/24. For the tldr crowd basically you have to use alsamixer manually mute and unmute the int_spkr channel for speaker audio and the int_mic channel to enable headphones. Then you can use the output and and hp to channels adjust volume for speaker and headphones respectively. It also might help to do a suspend resume cycle i sound still isn't working. Thanks to everyone else, hopefully others will find this useful as well.
Many thanks for your work!!! I'm using it on a nexus 7 with glass and touch broken (unuseless) but now it lives!!! and is a very responsive lxde desktop with xrdp starting on boot which I use with amule or bittorrent all night long...
two questions:
1) for me it does not work shutdown -r now or reboot... it close immediately all network connections but I have to keep power button 10 sec to restart system...
2) using it with an hub usb I'm trying to connect a big hard disk: pcmanfm (lxde file manager) refuse to mount it saying than it is not authorized... (I've followed archlinux wiki: it work on my archlinux desktop but not in nexus 7).

chroot success: ? about Freedreno drivers

Hey everyone. Hope this is 'dev' enough.
I haven't seen anything anywhere about AT&T note3 chroots, other than AT&T N3 can not because of lack of boot loop. Anyway, I thought i'd mention that it works quite well with partition & Xsdl. I made a small post for the interested in the general forum.
To my question: has anyone tried the freedreno drivers? ~Github link~
I haven't been able to build it properly, it's missing some .o's. I have gcc working on my chroot.
I'm also having problems with pulse/alsa/gstreamer, I think it's a permission problem. The android audio user shows as aid_audio, but the dir /dev/socket/ shows as usr:Media/grp:audio and the socket is system/system. They're recognized as users in the chroot, but they're still unable to find get access to it. I couldn't get an alsa recording app on from playstore to connect to it either.
I'm kinda wondering if something funky with permissions after towelroot. I couldn't get su,chroot, etc to work properly until I got the system to recognize su as 'root' instead of uid:0. Once I got that everything for su started working? So, lost and confused. Ideas on what i'm doing wrong?
thanks!
I was able to build a kernel with DRM and KGSL DRM interface enabled, boot CM11 with it, open SSH in my Debian chroot, kill Android, and then attempt to run Xorg with the freedreno driver but I ended up getting a memory mapping error and a segfault.
The Note 3's panel is a command-mode DSI panel which means it will not automatically display what is written to /dev/graphics/fb0 like you would expect. Instead, you must call an ioctl (FBIOPAN_DISPLAY) to force a refresh of the display. The panel must be on for this to work. I'm not sure the exact sequence required to turn on the display but it involves opening /dev/graphics/fb0 and possibly mmap'ing it. If you use the fbdev Xorg driver it will turn on the panel, but you must then run a program to continuously send the FBIOPAN_DISPLAY ioctl to refresh it. This is non-accelerated and also seems to crash any GTK apps (only X11 basic apps like xterm worked, and even then the refreshing was glitchy).
I'm trying to tackle kexec-hardboot first because that will allow booting an entirely-Debian-focused kernel with the correct color mode and the DRM drivers and all. It will likely require some patches to the KGSL GPU code in the kernel, at least it did on my Note 1. Get on #freedreno on Freenode if you aren't already there, lots of knowledgeable people there to analyze logs and find patches. I got it working on my HP TouchPad and Note i717 with help from there.
Very nice, thanks!
I've only gotten fb to work on my nexus5.
Also thanks for the heads up on the freenode. Going to check it out.
Have you messed with sound at all?
Edit:
Wait, did you do this on a 900A? (I'm probably way behind times?)
N900T, so bootloader-unlocked. It will be doubly hard to do on the N900A since you'll have to compile as modules rather than just compile your own kernel, at least unless you guys get kexec (non-hardboot) working on the locked variants. You should be able to mess around with the framebuffer on the stock kernel just fine though, only the freedreno driver needs custom kernel changes.
I haven't messed around with sound at all. On my HP TouchPad I figured out how to use ALSA UCM files which set up the mixer controls. By default Android locks the sound devices so using them from a chroot while Android is running probably won't happen, but with Android out of the way you may be able to use them. I do know on the Note 1 and the HP TouchPad you have to load q6.xxx firmware files for the audio system to initialize during boot.
This file will be of interest when writing ALSA UCM files:
https://github.com/CyanogenMod/android_device_samsung_hlte-common/blob/cm-11.0/audio/mixer_paths.xml
I used the TouchPad's mixer_paths.xml file to write two UCM "verbs" - one to turn on internal speakers and one to turn on headphones. The UCM file basically sets the given switches to the given values and is basically just a reformatting of mixer_paths.xml. I was unable to find a mixer_paths.xml for the Note 1 and thus haven't messed with sound on it yet (it has to exist somewhere...).
CalcProgrammer1 said:
N900T, so bootloader-unlocked. It will be doubly hard to do on the N900A since you'll have to compile as modules rather than just compile your own kernel, at least unless you guys get kexec (non-hardboot) working on the locked variants. You should be able to mess around with the framebuffer on the stock kernel just fine though, only the freedreno driver needs custom kernel changes.
I haven't messed around with sound at all. On my HP TouchPad I figured out how to use ALSA UCM files which set up the mixer controls. By default Android locks the sound devices so using them from a chroot while Android is running probably won't happen, but with Android out of the way you may be able to use them. I do know on the Note 1 and the HP TouchPad you have to load q6.xxx firmware files for the audio system to initialize during boot.
This file will be of interest when writing ALSA UCM files:
https://github.com/CyanogenMod/android_device_samsung_hlte-common/blob/cm-11.0/audio/mixer_paths.xml
I used the TouchPad's mixer_paths.xml file to write two UCM "verbs" - one to turn on internal speakers and one to turn on headphones. The UCM file basically sets the given switches to the given values and is basically just a reformatting of mixer_paths.xml. I was unable to find a mixer_paths.xml for the Note 1 and thus haven't messed with sound on it yet (it has to exist somewhere...).
Click to expand...
Click to collapse
Great thanks! That explains a few things with the boot lock. FB has been a total no go for me. I read something about the type of display not working with it? I have no idea if that's true, and can't seem to find that information right now. (it worked great on the my note2). If someone has gotten success let me know! I'll check out the UCM once more. I did get ALSA working with debian on the note 1, so that's the first thing I tried. My Touchpad, I thought, worked right out of the box. (I miss that thing!)
I'll give it shot tonight and see what I get. thanks a lot to both of you.
The Note 3's panel is a command mode panel while the Note 1's panel is video mode. I'm not sure about the Note 2 as I don't have one but if it worked for you it was likely video mode as well. In video mode it works like you'd expect any display to work - the framebuffer memory is automatically drawn to the screen at a fixed refresh rate (60Hz). A command mode panel is different, the framebuffer is only drawn to the display when it is commanded to, and thus the software has control over the refresh rate of the display. I did a test where I found the section of code in the Note 3's kernel where it does the software refresh and stuck a printk in there. I had the kmsg printing out over SSH while I swiped the screen around in Android. Sure enough, the printout only happened when I moved my finger and caused the framebuffer to update, the screen completely stopped refreshing otherwise.
I'm still trying to find a good solution to this, especially in regards to running kexec-hardboot and the kexecboot bootloader GUI. I've been able to get kexecboot to display by sticking an FBIOPAN_DISPLAY ioctl into the framebuffer sync function that kexecboot calls after it updates the screen. This ioctl seems to force the display to refresh, but only if certain conditions are met (and I'm unsure what all these conditions are). I do know that the LCD (actually AMOLED but it's listed as LCD panel in the code) must be powered on, the framebuffer must be open (i.e. call the open() function to /dev/graphics/fb0 and get a file descriptor), and possibly memory-mapped as well (the code I was using as a software refresher had mmap, though it might not be necessary). This is another thing to go to #freedreno for, a user there (crondog) has been working on Freedreno on the 2013 Nexus 7 which also has a command mode panel and he's done some software refresher work.

Question Termux: Linux with graphics working

Hello,
I want to use Linux on my Galaxy Tab S8+ through Termux and proot distro (Arch, actually).
However, no matter what I do, there's no way to make GPU work on it...
Using the last Termux from github + Termux-X11, I managed to launch xfce4 desktop on my Arch proot, but when I try glxgears, I get:
Error: couldn't get an RGB, Double-buffered visual
Click to expand...
Click to collapse
glxinfo:
Error: couldn't find RGB GLX visual or fbconfig
Click to expand...
Click to collapse
Blender:
intern/ghost/intern/GHOST_WindowX11.cpp:136: X11 glXQueryVersion() failed, verify working openGL system! initial window could not find the GLX extension Writing: /tmp/blender.crash.txt Segmentation fault
Click to expand...
Click to collapse
I do have compiled mesa on Arch with freedreno-KGSL enabled and zink.
My final goal is to make Blender work with GPU while using proot (no chroot because I don't want to root it yet and loose warranty).
Unfortunately, due to this issue: https://gist.github.com/agnostic-ap...#how-to-disable-the-phantom-processes-killing , you're going to need to root if you want to run Linux desktop apps on ANY Android 12 device.
Once you root your Tab S8, install Linux Deploy (https://play.google.com/store/apps/details?id=ru.meefik.linuxdeploy), run it and install whichever distro you like (I chose Kali), and Remote Desktop Manager (https://play.google.com/store/apps/details?id=com.devolutions.remotedesktopmanager) to connect to it via VNC
The only settings I had to change in Linux Deploy was changing the installation type to Directory and the installation path to
Code:
${ENV_DIR}/rootfs/linux
, but your mileage may vary depending on what distro you want to install. If you want to use your Android filesystem from Linux, enable mounts and mount /data/media/0 to /mnt/android.
I haven't messed with PulseAudio, because I really just wanted full LibreOffice. Let me know if you get it to work. You may also want to go into GUI settings in Linux deploy and change the resolution to 1920x1200, but again it depends on your distro chosen.
But keep in mind, rooting will 1. Brick your KNOX chip permanent 2. Without KNOX chip, apps like secret folder, samsung pass and few more will stop working. 3. To root you need to unlock the bootloader which triggers the knox chip and permanently disables it and it cannot be recovered or enabled again since knox chip has a tiny fuse inside itself so when bootloader is unlocked it will burn the thin copper thread inside fuse and snap off that will permanently disable knox and this would also void your warranty when knox chip gets triggered and disabled.
So take time think about it before doing it. Do you want warranty or not? Do you want to lose those apps that you may want to use later or already using?
Thanks for your answers.
I know that root and bootloader will break the waranty and is not recoverable. It's why I'm trying to make it work using proot.
skrowl said:
Once you root your Tab S8, install Linux Deploy (https://play.google.com/store/apps/details?id=ru.meefik.linuxdeploy), run it and install whichever distro you like (I chose Kali), and Remote Desktop Manager (https://play.google.com/store/apps/details?id=com.devolutions.remotedesktopmanager) to connect to it via VNC
Click to expand...
Click to collapse
I use termux-x11 or termux-wayland rather than VNC because it's more fast and smooth.
The GPU seem to work from termux itself (tried glxgears on openbox). However, it doesn't work from proot-distro.
After some research, I found that I could use the GPU by compiling virglrenderer with egl enabled, and then, export GALLIUM_DRIVER=virpipe from proot-distro.
However, to compile virglrenderer, I need to compile mesa from source with gbm enabled, but the compilation give me errors :
../src/vulkan/wsi/wsi_common_display.c:1238:4: error: implicit declaration of function 'pthread_setcanceltype' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); ^
../src/vulkan/wsi/wsi_common_display.c:1238:4: note: did you mean 'pthread_setname_np'? /data/data/com.termux/files/usr/include/pthread.h:352:5: note: 'pthread_setname_np' declared here int pthread_setname_np(pthread_t __pthread, const char* __name); ^
../src/vulkan/wsi/wsi_common_display.c:1238:26: error: use of undeclared identifier 'PTHREAD_CANCEL_ASYNCHRONOUS' pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); ^
../src/vulkan/wsi/wsi_common_display.c:1268:7: error: implicit declaration of function 'pthread_cancel' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pthread_cancel(wsi->wait_thread); ^
../src/vulkan/wsi/wsi_common_display.c:1268:7: note: did you mean 'pthread_once'? /data/data/com.termux/files/usr/include/pthread.h:275:5: note: 'pthread_once' declared here int pthread_once(pthread_once_t* __once, void (*__init_routine)(void)); ^
../src/vulkan/wsi/wsi_common_display.c:2183:10: error: implicit declaration of function 'pthread_cancel' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pthread_cancel(wsi->hotplug_thread);
Click to expand...
Click to collapse
I found out that pthread_cancel is not supported in the android libc.
Now, I don't know what to do...
Here's the Termux discussion about it here: https://github.com/termux/termux-app/issues/2366
Trust me that I spent a lot of time looking into it and there are no workarounds. You MUST root to use Linux in Android 12, period. Termux is no longer viable for background processes (like an X server), but you can still use it to do stuff interactively (working directly in your shell with Termux never losing focus). Your background processes will eventually get murdered by the OS and your X session will just suddenly go poof. It's sad too, because I really liked Termux.
skrowl said:
Here's the Termux discussion about it here: https://github.com/termux/termux-app/issues/2366
Trust me that I spent a lot of time looking into it and there are no workarounds. You MUST root to use Linux in Android 12, period. Termux is no longer viable for background processes (like an X server), but you can still use it to do stuff interactively (working directly in your shell with Termux never losing focus). Your background processes will eventually get murdered by the OS and your X session will just suddenly go poof. It's sad too, because I really liked Termux.
Click to expand...
Click to collapse
Just tried, and yeah, you right...
I though "acquire wakelock" would fix that, but I never used Linux though X11 more than 5 seconds...
Why do the OS ever do that?
You should just probably wait until you've had your tab s8 long enough that you're satisfied it won't need to be returned and are willing to void the warranty by rooting it. Come back to playing around with linux then. Until then, just install linux in a VM on one of your computers and VNC into it with your tablet.
skrowl said:
You should just probably wait until you've had your tab s8 long enough that you're satisfied it won't need to be returned and are willing to void the warranty by rooting it. Come back to playing around with linux then. Until then, just install linux in a VM on one of your computers and VNC into it with your tablet.
Click to expand...
Click to collapse
Wait... Even with root, termux-x11 will still not work, won't it? It's a problem from android 12 itself.
I don't want to use VNC since it's too slow.
shim80 said:
Wait... Even with root, termux-x11 will still not work, won't it? It's a problem from android 12 itself.
I don't want to use VNC since it's too slow.
Click to expand...
Click to collapse
Check https://gist.github.com/agnostic-ap...#how-to-disable-the-phantom-processes-killing , they talk about commands you can run (as root) to disable the phantom process killing, which would allow termux to run. That said, termux's proot is MUCH MUCH slower than real chroot.
On localhost, you're very unlikely to be able to tell a difference between old school x11 and vnc. Wayland improves it somewhat, but it's probably still a very negligible difference on a local machine.
skrowl said:
Check https://gist.github.com/agnostic-ap...#how-to-disable-the-phantom-processes-killing , they talk about commands you can run (as root) to disable the phantom process killing, which would allow termux to run. That said, termux's proot is MUCH MUCH slower than real chroot.
On localhost, you're very unlikely to be able to tell a difference between old school x11 and vnc. Wayland improves it somewhat, but it's probably still a very negligible difference on a local machine.
Click to expand...
Click to collapse
You can execute this via adb btw
Can anyone explain to us, newbies in Linux , who can't understand what is the difference between x11, Wayland, vnc. If we root the tablet, will Linux work fast, or it will work somehow like we run it in an emulator?
What is the best/fastest approach. If we do the fastest method, how slower will it work compared with, if it could work Linux internal as default os. Just an estimation. Because I'm thinking if I'll root it to install Linux.
Thanks,
Checkout my gameplay with termux :
Guan Yu said:
Checkout my gameplay with termux :
Click to expand...
Click to collapse
What device are you using?
shim80 said:
What device are you using?
Click to expand...
Click to collapse
Redmi Note 11
sosimple said:
Can anyone explain to us, newbies in Linux , who can't understand what is the difference between x11, Wayland, vnc. If we root the tablet, will Linux work fast, or it will work somehow like we run it in an emulator?
What is the best/fastest approach. If we do the fastest method, how slower will it work compared with, if it could work Linux internal as default os. Just an estimation. Because I'm thinking if I'll root it to install Linux.
Thanks,
Click to expand...
Click to collapse
If you are entirely new to Linux, you probably should not be doing this yet. If you need a comparison as to why I'm stating this, here is one that is probably not as good: it is similar to trying to do a professional figure skating move that they do in the Olympics while you are still learning how to just balance without falling.
In other words, learn more about Linux and also get used to using Linux on a normal desktop / laptop computer before trying to do such stuff on your mobile device.
CtrlAltCuteness said:
If you are entirely new to Linux, you probably should not be doing this yet. If you need a comparison as to why I'm stating this, here is one that is probably not as good: it is similar to trying to do a professional figure skating move that they do in the Olympics while you are still learning how to just balance without falling.
In other words, learn more about Linux and also get used to using Linux on a normal desktop / laptop computer before trying to do such stuff on your mobile device.
Click to expand...
Click to collapse
Thanks for the reply, but it actually isn't a reply as it doesn't explaining what i ask. What are the differences of all those. I have linux in my pc, although i don't use it much as i can use windows there. If Linux in tab s8 ultra is working very good, i might use it here as i can't use windows.
skrowl said:
... I really just wanted full LibreOffice.
Click to expand...
Click to collapse
Why not just use the LibreOffice release for Android?
Renate said:
Why not just use the LibreOffice release for Android?
Click to expand...
Click to collapse
There isn't. You probably mean colabora office. It's not very good..
LibreOffice for Android and iOS | LibreOffice - Free Office Suite - Based on OpenOffice - Compatible with Microsoft
www.libreoffice.org
sosimple said:
There isn't. You probably mean colabora office. It's not very good..
Click to expand...
Click to collapse
Yeah, I was misled by the Wikipedia article. I did see that the Colabora stuff.
I don't use portable devices for anything productive.
At the most I'll use them with a BT keyboard to capture raw typing that will later get corrected/converted/used on a desktop.
shim80 said:
Hello,
I want to use Linux on my Galaxy Tab S8+ through Termux and proot distro (Arch, actually).
(...)
Click to expand...
Click to collapse
If you are still interested in Linux (for example, Ubuntu) on a smartphone, then take a look at the thread full of inspiration.
[GUIDE][NO-ROOT] How to install Ubuntu and other Linux Distros on Your Phone or Android TV Box, using Termux
NOTICE: THIS METHOD IS ONLY FOR NON ROOTED DEVICES PROOT-DISTRO GITHUB PAGE Hello Friends! Today I wanted to start a thread that will house prebuilt Linux environments, as well as instructions for building the Linux environments yourself...
forum.xda-developers.com

Categories

Resources