yashsingh1/xdaforums huggingface dataset:
[Moto X Q&A] samwathegreat:
Why not just use the FULL FXZ? http://xdaforums.com/moto-x/general/fxz-moto-x-4-4-4-212-55-26-t2827307

If you flash the FXZ, (since it is a "Keep Data" FXZ), you don't need to take the OTA. You don't need to disable Xposed. You don't need to disable any modules - or subsequently set them back up. You don't need to flash stock recovery. You don't need to worry about any modifications you have made to /system.... And you DON'T NEED THE OTA!

And just like [MENTION=2801666]Schaweet[/MENTION] has advised -- once you re-flash TWRP, re-root, and re-install Xposed Framework, all of your Xposed modules and their respective settings are already set the way you had them....

It turns this in to about a 10-15 minute process from start to finish. WAYYYY Easier. I don't get it...

EDIT: I do see that you have the "Old" gravitybox installed, so this might require setting up the new version. But everything else stated is completely relevant.
[Moto X Q&A] Mayze23:
I froze MotorolaOTA 1.0
[Moto X Q&A] jamespark:
HUGE. I haven't been following any forums for several months and was not aware of this FXZ. Great to know, thanks!
[Moto X Q&A] elijahah:
same
[Moto X Q&A] wedgess:
A thread already exists for this exact thing here. Please post question in Q&A in future and search before creating new threads.

Thread closed
[Android General] Calin:
​

Intro

​

This little guide was accessed by many people,and this thread already got one year from it's release, so in order to make it even more simple for the users and continue to use and install APKTool to their Linux distributions i created an automated script, which it will upgrade an existing APKTool with a new version or install everything for the user.

So basically if you saw my thread sometimes now you absolutely don't need anymore to write the commands and do all these stuff manually cause the script will now do it for you.

For download, now you get the zip containing everything from the attachments.

How to run the script

​

To run the script is very simple, just download the zip, unpack it to your desktop for example and finally now open a terminal window from the folder where the script is located, and now type:

./Script.sh

If for some reason fails, just open the proprieties of the file, and make it executable... It will work.

How does it work?

​

The basic commands are this :

apktool if framework-res.apk: This command is recommended to be done at the first run, because this will allow to install the framework-res of your ROM which will be used in future to decompile the APKs based on that API level

apktool d SystemUI.apk OUT: This command will decompile an apk to the OUT folder but if you want to choose an other name, you're freely to do it.

The command also can be wrote in this manner: apktool d SystemUI.apk and the apk will be decompiled into a folder with the same name of the app, in this case SystemUI

apktool b SystemUI: When you will finish to work on an APK obviously you will also need to recompile the apk with the changes so to do that you will need to use this command which as stated will recompile the apk with the changes.

java -jar signapk.jar testkey.x509.pem testkey.pk8 name_of_app.apk name_of_app-signed.apk: This command will allow you to sign your apk once it's compiled, and i suggest you to do it every time you made some changes because on Android when you will try to install it or push it to system for example it will not work in most of the cases so it's better always to sign the apk always. The command is very simple to use it, just write it into a terminal window and the signed apk will be made in a few seconds.

So pretty much that's it :)

If you find any kind of problem during the recompilation of an APK don't panic, just watch again the sources and the guide you are following to see if you made good the steps, or search on Google, your best friend for these things :D ;)

You can also write it here if you want and I or some other user will help you out with your problem

Thanks, and i hope this will help some people
[Android General] ShinySide:
Nice guide :good: Think its the best Ive seen for installing on Linux. Wish I found this the first time I installed it on Linux.

Im lazy, hate typing, and change distros often so i turned it all into a script a while back. But think this is great for newbies.

Great work bud.

edit-

Posted 2 weeks ago and only 3 thanks? Come on people. Be thankful for this. Not too long ago you could barely even find one guide for this let alone one put together well. Hit the thanksssssss.
[Android General] bm19981217:
I already searched for it but didn't find an answer: How do I sign an apk on ubuntu?

Nice guide, will do it AS soon AS I have time.
[Android General] Calin:
Thanks man :))

I will add also a mini guide for signing this afternoon

