[Q] How to access Android data from Touch in dual-boot. - Ubuntu Touch Q&A, Help & Troubleshooting

I set up the dual boot on my Maguro, and I want to have a shared directory to drop my music into that will play on both Ubuntu touch and CM 10.2. However, I cannot find the ubuntu data folder from Android. I understand that there is supposed to be an ubuntu folder in /data from the android side, but I don't see it. On the Ubuntu side, I can see everything in my home folder, but when I go up to filesystem, I see nothing, and can't go any further up. Any ideas?

i used ES for this. check root explorer then go up to /data/. you'll find ubuntu's user & system data folders. as for ubuntu, since /data is mounted there must be a way to see the files in android. i think with root permission you might be able to do it . my terminal app doesn't work (trusty r79, already a thread for it) and my ssh connections are rejected. i'll report back when i get it to work
there should be a way (using root ofcourse) to make both OSes see each other's user space (again after i get my terminal working i'll see if i can find something)

ES worked well for this. Once I found /data/user-data/phablet/Music, I just moved all my music into it, and set a custom path in VLC to point there. It's not as nice as being able to share the whole user space between OS's, but it works well enough for me.

Related

[Q] Scripting on the Archos 70

Hi!
Could anyone help steer me towards a solution please?
Or tell me if its impossible (and why).
I am trying to put together a script of some kind which I can use to do a basic rebuild of my Archos 70 after I have done a Full Reinitialization. I like to mess around installing all sorts of stuff, but when done, it's nice to reset and go
back to a clean machine.
As it's not rooted (yet?) I generally rebuild manually which takes ages.
Although a relative newbie at Android/Linux, I have worked with scripting
on mainframes and in the Windoze arena for many years.
The scripting requirement is quite simple, namely to install packages one by one from the SD card. Also to copy back Bookmarks, launcher setting etc
I am happy to work in any language which will work, but to date have just been trying with .SL (Bash?) scripts which run quite happily from within the SL4A environment or according to my theory, should work also from Android natively.
I envisage the script residing on the SD card and when invoked installing my launcher, Dolphin Browser, various other apps and games, then copying back the settings which I have saved (also by script) before the Initialisation.
Trouble is, I can find no simple samples which help. When I try, I can 'cp' stuff about and echo messages etc, but when I try to install, I don't really know where to start. I have tried just the name of the app package
'/sdcard/sdcard/packagename.apk', it replies 'permission denied' and if I try 'sudo package.apk', it says 'not found'.
I am assuming that the 'permission denied' is a good sign because it understands what I'm trying to do at least. But if I am allowed to do it myself, then surely my script should be allowed to do it?
I am quite happy messing around myself. But if anyone has any pointers
(sample scripts, which language/environment to use, etc.) I would be most grateful.
Sorry if this is covered elsewhere. I have searched but was unable to find much which helped. I am continuing the search!
Thanks in anticipation!
1. All normal installed Apps are installed in /data/app as the apk
2. Local/private data comes into /data/data/name.of.the.package
Both directories are ony accessible with root.
Hell again,
Thanks for your reply fzelle, but I'm not sure as to whether I may have explained it properly.
I am running 'Quick System Info' which is great, and it has a function to backup all the installed apps to a directory you can get at without root access. From there I have copied them onto the SD card.
I am not just trying to copy them into the working directory.
If I click on an app, it lets me install it without any problem.
I am trying to automate that part of the process, and I need the name of the software which does the installation, and how to actually give it the parameters for it to do the install. Although a Linux newbie, I don't really understand why, if I am allowed to install apps myself,
a script that I run should not be allowed to install them also?
Anyone got any ideas please?
Oops! - Sorry for that unfortunate typo at the beginning of my last post. Please read as 'Hello'!
No, i didn't understand you wrong.
You want to automate the installation of your std programs, and that normaly doesn't only include the apk but also the private Data.
And if you manually want to install this, you need root to be able to write in /data/data
If you just want to Backup/Install the apps, use appSaver from the market.
That has allready everything you need, and doesn't need root.
fzelle said:
1. All normal installed Apps are installed in /data/app as the apk
2. Local/private data comes into /data/data/name.of.the.package
Both directories are ony accessible with root.
Click to expand...
Click to collapse
Not entirely true.
I have some SSH tunnels set up on my rooted phone that use keys and a shell script to launch them, all set up with Better Terminal Emulator. The key and script files are located under /data/data/com.magicandroidapps.bettertempro/home. I wanted to use the same keys and script on my A70, so I copied the files from my phone to the same directory on my A70 using the terminal command line. Although you can't browse to the app folders under /data/data/, there is some ability to copy stuff into them. I guess the trick is knowing what and to where.
I've not used appsaver, but Astro will also let you back up and reinstall your apps all at once.

