How To Install Debian Squeeze on LG Optimus V - Optimus V Android Development

Hello! This is my first walkthrough for one of my first accomplishments on my first android phone, the LG Optimus V. This guide will show you how to put debian squeeze into a chroot environment on your Optimus V. Lets get started!
Just a side note before we start:
I am not responsible for any mistake you made/in the hardware/software, so any problems with your phone is your own fault. I recommend backing up before a ROM install.
1) Root your phone.
I will not cover this, but there are many guides to root an Optimus V on Google. Just search it!
2) Install Custom Recovery Image (optional if your ROM has ext2 support)
Android 2.2 Froyo currently DOES NOT have ext2 support in the kernel, so we need to install an Android build that does. I used aospCMod, which works flawlessly. Download from dl.dropbox.com/u/14791765/preinstall.zip and unzip it. Move the "preinstall" folder over to your SD card on your Optimus. Now run these commands as root (I recommend using "adb shell" and then running "su" as the shell)
Code:
# The following installs "flash_image" to /system/bin, then makes it executable
cd /mnt/sdcard/preinstall
mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
cat flash_image > /system/bin/flash_image
chmod 755 /system/bin/flash_image
# The following flashes recovery-thunderc-v-1.2.0-GNM.img to recovery
flash_image recovery /mnt/sdcard/preinstall/recovery-thunderc-v-1.2.0-GNM.img
reboot recovery
Your phone should reboot into your newly flashed recovery partition
2.5) Install aospCMod (optional if your ROM has ext2 support)
Now, using the volume rocker, the menu button, and the back button, back up your phone, go to "Backup/Restore" -> "Backup Google proprietary system files" and press menu. This will back up your working system.
Now back at the main menu, navigate to "Flash zip menu" -> "Flash zip from Sdcard" -> "preinstall" -> "aospCMod-VM670-20110601-signed.zip". Install the ROM. Now do the same thing, but this time with "gapps-gb-20110325-signed.zip". After that, at the main menu, press "Reboot system now".
3) Create a Debian image file.
You have two options here. One, create your own (recommended) or two, download mine. I would download mine if you don't have linux and don't plan on getting it or don't really have time to set everything up. First and foremost though, you need to download dl.dropbox.com/u/14791765/debian.zip and unzip it to your SD card. My image is located here if you need it: dl.dropbox.com/u/14791765/debian-img.tar.gz Place it in your "debian" folder on your SD card. Afterwards, do these commands
Code:
cd /mnt/sdcard/debian
tar zxf debian-img.tar.gz
rm debian-img.tar.gz
If you do not want to download the whole 84 Mb file (which uncompresses to 1 Gb), create your own by doing this on Ubuntu Linux:
Code:
sudo -s
apt-get install debootstrap
dd if=/dev/zero of=debian.img seek=1024 bs=1M count=1
mke2fs -F debian.img
mkdir debian
mount -o loop debian.img debian/
debootstrap --verbose --arch armel --foreign lenny debian ftp.us.debian.org/debian
umount debian/
If you need the image file to take up less/more room, change "seek=1024" to "seek=[value-in-Mb]".
Now move your newly created "debian.img" to the "debian" folder on your SD card.
4) Install Debian
Almost done!
Back in your root shell, do these commands:
Code:
cd /mnt/sdcard/debian
sh installdebian
sh installdebian2
echo 'deb ftp.us.debian.org/debian squeeze main' > /etc/apt/sources.list
apt-get autoclean && apt-get update
export username="[insertyourfirstnamehere]"
adduser $username (this will ask for some data, put in as much or as little as you'd like)
apt-get install sudo
usermod $username -G sudo
exit
This should blah blah blah about debootstrap and configuring packages. Ignore it. It should finish in about 7-10 minutes. After that is done, the adduser command adds you to the system login files. After you enter "exit", you are all set to run Debian! To start debian, put this in your root shell/terminal emulator:
Code:
bootdebian
Wala! One ready-made LG Optimus V Debian, at your service! From here, you can install pretty much everything for Debian, including XOrg. I may post an update guide for how to install XOrg, VNC, and the like.
EDIT: If "sh installdebian" hangs on "Configuring: sysvinit", just do Control-C, and run it again.

meta1203 said:
Hello! This is my first walkthrough for one of my first accomplishments on my first android phone, the LG Optimus V. This guide will show you how to put debian squeeze into a chroot environment on your Optimus V. Lets get started!
Just a side note before we start:
I am not responsible for any mistake you made/in the hardware/software, so any problems with your phone is your own fault. I recommend backing up before a ROM install.
1) Root your phone.
I will not cover this, but there are many guides to root an Optimus V on Google. Just search it!
2) Install Custom Recovery Image (optional if your ROM has ext2 support)
Android 2.2 Froyo currently DOES NOT have ext2 support in the kernel, so we need to install an Android build that does. I used aospCMod, which works flawlessly. Download from dl.dropbox.com/u/14791765/preinstall.zip and unzip it. Move the "preinstall" folder over to your SD card on your Optimus. Now run these commands as root (I recommend using "adb shell" and then running "su" as the shell)
Code:
# The following installs "flash_image" to /system/bin, then makes it executable
cd /mnt/sdcard/preinstall
mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
cat flash_image > /system/bin/flash_image
chmod 755 /system/bin/flash_image
# The following flashes recovery-thunderc-v-1.2.0-GNM.img to recovery
flash_image recovery /mnt/sdcard/preinstall/recovery-thunderc-v-1.2.0-GNM.img
reboot recovery
Your phone should reboot into your newly flashed recovery partition
2.5) Install aospCMod (optional if your ROM has ext2 support)
Now, using the volume rocker, the menu button, and the back button, back up your phone, go to "Backup/Restore" -> "Backup Google proprietary system files" and press menu. This will back up your working system.
Now back at the main menu, navigate to "Flash zip menu" -> "Flash zip from Sdcard" -> "preinstall" -> "aospCMod-VM670-20110601-signed.zip". Install the ROM. Now do the same thing, but this time with "gapps-gb-20110325-signed.zip". After that, at the main menu, press "Reboot system now".
3) Create a Debian image file.
You have two options here. One, create your own (recommended) or two, download mine. I would download mine if you don't have linux and don't plan on getting it or don't really have time to set everything up. First and foremost though, you need to download dl.dropbox.com/u/14791765/debian.zip and unzip it to your SD card. My image is located here if you need it: dl.dropbox.com/u/14791765/debian-img.tar.gz Place it in your "debian" folder on your SD card. Afterwards, do these commands
Code:
cd /mnt/sdcard/debian
tar zxf debian-img.tar.gz
rm debian-img.tar.gz
If you do not want to download the whole 84 Mb file (which uncompresses to 1 Gb), create your own by doing this on Ubuntu Linux:
Code:
sudo -s
apt-get install debootstrap
dd if=/dev/zero of=debian.img seek=1024 bs=1M count=1
mke2fs -F debian.img
mkdir debian
mount -o loop debian.img debian/
debootstrap --verbose --arch armel --foreign lenny debian ftp.us.debian.org/debian
umount debian/
If you need the image file to take up less/more room, change "seek=1024" to "seek=[value-in-Mb]".
Now move your newly created "debian.img" to the "debian" folder on your SD card.
4) Install Debian
Almost done!
Back in your root shell, do these commands:
Code:
cd /mnt/sdcard/debian
sh installdebian
sh installdebian2
echo 'deb ftp.us.debian.org/debian squeeze main' > /etc/apt/sources.list
apt-get autoclean && apt-get update
export username="[insertyourfirstnamehere]"
adduser $username (this will ask for some data, put in as much or as little as you'd like)
apt-get install sudo
usermod $username -G sudo
exit
This should blah blah blah about debootstrap and configuring packages. Ignore it. It should finish in about 7-10 minutes. After that is done, the adduser command adds you to the system login files. After you enter "exit", you are all set to run Debian! To start debian, put this in your root shell/terminal emulator:
Code:
bootdebian
Wala! One ready-made LG Optimus V Debian, at your service! From here, you can install pretty much everything for Debian, including XOrg. I may post an update guide for how to install XOrg, VNC, and the like.
EDIT: If "sh installdebian" hangs on "Configuring: sysvinit", just do Control-C, and run it again.
Click to expand...
Click to collapse
Cool bro

Related

[Q] Install busybox

Anyone knows how to install busybox?
I've tried to follow some guides but ends up with:
Code:
215:Desktop ricardo$ adb push busybox /data/local
580 KB/s (1083568 bytes in 1.823s)
215:Desktop ricardo$ adb shell
$ su
# cd /system/xbin
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cat /data/local/busybox > busybox
cannot create busybox: not enough memory
or
$ su
# cd /data/local
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# dd if=/data/local/busybox of=/system/xbin/busybox
/system/xbin/busybox: cannot open for write: Out of memory
or
$ su
# cd /data/local
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# ./busybox cp /data/local/busybox /system/xbin
cp: can't create '/system/xbin/busybox': Cannot allocate memory
same here. cannot write to rw-mounted /system.
sucks
Try my zip file. Woked for me
The only thing that I want to change and I can't is the init.rc file. I tried to mount the / (rootfs) with rw, but every time I restart my device the file is copied, again, from the ramdisk image.
I have the same problem
ricardoft said:
Try my zip file. Woked for me
The only thing that I want to change and I can't is the init.rc file. I tried to mount the / (rootfs) with rw, but every time I restart my device the file is copied, again, from the ramdisk image.
Click to expand...
Click to collapse
What should I do with your files?
Nobody has a solution to this?
I don't think this is a memory issue though, .. added 512mb swap and still it claimed to be out of memory, ..
also I figured maybe hd space .. however when i ln /data/local/tmp/busybox to /system/xbin it had the same error.
I both tried ln from the system and ln from busybox both had same result.
It's not a memory problem! In order to install it you have to be in recovery mode.
Try:
While in recovery mode use adb to connect to our phone. Now transfer the zip file (busybox.zip) to your phone and install it via clockwork recovery -> install zip file -> select my zip file.
can anyone post the proper busybox file cause for some reason the file signature verification failed.
adb push busybox-signed.zip /sdcard/busybox-signed.zip
rebooted phone held down volume button while booting ..
choose recovery, ..
choose install zip from sdcard..
then i see a lot of no and one yes .. so i choose yes but the installation is aborted.
Just install titanium backup and click on 'problems?' at the bottom. It will install BusyBox for you.
it has error during installation at line 4 with your busybox.zip
somethinf like can not chmod
(rooted buzz with stock rom)
Elibongo said:
Just install titanium backup and click on 'problems?' at the bottom. It will install BusyBox for you.
Click to expand...
Click to collapse
Do what this guy said.
titanium install in /sdcard busybox, not in /system/bin (xbin) , so it is not usuable by other apps
i have installed it in during recovery mode in /system/xbin
how now to specify PATH for using commands from it?
kevin2516 said:
Do what this guy said.
Click to expand...
Click to collapse
you have read my mind especially since that isn't free software.
hellysmile said:
i have installed it in during recovery mode in /system/xbin
how now to specify PATH for using commands from it?
Click to expand...
Click to collapse
i think you need to create aliases however why install it in xbin anyways then, .. if you need to create aliases or links in bin.. ?
example
$ ln -s /data/local/tmp/busybox ls
$ ./ls
if it is in a path that is included in PATH executing a command will auto look for it in all directories defined in PATH env so basicly you could just create all the directories under /data/local/tmp/bin
and just then append that to PATH env echo $PATH then append :/data/local/tmp/bin to it and busybox should work as well.
Ofloo said:
you have read my mind especially since that isn't free software.
Click to expand...
Click to collapse
titanium backup is free software... look on the market, there's a free version and a donate version.
i have aliases in /system/xbin
they was created after busybox --instal -s
but in system allready exists some commands like ls => i want to use ls from busbox, not from system
and terminal emulator dont anderstand ^[ likes bindings
is there a definitive way to do this. There seems to be no clear way of doing it.
matpol said:
is there a definitive way to do this. There seems to be no clear way of doing it.
Click to expand...
Click to collapse
Maybe this helps:
fang0654 said:
To install:
1) extract and push busybox to your sdcard, reboot into recovery
2) mount /system
3) if you don't have /system/xbin (you should), create it
adb shell:
# mkdir /system/xbin (if necessary)
dd if=/sdcard/busybox of=/system/xbin/busybox
cd /system/xbin
chmod 755 busybox
./busybox --install .
4) reboot and done
OPTIONAL - before rebooting replace the busybox installed by the root process in /system/bin
1) mv /system/bin/busybox /system/bin/busybox.bak
2) cp /system/xbin/busybox /system/bin/busybox
Click to expand...
Click to collapse
from this site: http://forum.xda-developers.com/showthread.php?t=702634
The above is pretty straightforward. The only thing is you need to download the zip in the other thread and 'busybox' refers to the binary in the zip rather than the whole directory - as I understand it. Correct me if I am wrong but trying the dd command on the dir will not work.
matpol said:
The above is pretty straightforward. The only thing is you need to download the zip in the other thread and 'busybox' refers to the binary in the zip rather than the whole directory - as I understand it. Correct me if I am wrong but trying the dd command on the dir will not work.
Click to expand...
Click to collapse
You dont have to extract the binary into a folder, just extract the busybox file direct on your sdcard. Than the dd command should work, on my phone it works fine.
But if not, does the command cat in the adb shell work?
If so, try istead of the dd comand:
Code:
mount /sdcard
cat /sdcard/busybox > /system/xbin/busybox
And remember to start your wildfire in the recovery mode, that was the mistake I had done...

