-
-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git - error: unable to write file .git while accessing internal storage #249
Comments
@damionx7 this is what I get using these commands:
Can you try the BASH shell and reproduce these commands in a similar fashion please? |
@damionx7 thank you for sharing. This page was very difficult to find for me once more (two days of on and off searching). Even though I knew this topic was shared recently, not that long ago. The search line https://www.google.com/search?q=git+site%3Aarchlinuxarm.org helped find the webpage sought: From https://archlinuxarm.org/forum/viewtopic.php?f=15&t=14596:
It was really nice of @sudomain to share this information. How can this recommendation be fulfilled quickly? |
can we try to use the termux git package in arch. maybe using a symlink or bind. |
The command |
sure. i will try. |
It's been a while since I used TermuxArch (I've switched to proot-distro), but isn't Termux's PATH appended to the end of TermuxArch's PATH? So uninstalling Arch's git with I imagine that a bash function could be written to detect if the current directory is in that shared storage. If it is, then use Termux's patched version and if it isn't then use Arch's. |
I just tried it. The termux git package doesn't seem to work in arch proot. |
@sudomain Termux's PATH has been depreciated due to nesting issues:
|
can be changed to
to accomplish appending at the end of TermuxArch's PATH statement (use with caution). Maybe this addition should be at the beginning? Please be on the lookout for nesting issues should you choose to do this! Have you looked at all of the packages that are installed with Termux git? Possibly some of these should be symlinked into the system somewhere to get Termux git going in Arch @damionx7? This issue can also possibly resolve TermuxAPI commands run in Arch @sudomain and a few other programs SDRausty/termux-archlinux#63 as well. Can a link to Termux git be added here to this issue along with this one that we have? |
Thank you for trying @damionx7 |
What do you mean by nesting issues? Running startarch while you're already in the PRoot? |
This is correct, and with other programs as well that are on the PATH. Some of the programs, the Termux packages we want to use, others we do not. Like the one you mentioned From what I recall of the nesting issue a short while ago, I installed a number of programs, packages and was hunting for nesting issues, which do crop up more often than not. I guess I will be hunting for some of them again soon when I can.
It has been a while, and you seem to have missed some of the recent great connection action:
Courtesy of topic cannot build heroku-cli package with pikaur and yay:
Glad that you are taking part again @sudomain! |
This method was recently depreciated also @sudomain: With this line of code: Ownership issues in directory /etc/sudoers.d with this issue caused this change. I would like to enhance both of the topics that I have mentioned. Your help and opinion is requested. |
I retested by adding
I found no change in Termux's |
@damionx7 my next questions should be easy to answer. This is the reason why they are questions: What is the file system type for the SD card? How can the file system type for the SD card be easily checked in Arch Linux in Termux PRoot and native Termux too? |
actually internal storage is shown as sdcard. I don't have any external sdcard. Is
|
I'd say let users configure aliases/functions to cherrypick which the versions they want, since it wont be the same for everyone. That or have
At the end of the day we're both using Arch Linux ARM. That's cool to hear about Android studio. My next phone will definitely need a larger internal storage.
Can you be more specific please? On the topic of Android's |
What kinds of file systems are supported on Android:
@damionx7 thank you for sharing; Here is what I got. The answer appears to still be enigmatic. What is the precise |
@damionx7 the file system on your device appears to be ext4:
Is this the effect when you try these commands:
|
As far as I can tell about what is happening,
|
yes. its the same result on my device too. |
so maybe symlinks are not allowed on sdcardfs. I found this https://git-annex.branchable.com/forum/Dealing_with_crippled_Android_file_system/ |
This test confirms the assumption that I had. The program
But |
but why does git work in termux and not not in arch ? I mean the filesystem is same. with termux, it is possible to use git on internal storage also. |
@damionx7 using any proot in a rooted environment is not recommended in general for many reasons. Are you aware of this? And |
yes it is rooted. But i dont use root with termux or proot. |
This will hopefully be reimplemented soon. I found the offending line of code† and the lack of corresponding support routines. This might also have devastating impact on the progress that we made so far. These support routines were dropped because they got in the way of projects we are trying to make work in our environment. If this planned implementation does get in the way of the very recent progress we have made, hopefully there will come forth some form of implementation that will suit all the requests involved. In our case, this can probably be confined to the concerns the functioning of programs † good fragments of code can morph; Why?
It looks like we are on the right track here. A little more testing , and I will let you know about a forthcoming commit. If all goes as planned |
This commit adcf771 resolves the Using NOTE Some of the commands now should be prefixed with |
I managed to fix Needless to say, commands such as |
Numerous iterations, and at that nuance iterations requiring time consuming testing have given positive results! This commit and the preceding few have helped to make script |
@damionx7 but your system does use root. Please study the difference in our outputs when we were trying to figure out what the file system is in internal shared storage. To my understanding, these are all little 3d printed chips that are 3d printed onto tiny napkins. Then these napkins are fused into our smartphones. For some reason the properties of this device (the non rooted Android filesystem) are hard to determine; Why is this so? |
please correct me if i am wrong but the filesystem on |
That it is. It is a virtual file system. This knowledge alone would not have brought us one step closer to the solution that we were seeking, and fortunate to find yesterday. @damionx7 you might find it surprising that a key bit of information came from the I just asked it (the Android) to define sdcardfs, and then I asked it what is sdcardfs. It showed me interesting results. One of the most interesting ones is: One of the reasons I say this is because this document does not seem to mention the file system type that sdcardfs uses either (zero matches for ext4 and vfat): 0 ext4 filesystem can use symlinks |
@SDRausty i still don't understand. Can you explain a bit more please . I don't see any difference between your filesystem and my rooted filesystem. Can you tell me which part is different and causing this issue ? Here are your filesystem as you posted
and here are mine, equivalent to your mounted partitions
|
@damionx7 your previous output has something along the line of: The fact that sdcardfs is ext4 was a crucial piece of information at the time. You can and should be able to create symlinks on ext4 filesystems. On Android this is not possible on the SD card even if it is formated as ext4. My question at the time was, is |
Thanks . But now I have 2 questions .
|
and also how can git be made sane in rooted system. |
@damionx7 in the screenshots that you shared, what shell are you using?
Both git versions work in proot. The second two questions that you asked, I cannot really answer as my last rooting experience is summarized here, and was quite profound. Do you know any source code to root Android? |
You must have misunderstood me. I simply stated Magisk revealed critical information to help resolve this issue. The information it revealed is the ext4 file system handled through sdcardfs. |
@SDRausty But git is still giving permission issue. I thought that you were saying this was due to root. I am using zsh shell btw |
Many thanks @SDRausty . Git now works on sdcard. but it doesnt work when i use root user. Maybe the new commits were not applied as I was using zsh. |
You are welcome @damionx7! This commit 68bb18d fixes what took a long time with effort to figure out and fix yesterday. Unfortunately, this topic #251 is reopened, and this one TermuxArch/TermuxArch#22 that took many days to close will be reopened soon too if a solution is not forthcoming. The change that helped this issue Some of the possibly solutions that I have recently looked at are:
|
That is correct and this will not change. There are many commands the root user should avoid and |
@SDRausty I mean the default root user of TermuxArch. I do most of the work on a different account. I was just informing, I have no such use. |
I'll rephrase my question. Hopefully I'll be clear. Can you explain your motivation for cloning with git with the Arch Linux in Termux PRoot root user account please? |
I have no intention of cloning with git with the Arch Linux in Termux PRoot root user account. I just want to use git to sync some notes. It wont matter in which account I am using git. Its just that I want git to work in internal storage or sdcard. |
This is quite an interesting issue @damionx7 and you might not see this clearly from your perspective. There is quite a bit of analogy with the saying "What came first the chicken or the egg?" and this issue. a) you want to install packages before you can use them Here's the outcome. I know it can be improved, but at least we have something that works for everyone. To be able to use git without errors, you will want to login with a new option.
This solution has been chosen because it was easiest implement and is being tested at this moment. It would not be good for our users to lose the newly acquired ability of building Android Studio easily with the freshly working command
This is the option with option --link2symlink removed that was causing problems with |
This must have been a catch 22 situation for you. The solution you selected is simply awesome. I really like the idea of elogin and login. |
It still is; But the most difficult hurdle seems overcome! However, the Termux PATH had to be dropped again. There must be an easy way to add it to the new login. Termux PATH collision with Another one is that reimplementation was consuming a lot of time, and I was not able to reimplement it. The new login is not designed to build and install packages with
I am really glad you like it @damionx7; I spent quite a lot of time thinking about this aspect of the catch 22. Thank you very much for helping! I hope many more users will enjoy this new feature too. |
Am having the same issue and I can even access git on termux |
Are my details here on GitHub the same. The name I will be using is it the as git |
|
I can access the sdcard files using arch linux. But while cloning a new repo or doing git commit, I get this error.
The text was updated successfully, but these errors were encountered: