Ubuntu: Permission denied on Git folder

So recently I had some trouble using or modifying a project I checked out from my Git-repository.

It took me a while before I had figured out what the problem was (longer that it should have), that’s why I’m sharing it here.

At first I tried giving myself the right permissions on the repo folder, without much progress, some things worked while other kept giving my errors.

The solution that finally fixed the problem for me, was making myself owner of the folder so no chmod but chown was needed to get this fixed.

sudo chown -R user /path/to/local/repo

Some explanation:

  • the chown command changes file owners
  • -R stands for recursively (includes al subfolders and files)
  • with “user” being the person you are logged into your system

Hopefully this helped you out aswell, or at least pointed you in the right direction.

Tagged with: , , , , , , ,
Posted in Development, Linux, Ubuntu

OnePlus won’t charge after draining to 0%

Hi all, yesterday I ran into a curious problem with the OnePlus One phone.

After draining to 0%, I was unable to charge it again! If this happens you as well, there is no need to panic, apparently there are a lot of 1+ owners who run into this problem and like with most things, there is a fix.

Symptoms:

  • At first, my phone got stuck in boot loop when I tried to charge it.
  • Trying to turn it on did not work (the phone produced a vibration, but no screen light)
  • When I plugged in, it can also produce the screen that’s visible in this image.

=> The battery was dead, but refused to charge!

Fix:

Turns out the fix for this is quite easy as it does not require any technical skills, just a lot of patience as this problem (according to OnePlus) fixes itself after a certain amount of time. (source: reddit)

For me the scenario went as follows

08h30:

Oh noes, bootloop when trying to charge!😦

08h30-09h30:

trying a lot things, booting in recovery, repeatedly plugging in & out, all without any luck or progress.

09h30 – 19h30:

Not touching the phone. For me this was the hardest part. During lunch I had a weak moment where tried to turn the phone on, with only a small vibration as result.  (I did not plug it in)

19h30

After waiting what seemed like an eternity, I plugged in the phone using it’s original charger. At first the Low Battery screen popped up for like 5-10 seconds before starting to charge again!! (similar as in this video)

Hurray!

19h30-20h30

To be sure, I let my phone charge some more before trying to turn it on.

20h30

Phone booted normally. More Hurray!

 

If you want to know more, there is also a thread on the OnePlus forums talking about this problem, this post includes the video previously mentioned with an example of this.

As far as I understood, this problem is not related the ROM you are running. (FYI: I was running Mahdi ROM at the time of the incident)

I assume this problem is caused by some sort of hardware protection mechanism for the Lithium Ion Battery that is build into the phone. (To low voltages might damage such a battery, that’s why the phone is prevented from booting). But of course I could be wrong.

If you ever run into this issue, I hope this post can help you in getting your phone back up and running (or at least reassures you that there is no need for panic).

If you liked this post, or it helped you out, feel free to leave comment or follow me on Twitter @RW_Spaf or Google+!

 

Tagged with: , , , , , , , , , ,
Posted in Android, OnePlus One

Android Studio: aapt:error=2 no such file or directory

After installing the Oracle JDK on my Ubuntu System, I turned out that I was still not ready to start developing my first App in Linux.

Whenever I tried to get my gradle running, I stumbled upon the following error message in my console:

/Android/Sdk/build-tools/20.0.0/aapt": error=2, No such file or directory

Some research pointed out that the cause of this error is that “aapt” is a 32 bit application and since we’re running on a 64 bit Ubuntu distro, this does not work.

To fix this, some extra (compatibility) libraries had to be installed. To do this, execute the following two commands:

sudo apt-get install lib32stdc++6
sudo apt-get install lib32z1

After installing these, aapt should work!

If this post helped you, feel free to leave a comment or follow me on Twitter @RW_Spaf or Google+!

 

Sources:

https://teamtreehouse.com/forum/android44waapt-error2-no-such-file-or-directory

http://stackoverflow.com/questions/22701405/aapt-ioexception-error-2-no-such-file-or-directory-why-cant-i-build-my-grad

 

Tagged with: , , , , , , ,
Posted in Android, Development, Linux, Ubuntu

Android Studio: ‘openjdk shows intermittent performance and ui issues.’

Hi all, I know it’s been a while, it’s been a busy couple of months!

I’ve started extra classes on telecommunication and I’ve been busy learning myself some more Android Development during the time that has passed since last post.

Since Linux is still a slumbering interest of mine, I’ve decided to polish up my Linux skills by creating a new Ubuntu VM hosted in Oracle VirtualBox and trying out some Android Development there.

However before I got everying to work, I ran into some difficulties, one of which being the following error popping up after starting Android Studio:

openjdk shows intermittent performance and ui issues"

After some research, I learned that this was because of the default Java version installed on my system was indeed “OpenJDK” and not the Latest Oracle JDK as recommended.

