# Adb Sync To Quickly Update Roms From Svn: Works For Hboot 1.50 Too



## USSENTERNCC1701E

I already posted this in the Warm thread, but there are a lot of devs using SVN, so I hope it can be usefull for more than just the Mynions









I figured out a really quick and easy way to update SVN ROM's using adb on Windows.

This is how to export only the changes since the last time you've installed the ROM using Tortoise SVN. Right click on the SVN folder and select TortoiseSVN -> Show log. Highlight the last revision you installed and all the revisions you wish to install, right click and select Compare revisions. In the new window highlight everything, right click select Export to. Create a new folder for this.

For adb sync to work properly you will need to create an Environment Variable. For Windows 7, and I believe Vista: Start -> right click Computer -> Properties -> Advanced system settings -> Environment variables -> New system variable. Variable name: ANDROID_PRODUCT_OUT Variable value: the directory you exported the SVN revisions to, I named mine C:\Android\3VO\Warm\Current

I also recommend adding adb to the PATH so this can be executed from the RUN command. To do this, highlight Path in System Variables click edit, do NOT remove anything from Variable value, at the very end add


Code:


;C:\android\platform-tools\

Reboot your computer

After this to update you phone just delete the contents of the ANDROID_PRODUCT_OUT directory, export SVN revisions to the directory and execute adb sync and lastly reboot your phone.

Depending on the time since the last update the whole process can take just a couple minutes.

EDIT: I forgot to mention that this only syncs changes to /system and /data. There's no need to worry about META-INF changes but keep an eye out for changes to other files and folders, this will probably only be boot.img and /sdcard

EDIT:

For HBOOT 1.50 unlocked via the HTC Unlock method

Open a command prompt and reboot to recovery


Code:


adb reboot recovery

In the recovery menu navigate to Mount Menu then select mount /system and mount /data

Then you can adb sync as usual while in recovery. A bit more of a pain fvck you very much HTC for that, but still quicker than flashing a .zip.


----------



## FisherOfMen58

Jaren, what a time and hassle saver...Thanks :smile3:


----------



## USSENTERNCC1701E

The digitizer on my phone died, took it in to Sprint and they gave me a new phone. I had a bit of a tantrum in the parking lot when I found it had HBOOT 1.50







However, I am now able to experiment with ADB sync on a phone with the HTC "_unlock_"


----------



## USSENTERNCC1701E

Damn


Code:


Microsoft Windows [Version 6.1.7601]<br />
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.<br />
<br />
C:\Users\Administrator>cd downloads<br />
<br />
C:\Users\Administrator\Downloads>adb push HTC_IME.apk /system/app/HTC_IME.apk<br />
failed to copy 'HTC_IME.apk' to '/system/app/HTC_IME.apk': Read-only file system<br />
<br />
<br />
C:\Users\Administrator\Downloads>adb remount<br />
remount failed: Operation not permitted<br />
<br />
C:\Users\Administrator\Downloads>adb kill-server<br />
<br />
C:\Users\Administrator\Downloads>adb root<br />
* daemon not running. starting it now on port 5037 *<br />
* daemon started successfully *<br />
adbd cannot run as root in production builds<br />
<br />
C:\Users\Administrator\Downloads>adb remount<br />
remount failed: Operation not permitted<br />
<br />
C:\Users\Administrator\Downloads>adb kill-server<br />
<br />
C:\Users\Administrator\Downloads>adb remount<br />
* daemon not running. starting it now on port 5037 *<br />
* daemon started successfully *<br />
remount failed: Operation not permitted<br />
<br />
C:\Users\Administrator\Downloads>

 I'm running Warm TwoPointThree, root apks work, but apparently HTC has cut off adb at the nuts with the "_unlock_"

I managed to get ADB to run as root using unrevoked's zergRush



Code:


