[Emulator][Root][How-To] BlueStacks 0.9.x + pre-rooted 0.9.30.4239 image - Android Software/Hacking General [Developers Only]

This How-To briefly describes a way to manually root recent BlueStacks without any third-party apps. All you need is a linux distro (you can use VirtualBox virtual machine) and SuperSU CWM flashable. I won't go into much details, some little linux know-how is needed, but you can always google for what you don't understand, since the required steps are fairly simple. I also share a pre-rooted BlueStacks 0.9.30.4239 image for the lazy ones
This How-To assumes you already have an installed BlueStacks you wish to root, but make sure it isn't running. So, let's get started
1. Copy over UPDATE-SuperSU-v2.46.zip and BlueStacks Root.fs to your linux box: in Windows it is typically located at "C:\ProgramData\BlueStacks\Android\Root.fs". If you're using VirtualBox, I suggest you use a shared folder to copy the image over to the guest linux OS.
2. As root, unpack UPDATE-SuperSU-v2.46.zip and mount Root.fs as a loop device.
3. Now we need to copy over (as root) some of the extracted files to the mounted Root.fs:
arm/su --> android/system/xbin/su
arm/su --> android/system/xbin/daemonsu
arm/supolicy --> android/system/xbin/supolicy
arm/libsupol.so --> android/system/lib/libsupol.so
common/Superuser.apk --> android/system/app/Superuser.apk
4. Since there's no init.d structure in BlueStacks, we need to edit android/system/etc/init.sh: at the buttom of the file find these lines:
Code:
init|"")
do_init
;;
esac
and insert one line after 'do_init':
Code:
init|"")
do_init
/system/xbin/daemonsu --auto-daemon &
;;
esac
5. Unmount the loop device and copy the modified Root.fs over to your BlueStacks Android dir (typically, "C:\ProgramData\BlueStacks\Android" in Windows). You may want to make a backup of the original file just in case.
6. Start BlueStacks and launch SuperSU via Play Store: it will prompt for upgrading su binary --- choose the normal way and restart BluseStacks upon completion.
7. That's it, you're rooted! Now you may wish to install a proper launcher (like Nova Launcher) if you have not done so already.
Now, as promised, you can grab pre-rooted BlueStacks 0.9.30.4239 Root.fs from here:
https://www.mediafire.com/folder/bc7hjf0a8lgnq/BlueStacks_Root
Stop BlueStacks, copy Root.fs over to your BlueStacks Android dir, and start BlueStacks. In case your current version is incompatible with the image, try BlueStacks-ThinInstaller_0.9.30.4239.exe from the link above. I'm not sure whether this ThinInstaller will download the proper data when newer version is released, so no guarantees here, you may still need to do it manually at some point in the future unless I maintain the Root.fs actual.

200+ people downloaded rooted image already, and not a single response yet. Some feedback would be appreciated, you know

Serkenar said:
200+ people downloaded rooted image already, and not a single response yet. Some feedback would be appreciated, you know
Click to expand...
Click to collapse
Thanks, worked perfect for me

thanks replace root.fs works for me, was using 9.27.5408

mac-duff said:
Thanks, worked perfect for me
Click to expand...
Click to collapse
netsee said:
thanks replace root.fs works for me, was using 9.27.5408
Click to expand...
Click to collapse
Great, I'm glad that it works. Thanks for the feedback!

link for zip is broken

Related

GUIDES & FAQs [Android]: ADB Workshop by Adrynalyne and Guide by Captainkrtek