Not much later, luckily I also found a fix, following some of the steps of the guide here: http://www.cnx-software.com/2013/05/16/installing-android-studio-ide-in-ubuntu-hello-world-application/#ixzz3K1JuemYC

I had to do the following.

1. Download the latest Oracle Java SE Development Kit for the official Oracle site  (8u25 for Linux 64 bit in my case)

2. Unzip the package using tar

tar xzvf ~/Downloads/jdk-8u25-linux-x64.tar.gz

3. Move the folder you’ve just unzipped to /usr/lib/jvm/

sudo mv jdk1.8.0_25/ /usr/lib/jvm/

4. install the new JDK to your system

Do this by executing the following commands:

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_25/bin/java 1
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_25/bin/javac 1
sudo update-alternatives --install /usr/bin/javaws javaws /usr/lib/jvm/jdk1.8.0_25/bin/javaws 1

5. Configure the standard java version for your system

Execute the following commands and choose the new Oracle JDK you’ve just installed

sudo update-alternatives --config java
sudo update-alternatives --config javaws

And that’s it, you’re done!

To confirm the changes you’ve just made, execute

java -version

and you should see something like this appearing in your terminal:

java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

Hopefully this fixed the issue for you, and I wich you good luck programming you’re first apps!

If you liked this post, feel free to leave a comment or follow me on Twitter @RW_Spaf or Google+!

 

Tagged with: , , , , , ,
Posted in Android, Development, Linux, Ubuntu

Cloudyfa G3 Rom for LG G2 and G3 Tweaksbox

Recently the LG G3 got released and immediately got a lot of positive feedback and media attention.

Since my G2 is only a few months old (and don’t make enough money to buy a new phone every few months), buying a G3 is not really an option for me.

Luckily, it didn’t take long for the G3 software being ported to a ROM suitable for the G2.

Currently, there are 2 ROMs like this (that I know of)

So now I could see what the fuzz was all about😉

Me, I tried out Cloudyfa’s ROM and it works really good on my D802 (still suffering the occasional reboot once every few days and it seems like the fb messenger is not that stable, but this might be because of the dirty flash I did to upgrade from v1.1 to 1.2)

QuickMemo+_2014-07-20-19-34-56

Running CloudyfaG3

The G3 software is in someways very similar to stock G2, with a new feature here and there, and of course a new, very nice design.

The design even reminds me of the new Android L preview in some aspects, everything is a bit flattened out and the stock applications (messenger, calender, contacts, …) make the status bar the same color as their action bar.

Since I’m not happy before I can customize everything, it didn’t take long before I installed Xposed and looked for some nice modules to make a few extra tweaks.

Customizing with modules like Gravitybox, working great for AOSP-based projects can be a bit limited or tricky to use with heavy overlays like the one from LG or Samsung’s touchwiz.

That’s why a developer know as P_Toti came up with a module named G3 Tweaksbox (find the xda thread here). This module allows you to make a lot of extra customizations to the software.

Screenshot_2014-07-20-19-30-46

G3 Tweaksbox

Not being sure weather it’d work on the ROM, I still tried giving it a try (after of course taking a full backup of my system) and it worked like a charm!

The free version of this module is rather limited, seeing the screenshots examples of what’s possible on google play, I descided to make the investment and buy the full version of this module.  Again, I wasn’t disapointed!

The application allowed me to

  • Change the colors of the notification panel (Icons, bars, carrier text, …)
  • Make the background of the notification panel transparent
  • Change carrier text
  • Change status bar icons
  • Make status bar copy the color of the actionbar of currently running application
  • Change navigation button icons
  • Add up to 7 buttons in the navigation bar
  • Add applications in the quick menu that you get when sliding up from the home button

These are a few of the many customizations that I was able to make with this application. There are a lot more tweaks in there, for instance to the stock launcher (I use Nova at the moment) and so on.

So for those wondering if the tweaksbox works on G3 ported ROMs, it did for me!  And for those wondering if it is worth buying the complete unlocked version of the application, I have no regrets! If this doesn’t convince you, take a look at the screenshots or on the example screen you see on Google play.

QuickMemo+_2014-07-20-19-33-55

Extra power menu items

QuickMemo+_2014-07-20-19-34-15

Colored status bar

 

Tagged with: , , , , , ,
Posted in Android, LG G2

ADB Sideload: Failed to write data, protocol fault!

A few weeks ago I tried flashing my LG G2 D802 with Cyanogenmod 11.

After completely wiping my device, I tried uploading the new ROM using ADB Sideload. (for more info see, previous post on Update TWRP & Sideload a ROM)

However, after putting in the commands in my terminal, I came across the following error:

Failed to write data, protocol fault!

Oh noes! What now?

Good news, there is no need to panic😉 after exploring the xda forums some more, I came across the following solution here: http://forum.xda-developers.com/showthread.php?t=2720846

Rather then do “sideload”, I just stayed in ‘Advanced’ and performed:

adb /kill-server
adb usb
adb push (romname) /sdcard

