[Guide] Running Linux on Android with 3D Acceleration / OpenGL (Root Required) - Android General

All credits go to:
Hentacler for making Sparkle
Meefik for making Linux Deploy
Now on to the tutorial!
Requirements:
Sparkle
Linux Deploy
Termux
Now you have all those apps installed lets continue
Open Termux then enter:
Code:
su
Once in root mode enter:
Code:
setenforce 0
Then exit:
Code:
exit
Open Linux Deploy and configure it to your likings
My configuration:
Code:
Distribution: Debian
Architecture: arm64
Distribution Suite: ubstable
-
Installation type: File
-
Image size: 32GB
Then set your username and password, for this tutorial I set my username to:
Code:
android
And im not gonna tell you my password
After you've set up your configuration scroll down and configure init, mounts and ssh
INIT:
Code:
Enable: On
Init system: run-parts
Init settings:
- Init path: /etc/rc.local
- Init user: android
- Async: Disabled
MOUNTS:
Code:
Enable: On
Mount points:
- /data/data/com.sion.sparkle/files - /sparkle
SSH:
Code:
Enable: On
SSH settings:
- Port: 22
- SSH options:
Now you've set this all up go back to the main overview screen of Linux Deploy, hit the tripple dot menu and install!
After the install is done, hit START
Now open Termux and install SSH:
Code:
pkg install openssh
then connect to linux via SSH: (username is the username set in Linux Deploy)
Code:
ssh [email protected]
Now you've connected you need to install some packages:
Code:
sudo apt install weston
sudo apt install xwayland
sudo apt install nano
sudo apt install dbus-x11
Also install your desktop environment of choice, for this tutorial im going with KDE:
Code:
sudo apt install kde-full
Once everything is done installing you need to configure some scripts:
Code:
nano sparkle.sh
Now paste this: (make sure to change "startplasma-x11" to your preferred DE, if you're also using KDE then you don't need to change anything)
Code:
#!/bin/bash
set -e
sudo chmod 777 /sparkle
sudo chmod 777 /sparkle/wayland-0
XDG_RUNTIME_DIR=/sparkle Xwayland &
sleep 1
export DISPLAY=:0
startplasma-x11
Now open Sparkle and click "edit user.sh" and delete everything then hit "save", Go back to the main screen of Sparkle and hit "Start", you should see a notification appear in your status bar
Now to start everything go back to Termux and assuming you're still SSH'ed into Linux type:
Code:
sh sparkle.sh
and enjoy!
Bonus step:
If you want everything to automatically start when pressing "START" in Linux Deploy than you can configure this
Open Termux and connect to Linux via SSH and change the permissions/edit the rc.local file: (edit username to the username set in Linux Deploy)
Code:
sudo chmod +x /etc/rc.local
sudo chmod +x /home/username/sparkle.sh
sudo nano /etc/rc.local
In nano paste: (once again change username to the username in Linux Deploy
Code:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
/home/username/sparkle.sh
exit 0
Now every time you want to use Linux just open Sparkle, hit "Start", then go to Linux Deploy and start linux and your DE will automatically load up on your screen without entering a single command!

Unfortunately, this method doesn't give hardware 3d acceleration. Just very slow software emulation. It is much harder or even not possible to achieve true acceleration on android handhelds.

Hi
What version of Sparkle did you use? I've tried this tutorial here but received an error of wayland-0 not found when I try to run my linux installation on my device
I've looked in the folder /data/data/com.sion.sparkle/files and this folder is empty
Thanks for the tutorial!

Got any images or a video you can share?

It works
I managed to use it, but with xfce KDE had a black screen, and I couldn't use the audio even though I made the alsa plugin, and it doesn't rotate the screen, but it's very good.

I have One Plus 8 pro.
So my results with this software 3D acceleration are that the performance really suck but its amazing for now because you need this basic aceleration in almost everything i can now render videos on my phone in kdenlive and the phone has kinda good cpu performace so there is no problem basicly i can now run in this chroot everything that can be runned on raspi and i am also messing around with BOX86 which is a hardware translation of arm to x86 architectures so far i can run x86 apps for linux inside the chroot and now with this little tool i can maybe get wine x86 runnig which means windows apps support on android yeeey of course with this low performace of a gpu i could at best try games before year 2000 and maybe if they start up have some good fps but i highly doubt that because raspi has problem runnig (in twister os) even unreal tournament and raspi has 5 to 6 times higher performance than this software accel.
Benchmarks i did were glxgears i got anywere from 200 to 270 fps which is not really much
Also I used 2 desktop config started the one thats build in vnc from the app and then started sparkle connected to it and had second desktop start up using lxde on my phone on phone the screen really sucks to to work with so i used scrcpy to mirror the screen of phone to pc so basicaly a have full control remotly i hope that this will have future version development to improve on code so that we could get more performace out of this.
Image below.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}

I am using LXDE with Sparkle. I would like a lower screen resolution, all things look so small. I can do that with XSDL, how in Sparkle?

@HolyChickenGuy
Thanks for the well done tutorial ! I followed it and it worked out of the box.
However, two issues I came accross to which I did not find the solution, yet:
1. Is there a way to rotate the screen ?
2. How can I bring the X-window to the second screen connected via USB->HDMI adapter ? I tried to set DISPLAY:1 but 1 was not found and :0 is the devices screen.
Cheers mate and keep up the good work.

You can Also use Termux Desktop
Termux desktop is much faster and easier to use and you can experience a complete Linux GUI with termux, and it Is also lightwight.

saad maqsood said:
Termux desktop is much faster and easier to use and you can experience a complete Linux GUI with termux, and it Is also lightwight.
Click to expand...
Click to collapse
The described way basically is using Termux the way you propose. However it adds the 3D acceleration by using sparkle which is definitely a plus.
---------- Post added at 09:49 PM ---------- Previous post was at 09:47 PM ----------
flunkyball said:
@HolyChickenGuy
Thanks for the well done tutorial ! I followed it and it worked out of the box.
However, two issues I came accross to which I did not find the solution, yet:
1. Is there a way to rotate the screen ?
2. How can I bring the X-window to the second screen connected via USB->HDMI adapter ? I tried to set DISPLAY:1 but 1 was not found and :0 is the devices screen.
Cheers mate and keep up the good work.
Click to expand...
Click to collapse
Okay, rotating the screen is done by rotating Termux BEFORE you start the windowmanager.
But - for bringing it up on the external monitor I haven't not found the trick, yet

lower resolution in Sparkle app? relative mouse is possible?

but what if i want to install LXQt on my device
#!/bin/bash
set -e
sudo chmod 777 /sparkle
sudo chmod 777 /sparkle/wayland-0
XDG_RUNTIME_DIR=/sparkle Xwayland &
sleep 1
export DISPLAY=:0
startplasma-x11
what should i change in the script??????

sorry for the probably dumb question but Xsdl seems to work work quite well in my use cases (like watching youtube videos in 360p on my Samsung Tab S5e) ...
... so I am wondering : what are the advantages of Sparkle/Wayland over Xsdl ?? ... will my youtube videos be smoother ??
... does Sparkle/Wayland has better touch support than Xsdl ?? ... for example can you scroll a web browser window by touching inside the window (not the scrollbar) with your finger ??

pierro78 said:
sorry for the probably dumb question but Xsdl seems to work work quite well in my use cases (like watching youtube videos in 360p on my Samsung Tab S5e) ...
... so I am wondering : what are the advantages of Sparkle/Wayland over Xsdl ?? ... will my youtube videos be smoother ??
... does Sparkle/Wayland has better touch support than Xsdl ?? ... for example can you scroll a web browser window by touching inside the window (not the scrollbar) with your finger ??
Click to expand...
Click to collapse
you sure can get 1080 on a tab s5e with xsdl...
sparkle app is for sure more lightweight but in some situatons xsdl is better, at least with some games, at least with my experience
did you compile and use the android-shmem library?

