[GUIDE] Installing stock kernel with ice glacier any - myTouch 4G Android Development

I recently came across a couple of threads in which it seems it was desirable (for some) to run the stock kernel, but with the ice glacier ROM. There were a couple of methods that I saw, neither of which seemed to work for me (one was an update kernel zip file package to be applied from recovery mode from the sdcard, and the other was more involved (see THISthread). The kernel provided in that thread is actually not the true STOCK kernel, as best as I can tell. It is likely equivalent, but uname -r still returns a Gr8gorilla lable.
So I decided to try the following method. First, if you have a nandroid/clockwork recovery backup of your device before installing ice, then you already have everything you need to revert to the stock kernel. Here is the procedure.
1) reboot phone into recovery
2) go into backup and restore
3) select advanced restore
4) select the very first backup set (the stock, probably first rooted one).
5) select restore boot partition
After this completes, you'll have ice but with stock kernel. However, your wireless will not work until you place the correct kernel module file corresponding to your kernel (bcm4329.ko) in the /system/lib/modules directory. In your nandroid backup set, there is a system.img file. Transfer this file to your computer, and use unyaffs to extract its contents and look for lib/modules/bcm4329.ko
6) while in recovery mode, make sure to mount /system
7) remove or rename the /system/lib/modules/bcm4329.ko file
8) adb push bcm4329.ko /system/lib/modules/bcm4329.ko
9) unmount /system from recovery, and reboot.
That's it. I tested this and ended up seeing:
Code:
Linux localhost 2.6.32.21-g899d047 #1 PREEMPT Tue Oct 26 16:10:01 CST 2010 armv7l GNU/Linux
and my wireless was working just fine. I have attached the wireless kernel module corresponding with stock kernel, and I have attached the boot.img from stock, in case you're reading this, and by some strange reason, you don't actually have an original backup.
I don't personally plan on running stock kernel, I just wanted to see if I _could_ if I wanted to.
Hope you find this useful.
Kambiz

One thing I noted btw, is that after doing this, when I did adb shell, it dropped me into a non-root shell by default, and I had to type "su" or "su - " to gain root. The other thing to note, is that the stock initrd, has the following default.prop entry:
ro.secure=1
whereas ice has:
ro.secure=0
What does this mean?! (besides double rainbow all the way across the sky)?

Setting ro.secure=0 allows adb root functions to work.
My MyGlacier 4G MINE!!!

grankin01 said:
Setting ro.secure=0 allows the "adb remount" command to work.
My MyGlacier 4G MINE!!!
Click to expand...
Click to collapse
Right. That's what I thought. But I have to say, it seemed to work anyway, because I did:
$ su -
# mount -o remount,rw /system
and then
# cd /system/lib/modules
# mv bcm4329.ko bcm4329.ko.ice
# cp /sdcard/stock-bcm4329.ko bcm4329.ko
# chmod 644 bcm4329.ko
# cd /
# mount -o remount,ro /system
Then I rebooted, and the "stock" driver file that I just put in place was persistent. So I'm not sure if clockworkmod is doing something to ensure ro.secure=0 ... I'm not sure.

No, it means that "adb root" and "adb remount" and any of the other adb root functions will have root access to your device through Android Debug Bridge (adb) by default. My adb shell always comes up with a $ prompt and I have to "su" for root. Setting this to 0 should let you type "adb root" or " adb remount" from your command shell on your desktop and allow you a root prompt device shell or rw access to system without having to "su" or "mount -o remount,rw /dev/block/mmcblk0p25 /system".
My MyGlacier 4G MINE!!!

so this is the true stock kernel?

tiger013 said:
so this is the true stock kernel?
Click to expand...
Click to collapse
Yes. I made a clockworkmod backup (nandroid backup) after rooting my phone with visionary+, but didn't alter anything else. So once I overwrote everything with Ice Glacier, I still have stock (post OTA update to 2.2.1) kernel and wireless drivers. (attached to OP).
I don't know how to convert them to a flashable update.zip, but I was able to load them using the procedure above.
EDIT:
Notice that the output of "uname -a" when run from adb shell is:
Linux localhost 2.6.32.21-g899d047 #1 PREEMPT Tue Oct 26 16:10:01 CST 2010 armv7l GNU/Linux
The Gorilla kernels have EXTRAVERSION strings added (the kernel version follows after "Linux localhost" in that string)