it successfully copied the rom to the sdcard folder, then I was able to install the rom just fine.

 

The forum suggests that, in stead of trying to upload the file with adb sideload, use a push command instead to put the files on your device.

Example where I'm pushing the Optimus ROM to my device

Example where I’m pushing the Optimus ROM to my device, this operation may take some time

 

After doing this, I rebooted in my TWRP Recovery and was able to flash the .zip I just pushed to my device.

PS: pushing the data to your device might take some time (up to 10 minutes in my case), don’t panic or pull out the usb cable while your adb is pushing without direct feedback:)

Phew! It worked!

 

Tagged with: , , , , , , ,
Posted in Android, LG G2

Update TWRP and Sideload Pardus ROM on LG G2 (D802)

Last week I decided to try flashing a new custom ROM to my LG G2 (D802) Phone. In this post I will describe how I did this.

Remember that doing these things to your phone might brick it if you do not know what you are doing and that I’m not responsible if you decide to mess around with your device and end up bricking it. 

Before trying to recreate anything mentioned in this post, make sure to have the following

  • Common sence
  • Have adb installed
  • Have an LG G2 with custom recovery (TWRP) and a KK LG based ROM
  • Knowledge of the command line terminal (navigate trough maps and files)

My phone was already rooted and had an old version of TWRP installed.

That’s why before continuing, I first took a full TWRP backup and copied it to my computer. Next, I updated TWRP to the latest version to be compatible with the ROM that I wanted to flash.

Update TWRP 

Note that I already had a version of TWRP (2.6.x) installed, if your phone hasn’t been rooted and equipped with a custom TWRP recovery, look up a guide for doing this for your phone and software. 

To update TWRP, I downloaded the latest flashable update for D802 from here: http://techerrata.com/browse/twrp2/g2d802 (Since it wasn’t listed here  http://teamw.in/project/twrp2/197).

I placed the file openrecovery-twrp-2.7.0.0-d802.zip on my phone. (As the filename suggests, this is for LG G2 D802 variant only)

Next I rebooted into my TWRP Recovery and installed this zip file with TWRP.

To boot into recovery:

  1. Hold down Power and Volume Down buttons till it reboots.
  2. At the LG logo, let go of the buttons, then quickly press and hold the POWER button until the Factory Reset page appears.
  3. Press the Power button and you should be taken into TWRP.

Now try rebooting in recovery again and check the version to see if it worked.

Sideload ROM

With the latest TWRP in place and my system and all the data I wanted to keep fully backed up (on my computer – it’s import not to keep it on your phone, as we will wipe it clean). We’re ready to take the next steps!

First, choose the ROM you want to flash and make sure it’s compatible with your device.

I choose Pardus HD (http://forum.xda-developers.com/showthread.php?t=2582398)

Next up, you should do a FULL WIPE of your device in TWRP (Dalvik, Cashe, System & Data) – This is why we backed up everything on the computer in previous steps.

Since your device is empty now and doesn’t contain an OS to manage a data connection to your computer, we have to sideload the .zip File of the Rom we downloaded before. (let’s assume it is called Pardus.Zip)

To do this startup in TWRP Recovery and find the sideload function. (Advanced >ADB Sideload)

Next, if you have added a system variable for ADB, browse to the directory of where Pardus.zip is located in your windows terminal.

If you cannot invoke adb from any location, then just copy paste the Pardus.zip file to where your adb is located and then browse to that directory with the command line interface.

If all is correct, when you type “adb devices” you should see someting like this:

2014-05-20_181508

If that’s the case, type in “adb sideload Pardus.zip” (Pardus.zip being the name of the ROM you downloaded)

And the system will start loading the Rom to the phone’s memory.

If your previous ROM/software was JellyBean or AOSP Based, you should install KK Baseband aswell. (Haven’t tried this, not applicable for me)

Now Reboot your phone and if all is well you should see the Pardus boot animation right after the LG logo.

images

Give the system a few minutes to stabilize and were done!

Congratz! Go and have fun!

About Pardus ROM

Pardus ROM is Based on standard LG KK software, so don’t worry, you keep some of the LG functions you are so fond about and that are actually usefull (knock on, IR remote, Quicknote, QSlide,…). If you want All LG apps back, you can find them here: http://d-h.st/users/xanthrax/?fld_id=36312#files 

On top of this, this ROM comes with a bunch of extra features, including the Knock Code already available on some LG Flex models, hardware Tweaks, some layout tweaks here and there, Xposed and much much more. (for more info about pardus, check out the thread on xda http://forum.xda-developers.com/showthread.php?t=2582398 )

I’ve been using this ROM for about a week now and I must say I’m very pleased with the result. So far I didn’t experience any unexpected behavior or crashed.

Kudos to pendroz and all other people who contributed to this solution!

 

Feel free to leave a comment or to add me on Twitter @RW_Spaf

Tagged with: , , , , , , , , ,
Posted in Android, LG G2
Follow

Get every new post delivered to your Inbox.