[Q] Edit a system.img file ? - G Tablet Q&A, Help & Troubleshooting

Does anyone have an idea on how to edit the contents of the system.img ?
I'd like to drop another ROM onto my Gtab (with nvflash) but I'd like to take out the bloatware before it even gets installed. There's a few apk's I'd rather not have installed. Namely the stock Home screen on 4349 & 5274 as it force closes everytime the Gtab starts up.
Thanks,
Spazmogen

Spazmogen said:
Does anyone have an idea on how to edit the contents of the system.img ?
Click to expand...
Click to collapse
You'll have to use the unyaffs and mkyaffs2image programs, and, the extract/reimage operation is best done on a Unix system (to retain the original permissions on the files).
An easier method (on Windows) might be:
1. Flash the VS stock ROM update zip (which installs bootloader, system and recovery images).
2. Nvflash ClockworkMod (APX mode).
3. Boot into CWM.
4. Run "adb remount" on PC followed by "adb shell rm /system/app/SomeFile.apk" to get rid of the unwanted app(s). Finally, unmount system with "adb shell umount /system".
5. Reboot and nvflash stock recovery (APX mode).
6. Only now boot into the stock ROM.
7. If everything works OK, use nvflash (or the dump_image program in CWM) to take a backup of the modified "system" partition.

Thanks,
I figured it would not be simple.

Related

[ADV][DEV][STOCK IMAGE]Nook Color 1.01 stock dd images