Possible? Trick dropbox into mounting as sdcard2

As far as I can tell dropbox for android doesnt make a mount point like it does on a PC, but the function is there. Could android be tricked into doing this?
Hello, i a, looking for for something like this aswell. The only posibility i know is dropsync, but this mirrors the dropbox to the local storage... It would be great to be able to Mount the dropbox like a network drive
Es file Explorer can add your dropbox folder as a share in its app. Actually it supports GDrive and Box too...
david279 said:
Es file Explorer can add your dropbox folder as a share in its app. Actually it supports GDrive and Box too...
Click to expand...
Click to collapse
Yes but the share in not available to other apps as if it were mounted as another external SD drive. I want to use an encryption software but I need to point it to the encrypted file. For that the dropbox folder needs to look like an android system folder.
ParrSt said:
Yes but the share in not available to other apps as if it were mounted as another external SD drive. I want to use an encryption software but I need to point it to the encrypted file. For that the dropbox folder needs to look like an android system folder.
Click to expand...
Click to collapse
I have been looking for something similar. so far, (apart from apps like es file explorer) the closest i have found is [puts on protective suit] this
https ://github.com/arekzb/dropfuse
now - yes, I know that it is linux and not android, but given the similiarities in the systems (ducks flaming posts), it may server as a planning base for a (much smarter/more knowledgeable) person to expand upon.
My thoughts (possibly invalid) would be that the mount point could be created at/after(?) boot via some sort of script - not sure if this is even possible, but if it could be done, you could then potentially modify for other storage services.
Purpose's could be to - stream media, store files for online viewing/editing/reading etc...
******
update - just tested and have not got it working on my ubuntu system - possibly due to a backend dropbox change (or just me not being able to follow instructions)
*******
okay - so tried again and it works (for ubuntu) - help read instructions and google - works wonders
needed to install setuptools and pyquery, and it only works while the terminal window is open (there may be a way to run as a service or something - but not checked yet).
so all good - so far.
Did some checking and there is python for Android around, so am thinking (once i get a chance) I will try to see if i can emulate the linux success.....
Great for Ubuntu, any chance for Android

[Q] AppArmor rights to read from SD Card