thank you! I added it to my thread

thanks for this peeps

Related

[HOWTO] manual rooting of Galaxy Tab (EURO)

This howto is for those people who are unable to root their Galaxy Tab using any of the automated procedures and do not suffer from CLPS (command-line-phobia-syndrome).
My story: After upgrading my EURO (GSM) Galaxy Tab to JM6 my persistent efforts to root the device using either the z4root or SuperOnClick methods have all been unsuccessful. z4root (v1.3.0) kept crashing at different stages, apparently depending on which and how many background apps were running. With SuperOneClick I never managed to get beyond the "changing permissions" stage.
Since both methods are basically wrappers of the rageagainstthecage application, I tried to perform the rooting procedure manually. Guess what, that worked without any problem and it is pretty easy to do.
The basic steps of the rooting process are:
1) use rageagainstthecage to get a temporary root shell
2) use the temporary root shell to copy three files to the read-only system partition the device
While I find the outlined procedure straightforward, you may not. Anyhow, try this at your own risk.
==== Prerequisites ====
I used Ubuntu 10.10 for this, but it should work on any other distro and on Windows just as well. Whatever OS you use, you need a working adb connection to your Galaxy Tab. Odin or Kies are of no use here.
You need the following binaries
* su
* busybox
* Superuser.apk
* rageagainstthecage
To get the all required files, simply download "SuperOneClickv1.5.5-ShortFuse.zip". That's what I used.
Get it here: http://forum.xda-developers.com/showthread.php?t=803682
Extract the contents of the ZIP, open a command-prompt on your computer and change to the directory where the extracted files are located.
Some advice if shell commands are not your regular cup of tea.
The following instructions show the shell commands. Some are executed on the host computer. Others are executed on the Galaxy Tab. You can differentiate between the two easily: All commands which start with "> " need to be executed in a shell on the host computer. Commands which are prefixed with "$ " are executed on the Galaxy Tab. In both case the ">" and the "$" must not be typed. If you copy+paste from this howto, make sure only to copy the commands and leave out the prompt.
==== Step 1: getting a temporary root shell ====
Copy the rageagainstthecage exploit to a temporary directory.
Code:
> adb push rageagainstthecage /data/local/tmp
263 KB/s (5392 bytes in 0.020s)
Change the file permissions and execute the exploit.
Code:
> adb shell
$ cd /data/local/tmp
$ chmod 777 rageagainstthecage
$ ./rageagainstthecage
[*] CVE-2010-EASY Android local root exploit (C) 2010 by 743C
(other output truncated)
Your shell session will be terminated which will throw you back to the regular command prompt of your host computer.
==== Step 2: restart adb server ====
Now stop and restart the adb server process.
Code:
> adb kill-server
> adb start-server
* daemon not running. starting it now *
* daemon started successfully *
Now reconnect to the Galaxy Tab again. Notice the '#' prompt. This means you have a temporary root shell now. We use this to execute some privileged commands which make the rooting permanent.
==== Step 3: making it permanent ====
First, make the system partition writeable. We need this to be able to copy su, busybox and Superuser.apk to the required locations. Then exit the android shell again.
Code:
> adb shell
# mount -o remount,rw -t rfs /dev/block/stl9 /system
# exit
Now we push busybox and su via adb. Then we install Superuser.apk.
Code:
> adb push busybox /system/bin
> adb push su /system/bin
> adb install Superuser.apk
The final steps are to change the file permissions for su and busybox and then remount the system partition as read-only again.
Code:
> adb shell
# chmod 4755 /system/bin/busybox
# chmod 4755 /system/bin/su
# mount -o remount,ro -t rfs /dev/block/stl9 /system
# exit
That should be all. Try a reboot and some apps which require root, like Titanium Backup. The Superuser.apk should popup a dialog requesting permission.
Hope this helps. Happy rooting.
[update]
This process worked for JMA and JMD as well.
"adb install" Superuser.apk instead of "adb push"
[/update]
It will help me !
Merci ;-)
Fantastic! This is just what I was looking for, thank you! I feel dumb now, because I started a thread of my own right as you posted this. You must just type faster than me
I ran a quick test, and it all looks good. One quick question actually. Why do you mount like this:
Code:
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
When most instructions for the Galaxy Tab have you doing something like this:
Code:
# mount -o remount,rw -t rfs /dev/block/stl9 /system
I'm not saying it is wrong, in fact, it actually worked for me. I'm just curious as to why it works like that? My understanding of mounting partitions and such in Linux is a little bit weak, so I like to indulge my curiousity by bugging fine people like yourself
Anyway, thanks again, this did exactly what I needed it to. Well done, I appreciate it.
DavidThompson256 said:
One quick question actually. Why do you mount like this:
Code:
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
When most instructions for the Galaxy Tab have you doing something like this:
Code:
# mount -o remount,rw -t rfs /dev/block/stl9 /system
I'm not saying it is wrong, in fact, it actually worked for me. I'm just curious as to why it works like that? My understanding of mounting partitions and such in Linux is a little bit weak, so I like to indulge my curiousity by bugging fine people like yourself
Click to expand...
Click to collapse
Thanks for pointing that out! Actually both the filesystem type and blockdevice name were totally wrong. Apparently the mount command ignores both parameters - at least when they are wrong.
I just verified this as self-punishment for not paying attention:
Code:
# mount
(...)
/dev/block/stl9 /system rfs ro,relatime,vfat,log_off,check=no,gid/uid/rwx,iocharset=utf8 0 0
(...)
/system is mounted read-only to /dev/block/stl9. This is the normal state of things.
Now I remount this without the fstype parameter and using a wrong blockdevice name:
Code:
# mount -o remount,rw /dev/block/xyz /system
# mount
(...)
/dev/block/stl9 /system rfs rw,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0
(...)
Surprise, this actually remounts /system in read-write mode. This is why my original howto worked despite using the wrong parameters.
Thanks again. I corrected the HOWTO.
It works for me, but i get now error message: The application calendar save (proces com.android.providers.calendar) is unexpecly stopt. Try again. Forced closing
I had this also with SuperOneClick.
When i want to start the calender in the applications i get it also.
The application wil not run anymore.
How can i resolved this.
Thnx
leonreijnders said:
It works for me, but i get now error message: The application calendar save (proces com.android.providers.calendar) is unexpecly stopt. Try again. Forced closing
I had this also with SuperOneClick.
When i want to start the calender in the applications i get it also.
The application wil not run anymore.
How can i resolved this.
Thnx
Click to expand...
Click to collapse
That is strange. The result of the rooting process is just adding three files to the system partition. I find it hard to believe that this could lead to the problem you describe. However, while experimenting with z4root I had the the effect that there were many rageagainstthecage processes running in the background and the Galaxy Tab slowed down considerably. Perhaps there is something similar going on.
Have you tried rebooting after completing the rooting process?
Try shutting down the Tab completely.After rebooting get a shell on the Tab with "adb shell" and execute "ps". That shows the process list. If that looks normal, I would try a factory reset of the device. Which ROM version are you running?
BlackLevel: Thank you soooooooooo much... I don't get how to hit the Thanks Meter thing, but here is the old fashioned way. I used a MacBook to accomplish your perfect, step by step rooting of an AT&T Galaxy Tab i987. It helps that I'm more comfortable at the command line than with most GUI systems.
I could put this into a bash script, but that could be dangerous. People really need to look at whats happening with 'adb' and have some idea of what adb is for. I did renamed your 'adbmac' to 'adb', then I could cut and paste from your instructions except for adding ./ before the adb... ie. ./adb shell
Again, wonderful work at pulling this all together in one place.
Jeff
This guide worked perfectly! I love a nice quiet clean root and it doesn't get any better than this. You my friend deserve a cookie!
Hi Guys,
I flashed to JMA, rooted it with One Click Root, and everxthing seemdet to be okay, but activating OCLF failed....is there anybody with the same problem?
Jan
Thanks a lot !. It's clean and doesn't need a kies ...
Just a question : after reboot I have to use "su" after "adb shell" to become root.
Is there any way to be root directly after adb shell ?
And thanks again ...
Mike
mbaroukh said:
Just a question : after reboot I have to use "su" after "adb shell" to become root.
Is there any way to be root directly after adb shell ?
Click to expand...
Click to collapse
The reason is that "/sbin/adbd" (the adb daemon) is running as the shell user. It would need to run as root user instead. This requires changes to the initial ram disk where adbd the relevant settings are stored.
Dealing with "insufficient permissions for device"
Thanks, this worked for me.
One small thing: running from a Linux sustem (Ubuntu 9.04), to overcome a "insufficient permissions for device" problem, I had to put my Ubuntu terminal session into su mode and restart the ADB server -- cf. groups.google.com /group/android-discuss/browse_thread/thread/f85a795644e65b59?pli=1 :
[[
adb kill-server
sudo adb start-server
adb devices
]]
gklyne said:
One small thing: running from a Linux sustem (Ubuntu 9.04), to overcome a "insufficient permissions for device" problem, I had to put my Ubuntu terminal session into su mode and restart the ADB server -- cf. groups.google.com /group/android-discuss/browse_thread/thread/f85a795644e65b59?pli=1 :
[[
adb kill-server
sudo adb start-server
adb devices
]]
Click to expand...
Click to collapse
Thanks for the feedback. On my Ubuntu 10.10 adb runs under my regular user-id (1000) and I do not have to use sudo or run the local adb server as root. That might be due to the way the udev rules are set up. Mine are rather unrestrictive and look like this:
Code:
$ cat /etc/udev/rules.d/51-android.rules
SUBSYSTEMS=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
SUBSYSTEMS=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
How do yours look like?
Which is the more simple method for root of galaxy tab euro ?are there ?
the incredible said:
Which is the more simple method for root of galaxy tab euro ?are there ?
Click to expand...
Click to collapse
Try z4root or SuperOneClick. Both methods are wrappers of the rageagainstthecage exploit and try to automate the manual process outlined here.
This thread should be a sticky. Worked like a charm.
z4root is very simple method..thanks.
thanks to Germany...
I agree, this thread should be sticky. Finaly some sense in android devel section...
Thank you very much for your guide!
I followed all the instructions in your guide, everything seems fine until I try to push the busybox and su to my Galaxy Tab.
blacklevel said:
Now we push busybox and su via adb. Then we install Superuser.apk.
Code:
> adb push busybox /system/bin
> adb push su /system/bin
> adb install Superuser.apk
[/update]
Click to expand...
Click to collapse
I received an error: "failed to copy 'busybox' to '/system/bin/busybox' : No space left on device\"
the same error for the 'su' too
(No space left on device) is impossible, my tab is brand new sealed when i got it.
I have been trying the z4root and SuperOneClick procedure to root this tab but are all unsuccessful.
I am not sure if it is because of my tab needed a "NAND unlock" (I cannot find any guide about the NAND unlock) because I received this message when I tried to install busybox from the market.
Please help! My tab is carrier locked to Bell Canada, I really wanna to unlock it and root it~
Thanks!
gummo6869 said:
I received an error: "failed to copy 'busybox' to '/system/bin/busybox' : No space left on device\"
the same error for the 'su' too,
Click to expand...
Click to collapse
The `no space left on device` message indicates that the /system partition is still read-only. That means the mount command in step 3 was unsuccessful. Did you get any error message when you executed it?

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