edit. added mini guide also for signing
[Android General] EnricoD:
great work, very useful for noobs :)

If You install oracle's java You don't need the open jdk

This is user's choice

;)

Why not the 7 instead of 6th?

sudo apt-get install openjdk-7-jre

It's possible also to make this process faster by adding a wget instead of downloading all apktool things from the website

for example i uploaded apktool files on my dropbox and I download everytime I have to install apktool by simply running

wget https://www.dropbox.com/s/6s9bxszxjl7wclz/apktool.tar.gz

then

tar -zxvf apktool.tar.gz

then

cd apktool

You can also run single commands to make the installation process faster

sudo chmod +x aapt apktool apktool.jar

sudo chown -R [COLOR="red"][B]yourusername[/B][/COLOR] aapt apktool apktool.jar

enricod@enricod-Aspire-5920G:~/Scrivania/apktool$

sudo cp aapt apktool apktool.jar /usr/local/bin

just hints :)
[Android General] Calin:
Yeah sure it can be done also in this way :)
[Android General] paulle:
ubuntu 14.04 ia32libs

in ubuntu 14.04 (64bit) the ia32libs aren't available.

Package ia32-libs is not available, but is referred to by another package.

This may mean that the package is missing, has been obsoleted, or is only available from another source

However the following packages replace it:

lib32z1 lib32ncurses5 lib32bz2-1.0

Package 'ia32-libs' has no installation candidate
[Android General] Calin:
These are required optionally just in case the APKTool may fail during his running

but if they are necessary type the following commands:

sudo -i
cd /etc/apt/sources.list.d
echo "deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list
apt-get update
apt-get install ia32-libs
[Android General] typos1:
I ve got Android sdk, Java and adb already on my 64 bit system, is it ok to leave out installation of those bits and just start by installing the APK tool, but miss out the 32bit libs cos I already have them ? Thanks
[Android General] ShinySide:
Yeah just skip what you already have and install what you don't have
[Android General] brymaster5000:
Excellent. Many users should find this very useful.

:highfive:

One thing I want people to note is that I have successfully been using 14.04 ubuntu with java 8 and apktool v2.0.0b9 installed. Granted I only build kernels from source and not AOSP...but figured I would let people know.
[Android General] ShinySide:
Mine will decompile and recompile just fine with Oracle 8 but if say the apk is framework or system ui phone won't boot. If a non critical apk it won't show/install after pushing or flashing to device
[Android General] tayeb21:
Nice guide :good:
[Android General] NobleDroid:
thank you... it saved me alot of time
[Android General] Slimegod:
When I want to decompile say a jar file (framework.jar) where does it go? I'm use to using apktool for windows and I'm new to using linux and this is kinda different for me. Sorry for the noobness. Where do the files downloaded go. Are they all suppose to be in one folder?
[Android General] ShinySide:
Are you talking about apktool.jar,apktool, and aapt? They are moved to usr/local/bin in the system directory. After you have done the guide you can make a folder anywhere you want, put your apks you want to mod in it and type the commands. Its not like windows where you have to put apktool.jar, apktool, and aapt in a folder on C and had to work in that folder.
[Android General] Slimegod:
OK. I put my aapt in the home directory. Need to do the process all over. When I ran the sudo command that's in the OP for the apktool and the apktool.jar it said command not found until I put it in the home directory and extracted it, they were in the downloads directory. Wasn't really sure where they went. The directions in the OP wasn't to articulate when it came to actually where the folders went.
[Android General] ShinySide:
I'll make it super duper easy for you hold on a second

Here, make a new document in your home folder, name it apkt , and paste this in it

#!/bin/bash

# Install apktool

cd ~/Desktop

wget https://android-apktool.googlecode.com/files/apktool1.5.2.tar.bz2

wget https://android-apktool.googlecode.com/files/apktool-install-linux-r05-ibot.tar.bz2

tar jxf apktool1.5.2.tar.bz2

tar jxf apktool-install-linux-r05-ibot.tar.bz2

cd apktool1.5.2

mv apktool.jar ../

cd ../

cd apktool-install-linux-r05-ibot

mv aapt apktool ../

sudo chown -R USERNAME:USERNAME /home/USERNAME/Desktop/aapt

