[Miscellaneous Android Development] Nephatiu:
Current rooted version: 0.8.3.3026

!!!UPDATE 07DEC13!!! -> With SuperSU v1.80!

Here are the rewritable rooted filesystem-files for BlueStacks. Easy if you want to install BlueStacks for development reasons and don't want to go through the trouble of rooting it yourself. ;)

I'll try to keep it updated as they make their updates, but since they don't really announce them, forgive me if I skip some. :silly:

It's also allowed to point me out there's a new version, I'll probably get to it faster that way. :p

Anyway,

Usage:

Install BlueStacks

Quit Bluestacks completely.

- (By clicking on their tray icon and selecting Quit, or by running the HD-Quit.exe)

Go to your BlueStacks-ProgramData directory

- (In Windows Vista and up it's: x:\ProgramData\BlueStacks)

- (In Windows XP it'll be: x:\Documents and Settings\All Users\Application Data\BlueStacks)

Unpack and replace Root.fs and initrd.img with the 2 files in this 7zip

Restart BlueStacks

If "Installer" asks root access, give it root access... ;p

Done! ;)

[URL="http://cur.lv/5atkp"][COLOR="DeepSkyBlue"][U]Download both files 7zip'd from 'ADrive' here[/U][/COLOR][/URL] (269.3MB)

Mirrors:
[URL="http://cur.lv/5atb6"][COLOR="SeaGreen"][U]Download both files 7zip'd from 'FileDropper' here[/U][/COLOR][/URL] (269.3MB)
[URL="http://cur.lv/5blid"][COLOR="DarkBlue"][U]Download both files 7zip'd from 'Dev-Host' here[/U][/COLOR][/URL] (269.3MB)
[URL="http://cur.lv/5blth"][COLOR="DarkOrchid"][U]Download both files 7zip'd from 'MediaFire' here[/U][/COLOR][/URL] (269.3MB)
[URL="http://cur.lv/5bpjr"][COLOR="Red"][U]Download both files 7zip'd from 'Android File Host' here[/U][/COLOR][/URL] (269.3MB)

---

[URL="http://bit.ly/1bP5VjD"]MD5 Checksum[/URL]: 0f199f0f353e701a7b9c535098b243b3

Please excuse me trying to get something out of the trouble, though. ;p

----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----

Then, for the noobs that just can't get it working and the limitless downloaders who just don't look at filesize, next, I give you the full 'Android' directory! 7zipped while not running, these files are a certainty that all should work, because they come with /system and /data together and are meant to replace your own. All your own apps and settings (not your backupz to SD) will have gone after doing the following, so it's only recommended when you're planning to start anew anyway or when you just can't get the root into it for some reason... Or maybe you planned ahaed and backed everything up anyway... ;p These files are certain to give you not only SuperSU-root access, but also a Play Store ready to use and as a bonus a full Debian Linux (Jessie) installed underneath it. (This is why it's so much bigger. ;p)

A little info on the linux:

Debian's root password is set to "bluestacks", and it's also the password for the "BlueStacks" user. You can change these without any problems. You can also just enter Debian Linux by opening the installed Terminal. I already preset it to do this. ;) I also used the none standard Terminal app so you can use the normal one for your own purpouses without constantly fiddling and swapping with it's settings. ;p

So, just kill BlueStacks completely and swap the contents of this 7z with the contents of your ProgData-BlueStacks-Android dir (except for the missing sdcard.sparsefs, of course). ;)

It should be located here:

- For XP:	x:\documents and settings\all users\application data\BlueStacks\Android

- For Vista, 7, 8,...:	x:\programdata\BlueStacks\Android

(x marks the drive your windows is installed on. ;))

And restart BlueStacks.

[URL="http://cur.lv/5d4xj"][COLOR="DeepSkyBlue"][U]Download the BlueStacks Androdebian Project from 'ADrive' here[/U][/COLOR][/URL] (622.3MB)

[URL="http://cur.lv/5dbr7"][COLOR="SeaGreen"][U]Download the BlueStacks Androdebian Project from 'FileDropper' here[/U][/COLOR][/URL] (622.3MB)
[URL="http://cur.lv/5dct9"][COLOR="DarkBlue"][U]Download Part 1 of the BlueStacks Androdebian Project from 'Dev-Host' here[/U][/COLOR][/URL] (311.5MB)
[URL="http://cur.lv/5dcyx"][COLOR="DarkBlue"][U]Download Part 2 of the BlueStacks Androdebian Project from 'Dev-Host' here[/U][/COLOR][/URL] (310.8MB)
[URL="ttp://cur.lv/5d51y"][COLOR="DarkOrchid"][U]Download the BlueStacks Androdebian Project from 'MediaFire' here[/U][/COLOR][/URL] (622.3MB)
[URL="http://cur.lv/5dciu"][COLOR="Red"][U]Download the BlueStacks Androdebian Project from 'Android File Host' here[/U][/COLOR][/URL] (622.3MB)