How To Install Debian Squeeze on LG Optimus V

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

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.

[Q] Root gn gsm 4.0.4

Hey guys,
I flashed the 4.0.4 factory image today and was wondering how i can get root access without flashing a custom recovery since i want to stay stock atm.
I already tried the method i usually used (on 4.0.1 & 4.0.2)
Sorry can't post links... it's the normal method with fastboot and adb
and another method where you fastboot cwm recovery and then use adb commands but both didn't work for me
I can't post links so that's what i did there:
Temporarily boot into the Clockwork Mod Reovery using fastboot (on the computer)
fastboot boot cwmt-recovery-5.8.0.2.maguro.img (or whatever version you are using)
Mount /system using Clockwork Mod (on the phone):
mounts and storage -> mount /system
Chmod su using adb to turn on the setuid bit (on the computer)
adb shell chmod 6755 /system/bin/su
adb shell chown root:root /system/bin/su
adb shell ls -l /system/bin/su (permissions should now be -rwsr-xr-x)
Reboot. Super user should be working as expected (and your stock recovery is still intact)
Anyway,
I already spent much time to search on this forum and google so i was wondering if anyone knows any method which i could use.
You can root using this toolkit http://forum.xda-developers.com/showthread.php?t=1392310
Sent from my GNex {GSM} T-Mobile
Mojochief said:
Hey guys,
I flashed the 4.0.4 factory image today and was wondering how i can get root access without flashing a custom recovery since i want to stay stock atm.
I already tried the method i usually used (on 4.0.1 & 4.0.2)
Sorry can't post links... it's the normal method with fastboot and adb
and another method where you fastboot cwm recovery and then use adb commands but both didn't work for me
I can't post links so that's what i did there:
Temporarily boot into the Clockwork Mod Reovery using fastboot (on the computer)
fastboot boot cwmt-recovery-5.8.0.2.maguro.img (or whatever version you are using)
Mount /system using Clockwork Mod (on the phone):
mounts and storage -> mount /system
Chmod su using adb to turn on the setuid bit (on the computer)
adb shell chmod 6755 /system/bin/su
adb shell chown root:root /system/bin/su
adb shell ls -l /system/bin/su (permissions should now be -rwsr-xr-x)
Reboot. Super user should be working as expected (and your stock recovery is still intact)
Anyway,
I already spent much time to search on this forum and google so i was wondering if anyone knows any method which i could use.
Click to expand...
Click to collapse
Download this file to /sdcard, boot CWM like you posted, and then, once in CWM, flash the file you downloaded. Done.
EDIT: All that file does, is copy su and Superuser.apk to your device and set the appropriate permissions.
You can root using this toolkit http://forum.xda-developers.com/show....php?t=1392310
Sent from my GNex {GSM} T-Mobile
Click to expand...
Click to collapse
Thanks I'll try it, but I'm actually not a big fan of one click thingies where you don't know what you're doing.
Download this file to /sdcard, boot CWM like you posted, and then, once in CWM, flash the file you downloaded. Done.
Click to expand...
Click to collapse
Thank you I really prefer that over toolkits!
Mojochief said:
Thank you I really prefer that over toolkits!
Click to expand...
Click to collapse
This is what that file does:
Mounts the system parition
Copies Superuser.apk to /system/app
Copies su to /system/xbin
Sets permission on Superuser.apk to 0644
Sets permission on su to 06755
Sets a symlink for /system/xbin/su to /system/bin/su
Unmounts the system partition.
This is what that file does:
Mounts the system parition
Copies Superuser.apk to /system/app
Copies su to /system/xbin
Sets permission on Superuser.apk to 0644
Sets permission on su to 06755
Sets a symlink for /system/xbin/su to /system/bin/su
Unmounts the system partition.
Click to expand...
Click to collapse
Just tried it and it worked just fine
And thank you for the explanation!
So actually you could do it w/out booting cwm just with fastboot+adb right?
Mojochief said:
[snip]
So actually you could do it w/out booting cwm just with fastboot+adb right?
Click to expand...
Click to collapse
No. You need root access on boot to execute those commands. CWM boots android with root access by default, so this allows you to execute the commands. If you do not use CWM, you can use any other boot image that gives you root access on boot.
No. You need root access on boot to execute those commands. CWM boots android with root access by default, so this allows you to execute the commands. If you do not use CWM, you can use any other boot image that gives you root access on boot.
Click to expand...
Click to collapse
Yeah i meant with another boot image which gives you root access, like the one i used to root the earlier builds.
Mojochief said:
Yeah i meant with another boot image which gives you root access, like the one i used to root the earlier builds.
Click to expand...
Click to collapse
Yes, you can use another insecure boot image, but it needs to be a 4.0.4 compatible kernel. Older ones won't work.
Sent from my Galaxy Nexus using Tapatalk

Categories

Resources