[UTILITY] Android Utility - [apktool|dex2jar|smali|more][Mac & Linux][Feb13, 2012] - Android

[UTILITY] Android Utility - [apktool|dex2jar|smali|more][Mac & Linux][Feb13, 2012]
Code:
October 12. 2011.
Dear AU users:
I want to make a list of all the projects/themes/ROMs that AU helped make/optimize/perfect. If you all could be so kind as to post a link to your projects and I can put in op.
The goal: (a.) to demonstrate the scope of AU, and (b.) to show off all of your ideas and projects.
I would appreciate your help with this.
Sincerely yours,
Tommy
Hello again!
This time, here to present you with Android Utility - a tool to discover and modify Android.
Currently available for Mac OS X and Linux
Windows Coming in the future.
Code:
Welcome back tommytomatoe,
Android Utility by tommytomatoe. Version 1.0.7. Special Edition
|-------------------------------||-------------------------------|
|-------------------------------||-------------------------------|
| BASIC TOOLS || ADVANCE TOOLS |
|-------------------------------||-------------------------------|
| 1. adb tools || 7. apk Re-Engineering |
| 2. keystore manager || 8. apk Optimization |
| 3. sign apk and update.zip || 9. dex code utility |
| 4. zipalign ||10. draw9patch utilities |
| 5. change-log creator ||11. AU ROM Utility |
| 6. png swap themer ||12. 3vodex |
|-------------------------------||-------------------------------|
| K. Run dsixda's Android Kitchen |
|----------------------------------------------------------------|
|----------------------------------------------------------------|
| x. Run Installation Guide || e. Extras |
| i. Install Android SDK || q. Quit |
| u. Update Android-Utility || |
|-------------------------------||-------------------------------|
Select an Option:
Install Instructions and Frequently Asked Questions in POST #3
What AU can help you do
Change apktool versions 1.3.1, 1.3.2, 1.4.1 on the fly
Apk optimization
Apk re-engineering (via apktool)
Keystore manager
Easy ADB
Draw9Patch compiler/decompiler
Zipalign
Dex Editing (via smali and baksmali)
Dex2Jar
Pngout
pngcrush
advpng
optipng
Auto ODEX
Auto dex-removal
Android Kitchen Integration
Much much more
Click to expand...
Click to collapse
The Goal
A tool for Mac! AU will provide the tools necessary to begin theming projects, apk modifications, optimizations, and hacks. At the end of the day, I hope this project has helped you in doing these things.
AU can also help the user install and utilize apktool even if the user chooses not to use the Android Utility Interface.
Note, in some instances of the utility superuser permissions must be granted (sudo). Please be aware that the changes made are reversible and are not destructive to the Host Operating System.
Please READ Posts #1, 2, and 3 in their Entirety before proceeding.
Feel free to post concerns and bugs. This is still in development! Thank you.
Click to expand...
Click to collapse
The Goods
Version History
Android Utility Source Code and information
Mac OS X Version 1.0.2 Download:
Android Utility Mac OS X Version 1.0.2
Linux Version 1.x.x Download:
Android Utility Universal Installer Automated Script
Download tar file. Open with Archive Manager. Extract au.installer. Run in terminal by double clicking on it. Follow on-screen prompts. Done.
Old Versions
Mac OS X
Android Utility Github Direct Download Version 1.0.1
Mirror - Full Version 1.0.1 Download
Mac Mirror Version b-1.0.0
Android Utility Github Direct Download Version b-1.0.0
Android Utility Github Direct Download Version 1.0.2
Update Package - 1.0.1 -> 1.0.2 - ONLY USE IF RUNNING VERSION 1.0.1. Extract "update" folder into root of android-utility, then run "update_script" by clicking on it.
Patch Update 1.0.2.b - Fixes three scripts. Extract "update" folder into root of android-utility, then run "update_script" by clicking on it.
Linux
Android Utility Github Direct Download Version 1.0.1
Update Package - 1.0.0 -> 1.0.1 - ONLY USE IF RUNNING VERSION 1.0.0. Extract "update" folder into root of android-utility, then run "update_script" by clicking on it.
Android Utility Github Direct Download Version 1.0.2
Patch Update 1.0.2.b - Fixes two scripts. Extract "update" folder into root of android-utility, then run "update_script" by clicking on it.
Android Utility Mirror Mediafire Full Version 1.0.2 Linux
Click to expand...
Click to collapse
Install Instructions and Frequently Asked Questions
Credits
Brut.all - apktool.jar and sound advice
JesusFreke - baksmali.jar and smali.jar
Stericson/JF - testsign.jar
Google - AOSP
Pendo - sound advice/answering my rookie questions
aamikam - sound advice
themikmik.com - Awesome sauce [jadeboy, nick, cho, et cetera ]
myn's thread - dougjamal, myn, lowetax, ageesm, persnlmgr, et cetera
xda developers - Roots
JsChiSurf - sound advice
dsixda - sound advice
Amon_RA - sound advice
Igor Pavlov - 7zip
Ardfry Imaging, LLC. - pngout
Glenn Randers-Pehrson - pngcrush
Andrea Mazzoleni - advpng
Cosmin Truta - optipng
Emmanuel Dupuy - JD-GUI
Xclusive Rydah, Chingy, misfit - testing and ideas

Version: 1.0.6
### Welcome to Android Utility
# README
# Author: Tommy Nguyen [tommytomatoe]
# Date: October 6, 2011
### Update. October 06, 2011
>Version 1.0.5
>added adb logcat ultimate tool
>added auto-update
>Version 1.0.6
>added update options
### Update. October 04, 2011
>updated res_compress
>added auto-zipalign option
### Update. October 04, 2011
>added system app sign option
>removed 7z and 7z.so
### Update. October 03, 2011
>Version 1.0.3
>updated main menu
>added kitchen plugin
### Update. August 22, 2011
>version 1.0.2
>updated main menu
>updated apktool (1.4.2 and 1.3.2-mod)
>added png Optimization [pngout, pngcrush, optipng, and advpng]
>updated installation guide
>added support for touchwhix and sony
>added 3vodex script capabilities
>removed 7z in apk_compress and res_compress
>updated installau
>added auto-dex-removal [dexrm and dexrm2]
>BIGGEST CHANGE: added dex2jar
>added smali/baksmali support
### Update. July 14, 2011
>version 1.0.1
>updated sign script
>updated main menu
>added ROM Utility
>added apk Optimization
>added change-log creator
>fixed error logging for decompiling and recompile process
>added resources.arsc decompression
### Update. July 13, 2011
>version b-1.0.0
>redid decompile and rebuild scripts
>added error logging to decode and rebuild
>added filter to adb script
>changed main menu layout
### Update. July 08, 2011
>more preparation
>added zipalign script
>added sign apk/update.zip scripts
>updated apktool decode mechanism, now includes META-INF extractions
### Update. July 05, 2011
> preparing for initial release
> added apktool build script
> added draw9patch stuff
### Update. June 20, 2011
> added some major changes
> got confirmation for use of PNGOUT
> preparing for initial release
### Update. June 15, 2011
> major changes to install script
> minor changes to andutil script
> Version a-0.89 should be up and running soon
### Update. June 06, 2011
> github repo created
### CREDITS
> brut.all for apktool.jar and decode9patchPng.jar
> jesusfreke for smali and baksmali
> PNGOUT.EXE used with permission of Ardfry Imaging, LLC.
> pngcrush - Copyright (C) 1998-2002,2006-2011 Glenn Randers-Pehrson
> advpng - Andrea Mazzoleni
> optipng - Copyright (C) 2001-2011 Cosmin Truta
> dex2jar - [email protected]
> JD-GUI - Copyright © 2008-2011 Emmanuel Dupuy
> Igor Pavlov for 7zip
> Google
> Android
> HTC
> xda developers
> themikmik.com
> tommytomatoe

