MTP problem - T-Mobile Samsung Galaxy S II SGH-T989

I have problems with connecting my mobile phone with other devices after introducing MTP connection - when I am pluging t989 into tv, there is a info about problems with recognizing the device, the same prompt is on other devices such like Satelite receiver, etc. Earlier when I had usb storage connection I didnt have such problems. Can sb help me with that ?

sony11 said:
I have problems with connecting my mobile phone with other devices after introducing MTP connection - when I am pluging t989 into tv, there is a info about problems with recognizing the device, the same prompt is on other devices such like Satelite receiver, etc. Earlier when I had usb storage connection I didnt have such problems. Can sb help me with that ?
Click to expand...
Click to collapse
This is possible to fix with some ROM/Kernel pairs, but not all.
you need to run a series of commands to prepare things for "mass storage" mode, and then run a different set of commands before removing it to prevent data corruption and data mismatch. I have found that if you add files while in this "pretend mass storage" mode, you sometimes need to reboot for them to sync up properly.
all of the commands need to be run as root.
first you need to put your phone into mass storage mode by running:
setprop sys.usb.config mass_storage
if you need adb access, run the command as:
setprop sys.usb.config mass_storage,adb
then you need to tell the system where to "look" for the mass storage devices. I will include the optional steps too (mounting the sd cards in RO mode to prevent both systems writing to the card at once which will likely cause corruption):
mount -o remount,ro /storage/sdcard0
mount -o remount,ro /storage/sdcard1
echo /dev/block/vold/179:97 > /sys/class/androd_usb/android0/f_mass_storage/lun/file
echo /dev/block/vold/179:28 > /sys/class/android_usb/android0/f_mass_storage/lun_ex/file
when you are done with your mass storage stuff, you will need to run the following to remove these shares:
echo "" > /sys/class/androd_usb/android0/f_mass_storage/lun/file
echo "" > /sys/class/android_usb/android0/f_mass_storage/lun_ex/file
mount -o remount,rw /storage/sdcard0
mount -o remount,rw /storage/sdcard1
I have not (yet) tested this on a KK ROM, but it works nicely on hellybean with Diablo or Uber kernels. Technically, I suppose you wouldn't need to run the remounts, but I recommend it as you don't want a corrupted filesystem. And technically I guess you don't need to blank out the "file" afterwards, but I do as I don't want android thinking I'm still connected when I'm not.
I personally don't like MTP as it doesn't play as nice with other older devices as mass_storage, but mass_storage doesn't allow both the android phone and windows/mac/linux/etc to preform RW operations at the same time without a high risk of data corruption.

Related

Installing Debian Squeeze on Android Optimus - Walkthrough

