Windows on Samsung Galaxy S2 - Galaxy S II General

Hello all.
I've been messing a fair amount with android recently and have been able to get Windows ME running on my Galaxy S2.
Now before you start getting excited, it is not perfect. It is frustratingly slow and buggy, although I have not had much trouble actually running the OS itself.
I would just like to point out that I am still a novice and there are most likely various easier/faster ways of doing this process, but this guide does require a moderate to large amount of experience of using Linux's Terminal.
This guide is written for Windows ME because it was more usuable than XP and was the only other version I had, but I was successful in XP booting up. Will try to add videos!
I know the image looks like a monitor, so I will take another picture when I get chance.
Note: I take no responsibility for any damage caused by my walkthrough as you are doing it at your own free will.
Now for the walkthrough. These are the steps I took in order to get this working:
Follow this guide to installing Backtrack 5 on your Galaxy S2 (Thanks to DooMLoRD & anantshri for the work they put into porting Backtrack from the X10 version)
You will need to re-size the Backtrack image by going into linux on your Desktop or Laptop, creating a new image and copying the Backtrack files over to the new image.
Navigate to the directory of bt.img (Backtrack image) in linux using the Terminal then use the commands below (anantshri provided them in another post):
Note: This requires 4GB of space (cannot create a larger image as the FAT file system only allows a maximum filesize of 4GB)
Note 2: I used a Backtrack 4 to do the below, so if you use Ubuntu or similar, you may need to add "sudo" to the start of each line just to make sure it works.
Code:
dd if=/dev/zero of=bt1.img bs=1M count=4000
losetup /dev/loop2 bt1.img
mkfs -t ext2 /dev/loop2
mkdir BT
mount -o loop bt.img BT
mkdir BT1
mount -o loop bt1.img BT1
cp -f -R BT/* BT1/
umount BT1
From there, you will need to copy that new image file over to your phone/sdcard, making sure you rename bt1.img to bt.img.
Now load up Backtrack on your phone and from within it, download Glib-2.0 (or 2.24.2 here) and extract the files.
Open Terminal and navigate to the new Glib then type the following commands:
Code:
./configure
make
make install
Now download Qemu 0.15.0 and extract it.
In Terminal, navigate to the Qemu directory and, like above, type the following commands (This can take a while and your phone can get quite warm so you could continue to the next step):
Code:
./configure
make
make install
Assuming there were no errors, Qemu should now be set up on your system (or you are waiting for it to finish installing). Either way, now would be a good time to create the Windows ME image for use with Qemu.
In a Linux OS of some sort on your Desktop or Laptop (I used Ubuntu), run the command "sudo apt-get install qemu". This will download and install Qemu onto your linux system.
With Qemu installed, run the following commands (ref. here) to create an image:
Code:
qemu-img create -f qcow2 winme.img 3G
if you have a cd image on your system:
qemu -m 256 -hda winme.img -cdrom winme.iso -boot d
or if you have the cd in the drive:
qemu -m 256 -hda winme.img -cdrom /dev/cdrom -boot d
The above commands will create the winme.img file to store Windows ME, and will then boot up that image so that you can install the OS. Go ahead with installing the OS and once finished, copy that to the same directory as the bt.img on your system.
Like earlier, we will be creating an image to store the files. Do the following commands in linux terminal and to copy the files over:
Note: You will need another 2GB of space free to create the below image (this goes for the phone you are copying it to as well)
Code:
dd if=/dev/zero of=btextras.img bs=1M count=2000
losetup /dev/loop3 btextras.img
mkfs -t ext2 /dev/loop3
mkdir BTExtras
mount -o loop btextras.img BTExtras
cp btextras.img BTExtras/
umount BTExtras
Now copy btextras.img over to the same directory as the bt.img on your phone.
You will now need to edit the startbt and stopbt scripts in that same folder.
Add the following lines to startbt:
Code:
Directly after line 15: "$bboxpath mknod /dev/block/loop253 b 7 253"
Directly after line 18: "$bboxpath losetup /dev/block/loop253 $kit/btextras.img"
Directly after line 21: "$bboxpath mkdir $mnt/extras"
Directly after line 22: "$bboxpath chmod a+rwx $mnt/extras -R"
Directly after line 23: "$bboxpath mount -t ext2 /dev/block/loop253 $mnt/extras"
And add the following lines to stopbt:
Code:
Directly after line 18: "$bboxpath umount -l $mnt/extras"
Directly after line 19: "$bboxpath rm -r $mnt/extras"
Directly after line 23: "$bboxpath losetup -d /dev/block/loop253"
With the above changes done, and with Qemu finally installed on Backtrack, it would now be worth restarting your phone after exiting Backtrack.
Once the phone has restarted, you can now reload Backtrack.
Within Backtrack, open Terminal and cd to /extras. Once here, run the following command:
Code:
/usr/local/bin/qemu -m 256 -hda winme.img -vnc :2
To explain the above command, the "-m 256" specifies the amount of memory to provide the emulator, "-hda winme.img" specifies the image to use as the hard drive, and "-vnc :2" specifies the port to use (2 + 5900 = actual port to use) for vnc which also allows for connecting to the vnc over the network.
The command will appear to "hang" the system, but if you open up a vnc client on your phone, you can connect to Windows ME with the address of 127.0.0.1 and port 5902.
Hopefully everything runs smoothly, but if you have any problems setting this up then let me know.
Known Problems
- When VNC'ing into Windows (or any other OS emulated with Qemu), the host and local mouse are out of sync.
- Emulation is very slow.
- Currently no network connection (Working on this)
- Also looking at running Qemu from within Android, removing the need for Backtrack.

hey nice share man thanx ..!!

Why choose WinME, the most orphaned of all Windows versions?
Impressive effort though.

I did XP but it was practically unusable. Im gonna look at slimming xp out to see if i can speed it up!
Sent from my GT-I9100

knightnz said:
Why choose WinME, the most orphaned of all Windows versions?
Impressive effort though.
Click to expand...
Click to collapse
because other windows versions require x86 compatible cpu.

Now try windows 8

xeq544 said:
because other windows versions require x86 compatible cpu.
Click to expand...
Click to collapse
And Windows ME doesn't?

Because Windows ME was the last OS to be based upon FAT32, its leaner. 2000, XP, 2003 and going up all were NTFS based.

You should try microxp or tinyxp. They're super slimmed. Microxp runs with 45mb of ram.

ThisWasATriumph said:
You should try microxp or tinyxp. They're super slimmed. Microxp runs with 45mb of ram.
Click to expand...
Click to collapse
Thanks, that has saved me some work! Will try these and let you know how it goes
Sent from my GT-I9100

What about windows 8? there is a free developer version available and it should (i think) support galaxy s2 processor.. and about the ram. it has been proved it can run on 128 RAM.

Windows Me? Try Windows You better.
Sent from my GT-I9100 using Tapatalk

Akez42 said:
Thanks, that has saved me some work! Will try these and let you know how it goes
Sent from my GT-I9100
Click to expand...
Click to collapse
Good luck dude!
You are already awesome

There's no arm windows release yet.
Also, that's quite ammazing, running windows on a x86 emu inside a charoot, bananas, but the fact that it works at all shows how powerful this phone is.
Nice work on this op
Sent from my GT-I9100 using xda premium

why ???

Cheers guys.
I tried MicroXP as ThisWasATriumph mentioned but it's still pretty slow. I'm going to focus on removing the need for Backtrack as this would hopefully speed it up!

Subscribed, this looks interesting!

or you could just boot a windows 3.1/95/98 img with adosbox.
I'm running win95 on my gs2 , it's fast, stable, albeit useless.

Cristitamas said:
What about windows 8? there is a free developer version available and it should (i think) support galaxy s2 processor.. and about the ram. it has been proved it can run on 128 RAM.
Click to expand...
Click to collapse
The developer version is for x86, they're also developing a ARM version but they haven't released it yet...

gangsterjoop said:
The developer version is for x86, they're also developing a ARM version but they haven't released it yet...
Click to expand...
Click to collapse
x86 or x64 but yes ARM wasn't released.

Related

Guide to install LXDE on samsung galaxy s

So 3 days of trying to install ubuntu on chroot and a little knowledge of linux and terminal, i was rather surprised to log into it and there i was, faced with an LXDE interface.
I want to thank coralic, burningbroccoli, lifehacker, josh_axeY and backfireNL for supplying the information i needed to make this possible.
So a brief overview of whats going to be done. First we will need to root our galaxy s in order to access terminal. An ubuntu image will be created and used in chroot environment by mounting (loading) it. Finally a vnc server will be setup and will be logged in using androidVNC.
So for the guide i suppose!
Guide:
First your going to need to root your phone. This is to access terminal and enter the commands required. This is taken from backfireNl's easy way to root your phone.
1. Download: 2.1 Update .zip
2. Put update.zip to root of /sdcard (not /sdcard/sd) (not on the physical SD card but the Internal SD card/Phone Memory)
3. Turn off phone
4. Hold down volume up + home button + power (tip: release the power button for half a second when you see the samsung logo)
5. Phone will reboot into recovery mode
6. Wait until you see the Recovery Screen and then release the buttons
7. With the volume down key go to the option: "apply: /sdcard/update.zip"
8. Press the home button
9. Phone will start updating
10. Phone reboots... and there you go! your phone is rooted!
So that wasnt too hard was it? Although once you have done this, you will need to download a couple of programs from the market. Goto market and download the following programs:
-Busybox
-Terminal Emulator
-androidVNC
Ensure all of these are installed as this is what you shall need in order to successfully run LXDE on your phone.
Next is the image for the install! i will post up an image file for download although for the sake of people wanting the whole info on how-to here it is.
1) login on your ubuntu machine and fire up terminal.
2) login as the super user by entering "sudo su"
3) you will be required to enter your su password, enter this and you will be logged in as root
4) In terminal enter "apt-get install rootstock"
5) One this package is all installed, enter the following code into the computer terminal:
sudo rootstock -f localhost --login ubuntu --password ubuntu --imagesize 1G --notarball --dist lucid --seed ssh,tightvncserver,lxde,expect
6)The image will be stored in the home folder. The image will need to be a .img file or it wont work. So extract the file if necessesary and rename the file so it reads "ubuntu.img"
7)Now you will need to put the ubuntu.img on the phone. The directory which it needs to be installed into is "/sdcard/ubuntu/"
8) All done for this step!
Ok so you have everything setup and ready to do the fun part! so lets get everything mounted and configured!
1)Open up terminal emulator on your phone
2)enter "su". this logs you in as superuser
3)I found you will need to make the following directories in order to work, so in terminal emulator enter:
mkdir /data/local/mnt
mkdir /data/local/mnt/proc
mkdir /data/local/mnt/dev
mkdir /data/local/mnt/dev/pts
4)enter "cd sdcard" then "cd ubuntu"
5)You will then be in the folder with the image. Type into terminal:
export HOME=/root
export USER=root
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
busybox mount -t ext3 ubuntu.img /data/local/mnt
busybox mount -t proc proc /data/local/mnt/proc
busybox mount -t devpts devpts /data/local/mnt/dev/pts
busybox chroot /data/local/mnt /bin/bash
/etc/init.d/ssh start
6) Although it doesnt seem it, your now into your distro!
Okay so your into your distro but it looks all horrid and "text based". wouldnt it be lovely to see a proper desktop? so lets go!
1) enter into terminal "apt-get install x11vnc" this installs x11vnc to your phone. This may take a while depending on how your connected to the net
2) once x11vnc is installed, type "x11vnc -storepasswd" and enter a password. It will ask to verify the password so enter it again, then enter "y" to setup a password for it
3) first enter "vncserver" to initiate the server on your distro. For some reason without this, androidVNC will start to connect then crash
4)finally enter "x11vnc -usepw -find"
now your x11vnc is setup using a password hooray! last step in this guide and you will be away in no time! So is everyone ready?
1)hit the button on the bottom to return to the desktop but keep terminal emulator running
2)goto androidVNC and enter the following:
Nickname: root
Password: (whatever password you setup in x11vnc)
address: localhost
Port: 5900
color format can be anything, i set it to 4 bpp and use local mouse pointer
3)Simply click "connect" and viola! welcome to your impressive lxde environment!
This has been done before although i tried to do every step, base it around the phone as much as possible so no connecting to the computer.
any questions or problems i will try my best to help you guys, and thanks for the guys who helped me on this voyage.
i will write a bash script soon to try and incorporate as much of the manual typing in as possible
good luck!
Things which need to be done:
Upload image: Completed! - http://www.megaupload.com/?d=H55O5UEM
Bash script for terminal emulator: Completed, needs to be uploaded
Bash script for setup process of terminal emulator: Not completed
Startup script for image: Not completed
Youtube video: Not completed
Include internet browser and x11vnc in image file: Not completed
If anyone has any recommendations on how to make the process easier please let me know and i will try my best
Good to see the info consolidated into one post!
Cheers for the shoutout.
no probs your information helped me soo much, i just thought it would be good for someone to goto a post and go "oh yeah thats how to do it" instead of going to loadsa websites
i will try it very soon, thank you.
awesome!
When will you post your img file? I'll have a try.
I have no ubuntu installed, I'm using ArchLinux.
okay ive written a bash script to automate most of the process although there are a few things i could tweak before im fully happy
i have also posted a youtube video to demonstrate how easy it is! the first post will be updated with the link.
people ask me the reason for doing this and i have 2 replies:
1)to show the true potential of this phone (and working in a phone shop it really works)
2)for development purposes. Things like this are the next step in unlocking the true potential of the phone
lijgame: Im just uploading it now for you
Good work, will give it a try. And what about any browser ? Like firefox ?
hi.
okay so this is installing ubuntu into a chrooted environment and vnc'ing to it.
does anyone know if it is possible to blow away android and install pure debian on it? does anyone know of a hardware list on the sbc in this thing and what sort of support one might need to hack in to get a such a thing to work?
I will apologise now for the delay in image upload, the image file is 1gb and im having trouble finding a place to upload it.
In terms of installing a clean debian would need more than just a straightforward port. You would be looking at making an environment which supports the arm architecture, porting all of the drivers over, creating an option to support telephony, messages and gps too. If you wanted a debian environment it would probably be best to either run it like how the n900 does or getting a distro of it which is specifically made towards mobiles and modifying it.
Although you have an extremely good point there! Tell you what, once ive got everything running on here i will have a look and see what i can do in terms of atleast getting a debian shell running or a limo version
.kiz said:
I will apologise now for the delay in image upload, the image file is 1gb and im having trouble finding a place to upload it.
Click to expand...
Click to collapse
Just create zip/tar-ball of img file and it will become around 300MB. Then you can upload it on multiupload (or megaupload/rapidshare/mediafire).
I just created that image too and will be testing on my Galaxy S soon, so if its working for me then I will upload my image too.
Thanks for your good work
haha i shouldve really thought about compressing the file really
this will be a pre-image im just working on getting a better image with optimization, x11vnc and firefox
okay guys the first post is edited with the image for the install.
http://www.megaupload.com/?d=H55O5UEM
I am currently in the process of playing about with images to include everything you need, so soon enough i will have an image with everything you need to get started
Tnx for the credit!
Ubuntu image is uploaded and ready to go, im currently working on a better image so when ive finished that, it shall be released.
Also i have recently installed an internet browser and it is functioning properly. I will post screenshots soon
.kiz said:
okay guys the first post is edited with the image for the install.
http://www.megaupload.com/?d=H55O5UEM
I am currently in the process of playing about with images to include everything you need, so soon enough i will have an image with everything you need to get started
Click to expand...
Click to collapse
The image is only 11MB and is corrupted
Moreover, I tried to mount my ubuntu.img to /data/local/mnt but it is giving error (sort of -> loop back device can't be mounted: No such file or directory) although I created and checked /data/local/mnt directory which exists
Try creating a second loop device with: mknod /dev/loop2 b 7 0
fslateef said:
The image is only 11MB and is corrupted
Moreover, I tried to mount my ubuntu.img to /data/local/mnt but it is giving error (sort of -> loop back device can't be mounted: No such file or directory) although I created and checked /data/local/mnt directory which exists
Click to expand...
Click to collapse
im guessing because the image is corrupt, your unable to mount it.
I have just uploaded my bash script making it easier to mount each time.
bash script: http://www.megaupload.com/?d=CEU6R5J4
Image file: http://www.megaupload.com/?d=H55O5UEM
ensure you have made the directories explained in my first post.
pop the hsetup.sh file inside /sdcard/ubuntu (along with your image)
then fire up terminal emulator and type:
su
cd sdcard
cd ubuntu
sh hsetup.sh
This mounts everything for you and logs you into LXDE, all you need to do after is type in:
/etc/init.d/ssh start
vncserver
x11vnc -find
Then log in using androidVNC
i will attempt to upload the file to another location and i will test the image file to ensure its not a compression error
i apologise, ive just looked at the zip file and it is corrupt.
just compressing a new one and i will upload it
.kiz said:
im guessing because the image is corrupt, your unable to mount it.
Click to expand...
Click to collapse
Nops, I am using my own created ubuntu.img file according to your command which is 1GB in size .....
fslateef said:
Nops, I am using my own created ubuntu.img file according to your command which is 1GB in size .....
Click to expand...
Click to collapse
I found the problem. As mentioned by ArminC, I found that there isn't any loop device node in my mobile hence I created one and its mounted
Great ... Now going ahead .....

Chroot can't find /system/bin/sh

I copied over the debian image i made for my sgs i9000 to try and run on my galaxy tab since i think the much larger screen, double RAM and faster cpu would make the image run smoother. I hoped the p7510 might be able to replace my laptop for word processing by running openoffice in chroot. I remembed to set the path, user and home variables. After mounting the image i go to chroot but i get the error
"chroot: can't execute /system/bin/sh"
I tried installing 10 other versions of busybox from the market. I am currently using the latest bindroid rom and pershoot kernel. The image worked on my sgs when it ran stock roms and now cm7.1. Is it the bindroid rom? I also tried to use apk manage 4.9 to decompile the rom's framework-res to enable crt off but it always errors out recompiling.
I realize that /system/bin/sh is where android has sh but i thought busybox would be smart enough to know that normal linux like my laptop has it in /bin/sh. My sgs seemed to know its directory of sh was not normal.
i'm having the same problem as well setting up debian to my galaxy tab, same model as you. when i mounted debian, it doesn't have /system/bin/sh, it's just /bin/sh. maybe you should try to specify /bin/sh at the end of the command, if you don't, it will default to /system/bin/sh. maybe you'll have more luck than me. i mounted debian in /data/local/debian and typed chroot /data/local/debian /bin/sh but it says "/bin/sh: precmd: not found". if you or anybody else figures out how to get past that, that would be awesome! thanks!
EDIT: look at the directory structure and see if it's /bin/sh instead of /system/bin/sh and if it is, specify /bin/sh at the end of the chroot command then hit enter and you might get an error, if you do, type: unset PS1 PROMPT_COMMAND .. that worked for me and then you'll get a command prompt and you'll be in linux now and not android. i hope i helped

Linux chroot mount scripts

The actual creation of an arm linux chroot image is probably out here on teh internetz somewhere, but I can assist with my mounting shell script (which works).
My image is of a debian arm chroot, and the image filesystem is ext2 (a good idea for fewer writes. ie innately non-journaling), has been used extensively on fw DE .17 and I'm currently trying it out on WW .29 (thank you, miloj).
I would upload my debian img somewhere, but I've actually broken it somewhat (it works for my needs, but it's nonetheless a bit too hacked up to be reliable).
I've modified it somewhat for generalization, some of it is probably wrong and/or redundant, and it IS hackish and ugly, but it works for me (tm).
* the chroot image only need a root account (and probably bash installed, but it usually is)
* You need busybox installed.
* You need to upload your chroot image named linux.img to the internal sdcard in a folder named linux
A shell script to set things up is attached.
What you need to do:
push the install script and run it:
Code:
adb push installlinuxstuff.sh /data/local/
adb shell sh /data/local/installlinuxstuff.sh
Now you can (from adb shell or terminal emulator on device):
Code:
su -
/data/local/mnt/linux.sh
/data/local/mnt/notlinux.sh
Feel free to remove the install script at
/data/local/installlinuxstuff.sh
when you've got it up and running.
Alternative way to run the scripts from adb shell:
Code:
adb shell su -c /data/local/mnt/linux.sh
adb shell su -c /data/local/mnt/notlinux.sh
I usually symlink start and stop (in my case deb and undeb) shell scripts placed in /data/local/mnt in /system/bin (ie shell scripts with 'su -c /data/local/mnt/whatever.sh' in them) for easy start an stop from terminal emulator, and if you've gotten this far you may welcome the small advice. (in other words - don't do this unless you _really_ know what you're doing)
Debian ARMHF or ARMEL?
If you would uploaded it (good place is google drive , sharing as public, as there are no ads or bull**** and the download is extremely fast) I would love to try your image - after modifying your script so it can work on a UHS-1 class MicroSD I want to try running this off of (should give it a little more speed).
zamaditix said:
Debian ARMHF or ARMEL?
If you would uploaded it (good place is google drive , sharing as public, as there are no ads or bull**** and the download is extremely fast) I would love to try your image - after modifying your script so it can work on a UHS-1 class MicroSD I want to try running this off of (should give it a little more speed).
Click to expand...
Click to collapse
Armel (I use the same chroot installation on my phone in a smaller image file (with less stuff installed)). I've got loads of personal stuff all over it and besides - it's somewhat broken. I really don't want to try to fix it.
So I'm working on retracing my steps, creating a clean armhf ext2 image (debian wheezy base installation for now) and redo the mount script, but I can't make any promises on a release date.
Anyhu - there are loads of images (armel, at least) on teh internetz (BT5 and too many ubuntu, for instance).
Just check so our kernel can mount the filesystem.
Edit: if not you can just create a new image file with a filsystem that's mountable and copy the chroot files to it.
So the ideal image for this tablet is armhf? If I wanted to create a Gentoo image, I would go with armv7? I'm just not sure exactly which ARM architecture this tablet is.
EndlessDissent said:
So the ideal image for this tablet is armhf? If I wanted to create a Gentoo image, I would go with armv7? I'm just not sure exactly which ARM architecture this tablet is.
Click to expand...
Click to collapse
The CPU is the Tegra 3 if you want to google it and it is an ARMv7 w/ NEON extensions chip. ARMv7 specification requires hardware fp so naturally it is ARMhf.
Nice to hear, keep us updated on your progress. I'm currently running an armel copy of Ubuntu 12.04 but it has problems with some packages and others are armhf only.
When I run linux.sh, I get an error that /sdcard can't be mounted because it doesn't exist.
Code:
mount: mounting /sdcard on /data/local/mnt/linux/sdcard failed: No such file or directory
I also tried changing the script to mount /mnt/sdcard, but that didn't work either.
EndlessDissent said:
When I run linux.sh, I get an error that /sdcard can't be mounted because it doesn't exist.
Code:
mount: mounting /sdcard on /data/local/mnt/linux/sdcard failed: No such file or directory
I also tried changing the script to mount /mnt/sdcard, but that didn't work either.
Click to expand...
Click to collapse
Yes, it is somewhat hackish, like I wrote. My image has got an sdcard folder (/sdcard) inside of it where I mount /sdcard from android. (Ie chroot and mkdir /sdcard)
followed this:
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-rooted-transformer-prime/
make sure you have busybox installed der. Or at least the cp command in /system/bin
works well on my TF300T, Yea its not native but im currently configuring it for kernel building ;-D
FlyingPoo said:
followed this:
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-rooted-transformer-prime/
make sure you have busybox installed der. Or at least the cp command in /system/bin
works well on my TF300T, Yea its not native but im currently configuring it for kernel building ;-D
Click to expand...
Click to collapse
Why does the mount script remount a non-existing block device with an ancient (according to android) filesystem?
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Edit: I read all the scripts, and they all mount that crap. It's not made for transformers, and on the android device it's made for it leaves /system mounted rw after you've run it, and WHEN run (installed) it modifies too much in /system/bin
Code:
# At first it copies loads of crap to /system/bin, and then:
cd /system/bin/
chmod 4777 *
It's not even "hackish" - it's just... wrong...
Will loop1 work every mount?
Code:
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1
I'm almost only asking, since this thread was supposed to be about scripts?
gasingvar said:
Yes, it is somewhat hackish, like I wrote. My image has got an sdcard folder (/sdcard) inside of it where I mount /sdcard from android. (Ie chroot and mkdir /sdcard)
Click to expand...
Click to collapse
Thanks. I created /sdcard, and it works almost perfectly now. However, mounting devpts at /dev/pts doesn't seem to work. I replaced that line with
Code:
mount --bind /dev $mnt/dev
and it seems to work fine. Is there anything wrong with my method?
/dev/void said:
Why does the mount script remount a non-existing block device with an ancient (according to android) filesystem?
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Edit: I read all the scripts, and they all mount that crap. It's not made for transformers, and on the android device it's made for it leaves /system mounted rw after you've run it, and WHEN run (installed) it modifies too much in /system/bin
Code:
# At first it copies loads of crap to /system/bin, and then:
cd /system/bin/
chmod 4777 *
It's not even "hackish" - it's just... wrong...
Will loop1 work every mount?
Code:
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1
I'm almost only asking, since this thread was supposed to be about scripts?
Click to expand...
Click to collapse
I'm assuming you're talking about the link in the post you quoted, even though you seem to be referencing the OP's use of the word "hackish". The script in the OP doesn't do any of that stuff. It just creates a few directories in /data/local/mnt/ and writes the mount/unmount scripts, which themselves only un/mount appropriate directories for the tablet. As for your question, I'm not nearly experienced enough to answer it. Sorry.
EndlessDissent said:
Thanks. I created /sdcard, and it works almost perfectly now. However, mounting devpts at /dev/pts doesn't seem to work. I replaced that line with
Code:
mount --bind /dev $mnt/dev
and it seems to work fine. Is there anything wrong with my method?
Click to expand...
Click to collapse
AFAIK your mount seems to be more complete, ie more android hardware goodies accessable from the chroot environment. However - that means more things possibly going wrong (like writing to a device who's critical to the android environment).
Personally I'd try to find what "hardware goodies" and whatnot I'd need to get the chroot environment working optimally, and not mount ALL of /dev.
EndlessDissent said:
I'm assuming you're talking about the link in the post you quoted, even though you seem to be referencing the OP's use of the word "hackish". The script in the OP doesn't do any of that stuff. It just creates a few directories in /data/local/mnt/ and writes the mount/unmount scripts, which themselves only un/mount appropriate directories for the tablet. As for your question, I'm not nearly experienced enough to answer it. Sorry.
Click to expand...
Click to collapse
Yes, and the OP is very honest about his script(s) being "hackish", which I interpret to mean 'not optimal, possibly redundant but working', all of which it is (and I applaud the early release, since for instance I could get things rolling), but the ubuntu image installation and mounting scripts from the other poster ( whom I was addressing ) are plain faulty.
I am looking for a armhf build of ubuntu or debian that I can chroot (newer the better), if anyone knows of such a build that would be fantastic but if not does anyone know of an easy to follow guide to compile such a thing?
I found two pretty good guides. I mostly followed THIS ONE, but I found that it doesn't mount enough before "first boot", so what I did was follow the guide until the point where you move the image to the tablet. Then I ran the OP's installlinux.sh script, and then the mount script. However, the mount/unmount scripts need to be edited before using them. Comment out the sdcard line and probably the devpts line (mounting devpts didn't work; Bash complained that devpts didn't exist; I had to replace it with the line I mentioned a few posts above, but as /dev/void says, it could be problematic, so be careful). Mount the image, make the /sdcard directory, exit, unmount, and edit the scripts again to mount/unmount /sdcard.
Next time you enter the chroot, feel free to run the
Code:
sh /debootstrap/debootstrap --second-stage
command to build the image, and follow the linked guide until the next time it tells you to exit the session (NOTE: The second echo "whatever" > sources.list command is wrong; it should be echo "whatever" >> sources.list; Also, remember to replace "squeeze" with the appropriate Debian version, in my case, "testing"). Instead of exiting right after the apt-get update, I'd recommend playing around with the chroot and configuring whatever apps you install. You can just use the OP's scripts now and ignore the script in the linked guide.
When the guide I linked above gets to this line:
Code:
sudo debootstrap --verbose --arch armel --foreign squeeze /mnt/squeeze/ http://ftp.debian.org/debian
just replace armel with armhf, and if you want a testing image, replace squeeze with testing.
Sorry I'm not attaching my image. I made it gigantic (5GB), so I don't really have anywhere to store it, and you probably wouldn't want to download a file that big. Plus, it already has Openbox and a bunch of other things you probably don't want installed. I'm assuming you'd want GNOME or KDE instead.

[HOW-TO] Lenovo IdeaTab A1000 Rooting

HOW TO ROOT YOUR LENOVO IDEATAB A1000​
<DISCLAIMER>​
By attempting these steps, your warranty will be void. Even worse than that, it might cause crashes, freezes, random explosions, 2nd degree burns, or even turn your beloved tab into $100+ paperweight. What works on mine might not work on yours, so don't attempt if you don't know what you're doing. Do at your own risk. Corrections are welcome. I must admit that I'm not an expert, so any info I posted might be wrong, and I can't offer you much help. I'm not responsible for anything arising from the use of this how-to. I can only wish you good luck.
<WHY ROOT?>​
- Without root or OTA upgrades (at time of writing, Indonesian customers still can't get it), you'll be stuck with ~500MB internal memory. That's annoying.
- You're stuck with the default IO scheduler (cfq) and governor (hybrid, haven't heard that one..)
- You have an incredibly large amount of bloatware you can't get rid of, in that already cramped up internal storage
- Did I mention freedom?
<REQUIREMENTS>​
This method is originally used to root Acer Iconia B1-A71. Somehow I noticed that the two actually has the same chipset, MTK8317 (if it really was relevant ). So I tried the method, and through sheer n00b's luck, it worked like a charm!
Lenovo IdeaPad A1000-G --> 4GB storage, 2G/EDGE. This method haven't been tested on A1000-T/F, different storage cap (16GB, etc.) or other variants, but it should work with slight modification. Screenshots of my specs are attached below. Remember, proceed at your own risk!
A Linux System. Never tried on Windows or Mac. I personally used Linux Mint 15. The source post uses Ubuntu.
working ADB (android-tools-adb). You can get this from synaptics, apt-get, etc. If your system can detect adb devices, you should be fine.
Superuser Binary
Busybox Binary (You can get these two from the links on original post. XDA says noobs can't post links :'( )
ORIGINAL THREAD
<CREDITS>​
XDA Senior Member entonjackson, for writing such a noob-friendly how-to for rooting Acer Iconia B1-A71 and for allowing me to use it for this how-to.
XDA Member alba81, for discovering the method as acknowledged on the original post by entonjackson
All awesome gurus on XDA which I can't mention one by one.
<THE STEPS>​
1. Extract the android sdk to your home folder, e.g. a user named Bob will use like /home/bob
2. Open a terminal
3. Now plug your A1000 into your machine and turn on Debugging Mode (Go into Settings -> Developer Tools, turn on Developer tools, then turn on USB Debugging Mode)
4. Now back at the keyboard of your Linux machine in your terminal type:
Code:
sudo adb devices
The output should be something like:
Code:
123456789ABCDEF device
If it's not, google for it. Somehow your Linux hasn't detected the A1000, although the android sdk for Linux brings all needed drivers with it.
If your device was found, congratulations. The adb connection between your linux machine and your tablet is intact.
5. Now extract the downloaded busybox archive to your home folder, in it there should be a busybox binary. So Bob does:
Code:
sudo ./adb push /home/bob/busybox /data/local/tmp
Code:
sudo ./adb shell
Code:
chmod 755 /data/local/tmp/busybox
6. You should copy the busybox binary into a directory where you can access it as a plain non-root user on the tablet. We need this binary. so we can apply unix tools like telnet, dd, cat, etc. But for now we need it to establish a telnet session between our tablet and our linux machine.
(This point is written on original post. Seems important, but as soon as I finished step 5, I can use those tools)
7. Dial *#*#3646633#*#* to enter Engineer Mode
8. Go to Connectivity -> CDS Information -> Network Utility
9. type the following command:
Code:
/data/local/tmp/busybox telnetd -l /system/bin/sh -p 1234
Advice from original poster: copy and paste it from the browser on your tablet, because dependent on which keyboard app installed, this can be freakin tricky. In the next step you will learn, why it's so important why this command should be correct.
10. Tap on Run. You won't get any feedback, so you will never know if the entered command runs properly or not. That's why you should make sure the command is ok.
Now we have started our telnet server on the tablet.
11. Back in the terminal type:
Code:
/data/local/tmp/busybox telnet 127.0.0.1 1234
If you now get an error like couldn't find busybox or something, then either adb push failed or you forgot to chmod, in step 5
12. Now enter:
Code:
cat /proc/dumchar_info
You should get a bunch of lines, try to find a line containing the partition named android
{..... partition list .....}
android 0x0000000028A00000 0x00000000020E8000 2 /dev/block/mmcblk0p3
{..... partition list .....}
13. We will create a dump of our android system. This is the point where different variants *MIGHT* have different parameters. This step is important, as wrong parameter will result in unmountable image.
Stop. Take a deep breath. If you're not familiar with dd, find a good doc of it. There's a plethora of them.
Get yourself a programmer's calculator (Linux Mint 15 has one built in).
Here's what you'll do :
Convert the hex number on the 3rd column into decimal. In my case (0x20E8000) will yield 34504704. Divide by 4096. The result (8424) goes to the skip parameter.
Convert the hex number on the 2nd column. In my case (0x28A00000) will yield 681574400. Divide by 4096. The result (166400) goes to the count parameter.
So the full dd command will look like :
Code:
dd if=/dev/block/mmcblk0 bs=4096 skip=8424 count=166400 | gzip > /cache/system.img.gz
Do a full sanity check before hitting enter! It will take about 5 minutes.
14. After it's finished we must make the image readable for adb, so we do:
Code:
chmod 777 /cache
and
Code:
chmod 777 /cache/system.img.gz
15. Leave the telnet, and then adb shell session by:
Code:
exit
Code:
exit
16. Now we pull our image by
Code:
sudo adb pull /cache/system.img.gz
wait 1-2 minutes.
It should be then located inside /home/bob. It did for me. If not, do a search . It should be a .gz, extract it right there (or /home/bob if it isn't there)
17. Now we need to modify our system image by adding the tiny but helpful su binary. Extract the SU binary to /home/bob.
18. We create a folder where we will mount our system image to. To create it do:
Code:
sudo mkdir /media/a1000
19. Now we mount it:
Code:
sudo mount -o loop /home/bob/system.img /media/a1000
if it fails, then you entered wrong parameters on step 13
20. Now we copy our SU binary to our mounted system image:
Code:
sudo cp /home/bob/su /media/a1000/bin
21. the su binary needs to have the proper rights to make it usable, so we 'suid' it with:
Code:
sudo chmod 06755 /media/a1000/bin/su
22. Let's unmount our baby by:
Code:
sudo umount /media/a1000
and because bob doesn't like a messed up system, he does:
Code:
sudo rm -rf /media/a1000
because he hopefully won't need it anymore.
23. We have to gzip it again to bring it back to where it belongs to. this we do by:
Code:
cd /home/bob
Code:
gzip /home/bob/system.img
24. So here we are now, we made it to the final Boss fight! The next steps are dangerous and should be performed with caution. We copy back our modified system image, which can brick your device, if you do a mistake! Enter adb shell again :
Code:
sudo adb shell
25. Remove the old boring image:
Code:
rm /cache/system.img.gz
26. Leave adb shell
Code:
exit
27. copy our cool new system image containing the su binary:
Code:
sudo adb push /home/bob/system.img.gz /cache
28. Enter adb shell again
Code:
sudo adb shell
29. Usually the telnet server on the tablet is still running, at least in my case it's been like that. That's why we can directly connect to the telnet server with:
Code:
/data/local/tmp/busybox telnet 127.0.0.1 1234
If this doesn't work, then obviously your telnet server isn't running anymore. So on your tablet if the telnet command is still entered (see step 9), tap on Run again and repeat step 29.
30. Now this is the most dangerous step in this how to (no it wasn't the mkdir one). You can copy following command to make sure everything is fine and paste it into your telnet session on your linux terminal.
<WARNING! SANITY CHECK! MAKE SURE *ALL* THE DD PARAMETERS MATCH THE FIRST DD (STEP 13) OR YOUR A1000 WILL TURN INTO A VERY EXPENSIVE PAPERWEIGHT!>
Code:
[B]/data/local/tmp/busybox zcat /cache/system.img.gz | dd of=/dev/block/mmcblk0 bs=4096 seek=8424 count=166400[/B]
After 1-2 minutes you're done, if your tablet or pc or yourself didn't catch fire, everything's fine.
31. Leave telnet / adb shell by doing
Code:
exit
Code:
exit
32. Reboot your A1000 via ADB, then exit
Code:
sudo adb reboot
Code:
exit
33. Unplug your tablet from PC
34. Install Superuser (No, not SuperSU, cause it won't work!). I personally use Superuser by ChainsDD, from Play Store
35. Be lucky. Your tablet and thus you are now free!
Don't forget to hit thanks, if this helps ​
hi, after step 13 (i double checked the command), i get this error
Code:
/system/bin/sh: can't create /cache/system.img.gz: Permission denied
/dev/block/mmcblk0: cannot open for read: Permission denied
I have the WiFi 4G version
Im too stuck in step 13.....nothing wrong with the script, can u give me a solution?
Im using A1000G also
@ts
Your guide work perfectl, in windows enviroment but mount step still need linux,
I've question are you using DirectoryBinding? Mine always close when playing Real Racing, its very annoying
You have suggeztion or alternative for DirectoryBinding?
Root with Windows ?
Hi,
I am a new member because i bought this tblet but i can't root. I don't have a linux environment, so there is a solution with W8 Pro 64 ?
Thanks a lot for you help,
ulisez said:
hi, after step 13 (i double checked the command), i get this error
Code:
/system/bin/sh: can't create /cache/system.img.gz: Permission denied
/dev/block/mmcblk0: cannot open for read: Permission denied
I have the WiFi 4G version
Click to expand...
Click to collapse
have you chmod-ed the busybox (or is the chmod successful without error)? Try chmod-ing the /cache before attempting step 13. It seems that you still don't have access to the NAND device (mmcblk0). Have you updated firmware via OTA?
artonelico said:
Im too stuck in step 13.....nothing wrong with the script, can u give me a solution?
Im using A1000G also
Click to expand...
Click to collapse
Do you encounter the same error message like ulisez had? Could you post the screenshot of the partition list (the lines after you execute dumchar_info)?
rmage said:
@ts
Your guide work perfectl, in windows enviroment but mount step still need linux,
I've question are you using DirectoryBinding? Mine always close when playing Real Racing, its very annoying
You have suggeztion or alternative for DirectoryBinding?
Click to expand...
Click to collapse
I personally use Link2SD by Bulent Akpinar to link apps to 2nd partition on my SDcard.
Letsar said:
Hi,
I am a new member because i bought this tblet but i can't root. I don't have a linux environment, so there is a solution with W8 Pro 64 ?
Thanks a lot for you help,
Click to expand...
Click to collapse
The original developer who posted the method (entonjackson) plans to integrate the method in the next release his toolkit, the Acer Iconia Toolkit. I think you should check his thread : http://forum.xda-developers.com/showthread.php?t=2240029
sammymaddog said:
have you chmod-ed the busybox (or is the chmod successful without error)? Try chmod-ing the /cache before attempting step 13. It seems that you still don't have access to the NAND device (mmcblk0). Have you updated firmware via OTA?
Do you encounter the same error message like ulisez had? Could you post the screenshot of the partition list (the lines after you execute dumchar_info)?
I personally use Link2SD by Bulent Akpinar to link apps to 2nd partition on my SDcard.
The original developer who posted the method (entonjackson) plans to integrate the method in the next release his toolkit, the Acer Iconia Toolkit. I think you should check his thread : http://forum.xda-developers.com/showthread.php?t=2240029
Click to expand...
Click to collapse
Link2SD doesn't link app data, do you have any option?
yes i had same message with ulyses, by the way im from indonesia too can i contact you through chat client?
oh yeah im using windows 7 and using cmd as a terminal in linux
thx before bro
sammymaddog said:
The original developer who posted the method (entonjackson) plans to integrate the method in the next release his toolkit, the Acer Iconia Toolkit. I think you should check his thread : http://forum.xda-developers.com/showthread.php?t=2240029
Click to expand...
Click to collapse
Ok, i see his toolkit. It's very good. I'll wait
rmage said:
Link2SD doesn't link app data, do you have any option?
Click to expand...
Click to collapse
I'm not sure whether the stock kernel of our devices supports init.d, thus supports CronMod/Data2SD. Lenovo locked our bootloader, and currently there's no way around it. So I personally think, Link2SD method are the best option for now.
Let's give it several months until our dev gurus bring their miracles upon this device
The attached image shows mt6577 Hardware, can u provide the Soc details please
Hi, Can any one upload Lenovo ideatab A1000 system.img
in step 20, it appears you are writing to a /bin directory on the android system. However such a directory is not visible either through shell or the system telnet account.
Do I need to understand something else about android to make sense of this.
regards
vidya
one month gone past but the op seems to be in caves or has bricked the device
STOCK ROM
CAN ANY BODY PROVIDE ME A STOCK ROM OF THIS DEVISE
I HV ROOTED SUCCESSFULLY BY A VERY EASY METHOD
BUT SCREWED UP WHILE UPDATING IT SO PLZ PLZ HELP ME OUT
THE DEVICE BOOTS BUT ALL THE APP CRASHES :crying::crying:
VR.gtmini said:
The attached image shows mt6577 Hardware, can u provide the Soc details please
Click to expand...
Click to collapse
VR.gtmini said:
one month gone past but the op seems to be in caves or has bricked the device
Click to expand...
Click to collapse
sorry to make you wait. I'm a last grader university student, and final project stuffs have got me pinned down. Hope you understand
Actually the SoC is MT8317. For some god-knows reason Mediatek have made this SoC with signatures similar to MT6577. But somehow CPU tweaker correctly detects the SoC (MT8317). Maybe it's the CPU-Z bug?
unknown_world said:
Hi, Can any one upload Lenovo ideatab A1000 system.img
Click to expand...
Click to collapse
zod0070 said:
CAN ANY BODY PROVIDE ME A STOCK ROM OF THIS DEVISE
I HV ROOTED SUCCESSFULLY BY A VERY EASY METHOD
BUT SCREWED UP WHILE UPDATING IT SO PLZ PLZ HELP ME OUT
THE DEVICE BOOTS BUT ALL THE APP CRASHES :crying::crying:
Click to expand...
Click to collapse
I'm uploading the modified .img. Let's pray my old HSPA modem won't catch fire by the morning.
vidyadhara said:
in step 20, it appears you are writing to a /bin directory on the android system. However such a directory is not visible either through shell or the system telnet account.
Do I need to understand something else about android to make sense of this.
regards
vidya
Click to expand...
Click to collapse
I think you got it wrong. The write process does not take place on the device. It's on the loop-mounted .img in /mnt/a1000 on your computer (step 18-19). Cheers!
Here's the ALREADY BUSYBOX-ED .img for Ideapad A1000-G 4GB EDGE version. Hope it helps :
www dropbox com/s/rmpnz7c285t5sqz/system.7z
sammymaddog said:
Here's the ALREADY BUSYBOX-ED .img for Ideapad A1000-G 4GB EDGE version. Hope it helps :
www.dropbox.com/s/rmpnz7c285t5sqz/system.7z
Click to expand...
Click to collapse
Thanks for coming back, could u post the MD5 of the system.7z & system.zip.
Also could u provide simple way/steps to directly flash this .img without extracting existing stock system image
My tab A1000-G
do you have stockROM for lenovo A1000G
I need this :crying:
raffly said:
do you have stockROM for lenovo A1000G
I need this :crying:
Click to expand...
Click to collapse
Don't worry, the above link is a stock Lenovo A1000 G ROM, but with pre-root files having no superuser app. Just extract the .7z file
System.7z MD5: 658CA71AC8A230B244F267513857F9A5

Make ROOT Permanet / System Read and Write to all Android ROMS for Tenderloin

Extracting ramdisk image to change fstab.tenderloin to make system read and write allowing permanent root access using any ROM ever created for the HP Touchpad.
I am using Ubuntu 18.04.1 LTS 64-bit (All the software is open source and free, you can get the packages necessary for your distro)
Create a folder in /home (root) name it hpboot ( on the PC ) all work is done on the PC.
Open the custom ROM zip file and extract boot.img to the created directory hpboot
Open Terminal in the hpboot directory, all the commands needs to be enter there.
Text beginning with –>># are for information only. Do not paste into the Linux terminal window.
–>># The following will extract images from boot.img file located in the hpboot direcory.
–>># Copy and paste each individual line in the Terminal window one by one and wait until each command finish processing.
dumpimage -i boot.img kernel.uImage
dumpimage -i boot.img -p 1 ram
dd if=ram of=ramdisk.img.gz bs=64 skip=1
gunzip ramdisk.img.gz
mkdir ramdisk; cd ramdisk
cpio -i < ../ramdisk.img
–>>#The ramdisk files are uncompress in the hpboot/ramdisk directory
–>>#Open file fstab.tenderloin using (text editor) change mnt_flags of/system ext4 from ro to rw
–>>#Look like this when change from (ro ) read only to ( rw ) read and write.
–>>#<src> <mnt_point> <type> <mnt_flags and options>
–>>#/dev/store/cm-system /system ext4 rw,errors=panic
–>># Save and close the fstab.tenderloin file
–>># The next 3 steps will repack the files into the ramdisk and merge Kernel to create the finish boot image.
find . | cpio --create --format=’newc’ | gzip > ../ramdiskRW.img
cd ~/hpboot
mkimage -A arm -O linux -T ramdisk -C none -a 0x00000000 -n “TENDERLOIN RW SYSTEM RAMDISK” -d ./ramdiskRW.img ./ramdisk.uImage
mkimage -A arm -T multi -C none -n “Tenderloin RW System” -d kernel.uImage:ramdisk.uImage uImage.Android_RW
–>>#Boot the touchpad into TWRP, connect to PC, copy uImage.Android_RW to the external Micro SDCard.
–>>#Select MOUNT and touch Boot, go back, touch Advanced, File Manager, touch external_sd, select uImage.Android_RW, touch Copy File, touch boot, touch select Current Folder.
–>>#You should have free space on your boot for both images. At the boot screen you will have the option of Android (with no permanet ROOT access) and Android_RW (RW System), you need to install SuperSu. You can use any of the two options or delete uImage.Android and then rename uImage.Android_RW to uImage.Android for one boot option.
You do not need to re flash the ROM, you can add this boot file and use it with your current installed working ROM.
The process works for all boot.img created for the HP Touchpad. If you have a ROM and would like to have system read and write access then you can do this.
Hopefully a Linux Guru will create a script for this, which will automate the process to 3 seconds!
I like tinkering with my TP but I am running @Windows 7 on a 32 bit.. any suggestions?
Android is base on Linux OS.
Install vmware player and run ubuntu as a virtual machine, both are free.
--SNIP--
Hopefully a Linux Guru will create a script for this, which will automate the process to 3 seconds!
Click to expand...
Click to collapse
Here's a shell script that automates the process (rename the extension from .txt to .sh). Put the script and boot image file in any directory and type
Code:
./rwcreate.sh
If it doesn't execute, it probably needs its permissions changed.. Right click the file you created, select 'properties'. In the properties window, select "Permissions" and check "allow executing as ..." or type
Code:
chmod +x rwcreate.sh
in a terminal window
Thanks for your help and dedicating your time to make it easier for others.
I made suggestion to the script on correcting an error, on DU forum.
Now is just a click to get it done, but if we were in a perfect computer world, it could be even easier as to connect the HP Touchpad to PC using USB.
Then run the script and everything is complete!
Using adb pull command to get (boot.uImage) from hp boot directory, to PC.
Changes are done as per script.
adb push command new boot.uImage to hp boot directory, all done!
But making it easier, will make it more complicated and having to install more software and confusing!
HP_TOUCHPAD said:
Thanks for your help and dedicating your time to make it easier for others.
I made suggestion to the script on correcting an error, on DU forum.
Now is just a click to get it done, but if we were in a perfect computer world, it could be even easier as to connect the HP Touchpad to PC using USB.
Then run the script and everything is complete!
Using adb pull command to get (boot.uImage) from hp boot directory, to PC.
Changes are done as per script.
adb push command new boot.uImage to hp boot directory, all done!
But making it easier, will make it more complicated and having to install more software and confusing!
Click to expand...
Click to collapse
Done. Thanks.
shumash said:
Done. Thanks.
Click to expand...
Click to collapse
The script on this forum is correct, but in the DU the file was wrong, corrected now.
Thanks for the fix and help!

Categories

Resources