Giter VIP home page Giter VIP logo

adevtool's Introduction

๐Ÿ‘‹ Hey! Iโ€™m Danny, a student and developer.

๐Ÿš€ Focus: building OrbStack, a fast, light, and simple way to run Docker container and Linux machines on macOS

๐Ÿ“š Interested in: Android, web, virtualization, color science, AI

Want to support my work?

Try OrbStack.

Or for open-source projects: Liberapayใ€€ใ€€Patreonใ€€ใ€€PayPal

More stuff Iโ€™ve done

...and more.

Find me on:ใ€€ใ€€๐Ÿฆ Twitterใ€€ใ€€๐Ÿ’ฌ Telegramใ€€ใ€€๐Ÿ“ง Email

adevtool's People

Contributors

flawedworld avatar kdrag0n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

adevtool's Issues

adevtool broken when extracting files from /system on Android 13

Extracting stock system source   sysroot/coral-tpp2.220218.010
Enumerating files   vendor
Replacing blobs with buildable modules
Marking apps as presigned โ ด app/Traceur/Traceur.apkError: Command failed: out/host/linux-x86/bin/aapt2 dump packagename /tmp/adevtool-50360044/sysroot/coral-tpp2.220218.010/app/Traceur/Traceur.apk
ziparchive W 04-21 17:04:44 379225 379225 Unable to open '/tmp/adevtool-50360044/sysroot/coral-tpp2.220218.010/app/Traceur/Traceur.apk': No such file or directory
/tmp/adevtool-50360044/sysroot/coral-tpp2.220218.010/app/Traceur/Traceur.apk: error: failed opening zip: I/O error.

    at ChildProcess.exithandler (node:child_process:398:12)
    at ChildProcess.emit (node:events:527:28)
    at maybeClose (node:internal/child_process:1090:16)
    at Socket.<anonymous> (node:internal/child_process:449:11)
    at Socket.emit (node:events:527:28)
    at Pipe.<anonymous> (node:net:715:12)

Seems to be some sort of path issue where it incorrectly skips system/system instead of just system?

ReferenceError: structuredClone is not defined

android@tom:~/stock_images$ ll
total 2372208
drwxrwxr-x  2 android android       4096  8ๆœˆ 26 12:44 ./
drwxr-x--- 36 android android       4096  8ๆœˆ 26 13:03 ../
-rwx------  1 android android 2429127521  8ๆœˆ 26 11:51 oriole-tq2a.230405.003.e1.zip*
android@tom:~/stock_images$

android@tom:~/aosp13$ adevtool generate-prep -s ~/stock_images -b tq2a.230405.003.e1 tools/adevtool/config/pixel/oriole.yml
    ReferenceError: structuredClone is not defined

android source ๏ผš
TQ2A.230405.003.E1 | android-13.0.0_r41

How should I use this tool

Throws Error: No supported source format found in <dir> when generate-prep command is executed

I was trying to build ROM for Pixel 4a(sunfish). I downloaded the vendor package using

adevtool download stock_images -d sunfish
it successfully downloads the package

but when I execute adevtool generate-prep -s stock_images -b sq1d.220205.002 sunfish.yml I get the following error

Extracting stock system source โ ‹ Error: No supported source format found in 'stock_images'

How can this be solved?

SyntaxError: Unexpected token r in JSON at position 1

keyurmaru@gandalf:~/rk3399/rk3399c_android10.0_tesa$ adevtool collect-state out/hello/ -d rk3399_firefly_aioc_ai_lvds
Enumerating files   odm_dlkm
Extracting properties   
Extracting SELinux contexts   
Extracting overlays โ ผ /home/keyurmaru/rk3399/rk3399c_android10.0_tesa/out/target/product/rk3399_firefly_aioc_ai_lvds/vendor/overlay/framework-res__auto_generated_rro_vendor.apk    SyntaxError: Unexpected token r in JSON at position 1

[Question] vendor state

Does vendor state need to be created on a base AOSP as is, or after I made some changes to AOSP?

Error during AOSP build after adding adevtool-extracted blobs

Hello there,

I'm trying to compile AOSP branch android-12.1.0_r7 for sunfish (Pixel 4a) device.

After using adevtool to extract the blobs (and put under vendor/google_devices) I encounter errors about sepolicy during the build, that stop it.

Here they are:

[ 51% 75020/144890] build out/target/product/sunfish/obj/ETC/sepolicy.recovery_intermediates/sepolicy
FAILED: out/target/product/sunfish/obj/ETC/sepolicy.recovery_intermediates/sepolicy
/bin/bash -c "(ASAN_OPTIONS=detect_leaks=0 out/host/linux-x86/bin/checkpolicy -M -c             30 -o out/target/product/sunfish/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp out/target/product/sunfish/obj/ETC/sepolicy.recovery_intermediates/sepolicy.recovery.conf ) && (out/host/linux-x86/bin/sepolicy-analyze out/target/product/sunfish/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp permissive > out/target/product/sunfish/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains ) && (if [ \"eng\" = \"user\" -a -s out/target/product/sunfish/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains ]; then            echo \"==========\" 1>&2;               echo \"ERROR: permissive domains not allowed in user builds\" 1>&2;           echo \"List of invalid domains:\" 1>&2;              cat out/target/product/sunfish/obj/ETC/sepolicy.recovery_intermediates/sepolicy.permissivedomains 1>&2;          exit 1;   
            fi ) && (mv out/target/product/sunfish/obj/ETC/sepolicy.recovery_intermediates/sepolicy.tmp out/target/product/sunfish/obj/ETC/sepolicy.recovery_intermediates/sepolicy )"