sudo chown -R USERNAME:USERNAME /home/USERNAME/Desktop/apktool

sudo chown -R USERNAME:USERNAME /home/USERNAME/Desktop/apktool.jar

sudo chmod +x /home/USERNAME/Desktop/aapt

sudo chmod +x /home/USERNAME/Desktop/apktool

sudo chmod +x /home/USERNAME/Desktop/apktool.jar

sudo mv /home/USERNAME/Desktop/aapt /usr/local/bin/

sudo mv /home/USERNAME/Desktop/apktool /usr/local/bin/

sudo mv /home/USERNAME/Desktop/apktool.jar /usr/local/bin/

rm -rf /home/USERNAME/Desktop/apktool1.5.2

rm -rf /home/USERNAME/Desktop/apktool1.5.2.tar.bz2

rm -rf /home/USERNAME/Desktop/apktool-install-linux-r05-ibot

rm -rf /home/USERNAME/Desktop/apktool-install-linux-r05-ibot.tar.bz2

Replace all the USERNAMES with your user name. And save it. Close it, right click it, select permissions and tick execute. Open your terminal and type sudo ./apkt and put oyur password in, itll do it all for you.
[Android General] Slimegod:
All the apktool files I downloaded go in that folder or stay in the usr/local/bin?

Edit: just noticed it's in the proper place. Thanks man really appreciate it. One last question. What other files go in the usr/local/bin besides aapt and apktool? The apktool ibot tar or the apktool1.5.2 tar? I asked because when I ran the sudo cp command it gave me a error on the apktool1.5.2. Said it was omitting it. I can always put it in manually in the right directory. Just wanted to know why it did that.
[Android General] ShinySide:
If you ran the script I just gave you it did everything for you and you have to do nothing else.

Just apktool apktool.jar and aapt the tar files are deleted. Named just like that. Im not sure what you did.
[Android General] Slimegod:
The ROM I want to decompile has to be in the home directory right? My noobness sucks just not familiar with Ubuntu at all :banghead:
[Android General] Calin:
You can't decompile a rom only if You were refering to the Apk
[Android General] Slimegod:
I worded my question wrong my bad. Meant to say jar file or apk file. Has to be in the home directory correct?
[Android General] Calin:
No, the files can be putted in any folder but as long as the terminal window is running in the same folder
[Android General] Slimegod:
How do I fix these errors? Should I just start from scratch?
[Android General] ShinySide:
Is apktool site down? Saying it doesn't exist which isn't True
[Android General] Slimegod:
I'm not sure. Let me restart my laptop and try it again.

Edit: still give the same error. Do you have TeamViewer. Can probably see what's up.
[Android General] Slimegod:
Tried it manually and when I did the sudo command for apktool it said 'no such file in directory'. It's in the home directory. Also had a aapt in the home directory that was there from a patchrom I did that is in the usr/local/bin also. Don't think that has to do with anything. Just odd how the script isn't working smh
[Android General] Calin:
Try to follow my guide again....

Its impossibile to not work...
[Android General] Slimegod:
Even with the script I'm getting the errors. Don't know why. Followed the directions like I should. Guess some things work for some And not others.
[Android General] Calin:
No, keep calm, currently I'm on school but once i get home i will help you better, but în the mean time can you provide a screenshoot with the errors
[Android General] Slimegod:
The recent one I put up was with the script ShinySide provided which is a good script and I thank him for it. Pretty much when i run the sudo command to install apktool and apktool.jar it says no such file in directory. I'm getting ready for work at the moment so I really have no time to play with it. Maybe later you or him will have time to TeamView it when I'm finish working so you can see what's going on hand on for yourself.
[Android General] Slimegod:
Anyone figured out a solution to those issues I'm having?
[Android General] Calin:
Tomorrow in the afternoon i should have time so if you will find no solution well i will try to help ya even with teamviewer if is necessary because this guide is very easy so i'm also courios why this isn't working for you...... Btw i asked you also to send a screenshoot with the errors in the terminal... :)
[Android General] Slimegod:
Didn't have time this morning but I will post it as soon as I get home from work. :thumbup:
[Android General] Slimegod:
These are the errors I get when typing in the sudo command. The steps previously before this I have already installed. I extracted everything to my home directory. Don't know what time zone you're in but I work during the afternoon. Gonna play around with it and see if I can get it running.
[Android General] Calin:
Ok i saw, so here it's what i think.....