DO NOT POST IN THIS THREAD BEFORE READING THE WHOLE POST
PLEASE ADD GUIDES TO COMMON ISSUES YOURSELVES
To my recollection, the previous WM Guides thread was successful.. so we'll be moving on to android as well - from beginner to pro.
I hope this thread will provide answers to a decent percentage of your questions.
Please hold until guide collecting is finished..
In the meanwhile you are ALL invited to send me links or full guides to add to this thread.. remember, we are all about sharing.
COMING SOON! (in the meanwhile, you've got a great battery life guide at http://forum.xda-developers.com/showthread.php?t=471521 - be sure to thank BruceElliot for it!)
also, if you decide to post a guide, please keep the guide as neat as possible, with a title containing the LEVEL ([BEGINNER], [INTERMEDIATE], [PRO]) and the commonly searched words so that people who look for it can find it easily. (if you can, use the same color (dark orange) and same size (4) and Bold.. for the main title.. tho that's not a must )
post #2. [BEGINNERS+INTERMEDIATE] Replacing System Files using Android Commander
post #3. [EVERYONE] ADB Workshop by Adrynalyne and Guide by Captainkrtek
post #4. [QUICK FAQ's] Common QnA's for beginners by Timmymarsh (work in progress)
[BEGINNERS] Replacing system files using Android Commander
Replacing system files using Android Commander:
(This post was formally based in the HD2's RTL support thread and revolved around our need to replace frameworks)
so:
1. Download the android SDK from: http://dl.google.com/android/android...08-windows.zip
2. EXTRACT(!!!) the android-sdk-windows to c:\
(make sure you extract the dir - not run the setup from inside the zip file)
3. install Android Commander from http://androidcommander.com
4. Connect your device and make sure it's set to Debugging mode in /settings/applications/development/
5. You might have to set a dir containing your adb.exe file. set it to c:\android-sdk-windows\tools\
6. You will see a Total Commander-like interface. you can then copy the framework.jar file to the correct directory (there's no difference between SD android builds and androids in ROM - the system dir will be shown the same way)
a. Yes, you can replace/delete system files while android is running.
b. (for androids running from SD) Any file copied to /sdcard/android/root/system/X will be copied to /system/X in the system file. The sdcard/android root dir is JUST LIKE your root in ROM androids.
c. Make sure you either created a backup or verified a match in any other way before replacing files like frameworks, zimage, modules, etc.. your android might not boot afterwards (I keep all system.ext2 files backed up so that i can restore them incase i screw something up.)
enjoy
[EVERYONE] ADB Workshop by Adrynalyne and Guide by Captainkrtek
This following guide was rewritten by Captainkrtek, please make sure to thank him for it
Original Post:
(http://forum.xda-developers.com/showthread.php?t=879701)
This workshop was held in #android-learning on irc.freenode.net by XDA Member Adrynalyne. All credit to him for this guide, I simply am taking it and turning it into a guide. Here we go!
You can find the raw IRC log here
Good evening folks, and welcome to my ADB workshop. This is by no means a full explanation on the subject, but more of a crash course to help folks get up to speed, and get more from their devices. There may be some things you already know here, so please be patient and respect those who do not.
Reference Files
http://adrynalyne.us/files/How to install adb.pdf
http://adrynalyne.us/files/Using ADB.pdf
So, lets just start with the basics.
What is ADB?
ADB stands for the android debugging bridge and is used for testing and debugging purposes by developers.
However, we like to get more out of our devices, and its a great way to fix things.
Knowing adb can mean the difference between a paperweight and a working phone.
So, to start with, we will look at installing ADB.
Generally speaking, the Sun/Oracle JDK is required to run all SDK functions.
ADB is but one tool in the SDK arsenal.
So, we begin by downloading and installing the JDK. This can be found here:
https://cds.sun.com/is-bin/[email protected]_Developer
Choose your OS, download and install. I recommend that 64 bit users use the regular x86/32 bit version as well.
Moving ahead, we download the Windows sdk from here:
http://dl.google.com/android/installer_r08-windows.exe
Due to already installing JDK, you won't be stopped by the install process.
Now, if you notice, I installed it to:
C:\android-sdk-windows
I did this because it makes things easier when setting up path variables.
I encourage everyone to do the same, but obviously it is not required.
So, this SDK is handy, but is only good up to 2.2. We want the latest and greatest! (Well I do)
So, we navigate to:
C:\android-sdk-windows\
and we run SDK Manager.exe
If you notice in your PDF file for installing adb, you will notice that you can update, and I made a choice not to include earlier sdk versions.
I won't go into full detail on that, but depending on the version of SDK you have, 8 or 9, it WILL make a difference in using adb.
By default, for version 8 adb.exe resides in C:\android-sdk-windows\tools
By default, for version 9 adb.exe resides in C:\android-sdk-windows\platform-tools
We will assume version 9 in this guide
Really, the SDK is installed and adb is usable right now, but in my humble opinion, its not enough
I like the ability to use adb in ANY directory on my machine.
To do this, we edit Windows's environment variables.
Specifically, the system path.
To do this, we click on start, or the orb (depending on OS), and right click on Computer, left clicking on properties in the menu.
If its windows XP, I believe it brings you into advanced system properties immediatly. Vista and 7 need a second step.
On the left hand side, as you notice I have highlighted in the pdf, left click advanced system settings.
Under advanced tab, we left click environment variables...
There are two boxes here.
We are concerned with system variables, however.
So we scroll down the list and highlight path and click edit.
Ignoring all the extra stuff in here, make sure you are at the end of the line, and type
Code:
;C:\android-sdk-windows\platform-tools
The semicolon allows us to separate it
from the previous path statement.
Click ok all the way out.
We now have ADB setup globally. We can use cmd.exe (I use powershell) and no matter what directory we are in, adb is recognized.
If it is not, make certain you entered the path into system variables, and made no typos.
If you installed to a different location, you will need to adjust the path accordingly.
This concludes the section on installing the Android SDK to use ADB.
This next section will be on using ADB, so please open that pdf now.
Now, this applies to any OS, not just Windows.
Well, with the exception of the USB drivers.
I will not go too much into that, but if you take a look at the PDF, it goes through installing usb drivers for the sdk, and how to download them.
Fiarly straightforward, in that rspect.
Now, to setup our phones to use with the SDK and ADB, we must change some settings.
First, we go to menu softkey, then settings.
We scroll down to Applications and tap it.
Under Development, we will check Enable USB Debugging. Please note the SGS phones are different in this respect.
The USB cable must be unplugged before enabling or disabling this setting.
Once this is done, we are now ready to play with adb
One quick note: If you get device not found/conencted, please reboot your phone. DJ05 has a quirk in it where ADBD randomly crashes on boot.
A reboot will fix this
ADBD= ADB Daemon
Ok, continuing on.
Lets look at installing applications. This is also known as sideloading.
Unlike installing from the SD card, it does not require unknown sources to be enabled.
The command for this is
Code:
adb install packagename
This assumes that you are working from the directory where the file is located.
This will install the application to /data/app.
It will also show sometimes useful errors if install fails.
That is not something you will see from the Android GUI.
Now, a lot of us have probably deleted files with apps like Root Explorer. While this isn't really a bad thing, it leaves behind databases and data for the application removed.
This is where the 0kb applicaiton entries come from.
If you take that application entry name, you can uninstall the extra data via adb.
First we go to the adb shell which logs into the phone.
Code:
adb shell
If we end up with a $, we will want admin rights, in many cases. This is not one of them, I don't beleive.
To get admin rights, you want to type
Code:
su
Look at your phone if this is the first time, it may prompt you to allow access. Else you will get permission denied.
If you are not rooted, this will not work either.
Ok, now that we are logged in, we will type
Code:
pm uninstall packagename
where packagename is the name of the 0kb listing.
Now this seems like a pain in the a** and I agree.
HOWEVER
There will be a time where Manage applications crashes when you try to uninstall it from the phone. In this case, a factory reset, or this method is the only effective way to fix the problem.
Moving on.
How many of us have removed system applications or renamed them? Did you know that you can simply disable them from the system?
Code:
adb shell
su
pm disable appllicationname
This will disable it, and the system will ignore it.
This can be seen as safer than deleting or renaming things, but your mileage may vary.
On the other hand, you can also re-enable these applications.
Code:
adb shell
su
pm enable applicationname
Please note: Not all applications will properly re-enable. I believe a factory reset or reinstall of said application will fix the issue.
Also, application names are absolutely case sensitive.
*nix based Operating Systems see the letter 'a' and 'A' as two different things.
when you log into adb shell, you are playing by android rules
Ok, a lot of us tweak and mod our phones and turning off the device to get to clockwork recovery, or battery pulls, or multiple button holds to get into Download mode are troublesome and annoying at best.
ADB can help us here.
Here, we do not need to be logged into the shell
If we want to merely reboot the phone:
Code:
adb reboot
If we want to go to recovery (works well with voodoo5)
Code:
adb reboot recovery
If we want to go to Download Mode because we need Odin, heaven forbid:
Code:
adb reboot download
Its instant. No waiting on animations or anything else.
Its also handy if Android has locked up, but yet still works in adb.
I for one hate taking my case off to battery pull.
So now we move on to pushing and pulling files.
Sometimes, I don't feel like mounting my sd card to copy a file over to my phone.
I can use this command to push a file straight to my sd card:
Code:
adb push filename /pathtodirectoryonphone
So for instance, if I have test.txt that I want to send, I would type:
Code:
adb push test.txt /sdcard/
and there it goes.
Ok moving on
Pushing files can be done to any directory, however, some are protected.
For instance, /system is going to give you a permission denied or a read only filesystem error.
To get around this, the easiest thing to do is push the file to your sdcard, then log into the shell:
Code:
adb shell
Code:
su
We will then mount the system as writable
Code:
mount -o rw,remount /dev/block/stl9 /system
Then we can use something like
Code:
cp /sdcard/test.txt /system/app/test.txt
cp stands for copy
and it requires the path of the file and destination path. The name of the file is optional
When you copy it, you can rename it to whatever you like.
For instance, if we wanted to backup a file
Code:
cp /sdcard/test.txt /sdcard/backuptest.txt
Now, lets assume you do not have busybox installed.
You non rooted users will not.
Then you must use a slightly more complicated command called dd
This is used like this:
Code:
dd if=/sdcard/test.txt of=/system/app/test.txt
if is for inputfile
of= output file
Not every user friendly, but probably one of the safer copy commands.
Ok, moving on to pulling files.
Lets say you want to get a file from your phone, to modify, backup, etc.
To do this, we simply use adb in this manner:
Code:
adb pull /pathtofile/filename destinationname
For instance, if I wanted to backup ADW launcher in system/app
I would do this
Code:
adb pull /system/app/ADWLaucnher.apk ADWLauncher.apk
And it will pull the file from the phone and put it in the current directory.
Like above, you can specifcy where it goes.
pushing files to the sdcard, it seems prudent to talk about changing permissions.
sdcards are typically fat32, which destroys permisisons, and Android is heavily permission based.
So if you push an application to your sd card, then try to copy it to /system/app/ bad things are going to happen, or the app may not even show up.
So in that case, we use something called chmod.
This is used in this manner
Code:
adb shell
su
chmod 755 /pathtoapplication/applicationname
Keep in mind
you dont want to do this while its still on your sd card.
an example
Code:
adb shell
su
chmod 755 /system/app/ADWLauncher.apk
755 is good for applications and script files.
Just a couple more topics to cover.
Lets go over deleting files.
This becomes especially handy for removing rogue applications.
To do this, we must be in the adb shell.
Code:
adb shell
su
rm /system/app/ADWLauncher.apk
You may need to remount system as writable with:
Code:
mount -o rw,remount /dev/block/stl9 /system
That applies when using chmod as well.
So what I did above was delete ADW Launcher from system/app
However, what if I wanted to delete the entire contents of a directory?
Same thing as before, except
Code:
adb shell
rm -f /data/dalvik-cache/*.*
I just cleared my dalvik-cache with that command
very quick, very effective.
If you just tried that, please reboot your phone now
Ok....this leaves us with the final topic: logcat
logcat allows us to log what the OS is doing, and possibly delve information for when things are not working
its quite simple Reading it is another.
To use logcat
Code:
adb shell
logcat
To logcat to a certain file do
Code:
adb shell
logcat > /sdcard/logcat.txt
Now we let the log settle down to a reasonable amount of data coming in and not a wall of scrolling, then start the app in question. When it gives an error, we hit ctrl-C and kill the adb shell session.
This should have captured enough data to see the error. Now, I prepared an example. A user came to me on IRC, and Google Maps was force closing. Clearing data didnt fix it, Clearing dalvik-cache, and fix permissions did not fix it. In this case, the user did not know how to use adb So I had him grab an app called alogcat from the market and email me the log. This is also a very valid method.
this file explains what the problem was, and highlights what to look for as an example.
http://adrynalyne.us/files/logcat.pdf
___________________________________________________________________
This concludes the guide from Adrynalyne, there will be more workshops such as this one in irc.freenode.net #android-learning.
Thanks to everyone in #samsung-fascinate !
QUICK FAQ's
sources: Q&A Section, The Weekly Q&A Section by XDA News Writers (thanks guys)
Q: ‘Is there any way to block specific apps from using my data connection?’
A: Try the Droid Wall application.
Q: ‘I read how you can make changes in the build.prop file on my Android device. How exactly do I get to it?’
A: Install ASTRO file manager, browse to /system, long press on build.prop – Edit – Copy. Press on the home icon then Edit icon – Paste. Connect sd card, edit it, and paste it over from where you copied build.prop
Q: What happens if I update my phone? will I need to re-root it and get the ROM again? will all of my applications get erased? If so, is there a way around this?
A: You will lose your root, but not apps if it is just an update.
Q: I just tried to flash a ROM from recovery on my Android phone and got “Verification Failed, Installation Aborted” What happened?
A: Before you can flash a custom ROM the .zip file must be digitally signed in the ROM kitchen, if unzipped and re-zipped it will lose its verification, this happens often using the Safari browser as it likes to decompress .zip’s. Or if your download is corrupted (download the ROM again) it will fail the Verification.
Q - HTC Location Widget shows "map data unavailable"
A - On the widget, click the pin/then click the windows button/click get more/scroll to download maps/download relevant map (care, maybe a big file). Now exit and click onto map, your location should now be visible :)
Q:So, I moved all the apps on the SD, but is still not enough. How can I free some memory? I could delete the cache of the older upgrade or something else?
A:Do you have pictures and videos? If so, check if they are on the SD card and not on your internal memory. Cleaning your cache helps, and try deleting your text messages threads.
Q: ‘What exactly is a kernel and what are the benefits in changing it?’
A: A kernel is a bridge between the applications and the actual data processing done at the hardware level. The kernel’s responsibilities include managing the system’s resources – the communication between hardware and software components. Flashing different kernels gives you different operating speeds, better battery life, the ability to overclock, and more.
Android control other device with IOIO Board.
It use ADB.
http://androidcontrol.blogspot.com/2011/10/ioio-board-for-android-control-io.html
timmymarsh said:
QUICK FAQ's
sources: Q&A Section, The Weekly Q&A Section by XDA News Writers (thanks guys)
Q: ‘Is there any way to block specific apps from using my data connection?’
A: Try the Droid Wall application.
Q: ‘I read how you can make changes in the build.prop file on my Android device. How exactly do I get to it?’
A: Install ASTRO file manager, browse to /system, long press on build.prop – Edit – Copy. Press on the home icon then Edit icon – Paste. Connect sd card, edit it, and paste it over from where you copied build.prop
Q: What happens if I update my phone? will I need to re-root it and get the ROM again? will all of my applications get erased? If so, is there a way around this?
A: You will lose your root, but not apps if it is just an update.
Q: I just tried to flash a ROM from recovery on my Android phone and got “Verification Failed, Installation Aborted” What happened?
A: Before you can flash a custom ROM the .zip file must be digitally signed in the ROM kitchen, if unzipped and re-zipped it will lose its verification, this happens often using the Safari browser as it likes to decompress .zip’s. Or if your download is corrupted (download the ROM again) it will fail the Verification.
Q - HTC Location Widget shows "map data unavailable"
A - On the widget, click the pin/then click the windows button/click get more/scroll to download maps/download relevant map (care, maybe a big file). Now exit and click onto map, your location should now be visible :)
Q:So, I moved all the apps on the SD, but is still not enough. How can I free some memory? I could delete the cache of the older upgrade or something else?
A:Do you have pictures and videos? If so, check if they are on the SD card and not on your internal memory. Cleaning your cache helps, and try deleting your text messages threads.
Q: ‘What exactly is a kernel and what are the benefits in changing it?’
A: A kernel is a bridge between the applications and the actual data processing done at the hardware level. The kernel’s responsibilities include managing the system’s resources – the communication between hardware and software components. Flashing different kernels gives you different operating speeds, better battery life, the ability to overclock, and more.
Click to expand...
Click to collapse
Thank you for your patience and taking the time to answer those questions. I loved your simple and easily digestible format.
There is a note
*nix based Operating Systems see the letter 'a' and 'A' as two different things.
when you log into adb shell, you are playing by android rules
Click to expand...
Click to collapse
this note is all wrong..
1. linNUX is not *NIX.
2. Mac OS-X is a *NIX OS, it is based upon UNIX, they use their own variant called Darwin. Darwin does not require capitolization.
3. The word should be POSIX. Linux is POSIX compliant and POSIX defines the capitolization standardards
soft brick
Taioba said:
Is there any way to use ADB even though I can not enable USB debugging by the android?
I have an Atrix with soft-brick. How can I restore a file (framework-res.apk) knowing that my USB debugging is off?
I can enable ADB via fastboot?
Thanks!
Click to expand...
Click to collapse
I found this for atrix 4g....
http://forum.xda-developers.com/showthread.php?t=965546
hope it helps
knoknot said:
i have a bricked s2 not so sure how to go about reviving it via adb
Click to expand...
Click to collapse
check this thread
http://forum.xda-developers.com/showthread.php?t=1237815
thanks. searched for that
Thanks for it.
Great Guys............ :good:
Thanks for sharing.
Thanks for sharing this guild :d, i am new member for reccod
Great job~ Sometimes could be used this.
I'm using Windows 10 RTM and I've set the path, yet I still get the "unrecognized application" error in the command console. What am I missing?
Nevermind, a restart fixed it. Used to be you didn't have to.... sheesh.
nir36 said:
Replacing system files using Android Commander:
(This post was formally based in the HD2's RTL support thread and revolved around our need to replace frameworks)
so:
1. Download the android SDK from: http://dl.google.com/android/android...08-windows.zip
2. EXTRACT(!!!) the android-sdk-windows to c:\
(make sure you extract the dir - not run the setup from inside the zip file)
3. install Android Commander from http://androidcommander.com
4. Connect your device and make sure it's set to Debugging mode in /settings/applications/development/
5. You might have to set a dir containing your adb.exe file. set it to c:\android-sdk-windows\tools\
6. You will see a Total Commander-like interface. you can then copy the framework.jar file to the correct directory (there's no difference between SD android builds and androids in ROM - the system dir will be shown the same way)
a. Yes, you can replace/delete system files while android is running.
b. (for androids running from SD) Any file copied to /sdcard/android/root/system/X will be copied to /system/X in the system file. The sdcard/android root dir is JUST LIKE your root in ROM androids.
c. Make sure you either created a backup or verified a match in any other way before replacing files like frameworks, zimage, modules, etc.. your android might not boot afterwards (I keep all system.ext2 files backed up so that i can restore them incase i screw something up.)
enjoy
Click to expand...
Click to collapse
Thanks, this Guide is very informative
Help with LG D722
I'm using LG D722 phone and I somehow unlocked bootloader and installed twrp recovery. I backed up Lollipop that's what I'm using and i want to restore custom ROM
I know I need to install Google Apps after installing Custom ROM. But Do I also need to install Modem files on my device ? Because I can't find them on XDA Forums. Please give me a link or something. The help is not just appreciated but seriously needed.
Success. Thanks
Hello, I walk testing one recovery but I'm booting before flashing, the question is, will the recovery feel same when booted vs flashed? I've booted and used to flash a pair of zips but felt very laggy and bugged although did the work right. Thanks
Edit: solved, tried myself
Sent from my SHIELD Tablet K1 using XDA-Developers mobile app
http://forum.xda-developers.com/showthread.php?t=872128&page=2

[Tool][Guide]Linux tools

I. How to root Defy via Linux!
A simple script for rooting Defy from Linux. I use SuperOneClick 1.9.1 files in my script, and I rooting succesfully my device from Ubuntu 11.04.
It does not install "bussybox" and "Android Terminal", just "su" and "Superuser.apk".
I hope it will work for someone else too.
Using:
0. install usb grants on your computer (see adb install method)
1. unzip file
2. run RootDefy.sh
3. after succesfully install, reboot phone (./adblinux reboot)
Download:
(version 0.2) download
Changelogs:
Code:
[B]02.06.2011:[/B] Version 0.2
- Added header to script
[B]13.05.2011:[/B] Version 0.1
- correct Defy device number
- correct /system filesystem type and path
[B]12.05.2011:[/B] First release
II. How to flash a SBF via Linux!
0. charge your phone 100%!
1. download and extract your sbf file: download
2. download sbf_flash file (same directory): download, or see the editor blog
3. chmod +x sbf_flash
4. sudo ./sbf_flash xxxxxx.sbf
Now your phone should start flashing, and phone will reboot when finish it.
III. How to unroot Defy via Linux!
Go to this topic: link
Nice, will try this =)
nice work!
I have been looking for it
Thx.
Great. I'm under linux too, each time I root a rom I launched a script from sdcard. For next time I'll test your script.
Fyi, I flash rom under linux too. I use 'sbf_flash', that works very well!
( but unsuccessfull under mac )
Now I'm looking for deodex script. I wrote and test some but still get errors with some apk and jar
Sent from my MB525 using XDA App
rumcajsz said:
I made a simple script for rooting Defy from Linux. I use SuperOneClick 1.9.1 files in my script, and I rooting succesfully my device from Ubuntu 11.04.
It does not install "bussybox" and "Android Terminal", just "su" and "Superuser.apk".
I hope it will work for someone else too.
Using:
0. install usb grants on your computer (see adb install method)
1. unzip file
2. run RootDefy.sh
3. after succesfully install, reboot phone (./adblinux reboot)
Download:
link
(sorry for my bad english)
Click to expand...
Click to collapse
I believe that this script will not work for Motorola Defy for the following reasons:
1)on lines 17-19 the script checks if there are any udev rules matching a Samsung device (for Samsung devices the idVendor attribute is 04e8, but for Motorola devices, the idVendor attribute is 22b8).
2)on line 53 you are remounting the /system partition specifying that the file system is yaffs2 and the device block is /dev/block/mtdblock0.
On my Defy the file system used is ext3 and the device is /dev/block/mmcblk1p21
I have managed to root my defy a few days ago, from my linux box, using the files used by Sooperonelick (rageagainstthecage, superuser.apk, su and busybox) but considering the facts stated above.
@MisterWB
Fyi, I flash rom under linux too. I use 'sbf_flash', that works very well!
( but unsuccessfull under mac )
Click to expand...
Click to collapse
Did you used the last version for sbf_flash? On the original site its stated that the same binary should work on linux and mac
tuxtm said:
I believe that this script will not work for Motorola Defy for the following reasons:
1)on lines 17-19 the script checks if there are any udev rules matching a Samsung device (for Samsung devices the idVendor attribute is 04e8, but for Motorola devices, the idVendor attribute is 22b8).
2)on line 53 you are remounting the /system partition specifying that the file system is yaffs2 and the device block is /dev/block/mtdblock0.
On my Defy the file system used is ext3 and the device is /dev/block/mmcblk1p21
I have managed to root my defy a few days ago, from my linux box, using the files used by Sooperonelick (rageagainstthecage, superuser.apk, su and busybox) but considering the facts stated above.
Click to expand...
Click to collapse
Thanks for the advice, I will correct their lines ...
You're welcome.
If you want to make a script that will work on all devices you could parse the /rpoc/mounts file from the device and extract the device that's mounted to /system and the file system used (in this case the udev part would also need to be modified)
Also, did you check if the adb binary you are using doesn't need any other external libraries installed by Android SDK. I'm asking this because in the sooperoneclick zip I downloaded, I saw some dll files which I' guess that are used by the adb windows binary, and I don't know if the linux adb binary doesn't need some external libraries, which should also be included in your zip file.
Good luck
tuxtm said:
@MisterWB
Did you used the last version for sbf_flash? On the original site its stated that the same binary should work on linux and mac
Click to expand...
Click to collapse
Yes I use it on mac+linux... but on my mac, at beginning sbf_flash see my phone, but when I want to flash a sbf, sbf_flash freeze on message "waiting for phone" It seems usb behavior varies on mac models.
Anyway, thanks for your reply.
@everyone
This thread could-be a good space to exchange about linux tools.
In this case rumcajsz should change the first post's title, and maintain text, links ...
What do-you think about ? Or do-you prefer a new thread ?
MisterWB said:
Fyi, I flash rom under linux too. I use 'sbf_flash', that works very well!
Sent from my MB525 using XDA App
Click to expand...
Click to collapse
where can i download sbf_flash?
thank you.
MisterWB said:
@everyone
This thread could-be a good space to exchange about linux tools.
In this case rumcajsz should change the first post's title, and maintain text, links ...
What do-you think about ? Or do-you prefer a new thread ?
Click to expand...
Click to collapse
Great idea, I changed it.
johnw.xda said:
where can i download sbf_flash?
thank you.
Click to expand...
Click to collapse
The download link in the first post now.
usb tether
Hi,
thanks for both script, works well for me.
I like: go first to recovery menu (vol donw and power) with usb connected and run the flashing script, perfect...
How do you usb tether with your defy and linux ? (ubuntu)
I use this a lot with my previous phone htc.
I run the french froyo rom (http://forum.xda-developers.com/showthread.php?t=1072367), but i did not found the m.stone usbtether app.
Maybe you got a sbf with every things working natively with linux and no blur?
Regards and BRAVO again...
usb tether
Usb tether is ok with proxoid and port fowarding with the defy (see proxoid wiki).
It is not like my old htc as the device is seen by the pc as a network interface (usb0). In this way you got an IP to communicate with your phone (i am using it for vlc remote for example and other app where ip is needed).
When i plug my defy on usb I got 3 menu: motorola pc, windows sync, sd and nothing.
Is there a way to have menu without motorola and windows stuff ? ( sorry for duplicate the question between this form and the french froyo rom one...)
++
That option should be related to the Media Portal application. Maybe if you would rename it (by changing the apk extension to something else) would do the trick. I didn't test this so, I can not tell you if it will work or if it won't brick your phone
/LE I have just renamed the MediaPortal.apk and apk for the Media Share (I belive it is HomeSyncWizard.apk)then rebooted the phone, but the "Portal and Tools" and "Windows Media Sync" options are still there.
I have to check what is the difference between HTC and motorola.
Tkx for the try,
added "unroot" to first post
On an aside, superoneclick and sbfdepacker can both be ran with mono
If you running 64bit distro ensure libncurses 32bit is installed
I tried SOC & mono (ubuntu 10.10, 11.04: 32 bit), and it doesn't worked for me.
http://forum.xda-developers.com/showpost.php?p=8699742&postcount=537
Follow the link on there, it will work although the script's here do it just as well anyway, but the sbfdepacker, I can find no equivalent of.
I tried this way...
Hi,
If
i root an froyo offical french rom with this script to backup my stuff
install 2nd-init
upgrade to an GingerRom with fixed sbf
then flash back the official french sbf
will i keep my warranty ?
No way to find out i rooted my defy?
I will try mono...

[GUIDE] Ubuntu in a chroot on the Galaxy S4 - now with Native Booting!

Notice (4/16/14): I'm no longer here. I've said "goodbye" to AT&T and their locked bootloader schemes. I'm voting with my wallet - I've sold my I337 and switched to T-Mobile. My apologies to the community, but you're now on your own here.
Intro/About/Requirements:
This thread started as a guide for people who wanted to run Ubuntu in a chroot, and then connecting to it locally with a VNC client. This method has been used countless times on other devices, with many thanks to @zacthespack and his his group, LinuxonAndroid. Unfortunately, this method did not work out-of-the-box on my device, so I tweaked things to work with the Galaxy S4 and posted them here in this thread.
However, the most people immediately noticed that with this method the performance is not great, and some applications can't work in a headless environment. With a comment made by zackthespack, I began researching what it would take to get Ubuntu to write directly to the device's framebuffer. After a few months, I not only managed to accomplish this, but also developed a way to get the Galaxy S4 to boot directly into Ubuntu. As far as I have seen, both of these are a "first" for this handset.
All of these methods require root. The VNC Chroot does not require a custom kernel, but the other methods require a custom-built kernel. For the I337 (AT&T) handset, this can pose a problem if you have bootloaders that are MF3+. If you're using MDB/MDL bootloaders still, you shouldn't have a problem with this and you can Loki the custom kernel without issue.
Depending on your ROM and/or Kernel, you may also need a new version of BusyBox installed, even for the VNC method. You'll find a few apps on the Play Store that can do this for you. Beware that some of them are not easily reversible (such as TinyBox), so if you're stuck on MF3 with no way to create/restore a nandroid/system backup, you should be careful.
Click to expand...
Click to collapse
Disclaimers:
Following this guide and/or flashing anything I've provided to your device is your own responsibility. If something breaks, you break your device, or something explodes, I can't be held liable (I'll help correct any situations you may put yourself in, however). I claim no rights to any proprietary software or intellectual property included in this post or the packages contained herein. By using any of this software, you agree to whatever licenses/agreements that the creators may have included with their software. If you use any of this stuff in your own project, please provide credit where credit is due. For example, if you take my u.sh script and adapt it to some new device (i.e. Galaxy S 5), please at least mention where it came from.
Click to expand...
Click to collapse
VNC Chroot Method (original):
This method is loosely based on this thread for the Galaxy S3 and the ubuntu.sh script there. It didn't work for the S4, but I've made several tweaks to it, simplifying it a ton, and otherwise getting it to work perfectly on my S4. I've tried this using my AT&T Galaxy S4 (SGH-I337) on both the MDL build and the MF3 build - both seem to work great.
Instructions:
Download the Ubuntu 13.04 Small v1 image here.
Create a folder on your sdcard labeled "ubuntu" by whatever means you want to.
Extract the ubuntu.img from your downloaded zip into this folder.
Download my version of the ubuntu.sh and place it on the root of your sdcard.
Open the script in a text editor and read through it. Never run a script like this on your android without first knowing what it does - especially when the author is telling you that you need root. If you're happy with it, proceed.
Install an terminal emulator of your choice. I personally used this one, and technically an adb shell will work too (but you'll be tethered to your PC...).
Install a VNC Client of your choice. I personally used this one, but there might be better/faster ones out there.
Open the terminal emulator, and execute the following commands:
Code:
su
sh /sdcard/ubuntu.sh
If you see a bunch of errors and get dumped back at the "[email protected]:/ # " prompt, then something went wrong. Report your errors in this thread. Remember, this requires root (and the "su" command to get there, of course).
You'll be prompted for some setup parameters, which you can save at the end for later. Just answer each question and press Enter after each:
You'll need to provide a new password for the "ubuntu" user. A simple passwords like "ubuntu" works, unless you want some security.
Start VNC server? (y/n) - always choose "y". We need this to interact with the device.
SSH server? Optional. If you use it, you should enable it.
Screen size: Enter whatever you want. I personally used 960x540 (one quarter of the S4's screen size) so that I could actually interact with things using the touch screen.
Save settings as defaults? - You might not want to do this until you have a screen size that works best for you.
Once you see the prompt, "[email protected]:~# " - you're in! You now have Ubuntu running in a chroot. As the on-screen instructions suggest, type "exit" at this prompt to end the chroot and Ubuntu. It is recommended to do this when you are done so that the ubuntu.sh script can clean up after itself (unmounting things, etc.).
Leave your terminal emulator app running! Use your Home button to return home and leave it running.
Open you VNC client and connect with the following settings:
Nickname: (whatever you want)
Password: ubuntu
Address: localhost
Port: 5900 (default)
Username: (leave blank)
Color Format: 24-bit color (you can use lower if you want better performance)
Connect. For the VNC app I used, I had to zoom in to make the screen fit correctly (use pinch-to-zoom, and then use the "+" button on-screen). Also, you can play around with the Input Mode some if you wish.
Enjoy Ubuntu!
As you can see, it's not terribly complicated to get this up and running. Once you have set it up the first time, it's a lot smoother from then on out. The script is designed to allow you to use the external SDCard if you wish. Just use place the ubuntu.img in an "ubuntu" folder on your external SDCard, drop the ubuntu.sh on the root of the external SDCard, and use "sh /mnt/extSdCard/ubuntu.sh" instead (don't forget "su"!).
Click to expand...
Click to collapse
Freedreno Chroot Method (NEW):
This long-winded tutorial will explain how you can setup Xubuntu-desktop in a chroot. Before attempting any of this, you should read through all the steps and be sure you're comfortable performing the steps needed.
This requires roughly 2GB free space on your /data partition - the actual finished install is about 1.4GB, but it will require some extra space while it installs Freedreno and other components. HINT: Keep in mind that your /data partition is shared with your internal sdcard (your internal sdcard gets whatever space is leftover at the end of the /data partition), so you can get an idea how much free space you have by looking at how much space your internal sdcard has available.
Instructions:
Step 0 (option A) - Build Custom Kernel
You will need to install a custom kernel that has specific options enabled in the configuration, along with a few patched files in the source code. This list of changes is based on a delta from the stock I337 MF3 kernel, available at http://opensource.samsung.com/. You should be able to apply these changes to "any" kernel that you can build from source, so this documentation may apply to devices other than the I337.
Kernel Mods:
Required config changes:
Code:
CONFIG_DEVTMPFS=y
# CONFIG_DEVTMPFS_MOUNT is not set
CONFIG_DRM=y
CONFIG_MSM_KGSL_DRM=y
# CONFIG_KGSL_PER_PROCESS_PAGE_TABLE is not set
# CONFIG_MSM_KGSL_PAGE_TABLE_COUNT is not set
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_MSM_TRIPLE_BUFFER=y
CONFIG_FB_MSM_DEFAULT_DEPTH_BGRA8888=y
# CONFIG_FB_MSM_DEFAULT_DEPTH_RGBA8888 is not set
Fix for Wi-Fi problems when using MF3 kernel on UCUAMDL bootloaders (i.e. "unadulterated" or "neutered"):
Code:
CONFIG_PROC_AVC=y
Required Patches to kernel source code:
https://github.com/freedreno/kernel-msm/commit/4c0281745f8c85707be88acebb557aca0b8f1dba
https://github.com/freedreno/kernel-msm/commit/228f65d48d4855d903e3b4642179dfa14eedd040
https://github.com/freedreno/kernel-msm/commit/54b510b2e6bccf08fdf3a8ad00a62b27c2f8c1e6
Additional changes required for sudo to work (added 10-25-13 in v4):
Code:
# Samsung Rooting Restriction Feature
#
# CONFIG_SEC_RESTRICT_ROOTING is not set
# CONFIG_SEC_RESTRICT_SETUID is not set
# CONFIG_SEC_RESTRICT_FORK is not set
# CONFIG_SEC_RESTRICT_ROOTING_LOG is not set
Additional changes to the initramfs required for sudo to work (added 10-25-13 in v4):
Edit fstab.qcom, remove the nosuid, part of the line that references userdata.
Step 0 (option B) - Download Custom Kernel Instead
Don't want to compile your own kernel from source? If you have the I337, you can use mine! As mentioned above, this kernel is based on the original MF3 source from Samsung, with the modifications listed above. If you are stuck with MF3+ bootloaders on your I337, you will not be able to install this kernel directly (at the time of this writing). MDB/MDL bootloaders are fine, but you will need to flash loki-doki afterwards (this kernel is not pre-lokified!). This kernel might work with other similar variants (such as the M919), but I haven't tested this on anything except my own I337 daily-driver. YMMV. If you run into issues, you might need to wipe cache/dalvik. This will likely only work with TouchWiz-based ROMs (I have not tried it with AOSP). Here's some downloads for you:
mf3-freedreno-android-boot-v4.zip - CWM/TWRP flashable zip.
- Boots to android, allows Ubuntu with Freedreno to work in a chroot.
- Compiled with the original (slightly modified) MF3 initramfs and "mf3-freedreno-minimum-zImage-v4" (below).
- Includes minimal configuration changes described above, plus the WiFi fix part.
mf3-freedreno-minimum-zImage-v4 - Just the MF3 kernel itself with minimal changes to get the chroot to work.
mf3-freedreno-minimum-config-v4 - Yeah, that's right. I'm providing the .config files I used for all of this.
Step 0.5 - Install the Kernel
Before you can start up the chroot properly, you'll need to have the custom kernel installed. You don't want the "ubuntu-boot" version right now, because you don't have an Ubuntu install to boot to. If you're using my pre-built kernel, first flash mf3-freedreno-android-boot-v4.zip and then flash loki-doki.zip.
Step 1 - Companion Files
Download this file: mf3-freedreno-companions-v4.zip - Non-flashable zip. This includes the script files, which you should promptly read through both u.sh and launch.sh. It is always good practice to read through any script file you get from the internet, making sure it's doing what you would expect it to. Also check out CREDITS.txt, which includes information about the included upstart-dummy.tar.gz and start-stop-daemon files.
Extract the companion files .zip and place its contents on the root of your internal sdcard (/sdcard/). Don't extract the contents of upstart-dummy.tar.gz. This is your $src directory. You can change this if you wish (see script for details).
Step 2 - Install/Configure Ubuntu
Install an terminal emulator of your choice. I personally used this one, and technically an adb shell will work too (but you'll be tethered to your PC...). At the console/shell, type the following two commands:
Code:
su
sh /sdcard/u.sh bash
The script will download Ubuntu Core and install Freedreno, upstart-dummy, and lubuntu-desktop. Total download size will be around 425MB. Total install time will vary, but count on it taking at least 45 minutes to install and configure everything. At the very end, you'll be prompted to enter a password for the new user "ubuntu".
Step 2.5 - Exit ubuntu
When you see the message "Type 'exit' (without quotes) to leave ubuntu," the install is complete. You'll notice that your prompt changed to "[email protected]". This is the easiest way to confirm that you're actually inside the ubuntu chroot. Type exit and hit Enter to get back to android.
Step 3 - Fire it up!
From now on, you can start Ubuntu using u.sh in any of these three ways:
sh /sdcard/u.sh - This will make initial prep, STOP android (black screen), launch the chroot, install/configure if needed, and will execute "service lightdm start". This will give you the greeter and you can login as "ubuntu". If the lightdm service stops for whatever reason (see info about the home button below), the script will continue by exiting the chroot and rebooting your device.
[*]sh /sdcard/u.sh bash - Same as above, except that it will not stop android, not startx (will give bash shell instead), and will not reboot your phone when you exit the shell.
[*]sh /sdcard/u.sh destroy - This will do exactly as it sounds - destroy your ubuntu installation. This will unmount your /sdcard from ubuntu (if still mounted somehow) and then recursively delete your ubuntu installation. If you change the source or destination directories in the main script, you should be careful deleting things.
NOTE: Remember to ALWAYS run any these from a root shell, whether via terminal emulator, via adb shell, or using SManager (or similar).
Step 4 - Note the Home Button and Touchpad
Take note that any time you have X running via lightdm, the hardware Home button will kill the X server. This is intentional, and will exit the chroot and reboot your phone. You'll also notice that currently, the touchscreen acts like a giant touchpad (like on a laptop). Use two fingers to right-click or scroll. Direct touchscreen input is not available at this time due to a segmentation fault that evdev causes when used on this device in a chroot.
Step 5 - (optional) Make Changes and Do it All Over Again
Customize the crap out of it! Edit my u.sh, launch.sh or xorg.conf and have fun. If you find great improvements, please post them in this thread! In future revisions, I might include them. Things should be well documented within the scripts. You might even change the bit at the end of launch.sh that starts "service lightdm start&" instead of "startx" - this would give you the greeter and let you login as the user "ubuntu" if you want. Also note that those three files are the only ones that must remain in your $src directory if you wish to continue to run this as a chroot. By the way, booting directly to Ubuntu after it is installed does not require any of the companion files anymore.
Click to expand...
Click to collapse
Native Boot Method (NEW):
This part of the tutorial is for those who wish to take things a step further and boot your device directly into Xubuntu-desktop. This will require that you setup the Freedreno chroot properly, and then you'll be installing a new boot.img. While this doesn't replace your /system partition, you won't be able to boot directly into Android while you have this boot.img installed.
Instructions:
Step 1 - Install Ubuntu
Basically, you need to perform all the steps for the Freedreno Chroot method, and get that up and running first. All you're doing here is swapping out your kernel.
Step 2 (option A) - Build Custom Kernel
You'll need all of the kernel customizations included in the freedreno chroot method, plus these listed below:
NOTE: You will need some proprietary blobs, which can be found on your device in the /etc/firmware directory.
Config changes to enable booting directly into Ubuntu (beyond replacing the initramfs...):
Code:
CONFIG_EXTRA_FIRMWARE_="audience-es325-fw.bin a300_pm4.fw a300_pfp.fw vidc_1080p.fw"
CONFIG_CMDLINE="console=tty0 fbcon=vc:0-3"
# CONFIG_CMDLINE_FROM_BOOTLOADER is not set
CONFIG_CMDLINE_EXTEND=y
# CONFIG_CMDLINE_FORCE is not set
Optional config changes to enable the framebuffer console when booting directly into Ubuntu - useful for debugging.
Code:
CONFIG_VT_CONSOLE=y
CONFIG_VT_CONSOLE_SLEEP=y
CONFIG_VT_HW_CONSOLE_BINDING=y
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
CONFIG_FRAMEBUFFER_CONSOLE=m
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_FONTS is not set
NOTE: You will need to grab some .ko files that are created, which must be loaded in the following order:
Code:
insmod /ko/font.ko
insmod /ko/softcursor.ko
insmod /ko/bitblit.ko
insmod /ko/fbcon.ko
I recommend that you include these four lines into the init script that is included in the ubuntu ramdisk. These can go pretty much anywhere after the ". /scripts/functions" part, but before it calls out to run-init. Also, don't forget to drop those .ko files into a new /ko directory in the initramfs. If you want to load these with modprobe, I'll leave that up to you (good luck).
Replace the entire ramdisk/initramfs:
At this time, I'm not going to provide instructions on how to do this. You'll need this mako boot.img straight from Ubuntu, repacked with the zImage created here. For what it's worth, the re-pack tool I'm using includes --cmdline 'androidboot.hardware=qcom user_debug=31 zcache', but I'm not sure if that's needed (especially considering our kernel seems to use qcache?). Anyways, good luck.
Step 2 (option B) - Download Custom Kernel Instead
Again, if you don't want to compile your own kernel from source, you can download mine and use it. The same warnings and restrictions apply as they do in Step 0 (option B) of the Freedreno Chroot method. And here's your downloads:
mf3-freedreno-ubuntu-boot-v4.zip - CWM/TWRP flashable zip.
- Boots to Ubuntu directly, but only if your Ubuntu install is located at /data/ubuntu (Default).
- Compiled with the original MF3 initramfs and "mf3-freedreno-everything-zImage-v4" (below).
- Includes all configuration changes described above.
mf3-freedreno-everything-zImage-v4 - Just the MF3 kernel itself with all changes for both chroot and direct booting to Ubuntu.
mf3-freedreno-everything-config-v4 - Yet again, I'm providing my complete .config file for this.
Step 3 - Install the Kernel
Here's the easy part. Flash your completed boot.img, flash loki-doki, and reboot. If you're using my pre-built kernel, first flash mf3-freedreno-ubuntu-boot-v4.zip and then flash loki-doki.zip.
Click to expand...
Click to collapse
Flashable Zip Method (NEWEST):
It's finally finished: a flashable .zip that you can use to dump a pre-built rootfs onto your data partition. This will still require that you flash one of the two custom kernels (whether for chroot or native booting), but it will allow you to skip the whole build/install process.
ubuntu-install-v4.zip - CWM/TWRP flashable .zip. Requires approx 2GB free space on your data partition during install, and the final install size is approximately 1.3GB (may want more free space to add your own programs/etc.). Output folder is /data/ubuntu. This can be changed in u.sh, but heed the warnings within!
Instructions:
Instructions for Chroot-style Ubuntu:
Download the "companions" .zip and extract its contents to the root of /sdcard.
Download the "ubuntu-install" .zip to your internal or external SDCard.
Download the "mf3-freedreno-android-boot" .zip to your internal or external SDCard.
Make a nandroid backup of your phone, and store it on an external SDCard or your computer. Always a good idea to have this.
Install the "ubuntu-install" and "mf3-freedreno-android-boot" .zip files, followed by loki-doki.zip if you need that for your device (e.g. I337).
Restart and resume with Step3 of the Freedreno Chroot Method.
Instructions for Native Boot Ubuntu:
Download the "ubuntu-install" .zip to your internal or external SDCard.
Download the "mf3-freedreno-ubuntu-boot" .zip to your internal or external SDCard.
Install the "ubuntu-install" and "mf3-freedreno-ubuntu-boot" .zip files, followed by loki-doki.zip if you need that for your device (e.g. I337).
Restart and let it start into Ubuntu!
NOTE: The username is "ubuntu" and the password is also "ubuntu" - it is highly recommended that you change this ASAP.
Click to expand...
Click to collapse
Known Issues/Bugs:
Below is the list of known issues that I can think of, from the top of my head. This will probably be updated later as everyone points stuff out. Some issues only apply to some of the methods, so the applicable methods are listed in parenthesis after each.
Sound has not been tested (freedreno/native)
3D graphics or OpenGL support has not been tested (all)
Some applications don't work in a headless environment (vnc)
Some applications don't like to run as root, such as chromium (freedreno) lightdm is working in companions-v3, so no need to login as root anymore
Onboard is not working (freedreno/native) fixed in companions-v3
sudo does not work (all) fixed in kernel-v4 for freedreno/native, but problem remains for (vnc) if you are not using a custom kernel
A few kernel Oops's (native)
Shutdown menu doesn't always work (freedreno/native) fixed partly in companions-v4 - proper locale settings seem to allow the shutdown menu to work once you are logged in
Performance issues due to VNC connection (vnc)
No 3G/WiFi/network connection that I'm aware of... (native)
No control over 3G/WiFi/network/bluetooth yet (all)
Xorg's normal touchscreen driver evdev causes segmentation faults (freedreno/native)
Working on a possibly trying to get fbdev to work natively without Freedreno for simplicity (freedreno/native)
Anything you'd normally expect from a phone does not exist (freedreno/native)
Screen rotation (with or without accelerometer) doesn't work yet (freedreno/native)
HDMI/MHL output remains untested at this time. I got it to briefly work once, but I need to revisit this. (freedreno/native)
Many more to come, I'm sure...
Click to expand...
Click to collapse
To-Do:
Add mirrors to the download links.
Add a CWM/TWRP-flashable .zip that just dumps a clean Ubuntu install onto your data partition. This should be easy enough. completed!
Fix some of the bugs above.
Simplify the launch.sh and xorg.conf files. The u.sh script seems pretty solid.
Develop a method that works with only fbdev. This method might eliminate the possibility of 3D acceleration, but should enable screen rotation and other nifty things.
Possibly look into getting kexec (or similar) to work on the Galaxy S4 to offer a dual-boot option. Low priority at the moment, because flashing a kernel back and forth is pretty easy stuff.
Get Ubuntu Touch to work. This would eliminate a lot of bugs. I mostly need to just buckle-down and build CM10.1 from source, and then slowly visit each step of the Ubuntu Touch boot process.... Ugh.
Rebuild Freedreno to try to get Mesa/Gallium3D working properly. I'm probably going to need a lot of help from Rob Clark on this one!
More to come...
Click to expand...
Click to collapse
Revision History:
[11-13] mf3-freedreno-companions-v2.zip - Updated launch.sh: added some error checking and fixed the Freedreno build process.
[11-15] mf3-freedreno-companions-v3.zip - Updated launch.sh to include onboard and English language. Removed florence and xvkbd. Removed .keyb script. Added sudo. Simplified upstart-dummy, and included new upstart-dummy.tar.gz. Prepped for new flashable .zip method.
[11-26] mf3-freedreno-companions-v4.zip - Updated launch.sh: included fix for onboard so that it should work anytime lightdm is launched, added some bits for sudo to work, and home button now kills lightdm (not just the Xsession); Updated u.sh: Added check for root, added notes about sudo and nosuid.
[11-26] mf3-freedreno-android-boot-v4.zip & mf3-freedreno-ubuntu-boot-v4.zip - Finally fixed sudo! See kernel mods sections for details.
[11-26] ubuntu-install-v4.zip - rebuilt with new companions.
Click to expand...
Click to collapse
Aou said:
Check out this app: SManager (Script Manager). It makes running the ubuntu.sh or u.sh a whole lot easier, plus you can send it into the background (vnc method only). Just remember to jump back into SManager later, use the Menu Key and open the console to be able to kill the ubuntu.sh. You can also add "bash" as an additional argument (freedreno method only). This seems to be an effective replacement for the Terminal Emulator. Don't forget to choose the "su" option to run either script as root.
Click to expand...
Click to collapse
I have literally spent hundreds of hours working on this project, and many more hours documenting it thoroughly - just so that I could share it with all of you. If you found this guide, custom kernel or scripts to be beneficial, please hit the THANKS button on this post.
This mostly works, but I think I may have made an error. I see it starting the sshd, but not VNC server. I can call vncserver, but when launching the vnc client app I just get stuck at "Establishing Handshake" until it times out. This differs from when I don't call vncserver, where I get immediately connection refused.
I'm going to redownload the image and start from scratch, but the image isn't very friendly when I'm trying to figure out how to rerun the initial configuration script...
On my S4 running OTA-MF3 with root, this didn't work for me until i used Busybox Installer from the market. Tried internal and external without it, neither worked. Only thing that looked like an error after that was
Code:
chown: cannot access '/external-sd/': no such file or directory
but this only showed the first time I ran it. Opened VNC connection just fine from my computer to the phone, and though there was slight graphics glitching (orange and red boxes on desktop) it worked just fine and they didn't interfere. Thanks for this!
Tsaukpaetra said:
This mostly works, but I think I may have made an error. I see it starting the sshd, but not VNC server. I can call vncserver, but when launching the vnc client app I just get stuck at "Establishing Handshake" until it times out. This differs from when I don't call vncserver, where I get immediately connection refused.
I'm going to redownload the image and start from scratch, but the image isn't very friendly when I'm trying to figure out how to rerun the initial configuration script...
Click to expand...
Click to collapse
It's not, I agree. I found that the easiest way to clear the configuration and start anew is to do the following from the "[email protected]" prompt (that is, within ubuntu):
Code:
rm /root/DONOTDELETE.txt
rm /root/cfg/linux.config
DeadlySin9 said:
On my S4 running OTA-MF3 with root, this didn't work for me until i used Busybox Installer from the market. Tried internal and external without it, neither worked. Only thing that looked like an error after that was
Code:
chown: cannot access '/external-sd/': no such file or directory
but this only showed the first time I ran it. Opened VNC connection just fine from my computer to the phone, and though there was slight graphics glitching (orange and red boxes on desktop) it worked just fine and they didn't interfere. Thanks for this!
Click to expand...
Click to collapse
Interesting. I looked through the image's init.sh, and found something that's relatively new (wasn't in beta):
Code:
# Fix for sdcard read/write permissions by Barry flanagan
chown ubuntu /external-sd/
As far as I can tell, that message is harmless. It's only included in the initial configuration, as it's in the section:
Code:
if [ ! -f /root/DONOTDELETE.txt ]
As for the need to download/install the BusyBox installer, that's not surprising at all. I've had so much trouble BusyBox ever since I switched to MF3. I might include this as an extra step in the OP - thank you.
You kidding right...does this really work? To cool, thanks Aou. Great work.
TheAxman said:
You kidding right...does this really work? To cool, thanks Aou. Great work.
Click to expand...
Click to collapse
Yessir, it does indeed work! The S4 handles it very nicely with the extra RAM & CPU it has to spare, so the only limiting factor is VNC. If someone could devise a way to get Ubuntu to draw directly on the screen from within that Chroot, that would be perfect. I don't think it's really possible by design, but this might be the closest we get to running native linux on the I337 until we see some unlocked bootloaders.
Thanks
Aou said:
Yessir, it does indeed work! The S4 handles it very nicely with the extra RAM & CPU it has to spare, so the only limiting factor is VNC. If someone could devise a way to get Ubuntu to draw directly on the screen from within that Chroot, that would be perfect. I don't think it's really possible by design, but this might be the closest we get to running native linux on the I337 until we see some unlocked bootloaders.
Thanks
Click to expand...
Click to collapse
In fact I am currently working on getting xorg to write to androids frame buffer which will mean no more vnc
Sent from my Nexus 4 using xda premium
zacthespack said:
In fact I am currently working on getting xorg to write to androids frame buffer which will mean no more vnc
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
You, sir, are the man. thank you so much for working on this! I threw $10 at you to help fund the skittles/cheetos/carrots/beer/pizza/whatever it takes to help you along.
Added a couple things to the OP. Looks like pure-stock roms will indeed need BusyBox installed, by some means or another. Also, found SManager, which makes executing the ubuntu.sh script much, much easier.
The second script that allows me to launch ubuntu, but the first that allows me to get a real X server on my vnc. Thank you so much !
PS: Why am I unable to install wine ?
"Package wine is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source"
This is working pretty good, slow though, do I have it setup right, or did I miss something?
TheAxman said:
This is working pretty good, slow though, do I have it setup right, or did I miss something?
Click to expand...
Click to collapse
I have found it to run a bit slow, and with regular crashing of GUI programs too. Is it just slow or unusable? You can always try closing other apps besides terminal and VNC, or try to VNC from a computer even.
tboss1995 said:
The second script that allows me to launch ubuntu, but the first that allows me to get a real X server on my vnc. Thank you so much !
PS: Why am I unable to install wine ?
"Package wine is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source"
Click to expand...
Click to collapse
Looks like you're not the only one. Check out this thread on the LinuxOnAndroid site:
http://forum.linuxonandroid.org/index.php?topic=268.0
TheAxman said:
This is working pretty good, slow though, do I have it setup right, or did I miss something?
Click to expand...
Click to collapse
DeadlySin9 said:
I have found it to run a bit slow, and with regular crashing of GUI programs too. Is it just slow or unusable? You can always try closing other apps besides terminal and VNC, or try to VNC from a computer even.
Click to expand...
Click to collapse
Most of the slowness comes from interacting with it via VNC, it would seem. Hard to compare to anything else, considering VNC is all we've got at the moment. I wonder if @zacthespack can shed some light on this. As he mentioned before, he's working on getting it to draw directly to the Android screen. I'm certainly not going to ask for any status updates, but I'm wondering if he can confirm that we'd see a speed increase without VNC...
EDIT: Also, as I use it more, I am noticing the app crashes too (such as Chromium). Could just be something in the 13.04 image, but also could be because we're running this all on ARM architecture.
Aou said:
Looks like you're not the only one. Check out this thread on the LinuxOnAndroid site:
http://forum.linuxonandroid.org/index.php?topic=268.0
Most of the slowness comes from interacting with it via VNC, it would seem. Hard to compare to anything else, considering VNC is all we've got at the moment. I wonder if @zacthespack can shed some light on this. As he mentioned before, he's working on getting it to draw directly to the Android screen. I'm certainly not going to ask for any status updates, but I'm wondering if he can confirm that we'd see a speed increase without VNC...
Click to expand...
Click to collapse
RE installing WINE, sure you can install the ARM verson but Wine is not a emulator (infact WINE stands for Wine Is Not a Emulator) so you can only run ARM compiled windows software.
Yest there is a good speed increase, as with VNC xorg writes to the vnc server and passes it to the vnc client to then render on the screen.
With the new method xorg just writes to Androids frame buffer, no inbetween man.
And it can get even faster once we have graphics accelerations although not all chip sets will get that.
zacthespack said:
RE installing WINE, sure you can install the ARM verson but Wine is not a emulator (infact WINE stands for Wine Is Not a Emulator) so you can only run ARM compiled windows software.
Click to expand...
Click to collapse
Good point, forgot about that. It's really just a big package of Windows dependencies, responding to API calls, etc. The software that Wine runs is still sending stuff to/from the processor directly, therefore it would have to be compiled for ARM.
I wonder what Windows8 programs are available that are compiled for ARM (because of the Microsoft Surface and all...).
Aou said:
Good point, forgot about that. It's really just a big package of Windows dependencies, responding to API calls, etc. The software that Wine runs is still sending stuff to/from the processor directly, therefore it would have to be compiled for ARM.
I wonder what Windows8 programs are available that are compiled for ARM (because of the Microsoft Surface and all...).
Click to expand...
Click to collapse
There's plenty or ARM software within the built in app store, but I'm not sure where they install to or how one would go about extracting them. I have it on desktop and it shows what processors it runs on. Can't wait for the straight to screen function though
Also, I'm going to see if a different image is more stable. Chromium was the most obvious crashing for me and others generally crashed.
DeadlySin9 said:
There's plenty or ARM software within the built in app store, but I'm not sure where they install to or how one would go about extracting them. I have it on desktop and it shows what processors it runs on. Can't wait for the straight to screen function though
Also, I'm going to see if a different image is more stable. Chromium was the most obvious crashing for me and others generally crashed.
Click to expand...
Click to collapse
I noticed that with 12.04, it doesn't seem to connect to Xorg or something, because when you use VNC, it only shows a grey screen with a cross cursor. Same for both "Lite" and "Full" packages. Haven't tried older (10.x) packages of Ubuntu.
The other Linux images should work just fine. Optionally, you can edit the ubuntu.sh script to be more appropriate, but it should theoretically work the same (unless the init.sh is located elsewhere inside the image...).
I tried the Ubuntu 10 image and the Debian image but ubuntu didn't run vnc (vncserver not found or something) and debian kept saying I didn't have permissions.
It appears chromium is incredibly unstable on this image, so I've uninstalled it.
I'm currently working on trying to get Minecraft to work, but ever since 1.6.2 and this new launcher, it's incredibly difficult to modify the client files and such. Something is going wrong with liblwjgl.so. I can get the launcher to work correctly, but when it goes to load the game, it can't find liblwjgl.so and says that it might be because of 32bit vs ARM. I did get lwjgl installed correctly, and pulled the ARM version of the .so and stuck it in [what I believe was] the right .jar file, but it still has the error.
I'll keep you all posted. If I can get this to work, and if zacthespack can get xorg to draw on the android screen, ... :good:
EDIT:
Found out that every time the launcher runs minecraft, it downloads several libraries and other crap to run the game, to keep itself current and to support multiple versions, yada, yada. Unfortunately, this means that it downloads https://s3.amazonaws.com/Minecraft..../2.9.0/lwjgl-platform-2.9.0-natives-linux.jar every time you click Play, and overwrites any custom one you might have (i.e. one with ARM libraries inside). I tried revoking write access to the file, but then the launcher aborts the launch because it can't overwrite the file.
Any suggestions?
EDIT #2:
Well, the easy solution was to modify the file, run the launcher, disconnect mobile data temporarily, and then launch the game ("couldn't connect to server .... have local copy of file .... assuming it's good...."). No more errors about that stupid library file. However, the game immediately crashes now with an error report. Investigating this now. PROGRESS!
Problem
I'm aware I may need to modify the script in order to accommodate my setup, but I figured I'd post here first before changing anything in case someone else had a similar problem and came up with the solution.
I followed all the instructions, except I want to boot from an external USB stick (mounted using StickMount).
I reviewed the script, dropped it on the root of the USB stick, and copied the unzipped image to a folder named ubuntu.
Here is the output when I run the script:
Making mount points and mounting to them...
mount: mounting /dev/loop20 on /data/local/ubmnt failed: Operation not supported
mount: mounting devpts on /data/local/ubmnt/dev/pts failed: No such file or directory
mount: mounting proc on /data/local/ubmnt/proc failed: No such file or directory
mount: mounting sysfs on /data/local/ubmnt/sys failed: No such file or directory
Connecting to /sdcard...
mount: mounting /sdcard on /data/local/ubmnt/sdcard failed: No such file or directory
Putting in some settings...
net.ipv4.ip_forward = 1
/sdcard/usbStorage/sda1/ubuntu.sh[19]: can't create /data/local/ubmnt/etc/resolv.conf: No such file or directory
/sdcard/usbStorage/sda1/ubuntu.sh[20]: can't create /data/local/ubmnt/etc/resolv.conf: No such file or directory
/sdcard/usbStorage/sda1/ubuntu.sh[21]: can't create /data/local/ubmnt/etc/hosts: No such file or directory
ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
(You will see an error about wlan0 if your WiFi is disabled. Safe to ignore.)
----------------- OKAY, starting Ubuntu! -----------------
chroot: can't execute '/root/init.sh': No such file or directory
----------------- Ubuntu has exited! -----------------
Cleaning up - unmounting everything and removing what we made...
umount: can't forcibly umount /data/local/ubmnt/dev/pts: No such file or directory
umount: can't forcibly umount /data/local/ubmnt/sys: No such file or directory
umount: can't forcibly umount /data/local/ubmnt/proc: No such file or directory
umount: can't forcibly umount /data/local/ubmnt/sdcard: No such file or directory
umount: can't forcibly umount /data/local/ubmnt: Invalid argument
Welcome back to your android.
Click to expand...
Click to collapse
I am running as root, BusyBox free has been installed. My terminal app has been granted root privileges. The path to the USB stick is sdcard/usbStorage/sda1.
Any help/guidance would be greatly appreciated! :fingers-crossed:

[How To][Linux] Optware + ssh + samba + transmission + flexget

Yep, you read that correctly. I have optware, ssh, samba, transmission, and flexget working on my Minix X5 Mini. This should work for any rooted device which has an adb connection enabled. This will work on the original ROM. In fact, I use the stock ROM. For those not using a Minix device this should work on any ARM device. Sorry but all the binaries are built on ARM.
JUST AS EVERY OTHER DEVELOPER: I AM NOT RESPONSIBLE IF YOU BRICK YOUR DEVICE! MAKE A BACKUP!
Requirements:
Linux box with adb (don't ask me about windows, I don't support bad habits)
clockworkmod (for a backup)
root
internet connection
Process:
Make a backup of your ROM!
Download files (gitHub)
You have two options here:
Download the zip via https://github.com/erichlf/AndroidSeedBox/archive/master.zip and unzip it.
Clone the repo using git via 'git clone [email protected]:erichlf/AndroidSeedBox.git'
Make script executable
chmod +x optware-etc.sh
Obtain adb connection to device (covered in another thread)
Gain root access on local machine (adb seemed to require this for things to work)
sudo su
Run script and follow directions
./optware-etc.sh
Use SManager to run /opt/home/root/sysinit at every restart.
Notes:
The script can be modified to change the various programs that I install. You could exchange transmission for deluge for example.
Transmission can be accessed from the minix through localhost:9091 or from some other machine using your ip-address and the port 9091. If that doesn't work you should edit the config file located at /opt/home/root/.config/transmission-daemon/settings.json
username: root
password: you provided this in the install script
Without SManager nothing will start automatically. However, if you have a ROM which has init.d support you can move the scripts in /opt/etc/init.d to /etc/init.d I would suggest maybe linking the two instead of just moving the scripts or possibly adding a script to /etc/init.d which runs the items in /opt/etc/init.d The reason is because when installing things using ipkg the startup scripts will be placed in /opt/etc/init.d and not /etc/init.d However, it is extremely important that optware is started, and this is partly what sysinit accomplishes.
To list available packages
ipkg list
To install a new package use the command
ipkg install <new package>
To remove a package use the command
ipkg remove <package to remove>
cron is weird and I couldn't get it to work like it should, but I got it to work
While on the Android device (ssh or terminal emulator)
Create a .crond file in the home directory of your device (/opt/home/root/) with some schedule in it. Remember to leave a blank line at the end of the file.
Tell cron about the .crond file
crontab -u root /opt/home/root/.crond
Make sure cron sees the cron file
crontab -l
If you want to edit your cronfile use a text editor and edit the file directly and then tell cron about the file again.
Many things are installed in what seem like strange places, so use
which <binary you are looking for>
Feel free to help develop the code. I think what would be best is an update.zip or a CWM flashable zip. Right now I don't know how to do this, but once I get more time I will look into it. So, any help on this front is welcomed.
Enjoy!
I really wish you would have kept the repo up. It seems kind of pointless to go through all that trouble just to delete the repo and leave people wondering what you did.
I have been busy and didn't update this particular post, since there had been no activity on it.
git clone [email protected]:erichlf/androidseedbox.git
https://bitbucket.org/erichlf/androidseedbox/get/master.zip
Sorry, I didn't need to be rude. I was just excited to find this and then sad when it was gone. Thanks for pointing me in the right direction!

[ROOT][FILESYSTEM]Full 500MB SuperSU rooted Root.fs for BlueStacks

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.
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!
Code:
[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.
Code:
[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:
Code:
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
Can you explain the steps to root my version manually instead of downloading a 500mb file, if not possible then can you please provide a mirror since Adrive gives Public File Busy error all the time to me?
Thanks
Edit:
Never mind, ignore it. Got it now. Although it's better if you could provide mirrors for others as Adrive is giving problems. I had to download using a premium downloader.
nicesoni_ash said:
Can you explain the steps to root my version manually instead of downloading a 500mb file, if not possible then can you please provide a mirror since Adrive gives Public File Busy error all the time to me?
Thanks
Edit:
Never mind, ignore it. Got it now. Although it's better if you could provide mirrors for others as Adrive is giving problems. I had to download using a premium downloader.
Click to expand...
Click to collapse
Still want instructions, then?
Cause I wrote down the steps I took, so I could easily paste them here (and adapt them a little for others to read, of course. ).
Grtz,
~ Nephatiu
Sure go ahead if you already wrote them down. It will be useful since it's a separate thread then your other post where you put these download links. The only thing messing up my plans right now is to download that portable linux for 1+gb file so for now I have downloaded your files and they work great, I will make them manually next time when there will be a new bluestack update.
Thanks
Rewritable initrd.img (1.3MB)
Rooted Root.fs (500MB)
Click to expand...
Click to collapse
Don't work this url...
nicesoni_ash said:
Sure go ahead if you already wrote them down. It will be useful since it's a separate thread then your other post where you put these download links. The only thing messing up my plans right now is to download that portable linux for 1+gb file so for now I have downloaded your files and they work great, I will make them manually next time when there will be a new bluestack update.
Click to expand...
Click to collapse
Okay, I'll add it in the original post,... ;p
Grtz,
~ Nephatiu
New Version
Version 0.8.2.3018 is out.
I accepted the update & Root Checker Pro says I still have root.
SuperSU updated
SuperSU just updated a few hours ago. Problems to update the apk. Could someone please update Root.fs and initrd.img with the new superSU apk.
Thank you
0.8.2.3018 updates and root is still there except the root apk is gone as the Root.fs has been replaced.
Almighty2 said:
0.8.2.3018 updates and root is still there except the root apk is gone as the Root.fs has been replaced.
Click to expand...
Click to collapse
I'll be adding my new Root.fs here later today. Just got back from a few days trip, and first of all I need some sleep, but when I wake, I'll get right to it.
Grtz,
~ Nephatiu
Nephatiu said:
I'll be adding my new Root.fs here later today. Just got back from a few days trip, and first of all I need some sleep, but when I wake, I'll get right to it.
Grtz,
~ Nephatiu
Click to expand...
Click to collapse
If possible could the root files be compressed before theyre uploaded by any chance in .7z? it would half the download size from 500MB to around 256MB, im sure the many with sucky internet speeds would appreciate it >.<
Hope you enjoyed le trip ~
Chakkas said:
If possible could the root files be compressed before theyre uploaded by any chance in .7z? it would half the download size from 500MB to around 256MB, im sure the many with sucky internet speeds would appreciate it >.<
Hope you enjoyed le trip ~
Click to expand...
Click to collapse
Good idea. I don't know why I didn't do that in the first place...
Ah, well, I'll 7zip them and up them again,...
Grtz,
~ Nephatiu
Great!!, you update with the last version of bluestacks, but supersu.apk is still version 1.69. Could you please update with SuperSU version 1.75. This is the last one.
Thanks!!
huisterduin said:
Great!!, you update with the last version of bluestacks, but supersu.apk is still version 1.69. Could you please update with SuperSU version 1.75. This is the last one.
Click to expand...
Click to collapse
Why? What's so new about it? This one works and was already unpacked to me. (Lazyness ftw. ;p) Also, it's still the last one available on Google Play Store, since it doesn't want to update, so I'm guessing that it's probably not that much of an update. (Haven't checked though. )
And I don't see why you wouldn't be able to upgrade it yourself... Just install the new SuperSU (replace other in system/app or install in data and don't touch system/app, your choice.
I'll see what I can do next release.
Grtz,
~ Nephatiu
1.75 has actually been available on Google Play Store since November 20, 2013 and these are the changes:
What's New
- Fixed OTA survival 4.3 --> 4.4
- Fixed unresponsive tabs on 2.x devices
- Fixed white flicker when using dark theme
- Fixed issue with language resetting on some firmwares
- Fixed upgrading from CWM SU to SuperSU on 4.3+ without reboot
- Added mgyun root (vroot) uninstall procedure
- Added xxhdpi and xxxhdpi icons (if available)
- Stop touching .has_su_daemon
- Several dozen security hardening commits (mini-audit by Kevin Cernekee)
- Fixed issues with sd-ext based ROMs
- Updated language files
Except from reading the thread, 1.75 still has problems with some devices as some people have lost root trying to upgrade according to the xda thread so better wait for a stable version before replacing it. 1.69 is fine as long as swiping works across the tabs and the request for su prompt comes up as that was what people were complaining about in 1.69.
I'll test to see if 1.75 works by upgrading once I finish downloading since installing rhe apk is the easy part, it's updating the su binary that is always the problem with SuperSU.
Almighty2 said:
1.75 has actually been available on Google Play Store since November 20, 2013 and these are the changes:
Click to expand...
Click to collapse
Ok, strange, I checked yesterday on BlueStacks, right before posting my answer (to make sure). I opened Play Store on it, looked up SuperSU (had to go through the whole 1-click setup again, even ) and it said: Open and Uninstall... No update.
I'll admit I did wanted it not to be, so I had a proper excuse next to me being lazy, but I swear to you, I checked and there wasn't. Not on my BlueStacks, anyway. Haven't checked my phone, since there was no version numbering to be found in their "What's New", so I had no way to check it there without first installing it.
Almighty2 said:
- Fixed OTA survival 4.3 --> 4.4
- Fixed unresponsive tabs on 2.x devices
- Fixed white flicker when using dark theme
- Fixed issue with language resetting on some firmwares
- Fixed upgrading from CWM SU to SuperSU on 4.3+ without reboot
- Added mgyun root (vroot) uninstall procedure
- Added xxhdpi and xxxhdpi icons (if available)
- Stop touching .has_su_daemon
- Several dozen security hardening commits (mini-audit by Kevin Cernekee)
- Fixed issues with sd-ext based ROMs
- Updated language files
Click to expand...
Click to collapse
This was indeed what it said when I checked for the update on BlueStacks,... But it did not give me the Update button, just the Open button, so I expected it to have been the 1.69 release adding those stuff... (I don't really follow SuperSU, so for as far I knew, it could have been and would've easily be explained by the '.su' file and the 'otasurvival' zip in 1.69... ;p)
Almighty2 said:
Except from reading the thread, 1.75 still has problems with some devices as some people have lost root trying to upgrade according to the xda thread so better wait for a stable version before replacing it. 1.69 is fine as long as swiping works across the tabs and the request for su prompt comes up as that was what people were complaining about in 1.69.
Click to expand...
Click to collapse
Apart from the fact it didn't even want to update in my Market,...
Almighty2 said:
I'll test to see if 1.75 works by upgrading once I finish downloading since installing rhe apk is the easy part, it's updating the su binary that is always the problem with SuperSU.
Click to expand...
Click to collapse
You think SuperSU won't be able to update, when it's already the main superuser app? I understand the problems when changing with apps from other users you have no control over, but not over one's own stuff...
Why is this SuperSU app so wanted anyway? It seems to have more bugs than any other... And 99% of the time you're just going to push "Allow" anyway...
Grtz,
~ Nephatiu
The version numbering is always under the description in Google Play Store. I downloaded the Root.fs and initrd.img and just tried to update to SuperSU 1.75 and just as I had suspected, installation of the su binary failed. CWM's Superuser installs but the su binary on that one seems to be dead as it doesn't prompt and one can't even su in terminal mode with all versions released after the CWM Superuser you included in the earlier BS Root.fs.
As for SuperSU, here is the comparison and I think both CWM and SuperSU are good, it's just the original Superuser that sucks...
Superuser, the original by chainsdd, is open source, and has been used the longest. The problem is that it has been outdated and it required work to get it on 4.2
SuperSU is a closed source app from chainfire, a well known developer. Its got a ton of options and its well made. This one was made because of the issues in the original superuser app. Lots of people personally use this one.
Superuser by koush was designed to make a working superuser app, that was open source. It comes built into the settings menu of AOKP and Cyanogenmod.
Almighty2 said:
The version numbering is always under the description in Google Play Store. I downloaded the Root.fs and initrd.img and just tried to update to SuperSU 1.75 and just as I had suspected, installation of the su binary failed. CWM's Superuser installs but the su binary on that one seems to be dead as it doesn't prompt and one can't even su in terminal mode with all versions released after the CWM Superuser you included in the earlier BS Root.fs.
Click to expand...
Click to collapse
Always wondered where that info was... It somehow feels like it should have a more obvious place. And although this seems to be the official place for it, indeed, it's often mentioned in What's New too,... Anyway, I know now, and I can clearly see version 1.75, but then I wonder why I didn't get the Update button in BlueStacks? Because that's the main thing I took as evidence.
Almighty2 said:
As for SuperSU, here is the comparison and I think both CWM and SuperSU are good, it's just the original Superuser that sucks...
Superuser, the original by chainsdd, is open source, and has been used the longest. The problem is that it has been outdated and it required work to get it on 4.2
SuperSU is a closed source app from chainfire, a well known developer. Its got a ton of options and its well made. This one was made because of the issues in the original superuser app. Lots of people personally use this one.
Click to expand...
Click to collapse
Yeah, I was along with everybody else to change and change it every ROM again,... But then CM began to build in theirs (as did AOKP), and it didn't actually bother me, had the same functionality (notification per app settings and such...) and has a much nice clear popup, imho, where as SuperSU has that small white one which still looks Gingerbreadlike. ;p So, again, in my eyes as I did before, I moved on. Some people tend to get stuck with their first change, they never change again, that's why I ask why SuperSU would be better, if it's such a mess even updating it... ;p As I remember CWM's su updated just fine, even on BlueStacks... Dunno if it could handle SuperSu, though, but if it didn't I'd expect it to be more SuperSU's fault than CMWsu's. ;p
Almighty2 said:
Superuser by koush was designed to make a working superuser app, that was open source. It comes built into the settings menu of AOKP and Cyanogenmod.
Click to expand...
Click to collapse
And a good job they did, imho. ;p
Grtz,
~ Nephatiu
My problem is SuperSU is nice but the SU binary isen't istalled. I keep getting no root privilages error. am i doing something wrong?
For me in a sence its not really rooted it just has a superuser app installed which isen't rooted.
CptKlink said:
My problem is SuperSU is nice but the SU binary isen't istalled. I keep getting no root privilages error. am i doing something wrong?
For me in a sence its not really rooted it just has a superuser app installed which isen't rooted.
Click to expand...
Click to collapse
And you are using my Root.fs ánd my initrd.img? Because they work fine here, though, and from recent reply's I think I can confirm more people having it working. :/ Try uninstalling BlueStacks completely, removing everything (like in the beginning of my tutorial for rooting BS in the OP), rebooting, and reinstalling BS with a clean slate. All su binaries and the sudaemon should be pre-installed on it. :/ I forgot to make a symlink to /system/bin this time, but apparently it wasn't needed and the /system/xbin/su should do. This can be done later (with root of course) by going to /system/bin with the android terminal and typing:
Code:
su
ln -s ../xbin/su
Oh, right, and do check if SuperSU doesn't get updated automatically by your Play Store or anything. It should stay v1.69, because it fails at updating it's own su binaries for some reason...
Can anyone else confirm the last release has working root, though, just to be sure? Because they could always have changed something to make rooting harder, disabling the 'just replace Root.fs' possibility with some build in checker. I highly doubt that's the case, though.
Anyway, keep me updated. ;p
Grtz,
~ Nephatiu

Categories

Resources