UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. AlainW94
    3. Best
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 12
    • Posts 144
    • Groups 0

    Posts

    Recent Best Controversial
    • Backup and restore using ubports-installer

      Hi all, I'm doing some modifications to the ubports-installer in order to be able to manage user and system data backup and restore.

      I have added a backup button on the install screen :
      1.png

      When you click on it you will have the following screen :

      2.png

      The installer will read the size of both system and userdata partition and give you an estimated sized need on your disk. You can name your backup. When you will click ok let's go, the phone will reboot into recovery and the backup will start :

      Capture du 2019-12-03 20-05-51.png

      At this and the phone will reboot into the OS. you will be able to find 2 tar file on your computer disk : one for the system-data, the other one for the user-data.

      It is actually working fine on Meizu Pro 5.
      BUT, in one of my previous thread, I had the issue that in recovery image, the user and system data partition was not mounted on /data.

      In the installer code, I added for the Meizu Pro 5 the mounting of sda44 on /data/

      So my questions to you are :

      • Who else on different phone models have the partition /data/user-data, /data/system-data not mounted in recovery ? If that is the case, what is your partition device to mount ?
      • does every one have the folder user-data and system-data in the /data folder while in recovery ?
      • Are you ok with this feature or do you find it usless ?

      I will now write the restore option.

      posted in App Development
      AlainW94A
      AlainW94
    • RE: MX4 Ubuntu Edition: FAILED (remote: unknown command)

      @jamieweb pull it from github, here are my personal notes when I did it :

      git clone https://github.com/ubports/ubports-installer.git
      cd ubports-installer
      npm run-script dist:linux
      ./setup-dev.sh
      npm start
      
      posted in Support
      AlainW94A
      AlainW94
    • RE: (Solved) - List installed apps

      @Flohack Hi back, thanks for your answer, I finally manage to do my backup and restore with success (thanks goolge).

      I share here how I did:

      Backup :

      #!/bin/bash
      echo "Backing up your data"
      adb reboot recovery
      sleep 15
      adb shell mount /dev/block/sda44 /data
      adb shell mkfifo /backup.pipe 
      adb exec-out 'tar -cvp data/system-data 2>/backup.pipe' | dd of=system.tar & adb shell cat /backup.pipe &
      adb shell rm /backup.pipe
      adb shell mkfifo /backup.pipe 
      adb exec-out 'tar -cvp data/user-data 2>/backup.pipe' | dd of=user.tar & adb shell cat /backup.pipe &
      adb shell rm /backup.pipe
      adb reboot
      

      With this script, you will mount the data partition under the recovery mode, create a pipe to transfer the content of the folder (/data/user-data) through stdout to dd on the local computer in a file named user.tar, then it will do the same for the folder system-data.

      Now to restore :

      #!/bin/bash
      echo "Restoring your data"
      adb reboot recovery
      sleep 15
      adb shell mount /dev/block/sda44 /data
      adb shell mkfifo /resto.pipe
      adb push user.tar /resto.pipe & adb shell 'cd /; cat /resto.pipe | tar -xv'
      adb shell rm /resto.pipe
      adb shell mkfifo /resto.pipe
      adb push system.tar /resto.pipe & adb shell 'cd /; cat /resto.pipe | tar -xv'
      adb reboot
      

      This script will boot the phone into recovery mode, mount the sda44 partition into /data folder, push your backup user.tar through the previously created pipe. On the phone the pipe is catched by cat then sent to tar for decompressing.

      Your backup needs to be in the same folder as the script restore because I written it like this.

      Credits goes there : https://www.forum-generationmobiles.net/t78912-tutoriel-backup-adb-sauvegarde-compressee-des-donnees-de-android-vers-votre-pc-gnu-linux

      I tested it and it's perfectly working, I was able to clone one of my Pro 5 to the other one Pro5.

      sda44 partition is mostly for Pro5, not sure that this mount works on other model.
      I hope that this could help other people.

      The best way is maybe to add this feature to ubports-installer, in order to be able to just backup/restore our phone (and of course re-installing it) only with one tool.

      What are you thinking about that ?

      posted in OS
      AlainW94A
      AlainW94
    • RE: PinePhone

      @PINE64 You mean the SanDisk flash ? πŸ˜‚ πŸ˜‚ πŸ‘

      posted in General
      AlainW94A
      AlainW94
    • RE: SDK documentation

      Thanks @dobey once again. I have nothing to modify in it, just trying to save time by copying a portion of existing code to create a new ListView for the VVM messages in the dialer-app, I copy the ListView from the call history and I was looking for the structure of the model.

      I added a button (that will be showed only if the service is activated) on the dialer page :
      screenshot20190330_000034438.png

      That will display a new page :

      screenshot20190330_000021658.png

      I would like to display a play line when we touch the item (like the iphone style).

      posted in App Development
      AlainW94A
      AlainW94
    • RE: WiFi password loss after each and every reboot on MEIZU Pro 5

      @ubuntoutou Ok, we progress... normaly SN should display the serial number of the phone (the one you get with adb devices. And the two line should display your WiFi mac addresses.

      on my phone it give :

      Mar  6 19:02:40 ubuntu-phablet kernel: [    1.246534]  [5:  kworker/u16:1:   59] [c5] @@@@ SN 860BCMSxxxxx
      Mar  6 19:02:40 ubuntu-phablet kernel: [    1.246746]  [5:  kworker/u16:1:   59] [c5] @@@@ MAC 68:3E:34:xx:yy:58
      Mar  6 19:02:40 ubuntu-phablet kernel: [    1.246957]  [5:  kworker/u16:1:   59] [c5] @@@@ MAC 68:3E:34:xx:yy:59
      

      We have now to find what part of the kernel is giving thoses informations, if anybody had an idea ... you are welcome

      posted in Support
      AlainW94A
      AlainW94
    • RE: MX4 Ubuntu Edition: FAILED (remote: unknown command)

      @jamieweb Of course, no problem at all if that can help other people experiencing this with their Meizu πŸ˜‰ If you need help for your script, please post in your original thread and I will try to help you. Good job.

      posted in Support
      AlainW94A
      AlainW94
    • Development tools VM

      Hi, is it possible for the further new developers who would like to start devoted on OTA to have virtual machins ready to use downloadable from ubports please ? With the official tools for ubports, I mean today we still be between old SDK (by the way it seems that the https://system-image.Ubuntu.com is not working anymore) and the atom with ubports where I found that it's difficult to find a tutorial to start a new app. if the community can simply have a downloadable VM with the dev env already setup for ubports, it can maybe help a lot of people to start helping by creating new app for our favorite OS.

      I know that one VM is already made for the old sdk but how long will it be supported? I would like to implement a visual voice mail app for OTA and I don't want to have to rewrite it after 5 month for example...

      posted in App Development
      AlainW94A
      AlainW94
    • RE: RGB LED Notification bridded to White only [MEIZU Pro5]

      @Flohack oh I was thinking that only the Meizu Pro5 was missing notifications features ! I will first modify my driver to enable the rgb function then ... I will try to take care of the API for everybody .

      posted in OS
      AlainW94A
      AlainW94
    • RE: Lost IMEI and AT command

      @stefano hi! Many thanks for your answer, I will try your solution, the phone was initially running Android, I convert it to Ubuntu 2 days after buying it. I should have the international version somewhere on my computer. I'll keep you informed.

      posted in Support
      AlainW94A
      AlainW94
    • RE: Development tools VM

      Thanks, I will take a look at this!

      posted in App Development
      AlainW94A
      AlainW94
    • RE: Execute a command when an SMS is received?

      You could also monitor the system dbus, sms appears in clear text on it.

      Sorry I can't copy paste from terminal , maybe a bug.

      sudo dbus-monitor --system "type='signal', interface='org.ofono.MessageManager'"
      
      posted in OS
      AlainW94A
      AlainW94
    • RE: Upgrade to OTA 8 (from OTA7, stable) interrupted on FP2

      @ublublu you have to start the phone on bootloader usually power and vol down button hold at the same time until the scene display the fastboot message then using fastboot flash recovery [name of the recovery file]. or you can also try directly to start in recovery by holding at the same time vol up and power button. if you got the recovery screen, then start the ubports-installer. they are some thread about flashing a recovery for your phone over the net. sorry I don't have your model then I can't give you the precise procedure

      posted in Support
      AlainW94A
      AlainW94
    • RE: Development tools VM

      @dobey hi, it is now standardized with omtp, as you can read in the link I posted before, I activate this service on my account and I receive a class 1 sms with the imap server adress, the port and the credentials. Then I configurate it inside dekko2 and I was able to receive my voice messages as an attachment in the email.

      posted in App Development
      AlainW94A
      AlainW94
    • RE: Execute a command when an SMS is received?

      Happy to help ! πŸ‘

      posted in OS
      AlainW94A
      AlainW94
    • RE: MX4 Ubuntu Edition: FAILED (remote: unknown command)

      @jamieweb I also had this error on Meizu Pro5, my solution was to modify the ubports-installer in order to ask the user to manually reboot the phone into recovery when this error occured, The installer wait and when your phone is in recovery, it perform the next step (downloading image and pushing it to the phone).

      I can share the modified installer with you if you need.

      posted in Support
      AlainW94A
      AlainW94
    • RE: Development tools VM

      @advocatux hi yes I can write a how to, the only things is that you will have to mount your file system in read write mode for a short time in order to activate the debug traces on ofono. ofono is actually ignoring the sms class 1 sent by the provider. I modified it in order that ofono push those sms on dbus as new signal that an application can catch. I'm waiting a new motherboard for a old meizu pro 5 to play my tests app on it before to release it..

      posted in App Development
      AlainW94A
      AlainW94
    • RE: support for led notifications

      @matteo I dind’t find Time to do it but I think the best way would be to download the kernel turbo from github, modify the driver, compil the kernel and simply copy paste the module on the device with a write fs activated. My plan was to do that like this.

      posted in OS
      AlainW94A
      AlainW94
    • RE: MX4 Ubuntu Edition: FAILED (remote: unknown command)

      @AlainW94 said in MX4 Ubuntu Edition: FAILED (remote: unknown command):

      @jamieweb I perfectly understand, I modified it there is a while ... let me look for the modified file then i will post it there.

      Try to replace this part of code in the file src/devices.js :

      var instructBootstrap = (fastbootboot, images, bootstrapEvent) => {
          //TODO check bootloader name/version/device
          var flash = (p) => {
              fastboot.flash(images, (err, errM) => {
                  if(err)
                    handleBootstrapError(err, errM, bootstrapEvent, () => {
                      instructBootstrap(fastbootboot, images, bootstrapEvent);
                    });
                  else {
                    if (fastboot) {
                        utils.log.info("Booting into recovery image ALAIN...");
                        // find recovery image
                        var recoveryImg;
                        images.forEach((image) => {
                          if (image.type === "recovery")
                            recoveryImg = image;
                        });
                        // If we can't find it, report error!
                        if (!recoveryImg){
                          bootstrapEvent.emit("error", "Cant find recoveryImg to boot: "+images);
                        }else {
                          fastboot.boot(recoveryImg, p, (err, errM) => {
                            if (err) {
      			utils.log.error("Fastboot: AW boot error; ");
      
      			bootstrapEvent.emit("bootstrap:done", fastbootboot); // Ignore the error, ignore the bootstrap, boot into recovery then the installer will did the flash upload, works well on my Pro5, I only had to flash the recovery fisrt with fastboot flash recovery recovery.img, then run the installer. That's not nice I know but that worked for me.
      
                              //handleBootstrapError(err, errM, bootstrapEvent, () => {
                              //  instructBootstrap(fastbootboot, images, bootstrapEvent);
                              //});
                            }else
                              bootstrapEvent.emit("bootstrap:done", fastbootboot);
                          })
                        }
                    } else
                        bootstrapEvent.emit("bootstrap:done", fastbootboot)
                  }
              }, p)
          }
          bootstrapEvent.emit("bootstrap:flashing")
          bootstrapEvent.emit("user:write:status", "Flashing images ALAIN")
          if (!utils.needRoot()) {
              flash(false);
          }else {
              requestPassword(bootstrapEvent, (p) => {
                  flash(p);
              });
          }
      }
      

      You will have to compile and install it or run it from the sources.
      Good luck.

      posted in Support
      AlainW94A
      AlainW94
    • RE: Ability to toggle airplane / flight mode within an app

      @AppLee Hi ! Maybe you can have a look to oFono, it is the app that is controlling the modem. In the documentation there is :

      Flight Mode

      • Flight Mode support. oFono uses the 'Online' property on the Modem interface
        that controls the state of the radio. When Online state is False, all
        interfaces that depend on the radio being on are removed. Other interfaces
        enter reduced functionality mode where only certain actions are available
        that do not depend on the radio. E.g. setting various settings on the local

      You can use D-bus message for putting the radio on or off:

      here you have the related d-Bus message :
      https://github.com/intgr/ofono/blob/master/doc/modem-api.txt

      Properties boolean Powered [readwrite]

      		Boolean representing the power state of the modem
      		device.
      
      	boolean Online [readwrite]
      
      		Boolean representing the rf state of the modem.
      

      Online is false in flight mode.

      posted in App Development
      AlainW94A
      AlainW94