Please follow these INSTRUCTIONS Carefully. The usefulness of AU depends on your attention of these instructions. Thank you.
### Installation ###
*** MAC ***
Prerequisite: JAVA (standard on Mac OS X)
1. Download from Github.com link or direct link or mirror.
2. Unpack the archive (tar.gx or zip) to your HOME folder.
HOME folder is located in /Users/username. To determine HOME folder, open Terminal in Applications Drawer and type:
open $HOME
3. Place the unzipped folder in the finder window that opens.
4. Rename the folder to "android-utility" - ATTENTION! CASE SENSITIVE (ie. Android-utility ≠ android-utility).
5. Double check and make sure name of folder is "android-utility".
6 From here, you have two options (A or B).
# Option A
Open in Finder the android-utility
Look for the file "andutil"
Double click on "andutil"
A Terminal Window will open up with Welcome Screen (Which you will see only on initial install)
Continue through the installation
# Option B
Open a Terminal Window
Type these lines followed by ENTER key:
cd $HOME/android-utility
./andutil
Continue through the installation
From now on, to run AU, you can either double click on the andutil icon, or simply type "andutil" in Terminal from any directory. AU adds necessary files to your PATH.
Click to expand...
Click to collapse
*** Linux ***
Prerequisite: JAVA
If you have Java, continue. If not, run these commands (pressing ENTER key after each one) in Terminal to install Java:
sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-bin sun-java6-jre
sudo apt-get -f install
sudo apt-get install sun-java6-bin sun-java6-jre
1. Download from Github.com link or direct link or mirror.
2. Unpack the archive (tar.gx or zip) to your HOME folder.
HOME folder is located in /home/username. To determine HOME folder, open Terminal in Applications Drawer and type (for Gnome Environment):
nautilus $HOME
3. Place the unzipped folder in the window that opens.
4. Rename the folder to "android-utility" - ATTENTION! CASE SENSITIVE (ie. Android-utility ≠ android-utility).
5. Double check and make sure name of folder is "android-utility".
6 From here, you have two options (A or B).
# Option A
Open in Finder the android-utility
Look for the file "andutil"
Double click on "andutil"
A Terminal Window will open up with Welcome Screen (Which you will see only on initial install)
Continue through the installation
# Option B
Open a Terminal Window
Type these lines followed by ENTER key:
cd $HOME/android-utility
./andutil
Continue through the installation
From now on, to run AU, you can either double click on the andutil icon, or simply type "andutil" in Terminal from any directory. AU adds necessary files to your PATH.
Click to expand...
Click to collapse
*** Windows ***
Coming Later.
Frequently Asked Questions
1. What if I get /usr/local/bin not a directory? ScreenShot
Answer: Post #111 aka my Epiphany
2. What if I get an error "Apk cannot be decoded"? ScreenShot
Answer: Please be sure that your apk has no spaces in its name. Post #98
3. Why is my new apk so much smaller than my original apk?
Answer: Two reasons. 1. Apktool when it builds, it uses full compression. 2. The new apk has not been signed, so the signature files "META-INF" are not present.
4. What can I use to edit xml files?
Answer: Mac: TextEdit or TextWrangler. Linux: Gedit (my personal favorite). Windows: Notepad++
5. Why won't my apk decompile?
Answer: Well, multiple reasons. Let's start fresh.
a. Have you installed proper "framework" files, ie framework-res.apk and com.htc.resources.apk? These go inside working-folder/framework-here/. Install via Option #1 in Apk re-engineering.
b. Have you installed a new version of apktool? Sometimes that will resolve your issues.
6. Why won't my apk recompile/build?
Answer: Again, could be multiple reasons.
a. Are you sure your framework files are installed?
b. Your edits could just be bad/mistakes.
c. Install a different version of "aapt", available in installau and the apk Re-engineering suite.
7. I get the error: "apktool.yml does not exist".
Answer: Please refer to questions 5 and 6. A file "apktool.yml" gets created that's used by apktool during the decode process. If that went wrong, then you won't be able to compile.
8. AU tells me to check build_log for errors. But there is nothing there!
Answer: Currently the build_log is funky. I will fix in the future. If it tells you to check log and nothing is there...then ignore it. There really wasn't an error. But if the log does exist, then you have an error.
9. When will a PC Version exist?
Answer: When I have time.
10. When will you include latest apktool (v1.4.2)?
Answer: AU Version 1.0.2 will include latest tools.
11. When will smali/baksmali support be available?
Answer: AU Version 1.0.2 will include latest tools.
12. When will png optimization be available?
Answer: AU Version 1.0.2 will include latest tools.
13. Why cant't I sign my apk with test keys? They won't install!
Answer: Using an archive manager, delete the ORIGINAL "META-INF" (aka the signature) and then sign.
14. I get errors using Draw9Patch decompiler after using 9.png from a decompiled apk.
Answer: Post 151
15. What if I have a non-HTC Device, like Xperia or Sammy?
Answer: Currently, support for those devices does not exist for the "Apk Re-Engineering", namely Option #1 Install Framework first. The tool is written to only look for "framework-res.apk" and "com.htc.resources.apk". Future versions will have support for more proprietary ROMs. More info on Post 134.
More to come.
Enjoy!

Awesome utility man
I can't wait for the Windows and Linux ver

+1 to Myn's reply. Can't wait for Windows & Linux versions.
Great work!
Sent from my HTC Evo 3D using Tapatalk!

Thank you gentlemen. More features in the plans but a Linux version first. Maybe tomorrow night.
Sent from my PC36100 using XDA Premium App

tommytomatoe said:
Thank you gentlemen. More features in the plans but a Linux version first. Maybe tomorrow night.
Sent from my PC36100 using XDA Premium App
Click to expand...
Click to collapse
My laptop is very happy to hear that!
Sent from my HTC Evo 3D using Tapatalk!

Great, now I definitely have to dust off my MacBook to use this.