Maybe this can help for rooting the new sbf

1. How can I root my phone?
1.1 General information/Basic adb-commands
Rooting a phone enables you to do things, which normally aren't possible for the average user like:
- Removing apps which were preinstalled by the provider (like Orange, Vodafone, etc.). My Tattoo had Vodafone apps for buying music and other sh*t, which was installed on the system partition (to which a "normal" user has no rights to write to, including deleting).
The Tattoo was successfully rooted by a bunch of guys here, namely -bm-, mainfram3 and Coburn64 (maybe, I don't remember quite correctly ). Also the Tattoo was the first phone having a security mechanism hindering a user to mount the filesystems as read/write, which had to be overridden by remapping the read only memory region to a read/write one. This is done by the module Tattoo-hack.ko, also made by mainfram3. He also created the first boot.img, which enabled su directly from adb and loading Tattoo-hack directly from boot on.
A few words about adb:
ADB is a tool for communicating from the PC with the mobile phone. For this a service is running on the phone enabling the communication via Terminal Emulator. Here are the most useful adb-commands:
Code:
adb push localFileFromPC /path/on/mobilephone
-> pushes a file "localFileFromPC" to a specified location on the phone
adb pull /path/to/file pathFromPC
-> receives a file from the phone and stores it to "pathFromPC"
adb remount
-> This is only possible in custom ROMs, remounts the file system to r/w automatically
adb shell "command"
-> executes "command" and returns to the computer shell
adb shell
-> opens a shell session on the phone (from here on you have to be very careful! Also you can execute now normal linux commands like rm, mv, ls, chmod and so on, but not cp (this can done through busybox)). You will have to use this more often, so get used to it
1.2 Do I have to create a goldcard?
I read this question quite often. For rooting, you don't need it, but for SIM-locked phones you can't flash custom unbranded ROMs (I think).
A guide to create a goldcard follow this link: http://forum.xda-developers.com/show...88&postcount=1 (thanks to MiSSigNNo to this point)
1.3 Tools you need
A complete set of tools can be found here Feel free to mirror it:
http://rapidshare.com/files/403766494/Tattoo.rar.html
Mirror(s):
http://www.bild-ton.net/Tattoo.rar
http://www.megaupload.com/?d=CI9AW83F
This package contains:
- adb binaries for Windows (sorry Linux users )
- su (Please note: use the su-binary attached in this post, not the one in the archive!!!!!)
- m7 exploit
- Amon_RA recovery.img
- mainfram3 boot.img
- flash_image binary
- tattoo-hack.ko
1.4 The automated way
This method was created by maverixx and can be found here. This basically consists of a package doing everything you need by itself. It roots the phone and flashes maverixx recovery.img, which (no offense) I don't like as much as I like Amon_RA's one!). Just click the batchfile and it does the rest (you have to connect your phone via USB to your PC though ).
If you want to use the automated way, but flashing Amon_RA's recovery, just replace the recovery.img from maverixx' package with the recovery.img provided in my archive file (see 1.3 for the link).
In my time here I noticed quite a few users experiencing problems either with a fully functional su or with the recovery image not flashing certain update.zip packages. It seems to be a matter of luck.
1.5 The manual way (recommended by the author)
I personally like what is done when and how, that's why I recommend the manual way. So let's get down to business Let's see if you know all the adb-commands I wrote here:
1. Let's say you have everything unpacked into C:\Tattoo
2. In your terminal (on your PC) type:
- adb shell "mkdir /data/local/bin" (if it returns an error it means that the directory already exists, just proceed)
- adb push m7 /data/local/bin/
- adb push su /data/local/bin/
- adb push flash_image /data/local/bin/
- adb push tattoo-hack.ko /data/local/bin/
- adb push recovery.img /sdcard
- adb push boot.img /sdcard
3. We have every needed file on the phone now. Type now (we are still in your terminal):
- adb shell
$ cd /data/local/bin
$ chmod 766 m7 (I don't retain this step as mandatory, so if this process fails, just proceed)
$ while ./m7 ; do : ; done
lots of text until you see something like "wrote shell code", press enter 2 or 3 times enter to see:
#
4. Then perform this:
- # export LD_LIBRARY_PATH=/system/lib
- # export PATH=/system/bin
- # insmod ./tattoo-hack.ko
- # mount -o rw,remount /dev/block/mtdblock5 /data
- # mount -o rw,remount /dev/block/mtdblock3 /system
- # cat ./su > /system/bin/su
- # chmod 4755 /system/bin/su
- # chmod 755 ./flash_image
Questions?
1.6 Problems and (hopefully good) solutions
Q: How do I execute my command line tool?
A: On your Windows host, go to Start->Run...->type "cmd"
Q: Where is my adb? When I type it in my shell it says that it was not found!
A: The adb binary is found in the archive I supplied above or in the Google SDK. As my archive-file is quite smaller than the Google SDK you should take mine. Let's suppose your adb binary is unpacked in C:\Tattoo, then type:
Code:
Your\Current\Location> cd C:\Tattoo
C:\Tattoo> adb <command>Q: adb says "error: device not found" when I try to launch the shell on the phone!
A: Connect the phone with the usb cable and make sure the sd card is not mounted as drive on your PC!!!
Q: When I want to copy something the phone returns that "cp" is not found! Also when I try to move a file, it says "cross-link device".
A: Well, copying from one partition to another is only possible either via busybox or via
Code:
cat file > /location/filename
Example:
cp /data/su /system/bin
is realized by typing
cat /data/su > /system/bin/suAlso make sure that system is r/w!!!
Q: flash_image returns write errors when flashing recovery/boot image!
A:
For boot: Try to redo the flash procedure
For recovery: Note that you can't flash the same recovery.img as the one already installed, so install another recovery.img first (like maverixx) and then Amon_RA's again. If it still doesn't work reboot, remount the partitions r/w, insmod tattoo-hack.ko and retry flashing.
Q: How can I unroot my device?
A: Just delete su from /system/xbin and restore the old boot.img. Alternatively see here for retrieving a stock ROM to flash it on your phone.
i hope someone try this i don't have time

[NST]Manual Rooting, ADB, Gapps (1.1), etc

Please, dont post on this thread, continue to use [NST]MinimalTouch 1.1beta5
Recomendation, Paste the commands one by one.
I am not responsible for any damage your nook suffers.
Index
Automatic Method:
[NST]MinimalTouch 1.1beta5
[NST]Touch-Formatter
Manual Tutos:
Skip registration (OOBE)
Making the manual process LESS PAINFULL
Setting up adb manually on the nook touch
Setting up root access on NST through adb and installing busybox
Improve battery life(testing)
Backup bookmarks and annotations(testing)
Enable non market app installs
Installing XorZone's B&N button modifier
Change the powered off screen image
Blocking OTA updates
Installing new fonts for your nook (testing)
Installing Gapps (+launcher, etc)
Totally uninstall Gapps (my repack), unrooting, erasing and restoring
Interesting or useful specific apps or hacks for Nook Simple Touch
nook 1.1 update
Thanks to:
GabrialDestruir for his hard work, making easy to root the NST creating the Touchnooter (http://forum.xda-developers.com/showthread.php?t=1343143) (http://forum.xda-developers.com/showthread.php?t=1132693)
ros87 for the update on uramdisk and the how to modify boot/charging images and usb drivers. (http://forum.xda-developers.com/showthread.php?t=1337653) (http://forum.xda-developers.com/showpost.php?p=17882146&postcount=11) (http://forum.xda-developers.com/showpost.php?p=19342931&postcount=12)
XorZone for NookTouchTools and his jars, book button menu and the orientation Switch (http://forum.xda-developers.com/showthread.php?t=1289894)
nookdevs for noogie and making all this possible (http://nookdevs.com/NookColor_Rooting)
mali100 for the update on framework. (http://forum.xda-developers.com/showpost.php?p=19201466&postcount=352)
xboxexpert for the working market. (http://forum.xda-developers.com/showpost.php?p=15084704&postcount=51)
Kralik for his findings. (http://www.mobileread.com/forums/showthread.php?t=156539)
bonzer2u for OTA blocking. (http://forum.xda-developers.com/showpost.php?p=10973887&postcount=1)
traycold for his images (http://forum.xda-developers.com/showpost.php?p=17822468&postcount=9)
jerryfan2000 for Button savior (http://forum.xda-developers.com/showthread.php?t=865525)
OMGWTF_BBQ for the Button Savior eink friendly mod (http://forum.xda-developers.com/showthread.php?t=1250278)
TJay99 for the Simplistic Countdown Timer (http://forum.xda-developers.com/showthread.php?t=1290900)
mdall for tweaking the screen refresh (http://forum.xda-developers.com/showthread.php?t=1241419)
dark_hawk for adding the last step on the Gaps method + Fonts (method 1) (http://forum.xda-developers.com/showpost.php?p=19441352&postcount=33)
met67 for usb drivers http://forum.xda-developers.com/showpost.php?p=19339163&postcount=11
LastSilmaril for the bookmarks and annotations info (http://forum.xda-developers.com/showpost.php?p=19483661&postcount=67)
met67 for the permissions and ownership on Gapps (http://forum.xda-developers.com/showpost.php?p=19658259&postcount=109)
mali100 for portin CWM to NST (http://forum.xda-developers.com/showthread.php?t=1360994)
salsichad2 for pointing out that the X files where corrupt and his adw theme config (http://forum.xda-developers.com/showpost.php?p=19720053&postcount=139)
kneeldug for sugesting extra steps on the automatic tuto.
bisbal for helping me beta testing.
dobbing for the copy of the 1.1 update.
Setting up adb manually on the nook touch:
If you want to restore, wipe data, or reset your nook, FIRST read how to backup your anotations and then search on this post for: Totally uninstall Gapps (my repack), unrooting, erasing and restoring.
Download noogie, and burn it into an SD-card (http://www.multiupload.com/OFI609MP8V) use Win32DiskImage.exe.
Shut down the Nook Touch completely your NST http://www.multiupload.com/CJ981FWPJG
Insert the SD-card into your Nook, connect it to the pc and turn it on.
When the nook ends booting (you should see a rooted forever splash screen on it) wait 20 seconds, you should see a new drive named boot, if not, go to MiniTool Partition Wizard Home Edition look for a partition named boot and assign it a letter.
Open boot, and replace the uramdisk, with one of these (http://forum.xda-developers.com/showthread.php?t=1337653).
This tuto is all made for the Wifi-uramdisk, if you want to use the usb change all the "adb connect yourNSTip" into "adb devices".
If you finally want to use adb over usb, follow this to make the nook recognizable by adb http://forum.xda-developers.com/showpost.php?p=19342931&postcount=12 or install this http://forum.xda-developers.com/showpost.php?p=19339163&postcount=11.
Eject the nook from the pc and reboot the NST without the noogie SD-card.
Setting up root access on NST through adb and installing busybox:
Download java JKD http://www.oracle.com/technetwork/java/javase/downloads/index.html
Download the android sdk (I recommend zipped) and extract it on C so that it looks like C:/android-sdk-windows
Open the SDK manager and update it, install for example the 2.1 platform, etc, it will automatically create /platform-tools
Download Superuser (http://nookdevs.com/images/a/a9/Superuser.zip), su (http://nookdevs.com/images/e/e0/Su.zip), and busybox (http://bit.ly/s1s7FZ or http://benno.id.au/android/busybox), extract them on C:/android-sdk-windows/platform-tools
Connect your NST to your home Wi-Fi, and check its ip.
Open cmd and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb install Superuser.apk
adb push su /data/local/
adb shell
cd /system/bin
mount -o remount,rw /dev/block/mmcblk0p5 /system
cat /data/local/su > su
chmod 6755 su
reboot
Now we will install buysbox.
Close cmd and reopen it, When your nook reboots type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
su
mount -o remount,rw /dev/block/mmcblk0p5 /system
exit
exit
adb push busybox /data/local
adb shell
su
cd /system
mkdir /system/xbin
cd /data/local
chmod 755 busybox
/data/local/busybox cp /data/local/busybox /system/xbin/busybox
cd /system/xbin
chmod 755 busybox
./busybox --install -s /system/xbin
rm /data/local/busybox
reboot
Improve battery life (testing)
As the Nook Touch hasn't got a overclocking kernel, and isn't near, as it isn't convenient to change or modify the cpu governor (it works in an unusual way), as I don't like too many apks bloating my nook, there is something that seems to be working for me, underclocking it manually of course .
The Nook has 3 stock frequencys, 300, 600, 800, and a deepsleep state.
As this small monster is just an ereader, and the refresh rates of eink are painfully slow I didn't find the need for it going all the way to 800mhz I did this small trick:
Make a backup up clrbootcount.sh.
Open CMD and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb pull /system/bin/clrbootcount.sh
Now lets modify it:
Code:
adb shell
mount -o remount,rw /dev/block/mmcblk0p5 /system
echo "echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq" >> /system/bin/clrbootcount.sh
adb reboot
Check to see if the process was succesfull by typing this on cmd:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
To return back to stock file, restore the file you backed up by pushing it back or use:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
mount -o remount,rw /dev/block/mmcblk0p5 /system
sed -i '/echo/d' /system/bin/clrbootcount.sh
reboot
Click to expand...
Click to collapse
If the output is 300000, then it worked and now your nook won't go all the way to 800mhz, if you want to limit it to 600mhz, just change 300000 to 600000.
Backup bookmarks and annotations (Haven't tried it yet)
Bookmarks and annotations are saved in /data/data/com.bn.nook.reader.activities/databases/
To backup them open CMD and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
mount -o remount,rw /dev/block/mmcblk0p5 /system
exit
adb pull /data/data/com.bn.nook.reader.activities/databases/ /bookmarks
To restore them after a reset open CMD and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
mount -o remount,rw /dev/block/mmcblk0p5 /system
exit
adb push /bookmarks /data/data/com.bn.nook.reader.activities/databases/
Enable non market app installs:
Download sqlite3 (http://www.sqlite.org/sqlite-shell-win32-x86-3070900.zip) and extract it on C:/android-sdk-windows/platform-tools
Open cmd and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
exit
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
sqlite3 settings.db "update secure set value=1 where name='install_non_market_apps';"
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
Installing XorZone's B&N button modifier (Jars for 1.1, for other system versions check thread)(as I call it)
Download the jars (http://forum.xda-developers.com/attachment.php?attachmentid=781948&d=1321243370) and NookTouchTools (http://forum.xda-developers.com/attachment.php?attachmentid=750222&d=1318646585) and extract the zips on C:/android-sdk-windows/platform-tools. (Thread: http://forum.xda-developers.com/showthread.php?t=1289894)
Then backup the original jars onto the SD-card.
Open CMD and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
mount -o remount,rw /dev/block/mmcblk0p5 /system
cp -p /system/framework/android.policy.jar /sdcard
cp -p /system/framework/services.jar /sdcard
exit
Then let’s push the new ones in place and install NookTouchTools:
Code:
adb push android.policy.jar /system/framework/
adb push services.jar /system/framework/
adb install NookTouchTools-1.0b2.apk
This can also be done by Nooktouchtools, but this is a manual thread, so now we will delete calvick-cache and fix permissions:
Code:
adb shell
mount -o rw,remount -t ext2 /dev/block/mmcblk0p5 /system
chown root.root /system/framework/*
chmod 644 /system/framework/*
rm -R /data/dalvik-cache/*
reboot
Now open NookTouchTools and modify settings as you wish.
Change the powered off screen image
First, let’s make a copy of the original apk.
Open CMD and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb pull /system/framework/framework-res.apk
You will find this file on C:/android-sdk-windows/platform-tools.
Make a copy of the file and open it with 7zip (download it if you don’t have it http://www.7-zip.org/).
Look for and open res\drawable-mdpi\
Search for cold_boot_screen.png and replace it for whatever 800x600 image you want.
Search for cold_battery_low_boot_screen.png and again replace it for whatever 800x600 image you want.
Save the modified apk on C:/android-sdk-windows/platform-tools
Then we have to push the new file and fix permissions.
Code:
adb shell
mount -o remount,rw -t ext2 /dev/block/mmcblk0p5 /system
exit
adb push framework-res.apk /system/framework/
adb shell
chown root.root /system/framework/*
chmod 644 /system/framework/*
rm -R /data/dalvik-cache/*
reboot
If you have problems pushing the framework-res.apk because the NST reboots, or hangs, use this zip (http://nooter.googlecode.com/files/RestoreFramework.zip) in conjunction with CWM (http://forum.xda-developers.com/attachment.php?attachmentid=806435&d=1323121399). (Keep reading)
You must:
Open the zip and drop your original or modifyed framework-res.apk in /system/framework, inside the zip.
Copy it to the SD card where you have burnt CWM and flash it through it.
If you see any strange behavior restore your backed up copy.
On this post, there are some nice pictures to use, http://forum.xda-developers.com/showpost.php?p=17822468&postcount=9, I modified them a bit, making them 16 bit grayscale and 800x600, see attachments..
Blocking OTA updates:
To prevent future automatic updating and unrooting you can block OTA updates.
Open CMD and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb pull /data/data/com.bn.devicemanager/databases/devicemanager.db devicemanager.db
sqlite3 devicemanager.db
sqlite> update registry set value='manual' where name='com.bn.device.fota.mode';
sqlite> .q
adb push devicemanager.db /data/data/com.bn.devicemanager/databases/devicemanager.db
adb reboot
Installing new fonts for your nook
This first method works for Opera mini, for example, not for normal apps.
The second one for changing the official interface Font (testing)
The third one for changing the Fonts on the official reader app (testing)
1º method
First open CMD and make a copy of your fonts:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
su
mount -o remount,rw /dev/block/mmcblk0p5 /system
adb pull /system/fonts
exit
Then add the new fonts.
Code:
adb push thenewfont /system/fonts
adb shell
su
chmod 4755 /system/fonts/*
2º method
3º method
Installing Gapps (+launcher, etc)
Market FULLY functional, My apps tab working and updating correctly, proof: http://forum.xda-developers.com/showpost.php?p=19602755&postcount=76
PC android market webpage working, proof:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
dark_hawk's exprience.
My experience.
New packages, deleted all the unneeded, apks, not needed libraries, jars, etc.
You have four options:
Minimal Touch (Core Gapps (http://bit.ly/rQ3YNn))
Minimal Touch + NookColorTools (http://bit.ly/vUwXeb)
Minimal Touch + Extras (Core Gapps + Launcher + theme + Button savior + NookColorTools(http://bit.ly/skgHhe))
Everything is functional, Gmail, Gtalk, Market.
Instructions:
For this process to work, you will need to install busybox, so search for Setting up root access on NST through adb and installing busybox and go directly to installing busybox if you come from another method of installing Gapps.
Download Minimal Touch + Extras if you haven't got a launcher installed, and extract it on the C:/android-sdk-windows/platform-tools (root)
Download Minimal Touch if you already have a launcher installed, and extract it on the C:/android-sdk-windows/platform-tools (root)
First, make a backup of the files we will modify:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
su
mount -o remount,rw /dev/block/mmcblk0p5 /system
adb pull /system/framework/framework.jar
adb pull /data/system/packages.xml
adb pull /system/build.prop
exit
exit
Second, lets start with the install process.
Open CMD and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
su
mount -o remount,rw /dev/block/mmcblk0p5 /system
exit
exit
adb push data /data
adb push system /system
If the NST reboots before finishing the process, it may happen, start again where you left it.
Now lets fix permissions and ownership.
Code:
adb shell
su
mount -o remount,rw /dev/block/mmcblk0p5 /system
chown system.system /data/app/*
chmod 644 /data/app/*
chmod 644 /system/app/*
chmod 644 /system/etc/permissions/*
chmod 644 /system/framework/*
chmod 644 /system/lib/*.so
reboot
When the NST reboots select adw launcher as your predefined launcher (If you haven't already), log in on YouTube (click settings, my channel) and log in the Gmail account you used on YouTube, both accounts must be the same.
It will fail to sync and force close.
Open Cmd and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
su
mount -o remount,rw /dev/block/mmcblk0p5 /system
sed -i '/uid.system/,/perms/{/uid.system/b;/perms/b;d}' /data/system/packages.xml
reboot
Gmail should already work and sync.
Open Cmd and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
su
mount -o remount,rw /dev/block/mmcblk0p5 /system
echo "ro.config.nocheckin=no" >> /system/build.prop
reboot
Let android fully load.
Open Market, it will try to connect, if it can't retry until it does (it will), if it doesn’t, you haven’t got the Wi-Fi on .
Market should be fully functional now.
After this, manually by deleting it and its data, or through your launcher, or through Nook Color Tools, you can unistall YouTube.apk, it is no longer needed, and autostarts everytime wasting resources.
Now lets make protected apps show in market
Open CMD and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
su
mount -o remount,rw /dev/block/mmcblk0p5 /system
sed -i 's/^.*ro.build.fingerprint.*$/ro\.build\.fingerprint=verizon\/voles\/sholes\/sholes:2\.1-update1\/ESE81\/29593:user\/release-keys/' /system/build.prop
reboot
Protected apps wont appear inmediatly, the market must check your new fingerprint and that happens at midnight, so you can wait 1 day or:
Check you have correctly changed the fingerprint, change the time to 23:50 on your Nook Touch and wait till "midnight" wait a bit more, and protected apps should appear.
Totally uninstall Gapps (my repack), unrooting, erasing and restoringTesting
Open CMD and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
su
mount -o remount,rw /dev/block/mmcblk0p5 /system
adb push /system/framework/framework.jar
adb push /data/system/packages.xml
adb push /system/build.prop
rm /data/app/YouTube.apk
rm -R /data/data/com.google.android.youtube
rm /system/lib/libgtalk_jni.so
rm /system/lib/libinterstitial.so
rm /system/framwork/com.google.android.gtalkservice.jar
rm /system/etc/permissions/com.google.android.datamessaging.xml
rm /system/etc/permissions/com.google.android.gtalkservice.xml
rm /system/app/Gmail.apk
rm -R /data/data/com.google.android.gm
rm /system/app/GmailProvider.apk
rm -R /data/data/com.google.android.providers.gmail
rm /system/app/GoogleApps.apk
rm -R /data/data/com.google.android.googleapps
rm /system/app/GoogleCheckin.apk
rm -R /data/data/com.google.android.server.checkin
rm /system/app/GoogleSubscribedFeedsProvider.apk
rm -R /data/data/com.google.android.providers.subscribedfeeds
rm /sytem/app/gtalkservice.apk
rm -R /data/data/com.google.android.apps.gtalkservice
rm /system/app/Talk.apk
rm -R /data/data/com.google.android.talk
rm /sytem/app/TalkProvider.apk
rm -R /data/data/com.google.android.providers.talk
rm /sytem/app/Vending.apk
rm -R /data/data/com.android.vending
reboot
Unrooting:
Open CMD and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
mount -o remount,rw /dev/block/mmcblk0p5 /system
rm -R /sytem/app/Superuser.apk
rm -R /data/app/Superuser.apk
rm -R /sytem/bin/su
rm -R /sytem/xbin
reboot
Erasing and restoring:
After this, if what you want is to have a clean nook and you didnt make a backup before rooting you have to:
Use nookRestore to restore /system (http://forum.xda-developers.com/showthread.php?t=1289233), or using adb do:
Open CMD and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
echo -n -e "\x08\x00\x00\x00" > /rom/devconf/BootCnt
reboot
Use on settings, device, Erase and Deregistered to wipe /data
(If it doesn’t let you, force it shutting down your nook, then starting it up, and when the screen flickers press right and left bottom buttons, hold for 5+ seconds).
Update to 1.1 (http://www.barnesandnoble.com/u/Software-Updates-NOOK-Simple-Touch/379003175/)
Interesting or useful specific apps or hacks for Nook Simple Touch
Calendar Pad (https://market.android.com/details?id=jp.ne.gate.calpad)
Book button menu (http://forum.xda-developers.com/showthread.php?t=1280509)
Button Savior (http://forum.xda-developers.com/showpost.php?p=9669486&postcount=1)
Button Savior eink friendly mod (http://forum.xda-developers.com/showthread.php?t=1250278)
Simplistic countdown timer (http://forum.xda-developers.com/showthread.php?t=1290900)
Tweaking the screen refresh (http://forum.xda-developers.com/showthread.php?t=1241419)
Orientation Switch [Recommended, use in conjunction with XorZone's B&N button modifier] (http://forum.xda-developers.com/showthread.php?t=1283176)
ADW launcher + Minimalist_Black - ADW Theme, nice launcher + awesome theme pack with awesome icons for eink (https://market.android.com/details?id=org.adw.launcher + https://market.android.com/details?...iwiY29tLmRhdmlkMTE3MS5taW5pbWFsaXN0YmxhY2siXQ..)
Minimalistic text, it’s a really nice free widget app, from which you can make things like this http://attachments.xda-developers.com/attachment.php?attachmentid=781918&d=1321239931, you will need version 2.6.2 or 2.6.3 here you have the 2.6.2 (http://www.megaupload.com/?d=UO7PD9BU) and the market link for the latest (https://market.android.com/details?id=de.devmil.minimaltext)
AdbWireless widget, to control when you want adb over Wi-Fi on and off with the Wi-Fi uramdisc, or to add the possibility to the usb uramdisc (https://market.android.com/details?id=siir.es.adbWireless)
Making the manual process LESS PAINFULL
To not have to open each time CMD, and go typing cd C/.... and connect yourNSTip make a small batch file like this:
Open notepad type:
Code:
@echo off
cd C:/android-sdk-windows/platform-tools
adb kill-server
adb connect yourNSTip
cmd
Save the file as .bat, or change the extension when saved.
Now each time you reboot in the proces, instead of opening CMD and typing cd ..... and adb connect.... just open this file and star copying command right away
eded333 said:
Change the powered off screen image
First, let’s make a copy of the original apk.
Open CMD and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb pull /system/framework/framework-res.apk
You will find this file on C:/android-sdk-windows/platform-tools.
Make a copy of the file and open it with 7zip (download it if you don’t have it http://www.7-zip.org/).
Look for and open res\drawable-mdpi\
Search for cold_boot_screen.png and replace it for whatever 800x600 image you want.
Search for cold_battery_low_boot_screen.png and again replace it for whatever 800x600 image you want.
Save the modified apk on C:/android-sdk-windows/platform-tools
Then we have to push the new file.
Code:
adb shell
mount -o remount,rw -t ext2 /dev/block/mmcblk0p5 /system
exit
adb push framework-res.apk /system/framework/
adb reboot
If you see any strange behavior restore your backed up copy.
On this post, there are some nice pictures to use, http://forum.xda-developers.com/showpost.php?p=17822468&postcount=9, I modified them a bit, making them smaller in size, 16 bit grayscale and 800x600 here is the link http://www.megaupload.com/?d=PD94ZJK9.
Click to expand...
Click to collapse
So, I did all that, but I'm stuck at the loading screen (the one with 5 dots doing stuff).
Any ideas?
I've also tried to restore the orig framework-res.apk, but nothing.
Also changed permissions back to 644.
ace7196 said:
So, I did all that, but I'm stuck at the loading screen (the one with 5 dots doing stuff).
Any ideas?
I've also tried to restore the orig framework-res.apk, but nothing.
Also changed permissions back to 644.
Click to expand...
Click to collapse
I hate you..... (not really )
Read the first page:
"Please, dont post on this thread, continue to use [NST]MinimalTouch 1.1beta5"
Anyway
It works, I've modded it myself, try to fix the the permissions:
chmod 644 /system/framework/*
What images did you use?
Please lets continue this conversation on: http://forum.xda-developers.com/showthread.php?t=1346748
Or through PM, id like to use this thread only to add more tutos, or correct the ones I allready have.
----------------------------------------------------------------------------
Edit,
didnt read you allready did that.
So after restoring the original file, you still have problems?
Try to force shut it down, and start it again, or try to erase dalvik cache, and reboot (if you can acces adb, if not I'll make you an CWM zip)
rm -rf /data/dalvik-cache/*
Skip OOBE:
On the first screen that appears on the NST without tapping any button.
1.Hold the right top button and move your finger from left to right on the top of the screen.
2.The factory button will appear at the bottom right of the screen, tap it.
3.Hold again the right top button and tap the right bottom part of the screen, where the factory button appeared
4.A button labeled skip oobe will appear, tap it, your done
Redid Gapps packages and updated links.
eded333 said:
Improve battery life (testing)
As the Nook Touch hasn't got a overclocking kernel, and isn't near, as it isn't convenient to change or modify the cpu governor (it works in an unusual way), as I don't like too many apks bloating my nook, there is something that seems to be working for me, underclocking it manually of course .
The Nook has 3 stock frequencys, 300, 600, 800, and a deepsleep state.
As this small monster is just an ereader, and the refresh rates of eink are painfully slow I didn't find the need for it going all the way to 800mhz I did this small trick:
Make a backup up clrbootcount.sh.
Open CMD and type:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb pull /system/bin/clrbootcount.sh
Now lets modify it:
Code:
adb shell
mount -o remount,rw /dev/block/mmcblk0p5 /system
echo "echo 300000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq" >> /system/bin/clrbootcount.sh
adb reboot
Check to see if the process was succesfull by typing this on cmd:
Code:
cd C:/android-sdk-windows/platform-tools
adb connect yourNSTip
adb shell
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
To return back to stock file, restore the file you backed up by pushing it back or use:
If the output is 300000, then it worked and now your nook won't go all the way to 800mhz, if you want to limit it to 600mhz, just change 300000 to 600000.
Click to expand...
Click to collapse
Have you done any actual benchmarkings on this? Usually trickery like this actually make degrades battery performance because the slower the computations is done the less time is spent in deep sleep. Most of the time the device should be in deep sleep but whenever something need to be done, it should be done as quickly as is possible.
Anyway I like your guides. I just got everything up and running exactly as I want without a bunch of crappy useless apps installed. Market as well. Something the automated methods doesn't handle at all well
Fulkerson said:
Have you done any actual benchmarkings on this? Usually trickery like this actually make degrades battery performance because the slower the computations is done the less time is spent in deep sleep. Most of the time the device should be in deep sleep but whenever something need to be done, it should be done as quickly as is possible.
Anyway I like your guides. I just got everything up and running exactly as I want without a bunch of crappy useless apps installed. Market as well. Something the automated methods doesn't handle at all well
Click to expand...
Click to collapse
¬¬ please dont reply on this thread.... do it on the thread which I point out on the first post.
I did some testing, and it did last longer when being used, it lasted the same on sleep, I never turn it off, but didnt really do any real benchmarking so its just my impression.
I'm glad this manual tutos are still being used and found usefull ^^

Howto apply manually update to 4.0.4 with encrypted flash and minor changes

OK i'm posting this since it was a bit complex and i think others could benefit.
I was on 4.0.2 stock HSPA (yakju-icl53f). But i had made some minor changes, and worse, had encrypted the flash. How to update to 4.0.4 without a wipe? Turns out it is possible.
First, get CWM and 4.0.4 image.
Clockworkmod from here.
OTA image from 4.0.2 to 4.0.4 from here.
Steps needed:
1. adb reboot bootloader
2. fastboot cwm.img
3. adb shell
4. mount -t tmpfs -o size=330M,mode=0777 tmpfs /sdcard
5. adb push 7f97fbc19417.signed-yakju-IMM76D-from-ICL53F.7f97fbc1.zip /sdcard/update.zip
6. unzip 7f97fbc19417.signed-yakju-IMM76D-from-ICL53F.7f97fbc1.zip META-INF/com/google/android/updater-script
7. unzip 7f97fbc19417.signed-yakju-IMM76D-from-ICL53F.7f97fbc1.zip META-INF/com/google/android/update-binary
8. adb push META-INF/com/google/android/updater-script /sdcard/
9. adb push META-INF/com/google/android/update-binary /sdcard/
10. Fix all the changes you made in the past <more below>. You can try the below steps and just see which assert fail, and then fix them one by one
11. adb shell
12. cd /sdcard/
13. chmod a+rx *
14. ./update-binary 2 stdout update.zip
15. reboot and enjoy.
The changes i had made were to build.prop (adding ro.config.vc_call_vol_steps=10 from volume+) and to remove GenieWidget.apk via TitaniumBackup.
To fix these, i got the 4.0.2 stock image from here.
1. tar zxvf yakju-icl53f-factory-89fccaac.tgz
2. cd yakju-icl53f
3. unzip image-yakju-icl53f.zip
4. Get the ext4_utils file from here. Build it.
5. run simg2img system.img x.img
6. mkdir ./x; sudo mount -o loop -t ext4 ./x.img x
7. adb push x/app/GenieWidget.apk /system/app/
8. adb push x/app/GenieWidget.odex /system/app/
9. adb push x/build.prop /system/
[i just kept running the update-binary 2 stdout update.zip and watching the assert until i knew what all i had changed].
After all this, i rebooted, and it worked. Despite my being encrypted. Despite my changes. Despite my not being eligible for OTA yet. Once i rebooted, i entered my decryption key, it chewed on the upgrade for a bit, and i'm on 4.0.4
Enjoy. The above instructions are for Linux obviously, and may have some minor typos as i did them afterwards.
Thank you for this howto!
Since you are "just updating" I assume you lost root?
Did the boot duration change? With crypted SGN 4.0.2 it takes an eternity and a half to boot.
yes, lost root, had to re-apply (you can use the above instructions but put the super-user zip in for cwm).
no change in boot time
Mmm, you can also do a 'mount -a; chmod 4755 /system/bin/su' if you previously had root, @ step 3 (after rebooting w/ all the changes, redo 1/2/3).
For interest (to open an old thread), this worked to move to Jelly Bean as well. I took the clockworkmod version of the JB from here.
I used the same basic steps as above, but w/ the change of:
1. make ram disk (using 390M instead of 330M)
2. unzip jb-takju.zip (on pc)
3. adb push boot.img /sdcard/
4. adb shell; cat /sdcard/boot.img > /dev/block/platform/omap/omap_hsmmc.0/by-name/boot
5. adb push system.tar /sdcard
6. adb shell; mount /system; cd /system; rm -rf *; cd /; tar xvf /sdcard/system
7. reboot. enjoy.
This kept all my settings, apps, everything... its seamless.

Complete Guide to Root, Downgrade and Upgrade HTC Desire Z

A link for all the necessary files in a platform-tools folder.zip:
Sorry, this forum doesn’t allow me to submit direct links.
h.t.t.p.w.w.w. dropbox.com/s/tk0v3aogwqhp5qn/platform-tools.zip?dl=0
Unzip and put the platform-tools folder on your C drive.
A part of this guide was made by steven-liesenborgs I have used that to make an all in one guide.
1. Create Temproot:
Go to start – windows accessories – open the command prompt. Connect the USB cable to your phone and connect to your pc (!! Make sure USB debugging is turned on your HTC and if asked for only charging or mass storage choose only charging!!) Now go back to the command prompt and type: (press enter after each line,)
cd c:\platform-tools
adb devices
Normally you will now see numbers and letters meaning your device is connected and recognized.
Type: (in windows 10 you can select and use ctrl-c ctrl-v)
adb push fre3vo /data/local/tmp
adb shell
chmod 777 /data/local/tmp/fre3vo
/data/local/tmp/fre3vo -debug -start FAA90000 -end FFFFFFFF
Now you get normally something like the following lines (this may take 2 min)
Buffer offset: 00000000
Buffer size: 8192
Scanning region fb7b0000…
Scanning region fb8a0000…
Scanning region fb990000…
Scanning region fba90000…
Potential exploit area found at address fbb4d600:a00.
Exploiting device…
I f it Works you will see that $ has dissapeared, otherwise try one of the next lines below (!!restart your mobile for each attempt!!)
/data/local/tmp/fre3vo -debug -start 10000000 -end 1FFFFFFFF
/data/local/tmp/fre3vo -debug -start 20000000 -end 2FFFFFFF
/data/local/tmp/fre3vo -debug -start 30000000 -end 3FFFFFFF
/data/local/tmp/fre3vo -debug -start F0000000 -end FFFFFFFF
/data/local/tmp/fre3vo -debug -start E0000000 -end EFFFFFFF
When $ has dissapeared type:
adb shell
Now you will see # instead off $ which means succes. Now type:
exit
2. Change version to downgrade and get superCID and Goldcard
Type:
adb push misc_version /data/local/tmp/misc_version
adb push flashgc /data/local/tmp/flashgc
adb shell chmod 777 /data/local/tmp/*
adb shell
cd /data/local/tmp
./misc_version -s 1.00.000.0
Now you get:
–set_version set. VERSION will be changed to:1.00.000.0
Patching and backing up partition 17…
Then type:
./flashgc
(!! In case of an error message like below, check if you did select charge only in settings menu !!)
Error opening backup file.
If everything worked type:
sync
You can check if everything is fine, type:
dd if=/dev/block/mmcblk0p17 bs=1 skip=160count=10
1.00.000.010+0 records in
10+0 records out
10 bytes transferred in 0.001 secs (10000 bytes/sec)
BACK-UP everything now
3. Temp root and backup
Type:
Exit
adb push su /data/local/tmp/
adb push busybox /data/local/tmp/
adb push fixsu.sh /data/local/tmp/
adb install SuperUser.apk
adb shell chmod 755 /data/local/tmp/fixsu.sh
adb shell/data/local/tmp/fixsu.sh
Backup your data with a backup program on your phone, Rom Manager, Titanium Backup of My backup root for instance.
4. Downgrade to Froyo:
You will need a Rom which you can find following link below :
(There is a rom included the platform-tools.zip from Dropbox, renamed to PC10IMG.zip ready to use, continue to 4a at once) Remember, this is a shipped EU rom, if you need another you can download and find it at same domain from link below or h.t.t..p androidruu.com
h.t.t.p shipped-roms.com/index.php?catcegory=android&model;=Vision
RUU_Vision_HTC_WWE_1.34.405.5_Radio_12.28b.60.140e_26.03.02.26_M_release_155556_signed.exe
Download this .exe and activate it as administrator wait till you the first screen, don’t do anything just leave it there.
Click on Start>Run and type %temp%. Then click OK. Look for the newest folder in the temp folder. Double-click on it. (Appdata/local files/temp from user administrator) Open the last folder made (organize!) it will have a name like {4AD69632-45A1-41DE-} Search in that directory for a rom which the update utility did create there. Copy the rom to the platform-tools folder. Close the HTC Android Rom Update Utility, you don’t need it anymore. Change the name of the rom in PC10IMG.zip. Be aware if you can see extensions or not and you didn’t create a .zip.zip file. Check it with right click on it and see properties.
4a
Now copy the PC10IMG.zip to the root of SD card. Take off the USB cable and check in phone your settings, charge only, USB and accept software 3thparty. Restart the Desire. For some reason this goes smoother as turning power off. When the screen goes dark push volume down and power button at same time till you get in the boot menu. Click power button one time and the HTC will search for a file, and start to check the PC10IMG.zip. This will take 1 or two minutes . Now you get a choice to upgrade yes or no select yes with the Volume up or down button and activate the choice with the power button. You HTC will now downgrade to Froyo Android 2.2 firmware 1.34.405.5.
5. Root and Superuser to upgrade
Every file you need is already included in the platform-tools.zip from Dropbox
Source: .h.t.t.p.w.w.w. desire.tode.cz/how-to-root-htc-desire-z-g2-vision
Connect the HTC Desire Z to the computer via USB.
Make sure USB debugging is enabled on the HTC Desire Z by checking Settings » Applications » Development » USB debugging.
On the computer, go back to command prompt an type:
adb push busybox /data/local/tmp/
adb push gfree /data/local/tmp/
adb push hboot-eng.img /data/local/tmp/
adb push psneuter /data/local/tmp/
adb push recovery-clockwork-3.0.2.4-vision.img /data/local/tmp/recovery.img
adb push root_psn /data/local/tmp/
adb push su /sdcard/
adb push Superuser.apk /sdcard/
adb shell
chmod 755 /data/local/tmp/*
/data/local/tmp/psneuter
NOTE: You will drop out of the shell after this command to platform-tools folder, type:
adb shell
cd /data/local/tmp
./gfree -f -b hboot-eng.img -y recovery.img
As it is very important that the hboot was installed correctly gfree calculates md5sums of the partition. It will calculate the following 3 checksums
md5sum #1 - checksum of partition 18 before the installation
md5sum #2 - checksum of the hboot image that should be installed
md5sum #3 - checksum of partition 18 after the installation
The messages that you what to see are either/or
md5sum #1 == md5sum #2 – the hboot image is already installed -> skipping installation
md5sum #3 == md5sum #2 – the hboot image was successfully installed -> OK!
If you get a different error message then DO NOT REBOOT. Check everything again and try again
If gfree worked correctly continue with, type:
./root_psn
sync
reboot
The HTC Desire Z is now rooted with S-OFF, the Engineering HBoot & the ClockworkMod Recovery.
6. Install a new Rom
This is a tricky part since most roms will just fail to install, at least on shipped models, the roms from Guhl99 (XDA Forums)do the job. There is an interesting part to these roms also, which I Like. You really should check his work out.
In case you prefer a Cyanogenmod version 10.1 Guhl99 made one also you can find it via XDA forums, in the platform-tools folder there is a working Cyanogenmod 10.1 cm-10.1-20140309-UNOFFICIAL-vision.zip in case you don’t like spoofing. If you do like it, check out Guhl99 his work which you should do anyway in case of HTC Desire 7.
In your platform-tools folder select AndromadusAOSP4.2-vision-pff-16062013.zip an AOS Android4.2.2 and gapps-jb-20130301-signed.zip (they are already present in the platform-tools.zip from Dropbox)
Copy them to the root of your SD card, download Rom Manager from link below and install it:
If you can’t download it because your SD is occupied release the USB cable from your phone.
h.t.t.p.w.w.w. apk4fun.com/apk/2119/
Open Rom Manager, select Recovery Setup and activate the 2th ClockworkMod option, select as option the 3x version. Go back and select now the 1th ClockworkMod option and activate it to flash, it will ask for permission which you grant. Now Clockworkmod has root acces as Superuser. Go back to main menu from Rom Manager and select Fix Permissions. Now, check if everything in your Phone settings is still correct. Charge only, USB debugging, allow unknow installs etc. Take the USB cable out of your Phone. In Rom Manager menu select Reboot to Recovery and activate it, no need to push buttons this time the HTC wil go to Rom Manager bootmenu automatic by restart after showing the HTC start screen first.
7. Rom Manager Bootmenu
Another part which need some attention to proceed. In this menu the Volume up and down button are used to scroll. The power button is used to get to out of a submenu. The Photo button, on right lower side is used to activate the selection. With this knowledge in mind it is easy to navigate and delete Factory Settings, then Cache and under advanced menu the Dalvik Cache. Return to main menu pressing the Power button and select install zip from SD. Select ROMAndromadusAOSP4.2-vision-pff-16062013.zip and activate it with Photo button. The Desire will now install AOS Android 4.2.2. When it is finished select Install a zip from SD again and this time select gapps-jb-20130301-signed.zip and install it. When ready select reboot in Rom Manager and the HTC will restart, which will take some minutes, and it will run now on Android 4.2.2. Connect the HTC to USB Cable and copy the 3 files from platform-tools/PFF folder to your SD. Use a file manager on your HTC to search and install them to play with spoofing.
Now you are ready: This rare quality phone with qwerty keyboard will be at your service for some years more.
Still works! Thanks!

Categories

Resources