Что-то вы гоните насчет "привычного вида формата 755 и 644". Я вот вообще не понял что это!😳
Действительно, что означают цифры которые мы получили в прошлом посте?
Это кодировка, заключающая в себе режимы доступа к файлу.
Подробней можно почитать в статье про chmod.
Там можно увидеть альтернативное обозначение того же самого с помощью символов r w x, что значит чтение, запись, исполнение.
Чтобы преобразовать восьмеричное число в такое обозначение в Python есть готовая функция
>>> stat.filemode(0o755)
'?rwxr-xr-x'
Мы видим 3 группы по 3 символа, дающие 3 типа доступа для 3 типов юзеров.
А что за знак вопроса в начале?
Давайте передадим в эту функцию необрезанное значение от os.stat
>>> stat.filemode(os.stat(path).st_mode)
'drwxr-xr-x'
Это данные, которые мы безжалостно обрезали в прошлый раз😼
Первый символ обозначает тип объекта. Это может быть файл (-), директория (d) или симлинк (l).
Вот простая схема данной кодировки
[1][3][3][3]
│ │ │ │
│ │ │ └──> Others Permissions
│ │ └─────> Group Permissions
│ └────────> Owner Permissions
└───────────> File Type
(разверните экран если вы с телефона)
Если вы попробуете получить пермишены для симлинка то получите пермишены для файла
>>> path = '.venv/bin/python3'
>>> stat.filemode(os.stat(path).st_mode)
'-rwxr-xr-x'
Чтобы получить свойства именно симлинка, нужно это явно указать
>>> stat.filemode(os.stat(path, follow_symlinks=False).st_mode)
'lrwxrwxrwx'
#tricks#basic
Nameless AOSP - Official | Android 13 | Nothing Phone (2)
📝 Details:
- Version: 1.4
- Status: #Official
- Device: Pong
- Released: 26/11/23
⬇️Download : Build l Images
👀 Changelogs : Here
🌳Device Tree : Here
📔Flashing Instructions : Here
🎙Support Group: Here
🏛 XDA : Here
📸 Screenshots:Here
💰Donate : Paypal | UPI : chandudyavanapelli3-1@okhdfcbank
🏷Tags : #AOSP#ROM#Nameless#T
❌Known Issues:
- No NFC Support (Sadly PN560 NFC is not supported in Android 13. Will be revisited once we move to Android 14)
✍️Note:
- Report issues (if any except known ones) with logs in support group / comments
- This is the final Android 13 release. We will start work on Android 14 from 2024 January.
🏆 Credits:
- Chandu Dyavanapelli for initial DT bringup
- Pong Dev and Testing Team & Contributors
👤 Maintainer : @Chandu_Dyavanapelli
🔔 Updates : @NothingPhone2Updates
🐙 Chat : @NothingPhone2
Nameless AOSP | Android 13 | Nothing Phone (2)
📝 Details:
- Version: 1.4
- Build: #Beta
- Status: #Official
- Device: Pong
- Released: 12/11/23]
⬇️Download : Build l Images
🌳Device Tree : Here
📔Flashing Instructions : Here
🎙Support Group: Here
📸 Screenshots:Here
💰Donate : Paypal
🏷Tags : #AOSP#ROM#Nameless#T
✨ Changelogs:
- Initial Test Build
❌ Known issues:
- NFC is broken, causing the system UI to crash after every reboot, but only once.
- Haptics are not similar to stock but will improve in upcoming builds.
- Dont use "Hey Google" as it leads to crashdump. Use factory reset to revive.
- Some device specific features are not added, will be added eventually.
- Report bugs (with logs ofc) in the comment section.
🏆 Credits:
- Chandu Dyavanapelli for initial DT bringup
- Pong Dev and Testing Team & Contributors
👤 Maintainer : @Chandu_Dyavanapelli
🔔 Updates : @NothingPhone2Updates
🐙 Chat : @NothingPhone2
Nameless CLO - Official | Android 15 | Nothing Phone (2)
🗒 Details:
- Version: A15
- Codename: #Pong
- Released: 22/12/24
🔽 Download: ROM [ Sourceforge l Mirror ] || Images [ Sourceforge l Mirror ]
🆘 Support : Telegram l Wiki
⚙️ Installation: Here
📸 Screenshots: Here
💵 Donate: Paypal | UPI: dyavanapellichandu@ybl
🔖 Tags : #ROM#CLO#Nameless#V#Official#NothingPhone2
✨Source Changelogs:
- Initial A15 Release based on CLO
✍️ Note:
- A clean flash is required if you're coming from Nameless-AOSP or any custom ROMs.
- You will not receive OTA updates in Nameless-AOSP for this build.
👤 Dev : Chandu Dyavanapell
🔔 Updates : @NothingPhone2Updates
💬 Chat : @NothingPhone2
Nameless AOSP - Official | Android 14 | Nothing Phone (2)
🗒 Details:
- Version: A14 - Final
- Codename: #Pong
- Released: 14/09/24
🔽 Download: Here | Mirror
🆘 Support : Here
⚙️ Installation: Here
📸 Screenshots: Here
💵 Donate: Paypal | UPI: dyavanapellichandu@ybl
🔖 Tags : #ROM#AOSP#Nameless#QPR3#U#Official#NothingPhone2
✨Source Changelogs:
- Merged September security patch
- Updated default wallpaper and boot animation
- Add navbar animation in pixel launcher
- Stability improvements and minor fixes
✍️ Note:
- This is the final A14 release and no OTA update exists for the same.
- Please update manually in recovery mode
👤 Dev : Chandu Dyavanapell
🔔 Updates : @NothingPhone2Updates
💬 Chat : @NothingPhone2