Remove All Ads from XDA
Find Your Device:
Or Continue to Thread: [DEV] HowTo Basic Dev Steps (U…
11th July 2014, 08:54 PM |#1  
OP Junior Member
Thanks Meter: 6
Enable Developer Mode:
( on the watch )
tap clock, swipe up and go all the way down to “About”
tab build number several times. You’ll know
up one menu, “Developer Options” -> “ADB debugging”
your phone will ask you to allow debugging
dock it, plug usb to computer
in terminal:
adb usb
adb devices
(check out your device’s serial #)
adb shell (woot! shell on your watch!)
Backup contents of system partition
mkdir system
adb pull /system ./system
Void the warranty (unlock bootloader)
adb reboot-bootloader
fastboot oem unlock

follow instructions on device
device will factory reset & reboot
Root ( needed to dump partition images, otherwise not particularly useful )
credit for this:
get this:
adb reboot-bootloader
Boot the image: fastboot boot LGGW-rootboot.img
intended to boot only once (installs su, etc)
adb shell

now what?
Dump some partitions: ( in a root shell on the watch )
partition layout
mmcblk0p15 - boot
mmcblk0p16 - recovery
mmcblk0p19 - system
mmcblk0p20 - cache
mmcblk0p21 - userdata
dump some partitions. for example: ( jump into adb shell, as root )
dd if=/dev/block/mmcblk0p15 of=/sdcard/backup/boot.img
dd if=/dev/block/mmcblk0p16 of=/sdcard/backup/recovery.img
dd if=/dev/block/mmcblk0p19 of=/sdcard/backup/system.img
dd if=/dev/block/mmcblk0p20 of=/sdcard/backup/cache.img
DONT TRY TO BACKUP mmcblk0p21 to the sdcard!!! the “sdcard” is on that partition!!
pull the images. for example: ( on your computer )
adb pull /sdcard/backup/boot.img .
adb pull /sdcard/backup/recovery.img .
adb pull /sdcard/backup/system.img .
adb pull /sdcard/backup/cache.img .
maybe delete those images from the device when you are done
Have Fun!
Restore images (flash via fastboot)

fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img
fastboot flash cache cache.img
The following may be tricky, might break stuff, and is generally not recommended unless you really know what you are doing
You have been warned!

Install a zip file using the stock recovery (might only work with signed updates, not roms)
In a terminal on your computer:
adb push /sdcard/
adb shell
cp /sdcard/ /cache/
echo 'boot-recovery ' > /cache/recovery/command
echo '--update_package=/cache/' >> /cache/recovery/command
reboot recovery

Enable Bluetooth debugging (really slow, kinda lame)
connect your phone over usb
on watch, in developer settings, Debug over Bluetooth
on phone, open wear app, in settings Debugging over bluetooth
on computer:
adb forward tcp:4444 localabstract:/adb-hub
adb connect localhost:4444
adb shell
Install Debian chroot
on your phone (thats right, your phone) install Debian Kit from Play Store
open it, it the download button in top right corner
download debian-kit-1-6-testing.shar
open an adb shell to your phone ( i prefer usb)
cd /sdcard/Download
on my phone it always downloads it as a .jpeg rename it to .shar
mv debian-kit-1-6-testing.jpeg debian-kit-1-6-testing.shar
sh debian-kit-1-6-testing.shar

Answer Y to unpack
read the menu, then choose 0j (wheezy does not work in this script, don’t want it anyway)
it will now create /sdcard/debian.img (512mb) (will take a couple minutes)
next it will mount the image
next it will debootstrap a basic installation of jessie to the image (this takes a long time, ~30 minutes)
you might see an error “cannot create symlink…” that’s good, we don’t want to touch /system anyway
once its done. copy that debian.img from your phone to your computer
adb pull /sdcard/debian.img .
we also need everything it unpacked to /data/local/deb
mkdir deb
adb pull /data/local/deb ./deb
unplug phone and plug in the watch, then push those to the watch

adb push debian.img /sdcard/
adb push deb /data/local/
debian will not have internet access, the watch has no wifi. need to figure out how to forward over bluetooth
now what? check out this page:
Also, the best Fastboot Doc ever:
Last edited by mcbishop; 22nd October 2014 at 08:56 PM. Reason: fix error in dd usage
The Following 6 Users Say Thank You to mcbishop For This Useful Post: [ View ] Gift mcbishop Ad-Free