[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
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 Recompile The HP TOUCHPAD Android Kernel for DirtyUnicorns 8.1 and Shumash SKZ DirtyUnicorns 8.1 and Evervol 7.1
This is done on a Linux OS (Ubuntu 18.04 x64). If you are using other OS, then install Linux as a virtual machine.
The process is the same for all Kernel, but I have only done it with the last two version of Android and can verify that it works.
You can get the kernel source code from other version and try to compile it.
You many need to install the following packages on your Linux OS:
sudo apt-get update
sudo apt install python-pip
sudo apt-get install libncurses5-dev libncursesw5-dev
To recompile the Kernel you need to download an arm cross compiler, there are two options, google android or Linaro.
Get the Android arm cross compiler here:
https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/+archive/26e93f6af47f7bd3a9beb5c102a5f45e19bfa38a.tar.gz
You can also use Linaro:
https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/armeb-eabi/gcc-linaro-4.9.4-2017.01-x86_64_armeb-eabi.tar.xz
Get the Kernel source for:
DirtyUnicorns:
https://github.com/DirtyUnicorns/android_kernel_htc_msm8960/archive/o8x-caf.zip
Shumash SKZ overclock Kernel for DirtyUnicorns 8.1
https://github.com/shumashv1/android_kernel-3.4_hp_tenderloin/archive/o-8.1.zip
Shumash SKZ overclock Kernel for Evervolv 7.1
https://github.com/shumashv1/android_kernel-3.4_hp_tenderloin/archive/ng-7.1.zip
1. Create a folder on your home directory
Code:
arm-eabi
2. Extract (unzip) the Android cross compiler file arm-eabi-4.8-26e93f6af47f7bd3a9beb5c102a5f45e19bfa38a.tar.gz into the arm-eabi direcory:
You should have the following directory structure
(Your ID will be different than ubuntu) but all the directories needs to have the following structure.
Code:
/home/ubuntu/arm-eabi/share
/home/ubuntu/arm-eabi/libexec
/home/ubuntu/arm-eabi/lib64
/home/ubuntu/arm-eabi/lib32
/home/ubuntu/arm-eabi/lib
/home/ubuntu/arm-eabi/include
/home/ubuntu/arm-eabi/bin
/home/ubuntu/arm-eabi/arm-eabi
3. Extract (unzip) one of the Kernel file that you will like to recompile into your home directory:
4. Rename the extracted folder ( example : android_kernel_tenderloin_DU_msm8960-o8x-caf )
to: kernel
It should have all folders under kernel directory
(Your ID will be different than ubuntu)
Code:
/home/ubuntu/kernel/crypto
/home/ubuntu/kernel/block
/home/ubuntu/kernel/arch
( and many more)
That is all that is need it to recompile, but the folder location and structure is very important for the scripts to work.
The configuration file to make the Kernel for the two versions of the touchpad is located in:
Wifi standard version
/kernel/arch/arm/configs/tenderloin_android_defconfig
4g version
/kernel/arch/arm/configs/tenderloin4g_android_defconfig
5. Open a terminal window in the kernel directory and paste the following commands:
Code:
export CROSS_COMPILE=~/arm-eabi/bin/arm-eabi-
## You can make changes directly to the tenderloin_android_defconfig using a text editor if you know what you are doing or use the on screen menu.
## replace the configuration file for your model at the end.
Code:
./make_defconfig.sh tenderloin_android_defconfig
Now you have the Linux/arm 3.4.113 Kernel Configuration screen to make all your choices.
If the menu does not comes up is due to packages you need to install on your OS for ncurses to work, first mentioned.
There is too much information to go over and explain, you will have to learn as you go, not all settings apply to the device. There are options and modules for many kernels not only just the TP.
When you are done, or feel that you have done anything after looking at the DNA of an Android kernel for the TP then press:
the esc key twice to exit and save the new changes to the configuration file.
6. Ready to make the configuration active to recompile:
Code:
make ARCH=arm tenderloin_android_defconfig
7. Start the recompile process:
Code:
make ARCH=arm -j4 CROSS_COMPILE=~/arm-eabi/bin/arm-eabi- kernel.uImage
Once is finish your new kernel uImage will be at:
kernel/arch/arm/boot/kernel.uImage
8. Copy the kernel.uImage file to your desktop or any other place out of the Kernel folder.
9. This command will reset ad clean all your settings from making the Kernel, so that you can start the process again.
Code:
make mrproper
Now you have a modified kernel and need to combine it with the ramdisk from the same ROM kernel (boot.img) that is in the ROM zip file.
Extract the boot.img from the ROM and follow the steps on how to unpack the boot.img using this link:
Now that you have access to the ramdisk, you can make system read and write and many more options on every file!
With the Kernel settings and Ramdisk you have completely total control, is the DNA settings of the device.
https://forum.xda-developers.com/hp-touchpad/development/make-root-permanet-read-write-to-t3846567
Once unpack rename kernel.uImage to kernel.uImage_original (or delete it)
Copy the new kernel.uImage to the folder and repack.
You now have your own modified kernel and can place it in the boot directory of your tablet.
If it finished booting to Android, all is good! if not start again.
Your HP Touchpad will not get bricked by any modification you will make to the kernel. It can freeze and you can do a hard reset and boot from the original kernel.
Now if you encounter a problem with your ROM, feel is slow or any other issues you know how to fix it yourself and learn how time consuming and fun is to get this working. Be part of the community and at least try to improve on the great work that others have done.
Many thanks to everyone that made all this work possible all credits go to:
Milaq, Jcsullins, Invisiblek, Flintman, Shumash and the many others! the list is longer than all the settings of the kernel!
All that explanation to run the following commands:
Code:
export CROSS_COMPILE=~/arm-eabi/bin/arm-eabi-
./make_defconfig.sh tenderloin_android_defconfig
make ARCH=arm tenderloin_android_defconfig
make ARCH=arm -j4 CROSS_COMPILE=~/arm-eabi/bin/arm-eabi- kernel.uImage
make mrproper