device/google/sunfish-sepolicy/vendor/qcom/common/attributes:2:ERROR 'Duplicate declaration of type' at token ';' on line 6386:
attribute vendor_persist_type;
#line 1 "device/google/sunfish-sepolicy/vendor/qcom/common/attributes"
checkpolicy:  error(s) encountered while parsing configuration

[ 51% 75021/144890] build out/target/product/sunfish/obj/FAKE/sepolicy_neverallows_intermediates/sepolicy_neverallows
FAILED: out/target/product/sunfish/obj/FAKE/sepolicy_neverallows_intermediates/sepolicy_neverallows
/bin/bash -c "(ASAN_OPTIONS=detect_leaks=0 out/host/linux-x86/bin/checkpolicy -M -c             30 -o out/target/product/sunfish/obj/FAKE/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp out/target/product/sunfish/obj/FAKE/sepolicy_neverallows_intermediates/policy.conf ) && (out/host/linux-x86/bin/sepolicy-analyze out/target/product/sunfish/obj/FAKE/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp neverallow -w -f out/target/product/sunfish/obj/FAKE/sepolicy_neverallows_intermediates/policy_2.conf ||           ( echo \"\" 1>&2;         echo \"sepolicy-analyze failed. This is most likely due to the use\" 1>&2;            echo \"of an expanded attribute in a neverallow assertion. Please fix\" 1>&2;         echo \"the policy.\" 1>&2;      exit 1 ) ) && (touch out/target/product/sunfish/obj/FAKE/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp ) && (mv out/target/product/sunfish/obj/FAKE/sepolicy_neverallows_intermediates/sepolicy_neverallows.tmp out/target/product/sunfish/obj/FAKE/sepolicy_neverallows_intermediates/sepolicy_neverallows )"
device/google/sunfish-sepolicy/vendor/qcom/common/attributes:2:ERROR 'Duplicate declaration of type' at token ';' on line 6386:
attribute vendor_persist_type;
#line 1 "device/google/sunfish-sepolicy/vendor/qcom/common/attributes"
checkpolicy:  error(s) encountered while parsing configuration
[ 51% 75068/144890] //frameworks/base:framework-cppstream-protos generate 2
frameworks/base/core/proto/android/os/batteryusagestats.proto:22:1: warning: Import frameworks/proto_logging/stats/enums/os/enums.proto but not used.
17:15:28 ninja failed with: exit status 1

Do you have an idea of what could be the culprit?

Kind regards

asciinema recording archived in README.md

The linked asciinema recording at the top of the README is archived and not working. I have a screenshot below.

Screenshot of archived asciinema recording in README.md

Clicking on the asciinema recording directs to the "This recording has been archived" page, shown in the screenshot below.

asciinema page with the message, "This recording has been archived / All unclaimed recordings (the ones not linked to any user account) are automatically archived 7 days after upload."

adevtool violates PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS on redfin

With the configuration in https://github.com/flawedworld/adevtool/tree/adevtool-mainline-issue adevtool violates mainline checks on redfin.

[ 99% 260/261] finishing build rules ...
FAILED:
build/make/core/artifact_path_requirements.mk:26: warning:  vendor/google_devices/redfin/redfin.mk produces files inside build/make/target/product/generic_system.mks artifact path requirement.
Offending entries:
system/lib64/[email protected]
In file included from build/make/core/main.mk:1345:
build/make/core/artifact_path_requirements.mk:26: error: Build failed.
22:44:52 ckati failed with: exit status 1

Generate-prep/all throws various errors depending by node version

Hello there, I'm running Ubuntu 20.04 with npm installed through nvm-sh.
While using generate-prep (or generate-all), the error vary depending on node version:

Command used: adevtool generate-prep -s ~/dump/denniz_a16/ -b rp1a.200720.011 denniz.yaml

Dump used: https://gitlab.com/Giovix92/denniz_dump

Tinkered a bit with nvm, and found out the errors are different depending by node version:

  • Node v12.22.0 (suggested): SyntaxError: Unexpected token '?'
  • Node v16.13.2 (lts/Gallium): ReferenceError: structuredClone is not defined
  • Node v17.x.0: [...] Extracting properties โ ‹ TypeError: Cannot read properties of undefined (reading 'split')

YAML used:

device:
  name: denniz
  vendor: oneplus

platform:
  product_makefile: device/oneplus/denniz/lineage_denniz.mk

  namespaces:
    - hardware/oplus

generate:
  files: true
  props: true
  overlays: true
  vintf: true

Does that depend by my system config, my dump or by node/node package itself?

Thank you in advance!

OOP refactor

Contingent on a clean and performant solution for constructing data-oriented classes with many properties, similar to Kotlin's data class.

For now, everything is using JS objects for idiomatic data-oriented types, but this makes the "methods" ugly.

adevtool download gives unexpected token '?'

Hi, I'm trying to run: adevtool download ~/stock_images -d raven
Tried for a different device also: adevtool download ~/stock_images -d bluejay

It just gives: Syntax Error: Unexpected token '?'

any ideas what is causing this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.