zanfix said:
you sure can get 1080 on a tab s5e with xsdl...
sparkle app is for sure more lightweight but in some situatons xsdl is better, at least with some games, at least with my experience
did you compile and use the android-shmem library?
Click to expand...
Click to collapse
wow 1080 ! that would be awesome ! thanks for the info !!
actually 360p is not so smooth on my S5e without android-shmem library ...
if I understand correctly I just have to compile that in my chroot and then the shared memory feature is already supported in the Xserver xsdl that I installed from the playstore ??
thanks again !!

pierro78 said:
wow 1080 ! that would be awesome ! thanks for the info !!
actually 360p is not so smooth on my S5e without android-shmem library ...
if I understand correctly I just have to compile that in my chroot and then the shared memory feature is already supported in the Xserver xsdl that I installed from the playstore ??
thanks again !!
Click to expand...
Click to collapse
android-shmem library can give you a performance boost if the application you are running can use the x server MIT-SHM extension
For video playback in a web browser, firefox-esr for example, the android-shm library will not give you any performance gain...
Since there is no hardware acceleration in xsdl, In order to put the minimum possible load on the cpu you should match the screen resolution of the xserver with the target max resolution of the videos you are planning to playback.
My tab s6 has 2560x1600 native resolution, i run the xserver at 1920x1200 so I keep the aspect ratio of the screen but match the clip (tube video) native resolution (so that no rescaling will happen)
I can get acceptable youtube video playback also on my old pixelc c, that has a quadcore a57

