Rebuild required after changing xml layout files in Android Studio - Android Studio

I am developing in Android Studio.
There is a problem though. When I change the code and I run the app it works fine, But when i change something in the layout it does not change until i do a clean project. e.g. i add a button and run the app, the button does not exist but when i do a clean project it is there...
Even Android studio shows an error when accessing the id of the newly added view...
Please help me solve this problem. Any help would be much appreciated.
Additional information:
-Android Studio version: 1.3.1
-Operating system: windows
-Gradle version: 2.6
I am having multiple directories as my resources with gradle like this:
Code:
sourceSets{
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = ['src/main/java', '.apt_generated']
aidl.srcDirs = ['src/main/aidl', '.apt_generated']
res.srcDirs = [
'src/main/res',
'src/main/res/layouts/test',
'src/main/res/layouts/login',
'src/main/res/layouts/main',
'src/main/res/layouts/includes'
]
}
}
When i try to run the project with changed layout it says:
No apk changes detected. Skipping file upload, force stopping package instead.
DEVICE SHELL COMMAND: am force-stop com.my.package
Click to expand...
Click to collapse

saeednt said:
I am developing in Android Studio.
There is a problem though. When I change the code and I run the app it works fine, But when i change something in the layout it does not change until i do a clean project. e.g. i add a button and run the app, the button does not exist but when i do a clean project it is there...
Even Android studio shows an error when accessing the id of the newly added view...
Please help me solve this problem. Any help would be much appreciated.
Additional information:
-Android Studio version: 1.3.1
-Operating system: windows
-Gradle version: 2.6
I am having multiple directories as my resources with gradle like this:
Code:
sourceSets{
main {
manifest.srcFile 'src/main/AndroidManifest.xml'
java.srcDirs = ['src/main/java', '.apt_generated']
aidl.srcDirs = ['src/main/aidl', '.apt_generated']
res.srcDirs = [
'src/main/res',
'src/main/res/layouts/test',
'src/main/res/layouts/login',
'src/main/res/layouts/main',
'src/main/res/layouts/includes'
]
}
}
When i try to run the project with changed layout it says:
Click to expand...
Click to collapse
Look, there are couple of things you should see,
first when you make changes you should save it every time when you make changes in it
go over all the functions you created and make sure they are wire up correctly and they should not get separated when you make changes, App location can be a problem as well, go over from your code couple of times you will find out the issue because its in your hand

Related

Theme Chooser themes, Windows, aapt, and uppercase letters in XML filenames

EDIT: A solution has been found, courtesy of XDA member titanic_fanatic, who compiled a Windows version of aapt that accepts uppercase letters in XML filenames! (Read his original message here.) I've attached it to this post. One of the biggest hurdles to effective theme creation in Windows is finally solved!
----------------------------------------------------------------------------------------​
Forgive me if this has already been asked, but I know that it's something that's annoyed theme developers under Windows for a while now. I seem to recall seeing hints about fixing this, but I've done search after search, and can't find it to save my life.
Theme Chooser theme developers under Windows are hobbled by the fact that XML filenames can't contain uppercase letters, which prevents us from theming certain applications (example: com_keramidas_TitaniumBackup.xml would be needed for Titanium Backup). I know that this is a problem related to aapt.exe. Has anyone come up with a workable solution for this issue? If not, I'd like to take a crack at it. I might not get anywhere, but I have nothing to lose.
Obviously, in order to do this, I'll need the source for it. I can do the heavy lifting regarding getting the source and working out how to compile it for Windows, but I need to know where the source is, what to get, and other requirements. If anyone can help and point me in the right direction(s), I'd really appreciate it!
MJPollard said:
Forgive me if this has already been asked, but I know that it's something that's annoyed theme developers under Windows for a while now. I seem to recall seeing hints about fixing this, but I've done search after search, and can't find it to save my life.
T-Mobile/CM7 theme developers under Windows are hobbled by the fact that XML filenames can't contain uppercase letters, which prevents us from theming certain applications (example: com_keramidas_TitaniumBackup.xml would be needed for Titanium Backup). I know that this is a problem related to aapt.exe. Has anyone come up with a workable solution for this issue? If not, I'd like to take a crack at it. I might not get anywhere, but I have nothing to lose.
Obviously, in order to do this, I'll need the source for it. I can do the heavy lifting regarding getting the source and working out how to compile it for Windows, but I need to know where the source is, what to get, and other requirements. If anyone can help and point me in the right direction(s), I'd really appreciate it!
Click to expand...
Click to collapse
Hmm .. + 1 with you .. but the only way is ... ask brut.all ....
Sent from my Galaxy Nexus using XDA App
qazsxdcfv said:
Hmm .. + 1 with you .. but the only way is ... ask brut.all ....
Click to expand...
Click to collapse
Thanks, I guess I'll have to after all (not that I mind doing it). Over 250 views and only one person to respond isn't giving me much hope that someone has an answer.
Have you found a solution for windows ?
Any solution?
Randomly came across this thread looking for info on compiling the aapt binary for Windows. I'm still looking for the answer for that but I do know the change that needs to be made and how to do that part, as I have already done this mod for aapt on Linux. You have to have a full build environment set up, and by that I mean set up to build a full ROM, like CM10 for example. The change to make is in the frameworks source code at frameworks/base/tools/aapt/Resource.cpp.
See this commit for the details:
http://review.cyanogenmod.org/#/c/24204/
Add the parts I highlighted in blue to the two lines below:
Code:
String16 baseName(it.getBaseName());
const char16_t* str = baseName.string();
const char16_t* const end = str + baseName.size();
while (str < end) {
if (!((*str >= 'a' && *str <= 'z')
[COLOR="RoyalBlue"][B]|| (*str >= 'A' && *str <= 'Z')[/B][/COLOR]
|| (*str >= '0' && *str <= '9')
|| *str == '_' || *str == '.')) {
fprintf(stderr, "%s: Invalid file name: must contain only [a-z[COLOR="RoyalBlue"][B]A-Z[/B][/COLOR]0-9_.]\n",
it.getPath().string());
hasErrors = true;
}
str++;
}
m4570d0n said:
Randomly came across this thread looking for info on compiling the aapt binary for Windows. I'm still looking for the answer for that but I do know the change that needs to be made and how to do that part, as I have already done this mod for aapt on Linux. You have to have a full build environment set up, and by that I mean set up to build a full ROM, like CM10 for example. The change to make is in the frameworks source code at frameworks/base/tools/aapt/Resource.cpp.
See this commit for the details:
http://review.cyanogenmod.org/#/c/24204/
Add the parts I highlighted in blue to the two lines below:
Code:
String16 baseName(it.getBaseName());
const char16_t* str = baseName.string();
const char16_t* const end = str + baseName.size();
while (str < end) {
if (!((*str >= 'a' && *str <= 'z')
[COLOR="RoyalBlue"][B]|| (*str >= 'A' && *str <= 'Z')[/B][/COLOR]
|| (*str >= '0' && *str <= '9')
|| *str == '_' || *str == '.')) {
fprintf(stderr, "%s: Invalid file name: must contain only [a-z[COLOR="RoyalBlue"][B]A-Z[/B][/COLOR]0-9_.]\n",
it.getPath().string());
hasErrors = true;
}
str++;
}
Click to expand...
Click to collapse
Thank you for your help but could you tell me where can I find frameworks/base/tools/aapt/Resource.cpp?
I don't understand where to find it?
Sorry to resurrect an old thread, but I've finally come across a Windows version of aapt.exe that accepts uppercase letters in XML filenames, courtesy of XDA user titanic_fanatic. I've modified the first post in the thread with the details. Happy theming!
MJPollard said:
Sorry to resurrect an old thread, but I've finally come across a Windows version of aapt.exe that accepts uppercase letters in XML filenames, courtesy of XDA user titanic_fanatic. I've modified the first post in the thread with the details. Happy theming!
Click to expand...
Click to collapse
That link does seem to work anymore (and the webpage gives malware warning in Norton).
Does anyone else have this file?