The files downloaded aren't located really in the home folder, maybe there are but in their subfolders.. Remeber that the files itselfs need to be located in the home folder not the entirely folder...

Or the files aren't there and they are some where else, maybe on desktop or like i said earlier in other subfolders
[Android General] Slimegod:
I get it. Because there is a folder within a folder once extracted. What about the script that I commanded into? Heres a screenshot.
[Android General] Calin:
It's obvious that the terminal doesn't recognize the files....

It doesn't recognize them just because the extract fails so in a few words NO FILES EXTRACTED

You can extract tar.bz2 with a gui program, don't compliacate you're self with the commands...
[Android General] Slimegod:
I was able to install it thanks guys :beer::thumbup:
[Android General] Slimegod:
Forgot how to fix this error.
[Android General] ShinySide:
Why are you running apk in that directory and as root???

Make a folder on your desktop or home folder. Put framework systemui and any other dependency in the folder and then apktool if it all and etc.
[Android General] Slimegod:
Oh, ok, ok :banghead: windows I didn't have to make a separate folder and put it in my bad.
[Android General] Slimegod:
Right, right that's my mistake. Been a long day my bad :banghead:
[Android General] Slimegod:
Created a framework folder like you said and still getting those errors.
[Android General] Slimegod:
Get this error when decompiling
[Android General] ShinySide:
You need to open the terminal in or cd to your folder you have the apks in. Which according to your screen shot of your folder , type

cd ~/Desktop/framework

Hit enter. Then decompile.
[Android General] Slimegod:
Then I can command apktool if framework-res.apk?
[Android General] Calin:
Yep
[Android General] Slimegod:
Appreciate it guys, sorry for the headaches :thumbup:
[Android General] Slimegod:
Trying to recompile my framework-res.apk and I get this error. There's more but couldn't fit it all in one pic.
[Android General] Slimegod:
It's decompiling fine but it's not recompiling. This picture is a current one.
[Android General] ShinySide:
apktool b <foldername> <whatever.apk>

Or

apktool b <foldername>
[Android General] Slimegod:
Are you asking or is this what's needed to be typed?
[Android General] ShinySide:
What needs to be done
[Android General] Slimegod:
Need to recompile framework-res.apk. framework.jar recompiled fine.

Edit: yeah I've been getting those errors even when the commands are typed correctly.

Edit 2: I made changes in the public.xml. Wondering if that could be the issue. Will try to decompile and recompile without doing changes and see if I get the errors.

Edit 3: tried recompiling framework-res.apk without being changed and I still get that error.
[Android General] Slimegod:
Here is the screenshot :what:

Was reading up on it and came up with this. Look at post #12-20.

https://code.google.com/p/android-apktool/issues/detail?id=441
[Android General] Calin:
Try with the following command: apktool b - d - f
[Android General] Slimegod:
Still get that error dude :banghead:
[Android General] Calin:
Ok but I need to know, Has someone got the same error like his...

Because I'm getting nervous regard this
[Android General] ShinySide:
Delete the file values-largeui it's erroring out on and try to compile it and see what happens
[Android General] Slimegod:
Will try it later, heading to work.

Edit: I have a question though even if I do edit and it compiles fine how will I input that file that I deleted? I may need it when flashing my ROM.

Edit 2: tried a different apk and it worked fine. Had to delete a file which in never had to do but after that it still compiled fine. But my question still remains what if I need that file due to me building ROMs, then what?
[Android General] Slimegod:
Where is this error coming from?
[Android General] ShinySide:
What device/android version are you doing this for?
[Android General] Slimegod:
Sprint s3 version 4.4.4 kitkat.

