[GUIDE] New Dev mini-guide [12-27-10] - Droid Eris Android Development

Ok folks. I got this phone in March. It's my first Android phone. I love it. What do I love most? Hacking, tweaking, building, learning cool stuff. Yeah, it makes calls and stuff like that too. Whatever. So did my Startac.
I've been very slowly creating a 'how to get started' post for people who what to be devs. The info is out there elsewhere, but I'd like to consolidate much of it into kind of an overview with links to more detail. The first part is pretty much ready to post, so I figure I'll post it and keep working on the rest. Maybe some of you would like to contribute. Maybe not. I welcome the help though.
Some basics:
1) ROM structure - unzip an existing ROM and get to know the structure
Here's a fairly standard folder structure for an Eris ROM. Most other devices will have something similar.
Code:
/system
/app <- system apps and others that can't be uninstalled normally
/bin <- system binaries (small, standalone programs)
/customize <- has files that control initial boot and some screen settings (not always here)
/etc <- generally system configuration files
/bluez <- bluetooth config files
/clockwidget <- ? (not always here)
/dhcpd <- dhcp config files (dhcp is used to negotiate a network address)
/dmdata <- ?(not always here)
/firmware <- system firmwares
/iproute2 <- configuration files for network routing? (not always here)
/permissions <- describes permissions that apps may use
/ppp <- ppp configuration files?
/security <- certificates for over-the-air (OTA) updates
/wifi <- configuration files and firmwares for wifi
/fonts <- fonts
/framework <- mostly java jar files that contain code that other apps call
/lib <- C (mostly?) libraries that contain code for the system and apps to call
/bluez-plugin <- bluetooth stuff
/egl <- files needed for hardware 3d rendering
/hw <- files needed for various hardware like lights & sensors
/modules <- modules that the kernel might load, such as wlan (wifi)
/media <- audio and animations (usually here)
/audio <- audio files
bootanimation.zip <- well... (can be done another way or two)
/usr <-
/keychars <- keyboard drivers
/keylayout <- keyboard definitions (you can edit the .kl files!)
/share <- ?
/srec <- dictionaries?
/xbin <- more system binaries
build.prop <- config file that sets system variables and stuff
/META-INF
/com
/google
/android
update-script - script that actually copies the ROM to the phone when you flash
CERT.RSA <- created when ROM is signed
CERT.SF <- created when ROM is signed
MANIFEST.MF <- created when ROM is signed
boot.img - see #2 below
Code:
/data <- user and app data
/app <- apps that are installed by and can be removed by user (not always in ROM, but created on device
/other folders (Android/apps create some folders in here post flash and some devs will also add an extra folder or two occasionally
Some .apks can be removed and some cannot. Many different things tie together. For instance, one apk may call code in a lib file, so it's dependant on the lib file.
If you do take an existing ROM apart and change it, you'll have to zip it back up and resign it before it will flash. Here are some tools that will sign a ROM -
EasySign - http://android.grdlock.net/index.php?&direction=0&order=&directory=HTC Droid Eris/Extras
dsixda's Kitchen - http://forum.xda-developers.com/showthread.php?t=633246
AutoSign - http://androidforums.com/developer-101/8665-how-signing-roms.html
2) boot.img - kernel, ramdisk, and init files
The boot.img has the actual linux kernel with some Android and device specific tweaks. Here's the structure for it -
Code:
boot.img-kernel <--- actual kernel (zImage renamed)
boot.img-ramdisk.cpio.gz <--- ramdisk
/data
/dev
/proc
/sbin
/sys
/system
default.prop
init
init.desirec.rc <-- will be named different for different devices, supposed to be device-specific init file
init.goldfish.rc <-- for emulator (You can lose this.)
init.rc <-- always here, this is run on boot
The *.rc files are initalization files, in case you didn't get that. They run when the phone boots up and do things like start 'services' and change permissions on files/folders. I highly recommend that you look at them and compare different ones with something like WinMerge.
I attached an example. You can see where there's been a typo in the stock init.rc for a long time. This is a comparison between the stock init.rc and the one from CELBFroyo.
3) Hardware
Confused as to what refers to what? Me too! Here's a few things that I've figured out. Please point out anything you think is incorrect or needs to be added.
melfas, capella, synaptics = touchscreen
i2c = bus
akmd/akm8973 = accelerometer
mtd/nand/sdio = internal memory
s5k3e2fx = camera sensor
qdsp/adsp/dsp = audio
brf6350 = bluetooth?
Fw1251r1c/wpa/wifi/tiwlan0 = wifi
gralloc/copybits = framebuffer/video/display/graphics memory
malloc = memory allocation

Reserved for more info

Another one reserved for future info.

I just posted something similar in the "general" section...(about Christmas, that is...)
http://forum.xda-developers.com/showthread.php?t=886630

Thanks you for your work and contributions to the eris community. This will be very helpful as im trying to learn my way up. My comp died last week so it'll be a few more weeks till I get another one,but im trying to start doing a lil rom making/codeing myself. Thanks and MERRY CHRISTMAS TO ALL!!¶

Awesome work Gnarly

Brilliant thread! Thanks buddy.
And happy whatever and thanks to all the devs and smart ass users that make this phone surpass expectations every day.

Wait, how do I do all this again? Can you help me?

workshed said:
Wait, how do I do all this again? Can you help me?
Click to expand...
Click to collapse
No. Use the search feature noob!

Thanks for all of the thanks folks. I'm just trying to make it easier for people to become devs. We need as many as we can get. It takes time to learn this stuff, and it's nice when you don't have to spend quite so much of your time searching for the info instead of spending your time learning about the Eris and Android.
To make it more difficult, there's this dev 'club', with their secret IRC channels and PMing all of their secrets back and forth instead of being open and honest. And the chest-hair burning initiation is really tough to get through. (That's why we don't have any female devs, you know.) I did though. And now, I've went all wikileaks on them and they are angry. The attacks have begun already. They are mostly from Delaware, Pittsburgh, and the Seattle area. But, there is a completely incompetent attack coming from Michigan too.

This will help me out a lot. There are a lot of barriers to getting started, and this breaks down many of them. Thanks.

gnarlyc said:
Thanks for all of the thanks folks. I'm just trying to make it easier for people to become devs. We need as many as we can get. It takes time to learn this stuff, and it's nice when you don't have to spend quite so much of your time searching for the info instead of spending your time learning about the Eris and Android.
To make it more difficult, there's this dev 'club', with their secret IRC channels and PMing all of their secrets back and forth instead of being open and honest. And the chest-hair burning initiation is really tough to get through. (That's why we don't have any female devs, you know.) I did though. And now, I've went all wikileaks on them and they are angry. The attacks have begun already. They are mostly from Delaware, Pittsburgh, and the Seattle area. But, there is a completely incompetent attack coming from Michigan too.
Click to expand...
Click to collapse
+1 Internetz to you sir, I lol'd!

Wait so where is the download link? How do I install this?

Hey gnarly I just now looked at this, as many times as I've probably looked at your links I didn't see it and it is perfect, short & sweet but to the point and very informative. I'm sorry for bringing up an old thread guys but I just had to get it out there how helpful this is. Thanks bro!