vanessaem said:
Great, now I definitely have to dust off my MacBook to use this.
Click to expand...
Click to collapse
Do it V! It will solve all your apktool woes.
Just getting off work. Might have some time to polish of Linux version tonight...but will have to see what the lady wants to do. :-(
Sent from my PC36100 using XDA Premium App

I'm on a Windows computer, but I'd be willing to grab a Mac to try this out if it can solve my problem.
I need to edit AndroidManifest.xml in Settings.apk. I follow the procedure below:
1. Decompile settings.apk
2. Edit AndroidManifest.xml
3. Recompile
4. Drag and replace AndroidManifest.xml from recompiled version into original
Unfortunately, the application doesn't show up on the device. I've been using apktool, but also tried apk manager with signing and all. I don't know how to fix the problem, which I assume is caused by the signature of the APK.
Will your utility make it easier for me to edit this file?

kennethpenn said:
I'm on a Windows computer, but I'd be willing to grab a Mac to try this out if it can solve my problem.
I need to edit AndroidManifest.xml in Settings.apk. I follow the procedure below:
1. Decompile settings.apk
2. Edit AndroidManifest.xml
3. Recompile
4. Drag and replace AndroidManifest.xml from recompiled version into original
Unfortunately, the application doesn't show up on the device. I've been using apktool, but also tried apk manager with signing and all. I don't know how to fix the problem, which I assume is caused by the signature of the APK.
Will your utility make it easier for me to edit this file?
Click to expand...
Click to collapse
I believe it will be easier for you. In the decompile process AU will ask if you would like to extract original META INF. Once you're done Modding what you want to do, drag the Meta INF into the new apk. Everything is organized and easily understood once you use it. But before you get a Mac....
What are you changing in the manifest? It could very well be your edit doesn't work. Please give more information
Sent from my PC36100 using XDA Premium App

Linux Version coming within the hour. Just needs a little testing

Linux Version B-1.0.0 is live.

This is hands down, the best utility. Love it.
Sent From My HTC Evo 3D Using Tapatalk On The Now Network From Sprint!

Rydah805 said:
This is hands down, the best utility. Love it.
Sent From My HTC Evo 3D Using Tapatalk On The Now Network From Sprint!
Click to expand...
Click to collapse
You are hands down too nice
Sent from my PC36100 using XDA Premium App

Awesome, thank you!

Looks like a great tool. Can't wait to see the other elements included.
On Linux using apk compression, it isn't removing the apk from the "original_apps" folder. Looks like it performs the rm command but leaves off the file extension so it can't find the file to remove.
EDIT: I get this between each file.
Code:
rm: cannot remove '/home/tmartin/android-utility/working-folder/mod-here-multi/original_apps/HtcProfileWidget': No such file or directory
HtcProfileWidget.apk decompressed
Decompressing HtcRingtoneWidget.apk
/home/tmartin/android-utility/working-folder/mod-here-multi/original_apps/HtcRingtoneWidget: No such file or directory
EDIT #2: Looks like it made ever file 24.2mb & unreadable??

TMartin said:
Looks like a great tool. Can't wait to see the other elements included.
On Linux using apk compression, it isn't removing the apk from the "original_apps" folder. Looks like it performs the rm command but leaves off the file extension so it can't find the file to remove.
EDIT: I get this between each file.
Code:
rm: cannot remove '/home/tmartin/android-utility/working-folder/mod-here-multi/original_apps/HtcProfileWidget': No such file or directory
HtcProfileWidget.apk decompressed
Decompressing HtcRingtoneWidget.apk
/home/tmartin/android-utility/working-folder/mod-here-multi/original_apps/HtcRingtoneWidget: No such file or directory
EDIT #2: Looks like it made ever file 24.2mb & unreadable??
Click to expand...
Click to collapse
Arg! Just got to work so I can't fix. I was afraid that one would give errors. Works on Mac but I didn't test in Linux. I will fix later. Sorry about that.
But big thanks for the feedback.
Sent from my PC36100 using XDA Premium App

tommytomatoe said:
Arg! Just got to work so I can't fix. I was afraid that one would give errors. Works on Mac but I didn't test in Linux. I will fix later. Sorry about that.
But big thanks for the feedback.
Sent from my PC36100 using XDA Premium App
Click to expand...
Click to collapse
It happens, no rush. I'm just testing things out. I'll let you know if I find anything else.

TMartin said:
It happens, no rush. I'm just testing things out. I'll let you know if I find anything else.
Click to expand...
Click to collapse
Thanks man. Please list any and all bugs!!
Sent from my PC36100 using XDA Premium App

Related

[Q] 7zip for Android?

have anyone seen 7zip for Android?
AndroZip handels 7zip
Sent from my GT-I9000 using XDA App
MiMikri said:
AndroZip handels 7zip
Sent from my GT-I9000 using XDA App
Click to expand...
Click to collapse
Unless it is pw-protected.
AllGamer said:
have anyone seen 7zip for Android?
Click to expand...
Click to collapse
I've just compiled p7zip-9.20.1, it's the command line version of 7zip, if you still want it, you can download it from here:
http://dl.dbank.com/c0mtm6i3wa
(sorry, it's a file share site provided by Huawei company in Chinese language, outseas file share sites are blocked by "opening" China government)
Code:
$ uname -a
uname -a
Linux localhost 2.6.35.7-perf #1 PREEMPT Sat Dec 3 17:57:38 CST 2011 armv7l GNU/Linux
$ ls -l /system/bin/7z /data/local/bin/7za-9.20
ls -l /system/bin/7z /data/local/bin/7za-9.20
-rwxr-xr-x 1 2000 2000 1702540 Dec 26 03:37 /data/local/bin/7za-9.20
lrwxrwxrwx 1 0 0 24 Dec 26 03:03 /system/bin/7z -> /data/local/bin/7za-9.20
$ 7z
7z
7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
p7zip Version 9.20 (locale=C,Utf16=off,HugeFiles=on,1 CPU)
Usage: 7za <command> [<switches>...] <archive_name> [<file_names>...]
[<@listfiles...>]
<Commands>
a: Add files to archive
b: Benchmark
d: Delete files from archive
e: Extract files from archive (without using directory names)
l: List contents of archive
t: Test integrity of archive
u: Update files to archive
x: eXtract files with full paths
<Switches>
-ai[r[-|0]]{@listfile|!wildcard}: Include archives
-ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
-bd: Disable percentage indicator
-i[r[-|0]]{@listfile|!wildcard}: Include filenames
-m{Parameters}: set compression Method
-o{Directory}: set Output directory
-p{Password}: set Password
-r[-|0]: Recurse subdirectories
-scs{UTF-8 | WIN | DOS}: set charset for list files
-sfx[{name}]: Create SFX archive
-si[{name}]: read data from stdin
-slt: show technical information for l (List) command
-so: write data to stdout
-ssc[-]: set sensitive case mode
-t{Type}: Set type of archive
-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
-v{Size}[b|k|m|g]: Create volumes
-w[{path}]: assign Work directory. Empty path means a temporary directory
-x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
-y: assume Yes on all queries
Hi lovetide. What kind of compression did you use?
I can't find a way to open it :/
Guys I found another working port of p7zip for android.
I Tried to post a link but becouse i'm a 'noob' here i'm not allowed to.
So you can search for "port2android" at google and you will find it
ilbolza said:
Hi lovetide. What kind of compression did you use?
I can't find a way to open it :/
Click to expand...
Click to collapse
It's not an archive file, it's an executable file, you can execute it directly. It's static linked, so it should work on most Android phones.
lovetide said:
I've just compiled p7zip-9.20.1, it's the command line version of 7zip, if you still want it, you can download it from here:
http://dl.dbank.com/c0mtm6i3wa
(sorry, it's a file share site provided by Huawei company in Chinese language, outseas file share sites are blocked by "opening" China government)
Click to expand...
Click to collapse
Link does demand to pay for it. Can you upload attachment on the forum?
You have to click the link several times. It will work after some time.
But scroll down... Mirror is attached.
Here version 9.38.1 for arm-v7a, 7za is standalone, 7z needs 7z.so in /system/lib, 7zr a reduced version of 7za, Codecs must be in current dir for rar support (optional)
in the archive I've also added makefile.machine if you want to compile from source (you need to replace the one in the source directory, it needs to be edited for paths)
sherpya said:
Here version 9.38.1 for arm-v7a, 7za is standalone, 7z needs 7z.so in /system/lib, 7zr a reduced version of 7za, Codecs must be in current dir for rar support (optional)
in the archive I've also added makefile.machine if you want to compile from source (you need to replace the one in the source directory, it needs to be edited for paths)
Click to expand...
Click to collapse
Thank you very much for this indeed. XDA won't let it download no matter how many times I try, would it be possible for you to post it in a mirror somewhere ?
Edit : Never mind, finally got it. XDA glitch.
Edit 2 : Shoot, this will not run in Android 5 and newer systems... ( Error: only position independent executables (PIE) are supported. )
sorry but I didn't have an arm android 5.x to test it, I'm attaching pie build, I think it should work also on android < 5, but anyway there is still the old attachment in previous post
Hey...
I think the Zarchiver app from the play store would just work.
Hit thanks if I helped you!
ClawSpark said:
Hey...
I think the Zarchiver app from the play store would just work.
Click to expand...
Click to collapse
Does it support being called via command line, from eg a bash script?
To the rest: did the PIE build work fine?
p7zip 16.02 stand-alone attached.
help needed. anybody know how to set HugeFiles=on? compiling with -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE does not give expected result
- - -
edit: many thanks to superbeef150 @ XDA for solution!
aIecxs said:
p7zip 16.02 stand-alone attached.
help needed. anybody know how to set HugeFiles=on? compiling with -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE does not give expected result
Click to expand...
Click to collapse
Does this work on Android 6.0?
aIecxs said:
p7zip 16.02 stand-alone attached.
Click to expand...
Click to collapse
Thanks for sharing! I'm able to get this to run on several devices, but for some reason it errors out when running it in TWRP (which is coincidentally where I hope to run it):
Code:
~ # chmod 777 /data/local/tmp/p7zip
~ # /data/local/tmp/p7zip
/sbin/sh: /data/local/tmp/p7zip: not found
~ # sh /data/local/tmp/p7zip
/data/local/tmp/p7zip: line 1: syntax error: unexpected word (expecting ")")
Has anyone observed this different behavior between TWRP and the normal OS occur with 7zip or any other terminal/shell/CLI apps?
superbeef150 said:
Has anyone observed this different behavior between TWRP and the normal OS occur with 7zip or any other terminal/shell/CLI apps?
Click to expand...
Click to collapse
I got this figured out in case anyone stumbles across this in the future.
The default shell in TWRP (in my case) is at /sbin/sh . From what I've read, it sounds like this is the one that is supplied with BusyBox rather than the normal one. When I ran 7z using /system/bin/sh I had a lot better luck.
I'm now running into issues with larger ISO files. It seems like ones over 2GB are the problematic ones, I can't extract, test, or list contents on them, instead I always get an "E_FAIL" error message.
Googling that in the context of 7z seems to indicate a space issue, but testing and listing contents should make that irrelevant. For the sake of trying I attempted this with the ISOs on an exFAT usb flash drive as well as an NTFS usb hard drive with the same results.
I suspect that the HugeFiles=off setting that @aIecxs mentioned earlier may be related, but unfortunately the only information on the topic I could find were on one of his posts on p7zip's SourceForge forum where someone suggested a few different compile flags that didn't seem to make a difference for him or myself.
If anyone has any thoughts on this I'd really appreciate it! Thanks!
maybe compiling on 64-bit machine will support Hugefiles
aIecxs said:
maybe compiling on 64-bit machine will support Hugefiles
Click to expand...
Click to collapse
I'm doing that currently, but unfortunately HugeFiles is still showing up as off :/

Is it possible to use baksmali on the device

Basically I want to be able to decompile apks. And jar files directly on my phone. Can I do that?
Yes, you can. At least, for the most part. The main constraining factor is the small amount of memory available on the device.
1. run the dx util on baksmali.jar, to produce a classes.dex file
2. add the classes.dex file to a new jar (or you can just add it to baksmali.jar)
3. push the jar containing classes.dex to the device somewhere (let's say /data/local/baksmali.jar)
4. dalvikvm -classpath /data/local/baksmali.jar org.jf.baksmali.baksmali <normal baksmali options>
5. bonus points if you then proceded to run baksmali on baksmali.jar (and then the universe implodes)
note: I just tried this with the latest version of baksmali, and there's some weird issue with the baksmali jar file, where it contains duplicate entries of every class file, which causes dx to choke on it. I'll see if I can get that fixed soon, and get a new build out. In the meantime, you can probably find an older version without that problem.
Sweet, thanks for your input. I was out last night and I had this idea for an edit to make, only to become sad because I didn't have access to a computer.
This will help me out a lot.
JesusFreke said:
Yes, you can. At least, for the most part. The main constraining factor is the small amount of memory available on the device.
1. run the dx util on baksmali.jar, to produce a classes.dex file
2. add the classes.dex file to a new jar (or you can just add it to baksmali.jar)
3. push the jar containing classes.dex to the device somewhere (let's say /data/local/baksmali.jar)
4. dalvikvm -classpath /data/local/baksmali.jar org.jf.baksmali.baksmali <normal baksmali options>
5. bonus points if you then proceded to run baksmali on baksmali.jar (and then the universe implodes)
note: I just tried this with the latest version of baksmali, and there's some weird issue with the baksmali jar file, where it contains duplicate entries of every class file, which causes dx to choke on it. I'll see if I can get that fixed soon, and get a new build out. In the meantime, you can probably find an older version without that problem.
Click to expand...
Click to collapse
The problem seems to be within the buildprocess as the generated classes for baksmali and smali are added twice to the *-dev-jar-with-dependencies.jar. As I'm not familar with maven I didn't fixed the source of the error but I managed to get it working.
I attached a small pythonscript which is able to remove the dublicated files within the jar. Just run it over the file and get a fixed version which is processable by dx.
The script:
Code:
#!/usr/bin/python
import sys
from zipfile import *
if len(sys.argv) != 3:
print("Usage: %s input.jar output.jar" % sys.argv[0]);
sys.exit(-1)
input = ZipFile(sys.argv[1], "r")
output = ZipFile(sys.argv[2], "w")
seen = []
for file in input.namelist():
if file not in seen:
output.writestr(file, input.read(file))
seen.append(file)
else:
print("dub found: %s" % file)
input.close()
output.close()
sorry ...
Wrong place
JesusFreke said:
Yes, you can. At least, for the most part. The main constraining factor is the small amount of memory available on the device.
1. run the dx util on baksmali.jar, to produce a classes.dex file
2. add the classes.dex file to a new jar (or you can just add it to baksmali.jar)
3. push the jar containing classes.dex to the device somewhere (let's say /data/local/baksmali.jar)
4. dalvikvm -classpath /data/local/baksmali.jar org.jf.baksmali.baksmali <normal baksmali options>
5. bonus points if you then proceded to run baksmali on baksmali.jar (and then the universe implodes)
note: I just tried this with the latest version of baksmali, and there's some weird issue with the baksmali jar file, where it contains duplicate entries of every class file, which causes dx to choke on it. I'll see if I can get that fixed soon, and get a new build out. In the meantime, you can probably find an older version without that problem.
Click to expand...
Click to collapse
I realize this is a very old thread, but it is exactly what I am looking for However, it seems there are Java 8 features in smali/baksmali now and dx does not work. Is there a workaround for this or any other way to run smali/baksmali from terminal on Android? Thanks!
The older versions of smali may still work for you. Or what I've done is use Termux and download the jdk for arm64 and used the ndk to compile smali on my device.
Delgoth said:
The older versions of smali may still work for you. Or what I've done is use Termux and download the jdk for arm64 and used the ndk to compile smali on my device.
Click to expand...
Click to collapse
Thanks for the reply
However, I am not trying to compile smali on my device. I am trying to run the latest smali/baksmali on my device in Termux. Unfortunately, the older versions will not work for my needs. If you can help I would really appreciate it
But compiling the latest build of small on the device will allow you to use the latest build of smali.

[All In One Guide for Dummies] Porting ROMs/Building CM7 from Source/Themes |80% Done

Here you have it people , I may be wrong at some places so please excuse me
Requirements :
winzip
any file explorer on your desktop
2 ROMs ( one of X10 and other )
Suggestions :
Use ROMs from Phones like NexusOne , HTC Desire
all phones with QSD8250 and Adreno 200
Method:
Just do these changes to the files and have a Port which boots up
Delete :
/data folder
boot.img
/system/etc/firmware
/system/etc/init.d
Copy & Paste :
in /system/bin -
akmd2
am
bmgr
chargemon
charger
fix_permissions
hci_qcomm_init
hci_attach
ime
input
monkey
pm
port-bridge
qumxd
rild
updatemiscta
wlanmac
wlantool
ramdisk.tar/.gz
/system/etc :
replace all files in -
bluetooth
dhcpcd
wifi
firmware
copy the files -
apns-conf.xml
dbus.conf
DualMicControl
gps.conf
hosts
init* files
media-profiles.xml
resolv.conf
sensors.conf
sysctl.conf
vold.fstab
/system/lib folder :
delete and replace all files in:
/system/lib/modules
/system/lib/hw
copy the following files
in /system/lib/egl :
All EXCEPT libGLES_android.so
copy & replace these files :
libauth.so
libcm.so
libdiag.so
libdbus.so
libdss.so
libdsm.so
libgsl.so
libgstk_exp.so
libmiscta.so
libmmgsdilib.so
libmmipl.so
libmmjpeg.so
libnv.so
liboem_rapi.so
liboemcamera.so
liboncrpc.so
libpbmlib.so
libqmi.so
libqueue.so
libril.so
libril-qc-1.so
libuim.so
libwms.so
libwmsts.so
/system/usr/keychars -
es209ra_keypad.kcm
and delete the original file (example : passion_keypad.kcm OR bravo_keypad.kcm)
/system/usr/keylayout -
es209ra*.kl
do the same as with.kcm
Replace :-
Build.prop
META-INF folder
Cautions :-
Use the same version of android to port
You will need to change the build.prop to whatever you desire
You may need to edit the update-script
Porting gets over here !!!!!
WAIT I'll Complete it later
Many People want to know this right ?
Bro , Dude , Buddy , friend , mate WHICH FILES ARE FOR WHAT ??
what does akmd2 do ? what is it for ????
Here , I will try to provide you as many answers as I can :-
# Prebuilt kl keymaps
/system/usr/keylayout/es209ra_keypad.kl
/system/usr/keylayout/es209ra_handset.kl
/system/usr/keychars/es209ra_keypad.kcm.bin
## RIL related stuff [Responsible For GSM/DATA and Sim card]
/system/lib/libril.so
/system/bin/port-bridge
/system/bin/qmuxd
/system/lib/libauth.so
/system/lib/libcm.so
/system/lib/libdiag.so
/system/lib/libdll.so
/system/lib/libdsm.so
/system/lib/libdss.so
/system/lib/libgsdi_exp.so
/system/lib/libgstk_exp.so
/system/lib/libmmgsdilib.so
/system/lib/libnv.so
/system/lib/liboem_rapi.so
/system/lib/liboncrpc.so
/system/lib/libpbmlib.so
/system/lib/libqmi.so
/system/lib/libqueue.so
/system/lib/libuim.so
/system/lib/libril-qc-1.so
/system/lib/libwms.so
/system/lib/libwmsts.so
## Camera proprietaries
/system/lib/liboemcamera.so
/system/lib/libmmjpeg.so
/system/lib/libmmipl.so
/system/lib/libcamera.so
/system/lib/libopencore_common.so
## FIRMWARE
/system/etc/firmware/yamato_pfp.fw
/system/etc/firmware/yamato_pm4.fw
/system/etc/firmware/camfirm.bin
## ATHEROS WIFI [ WIFI modules for X10 ]
/system/lib/modules/athwlan.bin.z77
/system/lib/modules/data.patch.hw2_0.bin
/system/bin/wlan_mac
/system/bin/wlan_tool
## BT proprietary [ Bluetooth for X10 ]
/system/bin/hci_qcomm_init
/system/bin/hciattach
## Adreno 200 files [ Responsible for display i.e. the GPU ]
/system/lib/libgsl.so
/system/lib/egl/libGLESv1_CM_adreno200.so
/system/lib/egl/libq3dtools_adreno200.so
/system/lib/egl/libEGL_adreno200.so
/system/lib/egl/libGLESv2_adreno200.so
## Other libraries and proprietary binaries
/system/etc/vold.fstab [ SD Card ]
/system/etc/sensors.conf [Proximity sensors , etc]
/system/bin/akmd2
#offline charger
/system/bin/chargemon
/system/bin/updatemiscta
/system/lib/libmiscta.so
#hw [The lights between the HOME , Menu and back button ]
/system/lib/hw/copybit.qsd8k.so
/system/lib/hw/sensors.default.so
HOW TO MAKE THEMES
There are 2 types of themes you can make :-
1.Involving systemUI.apk and framework-res.apk
2.Involving the T-mobile Theme engine
I will begin with LEVEL (1)
There are two ways of doing this as well
1.Classic Way
2.The spaarc's cheap way (I use this one )
CLASSIC WAY
Requirements :-
1.A cool head
2.Apk Manager 4.4 (OR any APK editor , etc )
3.Original Framework-res.apk and SystemUI.apk
4.Themed Framework-res.apk and SystemUI.apk
OR
4.Many .PNG Images , In order to theme
Method :-
1.Use apk manager to decompile the original AND Themed apk's(i.e If you have a themed one)
2.ONLY Replace files found in /res/drawable-hdpi folder
3.ReCompile
4.Just replace Using RootExplorer or make a update.zip
Spaarc's Cheap Way
This is top secret , but i will tell it you
Requirements :-
1.Computer
2.7-zip
3.Original Framework-res.apk and SystemUI.apk
4.Themed Framework-res.apk and SystemUI.apk
OR
4.Many .PNG Images , In order to theme
Method :-
1.Use 7-zip to extract the apk
2.Replace files
3.Repack as zip using 7-zip again
4.Rename to ".apk"
5.Replace and Enjoy
T-MOBILE THEME CHOOSER
Follow this AWESOME guide
I don't have the time or patience of rewritting it in my cheeky tongue
Here , this completes your themeing guide
If you have any questions just Drop me a PM
HOW TO COMPILE CM7 ROMS FROM SOURCE
I have written this guide only for linux Users
Bibliography -
1.source.android.com
2.wiki.cyanogenmod.com
The guide starts here :-
Install the ADB
Install the Android SDK.
2.Install the Build Packages
Install using the package manager of your choice:
For 32-bit & 64-bit systems:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush schedtool
For 64-bit only systems:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.3-multilib g++-4.3-multilib
NOTE: gcc-4.3-multilib g++-4.3-multilib is no longer available for Ubuntu 11.04 64-bit, but should still build without issue.
NOTE: On Ubuntu 10.10, and variants, you need to enable the parter repository to install sun-java6-jdk:
sudo add-apt-repository "deb http://archive.canonical.com/ maverick partner"
This will get you all the resources you need to build your CyanogenMod ROM
3.Create the Directories
You will need to set up some directories in your build environment.
To create them:
mkdir -p ~/bin
mkdir -p ~/android/system
4.Install the Repository
Enter the following to download make executable the "repo" binary:
curl https://github.com/spaarc/tools_repo/repo > ~/bin/repo "OR" curl https://github.com/spaarc/tools_repo/blob/master/repo > ~/bin/repo
chmod a+x ~/bin/repo
NOTE: You may need to reboot for these changes to take effect.
Now enter the following to initialize the repository:
cd ~/android/system/
repo init -u git://github.com/CyanogenMod/android.git -b gingerbread
repo sync -j16
5.Copy proprietary files
NOTE: This only needs done the first time you build.
You will need to have a Xperia X10 with a working copy of CyanogenMod install and ADB working on the computer. This script will copy the proprietary files from the device.
Connect the device to the computer and ensure that ADB is working properly.
cd ~/android/system/device/SEMC/es209ra/
./extract-files.sh
NOTE: If some hardware isn't working, like camcorder or FM radio, you will need to find the updated prop blobs.
6.Download RomManager
NOTE: This only needs to be done when an update to RomManager is released. If you are-up-to date, you may skip to Building CyanogenMod.
Download RomManager which is needed by the build:
~/android/system/vendor/cyanogen/get-rommanager
7.Building CyanogenMod
Check for updates
First, check for updates in the source:
cd ~/android/system/
repo sync
Configure Build & Compile
Now, the environment must be configured to build and the ROM compiled, from code, for the Xperia X10
. build/envsetup.sh && brunch es209ra
Install
Copy your .zip file from ~/android/system/out/target/product/es209ra/update.cm-XXXXX-signed.zip to the root of the SD card.
Optional: Download Google Apps for CyanogenMod 7 and place it on the root of the SD card.
Flash both of these .zip files from recovery.
reserved 4
reserved last
Awesome my friend, keep it up, good to see another dude, which are trying to help our X10 community .
Thnx a lot Spaarc bro.... u r gr8 coz u help
Sent from my X10i using XDA App
thanks sparc that will help people like me who wants to develop and play with android and with the xperia
That is nothing ,
The first post is incomplete
I also have to write how to compile Aosp ROM s
Which files are for what , which you r porting
I also have to write how to code those sources which u can see at github ...
There is a lot , how to make themes ...
sent from my Android powered smart phone
spaarc said:
That is nothing ,
The first post is incomplete
I also have to write how to compile Aosp ROM s
Which files are for what , which you r porting
I also have to write how to code those sources which u can see at github ...
There is a lot , how to make themes ...
sent from my Android powered smart phone
Click to expand...
Click to collapse
Why dont you type it up on notepad or ms word so you dont have to keep stopping and people than going it is only half complete and crap like that. If you type it all up in notepad then you can just copy/paste here and then it will all me done.
Just saying what I would do and just trying to help
Sent from my X10i using xda premium
I don't have time to do it that's why ...
I'll complete it in this week
I don't care what people say
sent from my Android powered smart phone
wow..nice tutorial man!!
thanx!
Main part of the guide is over
approx 2/3 left
Really really exhausted , TC and bring me new ROMS
Thanks can u do like a guide of porting roms from the phones with different gpu/cpu?
Paji tussi great hoo!!
Sent from my X10i using xda premium
#offline charger
/system/bin/chargemon
/system/bin/updatemiscta
/system/lib/libmiscta.so
Click to expand...
Click to collapse
is that all for offline charging?
i am working on integrating offline charger in main kernel ramdisk... so that it will be independent of all things in /system
If I can't do it how could I teach you ?
It is next to impossible
Bit still editing the init.rc in ramdisk should do the trick
sent from my Android powered smart phone
spaarc said:
If I can't do it how could I teach you ?
It is next to impossible
Bit still editing the init.rc in ramdisk should do the trick
sent from my Android powered smart phone
Click to expand...
Click to collapse
that and hex editing the files involved
Mate i need help have done this method with x10 2.3.3 and arc 2.3.4 and only copied the files u have said and i have UB with DK v5 the phone just reboots and reboots while on DK logo...
Shouldn't their be files from permissions folder?
sahibunlimited said:
Mate i need help have done this method with x10 2.3.3 and arc 2.3.4 and only copied the files u have said and i have UB with DK v5 the phone just reboots and reboots while on DK logo...
Shouldn't their be files from permissions folder?
Click to expand...
Click to collapse
No nothing more ,
Did you copy the ramdisk ?
Send me a logcat
sent from my Android powered smart phone

[HOW-TO][TUTORIAL][WIP]DEODEX, BUILD KERNEL, BUILD CUSTOM ROM and MORE

Hi all,
In this thread, I will try to share the knowledge I have on deodexing, making custom ROMs, modifying initramfs, building kernel and much more.
Please check the below posts for each of these tutorials.
Hope this opens doors to many new ROM and Kernel developers.
NOTE: THESE TUTORIALS ARE WRITTEN FOR GT-I9100. WILL NOT WORK ON OTHER DEVICES. I DON'T TAKE ANY RESPONSIBILITY IF YOU MESS UP AND BRICK YOUR DEVICE OR ANYTHING ELSE. USE AT YOUR OWN RISK.
Deodexing Stock Rom
For GINGERBREAD ROMS:
What you need to have:
xUltimate v2.3.3 - you can download it HERE (Thanks and Credits to Xeudoxus for this awesome app)
Rooted kernel with busybox
JDK installed on your Windows system
If adb is not available in your windows PC, in xUltimate folder open "jar" folder. You'll find adb there.
Extract stock app & framework folders and Deodex:
Connect your device to computer.
Start xUltimate (double-click on Main.exe)
Select option 1. (Pull /system/app)
Once option is done, select option 2. (Pull /system/framework)
In the same folder, now you'll see two new folders (origi_app, origi_frame)
Select option 3 in Main menu (Deodex /system/app)
Once its done, select option 4 in Main menu (Deodex /system/framework)
DONE!!
NOTE: If any apk/odex gives issues while deodexing, remove that corresponding apk and odex from origi_app folder and deodex again. (Mostly the apps which can be downloaded from play store might give errors.. ex: Maps, Voice search etc.)
Now you'll see two new folders done_app and done_frame.
Push deodexed app and framework to device:
Connect your device to PC in USB debugging mode.
Copy done_app and done_frame folders to root of sdcard (/sdcard).
Open Windows command prompt and type the below commands.
Code:
[LIST]
[*]adb shell
[*]su
[*]stop
[*]mount -o remount,rw /dev/block/mmcblk0p9 /system
[*]rm /system/app/*.odex
[*]rm /system/framework/*.odex
[*]busybox cp /sdcard/done_app/* /system/app/
[*]busybox cp /sdcard/done_frame/* /system/framework/
[*]chmod 644 /system/app/*
[*]chmod 644 /system/framework/*
[*]mount -o remount,ro /dev/block/mmcblk0p9 /system
[*]sync
[*]reboot recovery
[/LIST]
In Recovery, Wipe Cache and Wipe Data/Factory reset.
Reboot.
Now you've deodexed app and framework.
For ICS ROMS:
For ICS Roms, the process is quite easy. (Thanks and Credits to jaydvn.)
Download the attached zip file.
Extract it on your windows PC.
Copy your /system/app to _app folder
Copy your /system/framework to _framework folder.
Run AutoDEOToolMain.bat
Follow the instructions.
deodexed jars and apks will be found in deodexed_APK and deodexed_JAR.
Push deodexed app and framework to device:
Connect your device to PC in USB debugging mode.
Copy deodexed_APK and deodexed_JAR folders to root of sdcard (/sdcard).
Open Windows command prompt and type the below commands.
Code:
[LIST]
[*]adb shell
[*]su
[*]stop
[*]mount -o remount,rw /dev/block/mmcblk0p9 /system
[*]rm /system/app/*.odex
[*]rm /system/framework/*.odex
[*]busybox cp /sdcard/deodexed_APK/* /system/app/
[*]busybox cp /sdcard/deodexed_JAR/* /system/framework/
[*]chmod 644 /system/app/*
[*]chmod 644 /system/framework/*
[*]mount -o remount,ro /dev/block/mmcblk0p9 /system
[*]sync
[*]reboot recovery
[/LIST]
In Recovery, Wipe Cache and Wipe Data/Factory reset.
Reboot.
Done.
Enjoy.
Building kernel
Okay. Let's learn how to build kernel for GT-I9100. There are many ways to build. I am just presenting here the way I build and make kernel.
NOTE 1: Follow the instructions exactly.
NOTE 2: Kernel is opensource. If you make any changes to it, you're expected to share your source. (Usually people share it over github )
NOTE 3: FLASHING KERNEL IS RISKY AND DANGEROUS. BE CAREFUL. BUILD AND FLASH ON YOUR OWN RISK.
What you need to have:
Ubuntu 10.04 and above (I use 10.04 )
ARM tool chain (Download HERE. Click on IA32 GNU/Linux TAR under Advanced Packages)
Samsung's opensource kernel for GT-I9100 (Download HERE. Go to Mobile->Mobile Phone-> Select I9100 (update 3 for Gingerbread and update 4 for ICS) and download the zip)
Setting up toolchain:
Extract the tar you downloaded(Suggestion: Extract to one folder where you can have everything. In my case /home/superatmos/build_kernel).
After extracting, you'll see a folder named arm-2010q1. Inside there will be many folders (ex. bin, lib and so on.)
Folder structure will be: /home/<your_name>/build_kernel/arm-2010q1
Setting up kernel:
Extract the zip you've downloaded from samsung's opensource.
You'll find two zips.
Extract GT-I9100_Kernel.tar.gz to /home/<your_name>/build_kernel/
Folder structure: /home/<your_name>/build_kernel/GT-I9100_Kernel
Setting up initramfs:
Samsung's zImage is divided into two parts: Opensource kernel (which you downloaded from samsung's website) and initramfs (which is root file system to boot up the device).
You can extract initramfs from your zImage using the below mentioned links (Credits and Thanks to Chenglu) Original Thread: HERE
To extract initramfs from Gingerbread zImage: HERE
To extract initramfs from ICS zImage: HERE
Folder structure: /home/<your_name>/build_kernel/initramfs
Now the entire setup is ready. Let's start modifying kernel configuration.
Setting up kernel config:
For Gingerbread:
Go to /home/<your_name>/build_kernel/GT-I9100_Kernel/arch/arm/configs folder.
Copy c1_rev02_defconfig file and paste it in kernel root folder (/home/<your_name>/build_kernel/GT-I9100_Kernel/).
Rename c1_rev02_defconfig to .config in kernel root folder.
Now open Makefile which is in your kernel root folder(/home/<your_name>/build_kernel/GT-I9100_Kernel/).
Modify the below lines (I guess line 195 and 196).
For ICS:
Go to /home/<your_name>/build_kernel/GT-I9100_Kernel/arch/arm/configs folder.
Copy u1_defconfig file and paste it in kernel root folder (/home/<your_name>/build_kernel/GT-I9100_Kernel/).
Rename u1_defconfig to .config in kernel root folder.
Now open Makefile which is in your kernel root folder(/home/<your_name>/build_kernel/GT-I9100_Kernel/).
Modify the below lines (I guess line 195 and 196).
Code:
ARCH ?= arm
CROSS_COMPILE ?= /home/<your_name>/build_kernel/arm-2010q1/bin/arm-none-linux-gnueabi-
Save and close.
Modifying kernel configuration:
Now open .config file(which you renamed). If its not seen, it might be hidden. Go to View->Show hidden files and there you go.
Do the below things:
Adding local version:
Change CONFIG_LOCALVERSION=" " to anything you like. I add this way:
CONFIG_LOCALVERSION="-I9100-superatmos"
Adding initramfs path:
You need to let kernel know the path from which it needs to take initramfs.
Change CONFIG_INITRAMFS_SOURCE=" " to ../initramfs (In this tutorial it's the path. If you had copied anywhere else, give the path properly).
Enough for now. Once you get experience, you can modify many configurations as per your liking and save. This configuration can be changed by GUI too with the command make menuconfig.
The Important part: Building the kernel:
For Gingerbread:
Open terminal.
Go to path /home/<your_name>/build_kernel/GT-I9100_Kernel/
Type make.
For ICS:
Open terminal.
Go to path /home/<your_name>/build_kernel/GT-I9100_Kernel/
Type export USE_SEC_FIPS_MODE=true
Type make.
THAT'S ALL. YOUR zImage is ready and is available in /home/<your_name>/build_kernel/GT-I9100_Kernel/arch/arm/boot/zImage.
Install the zImage on the device:
Go to the path where zImage is present and type the below line in command line.
Code:
tar cvf I9100_kernel.tar zImage
Flash the tar using odin.
DONE. CONGRATULATIONS. NOW YOU'VE YOUR OWN KERNEL.
Give me your feedback so that I can improve this tutorial. And post here about how your build went. All the best.
Making custom ROM
Let's move on to make a custom ROM.
Inputs/Feedback/Suggestions are more than welcome. Lets improve this tutorial together for the betterment of the android community.
Steps involved in making a custom ROM:
Getting the system dump from the device.
Deodexing app and framework folders.
Creating various mods by modifying framework and system files.
Modifying build.prop and adding tweaks.
Making META-INF folder and writing an updater-script (edify scripting).
Signing the ROM and making a flashable zip.
Folder Structure:
Before going forward, let's follow the below structure folder to make the tutorial more understandable.
Let our ROM name be CustomROM. The folder structure will be C:\Users\<your name>\CustomROM.
Let's move step by step. Are you ready??
Getting the system dump from the device
Click to expand...
Click to collapse
Make sure USB debugging is ON and connect your device to the PC.
Open command prompt on your windows PC and go to CustomROM folder path.
Type adb devices. You should be able to see the device detected. (If not check environmental variables whether adb is in system path or not. If not present, add the adb path.)
Type the below command to get the dump of system folder.
Code:
adb pull /system system/
Now inside the folder CustomROM, you should be able to see system folder with many folders like app, etc, framework etc inside.
Done with first step.
Deodexing app and framework folders
Click to expand...
Click to collapse
Look HERE how to deodex app and framework folders. Copy the app and framework folders to xUltimate folder, rename them to origi_app and origi_frame and follow the given link to deodex.
NOTE: After deodexing, merge origi_app folder with app folder under C:\Users\<your name>\CustomROM\system\app and origi_frame with framework folder under C:\Users\<your name>\CustomROM\system\framework.
Creating various mods by modifying framework and system files
Click to expand...
Click to collapse
Okay. This the section where your hardwork, innovation and talent comes in. You can use the mods available already, create your own mods, port various mods from other devices and so on.
Below is a list of various mods which can be ported on to GT-I9100. All the credits go these respective thread owners. Thanks to them.
Lidroid 14 toggle mod
Extended power menu with/without header
CRT Off Animation & SIP Over LTE/HSPA
Swipe to remove notifications
NOTE: Let me know more mods with links so that I can add here.
Modifying build.prop and adding tweaks
Click to expand...
Click to collapse
Okay. This is one of those files where you name your ROM(to be visible in settings. ) and add many tweaks.
To name your ROM (to be visible in settings), change the below code.
Code:
ro.build.display.id=CustomROM v1.0
Check the below links for many other tweaks. All credits go to respective thread owners. Thanks to them.
build.prop tweaks by TheFrankenstain
build.prop tweaks by dhlalit11
Making META-INF folder and writing an updater-script (edify scripting)
Click to expand...
Click to collapse
Once you're done with all the modifications, mods and additions, its time to create META-INF folder and make the updater script. Once the user flashes the ROM zip, this is the script that runs and does everything written inside the script. PLEASE BE CAREFUL WITH THIS. TAKE REFERENCE FROM OTHER (SAME DEVICE) ROMS' UPDATER-SCRIPT. (In this case, take reference from other GT-I9100 roms.)
Check the below links for tutorial and how-to on writing edify script and making updater script. All credits go to respective owners of the threads. Thanks to them.
Edify Scripting, Making Flashable ZIPs, ZIP Signing & Key Creation
Edify Scripting Notes
How to Write an Updater-Script with Edify Code
Edify Installation Script Syntax's
NOTE: system folders path, boot/kernel partition path, modem partition path and so on are COMPLETELY DIFFERENT for DIFFERENT DEVICES. Check the partitions for your device properly, carefully and then work on updater-script. TAKE HELP OR REFERENCE FROM OTHER ROM DEVELOPERS FOR YOUR DEVICE.
Lets move on to last step. Making a signing and making a flashable zip.
Signing the ROM and making a flashable zip
Click to expand...
Click to collapse
Make sure, now you should be able to find two folders (META-INF and system) inside C:\Users\<your name>\CustomROM.
Check in THIS thread for test signing your ROM. It WORKS with GT-I9100.
or Check THIS thread to create your own signing key and certificate.
Now you're done with making a custom ROM. Hope to see more custom ROMs from many users.
Give me your feedback so that I can improve this tutorial. And post here about how your custom ROM making went. All the best.
last one
i don't see any tutorials just links to a diff thread and a rom that won't work on i9100
buster041284 said:
i don't see any tutorials just links to a diff thread and a rom that won't work on i9100
Click to expand...
Click to collapse
You're quite fast Updated Deodexing and Building kernel section..
Great thread Superatmos. I'll definately have a go at this.
Quick question ? Am i right in assuming that although your tutorial says to connect your device this line from xUltimate seperceeds that ?
"Alright xUltimate has been updated to v2 What this means is that you do not need your phone connect to your computer to deodex. So you can just manually place the .odex files in (\origi_frame\) and (\origi_app\) and it will deodex. You can also transfer the .odex files from your phone like the last version."
where do I get the zImage to extract the initramfs from? I can't seem to find the zImage on my phone or in the source anywhere.
Great
Very useful.. Added to my favorite.
Thank's man, i'll read that
puccini said:
Great thread Superatmos. I'll definately have a go at this.
Quick question ? Am i right in assuming that although your tutorial says to connect your device this line from xUltimate seperceeds that ?
"Alright xUltimate has been updated to v2 What this means is that you do not need your phone connect to your computer to deodex. So you can just manually place the .odex files in (\origi_frame\) and (\origi_app\) and it will deodex. You can also transfer the .odex files from your phone like the last version."
Click to expand...
Click to collapse
Connect your device to the PC and double click Main.exe inside xUltimate folder. Follow the instructions you see from then. Its quite self explanatory.
If you already have origi_app and origi_frame folders, then just double click on Main Skip.bat.
dmp450 said:
where do I get the zImage to extract the initramfs from? I can't seem to find the zImage on my phone or in the source anywhere.
Click to expand...
Click to collapse
Use ktool (available on market.. compatible with I9100) and click on Dump current kernel. You'll find it on sdcard.
One more way is when you download firmware from sammobile.com, just extract the file and you'll find zImage inside it.
Nice thread,
I m waiting from long time.
Thanks for your work.
Sent from my GT-I9100 using XDA
Making custom ROM section updated
Hi all,
Please find updated custom rom section HERE.
Feedback and suggestions welcome.
Thanks for the kernel part, will come in handy
Enviado desde mi GT-I9100 usando Tapatalk 2
Good tutorial, thanks.
How do you guys sign the rom if you are on Linux (ubuntu for me)
hi superatmos
thanks for this handy thread...may i ask your for a help here?why in my every deodexing always gives error result?
I attach the screenshots.
Many thanks in advance
tks mate will try to pack my own kernel following this method
Sent from my GT-I9100 using Tapatalk 2

[GUIDE] [LINUX/UBUNTU] Extract/Modify/Rebuild Lollipop ROMs !

Extracting:
1. Download this package: https://tusfiles.net/oaiw9ze20tbl
2. Extract to a folder and chmod 777 -r /path/to/the/folder
3. cd (change directory) to that folder
4. Run prereq.sh
5. Place system.transfer.list and system.new.dat into the folder
6. Open extractor.sh using a text edit program
7. Find the line containing chown command, replace yash:yash with yourusername:yourusername
8. Run extractor.sh
9. Modify contents found in output folder​
Rebuilding:
1. Do above first and then run compress.sh
2. Find the rebuilt system.new.dat and system.transfer.list in sdat folder​
Making it into a ROM:
1. Do above first
2. Find a zip ROM for OnePlus 2 that contains system.transfer.list and system.new.dat
3. Replace it with your rebuilt ones from above mentioned steps
4. Voila! ROM ready!​
NOTE:
The package contains OxygenOS SELinux file contexts in progs subfolder...
So, to modify CM ROMs you need to get file_contexts file from the zip of the ROM and replace the one found in progs subfolder
Credits:
@xpirt
Please mention​
Two questions; Is this a rom kitchen like tool for OxygenOS? Are there any libs or binaries or other dependencies?
I'm a bit busy, but I'll take it for a spin when I can.
Oh one last thing, is there a repo for this?
Ta,
ALQI
Sent from me mobile.
Nice guide
alquimista said:
Two questions; Is this a rom kitchen like tool for OxygenOS? Are there any libs or binaries or other dependencies?
I'm a bit busy, but I'll take it for a spin when I can.
Oh one last thing, is there a repo for this?
Ta,
ALQI
Sent from me mobile.
Click to expand...
Click to collapse
The dsixda kitchen had much more functions then this but you may cknsidet it as a temporary lollipop kitchen with not much extra functionality..
This was like a automation script for me and was a quick one so repo wasn't needed
I have used this script on Ubuntu 64bit and the only extra dependency apart from those included in package are installed by prereq.sh
Btw this is not just for oxygen os it can also be used for any cm or cm based rom here but.do read the note then
Yash98 said:
Extracting:
1. Download this package: https://tusfiles.net/oaiw9ze20tbl
2. Extract to a folder and chmod 777 -r /path/to/the/folder
3. cd (change directory) to that folder
4. Run prereq.sh
5. Place system.transfer.list and system.new.dat into the folder
6. Open extractor.sh using a text edit program
7. Find the line containing chown command, replace yash:yash with yourusername:yourusername
8. Run extractor.sh
9. Modify contents found in output folder​
Rebuilding:
1. Do above first and then run compress.sh
2. Find the rebuilt system.new.dat and system.transfer.list in sdat folder​
Making it into a ROM:
1. Do above first
2. Find a zip ROM for OnePlus 2 that contains system.transfer.list and system.new.dat
3. Replace it with your rebuilt ones from above mentioned steps
4. Voila! ROM ready!​
Click to expand...
Click to collapse
So does this allow you to make ROM's for the OP2 from ROM's based on other devices, or what? Sorry if I'm sort of a noob, I just don't understand what is being done.
Thanks!
Me1256 said:
So does this allow you to make ROM's for the OP2 from ROM's based on other devices, or what? Sorry if I'm sort of a noob, I just don't understand what is being done.
Thanks!
Click to expand...
Click to collapse
You can make ROMs from prebuilt ROMs like OxygenOS or any other built ROM like Exodus, CM12, etc.
Basically modify ROMs without rebuilding from source (which takes a lot of time!)
Sir I downloaded your tool and followed ur guide....But after I run extract.sh there is no files/folders in output folder.Plz reply thankz in advancw
Thank you. I really wanted to extract .dat file..
Sent from my ONE A2003 using Tapatalk
This is a great tool but I wanted to know how to edit the system folder in ubuntu. Like using chmod and chown to pre-root and uninstall some other apps. Can somebody please direct me in that direction.
I go test...

Categories

Resources