well I don't know what I did wrong previously ... my youtube videos seem to play nice on 1080 in Xserver xsdl with arm64 vivaldi in my chroot (Tab S5e) with or without
env LD_PRELOAD="/home/pierro78/android-shmem/libandroid-shmem-aarch64.so" icewm&
now !
and I don't see any difference with or without LD_PRELOAD="/home/pierro78/android-shmem/libandroid-shmem-aarch64.so" in vivaldi although it may support x server MIT-SHM extension as you said ??
also I have errors when using /home/pierro78/android-shmem/libandroid-shmem-aarch64.so when I start icewm (same errors if regular user or root) :
[email protected]:/home/pierro78# icewm&
[1] 8527
[email protected]:/home/pierro78# Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
shmget: key 0 size 4096 flags 01600 (flags are ignored)
shmget: bound UNIX socket /dev/shm/00002157
listening_thread: thread started
shmget: ID 0 shmid 21570001 FD 7 size 4096
shmat: shmid 21570001 shmaddr (nil) shmflg 0
shmat: mapped addr 0x735094b000 for FD 7 ID 0
shm_remove: deleting shmid 21570001
shm_remove: shmid 21570001 is still mapped to addr 0x735094b000, it will be deleted on shmdt() call
shmdt: unmapped addr 0x735094b000 for FD 7 ID 0 shmid 21570001
shmdt: deleting shmid 21570001
and when I start vivaldi as regular user :
shmctl: cmd 3 not implemented yet!
shmget: key 0 size 2946039 flags 01606 (flags are ignored)
shmget: cannot bind UNIX socket, bailing out
[7437:7437:0426/232122.758794:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: The message port closed before a response was received.", source: chrome-extension://mpognobbkildjkofajifpdfhcoklimli/browser.html (0)
shmget: key 0 size 112140 flags 01606 (flags are ignored)
shmget: cannot bind UNIX socket, bailing out
shmget: key 0 size 368460 flags 01606 (flags are ignored)
shmget: cannot bind UNIX socket, bailing out
or if I start vivaldi as root user :
shmctl: cmd 3 not implemented yet!
shmget: key 0 size 2831220 flags 01606 (flags are ignored)
shmget: bound UNIX socket /dev/shm/00001f6e
shmget: ID 0 shmid 1f6e0001 FD 36 size 2834432
shmat: shmid 1f6e0001 shmaddr (nil) shmflg 0
shmat: mapped addr 0x71b6582000 for FD 36 ID 0
shm_remove: deleting shmid 1f6e0001
shm_remove: shmid 1f6e0001 is still mapped to addr 0x71b6582000, it will be deleted on shmdt() call
shmdt: unmapped addr 0x71b6582000 for FD 36 ID 0 shmid 1f6e0001
shmdt: deleting shmid 1f6e0001
listening_thread: thread started
[7990:7990:0426/232440.532571:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: The message port closed before a response was received.", source: chrome-extension://mpognobbkildjkofajifpdfhcoklimli/browser.html (0)
I am not sure how to check if my libandroid-shmem-aarch64.so is working ??
I would expect some "files" in /dev/shm but there is nothing there ...

pierro78 said:
[email protected]:/home/pierro78# icewm&
[1] 8527
[email protected]:/home/pierro78# Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
shmget: key 0 size 4096 flags 01600 (flags are ignored)
shmget: bound UNIX socket /dev/shm/00002157
listening_thread: thread started
shmget: ID 0 shmid 21570001 FD 7 size 4096
shmat: shmid 21570001 shmaddr (nil) shmflg 0
shmat: mapped addr 0x735094b000 for FD 7 ID 0
shm_remove: deleting shmid 21570001
shm_remove: shmid 21570001 is still mapped to addr 0x735094b000, it will be deleted on shmdt() call
shmdt: unmapped addr 0x735094b000 for FD 7 ID 0 shmid 21570001
shmdt: deleting shmid 21570001
Click to expand...
Click to collapse
PS : my bad : these error messages are coming from my xfce4-terminal, not icewm ...

pierro78 said:
well I don't know what I did wrong previously ... my youtube videos seem to play nice on 1080 in Xserver xsdl with arm64 vivaldi in my chroot (Tab S5e) with or without
env LD_PRELOAD="/home/pierro78/android-shmem/libandroid-shmem-aarch64.so" icewm&
now !
and I don't see any difference with or without LD_PRELOAD="/home/pierro78/android-shmem/libandroid-shmem-aarch64.so" in vivaldi although it may support x server MIT-SHM extension as you said ??
also I have errors when using /home/pierro78/android-shmem/libandroid-shmem-aarch64.so when I start icewm (same errors if regular user or root) :
[email protected]:/home/pierro78# icewm&
[1] 8527
[email protected]:/home/pierro78# Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
shmget: key 0 size 4096 flags 01600 (flags are ignored)
shmget: bound UNIX socket /dev/shm/00002157
listening_thread: thread started
shmget: ID 0 shmid 21570001 FD 7 size 4096
shmat: shmid 21570001 shmaddr (nil) shmflg 0
shmat: mapped addr 0x735094b000 for FD 7 ID 0
shm_remove: deleting shmid 21570001
shm_remove: shmid 21570001 is still mapped to addr 0x735094b000, it will be deleted on shmdt() call
shmdt: unmapped addr 0x735094b000 for FD 7 ID 0 shmid 21570001
shmdt: deleting shmid 21570001
and when I start vivaldi as regular user :
shmctl: cmd 3 not implemented yet!
shmget: key 0 size 2946039 flags 01606 (flags are ignored)
shmget: cannot bind UNIX socket, bailing out
[7437:7437:0426/232122.758794:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: The message port closed before a response was received.", source: chrome-extension://mpognobbkildjkofajifpdfhcoklimli/browser.html (0)
shmget: key 0 size 112140 flags 01606 (flags are ignored)
shmget: cannot bind UNIX socket, bailing out
shmget: key 0 size 368460 flags 01606 (flags are ignored)
shmget: cannot bind UNIX socket, bailing out
or if I start vivaldi as root user :
shmctl: cmd 3 not implemented yet!
shmget: key 0 size 2831220 flags 01606 (flags are ignored)
shmget: bound UNIX socket /dev/shm/00001f6e
shmget: ID 0 shmid 1f6e0001 FD 36 size 2834432
shmat: shmid 1f6e0001 shmaddr (nil) shmflg 0
shmat: mapped addr 0x71b6582000 for FD 36 ID 0
shm_remove: deleting shmid 1f6e0001
shm_remove: shmid 1f6e0001 is still mapped to addr 0x71b6582000, it will be deleted on shmdt() call
shmdt: unmapped addr 0x71b6582000 for FD 36 ID 0 shmid 1f6e0001
shmdt: deleting shmid 1f6e0001
listening_thread: thread started
[7990:7990:0426/232440.532571:ERROR:CONSOLE(0)] "Unchecked runtime.lastError: The message port closed before a response was received.", source: chrome-extension://mpognobbkildjkofajifpdfhcoklimli/browser.html (0)
I am not sure how to check if my libandroid-shmem-aarch64.so is working ??
I would expect some "files" in /dev/shm but there is nothing there ...
Click to expand...
Click to collapse
looks fine when run as root...
is /dev/shm mounted as tmpfs?
/dev/shm should then have 1777 permissions

zanfix said:
looks fine when run as root...
is /dev/shm mounted as tmpfs?
/dev/shm should then have 1777 permissions
Click to expand...
Click to collapse
It looks like I am good :
[email protected]:/dev$ mount
/dev/block/mmcblk0p57 on / type ext4 (rw,noatime,seclabel,discard,journal_checksum,noauto_da_alloc,resgid=1065,errors=panic,i_version,data=ordered)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sys on /sys type sysfs (rw,relatime,seclabel)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,seclabel,size=2871960k,nr_inodes=717990,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,relatime,seclabel)
devpts on /dev/pts type devpts (rw,relatime,seclabel,mode=600,ptmxmode=000)
[email protected]:/dev$ ls -ld shm
drwxrwxrwt. 2 root root 40 Apr 26 23:59 shm
[email protected]:/dev$

Related

UID and GIDs

I cant find any defined list. I put busybox on the G1 and made a symlink for bb's chown. It wouldnt recognize "chown root:root somefile", so I had to put in the UID and GID numbers instead.
Both the UID and the GID correspond to the same name. Ex: UID 0 is root. GID 0 is the group root.
Here is a list of the ones I have done so far. I havent found anything higher than 1014 other than the ones in the 10000+.
Code:
0 - root
1000 - system
1001 - radio
1002 - bluetooth
1003 - graphics
1004 - input
1005 - audio
1006 - camera
1007 - log
1008 - compass
1009 - mount
1010 - wifi
1011 - adb
1012 - install
1013 - media
1014 - dhcp
10000 - app_0
10001 - app_1
10002 - app_2
10003 - app_3
10004 - app_4
and so on...
Another thing -- it looks like app_<some #> corresponds to one of the added applications (such as an app you downloaded from the market place).
It does look like each app is sandboxed.
I just discovered a file that lists exactly what Android permission is linked to what uid/gid: /system/etc/permissions.xml

[APP][2.2+] DigiControl/DigiSSHD 0.2 - SSH server with per session control

DigiControl - Lightweight Android agile helper for console applications. It is based on C++ Boost, Scala, AspectJ.
DigiSSHD component for DigiControl, based on Dropbear SSH Server and OpenSSH SFTP Server.
This is alpha stage software
Software
DigiSSHD is a DigiControl component that provide:
Security Shell - remote shell service or command execution
Security Copy - transfer files between android and remote client
Security FTP - transfer files between android and remote client
BTW look for SFTP vs. SCP
It is based on open source software:
Dropbear server (Shell and SCP) available under MIT license
OpenSSH server (SFTP) available under BSD license
DigiControl is agile helper for console applications such as a network services, local utilites and so on. DigiControl have a lot of things under the hood that allow to start/stop/restart Digi components, interact with sessions and permissions and much more. It is mediator between installed components, plugins, android device and you.
It is alpha stage software writen in Scala language. Scala on Android is a bit out of mainstream, so take it easy. Bridge piece is on C++ BOOST.
Large part of the DigiControl source code available at GitHub as DigiLib library under Apache 2.0 license.
Core part of the DigiSSHD source code available at GitHub under GPLv3 license, another one available as DigiLib library under Apache 2.0 license.
FYI There are a lot of threads and hundreds of places with watchdog timer and thousands of places with recovery logic. Also user interface and background service are independent processes.
If application freeze... The longest watchdog timeout is about 5 minutes, the shortest watchdog timeout is 1 second, most of them - not more then 20 seconds. Wait. After unfreeze, upload report to us.
If application block something or show something unexpected, as you think ;-) Upload report to us, then rotate you device. After device rotated, there'll be reinitialization.
If something blows up, it explodes with stack traces, uh, Sssssmmmokie! Restart application after crash, upload report to us.
You may upload report via context menu. The report dialog will be appear automatically if there is a stack trace.
If you have an idea how to improve DigiNNN or a wish to change something, please submit your idea via GitHub tracker. Please, submit technical issues too.
There is only DigiSSHD component available at this time. DigiSSHD is sshd server that provide secure shell, scp and sftp
Please install DigiControl and DigiSSHD simultaneously. This is two parts of the single application.
Interface
There are two ACL types (access control list)
interface ACL that defined what network interface(s) will be used (tab service)
connection ACL that defined (by IP) allow/deny rules to access to phone, and interactive mode (tab session)
You may find current IP at information tab
Port option located at service tab
Code
It may be interesting because it almost written in Scala. Actualy apk build with scala 2.8.2.
Scala 2.9.x and 2.10.0 M2 have some critical bugs in compiller and too fat :-( There are few insignificant java files. Maybe someday it will be replaced with scala code, but I don't want waste time.
Controller native helper written in C++ with BOOST (I don't like C, C#, java and assembler ) It is battery friendly single threaded asynchronous INETD server. This is the only non Scala part.
All application created in XXP style (extreme extreme programming ) - no unit tests, no design, no comments, only the simplest code that easy to read
If you find BUG sure you will ;-) Please open issue on github or click on report in context menu. Report will be uploaded to Google Cloud storage.
Versions
0.2
- Improvements: add notification with service state
- Improvements: remember last active tab
- Bug fixes: remove toolbox/busybox dependency (file objects permission control is less granular now)
- Improvements: add ui for public key authentication
- Bug fixes: remove some startup deadlocks
- Improvements: by default add connection from private networks to permit ACL
- Improvements: by default new components enabled
- Improvements: add contol level background (novice, intermediate, professional)
- Improvements: add sshd profile generation
0.1.05
- Bug fixes: fix sporadic error on component restart
- Bug fixes: fix preferred layout orientation
- Improvements: implement smart shutdown sequence mechanism. No task killer needed. All components and their dependencies (include services and providers) terminated in proper order with respect to idle timeouts
- Improvements: more verbose single user/multi user logic
- Bug fixes: set minimum API level to 9
- Bug fixes: progress dialog deadlock at multiple activity change
- Bug fixes: busy state lock
0.1.04
- Bug fixes: 'port already in use' bug
- Improvements: improve dialog routines
- Improvements: improve log rotation, add gzip compression to initialization sequence
0.1.03
- Improvements: add database retry guard that prevent sporadic errors
- Improvements: add coreutil 'ls', improve groups helper, now SCP working at most of devices without any tuning
- Improvements: add active user name to session entry
- Bug fixes: set minimum API level to 10
- Bug fixes: fix creation of unused /sdcard/Android/data/file empty directory
move the magic button to the top by user request
- Bug fixes: drop Android 2.2 Froyo support hacks
- Bug fixes: remove deadlock in safe dialogs
- Bug fixes: fix possible desynchronization in global shutdown sequence
- Improvements: add welcome dialog and assistant with green sputnik
- Improvements: add option of preferred layout orientation
0.1.02 - critical bugfixes
0.1.01 - 16.05.2012
- Improvements: reduce size, move DigiSSHD to SD card
- Improvements: improve stability, add SCP groups helper
- Bug fixes: SFTP permissions
- Improvements: add activity event log
- Improvements: add session event log
- Improvements: add single user/multi user mode
- Improvements: improve interface, user management
- Bug fixes: fixes tons of bugs
0.0.2 - 03.05.2012 mostly working
0.0.0 - 21.04.2012 something working
Your Help Is Always Welcome
* user interface - unstable
* native helper - mostly stable
* dropbear server - stable
King Regards,
Alexey
Please TURN ON subtitles in video.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
reserved
[ reserved ]
Looks like an impressive app, thanks...
Is there any way to use key-based authentication instead of a password, please?
Wonderful work!
I will fix up public key authentication in next release. I need add few functions.
I hope that new release 0.1.06 will be ready within 2 days.
Thank you for your interest in app. It is really important for me.
cdmackay said:
Looks like an impressive app, thanks...
Is there any way to use key-based authentication instead of a password, please?
Click to expand...
Click to collapse
I have tested key-based authentication - it work both in privileged and unprivileged modes. Sorry for delay ;-)
Thanks for the new version; my comments, for what they're worth:
- Control level background: interesting idea, but I didn't notice it actually showing anything; turned off, nothing seemed different.
- Notification icon; I'd like there to be an icon only when the Control program is actually enabled. As it is, it seems there is no way to disable the icon when things are "OFF"?
- Publickey works well for user android (thanks!). But doesn't seem that there is any way to do per-user public keys, when using multi-user? I don't need this functionality mind you, single-user is enough for me, just mentioning it.
- I would like to be able to disable password access entirely, and use only publickey. That doesn't seem possible at the moment?
- The apps are a little complex; that's not a problem, but I think there could be better documentation, esp on how to do common things. It's possible that this is there already, but docs seem a little spread around...
thanks again...
It worked couple days ago. Today after restoring from TB, it kept on restarting itself. I later noticed that it was trying to bind under an older LAN ip from couple days ago. I unchecked the older ip and add the curent lan ip, but it still restarting itself and shows error. I let it emailed the report to you. I'm on Vibrant CM9 nightly 20120704
I noticed couple things from first try. The OFF button in Digisshd does not change to ON when it was started. I couldn't tell if it already started or not. Don't take this the wrong way, but the gui seems to have lots of features but not intuitive yet. There should be some obvious status/indicator. The many tabs are nice and your project seems powerful sshd, but somehow I'm still lost in figuring it out.
Thank you for feedback. For bind issues - You may remove all bind filters, so it will be looks like
I will check report. I am preparing version 0.3 right now. It will fix some system design issues, also it will be adjusted for level API 15 (fragments, action bar, and so on). I am sure that I achieve target within two days.
UI is really weak point. :silly: Maybe I will build some trigger that hide intermediate and professional level... options VS plain and simple UI - question of balance. I want have all available options.
kobesabi said:
It worked couple days ago. Today after restoring from TB, it kept on restarting itself. I later noticed that it was trying to bind under an older LAN ip from couple days ago. I unchecked the older ip and add the curent lan ip, but it still restarting itself and shows error. I let it emailed the report to you. I'm on Vibrant CM9 nightly 20120704
I noticed couple things from first try. The OFF button in Digisshd does not change to ON when it was started. I couldn't tell if it already started or not. Don't take this the wrong way, but the gui seems to have lots of features but not intuitive yet. There should be some obvious status/indicator. The many tabs are nice and your project seems powerful sshd, but somehow I'm still lost in figuring it out.
Click to expand...
Click to collapse
Request: optional blank DigiControl notification icon?
I'm using DigiSSHD along with DigiControl on two android devices: a myTouch 4G Slide running CM-7.1.0 and a Galaxy Tab 2 10.1 running CM-9.0-RC2. In both cases, it's working very well for me. Thank you for a great couple of utilities!
I have a request: as an option, could you offer a blank DigiControl notification icon, to keep the clutter out of the notification area? I know that the presence of such an icon is necessary in order to ensure that DigiControl doesn't get swapped out or shut down, but if you offered a blank icon, at least we wouldn't _see_ it in the notification area.
For example, the Tasker app offers an optional blank icon for the same purpose.
Thank you very much for considering this request.
.​
Hi. Great app! Thanks for your work on this! Is there a tutorial for how to connect using USB? My phone is a Galaxy Nexus (running Cyanogenmod 9 RC2). As you know, the Galaxy Nexus uses MTP instead of USB Mass Storage. MTP does not work well for me. I would prefer to use SFTP over USB. I believe DigiSSHD allows this, but I need some step by step instructions. So far, I have not figured out how to make it work.
One solution I am thinking of is to use EasyTether. At the moment, my phone is plugged into my Linux box via USB and EasyTether is connected. I can ping the phone on 192.168.117.1. What are the next steps?
If not using Easy Tether, what other ways can I connect via SFTP and USB to my Galaxy Nexus? Thank you for your work on this very important app!
1. open DigiSSHD info tab. Look at interfaces block. USB interface must be there.
2. start DigiSSHD
3. open any terminal on phone, enter netstat -al
example from my phone
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:7777 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:7203 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:2222 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:32500 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:43866 127.0.0.1:7777 ESTABLISHED
tcp 0 0 10.255.255.247:47225 213.75.57.103:443 ESTABLISHED
tcp 0 0 127.0.0.1:7777 127.0.0.1:43818 ESTABLISHED
tcp 0 0 127.0.0.1:7777 127.0.0.1:33561 ESTABLISHED
tcp 0 0 127.0.0.1:7777 127.0.0.1:43819 ESTABLISHED
tcp 0 0 127.0.0.1:43818 127.0.0.1:7777 ESTABLISHED
tcp 0 0 10.255.255.247:2222 10.255.255.250:47123 ESTABLISHED
tcp 0 0 127.0.0.1:7777 127.0.0.1:43866 ESTABLISHED
tcp 0 0 127.0.0.1:43819 127.0.0.1:7777 ESTABLISHED
tcp6 0 1 ::ffff:10.255.255.247:46121 ::ffff:173.194.32.32:80 CLOSE_WAIT
tcp6 0 0 ::ffff:127.0.0.1:33561 ::ffff:127.0.0.1:7777 ESTABLISHED
tcp6 0 1 ::ffff:10.255.255.247:51556 ::ffff:173.194.32.48:443 CLOSE_WAIT
tcp6 0 1 ::ffff:10.255.255.247:37148 ::ffff:173.194.32.0:443 CLOSE_WAIT
tcp6 0 0 ::ffff:10.255.255.247:35515 ::ffff:173.194.69.188:5228 ESTABLISHED
tcp6 0 1 ::ffff:10.255.255.247:48747 ::ffff:173.194.32.8:443 CLOSE_WAIT
tcp6 0 1 ::ffff:10.255.255.247:43505 ::ffff:173.194.32.18:443 CLOSE_WAIT
Red string indicate that you may connect to tcp port 2222 on any available interface (0.0.0.0)
If something lost send me message via PM, we will troubleshoot your connection
MountainX said:
Hi. Great app! Thanks for your work on this! Is there a tutorial for how to connect using USB? My phone is a Galaxy Nexus (running Cyanogenmod 9 RC2). As you know, the Galaxy Nexus uses MTP instead of USB Mass Storage. MTP does not work well for me. I would prefer to use SFTP over USB. I believe DigiSSHD allows this, but I need some step by step instructions. So far, I have not figured out how to make it work.
One solution I am thinking of is to use EasyTether. At the moment, my phone is plugged into my Linux box via USB and EasyTether is connected. I can ping the phone on 192.168.117.1. What are the next steps?
If not using Easy Tether, what other ways can I connect via SFTP and USB to my Galaxy Nexus? Thank you for your work on this very important app!
Click to expand...
Click to collapse
Ezzzzh said:
1. open DigiSSHD info tab. Look at interfaces block. USB interface must be there.
Click to expand...
Click to collapse
Thanks for your reply. Starting at step 1, no interface block is shown. I only see sections for community, support and legal under the information tab. How should I troubleshoot this?
You open DigiControl, not DigiSSHD. Jump to DigiSSHD
MountainX said:
Thanks for your reply. Starting at step 1, no interface block is shown. I only see sections for community, support and legal under the information tab. How should I troubleshoot this?
Click to expand...
Click to collapse
If you really open DigiSSHD and interface block is absent... Send me report please from option menu. There is a lot of surprises in reality. Maybe Interfaces block is disappeared???
MountainX said:
Thanks for your reply. Starting at step 1, no interface block is shown. I only see sections for community, support and legal under the information tab. How should I troubleshoot this?
Click to expand...
Click to collapse
Ezzzzh said:
1. open DigiSSHD info tab. Look at interfaces block. USB interface must be there.
Click to expand...
Click to collapse
Ezzzzh said:
You open DigiControl, not DigiSSHD. Jump to DigiSSHD
Click to expand...
Click to collapse
Yes, you are right. Now I am looking at the Information Tab of DigiSSHD. I see the Interfaces block.
My phone is plugged into my computer via USB at the moment. There is no USB interface listed. (This is true both with and without EasyTether running.) There are other interfaces listed such as ifb0, ifb1, rmnet0, rmnet1, rmnet2 and sit0. All these have addresses of 0.0.0.0. wlan0 is also listed with an address of 192.168.x.x.
However, when EasyTether is enabled, I can currently ping my phone from my PC via the USB interface:
ping 192.168.117.1
PING 192.168.117.1 (192.168.117.1) 56(84) bytes of data.
64 bytes from 192.168.117.1: icmp_req=1 ttl=128 time=4.32 ms
64 bytes from 192.168.117.1: icmp_req=2 ttl=128 time=4.52 ms
What is the next troubleshooting step? Thanks.
show
ifconfig -a
and
netstat -al
from phone
MountainX said:
Yes, you are right. Now I am looking at the Information Tab of DigiSSHD. I see the Interfaces block.
My phone is plugged into my computer via USB at the moment. There is no USB interface listed. (This is true both with and without EasyTether running.) There are other interfaces listed such as ifb0, ifb1, rmnet0, rmnet1, rmnet2 and sit0. All these have addresses of 0.0.0.0. wlan0 is also listed with an address of 192.168.x.x.
However, when EasyTether is enabled, I can currently ping my phone from my PC via the USB interface:
ping 192.168.117.1
PING 192.168.117.1 (192.168.117.1) 56(84) bytes of data.
64 bytes from 192.168.117.1: icmp_req=1 ttl=128 time=4.32 ms
64 bytes from 192.168.117.1: icmp_req=2 ttl=128 time=4.52 ms
What is the next troubleshooting step? Thanks.
Click to expand...
Click to collapse
Ezzzzh said:
show
ifconfig -a
and
netstat -al
from phone
Click to expand...
Click to collapse
This is with EasyTether CONNECTED!
[email protected]:/ # netstat -al
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:58682 127.0.0.1:33333 ESTABLISHED
tcp6 0 0 :::33333 :::* LISTEN
tcp6 0 1 ::ffff:192.168.1.29:55777 ::ffff:74.125.45.120:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:37690 ::ffff:74.125.137.188:5228 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:47507 ::ffff:173.194.37.80:443 CLOSE_WAIT
tcp6 0 1 ::ffff:192.168.1.29:42791 ::ffff:173.194.37.81:443 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:53132 ::ffff:74.125.45.101:443 ESTABLISHED
tcp6 0 0 ::ffff:127.0.0.1:33333 ::ffff:127.0.0.1:58682 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:34921 ::ffff:74.125.139.138:80 CLOSE_WAIT
tcp6 0 1 ::ffff:192.168.1.29:34199 ::ffff:74.125.45.101:443 CLOSE_WAIT
udp6 0 0 :::44717 :::* CLOSE
[email protected]:/ # ifconfig -a
-a: no such device
[email protected]:/ # ifconfig
[email protected]:/ #
Google search: "android ifconfig syntax" --> no useful results found
---------- Post added at 05:21 PM ---------- Previous post was at 05:17 PM ----------
Ezzzzh said:
show
ifconfig -a
and
netstat -al
from phone
Click to expand...
Click to collapse
Here it is without EasyTether connected:
[email protected]:/ # netstat -al
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp6 0 1 ::ffff:192.168.1.29:55777 ::ffff:74.125.45.120:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:37690 ::ffff:74.125.137.188:5228 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:47507 ::ffff:173.194.37.80:443 CLOSE_WAIT
tcp6 1 1 ::ffff:192.168.1.29:42791 ::ffff:173.194.37.81:443 LAST_ACK
tcp6 0 0 ::ffff:127.0.0.1:33333 ::ffff:127.0.0.1:58682 TIME_WAIT
tcp6 0 1 ::ffff:192.168.1.29:34921 ::ffff:74.125.139.138:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:49525 ::ffff:74.125.45.138:443 ESTABLISHED
tcp6 0 0 ::ffff:192.168.1.29:46645 ::ffff:74.125.45.139:443 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:34199 ::ffff:74.125.45.101:443 CLOSE_WAIT
[email protected]:/ #
still no results from ifconfig....
First of all I don't see any 0.0.0.0:2222. Are you start DigiSSHD? Is it show state Active?
Second, Are you sure that 192.168.117.1 is not your local PC interface?
Third, sorry ifconfig arg only working, so use netcfg
MountainX said:
This is with EasyTether CONNECTED!
[email protected]:/ # netstat -al
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:58682 127.0.0.1:33333 ESTABLISHED
tcp6 0 0 :::33333 :::* LISTEN
tcp6 0 1 ::ffff:192.168.1.29:55777 ::ffff:74.125.45.120:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:37690 ::ffff:74.125.137.188:5228 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:47507 ::ffff:173.194.37.80:443 CLOSE_WAIT
tcp6 0 1 ::ffff:192.168.1.29:42791 ::ffff:173.194.37.81:443 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:53132 ::ffff:74.125.45.101:443 ESTABLISHED
tcp6 0 0 ::ffff:127.0.0.1:33333 ::ffff:127.0.0.1:58682 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:34921 ::ffff:74.125.139.138:80 CLOSE_WAIT
tcp6 0 1 ::ffff:192.168.1.29:34199 ::ffff:74.125.45.101:443 CLOSE_WAIT
udp6 0 0 :::44717 :::* CLOSE
[email protected]:/ # ifconfig -a
-a: no such device
[email protected]:/ # ifconfig
[email protected]:/ #
Google search: "android ifconfig syntax" --> no useful results found
---------- Post added at 05:21 PM ---------- Previous post was at 05:17 PM ----------
Here it is without EasyTether connected:
[email protected]:/ # netstat -al
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp6 0 1 ::ffff:192.168.1.29:55777 ::ffff:74.125.45.120:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:37690 ::ffff:74.125.137.188:5228 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:47507 ::ffff:173.194.37.80:443 CLOSE_WAIT
tcp6 1 1 ::ffff:192.168.1.29:42791 ::ffff:173.194.37.81:443 LAST_ACK
tcp6 0 0 ::ffff:127.0.0.1:33333 ::ffff:127.0.0.1:58682 TIME_WAIT
tcp6 0 1 ::ffff:192.168.1.29:34921 ::ffff:74.125.139.138:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:49525 ::ffff:74.125.45.138:443 ESTABLISHED
tcp6 0 0 ::ffff:192.168.1.29:46645 ::ffff:74.125.45.139:443 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:34199 ::ffff:74.125.45.101:443 CLOSE_WAIT
[email protected]:/ #
still no results from ifconfig....
Click to expand...
Click to collapse
Ezzzzh said:
First of all I don't see any 0.0.0.0:2222. Are you start DigiSSHD? Is it show state Active?
Click to expand...
Click to collapse
In your initial instructions, you said that step 2 was to "start DigiSSHD". I assumed you meant to turn it "on" so it becomes active in step 2. I was not yet able to satisfy the criteria you listed in step 1, so I didn't do step 2.
However, based on this reply, I have now made DigiSSHD active. Here are the results with it active (and EasyTether disabled):
[email protected]:/ # netstat -al
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:2222 0.0.0.0:* LISTEN
tcp6 0 1 ::ffff:192.168.1.29:55777 ::ffff:74.125.45.120:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:37690 ::ffff:74.125.137.188:5228 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:47507 ::ffff:173.194.37.80:443 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:56790 ::ffff:173.194.37.84:443 ESTABLISHED
tcp6 0 0 ::ffff:192.168.1.29:38504 ::ffff:74.125.45.138:443 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:34921 ::ffff:74.125.139.138:80 CLOSE_WAIT
tcp6 0 0 ::ffff:192.168.1.29:37816 ::ffff:74.125.45.138:443 ESTABLISHED
tcp6 0 1 ::ffff:192.168.1.29:34199 ::ffff:74.125.45.101:443 CLOSE_WAIT
[email protected]:/ # netcfg
lo UP 127.0.0.1/8 0x00000049 00:00:00:00:00:00
ifb0 DOWN 0.0.0.0/0 0x00000082 8e:11:c8:13:eb:cd
ifb1 DOWN 0.0.0.0/0 0x00000082 46:64:07:e9:bf:b6
sit0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
ip6tnl0 DOWN 0.0.0.0/0 0x00000080 00:00:00:00:00:00
rmnet0 DOWN 0.0.0.0/0 0x00001090 00:00:00:00:00:00
rmnet1 DOWN 0.0.0.0/0 0x00001090 00:00:00:00:00:00
rmnet2 DOWN 0.0.0.0/0 0x00001090 00:00:00:00:00:00
wlan0 UP 192.168.1.29/24 0x00001043 a0:0b:ba:cc:88:00
[email protected]:/ #
Ezzzzh said:
First of all I don't see any 0.0.0.0:2222. Are you start DigiSSHD? Is it show state Active?
Click to expand...
Click to collapse
It is there now, once I move to step 2 of your instructions.
Ezzzzh said:
Are you sure that 192.168.117.1 is not your local PC interface?
Click to expand...
Click to collapse
192.168.117.1 is the phone's IP when EasyTether is enabled and connected via USB. (The PC's IP on the easytether0 iface is 192.168.117.2.) I also have a a wlan0 IP address on the phone, but I am trying to connect via USB, of course.
---------- Post added at 05:50 PM ---------- Previous post was at 05:40 PM ----------
This might help too:
[email protected]:~/.ssh$ ssh [email protected] -vvv -p 2222
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /home/user/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.117.1 [192.168.117.1] port 2222.
debug1: connect to address 192.168.117.1 port 2222: Connection timed out
ssh: connect to host 192.168.117.1 port 2222: Connection timed out
[email protected]:~/.ssh$ ping 192.168.117.1
PING 192.168.117.1 (192.168.117.1) 56(84) bytes of data.
64 bytes from 192.168.117.1: icmp_req=1 ttl=128 time=3.13 ms
64 bytes from 192.168.117.1: icmp_req=2 ttl=128 time=2.99 ms
--- 192.168.117.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 2.994/3.063/3.133/0.088 ms
[email protected]:~/.ssh$ ifconfig
easytether0 Link encap:Ethernet HWaddr YY:YY:YY:YY:YY:YY
inet addr:192.168.117.2 Bcast:192.168.117.255 Mask:255.255.255.0
inet6 addr: fe80::54ff:fe74:6872/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:20 errors:0 dropped:0 overruns:0 frame:0
TX packets:72 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:1664 (1.6 KB) TX bytes:11583 (11.5 KB)
eth0 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:192.168.1.55 Bcast:192.168.1.1 Mask:255.255.255.0
inet6 addr: xxxxxxxxxxxxxxxxxxxxxxxxx/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:35971246 errors:0 dropped:0 overruns:0 frame:0
TX packets:61929545 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10794714666 (10.7 GB) TX bytes:87663599559 (87.6 GB)
Interrupt:17 Memory:fe400000-fe420000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4522645 errors:0 dropped:0 overruns:0 frame:0
TX packets:4522645 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6798287997 (6.7 GB) TX bytes:6798287997 (6.7 GB)