---

[URL="http://bit.ly/JbVniG"]MD5 Checksum (Full File)[/URL]: 5763bf8f96d4f4990494d4bab1b2fd0b
[URL="http://bit.ly/18mVKlB"]MD5 Checksum (Part 1)[/URL]: 32ee4dc23717c2c5878dfdf125231fe1
[URL="http://bit.ly/Jg3v1H"]MD5 Checksum (Part 2)[/URL]: 7a989a027454786ab45fe4eb6d3917b7

----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- -----

And btw, if you want to try it yourself, I always write down my steps taken, so here they are:

;)

Rooting BlueStacks as I did it:

For this you will need the following programs:

BlueStacks (of course)

IOBit Uninstaller

7zip

Notepad++

Portable Ubuntu

I used Windows XP x86, but I added the info for higher windows versions and x64 windows versions as well)

x marks the drive your windows is installed on. ;)

Winkey-R (Run) "%programfiles%\BlueStacks\HD-Quit.exe" (or "%Programfiles(x86)%\BlueStacks\HD-Quit.exe" for x64);

Kill HD-LogRotatorService.exe in Task Manager;

I used IOBit Uninstaller because I hate waiting on the Windows internal one and it does a lot more stuff we need done.

(If you want it and haven't already, get IOBit Uninstaller here!);

Uninstall BlueStacks with IOBit Uninstaller;

Choose to scan for remaining stuff and delete all of the findings;

Uninstall BlueStacks Notification Center

When it asks to keep all data and userfiles, say no;

Delete x:\Documents and Settings\All Users\Application Data\BlueStacksSetup (or x:\ProgramData\BlueStacksSetup in Vista or higher)

('BlueStacks' dir has been removed by clicking 'yes' in uninstall, if not, remove it as well);

If you can't delete hyperviser.log, you'll have to reboot first, then delete the BlueStacks folder before you'll be able to continue. ;)

Re-install BlueStacks

(If you haven't already, get BlueStacks here!);

Download "busybox-i686" from this site and rename it to "busybox";

Download SuperSU in flash zip format from this site.

Inside this zip is more then just SuperSU. Unzip these files to "c:\pubuntu":

(out of zipped directory "/common":)

- "Superuser.apk";

- "install-recovery.sh";

- "99SuperSUDaemon";

(out of zipped directory "/x86":)

- "su";

Open Superuser.apk with 7zip, extract the files "/assets/chattr.x86.png" and "/assets/supersu.x86.png to any temporary directory, rename the files to "chattr.arm.png" and "supersu.arm.png", re-insert them (by dragging them back to the still open 7zip) and replace the other 2 png-files.

(If you haven't already, get 7zip here!);

Close 7zip and save;

Open x:\Documents and Settings\All Users\Application Data\BlueStacks (or x:\ProgramData\BlueStacks in Vista or higher);

Open "initrd.img" with 7zip;

Unpack "initrd" to any temporary dir;

Open "initrd" with Notepad++

(If you haven't already, get Notepad++ here!);

Search for " ro " (including the spaces, not the quotationmarks)

There should be two results, change the first to " rw "

- Hint: It's not the one which starts with "Option: ro (read-only",

It's the one that resembles 'try_mount ro $1 /mnt && [ -e /mnt/$SRC/ramdisk.img ]'. ;P;

Save "initrd" and close Notepad++;

Drag it back into the 7zip application where "initrd.img" is still open and overwrite existing "initrd";

Close 7zip;

Then you'll need Portable Ubuntu

(If you haven't already, get Portable Ubuntu here!);

NOTE: Portable Ubuntu does not work on x64 Windows, so if you're not running an x86 Windows, you'll need to use a Linux box or vm (with shared folders) here instead.

- If you have Windows installed on any other drive than C, do the following, if it's installed in C, skip this:

- Open Ubuntu Portable folder;

- Go to the "config" subfolder;

- Edit the file "portable_ubuntu.conf";

- Under the line: "shared_folder0=c:\" add "shared_folder1=x:\" (where x is still the drive your windows is on);

- Save "portable_ubuntu.conf" and exit Notepad++;

Open Portable Ubuntu;

Open the terminal window once it's fully loaded;

Do the following in the exact order:

sudo su
(pubuntu's password is '123456')
mkdir /n
mkdir /n/rootfs
mkdir /n/sfs
mkdir /n/img

[B]- If windows was on C:[/B]
e2fsck -f -y "/media/cofs2/Documents and Settings/All Users/Application Data/BlueStacks/Android/Root.fs"
resize2fs -f "/media/cofs2/Documents and Settings/All Users/Application Data/BlueStacks/Android/Root.fs" 500M
mount -o loop "/media/cofs2/Documents and Settings/All Users/Application Data/BlueStacks/Android/Root.fs" /n/rootfs
[COLOR="Gray"](or for Vista and up:
e2fsck -f -y "/media/cofs2/ProgramData/BlueStacks/Android/Root.fs"
resize2fs -f "/media/cofs2/ProgramData/BlueStacks/Android/Root.fs" 500M
mount -o loop "/media/cofs2/ProgramData/BlueStacks/Android/Root.fs" /n/rootfs
)[/COLOR]

[B]- If not:[/B]
[I]e2fsck -f -y "/media/cofs3/Documents and Settings/All Users/Application Data/BlueStacks/Android/Root.fs"
resize2fs -f "/media/cofs3/Documents and Settings/All Users/Application Data/BlueStacks/Android/Root.fs" 500M
mount -o loop "/media/cofs3/Documents and Settings/All Users/Application Data/BlueStacks/Android/Root.fs" /n/rootfs
[COLOR="Gray"](or for Vista and up:
e2fsck -f -y "/media/cofs3/ProgramData/BlueStacks/Android/Root.fs"
resize2fs -f "/media/cofs3/ProgramData/BlueStacks/Android/Root.fs" 500M
mount -o loop "/media/cofs3/ProgramData/BlueStacks/Android/Root.fs" /n/rootfs
)[/COLOR][/I]

mount -o loop /n/rootfs/android/system.sfs /n/sfs
cp /n/sfs/system.img /n/rootfs/android
e2fsck -f -y /n/rootfs/android/system.img
resize2fs -f /n/rootfs/android/system.img 480M
umount /n/sfs
rm /n/rootfs/android/system.sfs
rmdir /n/sfs
mount -o loop /n/rootfs/android/system.img /n/img
mkdir /n/img/bin/.ext
mkdir /n/img/etc/init.d
cp "/media/cofs2/pubuntu/su" /n/img/xbin/daemonsu
cp "/media/cofs2/pubuntu/su" /n/img/xbin/su
cp "/media/cofs2/pubuntu/su" /n/img/bin/.ext/.su
cp "/media/cofs2/pubuntu/Superuser.apk" /n/img/app/SuperSU.apk
cp "/media/cofs2/pubuntu/install-recovery.sh" /n/img/etc/install-recovery.sh
cp "/media/cofs2/pubuntu/99SuperSUDaemon" /n/img/etc/init.d/99SuperSUDaemon
cp "/media/cofs2/pubuntu/busybox" /n/img/xbin
echo 1 > /n/img/etc/.installed_su_daemon
chown 0:2000 /n/img/bin/.ext
chown 0:2000 /n/img/bin/.ext/.su
chown 0:2000 /n/img/xbin/su
chown 0:2000 /n/img/xbin/daemonsu
chmod 777 /n/img/bin/.ext
chmod 6755 /n/img/bin/.ext/.su
chmod 6755 /n/img/xbin/su
chmod 6755 /n/img/xbin/daemonsu
chmod 755 /n/img/etc/install-recovery.sh
chmod 755 /n/img/etc/init.d/99SuperSUDaemon
chmod 644 /n/img/etc/.installed_su_daemon
chmod 644 /n/img/app/SuperSU.apk
umount /n/img
rmdir /n/img
chown 0:2000 /n/rootfs/android/system.img
chmod 0644 /n/rootfs/android/system.img
umount /n/rootfs
rmdir /n/rootfs
rmdir /n
exit
exit

Shutdown Portable Ubuntu;

Boot BlueStacks;

Install custom launcher like ADW, Go or Apex (Superuser app does not show up in BlueStacks' Launcher);

Install Root Explorer;

Move custom launcher from "/data/app" to "/system/app";

Reboot BlueStacks;

You can now safely remove apps like "Launcher2.apk" and "new_Home.apk" and other original launcher related stuff.

Enjoy and grtz,

~ Nephatiu ;)