четверг, 6 мая 2021 г.

run as another (www-data) user

 su  www-data  /bin/bash

# run  command

пятница, 12 февраля 2021 г.

Debian apt-get, use cdrom or dvd-rom iso redhat

1) mount iso image

mount -o loop debian-10.8.0-amd64-DVD-1.iso /media/cdrom

2) add to  /etc/apt/sources.list

 deb [trusted=yes] file:/media/cdrom/ buster main contrib non-free

3) install or update samething

apt-get update


------------------------------------- redhat------------------------------
  • # mkdir -p  /mnt/disc
    # mount -o loop RHEL7.9.iso /mnt/disc
    

    If you use DVD media, you can mount like below.

    # mkdir -p  /mnt/disc
    # mount /dev/sr0  /mnt/disc
    
  • Copy the media.repo file from the root of the mounted directory to /etc/yum.repos.d/ and set the permissions to 0644 or another similar permissions set:

    # cp /mnt/disc/media.repo /etc/yum.repos.d/rhel7dvd.repo
    # chmod 644 /etc/yum.repos.d/rhel7dvd.repo
    
  • Edit the new repo file, changing the gpgcheck=0 setting to 1 and adding the following 3 lines

    vi /etc/yum.repos.d/rhel7dvd.repo
    enabled=1
    baseurl=file:///mnt/disc/
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    

    In the end, the new repo file could look like the following

    [InstallMedia]
    name=DVD for Red Hat Enterprise Linux 7.9 Server
    mediaid=1359576196.686790
    metadata_expire=-1
    gpgcheck=1
    cost=500
    enabled=1
    baseurl=file:///mnt/disc/
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
    
  • Clear the cache and check whether you can get the packages list from the DVD repo

    # yum clean all
    # yum repolist enabled
    
  • It should look like the following if no other repository is enabled.
    To avoid any corruption its recommend to disable any non-RedHat repositories.

    # yum repolist enabled
    Loaded plugins: product-id, search-disabled-repos, subscription-manager
    This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
    repo id                                                                                 repo name                                                                     
    InstallMedia                                                                        Red Hat Enterprise Linux 7.9
    repolist: 5,229
    
  • If no errors are returned, the following can be used to update:

    # yum update

четверг, 29 октября 2020 г.

pocket chip flash tools on debian 10

New mrthod

https://github.com/Thore-Krug/Flash-CHIP


Activate FEL Mode with jumper  GRD-FEL, connect  micro-usb


4 Simple steps:

1) download CHIP-SDK, unpack

2) download CHIP-TOOLS, unpack to -- > CHIP-SDK

3) download firmware (example - stable-pocketchip-b126), unpack to -->  CHIP-SDK

4) go to CHIP-TOOLS and run 

.../setup_ubuntu1404.sh 

then run 

./chip-update-firmware.sh -L ../stable-pocketchip-b126/

----- issues --------------

In Debian 10 you need to install same packages, if got errors

apt install --yes android-tools-fastboot sunxi-tools u-boot-tools openjdk-11-jdk-headless unzip

apt-get install  make pkg-config  libusb-1.0-0-dev  zlib1g-dev

cp /usr/include/libusb-1.0/libusb.h /usr/include/

----Same usefull links and info -----------------------

https://www.reddit.com/r/ChipCommunity/comments/htkasm/chip_flashing_guide_july_2020/


 http://www.chip-community.org/index.php/Flash_from_command_line#Flashing_your_C.H.I.P._without_the_web_flasher

---------------------------

Chips types:

TC58TEG5DCLTA00 - 4GB flash chip

hynix - 8GB chip

---------------------------

https://github.com/SaltyCybernaut/PocketCHIP-flash-utils

https://github.com/Thore-Krug/Flash-CHIP

----------------------------------

FLASH VERIFICATION COMPLETE.

   #  #  #

  #########

###       ###

  # {#}   #

###  '%######

  #       #

###       ###

  ########

   #  #  #

CHIP is ready to roll!


пятница, 23 октября 2020 г.

Обновляем "корейского" корейца Kia Sorento 2016, (все корейские, американские KIA и Hyundai) для Android Auto! (Car Play)

     Зачем обновлять ПО AVN (Audio Video Navigation)  на "чисто корейском" авто, с корейской навигацией? Ведь там только карты корейского полуострова? 

     Ответ для многих, может быть не очевиден. С картами и навигацией обновляется и основное ПО ГУ(Головного Устройства), т.е. сам Android и его приложения. Вместе с тем в последних обновлениях появилась, интересная мне, функция Android Auto (Car Play для Iphone). 

    Android Auto  позволяет использовать всю мощь вашего телефона в плане навигации и аудио, что оригинальное, довольно древнее железо ГУ, уже навряд ли сможет. Плюс звонки, голосовой ассистент, локализация, и тд.

    Признаки оригинального корейского ПО из System Info, (префиксы прошивок) имеют

ST.UMNT.KOR

MICOM.ST.UMNT.KOR

ST4.KOR.KMC


    Официальный дилер конечно же не стал заморачиваться с обновлением "чистокровного" корейца, поскольку этого просто нету в их служебных инструкциях. 

    Локализация и "кастомные" прошивки - это "стремный хакинг", с этим пока подождём, а вот обновить корейскую прошивку на корейскую  - вполне безобидная операция. Ведь корейцам также нужны обновления как и машинам в США и Европе.  И тут крутая KIA (Hyundai)  предлагает любому своему клиенту свободно воспользоваться программой Navigation Updater !!! 

    https://update.kia.com/US/EN/navigationUpdate

    Программа  поможет выбрать ПО и свободно его скачать его в зависимости от модели вашего авто и региона! Качаем, используя гостевой доступ. Выбираем модель  своего авто (KIA, Hyundai, Genesys) 


отказываемся от регистрации


выбор языка


выбираем модель авто



Качаем обновление - записываем на SD-Card  или USB.  Теперь можем обновляться.



После обновления можем пользоваться Android Auto или Car Play и "родная" навигация уходит на второй план. (На телефоне обязательно должно присутствовать приложение Android Auto)












вторник, 28 июля 2020 г.

ssh logining log

1) vim  /etc/bash.bashrc
Append to the end of that file:

export PROMPT_COMMAND='RETRN_VAL=$?;logger -p local6.debug "$(whoami) [$$]: $(history 1 | sed "s/^[ ]*[0-9]\+[ ]*//" ) [$RETRN_VAL]"'

2) Set up logging for "local6" with a new file:
vim  /etc/rsyslog.d/bash.conf
And the contents...
local6.*    /var/log/commands.log

3) Restart rsyslog:
sudo service rsyslog restart