[Q] Linux 'cpulimit' equivalent

Hello,
New here at XDA, I've done a lot of reading here and found the site extremely useful in the past, so I thought I'd join up. Thanks for all the help you have provided!
Anyway, I am wondering if anybody knows of an Android equivalent to 'cpulimit' for Linux.
I am looking for a way to limit maximum CPU usage for a single process.
Thank you.
Bryan
Well, I have come to the conclusion there is no CPU limiter for Android, unless cpulimit could be compiled for it, which I have not tried.
However, this solution seems to work. If anybody is interested, I figured I'd update my thread.
Use the renice cmd.
Negative number raises scheduling priority, positive lowers it. From -20 to 20, 0 being the base priority.
I found that a value of even 5 limits the CPU usage of a process greatly when another processes is demanding a lot of CPU ad the same time, the one with base priority will receive much more attention.
Using Opera Mini as example:
# ps | grep opera
ps | grep opera
app_94 30814 93 114260 16956 ffffffff afd0c53c S com.opera.mini.android
Found PID of 30814
# ps -p 30814
ps -p 30814
USER PID PPID VSIZE RSS PRIO NICE RTPRI SCHED WCHAN PC NAME
app_94 30814 93 114260 16956 20 0 0 0 ffffffff afd0c53c S com.opera.mini.android
Now we see NICE value is 0 - base
# renice -1 30814
renice -1 30814
renice process to -1, increase priority slightly
# ps -p 30814
ps -p 30814
USER PID PPID VSIZE RSS PRIO NICE RTPRI SCHED WCHAN PC
NAME
app_94 30814 93 114260 16956 19 -1 0 0 ffffffff afd0c53c S com.opera.mini.android
This shows new NICE value worked, and is now -1.
It can also change priority for processes started by a particular user or group.
There is kind of an extra step in there.
ps -p | grep opera
Could use this to see pid and nice value all at once.
Sent from my Samsung

Modify firmware/disable postprocessing on Vizio hdtv via serial U-Boot

Backstory: I have an old (2008?) vizio VA22L FHDTV10T. 1920x1080 60hz panel. I want to connect it to my pc, but if I use anything other than the VGA port (eg HDMI) it overscans and applies all this crap to the image. It's clear and crisp and beautiful if I use VGA (tested with old VGA gpu), but alas, my pc doesn't have a VGA output. (Yes I tried all the settings, no they don't fix it. Yes, I tried adjusting the graphics driver settings, no they haven't fixed it without being a PITA every time I turn the tv off.)
On to the important stuff: I can access the tv with a serial connection via "Service port" and can see a Das U-boot boot sequence and issue commands. I just don't know linux and can't get anywhere past the help menus. If someone could guide me on modifying this thing I'd be rather grateful!
For starters, here's the output when I first turn it on whilst pc is plugged in via VGA, wait for it to finish booting, and press enter.
PS: using PuTTY @ 115200baud
Code:
▒Boot-
Bank 0 : DQS(3 ~ 42), Size 39, Middle = 22
Bank 1 : DQS(-1 ~ 41), Size 42, Middle = 20
DRAM is set as 16 bits
Boot
Starting C main
0x00001b04
LZHS addr:0x00001b80
LZHS size:0x0002fcd8
LZHS checksum:0x00000084
U-Boot 1.1.4 (Oct 9 2009 - 12:58:21)
U-Boot code: 00D00000 -> 00D2FCD8 BSS: -> 00D7430C
RAM Configuration:
Bank #0: 00000000 64 MB
Detect flash #0: MXIC(25L320)
Flash: 4 MB
0.0.0.0
In: serial
Out: serial
Err: serial
DramSizing: 0x02000000
Finding Image...
Decompression image to 0x00010000...
Booting
Nucleus Heap is at 0x00603208(0x00be5f80)
Main task stack is at 0x00603218 (0x00002000)
============================================
Memory for Image at 0x00010000(0x005eda08):
Memory for OSAI at 0x00605228(0x00ae5f80)
Memory Reserved for ARM lib at 0x010ec000(0x00100000)
Memory Reserved for FBM at 0x011ec000(0x00e10000)
Memory Reserved for MMU at 0x01ffc000(0x00004000)
Find panel index 102(PANEL_LG_LM215WF1) from GPIO
TunerInit.....................MUSBStack-S v2.303 Init pBase = 0x20029000.
Image ROBase:0x0001099c ROLimit:0x004483f4
Protect readonly memory from 0x00000000 to 0x004483e8
MMU protect: 0x01ffc000 ~ 0xfffffff8
Successed to initialize Memory Intrusion Detection!
DTV>Detect flash #0: MXIC(25L320)
[SRM] DISP CTRL 0 0 0 0
[SRM] DISP CTRL 0 1 0 0
[DM] VT = 1111 (1111)
DM Panel V(1089 1099 1200) H(1999 2175 2239) P(120000000 143472527 175000000) F(50 75)
DM H MIN(1800 2048) H MAX(2624)
DM OK V(1111) H(2176) F(60)
[DM] VT = 1111 (1111)
DM OK HS(254)
[DM] VT = 1111 (1111)
DM Panel V(1089 1099 1200) H(1999 2175 2239) P(120000000 143472527 175000000) F(50 75)
DM H MIN(1800 2048) H MAX(2624)
DM OK V(1111) H(2176) F(60)
[DM] VT = 1111 (1111)
DM OK HS(254)
Watchdog enable:405000000
W: 1920 H: 1080 Rate: 60 DSH:800 DSV: 800 USH: 800 USV: 800 VSP: 0 TUNE: 0 bStackSize: 1
[Help]
cd: Change current directory
do: Repeat command
alias(a): Add/Show current alias
read(r): Memory read(word)
write(w): Memory write(word)
basic_(b): basic command
mtktool(0): mtktool command
customer(cust): Get customer name
pmx: pmx (scpos) command
musb: MUSB command
sif: Sif command
eeprom: Eeprom command
nim: Nim command
ir: Ir command
rtc(rtc): RTC commands
aud: Aud command
nptv(n): Nptv command
dbs: Dbs command
dmx(d): Demux commands
memtest: Memory test
pdwnc(pdwnc): PDWNC commands
bwt: BWT command
gpio: Gpio interface
DTV>
Again, thanks in advance!
Mmm, so right after posting, I figured out that I had to change directory to one of the commands listed in the first help in order to issue commands from the sub-help of each one instead of using them as arguments. EG: cd pmx [enter] pattern 1 [enter] would turn on the test pattern instead of pmx pattern or pmx pattern 1 or pmx -p and other such variants. There's probably a guide for this out there somewhere but most of my searches just turned up historical info on German submarines... Oh, and this thread which is kinda along the same lines: https://forum.xda-developers.com/android/software/rooting-mediatek-based-linux-smart-tv-t3150281
I guess now I just have to find which setting(s) fix my apparent problem, then I'll need to append the firmware, assuming I can't do it from the serial console. And that'll be the part I definitely need help with.
Maybe I can just use commands to do this, but I don't know what most of this is, and my searches aren't yielding much... That said, I can run the commands and post back the results since I don't expect anyone to have this same model.
Here's the menu and submenus with my comments in quotes:
Code:
cd: Change current directory "Figured out this one"
do: Repeat command "Self explanatory"[HIDE]
Usage: do loop cmd ex: do 10 read 0x200 0x10
CLI Command Return Value (-1)[/HIDE]
alias(a): Add/Show current alias "not quite sure what this does"
read(r): Memory read(word) "I guess these are self explanatory? no output if I just run the commands"
write(w): Memory write(word)
basic_(b): basic command [HIDE]
[Help]
stop: Stop RS232 transparent mode
sv: System mode detection
version(ver): System version/build date
reboot: System reboot/restart
getpllclk(gpc): close loop, gpc [cpu|sys|ps|vo|adc|b2r|apl1|apl2] [[band num]]
backup(bk): backup command
[/HIDE]
mtktool(0): mtktool command "the help kinda explains?[HIDE]
[Help]
et: Enter RS232 transparent mode
ft: Set RS232 factory mode
st: Stop RS232 transparent mode[/HIDE]
customer(cust): Get customer name "returns [TPV] and nothing more"
pmx: pmx (scpos) command "looks promising?"[HIDE]
[Help]
enable(e): enable/disable LVDS
pattern(p): enable/disable test pattern
list(l): show panel list
query(q): dump pmx(scpos) info
set(s): set parameter
[/HIDE]
musb: MUSB command "probably controls the usb port on the back?" [HIDE]
[Help]
debug_on(d_on): MUSB.d_on
debug_off(d_off): MUSB.d_off
debug_level(d_l): MUSB.d_l
init(i): MUSB init
speed(speed): MUSB speed
hmsd(hm): MUSB host msd test
htst(ht): MUSB host compilance test
suspend(s): USB bus suspend
resume(r): USB bus resume
[/HIDE]
sif: Sif command "I know what edid is basically, maybe I could make the computer think this is a non-hdtv type connection?"[HIDE]
[Help]
init(i): Sif init
read(r): Sif read
write(w): Sif write
writebyte(wb): Sif write byte
hdcp: Sif write HDCP SRAM default value
rhdcp: Sif read HDCP
wbhdcp: Sif write byte to HDCP
rbhdcp: Sif read byte from HDCP
wallhdcp(wah): Sif write all 320 bytes to HDCP
rallhdcp(rah): Sif read all 320 bytes from HDCP
edid: Sif write EDID default value
redid: Sif read EDID
walledid(wae): Sif write all 256 bytes to EDID
ralledid(rae): Sif read all 256 bytes from EDID
tunerread(tr): Tuner I2C No-sub-addr read
tunerwrite(tw): Tuner I2C No-sub-addr write
multipleread(mr): Multiple sub-addr I2C read
multiplewrite(mw): Multiple sub-addr I2C write
scan1(s1): Scan BUS0 (System I2C)
scam2(s2): Scan BUS1 (Tuner I2C)
sif_x_read(xr): fully functional sif read
sif_x_write(xw): fully functional sif write
edidreadbyte(edidrb): edid read byte
[/HIDE]
eeprom: Eeprom command "there's an 8 pin eeprom on the mainboard" [HIDE]
[Help]
readbyte(rb): eeprom.rb [eeprom-offset]
writebyte(wb): eeprom.wb [eeprom-offset] [byteval]
uartwrite(uw): Get data from Uart and write to eeprom.[/HIDE]
nim: Nim command "I assume this controls the onboard tv tuner"[HIDE]
[Help]
id: Set Tuner ID
ver: Tuner version
dtd: Nim dtd
atd: Nim atd
d_l: Set Debug Level
go: Start Nim
up: Channel Up
down: Channel Down
channel: Channel Set
freq: Freq Set
init(i): Nim init
open(o): Nim open
close(c): Nim close
setcable(sc): Nim set cable parameters
setBW(sbw): Nim set BW
getcablelevel(gclv): Nim get cable signal level
getcablesignal(gcsc): Nim get cable signal parameter
getcablelock(gclk): Nim get cable lock status
detachmw(dm): Nim Detach MW
detachi2c(dei2c): Detach Tuner I2C
[/HIDE]
ir: Ir command "InfraRed as in the remote I s'pose" [HIDE]
rx(rx): RX commands
[/HIDE]
rtc(rtc): RTC commands "returns [HELP] and nothing more. Real Time Clock I'd wager unless that has another meaning"
aud: Aud command "onboard speakers and other audio functions"[HIDE]
[Help]
ptsdly(ptsd): Delay audio startup by increasing PTS
dd_banner(banner): DD banner turn on for DD Test
spdif: spdif command
adac: adac command
interdac: inter dac command
dsp: dsp command
uop: audio uop
cfg: configuration
t: test
Clip: Aud Clip
factory(fac): Factory mode
[/HIDE]
nptv(n): Nptv command "not the foggiest idea of what these do."[HIDE]
[Help]
Ycproc(ycproc): YCPROC Command
TVD(tvd): TVD Command
NR(nr): NR Command
SCART(scart): SCART Command[/HIDE]
dbs: Dbs command "not this either"[HIDE]
[Help]
init(i): Dbs init
print(p): Dbs print at once
reset(r): Dbs reset[/HIDE]
dmx(d): Demux commands "This looks like the solution, except... the one command does nothing..."[HIDE]
[Help]
query(q):[/HIDE]
memtest: Memory test[HIDE][Help]
run(r): Memory test[/HIDE]
pdwnc(pdwnc): PDWNC commands "another one that just returns [Help]. no idea what it is"
bwt: BWT command "BandWidth Testing. not what I'm looking for I don't think"[HIDE]
[Help]
init: BandWidth Testing Preliminaries
testing: BandWidth Testing (BWT)
report: BandWidth Testing Report
chgchannel: Change Channel Number
dtv: BWT for DTV
atv: BWT for ATV
cvbs: BWT for CVBS
ypbpr: BWT for YPbPr
hdmi: BWT for HDMI
vga: BWT for VGA
src: Get current input source
mtime: Set BWT measure time
pippop: BWT for PIP/POP[/HIDE]
gpio: Gpio interface "General Purpose I/O. Don't think this is what I need either as it's hardware" [HIDE]
[Help]
output(out): gpio.out [gpio num] [[0|1]]
input(in): gpio.in [gpio num]
servo(servo): gpio.servo [0-4][/HIDE]
Wake times are also over 10 seconds, and the bright blue when there's no signal is rather jarring, so I suppose I'll need to extract and modify the firmware. Can anybody help with this?
Bump I s'pose. Still stuck, so for now I'm working on other things till I find someone who can help with this. I'd rather not drop $25 on a chinese basic mainboard for the panel or whatever I can get away with paying for a dubious identical-looking universal mainboard.
So I'm at it again trying to make this work. Glad I posted everything I did since I totally forgot how to work this thing... Still need help. I'm trying to dump the firmware with u boot so I can try to modify and reupload it with my custom values.
I also have this TV and would like to disable overscan. How should I connect my PC to one of its service ports? It has two service ports: a type A USB port and some port that I think is called 'ISP' or something like that. For what it's worth, I already have several USB to RS232 adapters (male USB type A on one end of the cable, male RS232 on the other end of the cable), but this TV doesn't have an RS232 port. I've already downloaded a third-party PuTTy app ("PuTTy (Unofficial)", if I recall correctly, from the Microsoft Store).
Edit: Made a correction.
I also have an adapter that is USB type B on both ends. It is called "SharkPort", IIRC. It was designed for connecting a PC to a PlayStation 2 to transfer PS2 game save files. It *might* be a USB host-to-host adapter. It is probably USB 1.0 or 1.1.
Big love for this thread even though I'm probably useless at the moment.
I'm ambitiously following some of your footsteps to tinker with my all-but-entirely defunct Vizio E3D420VX.
Curious how this story played out though; it looks like it relies more on TV knowledge than Linux-- these settings are pretty dense.

