Outils pour utilisateurs

Outils du site


tech:note_android_smartphone_root_lg_g3_d855

Note Android smartphone root LG G3 D855

Téléchargement de LG_Root.zip

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

https://forum.xda-developers.com/t/guide-new-root-method-for-lg-devices.3049772/page-23#post-60557353

#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
tech/note_android_smartphone_root_lg_g3_d855.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki