LG Optimus Slider (lg-vm701)

From postmarketOS
Jump to navigation Jump to search
LG Optimus Slider
[[|200px|alt=]]
Manufacturer LG
Name Optimus Slider
Codename lg-gelato-q
Released 2011
Category testing
Original software Android 2.3
Hardware
Chipset Qualcomm MSM7627T
CPU 800 MHz ARM11
GPU Adreno 200
Display 320 x 480 TFT
Storage 512 MB
Memory 512 MB
Architecture armhf
Features
USB Networking
Flashing
Touchscreen
Display
WiFi
Xwayland
FDE
Mainline
Battery
3D Acceleration
Accelerometer
Audio
Bluetooth
Camera
GPS
Mobile data
SMS
Calls
USB OTG


Contributors

  • Foldmorepaper

Users owning this device


What Works

The kernel compiles!

What Does Not Work

Flashing is possible, but does not work due to these problems:

  • booting off SD is necessary as system and userdata partitions are too small for the current image
  • attempting to boot using pmbootstrap flasher boot uploads but fails to boot after printing the cmdline to the screen.

Rooting

The exploit used on the LG Esteem also works on the Optimus Slider. Please see this forum thread on AndroidCentral for instructions. [1]

The tool referenced has a dead download link, but is available through the Internet Archive's Wayback Machine. LG_Esteem_Root.zip on archive.org

The tool runs from a .bat script. Though the changes necessary to run it on linux are trivial, here is the modified script:

run.sh
 1 #!/bin/bash                     
 2 #####################################
 3 #                  
 4 #  LG Esteem root script
 5 #  Linux version        
 6 #
 7 #  Exploit copyright (C) 2011 Revolutionary
 8 #  Scripting for LG Esteem by Dan Rosenberg (@djrbliss)
 9 #  Modified for Linux by foldmorepaper (@foldmorepaper)
10 #
11 #####################################
12 #                                                                                              
13 # Instructions:
14 #                  
15 #  1. Ensure you have the latest drivers installed from LG
16 #                                                                                              
17 #  2. Put your device in debugging mode                                                        
18 #                                                                                              
19 #  3. Attach it via USB   
20 #                                   
21 #  4. Run this script in the same directory as the rest of the extracted
22 #     zipfile                                                                                  
23 #                                                                                              
24 #####################################                                                          
25 echo "[*] LG Esteem root script (Linux version)"                
26 echo "[*] Exploit copyright (C) 2011 Revolutionary"                           
27 echo "[*] Scripting for LG Esteem by Dan Rosenberg (@djrbliss)"
28 echo "[*] Linux script by foldmorepaper (@foldmorepaper)"
29 echo "[*]"               
30 echo "[*] Before continuing, ensure USB debugging is enabled, that you"
31 echo "[*] have the latest LG drivers installed, and that your phone is"
32 echo "[*] connected via USB."
33 echo "[*]"             
34 read -p "[*] Press enter to root your phone..." 
35 echo "[*]"
36                                                
37 echo "[*] Waiting for device..."
38 adb kill-server                  
39 adb wait-for-device
40                                                                                                
41 echo "[*] Device found."
42 
43 echo "[*] Pushing exploit binary..."
44 adb push zergrush /data/local/tmp/zergrush
45 adb shell "chmod 755 /data/local/tmp/zergrush"
46 
47 echo "[*] Running exploit..."
48 adb shell "echo exit | /data/local/tmp/zergrush"
49 
50 # Install the goods
51 echo "[*] Installing root tools..."
52 adb shell /data/local/tmp/sh -c "mount -orw,remount /dev/block/system /system"
53 adb shell /data/local/tmp/sh -c "mkdir /system/tmp"
54 adb shell /data/local/tmp/sh -c "chmod 777 /system/tmp"
55 adb push su /system/tmp/su
56 adb push busybox /system/tmp/busybox
57 adb push Superuser.apk /system/tmp/Superuser.apk
58 adb shell /data/local/tmp/sh -c "mv /system/tmp/su /system/xbin/su"
59 adb shell /data/local/tmp/sh -c "mv /system/tmp/Superuser.apk /system/app/Superuser.apk"
60 adb shell /data/local/tmp/sh -c "mv /system/tmp/busybox /system/xbin/busybox"
61 adb shell /data/local/tmp/sh -c "chown root /system/xbin/su"
62 adb shell /data/local/tmp/sh -c "chmod 4755 /system/xbin/su"
63 adb shell /data/local/tmp/sh -c "ln -s /system/xbin/su /system/bin/su"
64 adb shell /data/local/tmp/sh -c "chmod 755 /system/xbin/busybox"
65 adb shell /data/local/tmp/sh -c "/system/xbin/busybox --install /system/xbin/"
66 
67 # Clean up after ourselves
68 echo "[*] Cleaning up..."
69 adb shell /data/local/tmp/sh -c "rmdir /system/tmp"
70 adb shell "rm /data/local/tmp/* 2>/dev/null"
71 
72 echo "[*] Rebooting..."
73 adb reboot
74 
75 adb wait-for-device
76 echo "[*] Root complete, enjoy!"
77 echo "[*] Press any key to exit."
78 adb kill-server

Additional Info

Partitions
# cat /proc/partitions
major minor  #blocks  name

  31        0       5120 mtdblock0
  31        1     117888 mtdblock1
  31        2       7168 mtdblock2
  31        3       1280 mtdblock3
  31        4       1024 mtdblock4
  31        5       1024 mtdblock5
  31        6     161792 mtdblock6
  31        7     185344 mtdblock7
  31        8        512 mtdblock8
  31        9       1536 mtdblock9
fstab
# cat /etc/fstab 
/dev/block/mtdblock1 /cache yaffs2 rw
/dev/block/mtdblock7 /data yaffs2 rw
/dev/block/mmcblk0p1 /sdcard vfat rw
 /sd-ext auto rw
/dev/block/mtdblock6 /system yaffs2 rw
mtd
# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00500000 00020000 "boot"
mtd1: 07320000 00020000 "cache"
mtd2: 00700000 00020000 "recovery"
mtd3: 00140000 00020000 "splash"
mtd4: 00100000 00020000 "FOTA"
mtd5: 00100000 00020000 "FOTA_STO"
mtd6: 09e00000 00020000 "system"
mtd7: 0b500000 00020000 "userdata"
mtd8: 00080000 00020000 "misc"
mtd9: 00180000 00020000 "persist"

Custom Recovery

Two custom recoveries are available for the vm701. Use in the context of postmarketOS:

  • CWM
    • Enable fastboot by formatting the the boot partition
    • Restore commonly-available Android system backups
  • TWRP
    • ADB access without booting Android

To flash a custom recovery to the recovery partition (before having access to fastboot), the tool flash_image is required. (available from, among other sources, BobZhome ROM's) [2]

flash_image Installation & Usage
$ adb push recovery.img /sdcard/
$ adb push flash_image /sdcard/
$ adb shell
$ su
# mount -o remount, rw /system
# cp /sdcard/flash_image /system/bin
# chmod 777 /system/bin/flash_image
# flash_image recovery /sdcard/recovery.img
# reboot recovery

Booting to Recovery

  • From power-off: hold buttons Power + Volume Down until booted into recovery
  • Using ADB: $ adb reboot recovery
  • Using fastboot: $ fastboot reboot recovery

CWM

A custom CWM recovery is available from BobZhome ROM's. [3] Push to SD card: $ adb push BobZhome_VM701_recovery.img /sdcard/

The volume buttons scroll through menu options, and the camera button selects menu options

Flash from Android

Using flash_image, flash recovery image to recovery partition (from ADB):

# flash_image recovery /sdcard/BobZhome_VM701_recovery.img

Flash/Boot from Fastboot

Boot recovery image fastboot boot BobZhome_VM701_recovery.img
Flash recovery image fastboot flash recovery BobZhome_VM701_recovery.img

TWRP

Download the official TWRP recovery from the device page. [4] Push to SD card: $ adb push twrp-2.8.5.0-gelato.img /sdcard/

Flash from Android

Using flash_image, flash recovery image to recovery partition (from ADB):

# flash_image recovery /sdcard/twrp-2.8.5.0-gelato.img

Flash/Boot from Fastboot

Boot recovery image fastboot boot twrp-2.8.5.0-gelato.img
Flash recovery image fastboot flash recovery twrp-2.8.5.0-gelato.img

Installation

Fastboot

Fastboot is only available upon erasing/formatting the boot partition. There are alternative means of nulling the boot partition, but CWM is the easiest.

It is recommended, as always, to make a full system backup before doing any modifications. This is especially necessary in this case, as unbricking from emergency mode (camera button + backup button, plug in usb cable to computer) is not possible, even though the lg mobile support tool recognizes the device and downloads a firmware image, an unknown error occurs.

To format the boot partition, Mounts and Storage -> format /boot -> Yes - Format
On boot, fastboot should automatically start. To restore normal boot functionality, restore boot partition from backup.

See also

FCC Internal Photos