Installing Ubuntu on SGH i957 - Galaxy Tab 8.9 SGH-i957 Android Development

Users must be rooted with superuser access and a kernel which supports looping, such as DaGs.
It is recommended to have a full qwerty keyboard like the one found here:
https://play.google.com/store/apps/...9yZy5wb2NrZXR3b3Jrc3RhdGlvbi5wY2tleWJvYXJkIl0.
The following is a modification of the ubuntu installer guide:
STEP 1: Download Ubuntu Installer Free from the play store:
https://play.google.com/store/apps/...DMsImNvbS56cHdlYnNpdGVzLnVidW50dWluc3RhbGwiXQ..
STEP 2: Download any terminal like this one:
https://play.google.com/store/apps/...251bGwsMSwxLDEsImphY2twYWwuYW5kcm9pZHRlcm0iXQ..
STEP 3: Download android-vnc-viewer:
https://play.google.com/store/apps/...=W251bGwsMSwxLDEsImFuZHJvaWQuYW5kcm9pZFZOQyJd
STEP 4: Follow the directions in the ubuntu installer app for downloading the boot script and the ubuntu image of your choice.
Extract the ubuntu image and place it on your sdcard DO NOT PLACE IT IN THE SUBDIRECTORY UBUNTU AS THE INSTALLER TELLS YOU TO
Do the same thing as above for the ubuntu script.
STEP 5: Using any root explorer/browser, create the folder "files" in /data/data/com.zpwebsites.ubuntuinstall
STEP 6: Download busybox from the play store and install it to /system/xbin
Note: This step may be skipped if busybox is already installed via the play store, do not use the busybox included in the custom roms.
STEP 7: Copy, do not cut, the busybox image from /system/xbin to /data/data/com.zpwebsites.ubuntuinstall/files/
STEP 8: In the terminal emulator type the following commands:
su
cd /data/media/
sh ubuntu.sh
Note: this can also be accomplished by browsing as root in script manager and running the ubuntu.sh script as superuser but not recommended due to not being able to kill the ubuntu process.
STEP 9: For the screen resolution make it 1280x745 or x750, not sure which is perfect.
STEP 10: Open android-vnc-viewer, under password input "ubuntu", under address input "localhost", under port input "5900" then hit connect.
STEP 11: Using the menu button, go to more and select colors, change it to "24bit".
STEP 12: Using the menu button again change the input method to "touchpad".
If you want to exit ubuntu simply use your home button. If you want to kill the process, type "exit" in the terminal emulator.
Note: Once killing the process, ubuntu doesn't shut down properly as the script needs to be edited still for this device, so you will have to reboot your device to get back into ubuntu which is simply by doing step 8 and 10 again.
The debian and backtrack installer should work as well using this same process, they can be found here:
https://play.google.com/store/apps/...tes.debianinstallerfree&feature=search_result
and here:
https://play.google.com/store/apps/...es.backtrackinstallfree&feature=search_result
All credit goes to zpwebsites for the installer, though the modified method to actually get it to work on our devices was by me.

Glad you got everything working
Sent from my SGH-I957R using XDA Premium HD app

Yeah man, nothing like touchscreen Diablo 2 and we know have the ability to create roms and such straight from the tablet.

Whoa touchscreen d2... Genius
Sent from my SAMSUNG-SGH-I727 using xda premium

Backtrack... Now that could be real handy!

I have gotten this far... what am I doing wrong? Im rooted, with a kernel that supports looping devices, andbusybox installed... this is what I get:
$ export PATH=/data/local/bin:$PATH
$ su
# cd /data/media
# sh ubuntu.sh
Checking loop device... MISSING
Creating loop device... OK
mount: mounting devpts on /data/local/mnt/dev/pts failed: Not a directory
Error: Unable to mount /data/local/mnt/dev/pts!
# sh ubuntu.sh
Checking loop device... FOUND
mount: mounting /dev/block/loop255 on /data/local/mnt failed: Device or resource busy
Error: Unable to mount the loop device!
Sent from my SGH-I957R using XDA Premium App

Verify busybox is installed correctly, all applets should be installed, if they come up with a red x, reboot your tablet and try again, I've had problems with busybox not installing correctly in the past.

Also, I haven't tried installing Debian and could not get backtrack to work, only Ubuntu so far.

Try to download backtrack again ..
Sent from my ODYS-Chrono using xda app-developers app

paulopais said:
Try to download backtrack again ..
Sent from my ODYS-Chrono using xda app-developers app
Click to expand...
Click to collapse
Were you able to get it working
Sent from my PD15100 using Tapatalk 2

I didn't have to do anything especial...
I just downloaded this and followed instructions...
https://play.google.com/store/apps/details?id=com.zpwebsites.linuxonandroid
It is rather slow though... I thought it would have been quicker...
I only tried full Ubuntu though...
Sent from my PD15100 using Tapatalk 2