I bought my own nook color on saturday, there doesn't appear to be a factory image that can be restored. My new nook color came with version 1.01 preinstalled. Before turning it on the first time I put in nookie froyo and did a dd of all 8 of the stock partitions. Below is the zipped up .img files of mmcblk0p1/mmcblk0p5 (boot/system) from a stock untouched 1.01 nook color. I am also including the factory.zip. This should be enough to restore a bricked nook color with a corrupted boot or system partition. Many people have been able to restore to stock by just using the boot.img because after 8 failed boots it will do a factory reset.
To make this work you must have ADB working first. You may be able to get this to work on ADB Wireless, but I don't recommend it. For instructions on getting adb to work with the nook color go here:
http://nookdevs.com/NookColor_USB_ADB
To use these files unzip them to the sdcard portion of a nookie froyo sdcard, or just about any other rom that runs from the sdcard and run the following commands in an adb shell:
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1
dd if=/sdcard/system.img of=/dev/block/mmcblk0p5
Boot
System
factory.zip
Thanks, you're a life saver!
samuelhalff said:
Thanks, you're a life saver!
Click to expand...
Click to collapse
Did it fix you samuelhalff?
Yes. But I only used boot.img. Then restored to stock with 8 failed boots. Dd'ing system will also work.
If it dosen't boot, do a factory reset with power+n.
Sent from my HTC Desire using XDA App
So if I put the factory.zip on /dev/mmcblk0p3 and replace the current one, when we do the 8 bad boot trigger we would get 1.0.1 flashed instead of 1.0.0 right?
Yes. And I would also do a power+n reset at the end, to avoid any problems.
Sent from my HTC Desire using XDA App
shad0wf0x,
I am having the same problem with my NC not booting after a failed attempt at
re-rooting. I will tell you in advance that I am VERY tech-phobic and don't comprehend all this command-line stuff well at all.
Given your original post above, could you please explain in layman's terms EXACTLY what steps to take to restore my NC to like-new? And hopefully it can be done with just simply putting some files on a micro SD and that's it. Please let me know from start to finish how I do this. Appreciate your help in advance.
vigeh4
P.S. I know I had no business doing this, but I screwed my unit up anyway. I already tried the 8-step interrupt thing before re-rooting but with no success.
vigeh4,
First download the first 2 files, system and boot, and then unzip them. Then you need to copy those 2 files (system.img and boot.img) to the sdcard, either while booted up in nookie froyo or by putting the sdcard in your computer. Then you must have adb working on your computer. open a command prompt or terminal(windows or mac/linux) and go to the location where your working adb is and copy and paste those commands into the window to run them.
Code:
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1
dd if=/sdcard/system.img of=/dev/block/mmcblk0p5
shad0wf0x said:
vigeh4,
First download the first 2 files, system and boot, and then unzip them. Then you need to copy those 2 files (system.img and boot.img) to the sdcard, either while booted up in nookie froyo or by putting the sdcard in your computer. Then you must have adb working on your computer. open a command prompt or terminal(windows or mac/linux) and go to the location where your working adb is and copy and paste those commands into the window to run them.
Code:
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1
dd if=/sdcard/system.img of=/dev/block/mmcblk0p5
Click to expand...
Click to collapse
Sorry, I am WAY confused about how to do this. This adb crap is over my head.
Maybe I just have a $250 paperweight at this point. If I mail you my NC, would you reset to "factory" for a small fee?
Thanks.
OMFG, thank you very much for these files and instructions.
I really thought I bricked it to the point of no return. I initially screwed it up when I installed Clockwork and wouldn't boot past "N", then after tinkering around some more, it wouldn't even turn on ... lol.
@vigeh
First you need to unzip those files you just downloaded. Second, you need to copy the "boot.img" and "system.img" (not the *.zip) to the "/SDCARD" folder on your SDCARD. I had to use WIFI FILE Explorer in Nookie Froyo cuz I messed up my nook so bad, i couldn't copy these files by turning on the USB Storage through the regular method. It took me days to figure this out cuz i'm kinda slow.
I hope you installed the Android-SDK on your computer already. If so, then go to the folder named "\platform-tools" on your PC - this is where ADB.EXE is located. Connect your nook and type "ADB DEVICES" just to make sure your nook is connected to the computer. It'll show up and tell you it is or not. If it is connected then do the following:
1. Type "ADB SHELL" then you'll see a "#" symbol after you hit enter.
2. Type "dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1" just the way it is written by the original poster (minus the "" marks)
at this point, it usually wont say anything. Just wait a few minutes and something will pop up. In my case, it says:
"477033984 bytes <454.9MB> copied, 138.757660 seconds, 3.3MB/s"
"#"
3. Type the second command next to the "#" sign "dd if=/sdcard/system.img of=/dev/block/mmcblk0p5"
wait another few minutes til the next confirmation pops up.
4. turn off nook, remove SD card
5. Hold the N button and the Power button at the same time and it'll ask you to reset the nook to factory settings.
I hope this helps you ....
well im a tard... i did this without reading that YOU CANNOT HAVE GOOGLE APPS!!!! so anyway Im trying to get back to a stock image, but i cant figure out how to copy 700 med +/- of images to 134 meg f free space. someone un-tard me plz . thanks
I have ClockworkMod Recovery installed, and if I put the factory.zip you provided on my sd card and use the option 'install zip from sdcard' will that in fact install factory settings on the nook?
I tried to do the 8 failed boots, but cannot get it to work with this installed.
shad0wf0x said:
vigeh4,
First download the first 2 files, system and boot, and then unzip them. Then you need to copy those 2 files (system.img and boot.img) to the sdcard, either while booted up in nookie froyo or by putting the sdcard in your computer. Then you must have adb working on your computer. open a command prompt or terminal(windows or mac/linux) and go to the location where your working adb is and copy and paste those commands into the window to run them.
Code:
dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1
dd if=/sdcard/system.img of=/dev/block/mmcblk0p5
Click to expand...
Click to collapse
How do you get to your "working adb?" I'm probably even more ignorant on this SDK stuff that vigeh4. I have SDK installed though.
How to get adb working is found here:
http://nookdevs.com/NookColor_USB_ADB
gconol said:
@vigeh
First you need to unzip those files you just downloaded. Second, you need to copy the "boot.img" and "system.img" (not the *.zip) to the "/SDCARD" folder on your SDCARD. I had to use WIFI FILE Explorer in Nookie Froyo cuz I messed up my nook so bad, i couldn't copy these files by turning on the USB Storage through the regular method. It took me days to figure this out cuz i'm kinda slow.
I hope you installed the Android-SDK on your computer already. If so, then go to the folder named "\platform-tools" on your PC - this is where ADB.EXE is located. Connect your nook and type "ADB DEVICES" just to make sure your nook is connected to the computer. It'll show up and tell you it is or not. If it is connected then do the following:
1. Type "ADB SHELL" then you'll see a "#" symbol after you hit enter.
2. Type "dd if=/sdcard/boot.img of=/dev/block/mmcblk0p1" just the way it is written by the original poster (minus the "" marks)
at this point, it usually wont say anything. Just wait a few minutes and something will pop up. In my case, it says:
"477033984 bytes <454.9MB> copied, 138.757660 seconds, 3.3MB/s"
"#"
3. Type the second command next to the "#" sign "dd if=/sdcard/system.img of=/dev/block/mmcblk0p5"
wait another few minutes til the next confirmation pops up.
4. turn off nook, remove SD card
5. Hold the N button and the Power button at the same time and it'll ask you to reset the nook to factory settings.
I hope this helps you ....
Click to expand...
Click to collapse
Thanks to Shadowf0x for getting ABD to work
I have a question though, if I dont have the file "SDCARD" in my SD card then can I just make a new file and name it SDCARD, and put both of the .img's into it?
Sir a teema said:
I have ClockworkMod Recovery installed, and if I put the factory.zip you provided on my sd card and use the option 'install zip from sdcard' will that in fact install factory settings on the nook?
I tried to do the 8 failed boots, but cannot get it to work with this installed.
Click to expand...
Click to collapse
I'm not sure if that will work, I guess it's worth a try, however if you replace the existing factory.zip and do a factory reset you will restore back to 1.01 instead of 1.0 if you don't already have a nc that has 1.01 on it. I saw another thread about trying to use the factory.zip with cwm, but I didn't see anyone coming back and say it worked. How to flash back to stock is found here:
http://nookdevs.com/Flash_back_to_clean_stock_ROM
mmaner said:
well im a tard... i did this without reading that YOU CANNOT HAVE GOOGLE APPS!!!! so anyway Im trying to get back to a stock image, but i cant figure out how to copy 700 med +/- of images to 134 meg f free space. someone un-tard me plz . thanks
Click to expand...
Click to collapse
The nookie froyo sdcard partition for me was 900+m, and I've heard that all you need to do for this to work is to flash the boot.img.
Ign3nt said:
Thanks to Shadowf0x for getting ABD to work
I have a question though, if I dont have the file "SDCARD" in my SD card then can I just make a new file and name it SDCARD, and put both of the .img's into it?
Click to expand...
Click to collapse
You could try to mount the media partition in nookie froyo and put them there.
The partition is /dev/block/mmcblk0p8 and type is vfat.
shad0wf0x said:
The nookie froyo sdcard partition for me was 900+m, and I've heard that all you need to do for this to work is to flash the boot.img.
Click to expand...
Click to collapse
Ill try it tonight. thanks