Hello, I am developing an app for offline navigation, the development goes steady and a more or less usable app is ready now. I am just struggling with one thing, I now put the map files in <SD_CARD>/Pictures/osmscout and add picture_files_read to the apparmor file. Of course Pictures is not the right location for maps, but how can I give my app rights for another location on the sd card, like <SD_CARD>/Maps/osmscout or something?
The description of picture_files_read in the ubuntu-sdk apparmor dialog says that this apparmor profile should give read access to /media/*/r (at least temporarily) however it doesn't actually give me permissions to any other location than Pictures.
Any ideas?
Thanks
Ubuntu prevents file system access to any other location than your own data, cache and config directories by design. That decision was made to improve the security of the system.
However, as noted, you do have write access to three directories:
Code:
~/.local/share/package.name (for user data)
~/.cache/package.name (for caching)
~/.config/package.name (for config files)
The directory which would be best for your purposes would probably be the cache directory.
That one isn't located on the sd card but it's the only option you have.
Sent from my awesome Ubuntu Touch device using the Forum Browser app
Well, the cache directory is just in the home directory and probably not big enough. I don't even need write access, just read access for now, as the user is putting the files there manually.
Until I have found a workaround, I am putting the files in Pictures.
At least for the Aquaris, the home partition is too small to store any serious map files, they can easily be a few GB.
nikwen said:
Ubuntu prevents file system access to any other location than your own data, cache and config directories by design. That decision was made to improve the security of the system.
However, as noted, you do have write access to three directories:
Code:
~/.local/share/package.name (for user data)
~/.cache/package.name (for caching)
~/.config/package.name (for config files)
The directory which would be best for your purposes would probably be the cache directory.
That one isn't located on the sd card but it's the only option you have.
Sent from my awesome Ubuntu Touch device using the Forum Browser app
Click to expand...
Click to collapse
Sadly, I don't see many options here.
The only one which I can think of is the following: Ask your users to download the terminal app and copy over a command which either creates a (persistent) symbolic link from /home to their data directories on their sd cards or mounts the said folders in their home directories (the latter wouldn't be persistent after a reboot).
You still have to check out if that works but I'm confident that at least the mount scenario works.
Otherwise, I believe this would be a good question for the Ubuntu Phone mailing list where the OS developers hang out, too: http://launchpad.net/~ubuntu-phone.
Sent from my awesome Ubuntu Touch device using the Forum Browser app

Mount a samba share on Android (Marshmallow) - even possible? How?

I have a NAS (Samba share) which I would really like my phone's file system to be able to hook into whenever I am within wifi range. Ideally it should auto-mount the network share at boot up.
I have got ES Explorer and I can browse the Samba share, but if I want to watch a video for example, it needs to cache the entire file locally before it starts playing. I just want seamless integration by mounting the share so that my device sees it just like any other sdcard or internal memory. I have mounted shares on Windows and Ubuntu before, but can't seem to find any guides for doing the same on Android. The only stuff I could find was outdated and referred to Cifs Modules and Mount Manager, neither of which seem to be hosted anywhere reliable anymore.
I am running rooted MIUI Marshmallow if that matters.
wow... no replies. this makes me wonder if its even possible. has no-one tried to do this recently?
Did you find an easy solution?
I really want to do this too, but it seems you have to install apps to mount, and yes, I too realised that it was copying the files on the phone before playing.
I thought the whole point of streaming from a network share was to not use up space on the phone.
Anyway, I have used a sony xperia z1 and in its options, it lets you mount a network share as a local folder, so then any app see it as one, I wonder how it can be done in other OS like marshmallow?
Im using CM13 btw.

SOLVED: Widows Explorer folders/files out of sync with SD card contents

In case anyone has run into the same issue in Nougat, I have a solution FYI. I'm using an LG G5 and transferring SD card data to/from a Windows 7 machine, but my workaround should work for any Nougat phone and any version of windows.
Anyway, my issue was that Windows explorer was not showing an updated/synced list of files and folders present on my SD card. Windows sync with the phone's internal memory seemed fine. To solve it, I killed "Media Storage" through Settings - > General - > Apps-> Show System - > Media Storage - > Force Stop, and then REBOOT THE PHONE.
Seems the fix is only for an existing SD card file structure though. When I added a new folder with the phone still plugged in, I needed to kill media storage and reboot my phone again. A pain but at least it gets the job done.
Hope someone out there finds this info useful. Cheers!
Yes, for MTP it usually creates a non-synced state between PC and phone storage.
I really suffered a lot from this issue before.
If you want to access your phone's storage with better performance, you might want to switch other means like
1. adb pull/push(Droid Explorer is a great implementation on windows),
2. FTP server(ES explorer provides that feature), or
3. the traditional mass storage(tweaking init.rc script or usb definition files, I can't remember clearly, sorry).
@ReVanTis, thanks very much for your reply. Before I go any further, I should mention that my phone is not rooted. So the portions of what you mentioned where root is required are unfortunately not an option for me. I have combed the forums, and it seems that Canadian carriers (and in particular, my carrier Rogers) lock their phones such that rooting is not possible.
(So maybe off topic a bit, but if you have any info on how to root an LG G5 (Model H831) running Nougat 7.0, please pass along)
Just a few days ago, I did try to install the adb shell on my Win7 PC, but couldn't figure out how to get it working. I'm not a command line kinda guy, and it took some fiddling just to get the shell GUI to pop up. And even then, I could't do what I wanted to. In my case, I wanted to use adb to force adoptable storage onto my G5. Don't know why LG didn't implement that but whatever, slightly off topic again. And back on topic, no adb shell and no root means no Droid Explorer.
FTP: Seems like a better option. I stopped using ES File Explorer a few months ago because it became too invasive and distracting, am extremely happy with the ad-free and networking ready paid version ($1.29 or something ridiculously cheap) of FX File Explorer. I haven't used FTP in decades, I'll give it ago tomorrow and see if I remember how
Tweaking init.script or usb definition files... I'd say too labour intensive and not necessary if a simple FTP connection can work. On the PC end, is cuteFTP still around from like 20 years ago? lol
Cheers!
Anyone have issue where files from sd card are blank when bringing files over to windows? Will show main folder, but empty inside. But if I do internal files to pc, all is good. Probably windows because I've had this issue with other phones.
Sent from my LGE LG-H830 using XDA Labs
Clg05 said:
@ReVanTis, thanks very much for your reply. Before I go any further, I should mention that my phone is not rooted. So the portions of what you mentioned where root is required are unfortunately not an option for me. I have combed the forums, and it seems that Canadian carriers (and in particular, my carrier Rogers) lock their phones such that rooting is not possible.
(So maybe off topic a bit, but if you have any info on how to root an LG G5 (Model H831) running Nougat 7.0, please pass along)
Just a few days ago, I did try to install the adb shell on my Win7 PC, but couldn't figure out how to get it working. I'm not a command line kinda guy, and it took some fiddling just to get the shell GUI to pop up. And even then, I could't do what I wanted to. In my case, I wanted to use adb to force adoptable storage onto my G5. Don't know why LG didn't implement that but whatever, slightly off topic again. And back on topic, no adb shell and no root means no Droid Explorer.
FTP: Seems like a better option. I stopped using ES File Explorer a few months ago because it became too invasive and distracting, am extremely happy with the ad-free and networking ready paid version ($1.29 or something ridiculously cheap) of FX File Explorer. I haven't used FTP in decades, I'll give it ago tomorrow and see if I remember how
Tweaking init.script or usb definition files... I'd say too labour intensive and not necessary if a simple FTP connection can work. On the PC end, is cuteFTP still around from like 20 years ago? lol
Cheers!
Click to expand...
Click to collapse
For 1. and 2. you don't actually need root access.
For 1, you can download platform-tools (https://developer.android.com/studio/releases/platform-tools.html)
and install droid explorer(https://de.codeplex.com/).
It's basically a file explorer implemented by issuing adb commands.
I believe you don't need root access to use droid explorer unless you want to access where it is only allowed for root.
SD card and internal storage should be fine without root.
You only need to enable adb from phone settings then install the correct adb driver on you windows PC.
For 2, besides ES explorer I believe there are bunch of other apps can do this.
It should be easy to find a replacement.
And 3 is actually way far from being practically useful, I wrote it just to point out it should be possible to do so.
Cool! I'll give adb and Droid Explorer another go when I have some more time (work, kids etc. interfering with my tinkering time! lol) . I thought DE was only for rooted devices but as you say, may work if the space I need to work in is accessible without root.
And absolutely, there are tons of file explorer apps out there, I mentioned one in particular as it is far and away a personal favorite for my needs.
Thanks again and have a good night... and do please let me know if you figure out how to root the H831. You know, in your spare time while being really bored Cheers!

Categories

Resources