[Q] Convert project files to apk aligned - Java for Android App Development

Sup
So I have my project FILES. And I want it to be a aligned apk file. In some way I have to get it into eather Eclipse or Android Studio. I have both. I cant do it in Eclipse, and in Android studio this comes up:
Android Source Generator: [Tiber] Package is not specified in AndroidManifest.xml
Click to expand...
Click to collapse
Anyone know how I can fix this or know an alternative way?

In eclipse there is the option to export signed apk, doesnt that work for you?
According to the error message you should have a look in your manifest if the field with the package name is empty
---------------------------------
Phone : My new Nexus 4!
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk

Masrepus said:
In eclipse there is the option to export signed apk, doesnt that work for you?
According to the error message you should have a look in your manifest if the field with the package name is empty
---------------------------------
Phone : My new Nexus 4!
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk
Click to expand...
Click to collapse
Nope. Cause I can't import it as a android project.

I've uploaded the .apk file I want to zipallign.

Ah you wanna zipalign it, sorry missed that
Well with apktool you can do this
---------------------------------
Phone : My new Nexus 4!
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk

andreglud said:
I've uploaded the .apk file I want to zipallign.
Click to expand...
Click to collapse
Since you have Eclipse, you should also have the zipalign tool with it. Use the following to zipalign your apk manually.
Code:
zipalign -v notaligned.apk zipaligned.apk

Related

OGBatteryMod

Just wanted to mention that this mod works on Razr I I'm rooted and on Pillama 0.3. It gives you the ability to choose out of various battery icons.
Here's a link to the original thread: http://forum.xda-developers.com/showthread.php?t=2181766&page=12
Hi, thanks for the link but it didn't work for me. Detected my razr, I chose settings.apk then it throws an error saying it can't decompile settings.ui.apk
AW: OGBatteryMod
cuben said:
Hi, thanks for the link but it didn't work for me. Detected my razr, I chose settings.apk then it throws an error saying it can't decompile settings.ui.apk
Click to expand...
Click to collapse
Maybe it's because your ROM is not deodexted. Your system apks have to be deodexted to be able to modify them. Are you running Stock or another ROM?
Gesendet von meinem XT890 mit Tapatalk 2
Ah, yes maybe. I am running 91.2.26001.Retail.en.EU - 4.1.2 and it doesn't mention it being deodexed so maybe your right. Cheers.

Multi window to custom firmware

Implement multi window impossible to custom firmware?
I'd like to see on your CM 11. It is strange that the developers did not realize Cyanogenmod this possibility in their firmware ...
Omnirom is what you are looking for.
Gesendet von meinem LG-G2 mit Tapatalk
bonny_k-9 said:
Implement multi window impossible to custom firmware?
I'd like to see on your CM 11. It is strange that the developers did not realize Cyanogenmod this possibility in their firmware ...
Click to expand...
Click to collapse
Check out the xHaloFloatingWindow module for the Xposed Framework
GizmoKaca said:
Check out the xHaloFloatingWindow module for the Xposed Framework
Click to expand...
Click to collapse
And it is possible to deduce immediately xHALO 2 applications, dividing the screen into two parts?

[Q] Play Audio on app boot?

Ok hi
So at the moment i am developing multiple apps apart of two different project im running both of whom im running on my own right now
but i am here to ask how can i play some audio while i boot in with the Splashscreen?
LawlessBaron said:
Ok hi
So at the moment i am developing multiple apps apart of two different project im running both of whom im running on my own right now
but i am here to ask how can i play some audio while i boot in with the Splashscreen?
Click to expand...
Click to collapse
You could store an mp3 in res/raw directory and use
android.media.MediaPlayer create (Context context, int resid)
And start that code by starting an async task in onCreate
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk
Masrepus said:
And start that code by starting an async task in onCreate
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk
Click to expand...
Click to collapse
Thanks guys ill give it a shot

[Q] Android Studio build error - Google Drive