lemonoid said:
Hey gnarly I just now looked at this, as many times as I've probably looked at your links I didn't see it and it is perfect, short & sweet but to the point and very informative. I'm sorry for bringing up an old thread guys but I just had to get it out there how helpful this is. Thanks bro!
Click to expand...
Click to collapse
No problem. I'm glad you find it helpful. My intention was for other folks to contribute as they learned new things, but that didn't really happen. Oh well... (Hint, hint, hint).
And, I never got around to adding a section on 'ethics', so here you go...
1) ask permission before using other's work
2) give credit for using other's work
3) don't lie about what you did or what your ROM really is
4) #1-#3 are much easier and less stressful than the alternatives, and they're just plain nice

gnarlyc said:
No problem. I'm glad you find it helpful. My intention was for other folks to contribute as they learned new things, but that didn't really happen. Oh well... (Hint, hint, hint).
And, I never got around to adding a section on 'ethics', so here you go...
1) ask permission before using other's work
2) give credit for using other's work
3) don't lie about what you did or what your ROM really is
4) #1-#3 are much easier and less stressful than the alternatives, and they're just plain nice
Click to expand...
Click to collapse
Well as I pick up on a few more things, I have a few kinks in my brain to work out, I will definitely put whatever I can to help. As you know at least, I'm still very fresh at all of this, which makes this even better. Newer minds are constantly developing new knowledge and skills to improve their own efforts, and I personally think that many of the seasoned devs know so much and have had their hands in the pot so long, that they might not remember all of the little things that had to be overcome or learned at the beginning. So with good communication between beginners and experienced developers, I believe that is the only way an amazing guide can be released. And that has already begun here, and obviously countless other places. Thanks again gnarly

Nice write up! Thanks, the info is greatly appreciated.
Sent from my un-rootable Incredible 2 using XDA app

Related

[TOOL/KITCHEN] - Android Builder v.5 (Dead)

This project is no longer being updated. Feel free to use the code.
Android Builder (AB v.5)
kiel123 has joined the AB team!
Thanks to dsixda, Armin Coralic, and cteneyck. I do have permission to reuse their code.
Requirements:
Ubuntu Linux or variant
dsixda's HTC Android Basic Kitchen - http://forum.xda-developers.com/showthread.php?t=633246
In my crazy quest to learn more about Android, I decided to create a companion to dsixda's kitchen that will take some of the drudgery out of downloading and compiling AOSP and the HTC kernel.
Here's what the current menus looks like:
Code:
Select the device that you would like to build for.
1) HTC Droid Eris
a) About Builder
0. Exit
Please enter option number:
and then
Code:
1. Sync AOSP - Cupcake (1.5) repo
2. Sync AOSP - Donut (1.6) repo
3. Sync AOSP - Eclair (2.1) repo
4. Sync AOSP - Froyo (2.2) repo
0. Exit
Please enter option number:
You can follow these two steps, and you will get a freshly compiled, but unsigned ROM in the original_update folder. After running it through the kitchen, it boots up just fine. Of course, most of the hardware doesn't work. That's the part that I am working on now (seriously, I am). I've been working on this for a while, because as I said - this is really about me learning. If I can make a tool that someone finds useful, then great!
Install instructions:
1) download and unzip dsixda's kitchen to whatever directory you want
2) download Android Builder into kitchen's scripts/plugins folder and unzip
3) back out and start the kitchen
4) select 'Run plugin scripts' from Advanced menu and select 'Android Builder'
5) you're there!
NOTE: This will try to install/update all of the packages that it needs, including Java5. Please look at the code so that you know what it's doing. That's just a good general practice with any code that you can actually look at and that you have to run as root...
Future plans:
1) add more kernels (devices)
2) add more vendor trees (goes along with devices)
3) add more repos (CM5, CM6, AOSP Master)
I hope someone finds this useful, and feel free to post useful suggestions/bug reports.
DOWNLOAD - (https://github.com/gnarlyc/android_builder)
CHANGELOG -
v5. - kiel123 re-wrote v.4 as a plugin to dsixda's kitchen with me testing afterward, minor fixes, removed Java6 as no longer needed by kitchen
v.4 - re-wrote to add structure to support more devices in the future
added option for Cupcake, Donut, and Froyo
added .config files that enable touchscreen in kernel by default
v.3 - unreleased build
v.2 - corrected misspellings in code and dialogs
added sudo to launch setup script (Still need to sudo bash first. Sorry.)
v.1 - initial release
Very nice. I have been doing the same. I have used darchstar's post here as the basis of my work. But, I am always glad to look how others are doing things. Thanks for the post.
arockj said:
Very nice. I have been doing the same. I have used darchstar's post here as the basis of my work. But, I am always glad to look how others are doing things. Thanks for the post.
Click to expand...
Click to collapse
Thanks for the thanks! I don't quite get the vendor tree thing, but I just need to look at it again a few times. And, that's where I'm at. It would be really neat to be able create a working AOSP ROM from scratch with minimal manual intervention. It might not be possible, but I haven't found that out yet. (But wait! If you can do it manually, it can be scripted. Right?)
there's typo in your install script
look for line: android_builder*
should be android-builder*
and your install script should use mv command instead of cp to avoid files duplication
EDIT: also you should use sudo command along with ./ab_setup script or include within script as well.
When i ran ./abmenu and i get this message
Code:
Please copy 'menu-kd' to the root of your kitchen folder with 'menu'
menu-kd?.... don't you mean abmenu? turned out it was looking for menu file which i had it renamed to kitchen_menu but I fixed that on my part and all is working well.
Dont let any of my criticism scare you away, I can see there's a lot of potential use for this scripts, great start by the way.
firestrife23 said:
there's typo in your install script
look for line: android_builder*
should be android-builder*
and your install script should use mv command instead of cp to avoid files duplication
EDIT: also you should use sudo command along with ./ab_setup script or include within script as well.
When i ran ./abmenu and i get this message
Code:
Please copy 'menu-kd' to the root of your kitchen folder with 'menu'
menu-kd?.... don't you mean abmenu? turned out it was looking for menu file which i had it renamed to kitchen_menu but I fixed that on my part and all is working well.
Dont let any of my criticism scare you away, I can see there's a lot of potential use for this scripts, great start by the way.
Click to expand...
Click to collapse
I renamed all of the scripts at the last minute and thought that I had them fixed. I'll make the corrections and repost. The goal is to get this thing working well. Your criticism is just more motivation. Thanks!
I'm new to all this but I would love this to work with Froyo source.
Geo411m said:
I'm new to all this but I would love this to work with Froyo source.
Click to expand...
Click to collapse
The current 'internal' build works with Cupcake (1.5), Eclair (2.1), and Froyo (2.2). It's not ready to release though. Give me another week or two. I'm working on proprietary bits now, so that you get a more usable ROM from the start.
Although from your sig, it appears that you don't have an Eris, so you probably don't care much about it's proprietary bits. If you want it to get Froyo instead of Eclair, you can just change 'eclair' to 'froyo' in the script that creates the repo.
I'm with you on Froyo. I have a feeling in a month or two very few people will want to run a pre-Froyo ROM. It's really nice.
rm error on install
i keep getting "rm: cannot remove './bkup': No such file or directory"
the file is there untill i run the ./install script then it disappears and shoots me an error any help would be appriciated
Sjflowerhorn said:
i keep getting "rm: cannot remove './bkup': No such file or directory"
the file is there untill i run the ./install script then it disappears and shoots me an error any help would be appriciated
Click to expand...
Click to collapse
That files was used by me while developing the code. It's not needed. I'll fix the install script for v.5, but if you really want to fix the script now... Just remove the line -
'rm ./bkup'
from the 'install' script
You should still be able to start Android Builder by typing './abmenu', as long as it's in the same folder with the kitchen's menu. The error shouldn't matter.
gnarlyc said:
That files was used by me while developing the code. It's not needed. I'll fix the install script for v.5, but if you really want to fix the script now... Just remove the line -
'rm ./bkup'
from the 'install' script
You should still be able to start Android Builder by typing './abmenu', as long as it's in the same folder with the kitchen's menu. The error shouldn't matter.
Click to expand...
Click to collapse
k thanks i think it worked the same even with the error but got it =)
Sjflowerhorn said:
k thanks i think it worked the same even with the error but got it =)
Click to expand...
Click to collapse
Good deal. Let me know how it goes.
gnarlyc --
Have you thought of making this into a .plugin file that can be placed in the scripts/plugins folder of the HTC Android Kitchen? Then that way you won't need to update your scripts each time I update my kitchen
In my thread I could provide a link to your tool, so that people can add that plugin if they want.
dsixda said:
gnarlyc --
Have you thought of making this into a .plugin file that can be placed in the scripts/plugins folder of the HTC Android Kitchen? Then that way you won't need to update your scripts each time I update my kitchen
In my thread I could provide a link to your tool, so that people can add that plugin if they want.
Click to expand...
Click to collapse
The thought has occurred to me.
Give me a bit. A link in your thread would be great. It might even motivate me to add more devices. Getting stuck on adding Eris proprietary bits has lead me down the road of making a ROM (http://forum.xda-developers.com/showthread.php?t=725447) and documenting the process. I'll get back to Android Builder soon though.
Ok, so...
TO-DO
-------
1) rewrite AB as a plugin to dsixda's HTC Android Kitchen
2) add proprietary bits for Eris
3) add more devices
4) add CM repos
5) add Gingerbread repo
6) add compatibility with more distros
i am getting line 28: update-java-alernatives: command not found?
lord194409 said:
i am getting line 28: update-java-alernatives: command not found?
Click to expand...
Click to collapse
Interesting... I've tested from a freshly installed Ubuntu installation several times. It should install everything you need.
You could try 'update-alternatives --config java' and let me know what it says. You could also look for a file called 'setup_ran' in the root of the Kitchen, and delete it. Start './abmenu' after that and try again.
thanks for answering. Could the problem be that i installed it on cygwin.
lord194409 said:
thanks for answering. Could the problem be that i installed it on cygwin.
Click to expand...
Click to collapse
Yes. Android Builder will not work under cygwin. I don't know that it ever will. That's on the TO-DO list, but it's so far down that it's not on the posted TO-DO list.
I've only tested under Xubuntu 10.04 and minimal Ubuntu 10.04.
If you happen to work it out on cygwin, let me know! I'm sure others would be happy to have the option. Heck, I might even be. I'm mainly using Ubuntu because of AB anyway. (Although, it is kind of growing on me.)
thanks i will look in to it.
Sent from my Eris using XDA App
just wanted to let you know that it didn't work for me. It runs, gives some errors and outputs a update.zip called AOSPbase but the file is only 1.1kb in size.
Geo411m said:
just wanted to let you know that it didn't work for me. It runs, gives some errors and outputs a update.zip called AOSPbase but the file is only 1.1kb in size.
Click to expand...
Click to collapse
make sure you have java5 and java6 jre/jdk installed. it should work then. i had a similar issue the first time through... took it literally 10hours plus, then output was the 1.1k AOSPBase.zip file.
manually installed all java components, and everything worked perfectly then (and took half the time)