Microsoft Windows [Version 6.1.7601]<br />
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.<br />
<br />
C:\Users\Administrator>cd android/androidSDK/platform-tools<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\platform-tools>adb push zergRush /data<br />
/local/zergRush<br />
662 KB/s (23056 bytes in 0.034s)<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\platform-tools>adb shell<br />
$ chmod 755 /data/local/zergRush<br />
chmod 755 /data/local/zergRush<br />
$ /data/local/zergRush<br />
/data/local/zergRush<br />
<br />
[**] Zerg rush - Android 2.2/2.3 local root<br />
[**] (C) 2011 Revolutionary. All rights reserved.<br />
<br />
[**] Parts of code from Gingerbreak, (C) 2010-2011 The Android Exploid Crew.<br />
<br />
[+] Found a GingerBread ! 0x00016118<br />
[*] Scooting ...<br />
[*] Sending 149 zerglings ...<br />
[+] Zerglings found a way to enter ! 0x10<br />
[+] Overseer found a path ! 0x000161e0<br />
[*] Sending 149 zerglings ...<br />
[+] Zerglings caused crash (good news): 0x401219c4 0x0054<br />
[*] Researching Metabolic Boost ...<br />
[+] Speedlings on the go ! 0xafd199b3 0xafd39ad7<br />
[*] Popping 24 more zerglings<br />
[*] Sending 173 zerglings ...<br />
<br />
[+] Rush did it ! It's a GG, man !<br />
[+] Killing ADB and restarting as root... enjoy!<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\platform-tools>cd /Users/Administrator<br />
/Downloads<br />
<br />
C:\Users\Administrator\Downloads>adb push HTC_IME.apk /system/app/HTC_IME.apk<br />
failed to copy 'HTC_IME.apk' to '/system/app/HTC_IME.apk': Read-only file system<br />
<br />
<br />
C:\Users\Administrator\Downloads>adb root<br />
adbd is already running as root<br />
<br />
C:\Users\Administrator\Downloads>adb push HTC_IME.apk /system/app/HTC_IME.apk<br />
failed to copy 'HTC_IME.apk' to '/system/app/HTC_IME.apk': Read-only file system<br />
<br />
<br />
C:\Users\Administrator\Downloads>

 but, from the looks of it, with S-ON /system is read-only, at least while the phone is booted to system, maybe I can get it to work form recovery. It's just so much simpler to update a ROM from SVN using ADB sync than with a zip.

Well adb thinks it writes to /system from recovery


Code:


Microsoft Windows [Version 6.1.7601]<br />
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.<br />
<br />
C:\Users\Administrator>adb reboot recovery<br />
<br />
C:\Users\Administrator>adb sync<br />
syncing /system...<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/Settings.apk -> /system/app/Settings.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/Idlescreen_Base.apk -> /system/app/Idlescreen_Base.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/HTC_IME.apk -> /system/app/HTC_IME.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/fusion.apk -> /system/app/fusion.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/framework/com.htc.resources.apk -> /system/framework/com.htc.resources.apk<br />
5 files pushed. 0 files skipped.<br />
2265 KB/s (111764895 bytes in 48.184s)<br />
syncing /data...<br />
cannot open 'C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\data/<br />
': No such file or directory<br />
<br />
C:\Users\Administrator>adb reboot<br />
<br />
C:\Users\Administrator>cd android/androidsdk/android_product_out/system/app<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system\app>adb push Settings.apk /sdcard/Settings.apk<br />
1926 KB/s (9992385 bytes in 5.065s)<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system\app>adb shell<br />
$ /system/xbin/busybox md5sum /system/app/Settings.apk<br />
/system/xbin/busybox md5sum /system/app/Settings.apk<br />
3878ccb18bb600d9c05f5e6ac0b0e6b5  /system/app/Settings.apk<br />
$ /system/xbin/busybox md5sum /sdcard/Settings.apk<br />
/system/xbin/busybox md5sum /sdcard/Settings.apk<br />
e7e540d6de9d90b5bb4ae25de777d0ff  /sdcard/Settings.apk<br />
$

 but clearly this did not stick after a reboot.

I'd read that booting a recovery image from fastboot may allow alterations to /system


Code:


Microsoft Windows [Version 6.1.7601]<br />
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.<br />
<br />
C:\Users\Administrator>adb reboot bootloader<br />
* daemon not running. starting it now on port 5037 *<br />
* daemon started successfully *<br />
<br />
C:\Users\Administrator>cd android/androidsdk/platform-tools<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\platform-tools>fastboot boot recovery.img<br />
cannot load 'recovery.img'<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\platform-tools>fastboot boot recovery-twrp-shooter-1.1.1.img<br />
downloading 'boot.img'...<br />
OKAY [  1.570s]<br />
booting...<br />
OKAY [  0.003s]<br />
finished. total time: 1.573s<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\platform-tools>adb sync<br />
syncing /system...<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/Settings.apk -> /system/app/Settings.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/Idlescreen_Base.apk -> /system/app/Idlescreen_Base.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/HTC_IME.apk -> /system/app/HTC_IME.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/fusion.apk -> /system/app/fusion.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/framework/com.htc.resources.apk -> /system/framework/com.htc.resources.apk<br />
5 files pushed. 0 files skipped.<br />
2398 KB/s (111764895 bytes in 45.510s)<br />
syncing /data...<br />
cannot open 'C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\data/<br />
': No such file or directory<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\platform-tools>adb reboot<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\platform-tools>cd /users/administrator/android/androidsdk/android_product_out/system/app<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system\app>adb push Settings.apk /sdcard/Settings.apk<br />
843 KB/s (9992385 bytes in 11.571s)<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system\app>adb shell<br />
$ /system/xbin/busybox md5sum /system/app/Settings.apk<br />
/system/xbin/busybox md5sum /system/app/Settings.apk<br />
3878ccb18bb600d9c05f5e6ac0b0e6b5  /system/app/Settings.apk<br />
$ /system/xbin/busybox md5sum /sdcard/Settings.apk<br />
/system/xbin/busybox md5sum /sdcard/Settings.apk<br />
e7e540d6de9d90b5bb4ae25de777d0ff  /sdcard/Settings.apk<br />
$

 still no go.