I'm totally new to android Dev.
I'm trying to create an app that can access Google Drive. I have done all the developer setup on the Google console.
I used SDK manager to install google play services etc.
See this link for everything I did:
https://developers.google.com/drive/android/get-started
For some reason I'm getting the following error:
cannot find symbol variable mGoogleApiClient
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Drive.API)
.addScope(Drive.SCOPE_FILE)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
I'm missing a library or something. Can anyone suggest why this would be?
You forgot to give a data type for mGoogleApiClient, i guess that is the problem:
GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Drive.API)
.addScope(Drive.SCOPE_FILE)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk
Thanks for that, looks like that could the issue! Will check tomorrow
Cheers!
Cheers man, no problem
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk
I added that this morning and I'm still getting these errors:
cannot find symbol class GoogleApiClient
cannot find symbol variable Drive
package GoogleApiClient does not exist
I have definately installed Google Repository and Google play services using the Android SDK Manager.
Do I need to do anything else in Android Studio?
I have this in my build.gradle:
dependencies {
compile 'com.android.support:appcompat-v7:+'
compile 'com.google.android.gmslay-services:4.2.42'
}
Mh ok did you import the needed packages inside your activity? Like
import java.lang.* (just an example, i dont know the exact package for the GoogleApiClient)
In eclipse you can automatically insert needed imports by pressing CTRL+SHIFT+O
I have never used android studio so i have no idea if you can do automatic imports or how it works there..
Because to use some predefined class, you obviously first have to download/install/whatever that package. But then you have to tell java that you want to use it in that one specific activity by inserting that import (or imports, not sure)... Thing directly under the class header
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk
Thanks - it looks like I needed to import the packages, I've done that and it's working now!
Masrepus said:
Mh ok did you import the needed packages inside your activity? Like
import java.lang.* (just an example, i dont know the exact package for the GoogleApiClient)
In eclipse you can automatically insert needed imports by pressing CTRL+SHIFT+O
I have never used android studio so i have no idea if you can do automatic imports or how it works there..
Because to use some predefined class, you obviously first have to download/install/whatever that package. But then you have to tell java that you want to use it in that one specific activity by inserting that import (or imports, not sure)... Thing directly under the class header
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk
Click to expand...
Click to collapse
Great!
---------------------------------
Phone : Nexus 4
OS:
Pure KitKat 4.4.2 stock, no root, no mods (but only for the first time ;D)
---------------------------------
Gesendet von Tapatalk