Frozen static screen help!

I need help to fix my tab,
I've been running pershoots OC kernel with task's roms for several months with no problems and i've been keeping up to date with each version with out any problems.
I just rebooted my tab today and now suddenly out of the blue, the screen shows static and corrupted rbg lines after a few seconds of the samsung logo. And now it is stuck like this after repeatedly trying to turn my device on. I can get into CWM recovery but i dont a restore file on it because i moved them off my tab to my PC to save space.
Is there anyway to move the files back on to the tab to restore it or maybe move the stock kernel so i can flash it and see if that fixes it?
If you don't care about the data in your tab (all your apps and the /sdcard partition), you could try returning to stock via Odin. Here is a good guide (is the last part "Re-“Stocking” Yer System…"): The Guide
Other option (I recommend this one) is adb, in cwm just push the files you want to flash to the /sdcard .
Thanks! I'll try by android debug bridge and see if i can figure this out..
I have adb installed and it works but when i push the zip to /sdcard/ it doesnt show up on CWM install zip from sdcard menu option, i also tried to push it to /mnt/sdcard/ and the files doesnt show up.
I'm at a loss here the cmd prompt doesnt give any errors after the zip transfer
Mercatorn said:
I have adb installed and it works but when i push the zip to /sdcard/ it doesnt show up on CWM install zip from sdcard menu option, i also tried to push it to /mnt/sdcard/ and the files doesnt show up.
I'm at a loss here the cmd prompt doesnt give any errors after the zip transfer
Click to expand...
Click to collapse
Are you mounting the partition? My guess is you forgot to do it.
Enter the follow commands (one by one) in the terminal (cmd prompt):
Code:
adb shell
Code:
mount /data
Code:
exit
Code:
adb push fileyouwanttoflash.zip /data/media
Now the file should be in /sdcard, just install it from cwm.
If at the moment you're trying to choose the zip from sdcard you get an error telling you "Couldn't open directory" and "No files found", reboot cwm.
Other way to do it is in cwm (so you don't have to do the "adb shell" and "adb mount")
In cwm, choose "install zip from sdcard", then "choose zip from sdcard", then "+++++Go Back+++++"
And from your cmd promt:
Code:
adb push fileyouwanttoflash.zip /sdcard/
Now, flash the file from cwm. (Again, if there's some error, reboot cwm).

SuperSu problem

OK, so I have a rooted I9300 and for some reason for the last few weeks I cant update the subinary and titanium wont get root access.
I did many google searches, tried a few thing eg (http://forum.xda-developers.com/showthread.php?t=1900217) , tried rooting again (even though I know Im rooted but nothing works.
So the next thing I want to try is to unroot my phone and root again.
My question is, because I cant access titanium to back everything up,
is there a way to unroot WITHOUT losing all apps and data?
Thanks a lot in advance.
Make nandroid backup and restore apps using titanium when your phone are rooted again.
Use MybackupPro to backup messages/contacts/bookmark/system setting/bookmarks.
Sent from my GT-I9300 using xda app-developers app
Uninstall super su via Google Play and reinstall .
jje
Cant use nandroid. It needs busybox which requests root access.
JJEgan said:
Uninstall super su via Google Play and reinstall .
jje
Click to expand...
Click to collapse
Tried it- it wont uninstall but go back to an earlier version.
Reinstalled the latest version and Im getting the same message.
Root checker app says "This device does not have proper root access".
...just re-root it? Assuming you used CF-Root and will be flashing it again, when CWM runs again and installs the SuperSU ZIP, /system/xbin/su will get overwritten (and get set with the correct permissions).
Else, if whatever reason you don't want to do that, if you have CWM recovery installed, just mount /system, and using ADB delete /system/xbin/su, /system/app/Superuser.apk, /system/bin/.ext and install CWM-SuperSU-v0.96.zip again.
If you don't have CWM, you can use a kernel with an insecure adbd (Perseus kernel has this for Jellybean ROMs, and earlier Siyah and GalaxSih kernels have this for ICS) and delete /system/xbin/su and /system/app/Superuser.apk. You'll have to manually install SuperSU from the ZIP.
qwerty12 said:
...just re-root it? Assuming you used CF-Root and will be flashing it again, when CWM runs again and installs the SuperSU ZIP, /system/xbin/su will get overwritten (and get set with the correct permissions).
Else, if whatever reason you don't want to do that, if you have CWM recovery installed, just mount /system, and using ADB delete /system/xbin/su, /system/app/Superuser.apk, /system/bin/.ext and install CWM-SuperSU-v0.96.zip again.
If you don't have CWM, you can use a kernel with an insecure adbd (Perseus kernel has this for Jellybean ROMs, and earlier Siyah and GalaxSih kernels have this for ICS) and delete /system/xbin/su and /system/app/Superuser.apk. You'll have to manually install SuperSU from the ZIP.
Click to expand...
Click to collapse
I tried rooting again- didn't change anything.
I do have CWM.
Tried using ADB, but it requests root access and fails to get it...
tomerstern said:
I do have CWM.
Click to expand...
Click to collapse
Good, ADB will be running as root in CWM by default. Boot into recovery mode, go to mounts and storage, and select Mount /system.
If you don't already have ADB setup and the correct drivers installed (if you already have Kies installed then you have the drivers installed). do the following. You can check, if you wish, by seeing when you connect your phone in recovery - you should have a SAMSUNG Android ADB Device under SAMSUNG Android Phone or an Android Debugger Bridge device in Device Manager. If not:
Download http://dl.google.com/android/repository/platform-tools_r14-windows.zip and extract the three files adb.exe, AdbWinApi.dll and AdbWinUsbApi.dll to a place of your choosing
install the drivers: http://www.mediafire.com/?2243ouw1701zp8l (Extracted from Kies_2.5.0.12094_27_11.exe)
disconnect and reconnect your phone
Go to the folder where you have adb installed in the Command Prompt, and run "adb shell". Run the following commands:
Code:
rm /system/app/Superuser.apk
chattr -i /system/xbin/su [in case Survival Mode is turned on in SuperSU]
rm /system/xbin/su
rm /system/bin/su [ignore this one if it throws an error]
rm -r /system/bin/.ext
That should unroot your phone.
Go to "Install ZIP from sdcard" and choose to install a zip from the internal sdcard.
Exit out of the root shell (Ctrl+C or, alternatively, "exit" and you'll be sent back to the command prompt) on your computer and download the SuperSU ZIP.
Go back to the command prompt and type this "adb push " (including the space) and drag the CWM-SuperSU-v0.96.zip onto the command prompt window, add a space and type "/data/media". You should have something like "adb push <path to CWM-SuperSU-v0.96.zip> /data/media"
This should put the SuperSU ZIP onto the root of your internal memory card. Choose go back on your phone and select to install a ZIP from the internal memory card again. You should see CWM-SuperSU-v0.96.zip. Install it, reboot, update SuperSU from the Play Store and run SuperSU from the app drawer. You should get a prompt asking you to update the su binary. Do so.
Grab Android Terminal Emulator on the Market, and run "su". If all went well, SuperSU should ask you for permission. Grant it and if the $ turned into a # and the command "id" says uid=0 (root) then you're rooted!
OK, Im really sorry and embarrassed to say that I got confused with my tab 10.1.
I Do not have CWM installed.
Tried installing it now and could not. I stay on odin mode and I dont get the CWM menu...
I guess at this stage when my root is screwed I cant install CWM anymore.
What can I do now?
Thanks again and sorry for the confusion..
tomerstern said:
Tried installing it now and could not. I stay on odin mode and I dont get the CWM menu...
I guess at this stage when my root is screwed I cant install CWM anymore.
Click to expand...
Click to collapse
Flashing CF-Root should always get you CWM as it's done through ODIN, which does not care if your phone is rooted or not. When you're flashing CF-Root, make sure the auto reboot option remains ticked. If your phone doesn't boot into CWM after ODIN reboots it, then take note of the following:
Chainfire said:
- NOTE: Sometimes the device does *not* boot into recovery mode and root your device. Just do the entire procedure again if this happens. If it still will not install root and such, make sure that in Odin "Auto Reboot" is not checked. Then after flashing, pull the battery, and boot with VolUp+Home+Power button to boot into recovery manually. This will start the install process.
Click to expand...
Click to collapse
qwerty12 said:
Go to the folder where you have adb installed in the Command Prompt, and run "adb shell". Run the following commands:
Code:
rm /system/app/Superuser.apk
chattr -i /system/xbin/su [in case Survival Mode is turned on in SuperSU]
rm /system/xbin/su
rm /system/bin/su [ignore this one if it throws an error]
rm -r /system/bin/.ext
Click to expand...
Click to collapse
OK, Im now in the mounts and storage folder insider CWM.
ADB interface is installed on device manager.
II dont understand what to press and where to run these commands.
tomerstern said:
OK, Im now in the mounts and storage folder insider CWM.
ADB interface is installed on device manager.
II dont understand what to press and where to run these commands.
Click to expand...
Click to collapse
Under the mounts and storage option, select mount /system. It will change to "unmount /system" if selected correctly.
The commands are run from an "adb shell" session, which you can get to by doing this:
Extract those three ADB files from that platform-tools ZIP to a folder somewhere (I chose C:\adb out of randomness). Open that folder and while holding down the shift key, right-click a blank, white area in the folder and select "Open command window here". You can then type "adb shell", which will allow you to run those commands.
qwerty12 said:
Good, ADB will be running as root in CWM by default. Boot into recovery mode, go to mounts and storage, and select Mount /system.
Click to expand...
Click to collapse
There isnt mount system there. I see unmount system.
I see mount data, preload etc.
OK, that's fine, you may move on to running those commands.
Two problems:
1. running "chattr -i /system/xbin/su"
resulted in a "chatter not found" message.
2. Trying to push the su zip resulted in this message: "error: device not found".
tomerstern said:
"chattr -i /system/xbin/su"
Click to expand...
Click to collapse
If rm worked on /system/xbin/su, then ignore it as you don't need it anyway.
2. Trying to push the su zip resulted in this message: "error: device not found".
Click to expand...
Click to collapse
Reconnect the phone and try again?
not working after numerous attempts.
Can I Start the phone and move the zip file manually with a micro sd cable? If not, what else?
tomerstern said:
Can I Start the phone and move the zip file manually with a micro sd cable? If not, what else?
Click to expand...
Click to collapse
That should be fine
moved it to internal memory and after shutdown, power+home+volume up wont take me to cwm anymore but to android system recovery.
Why? How do I get back to cwm? Install it again with Odin?
BY THE WAY, I can still see supersu is installed on my device. Does it mean what we did did not work?
OK, I can confirm this method works
I just installed the zip of the supersu and now Ive got full root privileges.
The reason I couldnt get into cwm was that for some reason I get a short android upgrade each time I boot up. This upgrade deletes cwm. Thats why I found out that I need to install CWM and then immidiately press power-volume up-home, before i let the device power up.
I want to give a big thanks to qwerty12 for the help and much needed patience.

Bootloot... please help

So it seems that my HTC ONE has no OS installed, I am able to get to the HTC logo and thats it. I reboot into bootloader and are able to install CWM and TWRP but no luck installing ARHD rom via adb sideload method, it just fails. Any hints on how to install a rom either stock or otherwise? i have a cwm backup of my stock rom rooted odex on my computer but it is not a flashable zip. Any help will be greatly appreciated. Thanks in advance.
(i have a mac if that matters)
if you aren't back on cwm flash that recovery.
boot to it
push your backup to the phone with ./adb push /foldername/* /sdcard/clockworkmod/backup might be backups, I can't remember, but you can check with adb shell
./adb shell
cd /sdcard/clockworkmod
ls (that is a lowercase L)
that should give you a directory listing.
after you've successfully pushed the backup reboot to recovery again and restore it.
This should do the trick
gunnyman said:
if you aren't back on cwm flash that recovery.
boot to it
push your backup to the phone with ./adb push /foldername/* /sdcard/clockworkmod/backup might be backups, I can't remember, but you can check with adb shell
./adb shell
cd /sdcard/clockworkmod
ls (that is a lowercase L)
that should give you a directory listing.
after you've successfully pushed the backup reboot to recovery again and restore it.
This should do the trick
Click to expand...
Click to collapse
I am in the same situation. Can not get my phone to roboot. I have a rom to push but I dont know how to use ADB commands. I can get to command prompt but them I am totally lost. Can you give me a quick step by step?
adb push filename /sdcard
gunnyman said:
if you aren't back on cwm flash that recovery.
boot to it
push your backup to the phone with ./adb push /foldername/* /sdcard/clockworkmod/backup might be backups, I can't remember, but you can check with adb shell
./adb shell
cd /sdcard/clockworkmod
ls (that is a lowercase L)
that should give you a directory listing.
after you've successfully pushed the backup reboot to recovery again and restore it.
This should do the trick
Click to expand...
Click to collapse
Hy gunnyman, when I push the folder to the sd card it always decompresses and send the individual files to the system not the full backup folder so i can select it from the backups menu. this is the command I used ./adb push may6.zip /sdcard/clockworkmod/backup
I also pushed the decompressed files to the sd card since it looks like it instals all files needed for os to work with the following command ./adb push may6.zip /sdcard
I reboot system but still stuck on HTC logo.
May6 is the name of my backup and when i use the ls command it has a .zip to the end.
So can you let me know how to sent the complete folder to the phone to be placed on the backup folder and thus be able to be selected under the cwm menu? Thank you so much
Unzip it. Send entire folder uncompressed
You don't restore a backup the same way you flash a rom. It's a separate menu option in recovery
gunnyman said:
Unzip it. Send entire folder uncompressed
You don't restore a backup the same way you flash a rom. It's a separate menu option in recovery
Click to expand...
Click to collapse
yes its unzipped. took off the .zip name and sent it to the backup folder and it still sends the uncompressed files. Once I go to restore from backup folder I get a -System/ and -Meta-INF/ files and no file with -May6/ or something like that. So i try to restore from -system/ but it says md5 sum dont match.
Any ideas?
No, I don't sorry

WI502Q, how i unbricked my watch! (TWRP Backup included)

Alright, so I screwed up my watch a few days ago and it ended up not getting past the splash screen and going straight to recovery. Thanks to @z0mghii, I was able to get a TWRP backup of the system, boot, and data. I replaced this backup with my own so none of his data (if possible) could be taken advantage of. However, after flashing it, I was still unable to boot up. Here are the steps I took in order to get everything back to working order. Keep in mind this is for WREN, the small version. Some steps may be unnecessary.
1. Boot to TWRP
2. Go to advanced wipe
3. Wipe everything
4. Go to the link below and download the TWRP Backup
5. Create a backup of a small partition (like boot) on your watch to create the folder.
6. Plug watch into PC while in TWRP
7. Go to the watch's internal storage
8. Go to the TWRP folder
9. Go to the subfolder
10. Paste the downloaded backup folder into this folder, this should be with the one you created earlier
11. Restore this backup on your watch, be sure to check all the boxes
12. Reboot to the bootloader
13. Install ADB if you haven't already, I recommend the 15 second one
14. While the watch is in the bootloader and it is plugged in, type the following commands
fastboot erase cache
fastboot erase misc
fastboot reboot
https://drive.google.com/drive/folders/0B_HUnwYIrFskUW10UDZ0dXdHQzg (You might have to download each item and put them in a folder instead, unless I'm oblivious to something, sorry )
After this, your watch should boot up, then power back down, then boot back up again. This will be followed up by the boot animation and go to the welcome screen.
If any of you guys could provide me with the latest stock rom version TWRP backup or a stock recovery.img, it would be greatly appreciated. (Unless June patch is the latest). The recovery would be great no matter what. Getting the stock recovery can be done by typing the following commands into the command prompt on a PC. Hopefully they work. It should be copied onto the /sdcard.
Via adb shell (make sure ADB debugging is on in developer options, then type adb shell in CMD on PC) type: cat/proc/mtd and press enter
You will see which is recovery partition and then type: dd if=/dev/mtd/mtd1 of=/sdcard/recovery.img (note that mtd1 you must replace with number which is recovery partition)
I hope I helped somebody with this. Again, huge thanks to @z0mghii for making this possible. I'm sorry for bad formatting.
I'm really new to this. I'm also by no means a developer/hardcore android person. These commands were all taken from google. I take 0 responsibility for your device being ruined. This is just what worked for me.
Reserved
HOLY CRAP IT WORKED!! You just don't know how much this means to me, words can't express!
cland216 said:
HOLY CRAP IT WORKED!! You just don't know how much this means to me, words can't express!
Click to expand...
Click to collapse
Hell yeah. Glad I could help somebody! I've been wanting to give back to the wonderful XDA community for a while as a long time lurker. Also, I'm hoping to get a newer version of the stock rom and a stock recovery.img so you can go back to 100% factory stock for an OTA. I'm pretty proud of myself (being noobish) figuring this out.
Thanks a lot!! My watch was kept in a drawer because it was useless and it has now returned to life, I just have a problem restoring the recovery, the command to locate the recovery folder do not work me, have any idea how located the recovery folder?
klaudio_tv said:
Thanks a lot!! My watch was kept in a drawer because it was useless and it has now returned to life, I just have a problem restoring the recovery, the command to locate the recovery folder do not work me, have any idea how located the recovery folder?
Click to expand...
Click to collapse
Are you referring to "extracting" the recovery img? You only need to do it if you're running the stock recovery.
If so, I think I have screwed the command. Make sure you're in adb shell (in recovery on the watch) and then type "cat /proc/mtd" (with the space in front of cat) without the quotes in order to locate the recovery partition.
You will see which is recovery partition and then type: dd if=/dev/mtd/mtd1 of=/sdcard/recovery.img (note that mtd1 you must replace with number which is recovery partition)
Hopefully this works
Hi, my watch now works well, but I was not able to install updates, when I try to install updates from the watch, watch reboots and go to TWRP recovery. Anyone knows how install the updates?
klaudio_tv said:
Hi, my watch now works well, but I was not able to install updates, when I try to install updates from the watch, watch reboots and go to TWRP recovery. Anyone knows how install the updates?
Click to expand...
Click to collapse
Since the OP helped me, here's my chance to give back..
By no means do I know what hell I'm doing, but I know enough to be dangerous. If you're ready to live dangerously, follow these steps (which worked for me):
1. Go into TWRP on the watch and connect it usb to your computer. Using TWRP file manager, copy the update.zip from CACHE to sdcard\Download.
2. On the computer, browse to Zenwatch internal memory Downloads folder and copy the update.zip file to your computer.
3. Unzip the file on your computer using 7zip.
4. Navigate to \META-INF\com\google\android\ and look for updater-script.
5. Edit updater-script in Notepad++.
6. Delete the lines starting with getprop. This turned out to be lines 2 thru 5.
7. Delete the lines starting with apply_patch_check. This turned out to be lines 10 thru 176
8. Save changes to updater-script then in Windows Explorer highlight all of the files and folders that you unzipped, right-click them and click on 7zip --> Add to update.zip
9. Copy the new update.zip to the Zenwatch internal memory, Downloads folder, overwriting the original update.zip
10. Flash the update.zip file with TWRP.
11. Reboot TWRP to Bootloader.
12. On your computer, goto adb folder where you have fastboot files, and using command prompt type:
fastboot erase cache
fastboot erase misc
fastboot reboot
These steps worked as I was stuck on the June 1, 2016 Android security patch on my Wren Zenwatch. These steps helped me get to the September 1, 2016 security patch.
I managed to update my watch to the September 1 security patch using Cland216's method. But I am unable to update further using the method above. Does anyone have any info on how to update further? Or has any zip files to flash?
If we could get someone to upload the watches stock recovery that would solve all issues.....Why has noone done this for this model yet?
Sent from my OnePlus X using XDA Labs
I'm unable to create a backup file
5. Create a backup of a small partition (like boot) on your watch to create the folder.
6. Plug watch into PC while in TWRP
TWRP :
Could not mount /data
When I try to mount /data , I unable to /data
HOLY ****
Dude.. Let me just say...
YOU ARE THE ****ING ABSOLUTE BEST.
I am now going to make a backup, and save it to my computer, google drive, dropbox, icloud, and every other ****in place I can to make sure this never happens again. Thank you!!!!
Nicholas6706 said:
Alright, so I screwed up my watch a few days ago and it ended up not getting past the splash screen and going straight to recovery. Thanks to @z0mghii, I was able to get a TWRP backup of the system, boot, and data. I replaced this backup with my own so none of his data (if possible) could be taken advantage of. However, after flashing it, I was still unable to boot up. Here are the steps I took in order to get everything back to working order. Keep in mind this is for WREN, the small version. Some steps may be unnecessary.
1. Boot to TWRP
2. Go to advanced wipe
3. Wipe everything
4. Go to the link below and download the TWRP Backup
5. Create a backup of a small partition (like boot) on your watch to create the folder.
6. Plug watch into PC while in TWRP
7. Go to the watch's internal storage
8. Go to the TWRP folder
9. Go to the subfolder
10. Paste the downloaded backup folder into this folder, this should be with the one you created earlier
11. Restore this backup on your watch, be sure to check all the boxes
12. Reboot to the bootloader
13. Install ADB if you haven't already, I recommend the 15 second one
14. While the watch is in the bootloader and it is plugged in, type the following commands
fastboot erase cache
fastboot erase misc
fastboot reboot
https://drive.google.com/drive/folders/0B_HUnwYIrFskUW10UDZ0dXdHQzg (You might have to download each item and put them in a folder instead, unless I'm oblivious to something, sorry )
After this, your watch should boot up, then power back down, then boot back up again. This will be followed up by the boot animation and go to the welcome screen.
If any of you guys could provide me with the latest stock rom version TWRP backup or a stock recovery.img, it would be greatly appreciated. (Unless June patch is the latest). The recovery would be great no matter what. Getting the stock recovery can be done by typing the following commands into the command prompt on a PC. Hopefully they work. It should be copied onto the /sdcard.
Via adb shell (make sure ADB debugging is on in developer options, then type adb shell in CMD on PC) type: cat/proc/mtd and press enter
You will see which is recovery partition and then type: dd if=/dev/mtd/mtd1 of=/sdcard/recovery.img (note that mtd1 you must replace with number which is recovery partition)
I hope I helped somebody with this. Again, huge thanks to @z0mghii for making this possible. I'm sorry for bad formatting.
I'm really new to this. I'm also by no means a developer/hardcore android person. These commands were all taken from google. I take 0 responsibility for your device being ruined. This is just what worked for me.
Click to expand...
Click to collapse
I spoke just a bit too soon, now it is hanging on that animation with the 4 dots. Any suggestions?
NEVERMIND, I AM UP AND RUNNING!! WOOHOOOO

Categories

Resources