Edit: seems like it's a bad framework-res still would like to know what this error is derived from if you don't mind.
[Android General] ShinySide:
Did you apktool if framework-res.apk SystemUI.apk and twframework-res.apk? And these are from a deodexed rom correct?
[Android General] Slimegod:
It's not TW it's miui. Also the miuisystemui.apk I get errors on.
[Android General] ShinySide:
Oh....I know nothing about miui. Have never gone near it and most people/modders dont especially here on XDA. You'll probably need to go find a miui forum for specific questions and errors as these.
[Android General] Slimegod:
Yeah I know. You asked so lol. Think I have it figured out though. Thanks :thumbup:
[Android General] Calin:
It was reported that the mini package regarding the Signapk is corrupted... That's true because I downloaded and I can't open neither so I will upload a new copy... Also the installation process has been updated in the thread.
[Android General] rogersb11:
Anything special I need to do for a decompiled .jar. Services.jar for example. There is no manifest or meta folder but I think I'm supposed to copy the original classes.dex if I remember from windows. Love not having to boot to windows but trying to figure this out. Thanks!!!

Also if I'm in a folder and have systemui.apk in there then decompile and recompile it where is the new apk? because I've made changes then ran apktool b SystemUI.apk and it says built but only old apk is there or if it replaces it nothing seems to have changed. Also if I delete the apk before I recompile no new one is there, that's why I'm thinking I'm missing something lol
[Android General] Calin:
The new apk is located in the decompiled folder and under the dist folder ;)

Sent from my Lenovo Yoga Tablet 10
[Android General] rogersb11:
Wow.... nice. Can't believe I missed that. Thanks a ton. Being able to stay in Ubuntu and work on TW is awesome. Being on Ubuntu 95% of the time for the last year I've become much less fond of the windows 7 I use to covet. Just can't beat the speed and power that Ubuntu offer, plus I can't compile a kernel in windows AND do this. Again thank you greatly for such a NEEDED and SPECTACULAR tool

Edit: I'm assuming that since you didn't mention it that when decompiling and recompiling a .jar that I don't need to copy anything. Again thanks for the tool and the response. I knew something was off when it build without issue but showed nothing I did lol
[Android General] Calin:
You're welcome but I didn't made this tool I just created this tutorial installation for Ubuntu users ;)

Sent from my Lenovo Yoga Tablet 10
[Android General] rogersb11:
Right right. I knew that lol. I'm slipping today. I gotta get some sleep lol
[Android General] fhem:
Apktool 2.0.0 RC3

Thank you very much for the tut. It worked well.

I just want to let you and everyone else know that with the latest apktool's you no longer need the aapt outside the jar for it ot run. I am running Mint KDE 17.1 and I followed your tut but used the latest Apktool 2.0.0 RC3 and only the apktool script - no aapt required. It is working fine with that setup. I use the same setup in Windows - no aapt outside the jar.

Regards to all.
[Android General] Calin:
Ok guys i updated the description including the latest version of apktool

Happy new year btw :)
[Android General] ShinySide:
Mini package still corrupt
[Android General] Calin:
Incredible.... it's dev-host then
[Android General] Calin:
Link is fixed

Hope is working now ;)
[Android General] aarontronix:
Very helpfull

:good:

tysm........................

I am searching for this for very long time
[Android General] EVObastard:
Ok I must be missing something, I didn't make it very far. I could not find the "tool folder" is that the name of the folder or am I actually looking for something else?​
[Android General] Calin:
What tool folder? :confused:
[Android General] EVObastard:
After downloading the SDKTool, the OP says to extract it and go to the tools folder.
[Android General] EVObastard:
OK so I got through all the steps using comand line and apktool, changed a couple .png pics in one of the drawable folders , recompiled, signed the apk, installed it but now it keeps FCs doesnt even start up. Any ideas?
[Android General] Calin:
Did you installed the framework from your Rom?
[Android General] EVObastard:
So sorry I totaly missed your reply somehow. I did not install framework just recompiled, not sure if that helps, I'm a total noob at most of this.
[Android General] Calin:
You need to install also the framework in order to compile the resources right ;)
[Android General] KuroKeita:
i used your tutorial to install apktool, but the problem is i can't run apktool without sudo, if i type sudo apktool then it'd run without any problem, but if i use apktool then the termianl'd return error "apktool: can't find apktool.jar"

any idea how to fix this issue?
[Android General] Calin:
Try to do the installation process again by starting from the apktool phase...