Installing Debian Squeeze on Android Optimus S - Walk-throughs
This is slowly becoming a larger topic. So for now i will post various ways proven to work on the Optimus S and V as links below:
Installing Debian Squeeze on Android Optimus - Walk-through Compiled by uamadman
Install Debian Squeeze - non-loop sd-ext chroot method (prebuilt!) By bigsupersquid
ALL-Thumbs GUI to replace LXDE By bigsupersquid
4 Steps to Linux on your Optimus S - written by uamadman hosted by uamadman
All of this work was done by other people. I am simply compiling information and specializing it to the Optimus S.
This method does not require a pc, and everything is done through your android interface.
Current Abilities I've tested with success.
Play Sound
Surf the web
Access entire SD Card
Currently Working on:
Flash Support through IceWeasel
Completed:
Making this a simple download and phone restore - Done
Needs:
A GUI with bigger buttons and scaled for 480x320 - Done thanks bigsupersquid
Transparent Keyboard
Sources:
Howto Install Ubuntu by NexusOneHacks.net
secret hidden note to self psychocats.net/ubuntu/nonfree
Lets begin.
You need the following requirements:
Recommended: 2+ gigabytes of free SD card Space (Minimum 1.25gb)
A Rooted Optimus S
Kernel/Recovery: Xionia CWMA v1.2518.6
ROM:The Scott Pilgrim ROM (CM7 Gingerbread, Zefie Edition)
BusyBox Installer - You can get this from google apps store by JRummy16
Linux Installer – You can get this from google apps store by Galoula
Items worth having to things that make this easier:
A Wifi Internet Connection
A fully Charged Battery and a Wall Charger ^.^
2 Bottles of Mountian Dew
Your favorite Movie
and
The Patience to NOT Touch/use your phone for the 2 hours needed to complete the initial install process.
I started this endeavor with a clean install of the ROM listed above.
!!Make backups if you MUST save your data before you proceed any further!!
Warning: In The Simplest Terms(More detail will be in the final walkthrough)
Sometimes the Linux Installer doesn't work or if it is working and the process is interrupted while creating the .LOOP or extracting the build. The Linux Installer will stop working. I've found two (2) ways to fix the issues. The first is to go into setting and clear the cache for Linux Installer, Then open the superuser app and forget the permissions assigned to Linux Installer (Note: Try this a few times before resorting to a clean wipe, this method sometimes takes a few tries). The second is a clean wipe/recovery of the phone. Additionally if for some reason there is a interruption and the process stops. reboot the phone delete linux.loop off your sdcard and start from scratch. BEWARNED
*Walk-through - Under Construction*
To clarify any confusion the button names I use from left to right:
Home : Menu : Back : Search
Pre-Install Check List for Formatting/Reloading Rom
install sdcard with ROM/Recovery's
Reboot > Recovery
wipe data/factory reset
mounts and storage> format system
install zip from sdcard >choose zip from sdcard > update-cm-7-04282011-NIGHTLY
install zip from sdcard >choose zip from sdcard > gapps-gb-20110120
Remove sdcard with ROMS
Install sdcard marked for Linux
mounts and storage > format sdcard
reboot system now
Pre-install Checklist phone prep. (If you choose to overclock your phone this would be a great time to do it)
Wait 2 minutes for phone to fully load
tap droid
tap skip
tap next/done
Settings > Display > Screen timeout > 30 minutes
Settings > Applications > Check Unknown sources (not sure if nessesary)
Settings > Applications > Development > Check Stay awake (Required!!!!)
Settings > Accounts & Sync > Add Account (Go Through Menu's should take you though Market Install)
Market > Search Busy Box > tap BusyBox Installer by JRummy16 > free > ok
Market > Search Linux Installer > tap Linux Installer by Galoula > free > ok
Market > Search vnc > tap android-vnc-viewer Installer by androidVNC team + antlersoft > free > ok
Press Home Key
Apps> Busybox Installer >Allow Permissions> OK > Install
Install Check List
Warning
DO NOT ROTATE YOUR PHONE
ALLOW THE SCREEN TO SHUT OFF
LOCK THE PHONE
WHILE THIS APP IS OPEN UNLESS STATED
(you will see bad things if you do)
For Debian
Apps > Linux Installer > Allow SU Permissions > Allow SU Permissions > Allow SU Permissions > Click OK (First time start up, Yes 3 Approvals. If you don't recieve 3 notifications from super user it means Linux Installer is bugged. Go Settings>Applications>Manage Applications> under the Downloaded tab find Linux Installer > Select > Clear Data > Try step again. May take a few tries.)
Press Menu Key > Tap Setup > Tap File Size > Set to 1250 or more but must be less than the size of your SD Card.> ok > Press The Back Key (Linux installer will exit to your apps menu)
For Ubuntu - Currently bugged. I would avoid this. The source.list seems to have issues and won't download packages.
REQUIRED: Set you phone some where flat plugged into power Do Not Let The Screen Rotate!!!!!Apps>Linux Installer > Tap 1) Create target loop
Be Patient Wait until the Creating LOOP menu disappears. The length of time is dependent on the size of Megabytes set in the File Size option. About 10 minutes for 1500 Mb
Tap Liberate Loop -- Really Fast
Tap Format target loop (ext2) - This is the Buggy Part. If you get an Error message everything is most likely ok. Pickup your phone and Physically Rotate it so the screen rotates. Two additional menu's should appear. [3) Copy and Extract into loop and Install Linux Boot Script]
Lay your phone back down flat it doesn't matter if the screen rotates back to its original.
From here on DO NOT let the Screen Rotate Again! The process will be interrupted and you will get to start from step 1
Tap 3) Copy and Extract into Loop (it will start downloading and extracting the packages necessary to install Linux) This can take up to an hour. On a good 3g connection less than 45minutes.
Tap 4) Install into loop (This takes less than 10 minutes)
Tap Install Linux boot script
30 Seconds Later you officially have a version of Linux installed on your phone
CONGRATS
Verify Install Works
Apps > Terminal Emulator > Type: su > Enter > Grant Permissions > Type: linuxboot > Enter
You should get a string of code then get something like:
[email protected]:/
Most of the next portion comes from the Nexusonehecks.net
Setting up VNC and LXDE (so you don't have to look at terminal lines all day)
Apps > Terminal Emulator > Type: linuxboot > Enter <---If your not already in already.
Type > apt-get update > enter --- 5 minutes
Tight VNC Server
Type > apt-get install tightvncserver > Type y > Press enter --10 minutes
LXDE
Type > apt-get install lxde > type y > Press enter - 30 Minutes+
After a while you should get this screen
Press Menu > Preferences > Control key > Choose Camera Key > Back key > Back Key
Fully Depress the Camera Button Down and Tap the number 9 on the soft key board > Release Camera key > Tap Space Bar -- now two times more
Fully Depress the Camera Button Down and Tap the number 9 on the soft key board > Release Camera key > Tap Space Bar
Fully Depress the Camera Button Down and Tap the number 9 on the soft key board > Release Camera key > Tap Space Bar
The process should continue installing LXDE
tightvncserver Setup
Type> export USER=root > enter
Type> vncserver -geometry 1024x800 > enter
enter password > enter (use something simple you can remember i used 123123123 like they did on the nexusonehacks.net writeup)
verify password > enter
Press Enter after typing each line of the following code. Be Very Slow and Deliberate. Double Check Each line for Capitalization and accuracy before pressing Enter! I do not know how to edit this again --hidden note-->Perhaps some one can show me/tell me how
cat > /root/.vnc/xtartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession
Now Press and Hold the Camera Key and Tap D twice on the soft keyboard > Press Enter (it may ask to press 1 do not and only press enter)
If your camera key wasn't set look here to set it again--->Press Menu > Preferences > Control key > Choose Camera Key > Back key > Back Key
Setting up VNC on android ... After all those command lines I'm sure this is a very very nice change xD
Press Home Screen
Apps > androidVNCviewer > For Password enter 123123123 (Or whatever you set it to in the previous server setup)
Scroll to Port and enter 5901
Change the Color Format if you wish. It runs rather nicely on 24bit color but consumes more cpu cycles.
Tap Connect -- A Very Pretty LXDE should appear with a working CPU Monitor and everything nice
I know you want to play but we have a little more work to do this next step uses Terminal Emulator as the auto start/config file to boot linux and start and configure tightvncserver
Press Home
Open Termial > Menu Key > Preferences > Initial Command > Tap to Edit
Make Edit look like this
export PATH=/data/local/bin:$PATH
linuxboot
vncserver -geometry 600x480
Tap OK > Back out of Teminal to home
vncserver -geometry 600x480<--- this is where you change your screen size. you need a minimum of 600x480 to use the synaptic package manager and a few other things. but when i'm surfing the net or other things I prefer 480x320 (The Exact Size of the Optimus S Screen)
Now whenever you want to run linux simply open the Terminal Emulator. Wait 60 seconds for the code to run.
open androidVNCviewer and click Connect
DONE
Extra things go here
apt-get install synaptic - installs synaptic manager a nice GUI interface for the apt-get command
I have been running a Debian chroot on my optimus V for a few months now, squeeze and sid both work fine. I did it manually without the stuff from the market, and I use the sd-ext partition instead of a loop file
per your GUI issues:
I like xfce4 better than lxde on my optimus V.
Code:
apt-get install xfce4 xfce4-goodies
instead of lxde.
oh, also, the OP pointed out to me that
Code:
apt-get install xfce4-goodies
alone will also pull down xfce4 as a dependency (and that I left out the word install which is now corrected.)
modify the /root/.vnc/xstartup accordingly.
replace
Code:
icewm&
lxsession
with
Code:
xfce4-session&
or, you can cut-and paste my complete file here:
Code:
echo "#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
export XKL_XMODMAP_DISABLE=1
xfce4-session&" > /root/.vnc/xstartup
I have modified a theme for xfce to be more finger-friendly.
see attachment
decompress that file, it contains a folder, Xfce_large.
place the folder in /usr/share/themes
tap on the rat in the lower-left of the desktop (opens menu)
select Settings by tapping its arrow (xfce is twitchy about the menu through the VNC, it may take a few tries to select items on the main menu.)
select Appearance. Then Style.
Scroll down to Xfce_large and tap it, then tap Close at the bottom.
Voila, oversized scrollbars and menu bar buttons!
If you don't like the size, the settings I modified are in the gtk-2.0 subfolder of Xfce_large in the file gtkrc
the modified settings are not tabbed over like the rest of the settings in the file.
I also changed the default font size, icon size, icon font size, and DPI settings, but that has to be done in the settings menus.
The optimus display is about 120 DPI, the default is 75. 120 looks much nicer I think.
You are awesome
good luck with flash. gnash only plays ads on my V, not whole videos.
get-flash-videos from google code works nicely, but it's a capture utility.
it does try to play with mplayer, but only shows a couple of frames per few seconds because the VNC display method of manually copying the framebuffer is very slow.
using a bandwidth meter (debian package cbm to be exact) the vnc uses from 14 to 80Kb per second of system bandwith on device l0.
I don't know what's pegging your CPU use, mine only tops out when the debian system is doing something. I built my chroot with debootstrap instead of using the market installer, no telling what is preinstalled on the image it downloads.
I am going to try this out once i'm finished trying to get the ubuntu side of the house working.
Can I append this to my post here and androidcentral with proper credits due to you so all may share?
uamadman said:
...Can I append this to my post here and androidcentral with proper credits due to you so all may share?
Click to expand...
Click to collapse
certainly. just test the instructions for functionality before adding them in.
I considered starting a thread on this myself but never got around to it.
I'll continue to contribute info as this develops.
as an extra, here's a link I've posted, a few places on both forums, with a clean debootstrapped debian filesystem, tarred up to shrink it for download.
I goofed a bit when compressing it though, when decompressed it's a single folder containing the filesystem.
http://www.4shared.com/file/iWuUtZgS/squeeze_05_2011tar.html
uncompressed, 9645 items, totalling 264.3 MB
compressed, 116.3 MB (121929580 Bytes)
this will either need the contents of the freshsqueeze folder it contains copied to an ext2 (or ext3/ext4 if you want to brave the damage from journalling on a SD card, which seemed to cause corruption when I tried ext4) partition on your SD card, or, copied into a blank loop ext filesystem if you prefer.
with an empty debian img file mounted as a loop filesystem on a linux box, you can copy everything from the freshsqueeze folder to the loop filesystem by:
Code:
cp -av /path/to/freshsqueeze/* /path/to/loopmountedimg
the loop filesystem method should allow you to continue using your startup scripts as-is, they'll need slight modifications to work with an ext partition like I'm using.
its resolv.conf and sources.list are already configured for 3g access and the main Debian repository, so it's pretty much plug-n-play. no extra packages are installed, you'll need to apt-get tightvncserver and a window manager of your choice, unless you just want the bash shell.
the first time you chroot in, you should use passwd to set a root password, and adduser to get a non-root account on there.
this is not a loop filesystem like what you are using. it is a full directory tree of a base squeeze install.
I would like to see this on the V.its my only phone right now.if I had 2 I would try it.
Sent from my BumbleV using XDA Premium App.
ummkiper said:
I would like to see this on the V.its my only phone right now.if I had 2 I would try it.
Sent from my BumbleV using XDA Premium App.
Click to expand...
Click to collapse
I don't think a chroot can hurt your phone. I even run mine bind-mounted into the root filesystem, with system r/w, and haven't ever had any problems a reboot didn't solve. and it's been since April since I had a forced reboot from running stuff in debian.
now, I don't know about the installer from the market, if it asks for root access multiple times, I'm not sure just what it's doing. I'll post my sd-ext startup script and instructions for using it here after dinner if you want to try it that way instead of with the installer app.
honestly, it's a much simpler process than the OP, but, hey, if it works, I'm not one to dismiss the method out-of-hand.
bigsupersquid said:
I don't think a chroot can hurt your phone. I even run mine bind-mounted into the root filesystem, with system r/w, and haven't ever had any problems a reboot didn't solve. and it's been since April since I had a forced reboot from running stuff in debian.
now, I don't know about the installer from the market, if it asks for root access multiple times, I'm not sure just what it's doing. I'll post my sd-ext startup script and instructions for using it here after dinner if you want to try it that way instead of with the installer app.
honestly, it's a much simpler process than the OP, but, hey, if it works, I'm not one to dismiss the method out-of-hand.
Click to expand...
Click to collapse
Sounds good to me.
non-loop sd-ext chroot method (prebuilt!)
Standard disclaimer:
These scripts and chroot method may bork up your phone, trash your userdata, destroy system files, get you slapped by your mother, make your phone catch fire and/or explode, and etc., ad nauseum.
Use at your own risk.
MAKE A NANDROID BACKUP BEFORE DOING THIS!
You'll probably be just fine, but it's nice to have a backup in case something goes haywire.
Disclaimer aside, it's worked great for me since March, hasn't crashed for months, and I use it multiple times per day.
My main inspiration was Saurik and his Debian & Android together on G1.
I'm sorry that I can't point to all the many, many sources I read through over the couple weeks it took me to get this set up, I took little bits from here, there, and everywhere, but Saurik's work was the main core of this system.
Apologies if you see some tidbit of your work in this... let me know and I'll be happy to give you credit.
Dysfunctions:
things that don't work while the chroot is running:
wifi hotspot in aospCmod and Bumblebee won't initialize; does work during chroot in aospCmod if turned on before chroot, though.
network info II app won't start during chroot; if opened before chroot it's fine.
ringtones on SDcard don't work in Bumblebee; but OI File Manager can read the sdcard during chroot.
these things still work ok once the chroot is exited on aospCmod. The chroot borks wifi on Bumblebee until reboot.
Click to expand...
Click to collapse
Info:
This script remounts / and /system both read/write and leaves them that way until you type exit in the bash shell of the chroot. Without r/w mounting of the / directory, installing Debian packages gives some errors, since it's running in the real root filesystem. Also, the / directory is wiped out on a reboot, so it's relatively safe to have mounted r/w. /system doesn't need to be r/w, I just like it that way, and I haven't had trouble with it since I was first experimenting with this. Feel free to modify the 'boot' script if having /system mounted r/w makes you nervous.
This has been tested on Zefie'sCM7 (outdated) and aospCmodOV ROMs.
It also worked on Bumblebee, but not as effectively.
The chroot will not stop Android from functioning. If Debian is busy with something, it will slow Android down, though.
You will still get/can make phone calls, text messages, etc. You can send the VNC viewer to the background and use Android apps while the Debian system is in the background.
Click to expand...
Click to collapse
On to the meat of the matter. I'm using an 8Gb SD card. I advise no smaller than 4Gb unless you just want to do command-line work in Debian and don't need a GUI.
First, these instructions require a Linux pc. On M$ Windoze? Use a Live CD or a virtual box, or you're on your own.
The first part of these instructions is to be completed on your pc. I'll let you know when to switch to the phone.
1) Mount your <empty> SD card on the pc. If it's not empty, back it up, because this will wipe it out. You'll need at least two partitions on it, three if you're using something like apps2sd (which I'm not using, and not really familiar with, so this tutorial is set up assuming you don't need to dodge an existing ext partition,) and another if you have a swap-enabled kernel and want to use it.
2) Use Gparted or a similar tool to partition the SD card. First partition FAT32 for Android, whatever size you feel you need. I'm using 1Gb.
Second partition is an ext2, ext3, or ext4 partition. Apps2SD style, you know what size and filesystem type you need here, I don't. For Debian on the 2nd partition, I advise 3Gb or more, ext2. ext4 corrupted my files, so I switched back to ext2. If you need an apps2sd partition, Debian will go on the 3rd partition, and you'll have to modify the two attached scripts accordingly.
If you're lucky enough to have a swap-enabled kernel, you can make a swap partition; it'll go last, whatever size is left. 256Mb-1Gb should be plenty depending on whether you use image processing or large compiling projects or some other memory hogging programs.
3) Mount the sd FAT32 and Debian ext partitions on the pc.
4) Download to your pc the base Debian Squeeze filesystem which I've debootstrapped, configured, and uploaded for you to save hours of hassle.
Also download to the same directory the two attached script files.
boot.txt
firstrun.txt
5) Open a ROOT shell. You need root privleges to untar the filesystem and retain its permissions. If you don't have a root shell, put sudo in front of the tar and cp-av commands.
6) cd to the directory you downloaded the squeeze_05_2011.tar.gz into. then type
Code:
tar -zxvf squeeze_05_2011.tar.gz
cp -av ./freshsqueeze/* /full/path/to/sdextDebianpartition
sync
and wait for it to finish.
7) type
Code:
cp ./boot.txt /full/path/to/sdFAT32partition/boot
cp ./firstrun.txt /full/path/to/sdFAT32partition/firstrun
sync
8) Now is the time to copy back the stuff you backed up from the SD card to the FAT32 partition, and any apps2sd style stuff if you have it. Then unmount your SD card and put it in the phone.
Now all remaining steps are done on your Optimus. You're finished with the desktop pc.
9) Open a terminal on your Optimus. I like SL4A, but Terminal Emulator works well too. Both are free.
10) Next step merges your existing Android system files into the Debian partition. This is neccesary because I haven't compiled a kernel and don't know of one for the Optimus with UFS enabled. So, Debian gets bind-mounted over the Android rootfs ( / directory) and having the Android system files accessible in the Debian filesystem is required to keep them playing nicely together, while protecting the original Android files from Debian at the same time.
Code:
sh /sdcard/firstrun
You won't need this script ever again unless you change ROMs and/or need to reinstall Debian. Changing ROMS without reinstalling a fresh copy of Debian may mess things up a bit since system files vary between ROMs and you'll still have the Android files from your previous ROM in your Debian filesystem.
This script and the 'boot' script are both listed at the bottom of this post if you want to read 'em.
11) Next, remount system r/w, copy the 'boot' file to /system/xbin and chmod 4755 /system/xbin/boot. If scripts are in /system/xbin and executable, you can run them with 'su -c'
Code:
su
mount -o remount,rw /system /system
cp /sdcard/boot /system/xbin
chmod 4755 /system/xbin/boot
mount -o remount,ro /system /system
OK, a basic Debian filesystem with no extra packages is now installed!
my Debian filesystem is on my 2nd sdcard partition. The comments in the 'boot' script should explain how to use another partition if you have apps2sd running or somesuch (I don't have many Android apps on my phone so don't need/use apps2sd function)
to use the script as-is, your linux flavor should be in the 2nd card partition. I use Debian, but any Debian-based distro should work, for example Ubuntu or DSL.
open a terminal and type
Code:
su -c boot
don't kill the terminal app... leave it running in the background.
when you're finished with linux, reopen the same terminal and type
Code:
exit
to cleanly dismount your linux. No reboot required!
Before you exit the first run of your new Debian system, you should download some packages. I advise tightvncserver, xfce4 (and xfce4-goodies if you want the extra glitz like a cpu monitor, bandwidth monitor, and such, without hunting the individual packages) and iceweasel so you can have a real rebranded firefox on your Optimus.
Code:
apt-get update
apt-get install tightvncserver xfce4 xfce4-goodies iceweasel
It'll take a while to download all that. Lots of data.
Once it's done downloading, configure tightvncserver.
Code:
vncserver
It'll ask you for a password. Choose one that's easy to remember. You'll need to enter it in the VNC viewer as well (next step)
IMPORTANT!
tightvncserver will ask you if you want a view-only password. Tell it no!
next:
Code:
vncserver -kill :1
to politely exit the vncserver. Otherwise you'll have to exit the chroot, reboot the phone, and run the 'boot' script again or it'll open server :2, :3, and so on each time you type vncserver. Each instance will eat more CPU, RAM, etc.
configure /root/.vnc/xstartup
Code:
echo '#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
export XKL_XMODMAP_DISABLE=1
xfce4-session&' > /root/.vnc/xstartup
after that,
you should use
Code:
passwd
to set a root password, and
Code:
adduser
to get a non-root account on there.
Code:
exit
will close the chroot. You can close the terminal after that until you're finished setting up the VNCviewer and want to start your lovely GUI.
Now, set up the VNC viewer like in the OP. Make sure your password matches the one you gave tightvncserver!
I advise 24 bit color. It slows things down ever so slightly, but to me, it's well worth the increase in eye candy you get over 8 bit.
most of the tutorials on the VNC suggest modifying the /root/.bashrc file to start the vncserver automatically (like here on xda) but I don't like that myself. I use the shell a lot, and the vncserver eats system resources. So, I manually start and stop the vncserver from the command line.
Code:
vncserver
to start, it defaults to a 1024x768 which seems to make programs happier than the 480x320 phone native resolution.
Code:
vncserver -kill :1
to stop it politely. Otherwise a phone reboot is required to get rid of vncserver files (by clearing out everything in the / directory which isn't replaced by the boot.img ramdisk) which make it open desktop :2, :3, and so on each time you run the program.
One major advantage to the bind-mounting in the rootfs is that Thunar works as a root explorer, and has access to the entire Android filesystem (except for the bind-mounted Debian directories, which hide the Android directories underneath, including /system/etc which is symlinked to /etc by the boot.img ramdisk,) as well as the complete Debian filesystem.
Pretty much everything I've tried works, unless it wants speed from the display. The VNC just slows that down way to much to use for video or games or suchlike. I'm working on native window support for X, but I need more practice in C to get it done.
Iceweasel works great, if a little slow, a rebranded full firefox on an ARMv6 device that mozilla won't release an apk for its wussy mobile version on. Go figure. The biggest problem is finding plugins compiled for ARM, the 'get plugin' button send you to sites offering x386 versions of the plugins. Yuk.
Icedtea open source java works fine.
Gnash plays ads but not videos.
Gimp works well.
Qemu works!
Eclipse even installs and runs (very slowly)
get-flash-videos captures flash exceptionally well. combined with an Android video player for .mp4 files, you can download and watch flash from lots of places, just not streaming.
alsa audio works through Iceweasel. Played audio clips from yodajeff.com just to test it.
3g works great.
Wifi detects the connection with iwconfig, I haven't tried sending data through it but the way 3g plugs right in I bet that wifi works equally well.
Since wifi and 3g work out of the box, I bet bluetooth would too with some config, but it needs extra packages to see the functionality.
The network meter plugin for xfce works. The device is rmnet0.
The cpu meter plugin also works.
At one point I had the battery meter from xfce-power-manager working but my last install broke it somehow. Ah, well.
once it's all together
open a terminal
to start it up:
Code:
su -c boot
for a gui,
Code:
vncserver
to kill the GUI,
Code:
vncserver -kill :1
to exit the chroot,
Code:
exit
the first time you run the GUI, you might want to add my Xfce_large theme to make the scrollbars and menubars easier to hit on the touchscreen. See the earlier post.
hopefully this helps people out. I spent quite a while getting it just how I wanted it, many googlings and picking bits from here and there.
contents of the scripts follow.
firstrun
Code:
#make /sd-ext directory if it doesn't exist
if [ ! -d /sd-ext ]
then
mkdir /sd-ext
fi
# mount 2nd sdcard partition
# if your linux is on a different partition than 2, substitute that number for the 2 in .../mmcblk0p2 below
# first unmount it; if not already mounted, system will echo 'umount: can't forcibly umount /dev/block/mmcblk0p2: Invalid argument' but this isn't an error to worry about
umount -l /dev/block/mmcblk0p2
mount -o noatime,exec,suid /dev/block/mmcblk0p2 /sd-ext
#copy files from Android to Debian without overwriting anything
yes n | cp -aiv /etc/* /sd-ext/etc
yes n | cp -aiv /root/* /sd-ext/root
yes n | cp -aiv /sbin/* /sd-ext/sbin
yes n | cp -aiv /sys/* /sd-ext/sys
boot
Code:
# debian lives here
export mnt=/sd-ext
# remount / and /system rw
mount -o remount,rw / /
mount -o remount,rw /system /system
# make new subdirectories in / for binding
for x in \
bin boot home lib media \
opt selinux tmp usr var
do
mkdir /$x
done
#make $mnt directory if it doesn't exist
if [ ! -d $mnt ]
then
mkdir $mnt
fi
# mount 2nd sdcard partition
# if your linux is on a different partition than 2, substitute that number for the 2 in .../mmcblk0p2 below
# first unmount it; if not already mounted, system will echo 'umount: can't forcibly umount /dev/block/mmcblk0p2: Invalid argument' but this isn't an error to worry about
umount -l /dev/block/mmcblk0p2
mount -o noatime,exec,suid /dev/block/mmcblk0p2 $mnt
# cleanup last session's tmp files, including last VNC session
rm -r -f $mnt/tmp
mkdir $mnt/tmp
# bind mount debian directories to /
for x in \
bin boot home lib media \
opt selinux tmp usr var \
etc root sbin
do
mount --bind $mnt/$x /$x
done
# set some system variables
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/etc:/sys:$PATH
export TERM=linux
export USER=root
export HOME=/root
# mount proc,sys,devpts
umount -l devpts
mount -o remount -t proc proc /proc
mount -o remount -t sysfs sysfs /sys
mount -t devpts devpts /dev/pts
# softlink framebuffer (for future use,) and existing mounts
ln -s /dev/graphics/fb0 /dev/fb0
cat /proc/mounts > /etc/fstab
cat /proc/mounts > /etc/mtab
# 'boot' with chroot into debian bash shell at /
chroot / /bin/bash
# done now, clean up after exit to keep Android happy
# remove softlinks and replace backed up mtab and fstab
rm /dev/fb0
cd /
# unmount subdirectories
for x in \
bin boot home lib media \
opt selinux tmp usr var \
etc root sbin
do
umount -l /$x
done
# remove non-Android subdirectories
for x in \
bin boot home lib media \
opt selinux tmp usr var
do
rmdir /$x
done
# remount / and /system ro
mount -o remount,ro / /
mount -o remount,ro /system /system
That is an excellent write up. Link added to first post.
appreciate the compliment.
it took two hours to type up and another two to redo it all after firefox crashed on my pc right as I was finishing.
if anyone notices issues or errors in it, let me know and I'll try to fix 'em.
I'll try to help out if anyone has problems getting it working, odds are I missed some detail or typo.
well it took me all day to install ubuntu on this pc to find out it was my video card so im using the built in video on the mb and it worked.I will be doing this tomorrow as its 2am here now.ive never had a problem installing ubuntu before lol.the live cd would just freeze no matter which flavor of linux i used.
ummkiper said:
well it took me all day to install ubuntu on this pc to find out it was my video card so im using the built in video on the mb and it worked.I will be doing this tomorrow as its 2am here now.ive never had a problem installing ubuntu before lol.the live cd would just freeze no matter which flavor of linux i used.
Click to expand...
Click to collapse
eek.
I don't really like ubuntu much, it reminds me too much of Windoze, all bloated up and running a bunch of stuff I never told it to
but I put it on after reading dev reccomendations to use it when making the final switch from windoze, and now I only use it for watching dvds and the stupid digital tv the broadcasters switched to a while back to obsolete everyone's receivers (use an hvr950 usb tuner, which I had to force an older driver into the kernel to get working.)
put debian on the pc to dev with, much less gripey and intrusive, but trickier to configure.
ummkiper said:
well it took me all day to install ubuntu on this pc to find out it was my video card so im using the built in video on the mb and it worked.I will be doing this tomorrow as its 2am here now.ive never had a problem installing ubuntu before lol.the live cd would just freeze no matter which flavor of linux i used.
Click to expand...
Click to collapse
I have yet to get Ubuntu running nicely on a android. I'm sure i'll figure it out soon enough. I'm donating close to 2-4 hours a day to this right now. I hope i can get everything running how i like without learning how to write my own code... which would take forever ...
oh i dont want it on android i just wanted it on my desktop but it appears my desktop has issues while everything works fine in windows ubuntu still freezes or restarts the gui.i have xubuntu on my ibm thinkpad its slow but runs its ubuntu with xfce so i guess ill use my laptop to do this and keep win on my desktop.
ummkiper said:
oh i dont want it on android i just wanted it on my desktop but it appears my desktop has issues while everything works fine in windows ubuntu still freezes or restarts the gui.i have xubuntu on my ibm thinkpad its slow but runs its ubuntu with xfce so i guess ill use my laptop to do this and keep win on my desktop.
Click to expand...
Click to collapse
it shouldn't really matter too much what machine you use to set things up, the key things you need are a way to untar the premade filesystem, ext2 support, and a usb port to transfer files to the phone.
you could download the files in windoze if your laptop lack web access.
you <might> be able to use a windoze utility to format the first part of the SD card with a small FAT32 partition, then use CWMA recovery to add an ext2 partition to the card, then extract with 7zip on windoze into the ext partition.
I used to have a freeware program to add ext2 support to windoze, but it's buried on one of my old 500Mb harddrives in a box somewhere. bet you could google something like that up if your laptop gives you trouble.
cp ./boot.txt /media/disk/boot
cp ./firstrun.txt /media/disk/firstrun
sync
cp: cannot stat `./boot.txt': no such file or directory
cp: cannot stat `./firstrun.txt': no such file or directory
yeah um i dont see these files in the tar and this is the errorr im getting so where do i get these 2 files from
ummkiper said:
cp ./boot.txt /media/disk/boot
cp ./firstrun.txt /media/disk/firstrun
sync
cp: cannot stat `./boot.txt': no such file or directory
cp: cannot stat `./firstrun.txt': no such file or directory
yeah um i dont see these files in the tar and this is the errorr im getting so where do i get these 2 files from
Click to expand...
Click to collapse
I made the tar some time back.
boot.txt and firstrun.txt are attached to the bottom of the instructions.
edit: per ummkiper's suggestion I have also linked the attachments right after the filesystem link.

ICS and Adhoc

Hello there!
At first,I would like to say thank you to all users for their supports and their help, thank to your informationI have finally upgraded my Acer Iconia A100 to ICS and I have rooted the device without any problem, and it works like a charm!
But before I made the upgraded to ICS i was using Honey Comb 3.2 which was rooted also and I did manage to install Adhocenabler which worked perfectly with my nokia n97.
So I have upgraded the device to ICS, rooted it, but now I can't get adhocenabler applicatin to work! It always come with "unable to mount system" "are you rooted ?"
All applications have rooted access but it seems that adhocenabler can't have it!
I have tried to Re-root the device, tried to hard reset it, but it still doesn't work...
ANyone is facing the same problem? do you have a solution ?
thank you very much
Hi there, I had a similar problem whilst trying to install chainfire3D.
Try running this (seperate commands) from within terminal emulator (a quick download from the Play Store if you haven't got it installed)
su
mount -o remount, rw /system/
Let me know if this works, did you follow the ZeroNull method?
thank you for your answer!
I've tried your method, but i doesn't work... I'm still stuck with the same error
I have took a screenshot of the application
freefilehosting.net/20120401-145832
freefilehosting.net/20120401-1458361
that sounds weird because it's the only one application that can't get root access
For those who cant get access to adhoc network on ICS,
this method is working perfectly !
download a copy of the wpa_supplicant, here and put it in sdcard/download directory
forum.xda-developers.com/showthread.php?t=1033314
and then open a command shell on windows and type
ADB SHELL
su
mount -o rw,remount /system
cd /system
chmod 775 bin
cd bin
cat wpa_supplicant > wpa_supplicant.old
ls
cat /sdcard/download/wpa_supplicant > /system/bin/wpa_supplicant
ls –a –l
chmod 755 /system/bin/wpa_supplicant
chown system.wifi /system/etc/wifi/wpa_supplicant.conf
mount -o ro,remount /system
press ctrl-c
unplug usb
reboot tablet
restart start phone
Now everything is OK ;=)

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

Tasker/Secure Settings on Systemless Root

So i'm trying to create a profile in tasker to enable/disable airplane whenever i'm connected to Wifi and it seems SecureSettings isn't allowing root actions even though it has root privileges. Anyone know an app that works with tasker that can allow me to enable/disable airplane mode?
Thanks!
metpage said:
So i'm trying to create a profile in tasker to enable/disable airplane whenever i'm connected to Wifi and it seems SecureSettings isn't allowing root actions even though it has root privileges. Anyone know an app that works with tasker that can allow me to enable/disable airplane mode?
Thanks!
Click to expand...
Click to collapse
Is there any particular reason you are using systemless root?
Sent from my Nexus 5X using Tapatalk
Mainly for Android Pay to work but I'm not married to systemless root if system root makes this work. However I may have found a workaround using Locale instead.
Sent from my Nexus 5X using Tapatalk
In either a terminal on your phone, or via adb shell from the computer, enter these commands:
Code:
mount -o remount,rw /system
touch /sbin/su /system/bin/su /system/xbin/su
mount -o remount,ro /system
I can't remember if you need to reboot or not, but might as well, just in case. Afterward, run your task and allow Secure Settings root access.
After doing this, Tasker and Secure Settings works for me. If this doesn't fix your problem, I don't know.
Thanks I'll give this a shot if Locale doesn't work
Sent from my Nexus 5X using Tapatalk
lightningdude said:
In either a terminal on your phone, or via adb shell from the computer, enter these commands:
Code:
mount -o remount,rw /system
touch /sbin/su /system/bin/su /system/xbin/su
mount -o remount,ro /system
I can't remember if you need to reboot or not, but might as well, just in case. Afterward, run your task and allow Secure Settings root access.
After doing this, Tasker and Secure Settings works for me. If this doesn't fix your problem, I don't know.
Click to expand...
Click to collapse
I have the same problem, running CF-Autoroot on my S7 edge. I would like to try your trick but am not sure how to exactly . Could you please explain a little bit more in detail how this is done?
EDIT: nevermind, i solved it my self using THIS method.
Thanks in advance.
Works for Secure settings, but it's broken Titanium backup
When I try to implement this in adb I get the following:
mount: '/dev/block/platform/soc.0/f9824900.sdhci/by-name/system'->'/system': Device or resource busy
Can anyone help? Would greatly appreciate it. Thanks!
facted said:
When I try to implement this in adb I get the following:
mount: '/dev/block/platform/soc.0/f9824900.sdhci/by-name/system'->'/system': Device or resource busy
Can anyone help? Would greatly appreciate it. Thanks!
Click to expand...
Click to collapse
Try using this command instead:
mount -o rw,remount /system
It worked for me
PiousInquisitor said:
Is there any particular reason you are using systemless root?
Sent from my Nexus 5X using Tapatalk
Click to expand...
Click to collapse
is there system root for 7.0 or is this thread about 6.0.1?
niklus101 said:
is there system root for 7.0 or is this thread about 6.0.1?
Click to expand...
Click to collapse
There are unofficial versions in in the super su section here.
LSI said:
Works for Secure settings, but it's broken Titanium backup
Click to expand...
Click to collapse
Yeh, unfortunately, it does, same with AdAway.
Does it have to do with Android N or is it about the fact that touch /sbun/su fails due to sbin being read only?
If someone knows a solution, that would be great.
LSI said:
Works for Secure settings, but it's broken Titanium backup
Click to expand...
Click to collapse
I have the same problem with this too. It would be great to have a solution, or at least knowing how to reverse it would be great.
lightningdude said:
In either a terminal on your phone, or via adb shell from the computer, enter these commands:
Code:
mount -o remount,rw /system
touch /sbin/su /system/bin/su /system/xbin/su
mount -o remount,ro /system
I can't remember if you need to reboot or not, but might as well, just in case. Afterward, run your task and allow Secure Settings root access.
After doing this, Tasker and Secure Settings works for me. If this doesn't fix your problem, I don't know.
Click to expand...
Click to collapse
Do you hit enter at each line?
I'm doing this exact thing with Tasker and Magisk. I just had to add a quick edit to my build.prop, and then Tasker could recognize root with Magisk, and it worked fine.
Fit some reason I'm getting this error when dropping the commands
That's because it's mount -o not -0.
I just got secure settings and tried these commands in terminal. However they don't work. I get device or resource busy.
I'm on PureNexus 7.1.1 root via supersu on my Nexus 5x IF that matters in any way.
Edit: never mind. Solved it by replacing 0 with o. *Facepalm*
I've encountered the same problem in Android 7.1.2 and the above solution didn't work out for me. Secure Settings system+ is unavailable.
Any other solutions?
The first command
mount -o remount,rw /system
gave me the following result:
mount: '/dev/block/platform/msm_sdcc.1/by-name/system' not user mountable in fstab
1|jfltexx:/ $
It seems like an error.
akran said:
I've encountered the same problem in Android 7.1.2 and the above solution didn't work out for me. Secure Settings system+ is unavailable.
Any other solutions?
The first command
mount -o remount,rw /system
gave me the following result:
mount: '/dev/block/platform/msm_sdcc.1/by-name/system' not user mountable in fstab
1|jfltexx:/ $
It seems like an error.
Click to expand...
Click to collapse
Try this:
Code:
mount -o rw,remount /system
touch /sbin/su /system/bin/su /system/xbin/su
mount -o ro,remount /system
I'll share how I fixed this problem, which might be a LOT easier for some people.
Install a file manager that has root access (ie Root Explorer).
Navigate to /system/bin
Click whatever button to mount /system as rw.
Create a directory (or file) and call it su
Reboot phone
Open Secure settings and enable root.
At this point (and with above solutions, Android Pay is broken. If you want it back.
Open file manager again.
navigate to /system/bin
mount rw
delete the su folder (or file) you created earlier.
reboot.
Secure Settings only checks for su file the first time. Once it's been granted access, it no longer looks for su, it just tells the system it needs root access. So it will work the way its supposed to, even though it no longer can find the su file in expected location.
Also, for those that don't know, "touch" creates a file. So if you want to pass SafetyNet still, go back and delete the 3 files created from the touch command. And note that you only need to do 1 of them, not all 3, for Secure Settings to work.

Mount loopback fs crashing phone

Not sure which section to post this question but I've been trying to create & mount a local file for a project idea. Failing right a the start its been looking for information but struggling to find any logs to explain whats happening.
Phone Galaxy S5, flashed with LineageOS 15.1 (unto date)
Basically I've been trying to create a file with dd, making a filesystem then mounting.
Creating a file with dd on phone or external also running mkfs (tried exfat ext4 2fs)
The problem comes when mounting using adb or local shell app the command doesn't complete while phone reboots.
Sample shell commands used to help with understanding my issue
Code:
su -
cd /storage/(sdcard)
dd if=/dev/zero of=virtualfs bs=1024 count=10240
mkfs.exfat virtualfs
mkdir vir
mount -o loop ./virtualfs ./vir
Phone freezes, 5 seconds later reboots
I've tried running from a couple of terminals over adb with one running logcat but nothing is seen between command and reboot.
At this point I'm lost where to look for errors or what to attempt next.
without finding a way forward on this loopback issue I'm hoping someone could provide guidance.
Guessing this would be a kernel issue? how could this be confirmed

Categories

Resources