• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root Looking for a padawan learner...

Inside the androidpolicy.jar is the classes.dex using any kind of compression tool can extract it.
Okay it was a bad download found one with the dex file chmod is still not working. By the way how much HDD space do i need. I have about 180GB availble. If i need more tell. I have a different Linux Os on this computer that i never use that i can delete and add to Mints 180GB if needed.
 
Okay it was a bad download found one with the dex file chmod is still not working. By the way how much HDD space do i need. I have about 180GB availble. If i need more tell. I have a different Linux Os on this computer that i never use that i can delete and add to Mints 180GB if needed.

50gb is the minimum so you should be fine.
 
Alright i already got rid of it but mainly because it was just wasting space. Out of curosity would doing things like this be possible on BSD. Not that i want to use it but just curios
 
Then maybe the account doesn't have permission to create directory apktool in ~/apktool
I am sure it has permission. chown works for everything else. If i didn't have permission wouldn't just tell me i don't have permission. It just flat out says it cannot find it. By the way the link says nothing on the andriod.policy.jar
Good news is apktool works but it won't decompile without the andriod.policy.jar
apktool
Apktool v1.5.2 - a tool for reengineering Android apk files
Copyright 2010 Ryszard Wi&#347;niewski <brut.alll@gmail.com>
with smali v1.4.1, and baksmali v1.4.1
Updated by @iBotPeaches <connor.tumbleson@gmail.com>
Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)

Usage: apktool [-q|--quiet OR -v|--verbose] COMMAND [...]

COMMANDs are:

d[ecode] [OPTS] <file.apk> [<dir>]
Decode <file.apk> to <dir>.

OPTS:

-s, --no-src
Do not decode sources.
-r, --no-res
Do not decode resources.
-d, --debug
Decode in debug mode. Check project page for more info.
-b, --no-debug-info
Baksmali -- don't write out debug info (.local, .param, .line, etc.)
-f, --force
Force delete destination directory.
-t <tag>, --frame-tag <tag>
Try to use framework files tagged by <tag>.
--frame-path <dir>
Use the specified directory for framework files
--keep-broken-res
Use if there was an error and some resources were dropped, e.g.:
"Invalid config flags detected. Dropping resources", but you
want to decode them anyway, even with errors. You will have to
fix them manually before building.

b[uild] [OPTS] [<app_path>] [<out_file>]
Build an apk from already decoded application located in <app_path>.

It will automatically detect, whether files was changed and perform
needed steps only.

If you omit <app_path> then current directory will be used.
If you omit <out_file> then <app_path>/dist/<name_of_original.apk>
will be used.

OPTS:

-f, --force-all
Skip changes detection and build all files.
-d, --debug
Build in debug mode. Check project page for more info.
-a, --aapt
Loads aapt from specified location.

if|install-framework <framework.apk> [<tag>] --frame-path [<location>]
Install framework file to your system.

For additional info, see: android-apktool - A tool for reverse engineering Android apk files - Google Project Hosting
For smali/baksmali info, see: smali - An assembler/disassembler for Android&#39;s dex format - Google Project Hosting
 
1. Decompile android.policy.jar \ com \ android \ internal \ policy \ impl \ PhoneWindowManager.smali

Maybe i could just force it to run root
android.policy.jar \ com \ android \ internal \ policy \ impl \ PhoneWindowManager.smali
bash: /usr/local/bin/android.policy.jar: Permission denied
sudo: android.policy.jar: command not found

 
The androidpolicy.jar(located in system/framework of your rom.) file is the file youre decompiling so of course it will not work without it. The guide posted is for setting up your apktool in Linux not a how to for the decompiling process. Before any files dex or otherwise can be decompiled you must install your frameworks note the previously mentioned threads. Don't over complicate it. Just follow the setup procedures, extract your framework and androidpolicy.jar and you'll be good to go. Did you give root permission to the three files and make them executable as described in post #19?
 