Linux Deodex Kitchen

I'm baaaack
Andrizoid's Linux Deodex Kitchen V4
This has been an ongoing project for a while now.
Since all the other deodexers are windows .bat scripts, i decided to make one for those of us on Ubuntu/Mac/etc
Extract to your desktop and check the README file for full instructions and more information.
Changelog
V4
Fixed some of the code, added the optional make-rom.sh which adds the freshly de-odexed files to the original rom and signs it making it ready to flash.
V3
Everything is fully automated, and will deodex the whole rom rather than one file at a time. Smali and Baksmali version updated to 1.2.3
V2
Added setup.sh to make things easier.
V1
Original script.
Love me or hate me, its a great little setup. It can be used with any rom on any device.
Interesting
Sounds interesting. I'll have to play with it this weekend.
I hope the drama is settled down now... I get enough when my wife watches "real housewives"
theres a few issues, it only de-odexes apk WELL for now. for the framework files it gets kind tricky. ill work on it a bit when i get some time.
I've been looking over your source code, I notice few lines could use simple shortcuts, for example
Code:
/home/ken/deodex-kitchen
you can change that to
Code:
~/deodex-kitchen
~ will tell shell to use current user's home directory, just make it more universal for anyone to use. Just my 2 cents.
it even work with cd, cp, mv, mkdir commands, ~ is very handy, and save you from having to type in full path.
firestrife23 said:
I've been looking over your source code, I notice few lines could use simple shortcuts, for example
Code:
/home/ken/deodex-kitchen
you can change that to
Code:
~/deodex-kitchen
~ will tell shell to use current user's home directory, just make it more universal for anyone to use. Just my 2 cents.
it even work with cd, cp, mv, mkdir commands, ~ is very handy, and save you from having to type in full path.
Click to expand...
Click to collapse
ya, a lot of the code could be cleaned up but thats the very basic version. i put it together to help build my rom, i got it working enough to do that and kinda forgot about it. i need to clean it up and put out another verison
too many projects at once haha.
found few bugs with your make-rom.sh script, on last couples of lines starting with rm will fail, because you forgot to add cd to rom-output and your script also left framework-res.apk at root of rom-output folder which should be moved to /system/framework
in your readme file, you forgot to add a step to run setup.sh script before de-odexing apk/jar files.
firestrife23 said:
found few bugs with your make-rom.sh script, on last couples of lines starting with rm will fail, because you forgot to add cd to rom-output and your script also left framework-res.apk at root of rom-output folder which should be moved to /system/framework
in your readme file, you forgot to add a step to run setup.sh script before de-odexing apk/jar files.
Click to expand...
Click to collapse
ya when i used it i made some heavy modifications to it before i got a rom to boot. i need to update this thing but ive got a few other projects im the making.
not enough people seemed interested in this to make it my priority
Andrizoid said:
ya when i used it i made some heavy modifications to it before i got a rom to boot. i need to update this thing but ive got a few other projects im the making.
not enough people seemed interested in this to make it my priority
Click to expand...
Click to collapse
I use Ubuntu, and your script fit the bill and spare me from having to reboot into windoze to use their crappy batch files. Of course your hands is all tied up with other projects, however I'll be watching this tread once you get around to updating this. Just keep bring out the great stuff!
I like people like you that make contribute back to community such as this valuable tools, unlike other developers which pretty much rather keep it to themselves (I won't list their names here, and not trying to start a flame-war) as the rest of first time ROM cooker have to figure it out the hard way.
I've just been pointed to this thread while looking for a way to deodex
the link works still, but the file has been deleted by Rapidshare, "due to inactivity"
Any chance of it being uploaded again please?
lew247 said:
I've just been pointed to this thread while looking for a way to deodex
the link works still, but the file has been deleted by Rapidshare, "due to inactivity"
Any chance of it being uploaded again please?
Click to expand...
Click to collapse
why not just use dsixda's kitchen?
http://forum.xda-developers.com/showthread.php?t=633246
then you'll also have just about everything you need (not just a deodex-er)
plus, don't think you'll get any "support" on this anymore... whereas, with dsixda's kitchen, you'll have LOTS of support for quite a while
firestrife23 said:
I've been looking over your source code, I notice few lines could use simple shortcuts, for example
Code:
/home/ken/deodex-kitchen
you can change that to
Code:
~/deodex-kitchen
~ will tell shell to use current user's home directory, just make it more universal for anyone to use. Just my 2 cents.
it even work with cd, cp, mv, mkdir commands, ~ is very handy, and save you from having to type in full path.
Click to expand...
Click to collapse
Use $HOME instead of ~. ~ doesn't always refer to the home directory.
I can help you with the need to rename $path in the script before it will work are you interested?
Upload to mediafire please.
Trent said:
Upload to mediafire please.
Click to expand...
Click to collapse
Double that. Please do this, since Multiupload has been closed.

{TOOL}MetaMorph Builder v3-Linux Only[8-5]

This could be considered part of the development forum or the apps and theme forum depending on how you look at it. if you have an issue, just click the report button and request that it be moved. no need to flame and troll and post that you reported it, just do it and move on.
Lots of people have asked me how to put together a theme control file, and its actually VERY easy but this tool makes it even easier.
this is an example of a theme control file created by this tool
Test-Theme.xml
Code:
<themename>Test-theme</themename>
<author>tater-salad</author>
<phone>Android Phone Codename Hulk</phone>
<rom>CM 8</rom>
<item>Phone.apk</item>
<path>/system/app<path>
<item>framework-res.apk</item>
<path>/system/framework</path>
<description>Requires reboot</description>
<item>FM-Reciever.apk</item>
<path>/data/app<path>
<item>My-custom-app.apk</item>
<path>/data/app<path>
run the mm-builder script and follow the on screen directions. you will of course need to put the correct replacement files in their respective directories, but this script will make all the right folders and set up your theme.xml for you. Bash scrip means linux only. This is also a super easy script, so i may get a batch version soon.
You can extract this file to any directory
All thanks to Stericson. W/O him we wouldnt have a metamorph app to begin with
######################################################################################################
v2
includes these additions
Code:
mkdir $app
mkdir $app/res
mkdir $app/res/drawable
mkdir $app/res/drawable-mdpi
mkdir $app/res/drawable-land-mdpi
mkdir $app/res/drawable-port-mdpi
these are the commonly used directories when it comes to theming. now all the sub-folders should be set up right.
I think this tool will be very helpful for newer themers and the like, looking forward to a windows adaptation.
also, what does it matter if ban_dover was andrizoid, seems to me hes not doing any harm here now, just trying to help people out, so give a guy a chance to rectify himself before you all start the flamethrowers
snyluc13 said:
I think this tool will be very helpful for newer themers and the like, looking forward to a windows adaptation.
also, what does it matter if ban_dover was andrizoid, seems to me hes not doing any harm here now, just trying to help people out, so give a guy a chance to rectify himself before you all start the flamethrowers
Click to expand...
Click to collapse
windows version is certainly viable, but batch is SO alien coming from bash. there isnt even an ls command
im going to have to play around and get a feel for batch before i get to work on it.
v3 is up. ive put together working metamorph themes using v3, so its been pretty well tested.
How about some constructive use of this thread?
ban_dover,
I've got a question. I read through Stericson's announcement post on XDA, and also the project page, and he mentions limitations due to signing checks of market apps.
Does it actually re-sign the .apk with the test key that all the devs use, or does it merely re-zip the .apk so that the manifest and keys are broken (won't pass a jarsigner -verify test)?
If it is the 2nd alternative, I guess that would means that Android does not check "non-market app" installs for valid signatures? Or that it doesn't check system apps but does check market apps?
The reason this piques my interest is that I noticed one of the devs recently released a ROM which had all its apps de-odexed and re-signed with the test key. (Can't remember which ROM, perhaps an xtr* ROM?)
Anyone else that knows how this goes is welcome to answer as well.
bftb0
Im going to lock this thread if the flame war doesn't stop
Play nice
Edit: Thread re-opened, ban_dover and I discussed and hopefully we will not have any more issues.
Thanks
Captainkrtek
bftb0 said:
How about some constructive use of this thread?
ban_dover,
I've got a question. I read through Stericson's announcement post on XDA, and also the project page, and he mentions limitations due to signing checks of market apps.
Does it actually re-sign the .apk with the test key that all the devs use, or does it merely re-zip the .apk so that the manifest and keys are broken (won't pass a jarsigner -verify test)?
If it is the 2nd alternative, I guess that would means that Android does not check "non-market app" installs for valid signatures? Or that it doesn't check system apps but does check market apps?
The reason this piques my interest is that I noticed one of the devs recently released a ROM which had all its apps de-odexed and re-signed with the test key. (Can't remember which ROM, perhaps an xtr* ROM?)
Anyone else that knows how this goes is welcome to answer as well.
bftb0
Click to expand...
Click to collapse
to be honest im not sure. but i can say that the rom your talking about isnt going to have any issues with anything because of the re-signing.
so the those who have downloaded it, what do you think?
ive tested it by putting together a few simple MMs, and it worked fne for me. have any of you ran into any issues?

[GUIDE][GSM/4G] Basic ROM Porting to the Nexus S

.
This will not be the prettiest post until I have most of the bulk written out. Over time I will refine and improve, but for now I need to get it on paper.
-= READ THIS =-
-= I am not responsible for bricked devices. I know what I am doing when it comes to porting, and am giving you exact details on how to port. These methods have a very small chance of bricking, but if anything happens and you come crying to me, I will laugh at you. Follow this thread carefully and you will have little to no issues. =-
Before we begin, the most important part of android developing is to have Ubuntu (or preferred linux distro) installed on either a separate machine, or dual boot in windows. Most scripts that aid in developing can only be run under linux. A simple installer for dual booting Ubuntu/windows can be found here: http://www.ubuntu.com/download/ubuntu/windows-installer.
You also NEED adb installed, along with necessary Nexus S drivers, and have a basic knowledge of adb commands (I will cover a few). (You will need to install the Android SDK and download the platform-tools addon. This is where adb is located. There are guides online telling how to download these. If you need help, ask and I will include in the OP.) I dual boot Windows and Ubuntu, so I have my adb commands installed on my windows partition. This probably isn't the best way to do it, feel free to install adb under whichever OS you prefer. For this guide, I will be referring to using adb under Windows 7. The most common command needed while porting is simple:
adb logcat
Write this down somewhere if you cannot remember it. I have typed this command over 5000 times, it is used to debug system errors (bootloops, rom not booting, apps not working, etc).
I will also be referring to the "Android Kitchen" throughout this guide, mainly when working with boot.img's. In order to understand it more thoroughly, spend some time reading the first page. Link to Android Kitchen is below.
-= Useful Links =-
Be thankful, I saved you the time of googling
Nexus S adb drivers
Android Kitchen
Android SDK
7zip
Click to expand...
Click to collapse
-= Basics =-
The normal Android ROM consists of 3 main parts;
Boot.img – This is where the kernel and ramdisk are compressed. The ramdisk is what initiates the ROM’s main functions, such as Bluetooth, Wifi, and network connectivity information. The main file to pay attention to while porting is in the ramdisk, called the init.rc. It is a simple text file, and can be editied according to the ROM. A “how to” on unpacking/editing/repacking this file will be later in the guide.
System Folder – This folder contains all of the libs, configuration files, apps, and everything else that is the ROM itself. In this folder is where most of the changes are made, since most libs/framework pieces are device specific. This folder is the main cause of bootloops, and non-booting ports. I will try to explain most of my knowledge on what libs control what part of the phone. Almost all of the fixes for camera, sound, wifi, etc will be made somewhere within this folder. Unzip a ROM and dig around this folder for a bit, understand what folder contains what files, they are somewhat self-explanatory (Apps, framework, libs). This folder will become your best friend, learn to love it.
META-INF Folder – This folder holds all of the initial installer scripts; such as when you flash the ROM in a custom recovery. It is what tells your phone to install the ROM and what files to install. This script controls mount points, important system links, and in some occasions special commands. You can also edit this file to include any custom text you want users to see while flashing your rom. This file is device specific, and should ALWAYS be replaced when porting. Flashing a ROM with the wrong updater-script can either:
a) Corrupt partitions
b) Abort Installation (very frustrating with large ROM’s)
c) Rare occasion, brick your device
Bottom line is, pay very close attention to what exactly is in your custom built ROM before you flash it.
I decided this will be a good preface post. Read here for basic information you need to know BEFORE porting.
Here We GO
In order to port ROM's to the Nexus S, you will need a "base" to pull your files from. In order to port a ROM to the Nexus S, we will need a Nexus S ROM to start with, hence the "base". This base is normally CM7 or Stock Gingerbread, and can also be CM9 - Stock ICS. The base you pull from needs to match with the version of ROM you are porting.
1) Is the ROM I'm porting Ice Cream Sandwhich, or Gingerbread?
-This is very important. Most files are incompatible between versions, so make sure you know for sure, which version your port is going to be.
a) If the ROM you are trying to port is based on Gingerbread, download this ROM as a base to pull from (device specific):
CM7 GSM
CM7 4G​
b) If the ROM you are trying to port is based on Ice Cream Sandwhich, Download this ROM as a base to pull from (device specific):
IMM76D GSM
IMM76D 4G
Click to expand...
Click to collapse
2) Download the ROM you are going to port. Place this ROM on your desktop, along with the matching base.
3) Unzip both ROM's (port, and base) using preferred archive utility. Extracted ROM's will be in folders with matching name of the zip, DO NOT mix these up; be very organized with your base and the ROM you are porting.
4) Take a look in your newly unzipped ROM's, they should look exactly as I explained in the first post. We will be starting with the System folder of the ROM you are porting, replacing our needed files.
4a) Click into the System folder; you will see many folders inside. The first one we start with is the lib folder. Click inside; you will now be in the directory /system/lib
4b) In this directory is where all of the libs are located; these are crucial to the ROM. Replacing these without knowing what you are doing will result in a ROM that will not boot.
4c) At the top, you will notice 5 main folders; bluez-plugin, egl, hw, modules, soundfx. The ones that we care about are egl and hw. The egl folder contains the graphics drivers for the specific device, and the hw controls lights, gps, and other hardware features. In the ROM you are porting, delete both of these folders. (egl and hw)
4d) At this point, navigate to your base ROM (Nexus S ROM). Select both the egl and hw folders, and drag them to the lib folder of the current ROM you are porting. Your lib folder will now contain 5 folders again. Moving on.
4e) Navigate to your base ROM folder, into /system/lib again. Select these libs and drag-drop into your current ROM you are porting (this step varies between ICS and GB);
-= Gingerbread =-
-libaudio.so
-libaudiopolicy.so } these libs control audio
-libaudioflinger.so
-libril.so
-libsecril-client.so } these libs control network
-libreference-ril.so
-libs3cjpeg.so
-libFLAC.so } these libs are required for media
-= ICS =-
-libaudioflinger.so (may cause issues with booting in some ports)
-libaudioutils.so } once again, these libs are for audio
-libtinyalsa.so
-libril.so
-libsecril-client.so } these libs control network
-libreference-ril.so
-libs3cjpeg.so
That should be it for the lib folder for now. Exit /system/lib, and return to the main branch of the system folder /system.
Click to expand...
Click to collapse
5) Once we are back into the root of the system folder (/system), observe the two folders towards the bottom; usr and vendor.
usr - contains files that relate to touchscreen, softkeys, keyboard, and other hardware buttons.
vendor - mostly nexus specific, contains additional network libs, graphics, hw, and extra configuration files.
5a) In the ROM you are porting, delete both of these folders. They are of no use, since they are specific to devices.
5b) Copy both the usr and vendor folders from your base ROM, to the current port's system folder. As you can see, there is a lot of copy and paste from our Nexus ROMS to the ports, although we keep the important folders that pertain to the ROM itself.
Click to expand...
Click to collapse
6) Navigate back to the /system folder. You should see a folder named etc. Click into it.
6a) The etc folder is a wonderful place; it is one of the most used folders in the ROM. Observe a few of the folders inside. In our base ROM, you will see a few folders that are pretty self explanatory (wifi, permissions, init.d)
TO BE CONTINUED - I'M TIRED AND HAVE TEST ALL DAY TOMORROW AND WEDENSDAY. I WILL UPDATE WHEN I FIND TIME IN BETWEEN
and also this one. Just in case.
I like this already
Sent from my tweaked aosp Sensation
Swamp spreading your knowledge is 10x more beneficial to the community than releasing a ROM. Thanks man.
Sent from my Nexus S 4G using Tapatalk 2
dreamsforgotten said:
Swamp spreading your knowledge is 10x more beneficial to the community than releasing a ROM. Thanks man.
Sent from my Nexus S 4G using Tapatalk 2
Click to expand...
Click to collapse
+1 on the fishing lessons. Goblin your contribution is appreciated.
You without me is like Harold Melvin without the Blue Notes....
Thanks for this. Will attempt working on some of your ROMs like the Epic Touch one.
Sent from my Nexus S 4G using xda premium
This needs a kick
Sent from my Sensation using XDA
great start, can't wait to read the rest!
I've been super busy this last week, had no time for anything really. I'll finish writing this up, there are so many parts that need to be covered, I guess "simple porting" isn't all that simple to explain
I am just impatient to get this entire guide!! Thanks you
I will take my pain with patience.. haha..
waiting for the second part!!
Looking forward to the rest of the guide! Much appreciated swamp!
I will be following this thread closely. I haven't so much as coded a hello world in years but once this guide is complete, it may serve as the segue to get me started again. Waiting with baited breath.
Does this guide work with any rom port? Or is this Nexus S specific?
sivarticus85 said:
Does this guide work with any rom port? Or is this Nexus S specific?
Click to expand...
Click to collapse
I was actually going to add this to the op. The files I have included are nexus specific, but the actual process should work on tons of other devices.. There are a few areas that are nexus specific, such as build.prop edits and vendor folder, but other than that you should be able to follow this for other devices.
Or do you mean nexus s roms? This guide is kind of general porting; more of the basics. With htc sense and fancy roms like that, there will be more edits that need to be done, etc.
swamp goblin said:
I was actually going to add this to the op. The files I have included are nexus specific, but the actual process should work on tons of other devices.. There are a few areas that are nexus specific, such as build.prop edits and vendor folder, but other than that you should be able to follow this for other devices.
Or do you mean nexus s roms? This guide is kind of general porting; more of the basics. With htc sense and fancy roms like that, there will be more edits that need to be done, etc.
Click to expand...
Click to collapse
Well I own a Photon, another member pointed me here because I wanna learn how to port. My intention is to port HTC Sense to it, and learn something new in the process. I'm using the Photon-specific CM7 as a base, and the Energy Rom from the Sensation as my rom port. Since both run GB and are qHD devices, I figured these would be good starting points.
Thank you very much for your guide.
sivarticus85 said:
Well I own a Photon, another member pointed me here because I wanna learn how to port. My intention is to port HTC Sense to it, and learn something new in the process. I'm using the Photon-specific CM7 as a base, and the Energy Rom from the Sensation as my rom port. Since both run GB and are qHD devices, I figured these would be good starting points.
Click to expand...
Click to collapse
Yeah, you're set up perfectly. I am pretty sure you could follow this guide, although there may be some photon specific libs that have to be added..
swamp goblin said:
Yeah, you're set up perfectly. I am pretty sure you could follow this guide, although there may be some photon specific libs that have to be added..
Click to expand...
Click to collapse
Ok cool. I'm pretty sure it'll be a while before I ever get this port running, so in the meantime I'll be brushing up on what makes my phone tick, and for you to finish your little guide here.
I knew my EVO inside and out almost, so I'm hoping the Photon is easy to learn too. The file system for both is pretty similar, with the exception of Sense-specific files of course.