[ROM][WIP][AOSP][4.4.4_r2.0.1] Google Edition for SGS4A (int'l) 1.0.0

What?
A work in progress build of AOSP, using CM11 kernel sources and device files, modified to play ball with AOSP
some stuff copied from CM, to make build happen (bionic, assorted libs and stuff in external and system, etc...)
build makefiles modified, using CM files where possible
some small code modifications
for I9295 international only
stuff is broken, for how long i do not know. Limited time and real life... meh
DISCLAIMER: You take responsibility of your phone and what you flash into it, not me. You are warned!
How?
grab the file: https://drive.google.com/folderview?id=0BzJzDM42pkRvcUVyZDRVSERzdlk&usp=sharing
if coming from another rom: factory reset + format /system + format caches as well
upgrading previous version shouldn't need factory reset or system format
flash in CWM (yes, CWM or similar needed)
flash gapps
report bugs if new one found
help with development if possible
Credits
Google for Android (and Google search, boy this wouldn't have happened without it )
CyanogenMod for stuff i'm using to make this happen
SlimRom guys
LeJay for jactivelte kernel sources and other stuff
Chainfire for root and SuperSU app
chenxiaolong for DualBoot
Donators and testers
ES File Explorer creators https://play.google.com/store/apps/details?id=com.estrongs.android.pop&hl=en
DualBoot
I provide dualboot version of this ROM, mainly because i run the test versions in dualboot mode (second rom). If you aren't' familiar with the concept, have a look here: http://forum.xda-developers.com/showthread.php?t=2447534.
Basically it allows one to have two (or more) roms installed simultaneously, switching between them using the application provided on the above thread.
Notes:
When using dualboot roms, DO NOT USE CWM wipe, format functionality. Backup works, but for what i know, it backs up the secondary rom too, not 100% sure how well this works...
For dualboot secondary rom, you need dualboot gapps
Flashing main rom destroys secondary rom, flashing secondary rom doesn't harm main rom
For more info, read the above thread
Changes v1.0.0 and 1.0.0-opt
new KK blobs taken in use (same that CM11 has been running since last fall) (NOTE: KT kernel from last spring won't work with this)
contains some of the latest fixes to CM11, like Network search fix and Camera fixes
repo sync, not much changed
probably the last Android 4.4 release
Changes v0.9.10 and 0.9.10-opt
fix phone speaker
AOSP repo sync, nothing major has changed
Changes v0.9.9 and 0.9.9-opt
triple framebuffers, reduces screen refresh stutters
f2fs in kernel enabled. Not supported bu updater yet, though
updater_script updates, more compatible with TWRP
SuperSU 2.37
Changes v0.9.8 and 0.9.8-opt
camera: fixed exposure setting
added proper network operator name list
Changes v0.9.7 and 0.9.7-opt
camera fixes: front camera should work now
exfat is now writable
external sdcard write restrictions relaxed
selinux rules updated from CM11
updater_script: properly set permissions and selinux metadata (may need CWM update)
kernel: Firmware files from TW KK kernel
kernel: Exfat 1.2.6 from TW KK kernel
kernel: Added f2fs
blobs: Wifi, NFC and Bluetooth from NE5
Changes v0.9.6 and 0.9.6-opt
incremental camera fixes, toggling flash and HDR shouldn't freeze the camera, at least so much. There's still bugs, but easy does it...
kernel: Newer bcmdhd drivers from TW KK 4.4.2 kernel
kernel: Wcd9xxx stuff from TW KK 4.4.2 kernel
kernel: Cypress touchkey, leds and max77693 stuff from tw kk kern
optimized build: changed to Google's GCC ver 4.8, no more broken playstore icons
Changes v0.9.5 and 0.9.5-opt
kernel: Msm qdsp6v2 updates from TW kk 4.4.2 kernel
framework: some minor bluetooth and gps code merges from CM
Changes v0.9.4-opt
First build with JustArchi's optimizations (Linaro 4.8)
Also added DualBootPatcher 8.0.0
Changes v0.9.3
updater-script fixes to support some CWM recoveries
Changes v0.9.1
added bash, ebtables, ntfs-3g, vim
updated sqlite and zlib
fixed wifi ap
Changes v0.9
wifi & gps settings from msm8960 (from cm jflte)
stepdetector and -count sensor permission xmls (from cm jflte)
init network tuning (from cm jflte)
charger update (from cm jflte)
wifi settings moved out (from cm msm8960)
gps setting moved out (from cm msm8960)
charger change for kk bootloaders (from cm msm8960)
kernel: using new unified jf kernel http://review.cyanogenmod.org/#/c/67429/
kernel: enabled CONFIG_DISPLAY_DISABLE_TEST_KEY
kernel: enabled CONFIG_CFG80211_REG_NOT_UPDATED
kernel: enabled CONFIG_SENSORS_HALL
QC time services: fixed time resetting to wrong value when rebooting
Changes v0.8
update scripts fixed
md5sums added
zips cleaned
Preferred network-setting now has only Lte, 3G and 2G. Default is 3G, change it if needed. This is work in progress
Qualcom init script updates from CM jflte (sdcard read/write speedup etc.)
Google backup working
Changes v0.7
Updated SuperSU to 2.0.1
Updated su install scripts to match SuperSU CWM scripts (hopefully...)
Added ES FIle Explorer
Added DualBootPatcher ver 7.0.0 app
Changes v0.6
4.4.4_r2 (doesn't seem any changes so far...)
Nfc seems to be on now
Some overlays updated, check the commits here: https://github.com/spegelius/android_device_samsung_jactivelte/tree/aosp-4.4
? can't remember...
Changes v0.5
GPS working
sdcards working
mobile data H and H+ icons working
some code updates from CM (bionic) and overlays updated
Changes v0.4
Initial release, fresh from oven. Might be bit burned on the sides...
Bugs
Camera: toggling HDR might crash camera (rare)
Apparently flaky Bluetooth
Fixed bugs
exFAT
Camera: exposure setting crash
Camera: toggling front camera crashes camera app
Camera: toggling flash might crash camera
Sdcard problems, mounting fails (even internal). This causes a lot of other problems...
Camera: can't save pics as no sdcard...
GPS: doesn't seem to work
NFC crashes silently on the background (logcat)
Google cloud backup
Date resets to 1970 or so in reboot, might cause problems when in flight mode or bad connection
WiFi tethering turns on but the ap network cannot be seen
Mobile network operator names aren't shown, only id's
Source code
https://github.com/spegelius
Manifest and how to use:
Code:
mkdir aosp-src
cd aosp-src
repo init -u git://github.com/spegelius/manifests.git -b aosp-4.4
repo sync
source build/envsetup.sh
make otapackage
*needs some scripts fro there on, not yet in github, resulting zip cannot be flashed in CWM!*
Oh happy day. Will test ASAP. I really really want this to work as a daily driver.
Ver 0.5 uploading. Fixes:
- GPS works
- sdcards work
- mobile network icon shows H and H+
- Google cloud backup option unknown, doesn't work for me, but i haven't done clean install for latest
Ver 0.6 uploading. Fixes:
- 4.4.4_r2 (doesn't seem any changes so far...)
- Nfc seems to be on now
- Some overlays updated, check the commits here: https://github.com/spegelius/android_device_samsung_jactivelte/tree/aosp-4.4
- ? can't remember...
Seems quite solid so far. Hmm maybe have a look at L preview, eh?
I just try 0.6 dualboot ZIP and so far everything worked AS it should but in the aosp Rom im not able to install an apk. Die i Miss a major Detail in the dualboot threaf?
Gesendet von meinem GT-I9295 mit Tapatalk
olarf said:
I just try 0.6 dualboot ZIP and so far everything worked AS it should but in the aosp Rom im not able to install an apk. Die i Miss a major Detail in the dualboot threaf?
Gesendet von meinem GT-I9295 mit Tapatalk
Click to expand...
Click to collapse
Do you mean installink from apk file? For me it works fine, after you allow Unknow sources in security. I'm on dualboot also.
I expected this after the github commits
spegelius said:
Do you mean installink from apk file? For me it works fine, after you allow Unknow sources in security. I'm on dualboot also.
Click to expand...
Click to collapse
I allow unknown sources but can't install any apk. Therefore it is very uncomfortable to switch ROMs. Beside this I think a file browser could be good as basic part in the aosp build. Switching via cwm works fine so in general everything runs good expect from installing apks. Can it be a result from don't installing gaps on second ROM?
Gesendet von meinem GT-I9295 mit Tapatalk
olarf said:
I allow unknown sources but can't install any apk. Therefore it is very uncomfortable to switch ROMs. Beside this I think a file browser could be good as basic part in the aosp build. Switching via cwm works fine so in general everything runs good expect from installing apks. Can it be a result from don't installing gaps on second ROM?
Gesendet von meinem GT-I9295 mit Tapatalk
Click to expand...
Click to collapse
Well i'm trying to keep this as close as possible to stock AOSP, so only addition so far is the SuperSU. But a file browser of some kind would be good. Just don't know how it is with integrating an app from play store to ROM on legal side...
I actually don't know if installing an apk should be possible without gapps... could be, as there aren't any google play framework.
spegelius said:
Well i'm trying to keep this as close as possible to stock AOSP, so only addition so far is the SuperSU. But a file browser of some kind would be good. Just don't know how it is with integrating an app from play store to ROM on legal side...
I actually don't know if installing an apk should be possible without gapps... could be, as there aren't any google play framework.
Click to expand...
Click to collapse
you can include any app from from the play store as long as its free and you provide credits , i dont think there is a relation between sideloading apps and google framework , but could be google messing with its tail
spegelius said:
Well i'm trying to keep this as close as possible to stock AOSP, so only addition so far is the SuperSU. But a file browser of some kind would be good. Just don't know how it is with integrating an app from play store to ROM on legal side...
I actually don't know if installing an apk should be possible without gapps... could be, as there aren't any google play framework.
Click to expand...
Click to collapse
This is excellent! I finally was able to get time to install after your 4.3.1 AOSP. Please keep it clean AOSP. Nice to finally have a 4.4.4 rom that boots and will deep sleep. My last attempt was very frustrating, as updates broke things and I could not get any help with it. I'll throw another donation your way soon.
Yeah, vamilla AOSP is my aim with this one. If there's some modifications, i'll propably release a different version of the rom altogether, that way there's possibility to choose.
I think i'll include the Dualboot patcher app at least on the dualboot variants. That way it's easier to switch back to main rom. And maybe some free file manager app. I've been using ES File Manager myself.
Not being able to install apk is strange, it could be that there's some framework tidbit missing from vanilla AOSP and installing gapps installs it also. I'll need to test this some time. Also, i forgot to mention that the 0.6 has updated bionic from CM which caused recompile of most of the code and lot's of FC's before doing a clean installation.
Hello, how can i get\enable root for this rom?
6783 said:
Hello, how can i get\enable root for this rom?
Click to expand...
Click to collapse
Yes, SuperSU is included and working
spegelius said:
I actually don't know if installing an apk should be possible without gapps... could be, as there aren't any google play framework.
Click to expand...
Click to collapse
I run a pacrom (4.1.2 I think) for a while without gapps and installing APS was no problem. However this don't mean that it can be the reason in your clean aosp build as PAC is a full flavoured mix To embedded switcher app and file browser is a great idea anyway, make things more easy for dualboot user.
Gesendet von meinem GT-I9295 mit Tapatalk
Ver 0.7 up:
Updated SuperSU to 2.0.1
Updated su install scripts to match SuperSU CWM scripts (hopefully...)
Added ES FIle Explorer
Added DualBootPatcher ver 7.0.0 app
I try to install the dualboot Version but it fails!? Cwm told me that the ZIP file is not OK after beeing nearly ready. When i want to reboot then, cwm tell me that su is damaged and offer me to fix it. Then PAC boots Ingo Logo, stuck there and after switching it off and in it bootloops. So i flash PAC again and it was fine. Can there be something in the build or is my file maybe corrupt?
Gesendet von meinem GT-I9295 mit Tapatalk
olarf said:
I try to install the dualboot Version but it fails!? Cwm told me that the ZIP file is not OK after beeing nearly ready. When i want to reboot then, cwm tell me that su is damaged and offer me to fix it. Then PAC boots Ingo Logo, stuck there and after switching it off and in it bootloops. So i flash PAC again and it was fine. Can there be something in the build or is my file maybe corrupt?
Gesendet von meinem GT-I9295 mit Tapatalk
Click to expand...
Click to collapse
Strange, i flashed the 0.7 dualboot fine. Previous versions gave some errors because i was tweaking the updater-script to set proper permissions for su and other stuff + selinux context. You wouldn't happen to remember waht the error was? I'll have to check the zip that it has proper updater-script...
Edit: scripts are fine. I have a hunch that these lines are causing the problems:
Code:
run_program("/system/bin/toolbox", "chcon", "u:object_r:system_file:s0", "/system/bin/.ext/.su");
I remember seeing something similar when i was using newer CWM and tried to make a CWM script using older updater-scripts, some commands parameters were changed. Currently i'm on 6.0.4.7, you are propably running newer?
I'll remove those lines for now, su has been working ok without them in the past. Let's see how it goes...
I use 6.0.4.7 aswell. However, I will download it again after dinner, try again and if the error appear again, I will report it 100% exact. Thanks for taking a look into it!
Gesendet von meinem GT-I9295 mit Tapatalk

Categories

Resources