The androidpolicy.jar(located in system/framework of your rom.) file is the file youre decompiling so of course it will not work without it. The guide posted is for setting up your apktool in Linux not a how to for the decompiling process. Before any files dex or otherwise can be decompiled you must install your frameworks note the previously mentioned threads. Don't over complicate it. Just follow the setup procedures, extract your framework and androidpolicy.jar and you'll be good to go. Did you give root permission to the three files and make them executable as described in post #19?
Yeah i gave root to those three files. Sorry i was mixing your steps in with the Kitkat guide and got confused my bad.

Okay so i got the andriod policy.jar but it does not contain \ com \ android \ internal \ policy \ impl \ PhoneWindowManager.smali
 
OK the classes.dex is in the androidpolicy.jar, to decompile the classes.dex you need smali/baksmali ...then once you've decompiled the classes.dex you'll have your hex editable smali files.
 
Um is the script inside the APK mutitool suppose to open in gedit? The mutitool is called APK manager though Notepad++ works btw

Yeah i trying to set up smali by Lesson 2
 
So pull your classes.dex from your androidpolicy.jar and use smali to decompile the dex file...make your edits to your decompiled files then recompile your dex, place it in your jar file and your all set.
 
uploadfromtaptalk1385502019019.jpg
 
Um is the script inside the APK mutitool suppose to open in gedit? The mutitool is called APK manager though Notepad++ works btw

Huh? Ok you need to be using apktool, apkmanager or apkmultitool. Those are three different tools. Pick one of the Linux install threads provided and just follow the instructions. You're all over the place lol you need to get your mod environment ready before anything else.
 
Huh? Ok you need to be using apktool, apkmanager or apkmultitool. Those are three different tools. Pick one of the Linux install threads provided and just follow the instructions. You're all over the place lol you need to get your mod environment ready before anything else.

Okay I have the apktool. as for the manager I am stuck becuase the script inside the folder only lanches a text editor. according to the steps i have to get the script to launch (What application is the script suppose to launch terminal?) before i can have smali/baksmali work. I guess i am stuck on that. Notepad++ works so i assume thats a Hex editor I set up java like this http://forum.xda-developers.com/showthread.php?t=2302780 a while ago % java -version
bash: fg: %: no such job
does that mean the path is not set up properly?

" Run the "setup" script and run then install framework option. *NOTE* USE A(N) UNMODIFIED FRAMEWORK from your rom. Now run the systemui install option. (Same as above, unmodified.)" This is not happening. Maybe the Script was designed for Windows only. Actually now that i think of it I think in Linux you put scripts in a certain folder on the Root filesystem and open the script via terminal. I think
 
Ok let's start over for Linux
1. Get SDK and install it.
2. Get Java and install it
3. Get Apktool and install it.
4. Get smali/baksmali and install it.
5. Hex editor
6. Image editor

The how to for Linux is listed for apktool and SDK/java and smali all have install instructions on their respective sites. The main page of this tutorial is for windows users. As they are the majority. The Linux install isn't hard just don't confuse the two.
 
Okay I have the apktool. as for the manager I am stuck becuase the script inside the folder only lanches a text editor. according to the steps i have to get the script to launch (What application is the script suppose to launch terminal?) before i can have smali/baksmali work. I guess i am stuck on that. Notepad++ works so i assume thats a Hex editor I set up java like this http://forum.xda-developers.com/showthread.php?t=2302780 a while ago % java -version
bash: fg: %: no such job
does that mean the path is not set up properly?

" Run the "setup" script and run then install framework option. *NOTE* USE A(N) UNMODIFIED FRAMEWORK from your rom. Now run the systemui install option. (Same as above, unmodified.)" This is not happening. Maybe the Script was designed for Windows only. Actually now that i think of it I think in Linux you put scripts in a certain folder on the Root filesystem and open the script via terminal. I think

For the no such job error, first run the command jobs to know the job id which is different from the process id.
Then use fg to bring it in foreground. #fg job_id
 
After doing some research and to cut down confusion anyone who wants to modify using Linux I really suggest the following tool. I just installed it and it works beautifully. Follow the instructions and read, read and read some more. This is called apk utility and its a very comprehensive suite so check it out...
http://en.miui.com/thread-5703-1-1.html
 
Back
Top Bottom