[GAPPS][DAILY] Open GApps for Android; All Android Versions & Devices

​Questions? Use Q&A!
Please read the FAQ before reporting any bugs or errors!
If you post in the main thread not having read the FAQ or error message itself, not included a debug log when reporting a malfuction or reporting a Force Closure without a logcat, your post will be ignored by the developers!
Not because we are evil, but because the same questions keep popping up over and over again and too often we get a "X doesn't work, plz fix" without any clue what is happening. We don't have telepathic connection to your device and all the time unnecessarily wasted on this can't be spend on development of Open GApps itself.
The Latest builds of Open GApps for Android can easily be downloaded from the:
Open GApps Homepage -> All architectures & download options​
Open GApps App
FAQ @ GitHub
Package comparison @ GitHub
Advanced Features and Options @ GitHub
Development Repository @ GitHub
I work on this project for FREE and putting in a lot of hours into it. While not mandatory, donations encourage me to continue to further pursue this project and I'd deeply appreciate them, if you feel generous.
Donate to The Open GApps Project
Are you a ROM developer and want to hotlink to the latest Open GApps package? Then check this wiki entry for details.
Please don't publicly mirror the prebuilt packages without explicit consent of @MastahF, to ensure that users will always be directed to the very latest version and the source code of the project.
About The Open GApps Project
Open GApps is a Google Apps package completely developed by writing buildscripts which allow for the automated creation of new up-to-date packages automatically.
The development process is completely open-source (GPLv3) and the goal is to have multiple contributors involved, to secure and reinforce the sustainability of Open GApps development.
Builds are generated every (European) night automatically (if there are any changes) and uploaded to GitHub.
Official AROMA Open GApps package is developed in collaboration with long-time LP-AROMA-developer @raulx222 and has a dedicated XDA thread
For any questions about the AROMA installer development, please refer to that thread. Of course, general support questions can also be asked in our own Q&A thread.
Official Open GApps For Stock support is developed in collaboration with @Rapper_skull and has a dedicated XDA thread
For any questions about the GApps for Stock development, please refer to that thread. Of course, general support questions can also be asked in our own Q&A thread.
The x86 package branch of the package is focused on Zenfone support and is maintained by @deadman96385 of the famous Zenfone GApps packages and has its own topic for x86 related questions
For those that cook their own ROM, an AOSP-build mechanism for Open GApps has been developed by @blystad and can be found at GitHub, remember that you should not bundle any pre-packaged Google Apps with any ROMs you want to distribute further though.
To gather all the various APKs that are necessary for the packages our master of the APK Universe @MNBooZe has written a tool called APKCrawler that scrape these from the internet, e.g. from APKMirror, it can be found at GitHub too.
Characteristic of Open GApps:
Some highlights about the characteristics of the Open GApps packages:
All platforms and and all Android versions are supported
DPI-optimized support for all Google packages (unlike other GApps)
Frequently updated Google Apps: The pre-built OpenGApps.org packages are updated every (European) night (if there are any updated Google Apps available)
Strong compression, allowing for relatively small downloads of even the most complete packages
Automatic backup: It is not necessary to re-flash Google Apps when you flash a ROM update. Most ROMs support this (addon.d) function
The installer checks your device’s capabilities, like the system partition size. It will notify you, before making any changes, if it finds any problems
Several package variations, from a Google Super Package (includes all applications that ever shipped on a Google device), to a Stock package that equals the set of applications found on the most current and complete Nexus, to smaller, minimalist packages and an AROMA package that allows graphically selection of what to install
A special ‘for Stock ROM’ installation mode that allows to update the Google Apps on Stock ROMs that conform to the original Google Nexus filesystem structure
All package installations can be customized to your individual preferences using our Advanced Features and Options
The idea behind this project:
I believe a big source of the problem for many GApps packages to stay up-to-date (or not be forfeited) is the lack of time for developers to do labour-intensive repetive every time a new google-app apk is released.
That is why I have taken it upto myself to write some Linux shell scripts to automate the packaging and to share these efforts with the world with the goal to create a team to continue this package together under the name Open GApps.
This project should not be managed by a person, but by a team, so volunteers willing to help are more than welcome!
Team management and projectleader: @[COLOR="blue"]MastahF[/COLOR]
Writing of the scripts: @[COLOR="blue"]MastahF[/COLOR] & @[COLOR="blue"]Rapper_skull[/COLOR] or check the team on GitHub and many other contributors
Updating GApp sources: @[COLOR="blue"]MNBooZe[/COLOR] & @[COLOR="blue"]DJAlik[/COLOR] & @[COLOR="blue"]bgiesing[/COLOR] & @[COLOR="blue"]mc1100[/COLOR] & @[COLOR="blue"]deadman96385[/COLOR] or check the team on GitHub
AROMA installer: @[COLOR="blue"]raulx222[/COLOR] using LibAroma
Custom compiled commandline tools: @[COLOR="blue"]YashdSaraf[/COLOR]
Website: @[COLOR="blue"]raulx222[/COLOR] & @[COLOR="blue"]MastahF[/COLOR] & signalv hosted by GitHub and created with Material Design Lite and JQuery
Artwork: @[COLOR="blue"]Yeti12[/COLOR]: Yeti-Designs website
Documentation: @[COLOR="blue"]Trafalgar-Square[/COLOR] and @[COLOR="blue"]MastahF[/COLOR] and many other contributors.
Open GApps installer uses open source third-party tools, like busybox and xzdec, compiled by @YashdSaraf; See his busybox thread for more info.
Open GApps is originally based on the now discontinued PA GApps package of @TKruzze and @osm0sis
I suggest to @hellowasif and @sir*mez to take a look at this
Hi, @provolinoo suggested me to take a look at this topic.
I made my own GApps, derived from PA GApps by TKruzze and without knowing I solved some problems that the people that were trying to continue the PA GApps are having.
I completely removed the sizes.prop file and now I measure the sizes of the apps on the fly using unzip. I took a look at your scripts and they're really useful, and reminded me that the APKs need to be zipaligned, which I forgot.
Maybe we can join your scripts, my changes, and a fast internet connection to bring PA GApps back to life.
If you're interested here's the link to my topic, please take a look at it: http://forum.xda-developers.com/android/general/alpha-gapps-stock-t3093389
Well i wanted to say thankyou so much for such wonderful work you did, Before this i was maintaining the PA-Gapps Packages PA Gapps 4.4.4 and PA-Gapps 5.X everything was going great and i must say i learned a lot by maintaining these Gapps packages and that was very wonderful experience but i was only updating Gapps and Libs, But than i realized that they weren't as perfect as the original gapps packages because the original Gapps package uses two important files which were size and libs list which the packages uses and they were the most important part of PA-Gapps. I tried to update these two files manually but they were two time consuming so i decided to drop this project due to lack of resources but by these scripts it will very easy to create Gapps Packages so i wanted to say thankyou again
Rapper_skull said:
Hi, @provolinoo suggested me to take a look at this topic.
I made my own GApps, derived from PA GApps by TKruzze and without knowing I solved some problems that the people that were trying to continue the PA GApps are having.
I completely removed the sizes.prop file and now I measure the sizes of the apps on the fly using unzip. I took a look at your scripts and they're really useful, and reminded me that the APKs need to be zipaligned, which I forgot.
Maybe we can join your scripts, my changes, and a fast internet connection to bring PA GApps back to life.
If you're interested here's the link to my topic, please take a look at it: http://forum.xda-developers.com/android/general/alpha-gapps-stock-t3093389
Click to expand...
Click to collapse
Hey, I looked at your work. Some things are indeed good improvements and I will try to incorporate them into my work if you don't mind.
I also looked at your sizes.prop solution, but honestly I don't like it that much, because although the calculation will be very exact, I don't think it is a good idea to unzip large files and pipe all this data through on our small little phones . I prefer to keep the sizes.prop estimations on the generating-side rather than on the execution-side.
I really would like you to be involved in the project, somebody else also already PMed on the forum, wanting to be involved. I described which tasks and roles are very welcome to be fulfilled within a joint team effort.
MastahF said:
Hey, I looked at your work. Some things are indeed good improvements and I will try to incorporate them into my work if you don't mind.
I also looked at your sizes.prop solution, but honestly I don't like it that much, because although the calculation will be very exact, I don't think it is a good idea to unzip large files and pipe all this data through on our small little phones . I prefer to keep the sizes.prop estimations on the generating-side rather than on the execution-side.
I really would like you to be involved in the project, somebody else also already PMed on the forum, wanting to be involved. I described which tasks and roles are very welcome to be fulfilled within a joint team effort.
Click to expand...
Click to collapse
Thank you for your appreciation. The files however are not extracted but I used "unzip -l" that lists the content of the archive with the file sizes. Keep me informed about this project.
hellowasif said:
Well i wanted to say thankyou so much for such wonderful work you did, Before this i was maintaining the PA-Gapps Packages PA Gapps 4.4.4 and PA-Gapps 5.X everything was going great and i must say i learned a lot by maintaining these Gapps packages and that was very wonderful experience but i was only updating Gapps and Libs, But than i realized that they weren't as perfect as the original gapps packages because the original Gapps package uses two important files which were size and libs list which the packages uses and they were the most important part of PA-Gapps. I tried to update these two files manually but they were two time consuming so i decided to drop this project due to lack of resources but by these scripts it will very easy to create Gapps Packages so i wanted to say thankyou again
Click to expand...
Click to collapse
Hi hellowasif,
would you be interested in collaborating then together with other people in a team to bring back PA Gapps using these scripts?
MastahF said:
Hi hellowasif,
would you be interested in collaborating then together with other people in a team to bring back PA Gapps using these scripts?
Click to expand...
Click to collapse
Yes that will be wonderful to work as a team and you count me in. :highfive:
Rapper_skull said:
Thank you for your appreciation. The files however are not extracted but I used "unzip -l" that lists the content of the archive with the file sizes. Keep me informed about this project.
Click to expand...
Click to collapse
Ah, then i misread your code, I will take a look at it then again. Anyhow, since the files in the package are static, I think at moment of generation is a good moment to get the file sizes
I have btw a question for you, a problem I was not able to resolve myself yet, even though trying a lot.
When creating the .zip-package to be signed and afterwards flashed, I am at the moment not using any compression (but use the -Z store flag).
If I use *any* kind of compression, the package refuses to flash at my phone (GT-i9300) with the message error executing update binary error.
I tried a lot of combinations, like using a different zip-application, compressing only the files outside META-INF etcetera, but nothing seems to work.
So my question is: how do you generate and sign your zip file? On which platform? With which application? With which parameters?
MastahF said:
Ah, then i misread your code, I will take a look at it then again. Anyhow, since the files in the package are static, I think at moment of generation is a good moment to get the file sizes
I have btw a question for you, a problem I was not able to resolve myself yet, even though trying a lot.
When creating the .zip-package to be signed and afterwards flashed, I am at the moment not using any compression (but use the -Z store flag).
If I use *any* kind of compression, the package refuses to flash at my phone (GT-i9300) with the message error executing update binary error.
I tried a lot of combinations, like using a different zip-application, compressing only the files outside META-INF etcetera, but nothing seems to work.
So my question is: how do you generate and sign your zip file? On which platform? With which application? With which parameters?
Click to expand...
Click to collapse
You will maybe laugh at my reply, but I simply use WinRAR, on Windows, with maximum compression. I do not yet sign the ZIPs because I wanted to generate my own private key instead of using the generic test-key. What you can try to do is update your recovery (if it's not updated) to see if the problem is solved.
dowloaded your GitHub project and ran through the scripts to create the signed zip file. So far everything is running smoothly. Did a full wipe. Great Job!
Question I have. Do you know why the com.android.vending is still installed in the user space (/data/app) vs system space?
Chrome doesn't seem to be working. It crashes every time I try to run it.
DJAlik said:
dowloaded your GitHub project and ran through the scripts to create the signed zip file. So far everything is running smoothly. Did a full wipe. Great Job!
Question I have. Do you know why the com.android.vending is still installed in the user space (/data/app) vs system space?
Click to expand...
Click to collapse
Thank you for your feedback, at the moment I was extracting the Play Store from a Nexus Image under the cryptic name of Phonesky.
I only found out just now that this Phonesky is the same as android.vending (the Play store) and updated this.
DJAlik said:
Chrome doesn't seem to be working. It crashes every time I try to run it.
Click to expand...
Click to collapse
Also thank you for your feedback. Using your feedback I discovered some nasty typos in my script which were breaking Chrome and Talkback.
I fixed those and will be uploading a new package later today. The fixes are already on github.
hellowasif said:
Yes that will be wonderful to work as a team and you count me in. :highfive:
Click to expand...
Click to collapse
Nice
Very happy to hear that! Tomorrow I will be heading for an island for a week, for holidays, so lucky for me, but unlucky for those interested in updates .
After that holiday I will set-up the basic infrastructure for the team.
I also thought about how to make packages for older android versions and I came up with the following solution that I will be then implementing next week:
*Within the SourceAPKs folder we will put some meta-data or an overlay that specifies the minimal SDK/API version that the package requires
*I will update the scripts in such a way that you can target various android versions, including such a sdk/api version.
*When building for a target, the highest version of the APK that still support that sdk/api version will be selected
*A seperate output directory will be created for each target
*All scripts will be executed from a single Makefile
E.g., the directory structure will look like:
SourceAPKs/18/com.google.android.apps.maps-9.8.1-908101124-minAPI18.apk
SourceAPKs/14/com.google.android.apps.books-3.3.41-30341-minAPI14.apk
Scripts/extract_sources.sh
Output/4.4/pa_unsigned.zip
Output/5.0/pa_unsigned.zip
Output/pa_gapps-4.4-20150504.zip
Output/pa_gapps-5.0-20150504.zip
Makefile
If anybody has any feedback on these ideas, you are welcome!
MastahF said:
Nice
Very happy to hear that! Tomorrow I will be heading for an island for a week, for holidays, so lucky for me, but unlucky for those interested in updates .
After that holiday I will set-up the basic infrastructure for the team.
I also thought about how to make packages for older android versions and I came up with the following solution that I will be then implementing next week:
*Within the SourceAPKs folder we will put some meta-data or an overlay that specifies the minimal SDK/API version that the package requires
*I will update the scripts in such a way that you can target various android versions, including such a sdk/api version.
*When building for a target, the highest version of the APK that still support that sdk/api version will be selected
*A seperate output directory will be created for each target
*All scripts will be executed from a single Makefile
E.g., the directory structure will look like:
SourceAPKs/18/com.google.android.apps.maps-9.8.1-908101124-minAPI18.apk
SourceAPKs/14/com.google.android.apps.books-3.3.41-30341-minAPI14.apk
Scripts/extract_sources.sh
Output/4.4/pa_unsigned.zip
Output/5.0/pa_unsigned.zip
Output/pa_gapps-4.4-20150504.zip
Output/pa_gapps-5.0-20150504.zip
Makefile
If anybody has any feedback on these ideas, you are welcome!
Click to expand...
Click to collapse
The idea of automating all the process is certainly good, but we have to keep in mind that things changes really fast. For example in an update Google can add a library to an application that previously didn't have one. We have to check if there's a lib folder inside the APK instead of assuming that all the APKs that now don't have libs will never have them. Also the idea of various app versions is very good, but also error prone. Maybe we can just put all the APKs in one folder and use the filename to determinate the app name and the minAPI (if we don't want to make a step further and read directly from the AndroidManifest.xml, using aapt).
MastahF said:
Thank you for your feedback, at the moment I was extracting the Play Store from a Nexus Image under the cryptic name of Phonesky.
I only found out just now that this Phonesky is the same as android.vending (the Play store) and updated this.
Also thank you for your feedback. Using your feedback I discovered some nasty typos in my script which were breaking Chrome and Talkback.
I fixed those and will be uploading a new package later today. The fixes are already on github.
Click to expand...
Click to collapse
latest commit:
$ sh make_package.sh
rm: missing operand
DJAlik said:
latest commit:
$ sh make_package.sh
rm: missing operand
Click to expand...
Click to collapse
You can ignore that error-message. I just delete all the temporary files of my text editor (ending with a ~) before packaging using this 'rm' command.
Rapper_skull said:
The idea of automating all the process is certainly good, but we have to keep in mind that things changes really fast. For example in an update Google can add a library to an application that previously didn't have one. We have to check if there's a lib folder inside the APK instead of assuming that all the APKs that now don't have libs will never have them. Also the idea of various app versions is very good, but also error prone. Maybe we can just put all the APKs in one folder and use the filename to determinate the app name and the minAPI (if we don't want to make a step further and read directly from the AndroidManifest.xml, using aapt).
Click to expand...
Click to collapse
Very good comments. I have been looking into the possibility of using aapt. With 'aapt d badging file.apk' I will be able to retrieve the API information and app/packagename from any apk.
Using this information I could make an add-script or an 'add-directory' that would scan any new apks and archives them automatically in a storage. This could help to maintain overview, and to automatically discard older versions of the app if the api-level is not changed. It could also allow for adminstation of x86 and arm64 packages in the tree.
So a 'storage' filetree could become in that case like:
/arm/packagename/api14/maps2.apk
/x86/packagename/api11/maps1.apk
/x86/packagename/api14/maps2.apk
My goal is also to indeed in the future to (more) automatically process the existence of a 'lib' and automatically incorporate into the output process. For this I will have (as within my goals set out for next week) to upgrade the process of generating the output folder. Because at this very moment the scripts still assume availability of (most of the) outputfolders to be there already.
MastahF said:
Very good comments. I have been looking into the possibility of using aapt. With 'aapt d badging file.apk' I will be able to retrieve the API information and app/packagename from any apk.
Using this information I could make an add-script or an 'add-directory' that would scan any new apks and archives them automatically in a storage. This could help to maintain overview, and to automatically discard older versions of the app if the api-level is not changed. It could also allow for adminstation of x86 and arm64 packages in the tree.
So a 'storage' filetree could become in that case like:
/arm/packagename/api14/maps2.apk
/x86/packagename/api11/maps1.apk
/x86/packagename/api14/maps2.apk
My goal is also to indeed in the future to (more) automatically process the existence of a 'lib' and automatically incorporate into the output process. For this I will have (as within my goals set out for next week) to upgrade the process of generating the output folder. Because at this very moment the scripts still assume availability of (most of the) outputfolders to be there already.
Click to expand...
Click to collapse
Exactly, in this way it would be possible to easily maintain arm64 and x86 packages too. The scripting is not complicated, it just requires some time. If you want I can contribute too (I had some experience with shell scripting). If the final scripts are not too long or complicated we can plan a Windows port too, if some future team member is not used to Linux.
We can also try to contact AP to request an RSS feed for new APKs on APKMirror.
EDIT: It seems that adding /feed to any URL will give you the corresponding RSS feed. Good to know.
Rapper_skull said:
Exactly, in this way it would be possible to easily maintain arm64 and x86 packages too. The scripting is not complicated, it just requires some time. If you want I can contribute too (I had some experience with shell scripting). If the final scripts are not too long or complicated we can plan a Windows port too, if some future team member is not used to Linux.
We can also try to contact AP to request an RSS feed for new APKs on APKMirror.
Click to expand...
Click to collapse
I've been using Cygwin on Windows and the scripts work great.

Categories

Resources