[TOOL][MIUI] Lockscreen-Debugger

Hello everyone,
I hope this is the right forum. Wanted to post in dev-forum, but not sure if I may or not...
Anyway: I want to introduce my latest MIUI project.
Current working name is "ls debugger". Suggestions are welcome
For downloads, changelog and bugs have a look at post #2
Description:
I found the hole LS testing progress (edit, zip, usb mount, copy, apply, ...) annoying, so I started this program.
It is still in beta state. There are still some errors or force closes because I haven't implemented all error check functions.
The reason why I started this thread now, is that I want some feedback and maybe new ideas and suggestions.
Requirements:
- Java Runtime Version 7
- (MIUI Lockscreen for 2.3 based builds) Don't know if v4 LS will work. Test and tell me
Instructions:
The usage is really simple.
After unzipping the file you'll have 5 files/folders:
- advanced (folder)
- wallpaper (folder)
- MIUI-LS-Tester.jar (executable)
- bgtWeather.db (9sweather db-file)
- systemCPs.db (calls, texts, contacts for ContentProviders [not finished])
You can replace the wallpaper and advanced folder with your own, but no guarantee that it will work.
Some features aren't implemented (unlocker and variables of elements. e.g.: #unlocker.move_x)
Have a look at the given manifest file and you'll see what will work and what won't.
You can start the program with doubleclick the 'MIUI-LS-Tester.jar' or open a terminal, move to the location where you've extracted the zip file and type:
Code:
java -jar MIUI-LS-Tester.jar
In the terminal you will get some information about the parsing and other informations.
At first a window with 2 textfields appears. In this you have to set the width and height of your lockscreen.
If you have a config.xml file you can set the variables on the right side in the "config.xml" tab (after a click on 'Preview').
To get a preview you have to open your manifest.xml and click on 'Preview'.
Also you can choose another font.
After a click on 'Preview' you'll get 3 more buttons.
Screenshot:
I think it's clear what this buttons will do
It saves a screenshot of the left panel in <MIUI-LS-Tester.jar-Location>/preview/lockscreen_preview_x.jpg
create mtz:
this will create a mtz file.
After a click you can choose some things. Add your font, wallpaper, previews...
Afterwards you can create/modify the description.xml file
Thats it
toggle buttons:
this will toggle the Trigger-Buttons.
Because they are not visible in your lockscreen you can do this with this button.
On the top of the right panel you can set some variables.
I think it's clear, so no description.
If you modified your manifest.xml (and the ls debugger is still open) just click on preview and the changes will be loaded.
Credits:
my brother: for helping me with the "calculator"
picard666: for some help and suggestions
jdom team: for the best java xml parser.
jfont-chooser team and david from stackoverflow: for the fontchooser.
zentus: for the sqlite lib.
pomenx: from the miui team for manifest reference thread @ xda.
GNU: for their java port of getopt
songd for the java pre processor
regards
-v1r0x
Download:
December 30, 2012
LS-Debugger alpha b121230.1
October 31, 2012
LS-Debugger alpha b121030.2
October 24, 2012
LS-Debugger alpha b121024
June 19, 2012
LS-Debugger alpha 4
April 28, 2012
LS-Debugger alpha 3
April 24, 2012
LS-Debugger alpha 2
March 27, 2012
LS-Debugger alpha
Changelog:​
Text,DateTime and Image implemented
ToolTip-Text for Text, DateTime and Image (displays the given name of the element)
ElementGroup implemented
VarArrays implemented
ContentProvider for weather apps implemented (only 9s-weather)
ContentProvider for calls/texts implemented (db-file included)
FontChooser implemented
category-attribute implemented (only for Text at this time)
rotate and AA works for Image, Text and DateTime
screen_width/_height has to be set on start
the last dir will be stored in a file. No annoying dir-changing
implemented "where" for ContentProvider => mistake in the db-file (fixed on next update)
added an option for a background image (stored in folder "wallpaper" like on miui)
fixed the db-file
rotate Text/Image (re-set bounds)
By hitting the button 'Screenshot' a screenshot will be stored in folder 'preview' (Button appears after hitting 'Preview')
parse Time-Tag
Button to create a zip/mtz file
create a description.xml (after hit the zip button)
Added checkboxes to (de)select wallpaper, preview-folder and font for the mtz file
review the config-file
=> width, height, path and font will be stored
review create/modify of the description.xml
only digits are allowed for some textfields (width/height and texts/calls)
=> no annoying checks and/or errors
config.xml
NumberChoice
NumberInput
StringChoice
StringInput
CheckBox
MusicControl
Image (without 'music_album_cover')
Text (without 'music_display')
parse (normal) Buttons (not MusicControl)
Added a scrollbar for low screen resolutions
minor fixes
added a button which shows system- and program-information (for debugging). It's the quadratic button on the bottom left corner of the control-panel
added more output information (creating the mtz file will give more output)
fixed a font bug (if the font wasn't a ttf the program crashed)
added a splash screen
updated to Java 7
New Fixes (October 31, 2012):
Drag&Drop support for manifest.xml file
push mtz via adb (note: don't forget to set right path in "File" menu!!!)
added a "?"/help/about menu
added command line args support. (-dx is the debug level. 0 means only errors, 1 more, 2 more than 1 and 3 full debug. -f <file-path> so you don't have to set it everytime using the menu. -s to hide splash, -S to enable splash [default])
cleaned up the code
description.xml modding can now be done in a tab and not only while creating the mtz
"live" support. You can change font, battery state/level, messages, sms/texts without hit "preview" again
DateTime and Text supported in live-feature (the one above)
bug fixes of latest features
new layout of the control center, including the button section (the don't "popup" anymore.)
Bugs/Not yet implemented:​Important:
parse variable-elements (e.g. #unlocker.move_x)
parse Unlocker
parse MusicControl
Buttons
MusicControl overlays triggers
parse config.xml => only AppPicker left
parse animations
Update variables during runtime (primarily for unlocker and animations) [10% done!]
Secondary:
complete DateTime attributes
complete Text attributes
complete Image attributes
connect db-Files for every weather app
complete v4 support
refactor code
I have a request:
I want to include as much as possible weather-provider and/or other contentprovider.
So, here my request:
If you want to support and help me and this program, please post an App with ContentProvider and a modified db-File + the ContentProviderBinder uri.
I hope someone helps.
-v1r0x
Not able to see the full view
v1r0x said:
Hello everyone,
I hope this is the right forum. Wanted to post in dev-forum, but not sure if I may or not...
Anyway: I want to introduce my latest MIUI project.
Current working name is "ls debugger". Suggestions are welcome
Description:
I found the hole LS testing progress (edit, zip, usb mount, copy, apply, ...) annoying, so I started this program.
It is still in beta state. There are still some errors or force closes because I haven't implemented all error check functions.
The reason why I started this thread now, is that I want some feedback and maybe new ideas and suggestions.
Requirements:
- Java Runtime
Instructions:
The usage is really simple.
After unzipping the file you'll have 5 files/folders:
- advanced (folder)
- wallpaper (folder)
- MIUI-LS-Tester.jar (executable)
- bgtWeather.db (9sweather db-file)
- systemCPs.db (calls, texts, contacts for ContentProviders [not finished])
You can replace the wallpaper and advanced folder with your own, but no guarantee that it will work.
Some features aren't implemented (unlocker and variables of elements. e.g.: #unlocker.move_x)
Have a look at the given manifest file and you'll see what will work and what won't.
You can start the program with doubleclick the 'MIUI-LS-Tester.jar' or open a terminal, move to the location where you've extracted the zip file and type:
Code:
java -jar MIUI-LS-Tester.jar
In the terminal you will get some information about the parsing and other informations.
At first a window with 2 textfields appears. In this you have to set the width and height of your lockscreen.
If you have a config.xml file you can set the variables on the right side in the "config.xml" tab (after a click on 'Preview').
To get a preview you have to open your manifest.xml and click on 'Preview'.
Also you can choose another font.
After a click on 'Preview' you'll get 3 more buttons.
Screenshot:
I think it's clear what this buttons will do
It saves a screenshot of the left panel in <MIUI-LS-Tester.jar-Location>/preview/lockscreen_preview_x.jpg
create mtz:
this will create a mtz file.
After a click you can choose some things. Add your font, wallpaper, previews...
Afterwards you can create/modify the description.xml file
Thats it
toggle buttons:
this will toggle the Trigger-Buttons.
Because they are not visible in your lockscreen you can do this with this button.
On the top of the right panel you can set some variables.
I think it's clear, so no description.
If you modified your manifest.xml (and the ls debugger is still open) just click on preview and the changes will be loaded.
Credits:
my brother: for helping me with the "calculator"
picard666: for some help and suggestions
jdom team: for the best java xml parser.
jfont-chooser team and david from stackoverflow: for the fontchooser.
zentus: for the sqlite lib.
pomenx: from the miui team for manifest reference thread @ xda.
regards
-v1r0x
Click to expand...
Click to collapse
Hi , thx to tis application i able to cutomize my ls easier..
bt wad i encounter is...once i run the application i might not able to see the full view of it...
my laptop resolution are 1200 x 800
i tried change the resolution to LS resolution to 480 X 500 and i maximized the application window it still the same...
any idea ???
Uploaded with ImageShack.us
thanks for your reply.
My resolution is 1920x1200, so I forgot to check other resolutions.
I'll try it later on another screen resolution and upload an updated version.
v1r0x said:
thanks for your reply.
My resolution is 1920x1200, so I forgot to check other resolutions.
I'll try it later on another screen resolution and upload an updated version.
Click to expand...
Click to collapse
Thanks alot man...it will be nice if all resolution can be supported...
i am waiting for it
v1r0x said:
Hello everyone,
I hope this is the right forum. Wanted to post in dev-forum, but not sure if I may or not...
Anyway: I want to introduce my latest MIUI project.
Current working name is "ls debugger". Suggestions are welcome
Description:
I found the hole LS testing progress (edit, zip, usb mount, copy, apply, ...) annoying, so I started this program.
It is still in beta state. There are still some errors or force closes because I haven't implemented all error check functions.
The reason why I started this thread now, is that I want some feedback and maybe new ideas and suggestions.
Requirements:
- Java Runtime
Instructions:
The usage is really simple.
After unzipping the file you'll have 5 files/folders:
- advanced (folder)
- wallpaper (folder)
- MIUI-LS-Tester.jar (executable)
- bgtWeather.db (9sweather db-file)
- systemCPs.db (calls, texts, contacts for ContentProviders [not finished])
You can replace the wallpaper and advanced folder with your own, but no guarantee that it will work.
Some features aren't implemented (unlocker and variables of elements. e.g.: #unlocker.move_x)
Have a look at the given manifest file and you'll see what will work and what won't.
You can start the program with doubleclick the 'MIUI-LS-Tester.jar' or open a terminal, move to the location where you've extracted the zip file and type:
Code:
java -jar MIUI-LS-Tester.jar
In the terminal you will get some information about the parsing and other informations.
At first a window with 2 textfields appears. In this you have to set the width and height of your lockscreen.
If you have a config.xml file you can set the variables on the right side in the "config.xml" tab (after a click on 'Preview').
To get a preview you have to open your manifest.xml and click on 'Preview'.
Also you can choose another font.
After a click on 'Preview' you'll get 3 more buttons.
Screenshot:
I think it's clear what this buttons will do
It saves a screenshot of the left panel in <MIUI-LS-Tester.jar-Location>/preview/lockscreen_preview_x.jpg
create mtz:
this will create a mtz file.
After a click you can choose some things. Add your font, wallpaper, previews...
Afterwards you can create/modify the description.xml file
Thats it
toggle buttons:
this will toggle the Trigger-Buttons.
Because they are not visible in your lockscreen you can do this with this button.
On the top of the right panel you can set some variables.
I think it's clear, so no description.
If you modified your manifest.xml (and the ls debugger is still open) just click on preview and the changes will be loaded.
Credits:
my brother: for helping me with the "calculator"
picard666: for some help and suggestions
jdom team: for the best java xml parser.
jfont-chooser team and david from stackoverflow: for the fontchooser.
zentus: for the sqlite lib.
pomenx: from the miui team for manifest reference thread @ xda.
regards
-v1r0x
Click to expand...
Click to collapse
Hi is me again...
i successfully create a lockscreen...and transfer it to my phone...bt the lockscreen i create was found at "Theme" instead of "Lockscreen Style" and when i applied the lockscreen that found at "Theme" my theme was revert to original MIUI Theme...
is it i missed out sumthing ?
http://db.tt/CyvDqJy9
Please don't quote the complete post
Did you use the "create mtz" of my program?
because there is something really wrong.
Instead a font- and preview-folder there are files named:
Fonts\Arial.ttf
and
preview\preview_lockscreen...
I'll have a look at it later. I'm not at home and have no choice for testing and debugging.
v1r0x said:
Please don't quote the complete post
Did you use the "create mtz" of my program?
because there is something really wrong.
Instead a font- and preview-folder there are files named:
Fonts\Arial.ttf
and
preview\preview_lockscreen...
I'll have a look at it later. I'm not at home and have no choice for testing and debugging.
Click to expand...
Click to collapse
Oppps...Sorry...
ya...i using yr way to create it..
the Font\Arial.ttf exist - i using other font for my LS.
the preview\preview_lockscreen exist - i "Screenshot" 1st den only i "Create mtz"
Alright..spent quite a long time on tht LS...hope it can be applied successfully ^^
kezn715 said:
Hi , thx to tis application i able to cutomize my ls easier..
bt wad i encounter is...once i run the application i might not able to see the full view of it...
my laptop resolution are 1200 x 800
i tried change the resolution to LS resolution to 480 X 500 and i maximized the application window it still the same...
any idea ???
Click to expand...
Click to collapse
ok, i've added a scrollbar which hopefully solve your problem
kezn715 said:
Oppps...Sorry...
ya...i using yr way to create it..
the Font\Arial.ttf exist - i using other font for my LS.
the preview\preview_lockscreen exist - i "Screenshot" 1st den only i "Create mtz"
Alright..spent quite a long time on tht LS...hope it can be applied successfully ^^
Click to expand...
Click to collapse
I've tested it and can't reproduce it
On my system the folders created correct.
But i've found a little bug. If no preview-folder exists or the default font is used (if you haven't choosen one with "File>Select Font") the creation of the mtz crashes but the program didn't close. So make sure everything exists.
Can you tell me which OS you use? Maybe its a bug of an older windows version and/or linux, mac.
Also, did you tried to start the program in a terminal/cmd/console and checked the output?
If not and you'll get errors while creating the mtz (and you've checked the things in the red marked paragraph), then send me the output of the program and your ls. So I can do some tests.
I don't really understand what this program does. Sorry. Does this program preview any miui ls or what does it do?
Sent from my Galaxy Nexus using Tapatalk 2
cowsquad said:
I don't really understand what this program do. Sorry. Does this program preview any miui ls or what does it do?
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Yes, it preview a miui ls, so you don't have to zip, flash and install it for testing.
Or if you only want a preview (if no preview img exists)
Also it can create a mtz file, description.xml file and include font, wallpaper and/or preview.
And you can create screenshots.
At first I only wanted a preview function, but over the time it got more functions and if I have enough time and fun I'll maybe extend it to an complete ls-builder
Thanks For Updated !!!
i will give it a try later and back to u again..
i download the
April 23, 2012
LS-Debugger alpha2
http://minus.com/mru3I60gz/1f
bt seems like there is no scrollbar ?
There should be a scrollbar if the LS (or the Control Panel) is larger than your screen resolution.
Maybe you have to maximize the program window (only in width) to see the scrollbar.
I'm new to java gui programming, so maybe I will find a better method for this
edit: @kezn715: can you tell me which operating system you use? Could be a OS problem
edit2: I've changed something on the scrollbar (no big thing, just resized the window) and added a new button which give some information about the running program. At this time only information about the windows (width and height). I will add some more useful information in the future
v1r0x said:
There should be a scrollbar if the LS (or the Control Panel) is larger than your screen resolution.
Maybe you have to maximize the program window (only in width) to see the scrollbar.
I'm new to java gui programming, so maybe I will find a better method for this
edit: @kezn715: can you tell me which operating system you use? Could be a OS problem
edit2: I've changed something on the scrollbar (no big thing, just resized the window) and added a new button which give some information about the running program. At this time only information about the windows (width and height). I will add some more useful information in the future
Click to expand...
Click to collapse
Hmm...is it necessary to use the default font for the LS ?
using win 7 (32 bit)
---------- Post added at 09:18 PM ---------- Previous post was at 09:09 PM ----------
kezn715 said:
Hmm...is it necessary to use the default font for the LS ?
using win 7 (32 bit)
Click to expand...
Click to collapse
I already maximized the window...still cant find the scroll bar
[/URL] Uploaded with ImageShack.us[/IMG]
kezn715 said:
Hmm...is it necessary to use the default font for the LS ?
using win 7 (32 bit)
Click to expand...
Click to collapse
no, you can use every font you want. But if you don't choose one and create the mtz including the font, it will throw an exception
kezn715 said:
I already maximized the window...still cant find the scroll bar
Click to expand...
Click to collapse
i don't know whats the problem.
If I create an LS with w:480 and h:1800 my LS-Tester window has about 1100px height and with a scrollbar I can scroll down the 1800px.
But it seems not to be a OS related problem
The program shouldn't create a window which is larger than your screen resolution.
Edit: ok, maybe I found the problem.
Replace your MIUI-LS-Tester.jar with the attached file and test. Did this fix the problem?
v1r0x said:
no, you can use every font you want. But if you don't choose one and create the mtz including the font, it will throw an exception
i don't know whats the problem.
If I create an LS with w:480 and h:1800 my LS-Tester window has about 1100px height and with a scrollbar I can scroll down the 1800px.
But it seems not to be a OS related problem
The program shouldn't create a window which is larger than your screen resolution.
Edit: ok, maybe I found the problem.
Replace your MIUI-LS-Tester.jar with the attached file and test. Did this fix the problem?
Click to expand...
Click to collapse
Haha...Finally the scroll bar is there !!! Thx alot man...
So wad is the problem for the LS that i made .... any idea ?
what exactly do you mean?
the mtz output file?
I don't know what's wrong there.
You could check, after the mtz is created, if there is a "fonts" or "preview" folder in the same folder where the MIUI-LS-Tester.jar is located.
If not, there's maybe a bug in the File.seperator of java.
So tell me what you got
v1r0x said:
what exactly do you mean?
the mtz output file?
I don't know what's wrong there.
You could check, after the mtz is created, if there is a "fonts" or "preview" folder in the same folder where the MIUI-LS-Tester.jar is located.
If not, there's maybe a bug in the File.seperator of java.
So tell me what you got
Click to expand...
Click to collapse
Alright...i will give it a try...and sorry for being late reply...cuz i being buzy with presentation thing...
will update here once i tried it...
No problem
I've another idea: which java version do you use?
Maybe they changed something in java 7 or your version is too old

Creating xslx.-File in Android

Hi Guys,
I want to create a xslx-File in my Android Application. Im Using Apache poi-ooxml-3.12.jar for it. But while calling the XSSFWorkbook Constructor I get the following exception:
FATAL EXCEPTION: main
Code:
java.lang.VerifyError: org/apache/poi/xssf/usermodel/XSSFWorkbook
This is my Code (HSSFWorkbook Constructor is working btw):
Code:
Workbook workbook;
if (StringOperationsUtil.getFileExtension(file).equalsIgnoreCase("XLSX")){
workbook = new XSSFWorkbook();
} else {
//default xls
workbook = new HSSFWorkbook();
}
These are my gradle dependencies:
Code:
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.opencsv:opencsv:3.4'
compile 'org.apache.poi:poi:3.12'
compile 'org.apache.poi:poi-ooxml:3.12'
compile 'com.android.support:multidex:1.0.0'
}
Also the apache team didn't answer me. I can't believe that it's not possible to create the newest excel file in an android application. Does really any Android Developer is not using xlsx files? I really can't believe this. Please let me know, if you guys know something about that issue.
Thanks in advance!
I tried to use the older poi.jar 3.8 and now i get this error:
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
G:\android-sdk\build-tools\21.1.2\dx.bat --dex --no-optimize --multi-dex --main-dex-list G:\Development\workspace\FPT\app\build\intermediates\multi-dex\debug\maindexlist.txt --output G:\Development\workspace\FPT\app\build\intermediates\dex\debug --input-list=G:\Development\workspace\FPT\app\build\intermediates\tmp\dex\debug\inputList.txt
Error Code:
1
does anybody know how i fix this?
thanks

[GUIDE][INDEX]How to modify an apk

How to modify an apk​
Intro:
I’ve done several threads about how to theme and other similar topics but the info is sparse, so this ultimate guide/index will seat proudly in the theme section of XDA and will be updated when new things come, and as I learn more. This isn’t a beginners guide, I’m here trying to be as complete as possible, with links, references, ...
This initial version of the thread isn't here to stay, if you could contribute to this thread, it would mean the world to me, and would clearly help the community (of course I'll mention you for your contribution )
And keep at mind that I’m just an enthusiast, nothing more, and that this thread has been made only by me, so it's far from perfect. If I made any mistakes or if you want to add something please let me know.
Legal aspect:
Using this knowledge to infringe copyright is not only illegal, it’s detrimental to the community. The only legal case, and the only usage of this info condoned, is using it to theme OPEN SOURCE apps (because most of the time, commercial apps forbid reverse engineering in their policies). So don’t worry, theming AOSP is legal. You can always ask the permission of the devs for an authorization to customize their apps, make sure to ask before modding, and distributing the result.
Now I’m not a lawyer, but you can learn more on the legal aspect of reverse engineering on this Stackexchange post.
Summary of this thread:
I-Requirements
II-Download APKs
III-Decompile
IV-What and how to modify
V-Recompile
VI-Sign and Zipalign
VII-Installing the apk
VIII-Other ways to theme your device
IX-Theming related topics
X-Not covered topics
XI-Mods Center
XII-Reserved​
I-Requirements​
A)Java:
It's essential, almost mandatory, the Java Development Kit (JDK) and Java Runtime Environment (JRE) must be installed to use java based tools.
How to install the JDK and JRE
(download and follow the instructions, it’s pretty simple)​
Then, set the path to "java home", you need to do that in order to use java properly within your terminal:
Here’s a tutorial I found​
To check if everything is okay, open a terminal anywhere and enter java --version. If it returns the version of the JDK and JRE you’re good.
B)Android SDK:
Unfortunately we aren’t able to download the Android SDK alone anymore, I used to consider it as a requirement, but now I don’t because some people don’t have the space to install the whole Android Studio IDE just to use the Android SDK.
C)Others:
I suppose that list is going to expand, those two above are the main ones, but if there's something else you need, I'll make sure to put it here
II-Download APKs​
This sounds stupid to take one whole post for that, but sometimes it’s a drag, so here are some ways you can grab the apk you want to modify.
A)APKs form your phone:​Every app you installed from the playstore is under /data/app. With a root explorer like the excellent MiXplorer, you can browse to it and see the icons representing the apps on your phone.
There is an apk called base.apk, that’s the one you want.
Sometime there might be parts called split_....apk along with base.apk, for the excraction of those you’ll need tools like the amazing app called SAI (Split APK Installer), it’s a graphical interface so I’ll assume you’ll figure out how to use it yourself
SAI on the Play Store​
B)From internet:​My two trusted sources I use: APK Mirror, XDA Labs (gone for now)
I also use this chrome module, it has simplified my life sooooo much, it’s provided by the APKmirror team: Toolbox for Google Play Store™
C)Your Sources:​If I missed any good and trusted website, let me know
III-Decompile​This is getting serious now.
If you want to modify the apk, you need to have what’s inside: the code.
A)Resources: Decompile Binary XMLs to Human-Readable XMLs:​We use APKtool for that, it decompiles the resources.arsc file to the res folder, and decodes binary XMLs to human-readable XMLs.
1-How to install APKtool:​How to install APKtool​
2-How to use APKtool:​There are 3 main commands you need to know about:
apktool d [nameoftheapk].apk​Used to decompile the apk. There are several options you can use with that command, they're specified in APKtool's documentation (in the credits).
apktool if [nameoftheframework].apk​Used to set the framework files to decompile properly APKs. Usually some OEMs add framework APKs into Android for their apps to work, so we need to find and copy them, then “install” them with the apktool if command to APKtool. You can learn more about that on APKtool's website (in the credits).
apktoool b [nameoftheapk].apk​Used to recompile the apk. The final apk can be found inside the decompiled apk’s folder, in a subfolder named dist. You can also use various options with that command (listed in the documentation, link in the credits).
B) Decompile Classes.dex to smali:​APKtool also convert classes.dex files to .smali files, but keep at mind that you won’t be able to see the java source code in those files.
The .dex extention is for Dalvik Executable, which is very self-explanatory, and is also a binary format. APKtool turn them into .smali files, which are Human-readable files, not in java, but still! And if you want to modify the code, you’ll have to learn smali. (covered in the next part, good luck with that lol)
C)Read java source code :​There’s actually a way to see the java source code of an Android app, using some tools:
JD-GUI (or any other java decompiler)
Dex2jar
First turn the classes.dex files into .jar files with this command using Dex2jar:
./d2j-dex2jar.sh -f -o output_jar.jar apk_to_decompile.apk​
(Execute the .bat if you’re on windows)
Quick explanation:
./d2j-dex2jar.sh: execute the dex2jar script
-f: replace the previous jar file named the same as output_jar.jar
-o output_jar.jar : set a name to the output jar file
apk_to_decompile.apk: name of the apk file you’re taking care of
Then read the jar file using JD-GUI (or any other java decompiler). It’s a quite simple software, lite weight, and you can download and run the java version without installing anything else.
Dex2jar isn’t updated anymore (since 2015), so there are errors when decompiling. You’ll be able to get a .jar file but it’ll be incomplete or not identical to the original one, that’s why this tool doesn’t allow one to modify java source directly. But you can get a great understanding of how this app works.
C) Nice tools from the XDA community:​• Tickle My Android (TMA) by @Ticklefish
A tool that ease the work with APKtool, amazing one!
• APK Easy Tool by @evildog1
Also works with APKtool, I don’t use it often, but it is great!
• Other tools:
Let me know
Credits, links for this part:
Stack Overflow Post
Documentation for APKtool
Another SO Post
@Rizal Lovins ’
" [Share Latest Apktool 4.2.2/Guide/Tutorial/] How to Decompile/Compile/Sign Apk/Jar "
@A_U ’s
" [GUIDE][HOW-TO] Decompile and Compile apps using Apktool in 5 Simple Steps "
IV-What and how to modify​This part is gigantic, I'll try to include as much link as I can, this part isn't supposed to stay like that very long, as it contains very few of the hundreds of guide about theming in XDA. Help me out by suggesting some links.
​A)Resources (XML):​​1-Tools​To edit XMLs you can use whatever text editor you want, but I’d recommend Visual Studio Code. It has solid plug-ins that may come handy to avoid mistakes when editing.
You can also sort of visualize XMLs with Android Studio's Layout Inspector.
You have to open the apk’s folder in Android Studio and browse to the desired xml. Opening the resource manager will aslo allow you to visualize the XML files to a certain extent, but it's not cristal clear (see the screenshot) so I don’t use that very often, but it’s good to know.
Spoiler: Screenshot
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2-What’s xml​This subject is very long, you can learn a lot of things. Here are some links (increasingly detailed) to learn about XML:
A Post in [GUIDE] Want to learn how to theme? by @theimpaler747
Google’s "Guide" (very complete): that google link is about resources in general, so it explains XMLs but not only XMLs
A Reference for Codenames in XMLs
3-Modifications:​You can modify deeply the UI by editing XMLs, here are some guides to make you familiar with some techniques. Again this is a very vast field, it deserve a thread itself, and this list clearly isn"t finished. Here are my favourites ones:
XML 101 by @Ticklefish
[GUIDE][RES] Android Animation XML resources for Activity Transition by @niranjan94
Find the code you want to modify by @Raiz (Me lol)
[TUTORIAL] Where to find the colors for making a theme by @KBanause
[TUT][JB] HOW TO THEME SystemUI.apk for TOTALLY newbie! by @joehanh88
[Reference] Interactive Phone Modification [GUIDE] by @pstevep , this is AN ABSOLUTE UNIT OF INDEX!
[Tutorial][APP] PinP Shortcuts | How to Implement Picture in Picture Mode [API 26+] by @Geeks Empire
[Overlay] Enable Night Light, Auto-Brightness, Ambient Display & more on Treble ROM by @MishaalRahman
Let me know
4-Precaution:​When modifying apks, some errors can be very frustrating, yet very easy to fix. Here are some usual cause of struggle:
Not properly set JAVA_HOME
The tools used (like apktool.jar) aren’t chmod +x (aren’t allowed to be executed)
You have to add java -jar [command] before every .jar tools commands for it to run
Tell me, don't be shy
For every tool related bug, please refer to their GitHubs, sometimes you’ll find a solution by searching. And XDA threads are also plenty of answers! (and if you’re really not lucky maybe stack overflow can help).
B)Smali:​That’s a tough one. First, if you want my advice, editing them with Visual Studio Code and the smali plugin is way easier to find mistakes. There’s also a smali plugin for Android studio (and IntelliJ based IDE) made by Jesus-Freke, it is called smalidea.
Now I found one reaaallllyy awesome thread here on XDA about smali:
[GUIDE][SMALI]Understanding and Creating Smali Mods & General Smali Questions by @Goldie
Something else maybe? Tell me
This is my reference, I’m still learning smali tho, this list may be updated, but this thread is pure gold, go check it out!
Credit for this part:
Resources:
@Ticklefish , for XML 101 (but also for TMA), this is really one of my favourite thread on XDA
All the other members mentioned in the above list
Smali:
@Jesus-Freke , for his work on smali, baksmali (integrated in APKtool) and smalidea
@Goldie , for the amazing thread explaining smali
V-Recompile​You've done the hardest part, now what's left is repacking that thing together.
A)How to recompile:​It’s pretty simple, do it with apktool with this command:
apktool b [nameoftheapk].apk​You can add several options, here’s the full list.
The -c option to me is the most useful, because it allows to leave the signature unchanged for system apks. It’ll be deprecated soon (APKtool v2.6.0), so you’ll have to do the trick manually.
What -c (--copy-orginal) does: “Copies original AndroidManifest.xml and META-INF folder into built apk. Scheduled for deprecation.”
A bit of details, good to know:
“META-INF contains apk signatures. After modifying the apk it is no longer signed. You can use -c / --copy-original to retain these signatures. However, using -c uses the original AndroidManifest.xml file, so changes to it will be lost.”
And
“After [d]ecode, there will be new folders (original / unknown) in the decoded apk folder
original = META-INF folder / AndroidManifest.xml, which are needed to retain the signature of apks to prevent needing to resign. Used with -c / --copy-original on build
unknown = Files / folders that are not part of the standard AOSP build procedure. These files will be injected back into the rebuilt APK.”
Apktool uses aapt2, the tool used in Android Studio to compile your app. You can learn more on what it is here.
B)Troubleshooting:​First, remember that you can use aapt1 (used by default) and aapt2 when recompiling, try both if you run into some issues with the first.
If you have an issue with APKtool's dummy values, go on the Github Issue I opened, the problem is now solved.
Most common error, and simple to solve are the following:
-Name of the file not written correctly:​
Code:
brut.directory.DirectoryException: java.nio.file.NoSuchFileException: Firefoxr
Solution: The correct name is Firefox not Firefoxr, how dumb can I be?
​-Aapt errors: (here a folder isn’t recognized):​
Code:
W:invalid resource directory name: /Users/Raiz/Desktop/apktool/Firefox/res navigation
Solution: Use aapt2, the folders not recognized are because aapt1 (used by default) is older than aapt2, so if you see an error like this, use the option “—use-aapt2”
​-Xml Errors:​
Code:
W: /Users/Raiz/Desktop/apktool/framework-res/res/values/styles.xml:1185: error: Resource entry Theme.Holo already has bag item textEditSuggestionItemLayout.
Solution: These errors are quite easy to fix, just go to the file at the line mentioned then fix the error. Usually it a doubled line, a synthax error, …
Unfortunately APKtool isn’t able to correct string typos, it’s up to you to write in correct English (definitely struggling with that on my side lol).
For other more specific errors, copy/pasting the error message in the google search bar will most certainly redirect you to a Github error, or a post in The Official APKtool XDA Thread. You can find answers by searching, so search thoroughly before asking, it’ll save you some time.
And what is troubleshooting without
[UNIVERSAL][LOGCAT]How to get & read a logcat/ Troubleshoot your own issues!
by @Stryke_the_Orc​
Credit for this part:
APKtool issues on Github
The APKtool documentation
@iBotPeaches for this amazing tool
VI-Sign and Zipalign​
We must sign an app after having modified it, so it can be installed properly on our devices. System Apps MUST keep the same signature they had before modifying, or else the app will continuously force close, and it may even result in bootloops and other bad things.
To keep the signature take the META-INF folder from the not decompiled apk (browse it as a zip file) and put it in the newly recompiled apk (browse it as a zip file too, if there is already a META-INF folder, just replace it)
Links to build and platform tool:
Platform-tools: https://developer.android.com/studio/releases/platform-tools​Build-tools: Have to be downloaded from sdk manager in android studio​
A)Official way:​Tool used in the correct order:
1)keytool (included inside java)
2)zipalign from build tools (29.0.2 here, but use the latest )
3)apksigner from build tools (29.0.2 here, but use the latest) (+the lib folder containing apksigner.jar)
Where are build tools?
Mac: ~/Library/Android/sdk/build-tools/[your buld-tool version]/
Linux: ~/Android/sdk/build-tools/[your buld-tool version]/
Windows: C:/User/yourusername/AppData/Local/Android/sdk/build-tools/[your buld-tool version]/
Disclaimer: Using jarsigner is also possible (tool natively included in java jdk), if you use it, make sure you zipalign AFTER signing.
Make sure that apksigner (and lib) as well as zipalign are in the folder you’re apk is in.
Make sure they’re all executable (check that using chmod) and on mac os, make sure your terminal has full disk access (I had a hard time figuring this out lol).
​1-Generate keystore:​This is pretty simple, we’ll use keytool, at tool antively included in java jdk. We’ll need only one thing before using apksigner : the keystore.jks file (or a separate certificate and private key, but that’s more complicated)
keytool -genkey -v -keystore ~/Desktop/apktool/keystore.jks -alias Raiz -keyalg RSA -keysize 2048 -validity 10000​
Just replace the alias (here Raiz) by a familiar name, you have to remember it! (here’s why)
Also replace the name of the jks file (but not it’s extension, even though it can be .keystore, I had less issues with .jks)
Quick explanation of what does what in the command:
keytool : the command to use keytool obviously
-genkey : generate the keystore
-v : display verbose
-keystore : set the path to the future file
~/Desktop/apktool/keystore.jks : Path and name of the future file, you can call the keystore whatever you want to.
-alias Raiz : specify the alias used, it can be whatever you want, but remember it, it’s like a publisher name
-keyalg RSA : specify the algorithm used for the key, here it’s RSA (here’s a bit of history)
-keysize 2048: the size of the key in bits
-validity 10000: validity in days, here 10000 days
1*- Generate key.pk8 and cert.pem:​This is a quote from another thread (by @wilskywalker), this isn't necessary, but can come handy when signing zip, so I'll leave that here anyway.
You will need the following download:
OpenSSL [LINK]
[...]
Code:
openssl genrsa -out key.pem 1024
openssl req -new -key key.pem -out request.pem
openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem
openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8
Click to expand...
Click to collapse
2- Zipalign:​​./zipalign -v 4 firfox-mod.apk firefox-aligned.apk​Quick explanation:
-v : verbose
4 : align on 4 bits, putting another value will align the wrong way, just keep 4
firefox-mod.apk: name of the input apk, can be anything
firefox-mod-aligned.apk: name of the output apk, can be anything too
3-Sign the apk with apksigner:​
./apksigner sign --ks keystore.jks firefox-mod-aligned.apk​
Quick explanation:
sign: the command use to sign
--ks keystore.jks : specify the keystore file (the same one we generated seconds ago)
firefox-mod-aligned: the input apk (the one we just aligned), note that the apk will be signed and there won’t be any output apk this time
And you’re done, you can check that it has been properly signed with this command:
./apksigner verify firefox-mod-aligned​
Where firefox-mod-aligned is the apk signed we want to check
​3*-Sign the apk with apksigner using .pk8 and .pem files:​
./apksigner sign ---key key.pk8 --cert certificate.pem firefox-mod-aligned.apk​
Credits, links for this part:
How to sign an app (by Google)
apksigner documentation
keytool documentation
zipalign documentation
Stack Overflow post
@Rizal Lovins ’ Guide
B) Unofficial ways:​Some amazing devs and contributors at xda provided us with tools to sign with ease APKs (without having to think about all of that),I didn’t fully tested every one fo them, but you can try them as an alternative if the “official way” didn’t worked out well.
Here they are:
APK easy tool by @evildog1
APK Sign/Zipalign/Install by @aureljared
Uber APK signer (Github)
VII-Installing the apk​Your theme should be ready by now, but how do you want to install it?
There are several ways to get an apk inside your phone, I’ll go over the ones I think are the most common.
A)Regular apk install:​Just install it duh… (here you go if you need a little help).
B)Flashable zip:​I do recommend making flashable zips, because they’re pretty useful when installing modded system apps. So what is it?
1-Folders:​A flashable zip contains 2 folders: META-INF and a folder which will mimic the path to the apk we want to install. Inside that succession of folders, we’ll put our modified apk, and when flashing, the modded apk (inside the zip) will replace the original one inside your phone.
E.g: create system/priv-app/systemUI/systemUI.apk to install a modified systemUI.apk file by replacing the original one
Click to expand...
Click to collapse
E.g: create data/data/com.mixplorer/databases/data.db to replace the original data.db file inside this folder
Click to expand...
Click to collapse
Once you get those folders done (and the apk inside of it), it’s time to write the edify script that’ll flash the zip file.
2-Edify Script:​Edify is the language the script will be written in.
The file containing the script is located in /META-INF/com/google/android/updater-script (the name of the file is updater-script, naming it something else would make it ignored by your custom recovery)
Open this document with a text editor, and start coding!
We want to copy/paste the content of our zips onto the system (and replace files), so here’s the precise things we’ll do:
a-(OPTIONAL)Your “intro”:
Using the ui_print(" "); command, we can make some really cool looking ASCII art. You can write comments at whatever steps you want with this command, it’s pretty handy!
ui_print("Your Message here");​b-Mount the system partition:
​run_program("/sbin/busybox", "mount", "/system");​
c-Extract the content of the zip to /system:
package_extract_dir("system", "/system");​d-Unmount the system partition:
unmount("/system");​This is very basic, you can do so much more with edify script! Set the progress bar progress, set permissions to certain files, delete folders and/or files,...
3-Sign your zip:​You need to sign your zip after compressing it! The process looks like the one with key.pk8 and certificate.pem files, so I'll refere again to the same thread for that. (In the Credits)
I've covered the basics, now it's index time, you can go further with the links in the credits, and you can suggest me more!
Credits:
[WIP] How to Write an Updater-Script with Edify Code by @Karadorde
That one covers how to sign your zip:
[TUTORIAL] Making Flashable ZIPs, EDIFY Script, ZIP Signing & Key Creation [19.01.13] by @wilskywalker
My Very Own Script by Me
More Links:
[GUIDE] Create your own Flashable ZIP with custom updater-script and addon.d script by @Primokorn
[TUTORIAL] The updater-script completely explained by @KINGbabasula
Spoiler: Bonus
4-How to make a working progress bar​First “create” the progress bar that can go up to 100%
show_progress(1.000000, 0);​Then set the progress after each steps: (here I set it at 10%)
Code: set_progress(0.100000)​
C)ADB sideload:​Adb allows one to flash zips through command line using a custom recovery.
How to install adb​Now how to sideload an apk using adb:
Make sure your phone is plugged, and your PC allowed to use adb on your device. (the last steps of the guide I linked on how to install adb on your pc)
Reboot to recovery
For TWRP : Advanced → ADB Sideload For CWM : Install → Install Zip from Sideload
Code: adb sideload path/to/flashable.zip
And that’s it, congrats
D)Aroma Installer:​They’re very cool, yet I’m not really familiar with those.
This concept origins from XDA Inactive Recognized Developer @amarullz , and is used by the OpenGApps team for their Aroma package. Needless to say its work eased the task for many others, feel free to leave a thank on the threads:
Q’n’A about Aroma Installers: [Q&A] AROMA Installer - [Dev Move To DevDB]
Q’n’A about Edify and Aroma: (by @Dblfstr) Aroma, Edify, updater script Question and Answer thread
A tool to create them: [TOOL][3-10-13] Aroma App Package Creator v1.3.2 (by @commandersafi)
VIII-Other ways to theme your device​Making the whole apk is often long, and doesn’t leave much control over the theme to the user, alternative ways of theming let users control how they want the theme to be applied. Those 2 ways won’t be covered by me (as I don’t know enough about them yet), that's why, for this part, every input in welcomed
A)Magisk Modules:​This is now a pretty common and convenient way to distribute APKs and mods, so I had to cover it. Here’s a link to an official developer guide, it covers a good part of it, if you have an input, it is welcome!
https://topjohnwu.github.io/Magisk/guides.html​
B)Substratum Themes:​I don’t even need to tell you what is substratum, as it is pretty famous (along with Magisk), but let’s say you’re totally new.
Substratum is a theme engine that allows you to control what element of your system you want to be themed, and apply themes with the possibility of disabling theme at some point in time. So how to make a substratum theme ?
Links:
Video from the XDA chanel on YT
Another one from XDA on YT
Theme template form the official Substratum Github
IX-Theming related topics​All of the things I couldn't fit in the previous sections are here, make an input, I'll make sure to add it if it's relevant
A)Design Basics:​Now I don’t have especially fine taste in terms of designing, but I’m trying to learn!
Here are some links:
The Android Design Resources Forum in XDA
XDA Article about icon design
Material.io
Matrial.io YT channel
B)Boot Animations:​Here are some helpful threads and links:
[TUTORIAL]How to make your own boot animations (with sound if you want) by @despotovski01
[GUIDE] How To Make Bootanimation by @jackeagle
[GUIDE][TUT]make/Port any bootanimation|||USING VIDEO/FRAMES by @deathviper
C)Icon Packs:​[GUIDE]How to create icon packs for Go/Nova/Apex/Holo/ADW/LauncherPro/XperiaHome by @iamareebjamal
D)Port OEM Apps:​[GUIDE/TIPS] How to Port OEM Apps / Vendor Apps to Your Current ROM by @Rizal Lovins , this one is a wealth of information! really good and unique
D)Build.prop:​[Tweaks][Guide]Build.prop Tweaks by @bravonova
X-Not covered topics​Why don’t you talk about … ? That’s theming tho! And what about … and …? What is this thread!
I understand, these are legit claims, but I can’t cover everything. That’s where YOU come in play, you certainly know things that I don’t, so please, if you have any knowledge about something I didn’t mentioned above, please let me know!
I’m trying to make this thread as complete as possible, so I’d be very grateful if you could share a little about your knowledge .
Thank a bunch!
I know I already said that 10000000 times, but really, it would be awesome to have inputs!
XI-Mods and Wallpapers:​Let me take a tangent from the original purpose of this thread. This was supposed to be all about guides, but I thought about that twice and I think that's a good idea.
Basically, this here will list some of the amazing mods and themes around xda.
The goal here is to crack open those and see how they work, this would represent an immense work that I'm not able to take on right now, so I may leave links here, and you'll do the jobs of understanding how they work. Maybe at some point I'll write some here (with the credits of the OP of course!), but certainly not now.
Links:
Offline Google LLC App Wallpapers by @[email protected]
XII-Changelog:
For each update I'll bump this thread, so that you can enjoy latest links​04-01-2021 Update:
Happy new year! I went through my long list of watched threads, and found the gems I kept selfishly, they're yours now !
Added:
[GUIDE] Create your own Flashable ZIP with custom updater-script and addon.d script
[UNIVERSAL][LOGCAT]How to get & read a logcat/ Troubleshoot your own issues!
[GUIDE/TIPS] How to Port OEM Apps / Vendor Apps to Your Current ROM
[Tweaks][Guide]Build.prop Tweaks
[GUIDE]How to create icon packs for Go/Nova/Apex/Holo/ADW/LauncherPro/XperiaHome
[TUTORIAL] The updater-script completely explained
[TUT][JB] HOW TO THEME SystemUI.apk for TOTALLY newbie
[Reference] Interactive Phone Modification [GUIDE]
[Tutorial][APP] PinP Shortcuts | How to Implement Picture in Picture Mode [API 26+]
Offline Google LLC App Wallpapers
[Overlay] Enable Night Light, Auto-Brightness, Ambient Display & more on Treble ROM
Thanks for this, useful for sure. This is mostly on Windows. There's a way to do this directly on the phone ( most of it anyway).
I use an app called: Apkeditorpro.
I use version 1.9.10 cause i don't like the ui in the newer version.
In it you can :
-edit xmls directly.
-decode the smali and edit them, and view the java code and edit it with no extra tools.
-extract or replace files
-and rebuild the apk when finished. It'll show you a list of compile errors if any when building to review. If the build works it signs it and offers to remove old app and reinstall the new apk.
I found it very useful in editing theme overlays or add fonts in fonts tab in settings.
I am like you an enthusiast in all things modding. Still learning smali/ java editing. Hope we can learn together and from each other
Merry Christmas
Hi is it also valid for Xiaomi apk?
Braain said:
Hi is it also valid for Xiaomi apk?
Click to expand...
Click to collapse
Yep, it's valid for almost anything (any apk at least), feel free to ask here if you encounter problem, I'll do my best to help
Hi I started working with Riru-Enhanced mode for Storage Isolation and some mistakes I made now it's oky now I want to try to modify the handset apk because Xiaomi Redmi 7 is andro system android carefully
Raiz said:
04-01-2021 Update​
Click to expand...
Click to collapse
The First Update of this thread is out!, check out the post I quoted to see the list of threads I added, I also integrated them to the main guide (with proper credits), but I think making a list for each update more convenient for you readers.
I recommend to bookmark those thread or to watch them, because some are really amazing!
[QUOTE = "Raiz, post: 84227321, membro: 8020437"]
Il primo aggiornamento di questo thread è uscito !, controlla il post che ho citato per vedere l'elenco dei thread che ho aggiunto, li ho anche integrati nella guida principale (con i crediti appropriati), ma penso che fare un elenco per ogni aggiornamento più conveniente per voi lettori.
Consiglio di aggiungere quei thread ai preferiti o di guardarli, perché alcuni sono davvero fantastici!
[/CITAZIONE]
Great gems, indeed. Let me add this to the collection:
[Samsung only]How to modify stock font app (SamsungOne.apk, SamsungSans.apk, or Fondation.apk)
This post describes it using ApkEditorPro directly on the phone. It could work on other devices if you know what your stock font app is. It's a simple drag and drop your custom files in the right place.

New projects in Android Studio Dolphin failes with Duplicate class errors

Hello
I try to create new projects with Android Studio Dophin (2021.3.1) which fails nevertheless with java or kotlin on win and linux systems:
Default gradle version: 7.4
Default android gradle plugin version 7.3.0
Compile SDK Version: 32
Target SDK Version: 32
Min SDK Version: 21
Create a new project with Basic Activity will fail with the folliwing error:
Duplicate class androidx.lifecycle.ViewModelLazy found in modules lifecycle-viewmodel-2.5.1-runtime (androidx.lifecycle:lifecycle-viewmodel:2.5.1) and lifecycle-viewmodel-ktx-2.3.1-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1)
Duplicate class androidx.lifecycle.ViewTreeViewModelKt found in modules lifecycle-viewmodel-2.5.1-runtime (androidx.lifecycle:lifecycle-viewmodel:2.5.1) and lifecycle-viewmodel-ktx-2.3.1-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1)
Go to the documentation to learn how to Fix dependency resolution errors.
Click to expand...
Click to collapse
Any hints?

Categories

Resources