I found my old htc desire (O2 network) lying in a drawer and decided to boot it up to see what's on it.

I seem to have forgotten the lock pattern (at least it doesn't recognise the one's I remember).

It has a SIM in it but it is ancient as I upgraded phones twice since. Likewise I have changed my wifi password more than a few times since. So its impossible to use my gmail password as it has no wifi connection.

It does have adb debugging switched on however and I have managed to get "adb shell" to work.

Q Is it possible to bypass the lockscreen using adb without a factory reset.

The first thing I tried was:

reboot recovery

The phone rebooted but now displays a picture of a phone with a red triangle and an exclamation mark. This apparently is recovery mode but I could not see how to do anything from here.

adb does not work in recovery mode.

I think the only thing that can be done from there is a factory reset. but how?

To exit recovery mode I had to remove the battery, wait 5 seconds and power on the phone.

The next thing I tried is:

adb shell rm /data/system/gesture.key

which gives:

rm failed for /data/system/gesture.key, Permission denied

I'd like to see what data is left on it without a factory reset if that's possible. Is it? What can I do from here?

This page suggests I need to be in recovery mode to do this. But adb does not want to connect in recovery mode.

Would putting a pay as you go SIM in help? Assuming I can find a full size SIM anywhere these days? If it was recognised I could then try the recovery via gmail option.

See also Can not unlock my Android device as have no internet connection?

Answers to suggestions in comments:

>adb ls /sdcard
/sdcard/: 0 files pulled, 0 skipped.

Unsuprising as there is no SD card However I can pull default.prop:

>adb pull /default.prop
/default.prop: 1 file pulled, 0 skipped. 0.0 MB/s (118 bytes in 0.026s)

>more default.prop

This is what I can see:

>adb ls /
000041ed 00000000 12d941d9 .
000041ed 00000000 12d941d9 ..
000043ff 0000003c 12d941f1 app-cache
00004140 00000000 12d941d9 config
000041f8 00000800 4f6201b3 cache
0000a1ff 0000000b 12d941d9 sdcard
000041ed 00000000 12d941d9 acct
000041fd 00000000 12d941d9 mnt
0000a1ff 00000011 12d941d9 d
0000a1ff 0000000b 12d941d9 etc
000041ed 00000800 4f620179 system
000041ed 00000000 00000001 sys
000081a4 00000000 00000000 shutdown.bravo.rc
000041e8 00000000 00000000 sbin
0000416d 00000000 00000000 proc
000081e8 00003980 00000000 init.rc
000081e8 0000068d 00000000 init.goldfish.rc
000081e8 00000f2f 00000000 init.bravo.rc
000081e8 0001b54c 00000000 init
000081a4 00000076 00000000 default.prop
000041f9 00000800 4bd8043c data
000081a4 000001cc 00000000 bootcomplete.bravo.rc
000041c0 00000000 4c921e8f root
000041ed 00000564 12d941da dev

This is the first time I've used adb so I'm not familiar with what I can and can't do. If I do:

>adb pull /

I think I can pull all that is pullable. Is there any important user data in the read protected files I miss doing this?

A wifi hotspot with the old settings is a good idea but I can't remember them.

Just found a driver full of backup data for this phone dated 2011. Possibly from when I upgraded. So even older than I thought.


ANDROID_ROOT=/system LD_LIBRARY_PATH=/system/lib 

