Table des matières
0 billet(s) pour février 2026
Note émulation retro gaming
Supernes - snes
Voir gnome-games
Zsnes
dpkg --add-architecture i386 apt-get update apt-get install zsnes
Higan
apt-get install higan
Note Android smartphone root LG G3 D855
Voir :
- /e/ os
- TWRP
- Désactiver le verrouillage OEM (OEM unlock)
Voir aussi :
Téléchargement de LG_Root.zip
Ici
Ou
upload scripts et binaires
adb push busybox /data/local/tmp/ && adb push lg_root.sh /data/local/tmp && adb push UPDATE-SuperSU-v2.46.zip /data/local/tmp
Accès console via /dev/ttyUSB
Ils existe plusieurs outils :
- Send_Command.exe (pour windows)
- qcdlcomm.py (Script Python)
- lglaf (Script Python)
qcdlcomm.py
Vor : https://forum.frandroid.com/topic/219747-tuto-root-du-lg-g3-depuis-un-syst%C3%A8me-linux/
Préreq
apt-get install python2-minimal python-serial
#wget https://gist.githubusercontent.com/corwin-of-amber/8f5ce36611dce12950e8d34a608f5ece/raw/28ea7c2faf92fce7c7588f52869faba4eeae7182/qcdlcomm.py wget http://jacobstoner.com/qcdlcomm.py rmmod cdc_acm rmmod usbserial
# lsusb |grep LG Bus 001 Device 003: ID 1004:633e LG Electronics, Inc. LM-X420xxx/G2/G3 Android Phone (MTP/download mode)
modprobe usbserial vendor=0x1004 product=0x633e python2 qcdlcomm.py /dev/ttyUSB1
# python2 qcdlcomm.py /dev/ttyUSB1
Special commands: ENTER, LEAVE, exit
#
Traceback (most recent call last):
File "qcdlcomm.py", line 97, in <module>
cmd(input)
File "qcdlcomm.py", line 89, in cmd
print output.split('\xba\xa7\xba\xbc')[1][:-1]
IndexError: list index out of range
Solution
python2 qcdlcomm.py /dev/ttyUSB2
Hélas avec qcdlcomm.py les erreurs ne sont pas redirigées !
Heureusement il existe un meilleurs outil.
Libérons le module usbserial
rmmod usbserial
Scripts lglaf
Préreq
sudo apt-get install python-usb
git clone https://github.com/Lekensteyn/lglaf cd lglaf ./lglaf.py
Lancement du hack
sh /data/local/tmp/lg_root.sh dummy 1 /data/local/tmp/UPDATE-SuperSU-v2.46.zip /data/local/tmp/busybox
Pb la partition /system reste en lecture-seule
# mount |grep ro, /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,noatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 ro,seclabel,nosuid,nodev,relatime,data=ordered 0 0
fastboot
Voir : https://nerdschalk.com/unlock-bootloader-via-fastboot-android/
fastboot adb reboot recovery fastboot reboot bootloader fastboot devices fastboot flash recovery twrp-3.4.0-0-d855.img fastboot reboot fastboot flash recovery twrp-3.4.0-0-d855.img fastboot reboot fastboot erase recovery fastboot erase laf fastboot flash laf laf.img fastboot flash recovery recovery.img fastboot reboot
Autres
adb push busybox /data/local/tmp/ adb push g2_root.sh /data/local/tmp adb push UPDATE-SuperSU-v2.46.zip /data/local/tmp
sudo rmmod cdc_acm sudo rmmod usbserial sudo modprobe usbserial vendor=0x1004 product=0x633e
./lglaf.py
#sh /data/local/tmp/lg_root.sh dummy 1 /data/local/tmp/UPDATE-SuperSU-v2.46.zip /data/local/tmp/busybox sh /data/local/tmp/g2_root.sh dummy 1 /data/local/tmp/UPDATE-SuperSU-v2.46.zip /data/local/tmp/busybox # sh /plop/tmp/g2_root.sh dummy 1 /plop/tmp/UPDATE-SuperSU-v2.46.zip /plop/tmp/busybox
# sh /data/local/tmp/g2_root.sh dummy 1 /data/local/tmp/UPDATE-SuperSU-v2.46.zip /data/local/tmp/busybox Unable to chmod /data/local/tmp/busybox: Operation not permitted ui_print ***************** ui_print SuperSU installer ui_print ***************** ui_print - Mounting /system, /data and rootfs Usage: mount [-r] [-w] [-o options] [-t type] device directory Usage: mount [-r] [-w] [-o options] [-t type] device directory mount: Permission denied mount: Permission denied mount: Permission denied mount: Permission denied /data/local/tmp/g2_root.sh[65]: can't create /system/toolbox: Read-only file system Unable to open /system/toolbox: No such file or directory /data/local/tmp/g2_root.sh[67]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[67]: /system/toolbox: not found aaa aaa 2+0 records in 2+0 records out 2 bytes transferred in 0.001 secs (2000 bytes/sec) 3+0 records in 3+0 records out 3 bytes transferred in 0.001 secs (3000 bytes/sec) 12+0 records in 12+0 records out 12 bytes transferred in 0.001 secs (12000 bytes/sec) 3+0 records in 3+0 records out 3 bytes transferred in 0.001 secs (3000 bytes/sec) /data/local/tmp/g2_root.sh[113]: /system/toolbox: not found ui_print - Extracting files /data/local/tmp/g2_root.sh[130]: /data/local/tmp/busybox: can't execute: Permission denied ui_print - Disabling OTA survival Unable to open /tmp/supersu/armv7/chattr.pie: No such file or directory /data/local/tmp/g2_root.sh[134]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[135]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[136]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[137]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[138]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[139]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[140]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[141]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[142]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[143]: /tmp/supersu/armv7/chattr.pie: not found /data/local/tmp/g2_root.sh[144]: /tmp/supersu/armv7/chattr.pie: not found ui_print - Removing old files mv: rename /system/bin/install-recovery.sh to /system/bin/install-recovery_original.sh: Read-only file system /data/local/tmp/g2_root.sh[153]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[153]: /system/toolbox: not found aaa aaa rm: /system/bin/install-recovery.sh: Read-only file system ui_print - Placing files mkdir failed for /system/bin/.ext, Read-only file system chown: /system/bin/.ext: No such file or directory chown: /system/bin/.ext: No such file or directory Unable to open /system/bin/.ext: No such file or directory /data/local/tmp/g2_root.sh[231]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[231]: /system/toolbox: not found aaa aaa /data/local/tmp/g2_root.sh[231]: /system/toolbox: not found [64/1484] usage: chcon context path... usage: chcon context path... rm: /system/bin/.ext/.su: No such file or directory rm: /system/xbin/su: No such file or directory rm: /system/xbin/daemonsu: No such file or directory rm: /system/xbin/sugote: No such file or directory rm: /system/xbin/sugote-mksh: No such file or directory /data/local/tmp/g2_root.sh[238]: can't create /system/xbin/sugote-mksh: Read-only file system chown: /system/xbin/sugote-mksh: No such file or directory chown: /system/xbin/sugote-mksh: No such file or directory Unable to open /system/xbin/sugote-mksh: No such file or directory /data/local/tmp/g2_root.sh[238]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[238]: /system/toolbox: not found aaa aaa /data/local/tmp/g2_root.sh[238]: /system/toolbox: not found usage: chcon context path... usage: chcon context path... rm: /system/xbin/supolicy: No such file or directory rm: /system/lib/libsupol.so: No such file or directory mkdir failed for /system/app/SuperSU, Read-only file system chown: /system/app/SuperSU: No such file or directory chown: /system/app/SuperSU: No such file or directory Unable to open /system/app/SuperSU: No such file or directory /data/local/tmp/g2_root.sh[246]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[246]: /system/toolbox: not found aaa aaa /data/local/tmp/g2_root.sh[246]: /system/toolbox: not found [27/1484] usage: chcon context path... usage: chcon context path... rm: /system/app/SuperSU/SuperSU.apk: No such file or directory rm: /system/etc/install-recovery.sh: No such file or directory /data/local/tmp/g2_root.sh[249]: /system/toolbox: not found ln: /system/bin/install-recovery.sh: File exists ln: /system/bin/install-recovery.sh: File exists /data/local/tmp/g2_root.sh[249]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[249]: /system/toolbox: not found aaa aaa rm: /system/bin/app_process: Read-only file system /data/local/tmp/g2_root.sh[274]: /system/toolbox: not found ln: /system/bin/app_process: File exists ln: /system/bin/app_process: File exists /data/local/tmp/g2_root.sh[274]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[274]: /system/toolbox: not found aaa aaa mv: rename /system/bin/app_process32 to /system/bin/app_process32_original: Read-only file system /data/local/tmp/g2_root.sh[274]: /system/toolbox: not found ln: /system/bin/app_process32: File exists ln: /system/bin/app_process32: File exists /data/local/tmp/g2_root.sh[274]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[274]: /system/toolbox: not found aaa aaa rm: /system/bin/app_process_init: No such file or directory rm: /system/etc/init.d/99SuperSUDaemon: No such file or directory /data/local/tmp/g2_root.sh[276]: can't create /system/etc/.installed_su_daemon: Read-only file system chown: /system/etc/.installed_su_daemon: No such file or directory chown: /system/etc/.installed_su_daemon: No such file or directory Unable to open /system/etc/.installed_su_daemon: No such file or directory /data/local/tmp/g2_root.sh[277]: /system/toolbox: not found /system/bin/toolbox: invalid option -- h aaa chcon: invalid option -- h aaa /data/local/tmp/g2_root.sh[277]: /system/toolbox: not found aaa aaa /data/local/tmp/g2_root.sh[277]: /system/toolbox: not found usage: chcon context path... usage: chcon context path... ui_print - Post-installation script rm: /system/toolbox: No such file or directory /data/local/tmp/g2_root.sh[281]: /system/xbin/su: not found ui_print - Unmounting /system and /data failed: Device or resource busy failed: Device or resource busy ui_print - Done !
# ls -l /data/local/tmp/busybox -rw-rw-rw- shell shell 1048328 2015-01-18 16:00 busybox # chmod 777 /data/local/tmp/busybox Unable to chmod /data/local/tmp/busybox: Operation not permitted # df |grep /data /data 25.48G 1.50G 23.98G 4096 # mount |grep data /dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,seclabel,noatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,resuid=1000,errors=continue,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 ro,seclabel,nosuid,nodev,relatime,data=ordered 0 0 /dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0
/system/etc/.installed_su_daemon: Read-only file system /data/local/tmp/g2_root.sh[130]: /data/local/tmp/busybox: can't execute: Permission denied /plop/tmp/g2_root.sh[242]: can't create /system/xbin/supolicy: Read-only file system /plop/tmp/g2_root.sh[242]: can't create /system/lib/libsupol.so: Read-only file system
# mount -o remount,rw /system mount: Permission denied
Apache Proxy inverse sort par un proxy
Exemple de configuration Apache
http://monsite.fr
http://monsite.fr/sitedistant
Activation des modules apaches
a2enmod proxy proxy_http proxy_connect
/etc/apache2/conf.d/truc.conf
# Conf Proxy inverse AllowCONNECT 443 SSLProxyEngine on ProxyPass /Truc/ https://monsite.fr/Arbo/ # retry=0 ProxyPassReverse /Truc/ https://monsite.fr/Arbo/ # Conf client proxy # Si le serveur doit sortir par un proxy ProxyRemote * http://192.168.2.104:3128
On vérifie la conf
apachectl -t
On recharge la conf Apache
service apache2 reload
Exemple de conf/directives de reverse proxy Apache
<VirtualHost *:80> ServerName jenkins.acme.fr <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} </IfModule> </VirtualHost> <VirtualHost *:443> ServerName jenkins.acme.fr SSLEngine On SSLCertificateFile /etc/ssl/certs/wildcard_acme.fr.crt SSLCertificateKeyFile /etc/ssl/private/wildcard_acme.fr.key SSLCertificateChainFile /etc/ssl/certs/wildcard_acme.fr_ca-bundle.crt SSLProtocol all -SSLv2 -SSLv3 SSLHonorCipherOrder on # apache 2.1+ <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^/jenkins/(.*) https://jenkins.acme.fr/$1 [R,L] </IfModule> ProxyPass / http://127.0.0.1:8880/jenkins/ nocanon ProxyPassReverse / http://127.0.0.1:8880/jenkins/ ProxyPassReverse / https://jenkins.acme.fr/ ProxyRequests Off ProxyPreserveHost On AllowEncodedSlashes NoDecode </VirtualHost>
Ou moins impactant
<VirtualHost *:80> ServerName jenkins.acme.fr <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^/$ http://jenkins.acme.fr/jenkins/ [R,L] </IfModule> ProxyPass /jenkins/ http://127.0.0.1:8880/jenkins/ ProxyPassReverse /jenkins/ http://127.0.0.1:8880/jenkins/ </VirtualHost>
Désactiver IPv6
Boot Linux Kernel parameter
ipv6.disable=1 # disable_ipv6=
Désactiver IPv6 sous Debian
cat > /etc/sysctl.d/70-disable-ipv6.conf <<EOF net.ipv6.conf.all.disable_ipv6 = 1 EOF sysctl -p /etc/sysctl.d/10-noipv6.conf
Si module
cat >/etc/modprobe.d/blacklist-ipv6.conf <<EOF blacklist ipv6 install ipv6 /bin/false EOF
/etc/apt/apt.conf.d/99force-ipv4
Acquire::ForceIPv4 "true";
Désactiver IPv6 sous RedHat
sysctl -w net.ipv6.conf.all.disable_ipv6=1 sysctl -w net.ipv6.conf.default.disable_ipv6=1 #sysctl -w net.ipv6.conf.lo.disable_ipv6 = 1
/etc/sysconfig/network-scripts/ifcfg-eth0
IPV6INIT=no IPV6_DISABLED=yes
nmcli connection show nmcli connection modify Example ipv6.method disabled
/etc/default/grub
GRUB_CMDLINE_LINUX="ipv6.disable=1 crashkernel=auto rhgb quiet"
grub2-mkconfig -o /boot/grub2/grub.cfg grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
/etc/ssh/sshd_config
AddressFamily inet
Java
Djava.net.preferIPv4Stack=true
Autres
/etc/systemd/system/rpcbind.socket.d/noipv6.conf
[Socket] ListenStream= ListenDatagram= ListenStream=0.0.0.0:111 ListenDatagram=0.0.0.0:111
/etc/wgetrc
# To try ipv6 addresses first: #prefer-family = IPv6
Pb
Erreur Address family not supported by protocol
Exemple
SystemD Socket
BindIPv6Only=both
Erreur Address family not supported by protocol lors de systemctl status quand IPV6 est désactivé dans sysctl.conf.
A tester : systemctl --failed
Résolution Après avoir modifié /etc/sysctl.conf ou des fichiers dans /etc/sysctl.d/ il est nécessaire de reconstruire l'initramfs.
dracut -f -v
Pour vérifier
ifconfig | grep inet6 cat /proc/sys/net/ipv6/conf/eth0/disable_ipv6
NIS l’ancêtre au couple DNS/LDAP pour la liste des machines et des comptes
Inconvénient
- Ça utilise RPC, c'est compliquer niveau pare-feu.
- C'est quasiment abandonnée de tous
- Ça ne fonctionne que pour les Unix et autre unix-like
- Sécurité !?
Notes en vrac conf du client
- /etc/nsswitch.conf
passwd: compat winbind shadow: compat group: compat winbind hosts: files nis dns bootparams: nisplus [NOTFOUND=return] files ethers: files netmasks: files networks: files protocols: files rpc: files services: files netgroup: files nis publickey: nisplus automount: files aliases: files nisplus
Pour tester et connaitre le domaine à interroger
yptest
Lister toutes les machines et IP
ypcat hosts
Listes passwd des comptes, y compris NIS
getent passwd
Tester le compte “marsu”
#getent passwd DOMAIN/marsu getent passwd marsu
Changer provisoirement le domaine NIS
ici notre domaine s’appelle “acme”
domainname acme
Définir le domaine NIS
echo acme > /etc/defaultdomain
Tester
yptest
Test 1: domainname Configured domainname is "acme" Test 2: ypbind Can't communicate with ypbind root@ttest01:~# ypbind
En cas de pb Vérifier que le domaine est le bon. Vérifier que rpcbind ou portmapper soit démarré Vérifier que le process ypbind est bien démarré.
ps -ef |grep ypbind
/usr/sbin/ypbind -no-dbus
Si le process ypbind est absent on peut tester avec l'option -d pour debug
/usr/sbin/ypbind -d -no-dbus
NIS utilise les RPC, rpcbind doit être démarré
Voir bug https://bugs.launchpad.net/ubuntu/+source/rpcbind/+bug/1558196
systemctl restart rpcbind systemctl nis restart
systemctl add-wants multi-user.target rpcbind.service