Installation guide for Linux/*BSD ? ( NOT Android, Without Adroid. Adroid involved )
Any chance seeing a installation guide for Linux/*BSD WITHOUT any Android at all, what so ever ?
This has nothing to do with Android

Related

Ubuntu/Debian install for Slide

Ok so the ubuntu install now works on slide credit goes to eratosthene he updated all the files to make it work all other credit goes to the dev’s listed on the links provided. FYI this was tested on eugenes latest froyo rom.
1. Go to http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/ download the ubuntu.zip file .
2. Unzip to a location on your pc to a folder named ubuntu.
3. Download the ubuntu-slide-v2 from here.
4. Unzip the ubuntu-slide-v2 to the same folder you used in step 2.
5. Create a ubuntu folder on the root of your sdcard .
6. Connect your Slide to the pc verify debugging enabled and storage disabled.
7. Adb push the files in the ubuntu folder to the /sdcard/ubuntu.
8. Then adb shell.
9. cd /sdcard then sh ubuntu.sh
Note: At this point, the scripts are now located in /data/local/bin and the mount point is /data/local/mnt
10. sh /data/local/bin/bootubuntu
11. you should now see [email protected]:/#
Note : install completed only do the following if you want to access ubuntu from android vnc app.
12. apt-get update
13. apt-get install tightvncserver
14. export USER=root
15. vncserver -geometry 480x320
16. • Run the android-vnc-viewer app and specify localhost port 5901 .
UPDATE: This is not working on CM 6 , I'm not sure why please help if you know .
That would be sooooo coool
Sent From My HTC Espresso Running Froyo Thanks to eugene373
Tried it but the install fails , may be the script or may be rights to edit the files im not that good with linux yet so im not sure .
Ok thanks, any help would be apriciated . If we can get a procedure that works ill write up a step by step for everyone and maybe make a video how to also.
Just guessing but it's probably because we don't have rw access to /system.
Until we get an unlocked bootloader it ain't happenin...
I could be completely way off though
I think you are right , if i rember most the errors where do to access issue's with files in the system folder. If it is the bootloader what would need to be done to " unlock " it ?
bled82 said:
I think you are right , if i rember most the errors where do to access issue's with files in the system folder. If it is the bootloader what would need to be done to " unlock " it ?
Click to expand...
Click to collapse
An OTA update would unlock it.
So once we get the froyo ota we should be able to follow the same process as the nexus one then ?
i would say "unlikely," i dont see how an ota would unlock the bootloader in any fashion. but i guess he might have been referencing the possibility of someone using the new ota to create an unlocked bootloader. the whole "how could the bootloader be unlocked," question bothers me, i never seem to get a straight answer
aceraider4 said:
i would say "unlikely," i dont see how an ota would unlock the bootloader in any fashion. but i guess he might have been referencing the possibility of someone using the new ota to create an unlocked bootloader. the whole "how could the bootloader be unlocked," question bothers me, i never seem to get a straight answer
Click to expand...
Click to collapse
Once there is an official OTA devs will be able to extract the keys needed to properly sign files I believe.
I thought the engineering build had an unlocked boot loader on it and once we flashed it that was that ?
Here's an updated zip for you guys. The process is generally the same as on the above-linked nexus one version, I just changed the scripts to move a few files to different places. You'll need to download ubuntu.zip from that post as well. Summary:
unzip ubuntu.zip somewhere
unzip ubuntu-slide.zip in the same place, replace all the files
make a directory called 'ubuntu' on your sdcard
adb push all the files in the zip to that directory
adb shell
cd /sdcard/ubuntu
sh ubuntu.sh
At this point, the scripts are now located in /data/local/bin and the mount point is /data/local/mnt
sh /data/local/bin/bootubuntu
You're now chrooted into the ubuntu install. Have fun.
Thanks going to try it now !!!
Does not work get attached error.
bled82 said:
Does not work get attached error.
Click to expand...
Click to collapse
I haven't tried this but based on your error, try this from the shell:
mkdir /data/local/bin
then run the ubuntu.sh again
falken98 said:
I haven't tried this but based on your error, try this from the shell:
mkdir /data/local/bin
then run the ubuntu.sh again
Click to expand...
Click to collapse
I did cd /data/local then ls and bin is listed , ran mkdir /data/local/bin failed file exists . i cant cd /data/local/bin get error cant cd to /data/local/bin
bled82 said:
I did cd /data/local then ls and bin is listed , ran mkdir /data/local/bin failed file exists . i cant cd /data/local/bin get error cant cd to /data/local/bin
Click to expand...
Click to collapse
This is some other script messed up when bin wasn't there and ended up creating a file called bin instead of it being a directory.
rm /data/local/bin
mkdir /data/local/bin
falken98 said:
This is some other script messed up when bin wasn't there and ended up creating a file called bin instead of it being a directory.
rm /data/local/bin
mkdir /data/local/bin
Click to expand...
Click to collapse
Ok getting closer , Thank you very much . Now when i ran sh .data/local/bin/bootubuntu i get error attached .
bled82 said:
Ok getting closer , Thank you very much . Now when i ran sh .data/local/bin/bootubuntu i get error attached .
Click to expand...
Click to collapse
What rom are you using? It looks like you don't have the ext3 module built into your kernel. I set my scripts up to use ext3 (more reliable, I really don't care that it eats into the life of my sd card), but many roms only have ext2. You might try uncommenting the first line of bootubuntu, and changing the ext3 to ext2 on line 10.
eratosthene said:
What rom are you using? It looks like you don't have the ext3 module built into your kernel. I set my scripts up to use ext3 (more reliable, I really don't care that it eats into the life of my sd card), but many roms only have ext2. You might try uncommenting the first line of bootubuntu, and changing the ext3 to ext2 on line 10.
Click to expand...
Click to collapse
I am running froyo using Kanged CM6 newbuild.zip from eugene373 , http://forum.xda-developers.com/showthread.php?t=721515 .

root

Ok, to save some people some time here for rooting and opening it up to non-market apps on your bravo, and probably any motorola AT&T device.
1. Z4Root is the easiest way to root since you just get it from the market. One buttons press then done.
2. to modify the settings.db in /data/data/com.android.providers.settings/databases/ use the SuperOneClick which you can get here
http://forum.xda-developers.com/showthread.php?t=803682
3. I used root explorer, which you can get from the market and just edited the /system/etc/motorola/com.android.providers.settings/secure.mkitso
and /system/etc/motorola/com.motorola.android.providers.settings/settings.mkitso files in place. Copying them, editing them, and chmodding them didn't seem to work for me for whatever reason. The way I did it, you don't have to do anything other than edit the file in text editor and factory reset your phone.
Rooted mine the other day using the Droid 2 root method at modmymobile.
I can't post links yet, so here's the instructions:
dragonius said:
Setup:
- Make sure you have ADB installed properly and the latest Motorola drivers.
- Download attached archive
- Extract to a directory, I used C:\Droid2Root
- Make sure you have USB degugging enabled
- Change connection to PC Mode
Process:
- Open Command Prompt (Start - Run - cmd - Enter)
- adb devices (to verify the connection)
- cd C:/Droid2Root
- adb push Superuser.apk /sdcard/Superuser.apk
- adb push su /sdcard/su
- adb push busybox /sdcard/busybox
- adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage-arm5.bin
- adb shell
- cd data/local/tmp
- chmod 0755 rageagainstthecage-arm5.bin
- ./rageagainstthecage-arm5.bin
- Let the process run until the prompt returns you to C:/Droid2Root (be patient, it takes a while, but does happen. If not, reboot phone and try again.)
- adb devices (to verify the connection)
- adb shell (you should now have a # prompt)
- mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
- cp /sdcard/Superuser.apk /system/app/Superuser.apk
- cp /sdcard/su /system/bin/su
- cp /sdcard/busybox /system/bin/busybox
- chmod 4755 /system/bin/su
- chmod 4755 /system/bin/busybox
- mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
- exit
Once you have achieved root, to update the Superuser.apk to the latest version, run these commands:
- adb shell
- su
- mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
- rm /system/app/Superuser.apk
- pm uninstall com.noshufou.android.su
Then search on the market for Superuser and download the one by ChainsDD. Confirmed working on latest Droid2 2.2 OTA & the new leaked 2.3.15 OTA.
Click to expand...
Click to collapse
On the Bravo its not "PC Mode", I think its "Portal and Tools" Other then that, everything worked flawlessly.
Thanks, a bunch. I actually used the Z4Root app from the market and it worked flawlessly. Now I'm just trying to figure out how to allow non market apps and maybe get an overclock going on this. any suggestions?
Grape Drank said:
Thanks, a bunch. I actually used the Z4Root app from the market and it worked flawlessly. Now I'm just trying to figure out how to allow non market apps and maybe get an overclock going on this. any suggestions?
Click to expand...
Click to collapse
I just bought this phone for my younger brother and I'm impressed. I have a Droid Incredible and its just as smooth. I also verified that the Z4root app from the marketplace roots the phone.
Did anyone get it unlocked yet
Yeah, it's a great phone. I'm trying to get the settings.db thing to work so we can install non-market apps, but it doesn't seem to be working. I got the db modded and put back in place, but I still don't see the option in the application manager screen.
IMO this is the #2 android phone on AT&T next to the captivate. that SAMOLED is great and the GPU on the captivate is top notch.
Anyway, if anyone can assist on the non-market app thing that would be great.
So far, I have rooted with Z4Root, removed the AT&T crapware, installed the MarketAccess to get around the stupid AT&T market filters. Last thing is to get the non-market apps going. After that it's a matter of waiting for this device to gain popularity and some custom ROMs.
I managed to get my Bravo to install non-market apps using:
1. SuperOneClickv1.5.5-ShortFuse
2. Click Here
I am not sure if just step 2 alone would be OK though.
Remember, you have to factory reset after you have finished with step 2.
Good Luck!
I edited my original post with the steps and tools I used to get the phone rooted and non-market unlocked.
Wait so can some explain how to unlock it?
Sent from my SGH-T959 using XDA App
cooldead said:
Wait so can some explain how to unlock it?
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
If you mean "unlock" as in able to use the phone on a different carrier no one has posted how to do it yet. The OP meant allowing non-market apps.
Got cha, thanks.
Sent from my SGH-T959 using XDA App
cooldead said:
Got cha, thanks.
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
No problem
I'm lost here,
Downloaded z4root onto my phone because it's not available on Market,
but it won't let me run the z4root.apk because it's not a market app.
total newb here, so any help would be appreciated.
thanks
Nevermind, got z4 to install using Android Central's Sideload Wonder Machine, then rooted my phone no problem, installed TiTanium backup, and rid of the bloatware.
Phone processes quicker, from settings, fetching list of running apps, data manager, manager etc, list loads much quicker now.
How did you go about getting rid of the garbage-ware? curious.
Hi I'm posting here in hopes to get a response because I cannot seem to get a response on the S1C forum. I rooted with z4root but cannot get non market apps enabled using S1C. I have .net framework 4.0 using vista and the motorola drivers from their site. I get as far as "getting mount path" and then it fails. Am I missing something or should this be working for me. And if so, what could be the problem? Many thanks.
SideloadWonderMachine worked for me, give it a shot. 2 clicks to add an app. Pretty foolproof (I am a fool).
Rooted my Bravo using adb install z4root (linux PC) then ran z4root from phone, worked great.
just rooted Bravo using Droid2Root files and manual ADB commands, from the thread that Gumpo10k shared in this thread, up above. Worked great, now I need a good 2.2 ROM to get tethering working.

[Q] Problem with Fix Permissions (line 64: UID readonly variable) [WORK AROUND FOUND]

Latest!! Switch to TWRP 2.1.8 (June 18th 2012)
Anyone else having a problem Fixing Permisshions? And how did you fix it?
I noticed it would take 2 seconds to run, so I decided to go to "Show log"
Here is the log
I:Checking for extendedcommand, file not found...
/sbin/fix_permissions: line 64: UID readonly variable
Done!
ro.carrier=unknown
ro.bootloader=unknown
ro.hardware=qcom
ro.revision=0
init.svc.recovery=running
init.svc.adbd=running
Tried:
Running from Rom Manager but it always stalls, never the same place and if I run it multiple times back to back it stalls sooner and sooner
touch recovery
re-installing recovery
clearing download in rom manager and re-installing recovery
setting rom manager to delete recovery before installing
Wipe / reset, wipe cache & dalvik, with superwipe 2 times and re-installing
ClockworkMod Recovery v5.0.2.7
Running [ROM] [cwm]-BLACKEDITION FOR THE SGS2 4-10-2012-ICS RC6
A work around has been found! Thanks to RealPariah, so thank him here!
It is not a fix due to the fact that you still will not be able to fix permissions in CWM or Rom Manager but does get the job done of Fixing Permissions!!
1st Do you have the Google android installed?
If not download and install it! http://developer.android.com/sdk/android-4.0.htm
you might need to install the JDK, if you don't have it already.
2nd Your path to adb must not be set or is not correct.
See http://forum.xda-developers.com/show....php?t=1161776
Now you should be ready to use adb!
STOP!
Fixed in this New CWM Recovery or
GOTO THE DEVELOPMENT THREAD!
http://forum.xda-developers.com/showthread.php?t=1604581
Most recent Fix Script / Work Around found here
http://forum.xda-developers.com/showpost.php?p=25023284&postcount=22
Boot in to Recovery
plug USB in to phone and computer
In Recovery Go in to "mounts and storage" and mount /system and /data
On computer open a command line window (windows) [click start] then [run] then type "cmd" to get a command prompt or terminal (Linux or OSX)
Run "ADB devices" and be sure it is not all ? For device number (if it is restart recovery and reseat USB connection and run "adb kill-server" on computer) I had to run terminal as root (admin for best results bit got it to work either way really)
Now type "adb shell" enter
Once that opens and you get ~#
now type cd /sbin
then type
sh fix_permissions -l -r
done correctly, your command prompt should look like the following
C:\Documents and Settings\family>adb shell
~ # cd /sbin
cd /sbin
/sbin # sh fix_permissions -l -r
sh fix_permissions -l -r
fix_permissions 2.04 started at 04-18-2012 02:28:21
Processing (1 of 177): com.google.android.location...
Processing (2 of 177): com.sec.android.app.phoneutil...
Processing (3 of 177): com.android.defcontainer...
Processing (4 of 177): com.sec.phone...
Processing (5 of 177): com.android.contacts...
Processing (6 of 177): com.android.phone...
ORIGIONAL
RealPariah said:
Fix permissions fix found!
Alright after testing fix permissions I found a way to make it run!
Issue: fix permissions won't run from recovery (correctly (it says done in less than 60 secs and stops instantly for me saying completed and while in Android; ROM manager script runs but freezes at random points (same if you open terminal emulator and run it).
Resolution:
You have to have adb on a computer for this
Do you have the Google android installed?
If not download and install it!
[/url]http://developer.android.com/sdk/android-4.0.html
Boot in to Recovery
plug USB in to phone and computer
Go in to mounts and storage and mount /system and /data
On computer open a command line window (windows) or terminal (Linux or OSX)
Run "ADB devices" and be sure it is not all ? For device number (if it is restart recovery and reseat USB connection and run "adb kill-server" on computer) I had to run terminal as root (admin for best results bit got it to work either way really)
Now run "adb shell" after mounting /system and /data
Once that opens and you get ~# run "sh fix_permissions -l -r" just like that (with two separate - don't do -lr or it won't run)
Of it says not found mount /system
If it says something about read only variable you forgot the preceding sh (may need to do "cd /sbin" then "sh fix_permissions" if you still have an issue.
This is only way I can get fix permissions to run (even tried sh fix_permissions -l -r in Android terminal emulator and script manager to no avail)
After fix permissions ran correctly it really helped iron some small performance issues and notably helped.
I hoped that helps!
Sent from my SAMSUNG-SGH-I727 using Xparent Green Tapatalk 2
Click to expand...
Click to collapse
I have the same issue on multiple roms. Both gingerbread and ics. If you find the solution please share. I will do like wise if i find the answer.
Sent from my brain
Seems this one has people stumped.
Mine actually works on juggernaut every time.
Sent from my GT-P7510 using xda premium
jangst123 said:
Seems this one has people stumped.
Mine actually works on juggernaut every time.
Sent from my GT-P7510 using xda premium
Click to expand...
Click to collapse
Yep! Was going to say this. Fix permissions doesn't work on most roms in this section.
Jug and Macnut (based off of jug) are the only two I have had it work on.
Sent from my SGH-T989 using xda premium
I have only experienced this on ICS Roms, on GB roms Permissions work fine for me.
solracarevir said:
I have only experienced this on ICS Roms, on GB roms Permissions work fine for me.
Click to expand...
Click to collapse
Well see this is the problem.... You think it is working but have you checked logs?
Sent from my SGH-T989 using xda premium
Also having the same problem with Fix Permissions instantly finishing, but with the "/sbin/fix_permissions: line 64: UID readonly variable" error in the logs. Trying in ROM Manager also results in in random results each time I try, but never making it all the way through before it just hangs. The furthest I've gotten is 94 of 132.
Also on ICS Blackedition, but still on RC2.
I just tried another ICS rom and I still cant fix permishions. So I tried CM7 and it works fine.
Looks like this is a problem with ICS.
Sent from my SAMSUNG-SGH-T989 using xda premium
Easydoesit ics rom works when fixing permissions in cwm or from manager. Other ics roms don't so far
photrash said:
Easydoesit ics rom works when fixing permissions in cwm or from manager. Other ics roms don't so far
Click to expand...
Click to collapse
What easydoesit ICS rom!?
The only one I see has no ice cream.
Sent from my SAMSUNG-SGH-T989 using xda premium
jangst123 said:
What easydoesit ICS rom!?
The only one I see has no ice cream.
Sent from my SAMSUNG-SGH-T989 using xda premium
Click to expand...
Click to collapse
I don't know but for some reason it's in the general forum and never made it to the development section. Remember to use the autorotation fix since the OP didn't update the ROM yet. http://forum.xda-developers.com/showthread.php?t=1576617
I ran into some weird superuser error...sometimes i lose root access when im trying to delete or change a system file. maybe i gotta wipe data and caches some more and reflash.
The fix permissions work fine for this ROM work fine in CWM and also in ROM manager
photrash said:
I don't know but for some reason it's in the general forum and never made it to the development section. Remember to use the autorotation fix since the OP didn't update the ROM yet. http://forum.xda-developers.com/showthread.php?t=1576617
I ran into some weird superuser error...sometimes i lose root access when im trying to delete or change a system file. maybe i gotta wipe data and caches some more and reflash.
The fix permissions work fine for this ROM work fine in CWM and also in ROM manager
Click to expand...
Click to collapse
I'll check it out later.
But if this is ture I hope a developer takes a look at it and figurers out why fix permishions only works on that ROM and not the other ICS ROMs
jangst123 said:
I'll check it out later.
But if this is ture I hope a developer takes a look at it and figurers out why fix permishions only works on that ROM and not the other ICS ROMs
Click to expand...
Click to collapse
Yeah that and the ORIGINAL leak by racer is the only ics roms that work. I tried all ics t989 roms haha. IM currently running some skyrocket roms and fix permissions isn't working properly in cwm. It's frustrating sometimes because I need it to work haha
RealPariah posted a workaround over in the Blackedition ICS thread that worked for me:
RealPariah said:
Fix permissions fix found!
Alright after testing fix permissions I found a way to make it run!
Issue: fix permissions won't run from recovery (correctly (it says done in less than 60 secs and stops instantly for me saying completed and while in Android; ROM manager script runs but freezes at random points (same if you open terminal emulator and run it).
Resolution:
You have to have adb on a computer for this
Boot in to Recovery
plug USB in to phone and computer
Go in to mounts and storage and mount /system and /data
On computer open a command line window (windows) or terminal (Linux or OSX)
Run "ADB devices" and be sure it is not all ? For device number (if it is restart recovery and reseat USB connection and run "adb kill-server" on computer) I had to run terminal as root (admin for best results bit got it to work either way really)
Now run "adb shell" after mounting /system and /data
Once that opens and you get ~# run "sh fix_permissions -l -r" just like that (with two separate - don't do -lr or it won't run)
Of it says not found mount /system
If it says something about read only variable you forgot the preceding sh (may need to do "cd /sbin" then "sh fix_permissions" if you still have an issue.
This is only way I can get fix permissions to run (even tried sh fix_permissions -l -r in Android terminal emulator and script manager to no avail)
After fix permissions ran correctly it really helped iron some small performance issues and notably helped.
I hoped that helps!
Click to expand...
Click to collapse
I had to do the "cd /sbin" thing before running "sh fix_permissions -l -r" inside the adb shell, but it actually ran without a hitch!
Not quite a solution, but it gets the job done!
You still will not be able to fix perms in CWM or ROM Manager
I had to do the same "cd /sbin" then "sh fix_permissions -l -r" to get it to work
mimicvii said:
RealPariah posted a workaround over in the Blackedition ICS thread that worked for me:
I had to do the "cd /sbin" thing before running "sh fix_permissions -l -r" inside the adb shell, but it actually ran without a hitch!
Click to expand...
Click to collapse
Thank you!! Been going crazy trying to find a solution!
Thanks for this. resolved some issues I had with a specific application force closing on me.
I am under the impression this has to do with the fact that a lot of I727 users, if not all, are having issues mounting /system inside of ICS. Mounting in recovery is fine but it seems that mounting /system inside of ICS works ONCE after flashing a kernel and then never again.
Wow, I'm really stuck. I tried without "SU" but that didn't help. Here is my cmd screen:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Adb>adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
26d7140a device
C:\Adb>adb shell
sh-3.2$ cd /sbin
cd /sbin
sh: cd: /sbin: Permission denied
sh-3.2$ su
su
sh-3.2# cd /sbin
cd /sbin
sh-3.2# sh fix_permissions -l -r
sh fix_permissions -l -r
sh: fix_permissions: No such file or directory
sh-3.2#
Any help or guidance is appreciated!
Give this a try and report back
First download http://www.getyourdroidon.com/shiversftp/fix_permissions.sh
Put it on the root of your sd card and go into terminal emulator.
Type: su and hit enter
Type: sh /sdcard/fix_permissions.sh and hit enter
Type reboot and hit enter
Should be all fixed.

[modules] cifs.ko, md4.ko, nls_utf8.ko, stock [4.2 / 4.2.2] 3.4.5-g4e6298b / gaf9c307

I have managed to get CIFS working on stock Nexus 10.
It's quite a bit more problematic on the Nexus 10 than normal.
There are 2 main issues to deal with. Newer versions of the Linux kernel require a UNC variable to be passed to them and the current version of busybox doesn't do this. There is a patch out. I have extracted the patched busybox binary from craigacomez's AOSP Nexus 10 rom.
(Check it out here: http://forum.xda-developers.com/showthread.php?t=1998585 ). Otherwise it should work on the stock mount command if you specify the unc= mount option with the share.
The other issue is the multiuser stuff. If you execute the mount command from inside Terminal Emulator (or a script program) it looks like it mounts ok and you can 'ls' in the directory but it doesn't work for Android apps, they just see an empty directory but if you do it via a 'adb shell' it works fine in Android apps. My theory is ADB is outside of the multiuser stuff. adb actually ships on the device.
1) Unlock bootloader (fastboot oem unlock)
2) Flash recovery adb flash recovery whatever.img
3) Root device (flash CWM-SuperSU-0.98.zip)
4) Install BusyBox (from the market)
5) Copy md4.ko and cifs.ko to device. The files can go anywhere you like. In this example I will just use the root of the sdcard. Some people like them in /system/modules or /system/lib/modules
6) busybox mount -o rw,remount /
7) adb shell
8) Override /system/bin/busybox with the patched version (maybe move it first so it's backed up).
9) insmod /sdcard/md4.ko
10) insmod /sdcard/cifs.ko
11) busybox mount -t cifs -o username=MYUSER,password=MYPASS,unc=\\\\192.168.1.1\\storage //192.168.1.1/storage /data/media/0/cifs/Storage
You will need to manually preform the last 3 commands each time you reboot the device from a adb shell.
NOTE: You can probably get rid of the -o flags completely. In theory the patched version of busybox makes the UNC bit redundant. Possibly you can use the stock busybox with the UNC flag and avoid using the patched one totally. I have just included it to be sure.
Make sure you type 'busybox mount' not 'mount', by default they are different binaries. Otherwise you can remove the /system/bin/mount command and make a new one linking /system/bin/mount to /system/bin/busybox.
Possibly there is some way to get the mount working in the multiuser environment without requiring busybox. If you figure it out please tell ☺
Some threads on the issue:
http://forum.xda-developers.com/showthread.php?p=34397868#post34397868
http://forum.xda-developers.com/showthread.php?t=733490&page=6
http://www.mail-archive.com/[email protected]/msg17650.html
The modules are for 3.4.5-g4e6298b.
EDIT: I added nls_utf8.ko by request
EDIT2: Since adb comes on the device, it is possible to use it to connect to local host:
1) Install cifs modules to /system/lib/modules
2) Install Script Manager from the play store
3) Copy script to device
4) Start SManager
5) Find your script and open it.
6) Tick the su box
7) Hit save
8) Goto home sccreen
9) Add a 'SMShortcuts' widget to your home screen
10) "Add one script shortcut"
11) Choose your script
12) Optionally use this pretty icon ☺
13) Give it a nice name like "Mount Shares"
Here is a shell script...
Code:
#!/system/bin/sh
# Your settings here
USERNAME="USERNAME"
PASSWORD="PASSWORD"
IPADDRESS="192.168.1.1"
SHARE="storage"
MOUNT_POINT="/data/media/0/cifs/Storage"
# If you need to change the mount command edit this
MOUNT_CMD="\
mount -t cifs \
\
-o \
user=$USERNAME,\
password=$PASSWORD,\
unc=\\\\\\\\\\\\\\\\$IPADDRESS\\\\\\\\$SHARE \
\
//$IPADDRESS/$SHARE \
$MOUNT_POINT"
COMMANDS="\
insmod /system/lib/modules/md4.ko; \
insmod /system/lib/modules/nls_utf8.ko; \
insmod /system/lib/modules/cifs.ko; \
$MOUNT_CMD
"
# Starting ADB...
PORT=`getprop service.adb.tcp.port`
setprop service.adb.tcp.port 5555
adb kill-server
adb start-server
stop adbd
start adbd
adb connect localhost
# Make sure we only use the first device (sometimes there is more than one)
SERIAL=`adb devices | head -n2 | tail -n1 | cut -f1`
if [ "$SERIAL" = "" ] ; then
echo "ERROR: Could not find ADB device.";
fi
echo Mounting share via adb...
adb -s $SERIAL shell su root -c "$COMMANDS"
# If you started adb, then stop it here for security:
adb disconnect localhost
stop adbd
setprop service.adb.tcp.port $PORT
start adbd
RESULT=`mount | grep $MOUNT_POINT`
if [ "$RESULT" = "" ] ; then
echo "Mounting failed..."
else
echo "Mounting sucess!"
fi
echo Done... You may close this script window.
EDIT3: Added usbserial.ko, option.ko and usb_wwan.ko
EDIT4: Some users have reported that the need to modify the script to get it working with their version of SU.
EDIT5: I have uploaded modules for 4.2.2, kernel 3.4.5-gaf9c307 but I haven't actually tested them myself (still on 4.2.1). Apparently the adb loophole has also been patched but it is possible to reenable it by putting a RSA key onto the device. Check out this set of instructions here.
EDIT6: I have updated to 4.2.2 on my Nexus 10 and can confirm the new modules work.
You must setup the adbkey or you will get a "device: offline" message. By default adb when adb first runs it tries to create the keys in the $HOME dir which is /data/.android, but the data directory isn't accessible by the 'shell' user.
I got it working simply by setting the HOME variable to /sdcard and restarting the adb server in the script then Android popped up a query (I have update the script above).
IMPORTANT: The Android Media scanner recursively scans folders for media to add the the database so it shows up in programs like Google Music. On large shares this can be a long process and use heaps of battery life. To prevent this add a blank file with the name ".nomedia" to the root of your mount points (or each individual share if you aren't used 1 folder for all your mounts). This will stop music showing up in programs though.
If you find that the device stops responding (the launcher might work but apps fail to load) or you get reboots (often after the previous bug) this is probably due to a bad wifi connection.
Is it posible to make a CWM flash file?
Great
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
alias_neo said:
This is great progress, do you know if there is some way I can use the same to mount my usb OTG with ADB shell so that I can read/write to my pen drives from my android apps/file managers?
I have tried using the busybox mount but that didn't work, do I need the modified mount or will none of this help anyway?
Click to expand...
Click to collapse
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
craigacgomez said:
Code:
busybox mount -t FSTYPE /dev/block/sda1 MOUNT_LOCATION
Example:
Code:
busybox mount -t vfat /dev/block/sda1 /storage/sdcard0/usbotg
Click to expand...
Click to collapse
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Although I don't have nexus 10, I am having the similar mounting issue on my nexus 7 until I saw this post.
Advise about "adb shell" really helps me resolve the multiuser issue.
Thanks for sharing.
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
H3g3m0n said:
1) Unlock bootloader (adb oem unlock)
Click to expand...
Click to collapse
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
momulah said:
Is it posible to make a CWM flash file?
Click to expand...
Click to collapse
Not a high priority right now as currently you need to do the manual adb shell stuff by hand to get things mounted, a little extra setup work isn't a huge difference.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
Are you mounting in a 'adb shell' or locally in something like terminal emulator? My OTG cable won't be here for a while so I can't really test myself.
weasal said:
Any chance you could post the nls-utf8.ko for utf8 support?
Thanks!
Click to expand...
Click to collapse
Posted, haven't tested it but it seemed to insmod fine.
espionage724 said:
Isn't it fastboot that unlocks the bootloader, and not adb? (unless adb can do it too; I've only heard of fastboot though)
Click to expand...
Click to collapse
Yeh typoed, i'll fix that now.
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
alias_neo said:
How is this different to what I'm doing already? Mounting this way doesn't work, only the process that mounted it can see the files.
Click to expand...
Click to collapse
I've been working on getting OTG support natively in my AOSP based custom ROM and I have had some success... check out my ROM for details
H3g3m0n said:
Currently I'm thinking of ways to hack around the 'adb shell' requirement, as a basic hackish fix would be to make a program that turns on adb wireless, connects to the local device and issues a command. Of course possibly there is a 'proper' way to do mounting. Another lazy way for those with their shares on a Linux system would be a script issue commands to the server via a ssh, getting it to log back into the phone and mount stuff over adb wireless.
Click to expand...
Click to collapse
Just wanted to thank H3g3m0n as I was able to successfully mount over adb. Also came up with a workaround to bypass connecting to a PC, grabbed the arm fastboot binary from this thread and installed it on my nexus 7. Used it to connect wireless adb on the 10 and ran the mount commands on the 7.
H3g3m0n said:
Posted, haven't tested it but it seemed to insmod fine.
Click to expand...
Click to collapse
Thanks, I'll give it a try!
You might find my posts #156 and #162 at http://forum.xda-developers.com/showthread.php?t=1781411&page=17 helpful.
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
spdwiz18 said:
Sorry for the noob ? ...
What are the KO's do?
What is the practical use of then.
Sorry I did a little research on then but I could not find an answer in layman terms
Thank you for allowing me to learn.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
http://en.wikipedia.org/wiki/Loadable_kernel_module
craigacgomez said:
http://en.wikipedia.org/wiki/Loadable_kernel_module
Click to expand...
Click to collapse
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
These modules are needed to enable support for CIFS (Windows share) mounts...
spdwiz18 said:
That helps allot.... Now i have an understanding of ko's in general. But what specificly do the modules this thread refers to do and the practical use of then. Thanks foot the help.
Sent from my toroplus using xda premium
Click to expand...
Click to collapse
Basically you can setup a shared folder from a remote computer. It allows you to have files on another system accessible as if it was part of the internal storage in the device.
Just found out that Android ships with the adb binary on the device itself (after crosscompiling it myself :/, oh well the experience was useful).
It should be possible to setup a script to start the adb server, connect to the localhost and execute the mount without too much difficulty.
Ok, added a script and instructions to the front page for simple on tablet mounting.

[TUTORIAL]All you need to know to flash a ROM on LG-P350

Hi guys, this is my second tutorial and in this one I will show you every thing you need to do to flash a custom ROM on the LG-P350. So let's get started.
DISCLAIMER: This is tampering with the system itself and if done incorrectly a simple factory reset will not fix it. It is YOU who is doing this on your phone and I am in no way responsible if any damage happens to your device. (tough it shouldn't if you follow these steps carefully) You have been warned!
WHAT WE NEED :
1.An LG-P350 running stock Froyo
2.LG mobile united drivers, get them from here https://docs.google.com/file/d/0B7Faau7Enf-Bc1hhbWRtTkczNEE/edit?usp=sharing
3.A PC running Windows (can be done on linux too but this guide is based on Windows)
4.A microUSB data cable.
5.The official Android SDK obtained from http://developer.android.com/sdk/index.html Make sure you select the version for your OS (32-bit or 64-bit)
6.USB debugging to be on. Go to Settings>Apps>Development>Turn on USB debugging
7.ADB to be properly set up.
8.Patience to read this thread carefully
1. Root
Ok so what is root? Well simply said rooting gives us the permission to modify parts of the Android system itself. Normally when you try to tamper with it it would simply say that either you don't have the privilege to do so or it would fail. When we have root permissions then you can change anything you want.
Note: Be careful tough, removing or modifying some parts of the system can damage the system and prevent it from working/booting. Always make a nandroid backup (will talk about this later) before editing anything in the system.
Now for the rooting itself.
Most versions of the software for the P-350 can be rooted using gingerbreak, which can be found here http://forum.xda-developers.com/showthread.php?t=1044765 Get the newest version, copy it and install it on your phone and follow the instructions on screen.
For those who prefer some other root method you can also use z4root which can be found here http://forum.xda-developers.com/showthread.php?t=833953 or superoneclick which can be obtained here http://forum.xda-developers.com/showthread.php?t=803682 (For superoneclick you need the USB cable and drivers installed)
2.ADB
Ok so what is ADB? ADB is a short term for Android Debug Bridge. It is one the most essential tools in the Android world and is used for a number of things such as sending commands (which can do anything you imagine with the device), getting various log data etc.
To set it up you will have to get the latest version of the official Android SDK (look for the link in the Introduction). Once you've downloaded the sdk you will get a .zip file you need to extract. I extracted mine to C:\Program Files (x86)\Android\ (so this guide is based on that) but it can really be anywhere. If you decide to put a different directory then adapt the guide to it. Once extracted you will get two folders. Here we only use the sdk one, the other one is for the Eclipse plugin used for application development. Open up the cmd from the start menu and then input these codes.
Code:
cd C:\Program Files (x86)\Android\sdk\platform-tools\ (you adapt this to your case if you didn't extract it there)
adb shell
Do this with your device connected otherwise it's pointless.
NOTE1: In order for adb to recognize your device you must have the drivers installed.
NOTE2: If you are too lazy to type all this every time you can make a .bat script. Open up notepad and copy/paste these codes
Code:
cd C:\Program Files (x86)\Android\sdk\platform-tools\ (adapt to your location)
adb shell
pause
After that just click on File and click Save as. In the window that opened, under file type select all files and on the file name save it as adb.bat
Now whenever you want to use adb you can just double click on the script you made and it will open up adb instantly leaving out the hassle of typing in commands every time.
3.Recovery
Now that we have root it's time for the recovery module.
The recovery allows us to modify parts (or even the entire) system by "flashing" (installing) .zip files prepared by our developer. They can be tweaks,fixes, additional features or even a completely new version of Android. There are a couple of ways to do this and the choice is yours.
Before you do this you need to get a recovery image. We have a couple of them for our device:
1. AmonRa-The very first recovery for our phone. It is outdated and generally not recommended for use. If anyone wants it you can get it here http://forum.xda-developers.com/showthread.php?t=1080911
2. CWM (clockwork mod recovery)- One of the most popular recoveries around. It is a well made piece of software which will make flashing simple and fast. We have a couple of versions for our phone and the links are here:
http://forum.xda-developers.com/showthread.php?t=2075797&highlight=recovery ClockWorkMod 6.0.2.7
http://forum.xda-developers.com/showthread.php?t=1768895&highlight=recovery ClockWorkMod 6.0.1.4
You will also need a flash_image file gotten from https://docs.google.com/file/d/0B7Faau7Enf-BTURDQmp1OWIzVGM/edit?usp=sharing
Method 1: cmd
Ok so this tutorial is from a developer who has retired and who made the original recovery our phone. All credits for that go to him.
Also note that it is recommended to reboot the device prior to flashing to increase the RAM.
1.Copy the .img file and copy the flash_image file to the rood directory of your sd card NOT in some folder. If you got your recovery in a .zip then extract the .img file from it and copy it and the flash_image file to the root of the sd card.
2.Using ADB shell copy these commands into the cmd :
Code:
$ su
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock1 /system
# cat /sdcard/flash_image > /system/bin/flash_image
# chmod 755 /system/bin/flash_image
# sync
3.Now flash it:
Code:
$ su
# flash_image recovery /sdcard/*insert image name here*.img Here you should put the name of your .img file without the starts ofc :)
# sync
4.After that if no error occurred you can type this in
Code:
reboot recovery
WARNING: If some sort of error showed up DO NOT type in reboot recovery. This could brick your device. Instead restart the phone and start over.
Method 2: Venkat's toolkit RECOMMENDED
This toolkit does the same from above but it does it automatically without the user having to do anything. You can get it from here http://forum.xda-developers.com/showthread.php?t=1948326 It can also be used for rooting.
It is also recommended to make a nandroid backup of your current system in case you want to go back. Nandroid backup is a complete copy of your system as it is when the backup was made. It backs up EVERYTING not just apps and data, so it is a perfect thing to have if a ROM or a tweak you are trying render the phone unbootable since you can just restore the backup you made and no harm done.
That is recovery. Now you can use it to flash whichever ROM for our device you choose. You can boot to it either by typing in adb/terminal reboot recovery or by pressing the following buttons when the device is turned off: Power + Call + Volume Down. Also don't worry if the touchscreen doesn't work in the recovery. That is normal use the volume up and down buttons to navigate menus and either the menu button(for amon ra) or the call (CWM) to confirm your choice.Use the back/power button to cancel/go back.
4.Flashing
Flashing is a process where we install the entire system or its parts contained in .zip files from the recovery module.
NOTE When you get a flashable .zip package DON'T extract it to the sd card. Copy it as you got it to the root of the sd and then continue.
Now that you've gotten the ROM you desired the process is pretty straight forward. Copy the .zip file you got to the root directory of your sd. Once you've done that, reboot to recovery and make a nandroid backup (if you haven't done so already) and go to the option install zip from sd card. Then choose the .zip you copied and confirm. After it says install complete you can reboot your device.
NOTE 1: Flash only things that are either universal or made for this device. Flashing stuff not made to work on this device could damage it.
NOTE 2: When flashing new ROMs you MUST wipe Dalvik cache,cache and data partitions. It is also recommended to wipe Dalvik cache when flashing kernels.
Those are pretty much all the basics you need to get into the flashing stuff You can find loads of ROMs and other tweaks on the official P-350 forums here on xda http://forum.xda-developers.com/forumdisplay.php?f=1769
You can also find info and development support on our Facebook page https://www.facebook.com/groups/p350development/
Revision 1: Added tutorial for setting up adb, explaining what adb is, as well as an adb script code.
i think this thread need to stick, try to contact mods
A comment on the 'adb' way. Before executing the commands, you might want to cd to where adb.exe is because you will have an error executing the command and the terminal will show 'adb is not a valid command'
Sent from my X8 using xda premium
---------- Post added at 07:09 AM ---------- Previous post was at 07:07 AM ----------
And installing android sdk is optional because there are standalone adb available for download.
Sent from my X8 using xda premium
Ya sticky this thread mods, cuz' i read, Many people stuck at LG Logo or fastboot mode even hard reset when flashing ROM without recovery before..
Sent from my LG-P350 using xda app-developers app
rho57 said:
A comment on the 'adb' way. Before executing the commands, you might want to cd to where adb.exe is because you will have an error executing the command and the terminal will show 'adb is not a valid command'
Sent from my X8 using xda premium
---------- Post added at 07:09 AM ---------- Previous post was at 07:07 AM ----------
And installing android sdk is optional because there are standalone adb available for download.
Sent from my X8 using xda premium
Click to expand...
Click to collapse
It already is set to the adb.exe path that's needed in order for adb to be activated on Windows. That's why we use the cd C:\Program Files (x86)\Android\sdk\platform-tools
And I know but there are a lot of other useful tools as well. And it is most reliable too.
Good job dude
Why complicated more then needed. Just make tut with andking toolkit.
boyan81 said:
Why complicated more then needed. Just make tut with andking toolkit.
Click to expand...
Click to collapse
Not complicated, this is a basic tutorial for those who don't want/can't use his toolkit. It also has some explanations about basic Android terms which you won't find there.
It would be nice if you update the wiki too, as there is an old but yet usable guide which pretty much has the same information written here...
Sent from my GT-S5830M using Tapatalk 2

Categories

Resources