Thought I'd give booting recovery from RUU mode a shot


Code:


Microsoft Windows [Version 6.1.7601]<br />
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.<br />
<br />
C:\Users\Administrator>adb reboot bootloader<br />
<br />
C:\Users\Administrator>fastboot oem rebootRUU<br />
...<br />
(bootloader) Start Verify: 3<br />
(bootloader) Start Verify: 3<br />
(bootloader) erase sector 130560 ~ 131071 (512)<br />
OKAY [  1.729s]<br />
finished. total time: 1.730s<br />
<br />
C:\Users\Administrator>cd android/androidsdk/platform-tools<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\platform-tools>fastboot boot recovery-twrp-shooter-1.1.1.img<br />
downloading 'boot.img'...<br />
OKAY [  1.575s]<br />
booting...<br />
OKAY [  0.002s]<br />
finished. total time: 1.578s<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\platform-tools>adb sync<br />
syncing /system...<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/Settings.apk -> /system/app/Settings.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/Idlescreen_Base.apk -> /system/app/Idlescreen_Base.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/HTC_IME.apk -> /system/app/HTC_IME.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/fusion.apk -> /system/app/fusion.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/framework/com.htc.resources.apk -> /system/framework/com.htc.resources.apk<br />
5 files pushed. 0 files skipped.<br />
2371 KB/s (111764895 bytes in 46.025s)<br />
syncing /data...<br />
cannot open 'C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\data/<br />
': No such file or directory<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\platform-tools>adb reboot<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\platform-tools>cd /users/administrator/android/androidsdk/android_product_out/system/app<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system\app><br />
C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system\app>adb push Settings.apk /sdcard/Settings.apk<br />
840 KB/s (9992385 bytes in 11.610s)<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system\app>adb shell<br />
$ /system/xbin/busybox md5sum /system/app/Settings.apk<br />
/system/xbin/busybox md5sum /system/app/Settings.apk<br />
3878ccb18bb600d9c05f5e6ac0b0e6b5  /system/app/Settings.apk<br />
$ /system/xbin/busybox md5sum /sdcard/Settings.apk<br />
/system/xbin/busybox md5sum /sdcard/Settings.apk<br />
e7e540d6de9d90b5bb4ae25de777d0ff  /sdcard/Settings.apk<br />
$

 more fail.


----------



## USSENTERNCC1701E

Got it!

Reboot to recovery


Code:


Microsoft Windows [Version 6.1.7601]<br />
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.<br />
<br />
C:\Users\Administrator>adb reboot recovery

on the phone (this is for TWRP) -> Mount Menu -> mount /system + mount /data

Then on the computer


Code:


C:\Users\Administrator>adb sync<br />
syncing /system...<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/Settings.apk -> /system/app/Settings.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/Idlescreen_Base.apk -> /system/app/Idlescreen_Base.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/HTC_IME.apk -> /system/app/HTC_IME.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/app/fusion.apk -> /system/app/fusion.apk<br />
push: C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system/framework/com.htc.resources.apk -> /system/framework/com.htc.resources.apk<br />
5 files pushed. 0 files skipped.<br />
2479 KB/s (111764895 bytes in 44.024s)<br />
syncing /data...<br />
cannot open 'C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\data/<br />
': No such file or directory<br />
<br />
C:\Users\Administrator>adb reboot

And an MD5 check to show it retained the file this time


Code:


C:\Users\Administrator>cd /users/administrator/android/androidsdk/android_product_out/system/app<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system\app>adb push Settings.apk /sdcard/Settings.apk<br />
941 KB/s (9992385 bytes in 10.365s)<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system\app>adb shell /system/xbin/busybox md5sum /system/app/Settings.apk<br />
e7e540d6de9d90b5bb4ae25de777d0ff  /system/app/Settings.apk<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system\app>adb shell /system/xbin/busybox md5sum /sdcard/Settings.apk<br />
e7e540d6de9d90b5bb4ae25de777d0ff  /sdcard/Settings.apk<br />
<br />
C:\Users\Administrator\Android\AndroidSDK\ANDROID_PRODUCT_OUT\system\app>


----------

