ninja, kati in aosp - How to print all executed commands when executing 'mm' or 'mmm' or 'mmma' - android-source

How to show all executed bash commands when building only one project from aosp using 'mm' ? (ie. to get the same output as 'mm showcommands' on older aosp version with make builder)

from build/make/Usage.txt
Targets that adjust an existing build:
showcommands Display the individual commands run to implement
the build
try
$ mm showcommands

Related

Exception: Gradle build failed to produce an .apk file,the tool couldn't find it

I used flutter flavor and I can't run but it run from terminal using this type of command:
flutter run --flavor prod -t lib/main_prod.dart
When I run using android studio run button then show this exception, which I write below:
Exception: Gradle build failed to produce an .apk file. It's likely that this file was generated under C:\Users\ranak\StudioProjects\bachelor_flat\build, but the tool couldn't find it.
here is my app-build.gradle file
Click on the dropdown near the run button and select Edit Configurations, then write --flavor prod -t lib/main_prod.dart or anything you want in the Additional run args text field.

Flutter - Could not find a command named "-"

I'm new to flutter, when I created a new project of flutter and run it, this appears :
Using hardware rendering with device AOSP on IA Emulator. If you notice graphics artifacts,
consider enabling software rendering with "--enable-software-rendering".
Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Could not find a command named "-".
Usage: dart [<vm-flags>] <command|dart-file> [<arguments>]
Global options:
-h, --help Print this usage information.
-v, --verbose Show additional command output.
--version Print the Dart SDK version.
--enable-analytics Enable anonymous analytics.
--disable-analytics Disable anonymous analytics.
Available commands:
analyze Analyze the project's Dart code.
compile Compile Dart to various formats.
create Create a new project.
fix Apply automated fixes to Dart source code.
format Idiomatically format Dart source code.
migrate Perform a null safety migration on a project or package.
pub Work with packages.
run Run a Dart program.
test Run tests in this package.
Run "dart help <command>" for more information about a command.
See https://dart.dev/tools/dart-tool for detailed documentation.
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 510ms
Exception: Gradle task assembleDebug failed with exit code 64
I'm stuck with this problem, how to solve this?
I have solved this problem. I run this project in my D: directory while my flutter and android SDK was installed in C: directory. So, when I tried to create flutter project in C:, it worked. But, I still can't configure why this problem happened.
#Papskipapap may I ask, if running your project on D: also inculded some path name which contained a "-" (dash) in it? As a rule of thumb: Keep pathnames easy, i.e. without blanks or special characters other than "_" (underscore), many tools just can not handle those...

How to obfuscate Flutter apps ios?

please help me for the steps to obfuscate the code, step by step until it's finished?
and how do I see if my obfuscate code is successful or not.
Previously I tried running this command "flutter build ios --obfuscate --split-debug-info = / / " but an error appears like this: bash: syntax error near unexpected token `newline ', why the error?
The "obfuscate" function will split the debug-info for your Flutter app when building for the respective platform. for e.g., if your preparing to ship the version 2.0.1, then you'll get a folder named "2.0.1" which shall contain the .symbols files.
Now about how to get this done is by using this command flutter build ios --obfuscate --split-debug-info=debug-info
This will create a folder named debug-info in the root directory of your project and if you do have a new directory created in that after running the above command, then it means that the obfuscation was successful.

List packages which will be included in host Yocto SDK

I'm currently encountering an issue whereby the version of OpenCV being included in the target image is different to that which is being included in the host SDK (3.4.x as opposed to 3.3.x).
In order to better debug this, I want to list the packages (and their versions) which will be included in the host SDK produced by bitbake core-image-weston -c populate_sdk.
How can I do this? Note: I'm using the command line and am not using Toaster.
Thanks in advance.
One good way to debug such package or sdk issues is yocto buildhistory
Add the content below to your local.conf
INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "1"
BUILDHISTORY_FEATURES = "image package sdk" # maybe already default value
A new folder will be created under build/buildhistory/ , which allows you to verify packages, sdk and the image in a easy manner.
Edit:
Since you want it before compiling everything:
bitbake -g core-image-weston -c populate_sdk && cat pn-buildlist | sort | uniq | bitbake -s > dependencies

How to run an Xcode built app from the command line (bash)

Following on from my question How to run an xcode project from bash?
I've found the built *.app in the build directory, but I'm trying to figure out how to get xcode to open it as it can't just be run as a Mac OS X program.
Any ideas?
thanks to chuan at this post: XCode Test Automation For IPhone
I'm stuck with the same problem trying to launch my debug output from building my xcode project. I just experimented with the following
open ./prog.app&
seems to do the trick.
I've solved my problem using a bash file that uses rsync to sync working directories and then AppleScript which builds and runs the project.
sync.sh:
#!/bin/bash
# script for moving development files into xcode for building
developmentDirectory="/"
xcodeDirectory="/"
echo 'Synchronising...'
rsync -r $developmentDirectory $xcodeDirectory \
--exclude='.DS_Store' --exclude='.*' --exclude='utils/' --exclude='photos'
echo 'Synchronising Done at:'
echo $(date)
buildandrun:
set projectName to "projectName"
# AppleScript uses : for / in directory paths
set projectDir to "Users:username:Documents:" & projectName & ":" & projectName & ".xcodeproj"
tell application "Xcode"
open projectDir
tell project projectName
clean
build
(* for some reasons, debug will hang even the debug process has completed.
The try block is created to suppress the AppleEvent timeout error
*)
try
debug
end try
end tell
quit
end tell
Then, finally, I'm using a shell script called run.sh aliased in my .bash_profile:
run.sh:
#!/bin/bash
bash utils/sync.sh
osascript utils/buildandrun