>adb shell getprop
[ro.secure]: [1]
[ro.allow.mock.location]: [0]
[ro.debuggable]: [0]
[persist.service.adb.enable]: [1]
[ro.factorytest]: [0]
[ro.serialno]: [HT083PL02777]
[ro.bootmode]: [normal]
[ro.baseband]: []
[ro.carrier]: [O2-UK]
[ro.bootloader]: [0.93.0001]
[ro.bootreason]: []
[ro.hardware]: [bravo]
[ro.revision]: [131]
[ro.cid]: [O2___001]
[ro.emmc]: [0]
[ro.VISIBLE_APP_MEM]: [4096]
[ro.BACKUP_APP_MEM]: [6144]
[ro.HOME_APP_MEM]: [6144]
[ro.HIDDEN_APP_MEM]: [7168]
[ro.EMPTY_APP_MEM]: [8192]
[ro.ril.ecc.O2-UK]: [112,911,999]
[ro.ril.enable.a52.O2-UK]: [1]
[ro.ril.enable.a53.O2-UK]: [1]
[ro.ril.hsdpa.category]: [8]
[ro.ril.hsupa.category]: [5]
[ro.ril.hsxpa]: [2]
[ro.ril.disable.fd.plmn.prefix]: [23402,23410,23411]
[ro.ril.enable.sdr]: [0]
[ro.aa.cidlist]: [O2___102]
[ro.aa.modelid]: [PB9920000]
[ro.aa.skulist]: [207]
[ro.aa.maincid]: [O2___102]
[ro.aa.project]: [Bravo_Froyo]
[ro.aa.romver]: []
[ro.build.changelist]: [345089]
[ro.aa.mainsku]: [207]
[ro.aa.customizationid]: [58488]
[ro.aa.rid]: [1128]
[ro.aa.taskid]: [224278]
[ro.com.google.clientidbase]: [android-htc]
[ro.build.id]: [FRG83G]
[ro.build.display.id]: [FRG83G]
[ro.build.version.incremental]: [345089.4]
[ro.build.version.sdk]: [8]
[ro.build.version.codename]: [REL]
[ro.build.version.release]: [2.2.2]
[ro.build.date]: [三 11月  2 21:23:24 CST 2011]
[ro.build.date.utc]: [1320240204]
[ro.build.type]: [user]
[ro.build.user]: [root]
[ro.build.host]: [ABM041]
[ro.build.tags]: [release-keys]
[ro.product.model]: [HTC Desire]
[ro.product.brand]: [o2_de]
[ro.product.name]: [htc_bravo]
[ro.product.device]: [bravo]
[ro.product.board]: [bravo]
[ro.product.cpu.abi]: [armeabi-v7a]
[ro.product.cpu.abi2]: [armeabi]
[ro.product.manufacturer]: [HTC]
[ro.product.locale.language]: [hdpi]
[ro.product.locale.region]: []
[ro.wifi.channels]: []
[ro.board.platform]: [qsd8k]
[ro.build.product]: [bravo]
[ro.build.description]: [ CL345089 release-keys]
[ro.product.ua]: []
[ro.build.fingerprint]: [o2_de/htc_bravo/bravo/bravo:2.2.2/FRG83G/345089.4:user/release-keys]
[ro.build.project]: [Bravo_Froyo:224278]
[ro.product.version]: []
[keyguard.no_require_sim]: [1]
[ro.sf.lcd_density]: [240]
[rild.libpath]: [/system/lib/libhtc_ril.so]
[ro.ril.enable.dtm]: [1]
[ro.ril.gprsclass]: [12]
[ro.telephony.default_network]: [0]
[wifi.interface]: [eth0]
[wifi.supplicant_scan_interval]: [15]
[ro.opengles.version]: [131072]
[dalvik.vm.heapsize]: [24m]
[ro.ril.def.agps.mode]: [2]
[ro.phone_storage]: [0]
[ro.ril.disable.power.collapse]: [1]
[ro.ril.avoid.pdp.overlap]: [1]
[ro.ril.enable.prl.recognition]: [1]
[ro.media.enc.file.format]: [3gp,mp4]
[ro.media.enc.vid.codec]: [m4v,h263]
[ro.media.enc.vid.h263.width]: [176,1280]
[ro.media.enc.vid.h263.height]: [144,720]
[ro.media.enc.vid.h263.bps]: [64000,2000000]
[ro.media.enc.vid.h263.fps]: [1,30]
[ro.media.enc.vid.m4v.width]: [176,1280]
[ro.media.enc.vid.m4v.height]: [144,720]
[ro.media.enc.vid.m4v.bps]: [64000,2000000]
[ro.media.enc.vid.m4v.fps]: [1,30]
[ro.media.dec.jpeg.memcap]: [20000000]
[ro.htc.checkin.url]: [http://andchin.htc.com/android/checkin]
[ro.htc.checkin.crashurl]: [http://andchin.htc.com/android/crash]
[ro.htc.checkin.url_CN]: [http://andchin.htccomm.com.cn/android/checkin]
[ro.htc.checkin.crashurl_CN]: [http://andchin.htccomm.com.cn/android/crash]
[ro.htc.checkin.exmsg.url]: [http://fotamsg.htc.com/android/extra/]
[ro.htc.checkin.exmsg.url_CN]: [http://fotamsg.htccomm.com.cn/android/extra/]
[ro.bt.chipset]: [Broadcom BCM4329-B1]
[ro.bt.version]: [Bluetooth 2.1 + EDR]
[ro.bt.stack]: [Broadcom BTL-A]
[ro.bt.stack.version]: []
[ro.bt.profiles]: [4270339]
[service.brcm.bt.activation]: [0]
[service.brcm.bt.srv_active]: [0]
[service.brcm.bt.hcid_active]: [0]
[service.brcm.bt.btld]: [0]
[service.brcm.bt.btld_pid]: [0]
[service.brcm.bt.avrcp_pass_thru]: [0]
[service.brcm.bt.avrcp_toggle]: [1]
[ro.url.legal]: [http://www.google.com/intl/%s/mobile/android/basic/phone-legal.html]
[ro.url.legal.android_privacy]: [http://www.google.com/intl/%s/mobile/android/basic/privacy.html]
[ro.com.google.networklocation]: [1]
[ro.setupwizard.mode]: [DISABLED]
[ro.config.ringtone]: [Innovation.mp3]
[ro.config.notification_sound]: [Color.mp3]
[ro.config.alarm_alert]: [Light.mp3]
[ro.config.cal_notification]: [Vector.mp3]
[ro.config.msg_notification]: [Ascend.mp3]
[media.stagefright.enable-player]: [true]
[media.stagefright.enable-meta]: [true]
[media.stagefright.enable-scan]: [true]
[media.stagefright.enable-http]: [true]
[ro.com.google.gmsversion]: [2.2_r5]
[media.a1026.nsForVoiceRec]: [0]
[htc.audio.alt.enable]: [0]
[htc.audio.hac.enable]: [0]
[ro.media.enc.hprof.file.format]: [mp4]
[ro.media.enc.hprof.codec.vid]: [m4v]
[ro.media.enc.hprof.codec.aud]: [amrnb]
[ro.media.enc.hprof.vid.width]: [720]
[ro.media.enc.hprof.vid.height]: [480]
[ro.media.enc.hprof.vid.fps]: [24]
[ro.media.enc.hprof.vid.bps]: [2000000]
[ro.media.enc.hprof.aud.bps]: [12200]
[ro.media.enc.hprof.aud.hz]: [8000]
[ro.media.enc.hprof.aud.ch]: [1]
[ro.media.enc.hprof.duration]: [60]
[ro.media.enc.lprof.file.format]: [3gp]
[ro.media.enc.lprof.codec.vid]: [m4v]
[ro.media.enc.lprof.codec.aud]: [amrnb]
[ro.media.enc.lprof.vid.width]: [176]
[ro.media.enc.lprof.vid.height]: [144]
[ro.media.enc.lprof.vid.fps]: [15]
[ro.media.enc.lprof.vid.bps]: [256000]
[ro.media.enc.lprof.aud.bps]: [12200]
[ro.media.enc.lprof.aud.hz]: [8000]
[ro.media.enc.lprof.aud.ch]: [1]
[ro.media.enc.lprof.duration]: [30]
[ro.media.enc.aud.codec]: [amrnb]
[ro.media.enc.vid.h264.width]: [176,800]
[ro.media.enc.vid.h264.height]: [144,480]
[ro.media.enc.vid.h264.bps]: [64000,6000000]
[ro.media.enc.vid.h264.fps]: [1,30]
[ro.media.enc.aud.amrnb.bps]: [5525,12200]
[ro.media.enc.aud.amrnb.hz]: [8000,8000]
[ro.media.enc.aud.amrnb.ch]: [1,1]
[ro.media.dec.aud.wma.enabled]: [1]
[ro.media.dec.vid.wmv.enabled]: [1]
[ro.media.cam.preview.fps]: [0]
[ro.media.enc.jpeg.quality]: [95,85,70]
[ro.setupwizard.enterprise_mode]: [1]
[dalvik.vm.dexopt-flags]: [m=y]
[net.bt.name]: [Android]
[net.change]: [net.dnschange]
[dalvik.vm.stack-trace-file]: [/data/anr/traces.txt]
[persist.service.mount.playsnd]: [0]
[persist.radio.prefer.network]: [0]
[persist.sys.timezone]: [Europe/London]
[persist.radio.mosms.service]: [3]
[persist.sys.localevar]: []
[persist.sys.country]: [GB]
[persist.sys.language]: [en]
[ro.BACKUP_APP_ADJ]: [2]
[ro.HOME_APP_ADJ]: [4]
[ro.EMPTY_APP_ADJ]: [15]
[ro.error.receiver.htc.apps]: [com.android.updater]
[net.tcp.buffersize.default]: [4096,87380,110208,4096,16384,110208]
[net.tcp.buffersize.wifi]: [4095,87380,110208,4096,16384,110208]
[net.tcp.buffersize.umts]: [4094,87380,110208,4096,16384,110208]
[net.tcp.buffersize.edge]: [4093,26280,35040,4096,16384,35040]
[net.tcp.buffersize.gprs]: [4092,8760,11680,4096,8760,11680]
[net.tcp.buffersize.wimax]: [107380,221184,524288,4096,16384,110208]
[init.svc.servicemanager]: [running]
[init.svc.vold]: [running]
[init.svc.netd]: [running]
[init.svc.debuggerd]: [running]
[init.svc.ril-daemon]: [running]
[init.svc.zygote]: [running]
[init.svc.media]: [running]
[init.svc.dbus]: [running]
[init.svc.installd]: [running]
[init.svc.keystore]: [running]
[init.svc.ipd]: [running]
[init.svc.akmd]: [running]
[init.svc.zchgd]: [stopped]
[init.svc.adbd]: [running]
[ril.reload.count]: [1]
[ro.ril.nv.compare.result]: [128]
[ril.preferred.language]: [3:en]
[ro.ril.ecclist]: [112,911,999]
[ril.ecclist]: [112,911,999]
[init.svc.bootanim]: [stopped]
[hw.keyboards.65537.devname]: [curcial-oj]
[hw.keyboards.65538.devname]: [dummy_keypad]
[hw.keyboards.0.devname]: [bravo-keypad]
[hw.keyboards.65540.devname]: [bravo-keypad]
[hw.keyboards.65543.devname]: [projector-Keypad]
[hw.keyboards.65545.devname]: [h2w headset]
[net.hostname]: [android_200141cf2cba2a8b]
[net.active_wan]: [-1]
[sys.settings_system_version]: [8]
[dev.bootcomplete]: [1]
[init.svc.bootcomplete]: [stopped]
[ro.runtime.started]: [316228081821]
[wlan.driver.status]: [ok]
[init.svc.wpa_supplicant]: [running]
[gsm.version.ril-impl]: [HTC-RIL 2.2.0028HM (Sep 20 2010,22:33:44)]
[gsm.sim.types]: []
[gsm.sim.operator.numeric]: [23410]
[gsm.sim.operator.alpha]: []
[gsm.sim.operator.iso-country]: [gb]
[gsm.sim.cbmi.channel]: []
[net.dnschange]: [297]
[gsm.sim.state]: [READY]
[gsm.current.phone-type]: [1]
[gsm.operator.numeric]: []
[gsm.operator.alpha]: []
[gsm.operator.iso-country]: []
[gsm.operator.isroaming]: [false]
[net.gprs.data.connected]: [0]
[sys.settings_secure_version]: [1]
[gsm.version.baseband]: []
[gsm.sim.change]: [false]
[gsm.cb.max.channel]: [10]
[gsm.allapns.created]: [1]
[ro.runtime.firstboot]: [316228100916]
  • If you can use adb shell then you can look inside the contents of internal storage (documents, images, music, etc.). As for app data I don't think that would prove to be useful to you at this time. What does adb shell ls /sdcard show you? Also, do not bother with solutions which suggests deleting gesture.key file. You need root access to do that which you don't have.
    – Firelord
    Oct 29, 2021 at 5:01
  • "its impossible to use my gmail password as it has no wifi connection" - assuming this option is still available in 2021, you could try to insert another SIM with mobile data enabled. If you know the old wifi settings you could also set up another hotspot with same SSID and passphrase
    – alecxs
    Oct 29, 2021 at 6:49
  • depending on android version you can try to boot custom recovery from fastboot. more intrusive methods exist, for example flash modified boot.img with adb root enabled in default.prop. raw dump of whole userdata partition is possible with flash tool if device is not too old. provide more details about phone model sure there is a way
    – alecxs
    Oct 29, 2021 at 6:58
  • PhilZ Touch recovery is maybe available as signed zip (can be installed straight from stock recovery). The no command screen is just part of recovery mode, press volume up + power buttons to continue
    – alecxs
    Oct 29, 2021 at 8:01
  • You can try some exploit for android 2.2.2 froyo to get a temp root shell, and delete /data/system/locksettings.db github.com/srclib/RageAgainstTheCage // forum.xda-developers.com/showthread.php?t=844966
    – alecxs
    Oct 29, 2021 at 23:27


You must log in to answer this question.

Browse other questions tagged .