[APP]SuperOneClick v2.3.3 - Motorola Exploit Added! - Android Apps and Games

SuperOneClick
FOR ANDROID GINGERBREAD AND EARLIER DEVICES
​
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Downloads available at http://shortfuse.org/
v2.3.3
------
Motorola ADB Patching
Checks for shell root before applying exploits
Unroot has been fixed to work more reliably
LG devices no longer need to use alternate ADB
v2.3.2
------
Better LG phone support
v2.3.1
------
Auto driver installation
v2.2 is up!
zergRush and Superuser 3.0.6 included
----------------------------------------------
v2.1.1 is up!
Driver pack comes later!
---
I made it. I tested it. It works. You can get it from shortfuse.org or use the links below (if you're a registered XDA member).
Here's a one-click root with almost all phones and all android versions. (including the i9000, Droid, Nexus One, etc)
YOU CAN ROOT ALMOST ALL ANDROID PHONES!
The program requires Microsoft .NET Framework 2.0+ or Mono v1.2.6+
Operations systems with native support:
Windows Vista
Windows 7
Ubuntu Hardy (8.04 LTS)
Ubuntu Jaunty (9.04)
Ubuntu Karmic (9.10)
Ubuntu Lucid (10.04 LTS)
Ubuntu Maverick (10.10)
Debian Lenny (5.0)
Debian Squeeze (testing)
Debian Sid (unstable)
Debian Experimental
If you run Microsoft Windows XP, install .NET Framework v2.0 or above
If you run Mac or another Linux flavor, make sure you install Mono:
http://www.go-mono.com/mono-downloads/download.html
For more information about making it work in linux:
See here
You NEED to put your phone on USB Debugging mode
You NEED to install make sure the Android drivers for your phone are installed
Make sure you DO NOT mount your SD card.
If you still can't get something to run, try doing it in recovery mode.
Read me: (READ BEFORE POSTING)
2/24/2011:
I registered my website shortfuse.org so you can grab SuperOneClick from there now.
2/22/2011:
Great news. -1Day roots AT&T Motorola Atrix4G!!! YAY!
11/29/2010:
I'm sorry I haven't been updating lately!!! The problem is, I no longer have an Android phone and I can't play around or test anymore. I'm going to see if I can find one on craiglist or ebay.
11/10/2010:
I finally figured out how to root without looping. After rooting 13 phones, this is how I did it on the first try.
Turn USB Debugging OFF
Click Root
When it says: Waiting for Device, Turn USB Debugging ON
It'll now run RATC
When it says: Starting ADB Server...
Turn USB Debugging OFF
Turn USB Debugging ON
Turn USB Debugging OFF
All BEFORE it says "Waiting for device..." again
11/1/2010:
Hey guys! I'm sorry I haven't been able to respond to lots of posts. I've been really busy lately with work. I've been reading some posts and I've made some changes in v1.5.2
Let me know what bugs and issues you guys have.
10/17/2010:
Thanks to all that donated! I was worried for a bit but you guys proved me wrong. So, I fixed the NMA (non market apps) button. It should now install sqlite3 and busybox into a temporary folder if you don't have it. I added an unroot (by popular demand). I did some major code clean up, so you can expect faster releases from here on out. Next version will add sqlite3 and busybox to the /system partition included in root.
If you're having issues with "wait for device" or if RATC is looping, try this
Unplug your USB Cable
Go to Settings > Applications > Development
Uncheck USB Debugging
Plug in your USB Cable
Unplug your USB Cable
Check USB Debugging
Plug in your USB Cable
10/13/2010:
I need people with issues to post their device model and if they tried rooting in recovery mode. All posts ignoring the read me will be ignored. (meaning nma complaints and those NAND locked devices).
I'm getting flooded with replies, PMs and emails. Seriously, try reading a few posts back.
The program has been downloaded over 5000 times and only 2 people have have donated. I see donations as signs of gratitude. Even if it's 25 cents, please donate.
When I find the time (and will) I will work on the v1.5 release.
The rageagainstthecage looping is by design. Bad usb cables and ports can cause ratc to not run properly so I have it loop until it works. The "waiting for device" hang is for the same reason. There's nothing wrong with my application. It's usually your usb cable or port. This is not a cop-out answer. This is not an excuse as if I didn't know why it happens. This has been investigated and the problem is USB connectivity. It happens with my Captivate as well.
10/11/2010:
Enabling market apps isn't working unless you have busybox installed. I plan to fix this in the next version. The problem is, different devices have different locations for the com.provider.android.settings/settings.db and I was using the 'find' command to find your settings.db location. I didn't realize this was a busybox command not internal. That will be fixed.
I also added some information about root that I think people should read and classified different root levels.
By classifying root levels, I make it easier for the users to know if certain options will work or not. For example, enabling non-market apps will only require a Level 1 root, meaning it will work with the HTC Aria
Donate
Donate if you wish...
Compatibility list
Please note that if you device is not listed here, it doesn't automatically make it incompatible. The list is definitely incomplete.
Use the search feature to search for your phone model: http://forum.xda-developers.com/search.php?searchthreadid=803682
Acer Liquid Metal
Dell Streak
HTC Magic (Sapphire) 32B
HTC Bee
LG Ally
Motorola Atrix4G
Motorola Charm
Motorola Cliq
Motorola Droid
Motorola Flipside
Motorola Flipout
Motorola Milestone
Nexus One
Samsung Captivate
Samsung Galaxy 551 (GT-I5510)
Samsung Galaxy Portal/Spica I5700
Samsung Galaxy S 4G
Samsung Galaxy S I9000
Samsung Galaxy S SCH-I500
Samsung Galaxy Tab
Samsung Transform M920
Samsung Vibrant
Sony Ericsson Xperia E51i X8
Sony Ericsson Xperia X10
Sprint Hero
Telus Fascinate
Toshiba Folio 100
Incompatibility list
With the absolutely beautiful ADB exploit I use, titled rageagainstthecage (ratc), absolute ALL devices can be rooted. This is because it exploit is ADB which all devices use. There is an issue though. Some devices have a NAND lock which does not allow you to write to the /system mount. Because of this, you can't copy su, sqlite or busybox to /system/bin. This creates some issues but there is a work around. For things that don't need access to /system (like enabling non-market apps) I can use the ratc exploit to make those changes. If your device cannot use su in /system/bin then you can simple select a checkbox (as of v1.5) that says to use ratc.
There are 3 levels of "root" we can define:
Level 1: Shell Root (with ratc rooting the adb shell but no /system write access)
Level 2: Temporary Root (/system/bin/su installed but lost on reboot)
Level 3: Full Root (/system/bin/su installed and sticks)
Some devices have a NAND lock. SuperOneClick will only give a Shell root until you remove this lock.
The following phones can use http://unrevoked.com to remove this lock:
Sprint EVO 4G (HTC Supersonic)
Droid Incredible (HTC Incredible)
HTC Desire GSM
HTC Desire CDMA (HTC BravoC)
HTC Aria
Droid Eris (HTC DesireC)
HTC Wildfire (HTC Buzz)
THe HTC Legend and My Touch 3G 32A also have a NAND lock and need more specific methods to unlock.
The T-Mobile (HTC) G2 has something different which may or may not be a hardware flaw. I have yet to really research the device, but while it may root, it won't be permanent since copying /su to /system/bin/su has problems. I believe this is a Level 2 root, but to be honest, I need to research more.
All other devices has a Level 3 root via SuperOneClick
Version changes:
v1.9.5
Driver Installation Fix
Force Administrator on Vista/Win7
Fixed Non-Market Apps not working for some devices
v1.9.1
GingerBreak support! (I think)
v1.9
Bug fixes!
Should work better now on XP systems and Linux
v1.8
Automatic driver installation
Removed RageAgainstTheCage (no virus flags)
New folder structure
Major code clean up
v1.7
Hopefully fixed Linux hangs
Theoretical honeycomb support (still needs testing)
v1.6.5
Fixed major bug. Oops!
v1.6.4
Installs busybox to /system/xbin and installs syslinks
Added a 30 second timeout check (should eliminate all lock ups)
v1.6.3
Mounts with busybox first
Includes version in first line
v1.6.2
Fixed wrong su version being sent
Fixed issue when getting OS version
Prints device info on failure.
v1.6.1
Falls back to previous mount path method if busybox method fails
v1.6
Uses psneuter for exploit instead of rageagainstthecage by default (should root Sony Ericsson devices easily now)
Added detection for 1.x Donut/Eclair kernels
Uses busybox for getting mount path
Updated Windows ADB to latest version (I'll update the Mac/Linux ones next build)
v1.5.5
Unroot uninstalls Superuser from /data/app
Returned installation of Superuser to /system/app
v1.5.4
Fixed superuser install issue
Added a prompt to tell you to allow superuser on your phone, for the test.
Fixed unroot.
v1.5.3
Fixed ADB-pushing problem
v1.5.2
Administrative rights in Windows Vista/7 are automatically requested.
Fixed the settings.db search. (Tries default two locations, then uses busybox is all else fails).
Set Superuser to install (to data/apps) instead of copy to /system/apps. You can manually remove it from your phone like any other app. (You can also update it with the Market).
Fixed NMA not working if you didn't have Shell Root
v1.5.1
Untested Mac and Linux support (you need Mono)
v1.5
Fixed Non Market Apps
Added Unroot
Added separate Shell Root (rageagainstthecage) button
Lots of internal code clean up.
v1.4
Changed main form's name to SuperOneClick from RageAgainstTheCageGUI
Enabled Captivate - Get Unlock Code button
Added a messagebox to confirm if Non Market Applications are enabled
Made "Enable Non Market Apps" FULLY universal
Added initial message telling you to remember to allow superuser commands (when enabling Non-Market Apps)
v1.3
Removed busybox for space reasons. Changed the layout. Fixed issue where application stayed running in the background. Added Non Market App button.
v1.2
Added a detection to see if RATC was already working.
v1.1
Universal device support. Application now finds your /system path.
v1.0
Initial release.
Development Plan:
Scheduled for next major release
Linux support via mono-project
Add a check box to use su or rageagainstthecage for other scripts (like Enable NMA)
Better error handling for devices with NAND lock on /system
Have options show what level root is needed (0,1,2,3)
To do list:
Jupiter fixes
Custom scripts support
Plugin support
Mac support via mono-project
Linux support via mono-project
Wishlist:
None
Thanks to basily, I have an Captivate v2.1 nv_data.bin I can test with to create the unlock button.
I need a mac/linux user to help me. PM so we can chat on AIM/Google
Courtesy of TheUnlockr.com, here's a step-by-step video:
Mod Edit: this app will set off some anti virus software...here's a small explanation by pulser_g2:
rageagainstthecage is a root exploit via a fork bomb.
It IS a potentially malicious payload, BUT it is being used with owner's consent to root the phone.
The DreamDroid malware use exactly same payload - they are trojans, but this is a helpful tool.
It IS a dangerous tool in the wrong hands, but this is a root exploit, so you should exercise common sense and a little understanding of what it does and how it works.
Click to expand...
Click to collapse

First reply!
Thanks!!! Even I won't be needing them at the moment
Now the next project... ability to sign the update.zip so recovery mode works!

Cool!! Thank you! =)

Good job i cant wait to try this out

ROCK ON
thanks

What does this mean(in bold).
CLShortFuse said:
I made it. I tested it. It works.
Here's a one-click root that works with Froyo on our Captivates. It's not just the Captivate. It works with almost all phones and all android versions. (including the i9000, Droid, Nexus One)
I've included busybox and sqlite3 because i wanted to. I'll make a full-fledged UI later (where you can select what apk to install, with or without busybox, etc);
If you don't have your Google SDK path set, include adb.exe in your folder (or just copy it to the sdk\tools folder).
It's Windows only at the moment (and you need .NET Framework 2.0+) but I'll port it to mac/linux later on (if you guys are that interested).
.
Click to expand...
Click to collapse

ziphoward said:
What does this mean(in bold).
Click to expand...
Click to collapse
yep im wondering the same as i dont have any adb or or sdk installed on computer, as i dont know how to use either one. can i still use this?

Couldn't have been easier. However when I launched TiB after seeing the successful ROOT message box from the unroot app, I am not rooted.
Update to my post: ran again and Busy Box states that I am rooted.
Thanks...

When i run this .. The GUI just hangs with a blank screen .. no errors.. if i go to task manager there are two adb.exe processes and if i force close one the GUI closes.
Any ideas?

joelmassee said:
Couldn't have been easier. However when I launched TiB after seeing the successful ROOT message box from the unroot app, I am not rooted.
Update to my post: ran again and Busy Box states that I am rooted.
Thanks...
Click to expand...
Click to collapse
You should reboot the phone, but I didn't want to make it mandatory. I'll add a prompt asking if you want to reboot.
aramsumair said:
When i run this .. The GUI just hangs with a blank screen .. no errors.. if i go to task manager there are two adb.exe processes and if i force close one the GUI closes.
Any ideas?
Click to expand...
Click to collapse
Plug in a device

kamots said:
yep im wondering the same as i dont have any adb or or sdk installed on computer, as i dont know how to use either one. can i still use this?
Click to expand...
Click to collapse
Me too have no clue about that!! Can anyone just type a "Step by step" to use this please?
Thanks

For those of you who don't understand what ADB is:
http://tinyurl.com/35ba2wz
It's a little scary for people to be rooting their devices without even knowing the basics...

Cl,
When I unzipped I clicked the gui and ok. It gives me an uncaught exception error. I figured I would just have to have USB debugging enabled, is there something else I am missing.
I figured I would give this a shot so I don't have to go though ADB to do my root all over again. I will post the details of my error.
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.
************** Exception Text **************
System.ComponentModel.Win32Exception: The system cannot find the file specified
at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start()
at RageAgainstTheCageGUI.Form1.runCommand(String arguments)
at RageAgainstTheCageGUI.Form1.button1_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3615 (GDR.050727-3600)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
RageAgainstTheCageGUI
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/Brian/Desktop/Android%20Central/Rooting/Captivate%20one%20click%20root/Froyo/RageAgainstTheCageGUI.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3614 (GDR.050727-3600)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.
For example:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
Click to expand...
Click to collapse

flashman2002 said:
Cl,
When I unzipped I clicked the gui and ok. It gives me an uncaught exception error. I figured I would just have to have USB debugging enabled, is there something else I am missing.
I figured I would give this a shot so I don't have to go though ADB to do my root all over again. I will post the details of my error.
Click to expand...
Click to collapse
System.ComponentModel.Win32Exception: The system cannot find the file specified
Your ADB path isn't set
Try looking at http://androidcommunity.com/forums/f28/what-is-adb-made-easy-17732/

Worked great the first time I ran it on XP! Thanks so much.

CLShortFuse said:
System.ComponentModel.Win32Exception: The system cannot find the file specified
Your ADB path isn't set
Try looking at http://androidcommunity.com/forums/f28/what-is-adb-made-easy-17732/
Click to expand...
Click to collapse
Ok I'll give it a shot. I am assuming when you said this has to go in my sdk-tools you were talking about the gui from your OP. If that is the case I did not pay attention very well. Thanks.

Worked like a charm! (win7x64)
EDIT: Its rooted alright, MarketAccess was installed ok, however I tried to install another app and got the "for security your phone is set to block installation of applications not obtained from Android Market"
....... Ideas?

Seemed to work fine for me. I have the android sdk's tools dir added to my PATH. On Win7 x86 and using 2.2. Didn't try busybox or anything yet. Thanks CLShortFuse!

OK ... got it done ...
But now what? I got the Superuser Icon but I still can't replace system files.
Is there anything else to do?
How can I get rid of the AT&T apps?
How do I access the "open" market?

It worked but I can not send emails with attachement from my exchange.
It crashes and force close.
The gmail has no issues.

Related

[Wiki] Google Andriod for Herald and Tmobile Wing

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This thread was created to make it possible to run and use Android on our devices.
What is Google Android?
Android is a software stack for mobile devices that includes an operating system, middleware and key applications.
Androids Architecture
We need all the help we could get to make this work
Other threads on Google Android
Google Android for Kaiser!!
Linux and Android for Vogue
Other helpful Links
Android on OMAP thanks to mswiss
http://it029000.massey.ac.nz/vogue/
This is the version that still has root access to the OS which makes it possible to edited the rom with-in the rom, thats if we get it ported first of course.
Also I dont have the tools right now to take apart the .nbh and rip it apart so if any can please do. The link is below.
DREAIMG.NBH
This popped up a week ago its the Orange France RUU update for the french G1
Could a kitchen be made out of this??
RUU_DREAM
VIA:imfloflo
This thread will remain open for any advancement of android getting ported onto the wing.
PLEASE REPORT ALL ISSUES TO THE ORIGINAL THREAD!!!
Visit darkstar62's thread (click here) for he has really gotten far with ported linux onto the wing.
darkstar62 said:
I've developed a kernel and base linux system suitable for installation on the HTC Herald / T-Mobile Wing series of phones. This image is for installation of a root filesystem directly to an SD storage card (no need for a root FS image). Several things don't work so far -- this is early development. But it's enough to play with. My hope is that we can use development on this as a jumping point for getting Google Android to run on the wing.
UPDATE (2/10/09):
I've added a Resources section to collect the useful information and links that have been posted here and in the other thread. I've also updated the known issues section for Android to reflect what I've discovered so far.
UPDATE (2/9/09):
I've got an updated kernel config and images for starting Android now! Android will now pull up the boot animation and begin startup. It still does not complete startup, but at least we know we've got the right stuff in the kernel now!
I've added instructions at the bottom for installing these and using them with an already set up linux system (per the first set of instructions).
UPDATE (2/7/09):
Here's some extra files you can grab if you're interested in development: (The patches don't apply cleanly yet against the linwizard kernel)
Kernel .config file I've used (against the linwizard 2.6.25 kernel): http://dl.getdropbox.com/u/198699/linux_wing/wing_config
Android diffs (between SDK android kernel and kernel.org 2.6.27 kernel): http://dl.getdropbox.com/u/198699/linux_wing/android-2.6.27.patch
Contents
Part 1: Linux Base System Installation Instructions
Part 2: Android Installation Instructions
Resources
Part 1: Linux Base System Installation Instructions:
The below instructions assume you have access to Linux and can read/write to your SD storage card.
To start out with, here's what you'll need:
Haret + default.txt + kernel (.zip, 1.4mb)
Root filesystem contents (.tar.gz, 13.1mb)
1. Repartition your SD card.
For this, you'll need to use something like Partition Magic or some other suitable partitioner (in Linux, you can use gparted to resize your Windows partition.) I recommend the following layout:
Partition 1: Primary, FAT16 or FAT32 containing your original Windows files (any size of your choosing)
Partition 2: Primary, Linux Swap, 128mb
Partition 3: Primary, EXT3, >=64mb​My linux partition is 650mb with a 1.2gb Windows partition and 128mb swap -- adjust to preference.​2. Format the swap and linux partitions.
In linux, run the following: (I assume your SD card is /dev/sdb -- adjust if different)
Code:
# sudo mkswap /dev/sdb2
# sudo mkfs.ext3 /dev/sdb3
I'm assuming the layout in step 1 as well.​
3. Mount the new Linux partition.
Run the following:
Code:
# sudo mount /dev/sdb3 /mnt
4. Copy the base linux system into the new Linux partition.
Save the root filesystem .tar.gz file from above to somewhere (I'll assume $HOME). Then run:
Code:
# cd /mnt
# sudo tar -xzvf $HOME/rootfs.tar.gz
# cd ..
5. Unmount the linux partition.
Run the following command:
Code:
# sudo umount /mnt
6. Mount the windows partition and copy the Haret executable + kernel.
I'll again assume you saved the "haret+kernel.zip" file to $HOME. Run the following:
Code:
# sudo mount /dev/sdb1 /mnt
# cd /mnt
# mkdir linux
# cd linux
# sudo unzip $HOME/haret+kernel.zip
# cd /
# sudo umount /mnt
At this stage, your Linux base system and kernel should be installed. All that's left is to remove your SD card and re-insert it into your phone, start up HaRET and enjoy.
7. Log in
Once you're booted into Linux, you can log in with:
Username: root
Password: wing​
Plug in a USB cord to log in on your laptop. If your laptop runs linux, you'll need to make sure that the usb0 network interface has the right address:
Code:
# sudo ifconfig usb0 10.100.0.2 up
The phone's address will be 10.100.0.1. You should be able to SSH or telnet in to the phone and mess around. Run "startx" to bring up X and such.
What's Working
Minimal X server capable of landscape and portrait video modes (KDrive, using the framebuffer (omapfb))
Touch screen support + calibration software (TSC2046 driver + tslib)
Console keyboard (some characters are difficult / impossible to type due to the limited key layout and driver)
USB gadget support for connecting with my laptop (I can SSH / telnet into the phone, or ssh/telnet from the phone into my laptop)
Full access to the SD card (even the Windows FAT side -- mmci-omap driver)
Known Issues
Bluetooth -- haven't been able to get a working driver, or anything to even recognize that it exists
WLAN -- same as bluetooth
GPRS / Phone -- same. There appears to be a GSM device, but I haven't been able to do anything with it.
Most of the extra buttons don't fire any events
LEDs for the most part don't work
Battery and power stats aren't available, as well as power management
No control of the backlight or display power
Sound not functional -- don't have any drivers / software compiled for sound, so I don't know if this would work or not
No real time clock (RTC) functionality
Part 2: Android Installation Instructions:
For these instructions, the recommended procedure is to copy the files you'll need to the Windows side of your SD card and install using the Linux boot system. Make sure you follow the instructions for getting a Linxu base system installed first before following this.
First off, grab the following files (Required)
Android patched kernel for the wing (same as the below kernel, but with android patches): http://dl.getdropbox.com/u/198699/android/zImage2
Android root filesystem, compiled for the wing: http://dl.getdropbox.com/u/198699/android/root.tar.gz
Android /system partition, compiled for the wing: http://dl.getdropbox.com/u/198699/android/system.tar.gz
Script for starting Android: http://dl.getdropbox.com/u/198699/android/start_android
You can also grab the kernel config file if you're interested in building the kernel (I'll have the android patch set available soon) (Optional):
Kernel .config file for the modified kernel: http://dl.getdropbox.com/u/198699/android/kernel_config
1. Copy all files to your wing
From Windows Mobile, download the 4 required files above and place them on your storage card:
root.tar.gz -- Place in /Storage Card/
system.tar.gz -- Place in /Storage Card/
zImage2 -- Place in /Storage Card/linux (overwrite the file that's already there, or re-name the original first)
start_android -- Place in /Storage Card/
2. Install Android
Run HaRET.exe to start Linux. It should boot the new kernel (you most likely won't notice a difference). Once in Linux, run the following commands (you can do it directly with the wing keyboard, or you may elect to use SSH (see instructions above) -- SSH is easer in my opinion):
Code:
# cd ../..
# mkdir android
# cd android
# tar -xzf ../mnt/windows/root.tar.gz
# tar -xzf ../mnt/windows/system.tar.gz
# cp ../mnt/windows/start_android ../bin
# chmod 775 ../bin/start_android
If using the Wing's keyboard, you'll need to use the following key mapping:
'/' --> 'Tab'
'-' --> 'Alt + x'
'_' --> 'Alt + c' (I think -- it's Alt + one of the letter keys)
Numbers -> 'Alt + <top row>'
3. Start Android
At this point, android is now installed and ready to run. Simply execute the following command to start Android:
Code:
# start_android
After a few seconds, you should see the Android startup animation appear.​Known Issues
The omapfb driver currently in use does not support page flipping, preventing the Android GUI from being displayed
Resources
WMStorage -- turn your wing into a USB SD card reader (Kudos to Kuff!): http://forum.xda-developers.com/showpost.php?p=3263023&postcount=5
Wing Service Manual (kudos to drmidnight!): http://forum.xda-developers.com/showpost.php?p=3291171&postcount=132
Google Andriod for Herald and Tmobile Wing -- the thread that started it all: http://forum.xda-developers.com/showthread.php?t=398830
Enjoy
Click to expand...
Click to collapse
Thanks
EDIT: Added darkstar62's most current update (2/10/09)
EDIT: Added Wing Linux 0.3 pre3 instructions. Thanks to darkstar62
Current Status
Bluetooth -- haven't been able to get a working driver, or anything to even recognize that it exists
WLAN -- same as bluetooth
GPRS / Phone -- same. There appears to be a GSM device, but I haven't been able to do anything with it.
Most of the extra buttons don't fire any events
LEDs for the most part don't work
Battery and power stats aren't available, as well as power management
No control of the backlight or display power
Sound not functional -- don't have any drivers / software compiled for sound, so I don't know if this would work or not
No real time clock (RTC) functionality
Can anyone take photos of these stages.
I would love to post them here.
Thanks
Good idea. Wondered when someone will come up with it....BUT the main problem will be to port the GSM over...think until now they didn´t succede - did they?
Good luck
i think the first thing we should look at is porting linux over to the wing
then go from there
BUT another thing that i don´t understand...correct me...
WE can only run Android like a VM on a PC.
First XDA boots WM6 and then starts an image from android...so it is more like an application running under WM??
And will there be a time where we can delete WM???
thx
we can delete WM when we have a full set of drivers for android
And linux- i've never understood people's compulsion for linux. Sure it's opensource and therefore free, but that does not automatically make it better.
fzzyrn said:
we can delete WM when we have a full set of drivers for android
And linux- i've never understood people's compulsion for linux. Sure it's opensource and therefore free, but that does not automatically make it better.
Click to expand...
Click to collapse
True true free doesnt make it better but atleast it gives us varieties...instead of just WM we could linux(android) also.
papamopps said:
Good idea. Wondered when someone will come up with it....BUT the main problem will be to port the GSM over...think until now they didn´t succede - did they?
Good luck
Click to expand...
Click to collapse
yeah i think its in that stage for now but imagine if we could make a very Clean rom and cook android into it and make it start at startup we could have it running and a decent speed
I think we can have android running as soon as we complete the "linux kernel" part of the dev roadmap along with the runtime. At this point, android would be "running" but not functioning
alright cool, you guys go work on the linux kernel and ill go.... drink this soda
fzzyrn said:
I think we can have android running as soon as we complete the "linux kernel" part of the dev roadmap along with the runtime. At this point, android would be "running" but not functioning
Click to expand...
Click to collapse
how could we get this started? im willing to try anything right now
you would probably need a coder. I haven't read much about android, but you could probably port over WM6 drivers (depending on programming language?)
fzzyrn said:
you would probably need a coder. I haven't read much about android, but you could probably port over WM6 drivers (depending on programming language?)
Click to expand...
Click to collapse
I don't think that that will work. I think that you need to start with the basic linux drivers and see if you can port them to mobile.
And yes, you would need a coder for that. And sorry to say, that isn't me. But, it t-mobile gets the diamond/whatever they're going to call it, I think that I will be first in line.
N3xt2N0N3 said:
yeah i think its in that stage for now but imagine if we could make a very Clean rom and cook android into it and make it start at startup we could have it running and a decent speed
Click to expand...
Click to collapse
Perfect reason for an Just2Clean variant! lol
WM6 are hardly running on our 200 MHz OMAPs and you want to put another OS on top of it? Laughing out loud.
CommZ said:
WM6 are hardly running on our 200 MHz OMAPs and you want to put another OS on top of it? Laughing out loud.
Click to expand...
Click to collapse
are you serious? hardly running? its sometimes (quite often to be honest) faster than qualcomm 400mhz... (most of users are still believers of MHZ GOD... ).
I know how fast my machine is. It is often annoyingly slow.
these days, frequency doesn't matter as much as FSB does!
But anyway, you would definitely have to write your own drivers, which makes android porting more the responsibility of the manufacturer than of the end user

Superuser App - fix the su security hole on modified RC30 - source/apks included

Summary:
There have been a few threads about the root setuid su being a potential security hole on modified RC30 phones. We all want to have root on our phones, but we don't want malicious programs/people to take advantage of it.
To that end, I came up with the following program that fixes the security hole, and also allows you or any application to get root when authorized.
This program works with any application that may use su: no special code or support needs to be written. Just use su like normal from within both Java applications or a terminal.
To install, simply install the Superuser application on top of modified RC30 V1.2.
If Superuser does not install properly automatically, do the following to install it manually:
Make sure you have the adb tool from the SDK.
Unzip the ZIP file (it will create a folder called Superuser).
Run install.bat (or install.sh if you are on Linux) from the Superuser directory.
Here's the script that the install runs:
Code:
adb push bin/su /system/bin
adb shell chmod 4755 /system/bin/su
adb uninstall koushikdutta.superuser
adb install bin/Superuser.apk
How it works:
The modified su command looks in a whitelist database for uids that is allowed root access. That database is only accessible by the Superuser application and root.
If a database entry is found, it decrements the white list counter by one (so, an application can access su 10 times, 1 time, etc, depending on the count).
If no database entry is found, it will show the Superuser confirmation activity and wait for 10 seconds for the user to respond. If the user presses yes or always, it adds the user id to the white list. (If yes is pressed, the white list counter is just 1).
If access was granted, su will setgid/setuid and call /system/bin/sh.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Implementation:
The Superuser Java application was written by me.
su was based on the su implementation built by Google for the Android platform. http://android.git.kernel.org/?p=pl...eb00e56211962786ff89d0e7940f73d7e914e;hb=HEAD
Source code and binaries are attached to this post.
[*]The standard RC30 install will have a setuid /system/bin/su. (if you deleted disabled it, reenable it for setup)
Click to expand...
Click to collapse
v1.2 and up only, correct? Not the setuid sh of v1.1.
jashsu said:
v1.2 and up only, correct? Not the setuid sh of v1.1.
Click to expand...
Click to collapse
Edit: Yeah, you need a setuid su in /system/bin. Having a setuid sh won't work.
?
Can't root just be blocked from the handset..? So the only root access would b from adb..doesn't that make the phone safe? Or is this the only real answer to the security issue?
cookzitall said:
Can't root just be blocked from the handset..? So the only root access would b from adb..doesn't that make the phone safe? Or is this the only real answer to the security issue?
Click to expand...
Click to collapse
Yup, of course you can delete the su command from the handset so you can only adb shell for root.
However, then legitimate uses of having root on your handset would not be possible:
For example, I am currently working integrating the G1 WiFi router instructions sticked in this forum into the Android WiFi settings application.
I did this and now everything is working fine, however I was wondering how another application can have root access other than the shell program you created.
Great work by the way!
persiansown said:
I did this and now everything is working fine, however I was wondering how another application can have root access other than the shell program you created.
Great work by the way!
Click to expand...
Click to collapse
They can use the Intent that is exposed by Superuser, that Shell uses to get root:
Code:
final int SUPERUSER_REQUEST = 2323; // arbitrary number of your choosing
Intent intent = new Intent("android.intent.action.superuser"); // superuser request
intent.putExtra("name", "Shell"); // tell Superuser the name of the requesting app
intent.putExtra("packagename", "koushikdutta.shell"); // tel Superuser the name of the requesting package
startActivityForResult(intent, SUPERUSER_REQUEST); // make the request!
Then, if the user presses Yes or Always, that Java application can call su just like normal:
Code:
Runtime.getRuntime().exec("su -c <your privileged command here>");
Otherwise, that command will fail.
Koush said:
They can use the Intent that is exposed by Superuser, that Shell uses to get root:
Code:
final int SUPERUSER_REQUEST = 2323; // arbitrary number of your choosing
Intent intent = new Intent("android.intent.action.superuser"); // superuser request
intent.putExtra("name", "Shell"); // tell Superuser the name of the requesting app
intent.putExtra("packagename", "koushikdutta.shell"); // tel Superuser the name of the requesting package
startActivityForResult(intent, SUPERUSER_REQUEST); // make the request!
Then, if the user presses Yes or Always, that Java application can call su just like normal:
Code:
Runtime.getRuntime().exec("su -c <your privileged command here>");
Otherwise, that command will fail.
Click to expand...
Click to collapse
Sounds good. Great job. Hopefully apps that require root in the future use this method rather than trying to force it.
Hi Koush,
I have Jf's modified RC30 but I am not that tech savy. Before I could access su in terminal emulator but now i am locked out. I downloaded both your apps off the mark but when I request superuser I get an error. Also terminal emulator now doesn't work when i enter in su. I think that was the point though.
However the error message on shell when i request superuser says;
error: permission denied: starting intent {action= android... and so on....
What should i do to get root back?
PLease advise.
Thank you,
hbguy
question
i change the "su" to a different word...thinking it wouold help with security a little while back..does that effect your program?
hey can anyone tell me what empty whitelist means?
I am having the same issue. I cannot execute su from terminal, permission denied. and when i try to get su access with the new shell program i get and error with "android.permission.ACCESS_SUPERUSER.
now my root job is all for nothing and im wondering how to get it back to normal.
Do i have to reflash from the backup image?
Check to make sure you have the latest version of the RC30 mod (1.2). If not. copy the update to your SD and install the new update. Then superuser and shell will work just fine and you will have root.
Leeah said:
Check to make sure you have the latest version of the RC30 mod (1.2). If not. copy the update to your SD and install the new update. Then superuser and shell will work just fine and you will have root.
Click to expand...
Click to collapse
Yes, don't worry: it is not possible to "lose" root with Superuser. You can always adb shell in for root; and if worst comes to worst (and it shouldn't), you can reflash.
I am updated to Jesusfreke's newest modified version 1.2 but I still get the same error when i request superuser off of shell ( i also remembered to run superuser before requesting access in shell too). I just re-flashed ( i think that's what its called) JF's modified and now I can run root on terminal emulator again if DONKEY still trying to figure out how to get it back.
I'd like to use superuser and shell but I think I'm missing something lol.
Sorry, clearly a noob here.
I think what we need is a combination of fnord's and koush's approach .
I'm thinking something along the lines of a sudo type program. Let's call it asudo (android sudo). Basically, there would be a sqlite database that contains a "white list" of user ids (java applications) that are allowed root access. This could potentially be time limited, or even "use" limited (i.e. a single use permission).
So when asudo is executed, it checks the database for the calling user id, and if it is allowed access to root, it would automatically run the specified command with root access. Otherwise, if the calling user id doesn't have explicit permission, it would prompt for a global password (which only the real person using the phone should know). The password would also be stored in the same sqlite database.
The same type of java based permissions scheme as Koush's could be implemented. When an application requests root access, it would pop up a notification screen similiar to what it shows now, with options something like - "allow access once", "allow access for 10 min", or "always allow access". And "don't allow access" of course. It would write a corresponding "allow" entry into the database based on what the user selected, and then the requesting application could execute asudo.
Thoughts?
Anyone wanna take this on? If not, I may have to do it myself
JesusFreke said:
I think what we need is a combination of fnord's and koush's approach .
I'm thinking something along the lines of a sudo type program. Let's call it asudo (android sudo). Basically, there would be a sqlite database that contains a "white list" of user ids (java applications) that are allowed root access. This could potentially be time limited, or even "use" limited (i.e. a single use permission).
So when asudo is executed, it checks the database for the calling user id, and if it is allowed access to root, it would automatically run the specified command with root access. Otherwise, if the calling user id doesn't have explicit permission, it would prompt for a global password (which only the real person using the phone should know). The password would also be stored in the same sqlite database.
The same type of java based permissions scheme as Koush's could be implemented. When an application requests root access, it would pop up a notification screen similiar to what it shows now, with options something like - "allow access once", "allow access for 10 min", or "always allow access". And "don't allow access" of course. It would write a corresponding "allow" entry into the database based on what the user selected, and then the requesting application could execute asudo.
Thoughts?
Anyone wanna take this on? If not, I may have to do it myself
Click to expand...
Click to collapse
IMO, su should act like normal su in every respect from a scripting perspective. IE, it never prompts for password on stdin. Piping in passwords from Runtime.exec is sort of kludgy. Also, if you start start prompting for passwords on su, you open a whole can of worms moving forward: some su's on people's phones will require passwords on stdin, while others won't.
That is my primary aversion to fnord's implementation; it makes development a pain, and future compatibility scary.
I think one way to do what you are suggesting is to implement a su.jar, and have a /system/bin/su script that launches that jar file. That su.jar can then redirect the stdin/stout to /system/bin/realsu (which is the vanilla RC30 v1.2 su). su.jar can interact with the Android application layer (which realsu can not do) and prompt for a password, ask for confirmation, or check the whitelist in the Android UI.
This way, su behaves exactly as it should from an implementation standpoint, inside a console. Thoughts?
Edit:
Or conversely, you can modify a normal su to block on a call to an Android Activity that asks for user confirmation. That's actually probably the better way to do it: avoid the Java code unless absolutely necessary.
I think one way to do what you are suggesting is to implement a su.jar, and have a /system/bin/su script that launches that jar file. That su.jar can then redirect the stdin/stout to /system/bin/realsu (which is the vanilla RC30 v1.2 su). su.jar can interact with the Android application layer (which realsu can not do) and prompt for a password, ask for confirmation, or check the whitelist in the Android UI.
This way, su behaves exactly as it should from an implementation standpoint, inside a console. Thoughts?
Click to expand...
Click to collapse
Having a su script launch the jar file is more or less just the same as the requesting application launch the jar directly, I think. In any case, the difference would only be relevant for Android apps that use su. Given the relatively small number of apps that will fall into that category, it begs the question whether it is really necessary to implement Android su so perfectly transparent. I also wonder if the fully open Android implementations (e.g. Android on Freerunner) will have a su command and if so what their security implementation will be like.
Also, if you start start prompting for passwords on su, you open a whole can of worms moving forward: some su's on people's phones will require passwords on stdin, while others won't.
Click to expand...
Click to collapse
Coming together and getting a de facto standard solution in place (and possibly pre-installed in JF's update packages) can't hurt.
jashsu said:
Having a su script launch the jar file is more or less just the same as the requesting application launch the jar directly, I think. So the only benefit would be for Android apps that specifically use su. Given the relatively small number of apps that will fall into that category, it begs the question whether it is really necessary to implement Android su so perfectly transparent. I also wonder if the fully open Android implementations (e.g. Android on Freerunner) will have a su command and if so what their security implementation will be like.
Coming together and getting a de facto standard solution in place (and possibly pre-installed in JF's update packages) can't hurt.
Click to expand...
Click to collapse
Yeah, I admit the su script isn't ideal. Which is why I edited my post and suggested that su block on an Android Activity (the other way around) when necessary.
Off the top of my head, there are several applications that I am working on or have planned that will require su:
Fully configurable WiFi Router UI (that basically automates the instructions found in the sticky in this forum)
Screenshot Application
Auto Screen Rotation
And there will be even more applications that will require su as we move forward: and they won't just be reduxes of a console/shell, where it is reasonable to prompt for a password on stdin. So for that reason, I want the su implementation to be as transparent as possible, so future usage from Java applications isn't a pain in the ass.
Jf, you are the man! and yes i am making sure that this message is over the required character and it is indeed a message with a profound meaning...
hbguy

[APP - Nexus, MT3G, Droid, Evo, Hero] Search2Play - Control Music with the Search Key

Hello all, I just completed an app I'd like to share with you all.
It's called Search2Play, it lets you play and pause your music by pressing a button on your device. On most devices, it is the search key. Currently, the Nexus & MyTouch 3G both use the Search key, whereas the Droid uses the Camera key. If you have physical keys (i.e. Droid, MT3G, G1, etc) then it will work when the phone is locked, but if you have capacitive keys (Nexus, Moment, Eris, Incredible, etc) then the screen must be on (lockscreen works, and fully unlocked of course).
It is available on the market under the name "Search2Play (Root Required)". It's totally free.
It requires root permissions to install. It also requires that you have a version of BusyBox that supports the "cp" command. Only Droid users probably have to worry about the busybox version, as most other custom ROMs have that already. Droid users, I recommend CyanogenMod for Droid or Bugless Beast as I know both of them have the right version.
It does not run in the background or install a service, just makes some changes to a few files on the /system partition.
The UI is very simple, just two buttons and some text explaining the app. Once you hit install, it will ask for permission to use root, you must hit accept or the app won't serve its purpose
The other button, "Restore", lets you remove the mod and go back to stock settings, where the search button brings up search, etc.
Supported Devices:
Nexus
Spica
Hero (GSM & CDMA)
Galaxy S devices (all US variants and probably the i9000 as well. It's not tested)
MyTouch 3G
Droid 1 (I've been told DX & D2 work as well, though I'm not sure how :?)
Evo (must be NAND unlocked or S-OFF)
Desire (must be NAND unlocked or S-OFF)
Free Version on Market:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Or click this from your device: Search2Play Free
See the Market to view a screenshot. Please give me some feedback. Thanks! Hope you enjoy the app :
FOR DEVICE REQUESTS SEE POST #3
Changelog:
1.4.1 thru 2.1:
Add support for Evo, GSM Hero, CDMA Hero, & Samsung Spica (thanks to Aasheet Kumar for the files I needed for Spica support!)
1.4:
Fixed rare root checking bug on some Droid ROMs, and maybe some Nexus ROMs too
1.6+ only now, sorry, it's not like any device this works for isn't updated to at least 1.6
1.3:
Now checks if the SD card is present on launch instead of just crashing if it's not there
Cleaned things up more
Merged some code between the donate & free versions
Better checks to see if it can be installed
1.2.5:
FINALLY stopped it from causing buttons to stop working. Checks for compatibility, and throws an error if it detects it can't run.
1.2:
Droid support!!
More should fix a few FC issues some people have seen. Let me know if you have problems.
1.1.2:
Fixes the not restoring bug
1.1.1:
Failed attempt at fixing the not restoring bug.
1.1:
Support for low res devices.
Now works with MT3G! Since it has a hard search key, it will even work when the phone is locked
Deletes files from SD card once done installing.
Cleaned up more code.
1.0.1:
Sets system back to Read-Only once finished installing
Cleaned up some code, if you have FCs let me know.
1.0:
Base release
If you want to request support for your device here's what I need. Note that your device must be able to be rooted and the system partition must be able to get read/write access from userspace. I.E. any Desire or Evo or any other recent HTC device with a NAND lock will not work, unless it has been NAND unlocked with an S-OFF bootloader, like via Unrevoked.. If your device has all that, get this info and send me an email at [email protected]
Run the command "adb shell mount" and tell me the output. I don't need the whole thing, just the line referring to the system partition. I.E. "/dev/block/mtdblock3 on /system type yaffs2 (ro,relatime)" is the line on the Nexus, it should be similar to that.
Then, run "adb shell getprop" and tell me the 1-4 lines related to the keyboard, like hw.keyboards.*.devname and tell me those lines. I.E the Nexus returns "mahimahi-keypad". Yours should be similar.
Finally, run "adb shell ls /system/usr/keylayout/". It should return a list of files all ending in ".kl"
Remember the keypad name from step 2? Good
There should be a ".kl" file matching that name (like mahimahi-keypad.kl). Pull that file with "adb pull /system/usr/keylayout/keypadname.kl directory" with directory being the folder you want to pull the file to and keypad name being the name from step 2.
Zip that file, and then send it to me please.
That should be it, if you have any questions or problems with this list hit me up on GTalk or email me. [email protected] for both GTalk & email.
Dear geniusdog
I just tried out your app.
I installed it, run it, pressed the install button, allowed root access and rebooted mynexus one. But after that reboot, my sell doesn't react on anypressed buttons anymore. I can only use the touchscreen...
I also tried to restore in your app, but there appeared a window saying that the app is not responding anymore.
How can I manually restore it? Is there a command or some files, I can edit?
Thanks for your help
bayoffire said:
Dear geniusdog
I just tried out your app.
I installed it, run it, pressed the install button, allowed root access and rebooted mynexus one. But after that reboot, my sell doesn't react on anypressed buttons anymore. I can only use the touchscreen...
I also tried to restore in your app, but there appeared a window saying that the app is not responding anymore.
How can I manually restore it? Is there a command or some files, I can edit?
Thanks for your help
Click to expand...
Click to collapse
Sorry for the issue. I have uploaded a new version of both apps that should fix the problem. If you can download the app and install it again, otherwise, PM me & I will give you manual instructions to restore it.
Also, just some technical details, the problem was caused because I had set it to create the directory on the start of the application. After that I removed it once you clicked the button & the install was finished. Because of that, if you clicked restore after install, it would fail to find the directory and then proceed to FC. Sorry for the trouble
Droid Support!!!!
Help!!!!!
I have installed V1.0.4, but my touch keys(back, Menu, Home and Search) don't work.
Then I have tried to restore it, but it's failed.
How could I fix it? Thanks.
My Rom is 2.1-update1 rooted.
hahabear said:
Help!!!!!
I have installed V1.0.4, but my touch keys(back, Menu, Home and Search) don't work.
Then I have tried to restore it, but it's failed.
How could I fix it? Thanks.
My Rom is 2.1-update1 rooted.
Click to expand...
Click to collapse
Hmm I dont have this issue, how does it fail? Does it just freeze, or does it FC, or does it say it finishes then do nothing? Also, what ROM, CM? Enomther? Please let me know so I can work on this.
Also, to fix it, download the attached file, & run the following commands (you must have ADB set up):
adb remount
adb shell rm /system/usr/keylayout/mahimahi-keypad.kl
adb push *path to downloaded file* /system/usr/keylayout/mahimahi-keypad.kl
Or you can just reflash your ROM, either way you'll get the same thing.
My phone is Nexus one.
My rom is Official v2.1-updated1.
When I execute the command as your indication.
"adb shell rm /system/usr/keylayout/mahimahi-keypad.kl"
rm failed for /system/usr/keylayout/mahimahi-keypad.kl, No such file or directory
What's wrong? And thank you for your quick reply.
hahabear said:
My phone is Nexus one.
My rom is Official v2.1-updated1.
When I execute the command as your indication.
"adb shell rm /system/usr/keylayout/mahimahi-keypad.kl"
rm failed for /system/usr/keylayout/mahimahi-keypad.kl, No such file or directory
What's wrong? And thank you for your quick reply.
Click to expand...
Click to collapse
Ok excellent that answers the second part of my question its failing to copy the file back over after deleting the original on certain ROMs.
You can just skip that step and go on to the "adb push" step. Also, can you run the command "adb shell cp" and tell me the output?
bingo! Thanks for your help. It's resolved.
On the other hand, I could get the mod.kl from SD Card, push again, Search2play will work, is that right?
hahabear said:
bingo! Thanks for your help. It's resolved.
On the other hand, I could get the mod.kl from SD Card, push again, Search2play will work, is that right?
Click to expand...
Click to collapse
Yes, but can you tell me what it says if you run the command "adb shell cp"
That will tell me if the issue is with the version of BusyBox on some ROMs.
Geniusdog254 said:
Yes, but can you tell me what it says if you run the command "adb shell cp"
That will tell me if the issue is with the version of BusyBox on some ROMs.
Click to expand...
Click to collapse
C:\N1root>adb shell cp
cp: not found
My god!!! It means there is not cp command in my phone?
hahabear said:
C:\N1root>adb shell cp
cp: not found
My god!!! It means there is not cp command in my phone?
Click to expand...
Click to collapse
Yeah exactly lol. Not sure if that was sarcasm or what, but thats what is causing the FC's and the failures some people are getting. And theres not a damn thing I can do about it.
I would recommend installing the CyanogenMod ROM, since it is fast, adds extra features, and supports cp Then the app will work just fine
Anyway. Thanks for your help. You are so kind. I will try new ROM later. And I will support your work. cu.
hahabear said:
Anyway. Thanks for your help. You are so kind. I will try new ROM later. And I will support your work. cu.
Click to expand...
Click to collapse
Thanks you very much for your support. Glad I could help you, if you have any other problems please email me, email listed in the market
Donate version now just to support me, added support for all devices to free version.
Please donate!
1.3 version uploaded
See changelog.
Any updates on newer phones?
KaliKot said:
Any updates on newer phones?
Click to expand...
Click to collapse
I can make it work for any phone without a NAND lock. Any requests?
I need to do the Galaxy S series, but the only one I can test is the Epic and I'm not sure if the others have different mount tables or not. Desire still has NAND lock so I can't do it. Not sure about Droid2/X. Just email/Twitter/PM me or post here with a request. I'll get back to you.

[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:

Categories

Resources