Connecting to OpenVPN running on OpenWrt from Android

Code:
OpenVPN 2.5.3 aarch64-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
library versions: OpenSSL 1.1.1l 24 Aug 2021, LZO 2.10
I installed OpenVPN on the latest OpenWrt 21.02.1
The client config and server conf files both have these lines at the top:
Code:
user nobody
group nogroup
dev tun
..
..
I installed the OpenVPN for Android app on my Android phone. When entering the client config file... am I supposed to comment out or delete the first two lines since there is no user called: nobody and no group called nogroup in my Android. At least I didn't see anything in /etc/group and /etc/passwd in Android OS.
I see in the OpenVPN manual that the --user option lets you:
"Change the user ID of the OpenVPN process to user after initialization, dropping privileges in the process. This option is useful to protect the system in the event that some hostile party was able to gain control of an OpenVPN session."
I can connect from the Android client to OpenVPN server by commenting out those two lines but is there a way to obtain the benefit of running as user "nobody" and group "nogroup", or some such unpriviledged user, when connecting to OpenVPN server on OpenWrt from an Android phone? From a Terminal to my phones Android OS if I do ls -l I can see user and group of all files is: u0_a252 so should I make a user an group of u0_a252 on the server running OpenVPN and then use that as the user and group inyou are dropping root privileges on the client with --user and/or --group the client and server config files? My phone is not rooted so I guess running as user u0_a252 will be the same thing as running OpenVPN unpriviledged?
Lastly do I NEED to define a user AND a group or is one or the other enough? The OpenVPN manual is a bit ambiguous on this point because it also states: "[if] you are dropping root privileges on the client with --user and/or --group.."
Cheers,
Flex
I asked the creator of the OpenVPN for Android app.
That app ignores the OpenVPN --user and --group options and it runs as an unpriviledged user which can be confirmed by installing Android Debug Bridge (ADB) on a computer to which the phone is attached via USB cable. Then run commands such as these:
Bash:
# adb shell
sunfish:/ $ top | grep openvpn
20901 shell 20 0 10G 2.8M 2.1M S 0.0 0.0 0:00.00 grep openvpn
20901 shell 20 0 10G 2.8M 2.1M S 0.0 0.0 0:00.00 grep openvpn
19186 u0_a253 20 0 14G 96M 49M S 0.6 1.7 0:02.23 de.blinkt.openvpn:openvpn
19186 u0_a253 20 0 14G 96M 49M S 0.3 1.7 0:02.25 de.blinkt.openvpn:openvpn
19186 u0_a253 20 0 14G 96M 49M S 0.6 1.7 0:02.26 de.blinkt.openvpn:openvpn
So in my case the client connecting to the OpenVPN server has user id: u0_a253 and not root.
Cheers,
Flex

Categories

Resources